Baconcoder

flicker see role esp

Jun 29th, 2025 (edited)
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local localPlayer = Players.LocalPlayer
  3.  
  4. -- Create ESP label for a player
  5. local function createRoleLabel(player)
  6. local char = player.Character
  7. if not char or not char:FindFirstChild("HumanoidRootPart") then return end
  8.  
  9. -- Remove old ESP if it exists
  10. local oldESP = char:FindFirstChild("RoleESP")
  11. if oldESP then oldESP:Destroy() end
  12.  
  13. local billboard = Instance.new("BillboardGui")
  14. billboard.Name = "RoleESP"
  15. billboard.Adornee = char:FindFirstChild("HumanoidRootPart")
  16. billboard.Size = UDim2.new(0, 100, 0, 40)
  17. billboard.StudsOffset = Vector3.new(0, 3, 0)
  18. billboard.AlwaysOnTop = true
  19. billboard.Parent = char
  20.  
  21. local label = Instance.new("TextLabel")
  22. label.Size = UDim2.new(1, 0, 1, 0)
  23. label.BackgroundTransparency = 1
  24. label.TextColor3 = Color3.fromRGB(255, 255, 0)
  25. label.TextStrokeTransparency = 0.5
  26. label.Font = Enum.Font.GothamBold
  27. label.TextScaled = true
  28. label.Text = "Unknown"
  29. label.Parent = billboard
  30.  
  31. local roleValue = player:FindFirstChild("Role")
  32. if roleValue then
  33. label.Text = roleValue.Value
  34. roleValue:GetPropertyChangedSignal("Value"):Connect(function()
  35. label.Text = roleValue.Value
  36. end)
  37. end
  38. end
  39.  
  40. -- Add ESP to all current players
  41. local function refreshESP()
  42. for _, player in ipairs(Players:GetPlayers()) do
  43. if player ~= localPlayer then
  44. if player.Character then
  45. createRoleLabel(player)
  46. end
  47. player.CharacterAdded:Connect(function()
  48. wait(1)
  49. createRoleLabel(player)
  50. end)
  51. end
  52. end
  53. end
  54.  
  55. -- When new players join
  56. Players.PlayerAdded:Connect(function(player)
  57. player.CharacterAdded:Connect(function()
  58. wait(1)
  59. createRoleLabel(player)
  60. end)
  61. end)
  62.  
  63. -- Run it once on existing players
  64. refreshESP()
  65.  
Advertisement
Add Comment
Please, Sign In to add comment