-- Shows names and highlights through walls local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local enabled = true local tracked = {} local gui = Instance.new("ScreenGui") gui.Name = "PlayerESP" gui.ResetOnSpawn = false gui.Parent = LocalPlayer:WaitForChild("PlayerGui") local toggle = Instance.new("TextButton") toggle.Size = UDim2.fromOffset(150, 40) toggle.Position = UDim2.new(0, 15, 0, 100) toggle.BackgroundColor3 = Color3.fromRGB(20, 20, 20) toggle.TextColor3 = Color3.new(1, 1, 1) toggle.TextSize = 16 toggle.Font = Enum.Font.GothamBold toggle.Text = "ESP: ON" toggle.Parent = gui local function removeESP(player) if tracked[player] then for _, object in ipairs(tracked[player]) do object:Destroy() end tracked[player] = nil end end local function addESP(player, character) if player == LocalPlayer then return end removeESP(player) local highlight = Instance.new("Highlight") highlight.Name = "PlayerESPHighlight" highlight.Adornee = character highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop highlight.FillColor = Color3.fromRGB(0, 255, 80) highlight.OutlineColor = Color3.fromRGB(0, 0, 0) highlight.FillTransparency = 0.65 highlight.OutlineTransparency = 0 highlight.Enabled = enabled highlight.Parent = character local head = character:WaitForChild("Head", 5) local label if head then local billboard = Instance.new("BillboardGui") billboard.Name = "PlayerESPName" billboard.Adornee = head billboard.Size = UDim2.fromOffset(160, 35) billboard.StudsOffset = Vector3.new(0, 2.5, 0) billboard.AlwaysOnTop = true billboard.Enabled = enabled billboard.Parent = gui label = Instance.new("TextLabel") label.Size = UDim2.fromScale(1, 1) label.BackgroundTransparency = 1 label.Text = player.DisplayName .. " (@" .. player.Name .. ")" label.TextColor3 = Color3.fromRGB(0, 255, 80) label.TextStrokeTransparency = 0 label.TextScaled = true label.Font = Enum.Font.GothamBold label.Parent = billboard end tracked[player] = {highlight} if label and label.Parent then table.insert(tracked[player], label.Parent) end end local function setupPlayer(player) if player == LocalPlayer then return end player.CharacterAdded:Connect(function(character) addESP(player, character) end) player.CharacterRemoving:Connect(function() removeESP(player) end) if player.Character then addESP(player, player.Character) end end for _, player in ipairs(Players:GetPlayers()) do setupPlayer(player) end Players.PlayerAdded:Connect(setupPlayer) Players.PlayerRemoving:Connect(removeESP) toggle.MouseButton1Click:Connect(function() enabled = not enabled toggle.Text = enabled and "ESP: ON" or "ESP: OFF" for _, objects in pairs(tracked) do for _, object in ipairs(objects) do if object:IsA("Highlight") or object:IsA("BillboardGui") then object.Enabled = enabled end end end end)