Advertisement
Helgodxdd

Simple ESP

Nov 14th, 2020
77
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function WTS(part)
  2. local screen = workspace.CurrentCamera:WorldToViewportPoint(part.Position)
  3. return Vector2.new(screen.x, screen.y)
  4. end
  5.  
  6. function ESPText(part, color)
  7. local name = Drawing.new("Text")
  8. name.Text = part.Parent.Name
  9. name.Color = color
  10. name.Position = WTS(part)
  11. name.Size = 100.0
  12. name.Outline = true
  13. name.Center = true
  14. name.Visible = true
  15.  
  16. game:GetService("RunService").Stepped:connect(function()
  17. pcall(function()
  18. local destroyed = not part:IsDescendantOf(workspace)
  19. if destroyed and name ~= nil then
  20. name:Remove()
  21. end
  22. if part ~= nil then
  23. name.Position = WTS(part)
  24. end
  25. local _, screen = workspace.CurrentCamera:WorldToViewportPoint(part.Position)
  26. if screen then
  27. name.Visible = true
  28. else
  29. name.Visible = false
  30. end
  31. end)
  32. end)
  33. end
  34.  
  35. local players = game.Players:getChildren()
  36. for i=1,#players do
  37. if players[i] ~= game.Players.LocalPlayer then
  38. if players[i].Character:findFirstChild("HumanoidRootPart") then
  39. ESPText(players[i].Character.HumanoidRootPart, Color3.new(255/255,0/255,0/255))
  40. end
  41. players[i].CharacterAdded:connect(function(char)
  42. local hrp = char:WaitForChild("HumanoidRootPart")
  43. ESPText(hrp, Color3.new(255/255,0/255,0/255))
  44. end)
  45. end
  46. end
  47.  
  48. game.Players.PlayerAdded:Connect(function(plr)
  49. plr.CharacterAdded:connect(function(char)
  50. local hrp = char:WaitForChild("HumanoidRootPart")
  51. ESPText(hrp, Color3.new(255/255,0/255,0/255))
  52. end)
  53. end)
Advertisement
RAW Paste Data Copied
Advertisement