--[[ 📘 Roblox Highlights GUI Script Place this LocalScript in StarterPlayer → StarterPlayerScripts Works on PC, Mobile, and Console Toggles a draggable GUI that highlights players. --]] -- Services local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") -- Player local LocalPlayer = Players.LocalPlayer -- Create ScreenGui local screenGui = Instance.new("ScreenGui") screenGui.Name = "HighlightsGUI" screenGui.ResetOnSpawn = false screenGui.IgnoreGuiInset = true screenGui.Parent = LocalPlayer:WaitForChild("PlayerGui") -- Main Frame local mainFrame = Instance.new("Frame") mainFrame.Size = UDim2.new(0.25, 0, 0.25, 0) mainFrame.Position = UDim2.new(0.05, 0, 0.05, 0) mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) mainFrame.BackgroundTransparency = 0.2 mainFrame.Active = true mainFrame.Draggable = true mainFrame.Visible = true mainFrame.Parent = screenGui -- UI scaling for all devices local uiAspect = Instance.new("UIScale") uiAspect.Parent = mainFrame uiAspect.Scale = 1 RunService.RenderStepped:Connect(function() uiAspect.Scale = math.clamp(workspace.CurrentCamera.ViewportSize.Y / 800, 0.8, 1.5) end) -- Title local title = Instance.new("TextLabel") title.Size = UDim2.new(1, 0, 0.25, 0) title.BackgroundTransparency = 1 title.Text = "Player Highlights" title.TextColor3 = Color3.fromRGB(255, 255, 255) title.Font = Enum.Font.GothamBold title.TextScaled = true title.Parent = mainFrame -- Toggle Button local toggleButton = Instance.new("TextButton") toggleButton.Size = UDim2.new(0.45, 0, 0.25, 0) toggleButton.Position = UDim2.new(0.05, 0, 0.35, 0) toggleButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0) toggleButton.Text = "ON" toggleButton.TextScaled = true toggleButton.Font = Enum.Font.Gotham toggleButton.Parent = mainFrame -- Color Picker Button local colorButton = Instance.new("TextButton") colorButton.Size = UDim2.new(0.45, 0, 0.25, 0) colorButton.Position = UDim2.new(0.5, 0, 0.35, 0) colorButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0) colorButton.Text = "Change Color" colorButton.TextScaled = true colorButton.Font = Enum.Font.Gotham colorButton.Parent = mainFrame -- Status Label local statusLabel = Instance.new("TextLabel") statusLabel.Size = UDim2.new(1, 0, 0.3, 0) statusLabel.Position = UDim2.new(0, 0, 0.7, 0) statusLabel.BackgroundTransparency = 1 statusLabel.TextColor3 = Color3.fromRGB(200, 200, 200) statusLabel.Font = Enum.Font.Gotham statusLabel.TextScaled = true statusLabel.Text = "Status: Highlights ON" statusLabel.Parent = mainFrame -- Variables local highlightsEnabled = true local highlightColor = Color3.fromRGB(0, 255, 0) -- Function to create highlight local function createHighlight(character) if not character then return end if character:FindFirstChild("Highlight") then character.Highlight:Destroy() end local highlight = Instance.new("Highlight") highlight.FillColor = highlightColor highlight.OutlineColor = Color3.fromRGB(255, 255, 255) highlight.Parent = character end -- Function to update all player highlights local function updateHighlights() for _, player in ipairs(Players:GetPlayers()) do if player ~= LocalPlayer and player.Character then createHighlight(player.Character) end end end -- Player join / respawn Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function() if highlightsEnabled then task.wait(0.5) createHighlight(player.Character) end end) end) -- Update on existing players for _, player in ipairs(Players:GetPlayers()) do if player ~= LocalPlayer then player.CharacterAdded:Connect(function() if highlightsEnabled then task.wait(0.5) createHighlight(player.Character) end end) end end -- Button behavior toggleButton.MouseButton1Click:Connect(function() highlightsEnabled = not highlightsEnabled if highlightsEnabled then toggleButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0) toggleButton.Text = "ON" statusLabel.Text = "Status: Highlights ON" updateHighlights() else toggleButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0) toggleButton.Text = "OFF" statusLabel.Text = "Status: Highlights OFF" for _, player in ipairs(Players:GetPlayers()) do if player.Character and player.Character:FindFirstChild("Highlight") then player.Character.Highlight:Destroy() end end end end) -- Color picker cycling local colors = { Color3.fromRGB(0, 255, 0), Color3.fromRGB(0, 170, 255), Color3.fromRGB(255, 0, 0), Color3.fromRGB(255, 255, 0), Color3.fromRGB(255, 0, 255) } local colorIndex = 1 colorButton.MouseButton1Click:Connect(function() colorIndex += 1 if colorIndex > #colors then colorIndex = 1 end highlightColor = colors[colorIndex] colorButton.BackgroundColor3 = highlightColor if highlightsEnabled then updateHighlights() end end) -- Initial highlight setup updateHighlights()