Run it
Copy the script and paste it into your executor.
Key features:
• Reliable NPC (using DescendantAdded/Removed + initial scan)
• Player-to-NPC distance used color + thresholds
• Name | Distance | Health billboard (up to studs)
• Highlight (up to studs)
• Select Mode: click to toggle (multi-); double-click to unselect
• Changeable (default T) to toggle global ESP on/off
• Modern draggable GUI
• Optimized lazy visuals to reduce lag
]]
Players = :()
UIS = :()
RS = :()
Workspace =
LocalPlayer = Players.LocalPlayer
Mouse = LocalPlayer:()
TEXT_MAX_DISTANCE =
OUTLINE_MAX_DISTANCE =
SELECT_CLICK_MAX_STUDS =
SELECT_CLICK_MAX_SCREEN_DIST =
ESPKey = .KeyCode.T
awaitingKey =
espEnabled =
selectMode =
selectedSet = {}
trackedNPCs = {}
ESPS = {}
(model)
model model:()
Players:(model) ~=
(model)
model model:()
(model)
hum = model:()
hum ~=
gui = .()
gui.ResetOnSpawn =
gui.Parent = LocalPlayer:()
frame = .()
frame.Size = .(, , , )
frame.Position = .(, , , )
frame.BackgroundColor3 = .(,,)
frame.BorderSizePixel =
frame.Parent = gui
frame.Active =
frameCorner = .(, frame)
frameCorner.CornerRadius = .(, )
title = .(, frame)
title.Size = .(, , , )
title.Position = .(, , , )
title.BackgroundColor3 = .(,,)
title.Text =
title.TextColor3 = .(,,)
title.Font = .Font.GothamBold
title.TextSize =
.(, title).CornerRadius = .(, )
dragging, dragStart, startPos = , ,
title.InputBegan:((input)
input.UserInputType == .UserInputType.MouseButton1
dragging =
dragStart = input.Position
startPos = frame.Position
)
title.InputEnded:((input)
input.UserInputType == .UserInputType.MouseButton1
dragging =
)
UIS.InputChanged:((input)
dragging input.UserInputType == .UserInputType.MouseMovement
delta = input.Position - dragStart
frame.Position = .(startPos.X.Scale, startPos.X.Offset + delta.X,
startPos.Y.Scale, startPos.Y.Offset + delta.Y)
)
(text, y)
b = .(, frame)
b.Size = .(, -, , )
b.Position = .(, , , y)
b.BackgroundColor3 = .(,,)
b.TextColor3 = .(,,)
b.Font = .Font.Gotham
b.TextSize =
b.Text = text
.(, b).CornerRadius = .(,)
b
changeKeyButton = (, )
keyLabel = .(, frame)
keyLabel.Size = .(, -, , )
keyLabel.Position = .(, , , )
keyLabel.BackgroundTransparency =
keyLabel.Font = .Font.Gotham
keyLabel.TextSize =
keyLabel.TextColor3 = .(,,)
keyLabel.Text = .. ESPKey.Name
selectModeButton = (, )
toggleESPButton = (, )
changeKeyButton.MouseButton1Click:(()
awaitingKey =
changeKeyButton.Text =
)
UIS.InputBegan:((input, gameProcessed)
awaitingKey input.KeyCode ~= .KeyCode.Unknown
ESPKey = input.KeyCode
keyLabel.Text = .. ESPKey.Name
changeKeyButton.Text =
awaitingKey =
input.KeyCode == ESPKey
espEnabled = espEnabled
toggleESPButton.Text = espEnabled
)
selectModeButton.MouseButton1Click:(()
selectMode = selectMode
selectModeButton.Text = selectMode
)
toggleESPButton.MouseButton1Click:(()
espEnabled = espEnabled
toggleESPButton.Text = espEnabled
)
(model)
(model) trackedNPCs[model]
trackedNPCs[model] =
(model)
trackedNPCs[model]
trackedNPCs[model] =
selectedSet[model] selectedSet[model] =
ESPS[model]
d = ESPS[model]
d.highlight d.highlight.Parent d.highlight:()
d.billboard d.billboard.Parent d.billboard:()
ESPS[model] =
_, obj (Workspace:())
(obj)
trackedNPCs[obj] =
Workspace.DescendantAdded:((desc)
desc:()
model = desc.Parent
(model) trackedNPCs[model] =
desc:() (desc)
trackedNPCs[desc] =
)
Workspace.DescendantRemoving:((desc)
desc:() desc.Parent
(desc.Parent)
desc:()
(desc)
)
(npc)
ESPS[npc] ESPS[npc]
npc npc.Parent
hum = npc:()
head = npc:() npc:() (npc.PrimaryPart npc.PrimaryPart)
hum head
h = .()
h.Parent = npc
h.FillTransparency =
h.OutlineTransparency =
h.Enabled =
h.OutlineColor = .(,,)
bg = .()
bg.Parent = npc
bg.Adornee = head
bg.Size = .(, , , )
bg.StudsOffset = .(, , )
bg.AlwaysOnTop =
bg.Enabled =
label = .(, bg)
label.Size = .(,,,)
label.BackgroundTransparency =
label.Font = .Font.GothamBold
label.TextSize =
label.TextColor3 = .(,,)
label.TextStrokeTransparency =
label.Text =
ESPS[npc] = { highlight = h, billboard = bg, label = label }
ESPS[npc]
(npc)
d = ESPS[npc]
d
d.highlight d.highlight.Parent d.highlight:()
d.billboard d.billboard.Parent d.billboard:()
ESPS[npc] =
(dist)
dist >=
.(,,)
dist <=
.(,,)
dist <=
.(,,)
.(,,)
()
selectMode
playerRoot = LocalPlayer.Character (LocalPlayer.Character:() LocalPlayer.Character.PrimaryPart)
playerRoot
bestModel =
bestScreenDist = SELECT_CLICK_MAX_SCREEN_DIST +
bestWorldDist = .huge
cam = Workspace.CurrentCamera
cam
npcModel,_ (trackedNPCs)
npcModel npcModel.Parent
head = npcModel:() npcModel:() npcModel.PrimaryPart
hum = npcModel:()
head hum
worldPos = head.Position
worldDist = (playerRoot.Position - worldPos).Magnitude
worldDist <= SELECT_CLICK_MAX_STUDS
screenPos, onScreen = cam:(worldPos)
onScreen
screenVec = .(screenPos.X, screenPos.Y)
mouseVec = .(Mouse.X, Mouse.Y)
sd = (screenVec - mouseVec).Magnitude
sd < bestScreenDist (sd == bestScreenDist worldDist < bestWorldDist)
bestScreenDist = sd
bestModel = npcModel
bestWorldDist = worldDist
bestModel
selectedSet[bestModel]
selectedSet[bestModel] =
(bestModel)
selectedSet[bestModel] =
(bestModel)
Mouse.Button1Down:(()
()
)
RS.RenderStepped:(()
char = LocalPlayer.Character
playerRoot = char (char:() char.PrimaryPart)
playerRoot
npc,d (ESPS)
d.billboard d.billboard.Enabled =
d.highlight d.highlight.Enabled =
npc,_ (trackedNPCs)
npc npc.Parent
trackedNPCs[npc] =
selectedSet[npc] =
(npc)
hum = npc:()
head = npc:() npc:() npc.PrimaryPart
hum head
trackedNPCs[npc] =
selectedSet[npc] =
(npc)
dist = (playerRoot.Position - head.Position).Magnitude
shouldShowText = (dist <= TEXT_MAX_DISTANCE) (espEnabled)
shouldShowOutline = (dist <= OUTLINE_MAX_DISTANCE) (espEnabled)
selectedSet[npc]
v = (npc)
v v.billboard
v.billboard.Enabled =
v.label.Text = .(, npc.Name, .(dist), .(hum.Health ))
v.label.TextColor3 = (dist)
v v.highlight
v.highlight.Enabled =
v.highlight.OutlineColor = (dist)
espEnabled (dist <= TEXT_MAX_DISTANCE dist <= OUTLINE_MAX_DISTANCE)
v = (npc)
v
dist <= TEXT_MAX_DISTANCE
v.billboard.Enabled =
v.label.Text = .(, npc.Name, .(dist), .(hum.Health ))
v.label.TextColor3 = (dist)
v.billboard.Enabled =
dist <= OUTLINE_MAX_DISTANCE
v.highlight.Enabled =
v.highlight.OutlineColor = (dist)
v.highlight.Enabled =
ESPS[npc]
v = ESPS[npc]
v.billboard v.billboard.Enabled =
v.highlight v.highlight.Enabled =
npc,d (ESPS)
trackedNPCs[npc]
(npc)
)
LocalPlayer.CharacterRemoving:(()
npc,d (ESPS)
d.billboard d.billboard.Enabled =
d.highlight d.highlight.Enabled =
)
()
this script is a little weird i can't really explain how to work it bugs sometimes if you have godmode and die the gui disappears which makes this gui a little buggy

Universal