Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function worldtoscreen(part, text)
- if part ~= nil then
- local scr, vis = workspace.Camera:WorldToScreenPoint(part.Position)
- if vis ~= nil and scr ~= nil and (scr.x ~= nil and scr.y ~= nil) and part:IsDescendantOf(workspace) then
- if vis == true then
- text.Visible = true
- return Vector2.new(scr.x, scr.y)
- elseif vis == false then
- return Vector2.new(0,0)
- end
- else
- return Vector2.new(0,0)
- end
- elseif part == nil then
- pcall(function() text:Remove() end)
- end
- end
- local Chests = {}
- local A = coroutine.create(function()
- for i,v in next, game:GetService("Workspace"):GetDescendants() do
- if v.Name == "ChestTop" then
- if tostring(v.Parent.Union.BrickColor) == "Dirt brown" then
- v.Parent.Name = "Small Chest"
- elseif tostring(v.Parent.Union.BrickColor) == "Dark stone grey" then
- v.Parent.Name = "Medium Chest"
- elseif tostring(v.Parent.Union.BrickColor) == "Bright yellow" then
- v.Parent.Name = "Large Chest"
- end
- table.insert(Chests,v.Parent)
- end
- end
- end)
- coroutine.resume(A);
- game.Workspace.DescendantAdded:connect(function()
- coroutine.resume(A);
- end)
- local ChestESP = {};
- local Start = tick();
- game:GetService("RunService").RenderStepped:connect(function()
- for i,v in next, Chests do
- table.insert(ChestESP, Drawing.new("Text"))
- ChestESP[i].Text = v.Name
- ChestESP[i].Size = 19.0
- if v.Name == "Large Chest" then
- ChestESP[i].Color = Color3.new(255/255,215/255,1/255)
- elseif v.Name == "Medium Chest" then
- ChestESP[i].Color = Color3.new(192/255,192/255,192/255)
- elseif v.Name == "Small Chest" then
- ChestESP[i].Color = Color3.new(205/255,127/255,50/255)
- end
- ChestESP[i].Outline = true
- ChestESP[i].Center = true
- Loc = worldtoscreen(v.ChestTop, ChestESP[i])
- ChestESP[i].Position = Loc
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement