local Players = game:GetService("Players") local RunService = game:GetService("RunService") local LocalPlayer = Players.LocalPlayer local function createESP(player) if player == LocalPlayer then return end local function onCharacterAdded(character) local humanoid = character:WaitForChild("Humanoid", 10) local head = character:WaitForChild("Head", 10) local root = character:WaitForChild("HumanoidRootPart", 10) if not humanoid or not head or not root then return end local highlight = character:FindFirstChild("ESPHighlight") or Instance.new("Highlight") highlight.Name = "ESPHighlight" highlight.Parent = character highlight.FillTransparency = 0.5 highlight.OutlineColor = Color3.fromRGB(255, 255, 255) highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop local billboard = head:FindFirstChild("ESPBillboard") or Instance.new("BillboardGui") billboard.Name = "ESPBillboard" billboard.Size = UDim2.new(0, 200, 0, 50) billboard.StudsOffset = Vector3.new(0, 3, 0) billboard.AlwaysOnTop = true billboard.Parent = head local label = billboard:FindFirstChild("TextLabel") or Instance.new("TextLabel") label.Size = UDim2.new(1, 0, 1, 0) label.BackgroundTransparency = 1 label.TextStrokeTransparency = 0 label.TextSize = 14 label.Font = Enum.Font.SourceSansBold label.Parent = billboard local function updateTeamColors() if player.Team then if player.Team.Name == "Smiling" then highlight.FillColor = Color3.fromRGB(255, 0, 0) label.TextColor3 = Color3.fromRGB(255, 0, 0) highlight.Enabled = true elseif player.Team.Name == "Human" then highlight.FillColor = Color3.fromRGB(0, 255, 0) label.TextColor3 = Color3.fromRGB(0, 255, 0) highlight.Enabled = true else highlight.Enabled = false label.TextColor3 = Color3.fromRGB(255, 255, 255) end else highlight.Enabled = false label.TextColor3 = Color3.fromRGB(255, 255, 255) end end local connection connection = RunService.RenderStepped:Connect(function() if not character or not character.Parent or not humanoid or humanoid.Health <= 0 then connection:Disconnect() billboard:Destroy() highlight:Destroy() return end updateTeamColors() local hp = math.floor(humanoid.Health) local cam = workspace.CurrentCamera local distance = math.floor((root.Position - cam.CFrame.Position).Magnitude) label.Text = string.format("%s\nHP: %d | %d Studs", player.Name, hp, distance) end) end player.CharacterAdded:Connect(onCharacterAdded) if player.Character then onCharacterAdded(player.Character) end end for _, player in ipairs(Players:GetPlayers()) do createESP(player) end Players.PlayerAdded:Connect(createESP)