Advertisement
iiFlamez

Untitled

Mar 18th, 2020
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. function worldtoscreen(part, text)
  2. if part ~= nil then
  3. local scr, vis = workspace.Camera:WorldToScreenPoint(part.Position)
  4.  
  5. if vis ~= nil and scr ~= nil and (scr.x ~= nil and scr.y ~= nil) and part:IsDescendantOf(workspace) then
  6. if vis == true then
  7. text.Visible = true
  8. return Vector2.new(scr.x, scr.y)
  9. elseif vis == false then
  10. return Vector2.new(0,0)
  11. end
  12. else
  13. return Vector2.new(0,0)
  14. end
  15. elseif part == nil then
  16. pcall(function() text:Remove() end)
  17. end
  18. end
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26. local Chests = {}
  27. local A = coroutine.create(function()
  28. for i,v in next, game:GetService("Workspace"):GetDescendants() do
  29. if v.Name == "ChestTop" then
  30. if tostring(v.Parent.Union.BrickColor) == "Dirt brown" then
  31. v.Parent.Name = "Small Chest"
  32. elseif tostring(v.Parent.Union.BrickColor) == "Dark stone grey" then
  33. v.Parent.Name = "Medium Chest"
  34. elseif tostring(v.Parent.Union.BrickColor) == "Bright yellow" then
  35. v.Parent.Name = "Large Chest"
  36. end
  37. table.insert(Chests,v.Parent)
  38. end
  39. end
  40. end)
  41.  
  42. coroutine.resume(A);
  43.  
  44. game.Workspace.DescendantAdded:connect(function()
  45. coroutine.resume(A);
  46. end)
  47.  
  48. local ChestESP = {};
  49.  
  50. local Start = tick();
  51. game:GetService("RunService").RenderStepped:connect(function()
  52. for i,v in next, Chests do
  53. table.insert(ChestESP, Drawing.new("Text"))
  54. ChestESP[i].Text = v.Name
  55. ChestESP[i].Size = 19.0
  56. if v.Name == "Large Chest" then
  57. ChestESP[i].Color = Color3.new(255/255,215/255,1/255)
  58. elseif v.Name == "Medium Chest" then
  59. ChestESP[i].Color = Color3.new(192/255,192/255,192/255)
  60. elseif v.Name == "Small Chest" then
  61. ChestESP[i].Color = Color3.new(205/255,127/255,50/255)
  62. end
  63. ChestESP[i].Outline = true
  64. ChestESP[i].Center = true
  65. Loc = worldtoscreen(v.ChestTop, ChestESP[i])
  66. ChestESP[i].Position = Loc
  67. end
  68. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement