local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local PLAYER_COLOR = Color3.fromRGB(0, 170, 255) local NPC_COLOR = Color3.fromRGB(255, 60, 60) local function createESP(character, color) if not character or character:FindFirstChild("ESPHighlight") then return end local highlight = Instance.new("Highlight") highlight.Name = "ESPHighlight" highlight.FillColor = color highlight.FillTransparency = 0.5 highlight.OutlineColor = Color3.new(0,0,0) highlight.OutlineTransparency = 0 highlight.Parent = character end local function isNPC(model) return model:FindFirstChild("Humanoid") and not Players:GetPlayerFromCharacter(model) end local function setupPlayer(player) if player == LocalPlayer then return end player.CharacterAdded:Connect(function(char) task.wait(1) createESP(char, PLAYER_COLOR) end) if player.Character then createESP(player.Character, PLAYER_COLOR) end end for _, player in ipairs(Players:GetPlayers()) do setupPlayer(player) end Players.PlayerAdded:Connect(setupPlayer) for _, obj in ipairs(workspace:GetDescendants()) do if isNPC(obj) then createESP(obj, NPC_COLOR) end end workspace.DescendantAdded:Connect(function(obj) if isNPC(obj) then task.wait(0.5) createESP(obj, NPC_COLOR) end end)