Advertisement
Elvisfofo_rblx

ESP Script

Jun 22nd, 2025
348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local LocalPlayer = Players.LocalPlayer
  3.  
  4. local function applyESP(player)
  5. if player == LocalPlayer then return end
  6.  
  7. local function onCharacterAdded(char)
  8. repeat wait() until char:FindFirstChild("Head") and char:FindFirstChildOfClass("Humanoid")
  9.  
  10. -- Name tag
  11. local head = char:FindFirstChild("Head")
  12. local billboard = Instance.new("BillboardGui")
  13. billboard.Name = "ESP_NameTag"
  14. billboard.Adornee = head
  15. billboard.Size = UDim2.new(0, 200, 0, 50)
  16. billboard.StudsOffset = Vector3.new(0, 2, 0)
  17. billboard.AlwaysOnTop = true
  18. billboard.Parent = head
  19.  
  20. local nameLabel = Instance.new("TextLabel")
  21. nameLabel.Size = UDim2.new(1, 0, 1, 0)
  22. nameLabel.BackgroundTransparency = 1
  23. nameLabel.TextColor3 = Color3.new(1, 1, 1)
  24. nameLabel.TextStrokeTransparency = 0
  25. nameLabel.Text = player.Name
  26. nameLabel.Font = Enum.Font.GothamBold
  27. nameLabel.TextScaled = true
  28. nameLabel.Parent = billboard
  29.  
  30. -- Outline
  31. local highlight = Instance.new("Highlight")
  32. highlight.Name = "ESP_Highlight"
  33. highlight.FillColor = Color3.new(1, 0, 0)
  34. highlight.OutlineColor = Color3.new(1, 1, 1)
  35. highlight.FillTransparency = 0.8
  36. highlight.OutlineTransparency = 0
  37. highlight.Adornee = char
  38. highlight.Parent = char
  39. end
  40.  
  41. player.CharacterAdded:Connect(onCharacterAdded)
  42.  
  43. if player.Character then
  44. onCharacterAdded(player.Character)
  45. end
  46. end
  47.  
  48. -- ESP only activates while you're alive
  49. local espActive = true
  50.  
  51. -- Add ESP to other players
  52. for _, p in ipairs(Players:GetPlayers()) do
  53. applyESP(p)
  54. end
  55.  
  56. -- Watch for new players
  57. Players.PlayerAdded:Connect(function(player)
  58. if espActive then
  59. applyESP(player)
  60. end
  61. end)
  62.  
  63. -- Disable ESP on local player reset
  64. LocalPlayer.CharacterAdded:Connect(function()
  65. espActive = false
  66.  
  67. for _, p in ipairs(Players:GetPlayers()) do
  68. if p ~= LocalPlayer and p.Character then
  69. -- Remove ESP parts
  70. local head = p.Character:FindFirstChild("Head")
  71. if head then
  72. local tag = head:FindFirstChild("ESP_NameTag")
  73. if tag then tag:Destroy() end
  74. end
  75. local hl = p.Character:FindFirstChild("ESP_Highlight")
  76. if hl then hl:Destroy() end
  77. end
  78. end
  79.  
  80. -- Optional notification
  81. pcall(function()
  82. game.StarterGui:SetCore("SendNotification", {
  83. Title = "👁️ ESP Disabled",
  84. Text = "ESP turned off after reset.",
  85. Duration = 4
  86. })
  87. end)
  88. end)
  89.  
  90. -- Optional startup message
  91. pcall(function()
  92. game.StarterGui:SetCore("SendNotification", {
  93. Title = "🔍 ESP Enabled",
  94. Text = "Tap reset to disable outlines.",
  95. Duration = 4
  96. })
  97. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement