local Players = game:GetService("Players") local RunService = game:GetService("RunService") local CoreGui = game:GetService("CoreGui") local visuals = {} local function cleanup(char) if visuals[char] then if visuals[char].endPart then visuals[char].endPart:Destroy() end if visuals[char].gui then visuals[char].gui:Destroy() end visuals[char] = nil end end local function setupVisual(char) if visuals[char] then return end local hrp = char:WaitForChild("HumanoidRootPart", 5) local hum = char:FindFirstChildOfClass("Humanoid") if not hrp or not hum then return end local a0 = Instance.new("Attachment") a0.Parent = hrp a0.Position = Vector3.new(0, 0, -1) local endPart = Instance.new("Part") endPart.Anchored = true endPart.CanCollide = false endPart.Transparency = 1 endPart.Size = Vector3.new(0.1, 0.1, 0.1) endPart.Parent = workspace local a1 = Instance.new("Attachment") a1.Parent = endPart local beam = Instance.new("Beam") beam.Attachment0 = a0 beam.Attachment1 = a1 beam.Width0 = 0.08 beam.Width1 = 0.08 beam.FaceCamera = true beam.LightEmission = 1 beam.Color = ColorSequence.new(Color3.fromRGB(0, 255, 255)) beam.Transparency = NumberSequence.new(0) beam.Parent = workspace local gui = Instance.new("BillboardGui") gui.Name = "NameESP" gui.Adornee = hrp gui.AlwaysOnTop = true gui.Size = UDim2.fromScale(4, 1) gui.StudsOffset = Vector3.new(0, 3, 0) gui.Parent = CoreGui local label = Instance.new("TextLabel") label.BackgroundTransparency = 1 label.Size = UDim2.fromScale(1, 1) label.TextScaled = true label.Font = Enum.Font.GothamBold label.TextColor3 = Color3.fromRGB(255, 255, 255) label.TextStrokeTransparency = 0 label.TextStrokeColor3 = Color3.new(0, 0, 0) label.Text = char.Name label.Parent = gui visuals[char] = { hrp = hrp, endPart = endPart, gui = gui } hum.Died:Connect(function() cleanup(char) end) end for _, plr in ipairs(Players:GetPlayers()) do if plr.Character then setupVisual(plr.Character) end plr.CharacterAdded:Connect(setupVisual) end Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(setupVisual) end) RunService.RenderStepped:Connect(function() for char, v in pairs(visuals) do if char.Parent and v.hrp then v.endPart.Position = v.hrp.Position + v.hrp.CFrame.LookVector * 50 end end end)