local Players = game:GetService("Players") local RunService = game:GetService("RunService") local highlightColor = Color3.fromRGB(128, 0, 128) -- Фиолетовый цвет local isHighlighting = false local highlights = {} local function toggleHighlights() isHighlighting = not isHighlighting if isHighlighting then for _, player in ipairs(Players:GetPlayers()) do local character = player.Character if character then local highlight = Instance.new("Highlight") highlight.FillColor = highlightColor highlight.OutlineColor = highlightColor highlight.Parent = character highlights[player] = highlight end end else for player, highlight in pairs(highlights) do highlight:Destroy() highlights[player] = nil end end end -- Обработчик нажатия клавиш local UserInputService = game:GetService("UserInputService") UserInputService.InputBegan:Connect(function(input, gameProcessedEvent) if gameProcessedEvent then return end if input.KeyCode == Enum.KeyCode.R then toggleHighlights() elseif input.KeyCode == Enum.KeyCode.T then if isHighlighting then toggleHighlights() end end end) -- Удаление подсветки при выходе игрока Players.PlayerRemoving:Connect(function(player) if highlights[player] then highlights[player]:Destroy() highlights[player] = nil end end)