local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local enabled = false local highlights = {} -- create UI local screenGui = Instance.new("ScreenGui", LocalPlayer:WaitForChild("PlayerGui")) local button = Instance.new("TextButton") button.Size = UDim2.new(0, 150, 0, 50) button.Position = UDim2.new(0, 20, 0, 20) button.Text = "ESP: OFF" button.Parent = screenGui local function clearHighlights() for _, h in pairs(highlights) do if h then h:Destroy() end end highlights = {} end local function applyHighlights() for _, player in pairs(Players:GetPlayers()) do if player ~= LocalPlayer and player.Character then local highlight = Instance.new("Highlight") highlight.FillColor = Color3.fromRGB(0, 255, 0) highlight.OutlineColor = Color3.fromRGB(255, 255, 255) highlight.Parent = player.Character table.insert(highlights, highlight) end end end button.MouseButton1Click:Connect(function() enabled = not enabled if enabled then button.Text = "ESP: ON" applyHighlights() else button.Text = "ESP: OFF" clearHighlights() end end)