Browse
Script Types
Tools
Community


ESP Players highlights player locations during each round, even when rooms or walls block the normal view. It helps you follow movement, find nearby players, and stay aware of where everyone is while completing your role’s objective. The feature tracks players but does not claim to reveal their assigned roles.
1local Players = game:GetService("Players")2local RunService = game:GetService("RunService")3local UserInputService = game:GetService("UserInputService")4local Camera = workspace.CurrentCamera5local LocalPlayer = Players.LocalPlayer6 7local espEnabled = true8local esp = {}9 10-- role palette11local roleColors = {12 Imposter = Color3.new(1, 0, 0),13 Crewmate = Color3.new(0, 1, 0),14 Unknown = Color3.new(1, 1, 1),15}16 17-- UI18local gui = Instance.new("ScreenGui")19gui.Name = "RoleESP"20gui.ResetOnSpawn = false21gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling22gui.Parent = (gethui and gethui()) or game:FindFirstChildOfClass("CoreGui")23 24local frame = Instance.new("Frame")25frame.Size = UDim2.fromOffset(300, 340)26frame.Position = UDim2.new(1, -320, 0.5, -170)27frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)28frame.BorderSizePixel = 029frame.Active = true30frame.Parent = gui31 32local header = Instance.new("Frame")33header.Size = UDim2.new(1, 0, 0, 28)34header.BackgroundColor3 = Color3.fromRGB(50, 50, 50)35header.BorderSizePixel = 036header.Parent = frame37 38local title = Instance.new("TextLabel")39title.BackgroundTransparency = 140title.Position = UDim2.new(0, 6, 0, 0)41title.Size = UDim2.new(1, -90, 1, 0)42title.Font = Enum.Font.GothamBold43title.Text = "Role ESP (drag)"44title.TextSize = 1445title.TextXAlignment = Enum.TextXAlignment.Left46title.TextColor3 = Color3.new(1, 1, 1)47title.Parent = header48 49local button = Instance.new("TextButton")50button.AnchorPoint = Vector2.new(1, 0)51button.Position = UDim2.new(1, -6, 0.5, -12)52button.Size = UDim2.fromOffset(80, 24)53button.BackgroundColor3 = Color3.fromRGB(60, 180, 90)54button.Text = "ESP: ON"55button.TextColor3 = Color3.new(1, 1, 1)56button.Font = Enum.Font.GothamSemibold57button.TextSize = 1358button.Parent = header59 60local scrl = Instance.new("ScrollingFrame")61scrl.Size = UDim2.new(1, -10, 1, -38)62scrl.Position = UDim2.new(0, 5, 0, 33)63scrl.BackgroundTransparency = 164scrl.BorderSizePixel = 065scrl.ScrollBarThickness = 666scrl.AutomaticCanvasSize = Enum.AutomaticSize.Y67scrl.Parent = frame68 69local lyt = Instance.new("UIListLayout")70lyt.Padding = UDim.new(0, 5)71lyt.Parent = scrl72 73-- dragging74do75 local dragging, dragStart, startPos76 local function update(input)77 local delta = input.Position - dragStart78 local vp = Camera and Camera.ViewportSize or Vector2.new(1920, 1080)79 frame.Position = UDim2.new(80 startPos.X.Scale,81 math.clamp(startPos.X.Offset + delta.X, -vp.X + 50, vp.X - 50),82 startPos.Y.Scale,83 math.clamp(startPos.Y.Offset + delta.Y, -vp.Y + 50, vp.Y - 50)84 )85 end86 87 header.InputBegan:Connect(function(input)88 if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then89 dragging = true90 dragStart = input.Position91 startPos = frame.Position92 input.Changed:Connect(function()93 if input.UserInputState == Enum.UserInputState.End then dragging = false end94 end)95 end96 end)97 98 UserInputService.InputChanged:Connect(function(input)99 if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then100 update(input)101 end102 end)103end104 105-- toggle106button.MouseButton1Click:Connect(function()107 espEnabled = not espEnabled108 button.Text = espEnabled and "ESP: ON" or "ESP: OFF"109 button.BackgroundColor3 = espEnabled and Color3.fromRGB(60, 180, 90) or Color3.fromRGB(120, 60, 60)110 for _, slot in pairs(esp) do111 if slot.draw then slot.draw.Visible = false end112 if slot.label then slot.label.Visible = espEnabled end113 end114end)115 116-- helpers117local function nickname(plr)118 local dn = plr.DisplayName119 return (dn and dn ~= "" and dn) or plr.Name120end121 122local function makeDraw()123 local d = Drawing.new("Text")124 d.Size = 14125 d.Center = true126 d.Outline = true127 d.Visible = false128 d.Color = Color3.new(1, 1, 1)129 return d130end131 132local function ensureEntry(plr)133 local slot = esp[plr]134 if not slot then135 slot = {136 draw = makeDraw(),137 label = Instance.new("TextLabel")138 }139 esp[plr] = slot140 local lbl = slot.label141 lbl.Size = UDim2.new(1, 0, 0, 25)142 lbl.BackgroundColor3 = Color3.fromRGB(40, 40, 40)143 lbl.BorderSizePixel = 0144 lbl.TextColor3 = Color3.new(1, 1, 1)145 lbl.TextSize = 14146 lbl.Font = Enum.Font.Gotham147 lbl.TextWrapped = true148 lbl.Parent = scrl149 end150 return slot151end152 153local function removeEntry(plr)154 local slot = esp[plr]155 if not slot then return end156 if slot.draw then slot.draw:Remove() end157 if slot.label then slot.label:Destroy() end158 esp[plr] = nil159end160 161Players.PlayerRemoving:Connect(removeEntry)162Players.PlayerAdded:Connect(function(plr)163 plr.CharacterRemoving:Connect(function()164 local slot = esp[plr]165 if slot and slot.draw then slot.draw.Visible = false end166 end)167end)168 169-- main render170RunService.RenderStepped:Connect(function()171 if not espEnabled then return end172 173 for _, plr in ipairs(Players:GetPlayers()) do174 if plr ~= LocalPlayer then175 local slot = ensureEntry(plr)176 local char = plr.Character177 local hrp = char and char:FindFirstChild("HumanoidRootPart")178 179 if not (hrp and hrp:IsDescendantOf(workspace)) then180 slot.draw.Visible = false181 slot.label.Visible = false182 continue183 end184 185 local pos, onScreen = Camera:WorldToViewportPoint(hrp.Position + Vector3.new(0, 2.5, 0))186 if not onScreen then187 slot.draw.Visible = false188 slot.label.Visible = true -- still show in list189 continue190 end191 192 local states = plr:FindFirstChild("PublicStates")193 local roleObj = states and states:FindFirstChild("Role")194 local subObj = states and states:FindFirstChild("SubRole")195 local aliveObj = states and states:FindFirstChild("Alive")196 197 local role = (roleObj and roleObj.Value) or "Unknown"198 local sub = subObj and subObj.Value199 local alive = aliveObj and aliveObj.Value200 local statusText = alive and "[Alive]" or "[Dead]"201 local textLine = string.format("%s | %s%s %s",202 nickname(plr),203 role,204 sub and (" [" .. sub .. "]") or "",205 statusText)206 207 slot.draw.Position = Vector2.new(pos.X, pos.Y)208 slot.draw.Text = textLine209 slot.draw.Color = roleColors[role] or roleColors.Unknown210 slot.draw.Visible = true211 212 slot.label.Text = plr.Name .. " - " .. textLine213 slot.label.TextColor3 = slot.draw.Color214 slot.label.BackgroundColor3 = alive and Color3.fromRGB(40, 80, 40) or Color3.fromRGB(80, 40, 40)215 slot.label.Visible = true216 end217 end218end)by Silver Carapace · 1 script · 0 views
Comments
Loading comments…