local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local PlayerGUI = LocalPlayer:WaitForChild("PlayerGui") local ESPenabled = false -- ScreenGui local ScreenGui = Instance.new("ScreenGui") ScreenGui.Parent = PlayerGUI ScreenGui.Name = "ScreenGuiTest" -- Frame local Frame = Instance.new("Frame") Frame.Parent = ScreenGui Frame.Size = UDim2.new(0, 100, 0, 50) Frame.Position = UDim2.new(0.763, 0, 0.848, 0) Frame.BackgroundColor3 = Color3.new(1, 1, 1) Frame.BackgroundTransparency = 0.5 -- UICorner For Frame local UIcorner = Instance.new("UICorner") UIcorner.Parent = Frame UIcorner.CornerRadius = UDim.new(0, 10) -- TextButton local TextButton = Instance.new("TextButton") TextButton.Parent = Frame TextButton.Size = UDim2.new(0, 100, 0, 50) TextButton.Text = "ESP" TextButton.BackgroundColor3 = Color3.new(1, 0, 0) TextButton.TextScaled = true -- UICorner local UIcorner2 = Instance.new("UICorner") UIcorner2.Parent = TextButton UIcorner2.CornerRadius = UDim.new(0, 10) -- UIStroke local UIStroke = Instance.new("UIStroke") UIStroke.Parent = TextButton UIStroke.Thickness = 2 UIStroke.Color = Color3.new(0, 0, 0) local function HighlightPlayer(player) if player == LocalPlayer then return end player.CharacterAdded:Connect(function(character) local highlight = Instance.new("Highlight") highlight.Parent = character highlight.Enabled = ESPenabled end) if player.Character then local highlight = Instance.new("Highlight") highlight.Parent = player.Character highlight.Enabled = ESPenabled end end for _, player in pairs(Players:GetPlayers()) do HighlightPlayer(player) end Players.PlayerAdded:Connect(function(player) HighlightPlayer(player) end) TextButton.MouseButton1Click:Connect(function() if TextButton.BackgroundColor3 == Color3.fromRGB(255, 0, 0) then TextButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0) else TextButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0) end ESPenabled = not ESPenabled for _, player in pairs(Players:GetPlayers()) do local character = player.Character if character then local highlight = character:FindFirstChildOfClass("Highlight") if highlight then highlight.Enabled = ESPenabled end end end end)