Advertisement
iiFlamez

Untitled

Mar 18th, 2020
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. function WTS(part)
  2. local screen = workspace.CurrentCamera:WorldToViewportPoint(part.Position)
  3. return Vector2.new(screen.x, screen.y)
  4. end
  5.  
  6. local TOGGLE = true;
  7.  
  8. function ESPText(part, text, color)
  9. local name = Drawing.new("Text")
  10. name.Text = text
  11. name.Color = color
  12. name.Position = WTS(part)
  13. name.Size = 18
  14. name.Outline = true
  15. name.Center = true
  16. name.Visible = true
  17.  
  18. game:GetService("RunService").Stepped:connect(function()
  19. pcall(function()
  20. local destroyed = not part:IsDescendantOf(workspace)
  21. if destroyed and name ~= nil or not TOGGLE then
  22. name:Remove()
  23. return
  24. end
  25. if part ~= nil then
  26. name.Position = WTS(part)
  27. end
  28. local _, screen = workspace.CurrentCamera:WorldToViewportPoint(part.Position)
  29. if screen then
  30. name.Visible = true
  31. else
  32. name.Visible = false
  33. end
  34. end)
  35. end)
  36. end
  37.  
  38. -- Actual ESP
  39.  
  40. for _,v in next,game.Workspace:GetDescendants() do
  41. if v.Name == "ChestTop" then
  42. if v.Parent.Union.BrickColor.Name == "Dirt brown" then
  43. ESPText(v, "Small Chest", Color3.new(205/255,127/255,50/255))
  44. elseif v.Parent.Union.BrickColor.Name == "Dark stone grey" then
  45. ESPText(v, "Medium Chest", Color3.new(192/255,192/255,192/255))
  46. elseif v.Parent.Union.BrickColor.Name == "Bright yellow" then
  47. ESPText(v, "Large Chest", Color3.new(255/255,215/255,1/255))
  48. end
  49. end
  50. end
  51.  
  52.  
  53. game.Workspace.DescendantAdded:Connect(function(v)
  54. if v.Name == "ChestTop" then
  55. v.Parent:WaitForChild("Union")
  56. if v.Parent.Union.BrickColor.Name == "Dirt brown" then
  57. ESPText(v, "Small Chest", Color3.new(205/255,127/255,50/255))
  58. elseif v.Parent.Union.BrickColor.Name == "Dark stone grey" then
  59. ESPText(v, "Medium Chest", Color3.new(192/255,192/255,192/255))
  60. elseif v.Parent.Union.BrickColor.Name == "Bright yellow" then
  61. ESPText(v, "Large Chest", Color3.new(255/255,215/255,1/255))
  62. end
  63. end
  64. end)
  65.  
  66. wait(5)
  67.  
  68. TOGGLE = false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement