local Players = game:GetService("Players") local RunService = game:GetService("RunService") local LocalPlayer = Players.LocalPlayer -- ESP Settings local ESP_SETTINGS = { TeamCheck = false, -- Set to true to only show enemies Boxes = true, -- Show bounding boxes Tracers = true, -- Show lines to players Names = true, -- Show player names Distance = true, -- Show distance Color = Color3.fromRGB(255, 0, 0) -- Default color } -- Create ESP objects local function createESP(player) local character = player.Character or player.CharacterAdded:Wait() local humanoidRootPart = character:WaitForChild("HumanoidRootPart") local head = character:WaitForChild("Head") -- Create ESP container local espHolder = Instance.new("Folder") espHolder.Name = player.Name .. "_ESP" espHolder.Parent = player.Character -- Box ESP if ESP_SETTINGS.Boxes then local box = Instance.new("BoxHandleAdornment") box.Name = "ESP_Box" box.Adornee = humanoidRootPart box.AlwaysOnTop = true box.ZIndex = 1 box.Size = Vector3.new(3, 6, 3) box.Transparency = 0.5 box.Color3 = ESP_SETTINGS.Color box.Parent = espHolder end -- Name and Distance if ESP_SETTINGS.Names or ESP_SETTINGS.Distance then local billboard = Instance.new("BillboardGui") billboard.Name = "ESP_Info" billboard.Adornee = head billboard.Size = UDim2.new(0, 200, 0, 50) billboard.StudsOffset = Vector3.new(0, 3, 0) billboard.AlwaysOnTop = true billboard.Parent = espHolder local textLabel = Instance.new("TextLabel") textLabel.Size = UDim2.new(1, 0, 1, 0) textLabel.BackgroundTransparency = 1 textLabel.TextStrokeTransparency = 0 textLabel.TextSize = 18 textLabel.Font = Enum.Font.SourceSansBold textLabel.TextColor3 = ESP_SETTINGS.Color textLabel.Parent = billboard RunService.Heartbeat:Connect(function() local distance = (LocalPlayer.Character.HumanoidRootPart.Position - humanoidRootPart.Position).Magnitude local infoText = "" if ESP_SETTINGS.Names then infoText = player.Name end if ESP_SETTINGS.Distance then infoText = infoText .. string.format("\n[%d studs]", math.floor(distance)) end textLabel.Text = infoText end) end -- Tracers if ESP_SETTINGS.Tracers then local tracer = Instance.new("Frame") tracer.Name = "ESP_Tracer" tracer.BackgroundColor3 = ESP_SETTINGS.Color tracer.BorderSizePixel = 0 tracer.Size = UDim2.new(0, 2, 0, 2) tracer.AnchorPoint = Vector2.new(0.5, 0.5) local gui = Instance.new("ScreenGui") gui.Name = "ESP_Tracers" gui.ResetOnSpawn = false gui.Parent = player.PlayerGui or player:WaitForChild("PlayerGui") tracer.Parent = gui RunService.Heartbeat:Connect(function() if character and humanoidRootPart and LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then local vector, onScreen = workspace.CurrentCamera:WorldToViewportPoint(humanoidRootPart.Position) if onScreen then tracer.Position = UDim2.new(0, vector.X, 0, vector.Y) tracer.Visible = true else tracer.Visible = false end else tracer.Visible = false end end) end end -- Initialize ESP for existing players for _, player in ipairs(Players:GetPlayers()) do if player ~= LocalPlayer then player.CharacterAdded:Connect(function(character) createESP(player) end) if player.Character then createESP(player) end end end -- Handle new players Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) if player ~= LocalPlayer then createESP(player) end end) end) print("ESP script loaded successfully")