Description
See other players with ESP
Features
Compatible Executors
Script
loadstring([[
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local Camera = workspace.CurrentCamera
local LocalPlayer = Players.LocalPlayer
local ESP = {
Enabled = true,
Boxes = true,
Names = true,
Tracers = true,
Distance = true,
Health = true,
TeamCheck = false,
MaxDistance = 2000,
BoxColor = Color3.fromRGB(255, 0, 0),
NameColor = Color3.fromRGB(255, 255, 255),
TracerColor = Color3.fromRGB(255, 0, 0),
TracerOrigin = "Bottom",
}
local drawings = {}
local function getColor(player)
if ESP.TeamCheck and player.Team == LocalPlayer.Team then
return Color3.fromRGB(0, 255, 0)
end
return ESP.BoxColor
end
local function createESP(player)
if player == LocalPlayer then return end
local box = Drawing.new("Square")
box.Thickness = 1
box.Filled = false
box.Color = getColor(player)
box.Visible = false
box.ZIndex = 1
local name = Drawing.new("Text")
name.Size = 16
name.Center = true
name.Outline = true
name.Color = ESP.NameColor
name.Visible = false
name.ZIndex = 2
local tracer = Drawing.new("Line")
tracer.Thickness = 1
tracer.Color = ESP.TracerColor
tracer.Visible = false
tracer.ZIndex = 1
local healthBar = Drawing.new("Line")
healthBar.Thickness = 2
healthBar.Color = Color3.fromRGB(0, 255, 0)
healthBar.Visible = false
healthBar.ZIndex = 2
drawings[player] = {
Box = box,
Name = name,
Tracer = tracer,
HealthBar = healthBar
}
end
local function removeESP(player)
if drawings[player] then
for _, v in pairs(drawings[player]) do
v:Remove()
end
drawings[player] = nil
end
end
local function updateESP()
for player, objs in pairs(drawings) do
if not player or not player.Parent or not player.Character then
objs.Box.Visible = false
objs.Name.Visible = false
objs.Tracer.Visible = false
objs.HealthBar.Visible = false
continue
end
local char = player.Character
local root = char:FindFirstChild("HumanoidRootPart")
local humanoid = char:FindFirstChildOfClass("Humanoid")
if not root or not humanoid or humanoid.Health ESP.MaxDistance or not ESP.Enabled then
objs.Box.Visible = false
objs.Name.Visible = false
objs.Tracer.Visible = false
objs.HealthBar.Visible = false
continue
end
local size = char:GetExtentsSize()
local top = Camera:WorldToViewportPoint((root.CFrame * CFrame.new(0, size.Y/2, 0)).Position)
local bottom = Camera:WorldToViewportPoint((root.CFrame * CFrame.new(0, -size.Y/2, 0)).Position)
local height = math.abs(top.Y - bottom.Y)
local width = height / 2
if ESP.Boxes then
objs.Box.Size = Vector2.new(width, height)
objs.Box.Position = Vector2.new(pos.X - width/2, pos.Y - height/2)
objs.Box.Color = getColor(player)
objs.Box.Visible = true
else
objs.Box.Visible = false
end
if ESP.Names or ESP.Distance then
local text = ""
if ESP.Names then
text = player.Name
end
if ESP.Distance then
text = text .. " [" .. math.floor(distance) .. "m]"
end
objs.Name.Text = text
objs.Name.Position = Vector2.new(pos.X, pos.Y - height/2 - 18)
objs.Name.Visible = true
else
objs.Name.Visible = false
end
if ESP.Tracers then
local origin = Vector2.new(Camera.ViewportSize.X/2, Camera.ViewportSize.Y)
objs.Tracer.From = origin
objs.Tracer.To = Vector2.new(pos.X, pos.Y + height/2)
objs.Tracer.Color = getColor(player)
objs.Tracer.Visible = true
else
objs.Tracer.Visible = false
end
if ESP.Health and humanoid then
local healthPercent = humanoid.Health / humanoid.MaxHealth
local barHeight = height * healthPercent
objs.HealthBar.From = Vector2.new(pos.X - width/2 - 5, pos.Y + height/2)
objs.HealthBar.To = Vector2.new(pos.X - width/2 - 5, pos.Y + height/2 - barHeight)
objs.HealthBar.Color = Color3.fromRGB(255 - (255 * healthPercent), 255 * healthPercent, 0)
objs.HealthBar.Visible = true
else
objs.HealthBar.Visible = false
end
end
end
for _, player in ipairs(Players:GetPlayers()) do
createESP(player)
end
Players.PlayerAdded:Connect(createESP)
Players.PlayerRemoving:Connect(removeESP)
RunService.RenderStepped:Connect(updateESP)
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input, gp)
if gp then return end
if input.KeyCode == Enum.KeyCode.RightShift then
ESP.Enabled = not ESP.Enabled
end
end)
print("ESP loaded | RightShift to toggle")
]])()
No comments yet. Be the first!