Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pcall(function()
- local camera = workspace.CurrentCamera;
- local toUpdate = {}
- function newSquare(part)
- local pos = camera:WorldToViewportPoint(part.Position)
- local inst = Drawing.new('Square');
- inst.Position = Vector2.new(pos.X, pos.Y)
- inst.Size = Vector2.new(5, 5)
- inst.Visible = true
- inst.Filled = true;
- inst.Color = Color3.new(1, 0, 0)
- local inst2 = Drawing.new('Text');
- inst2.Position = inst.Position + Vector2.new(0, 10);
- inst2.Visible = true;
- inst2.Color = Color3.new(1, 1, 1)
- table.insert(toUpdate, {inst, part, inst2})
- end
- for i, v in next, workspace.Trinkets:children() do
- if v:IsA("BasePart") and (v.Name == "RareSpawn" or (v.ItemName.Value:match'Scroll' and v.Name == "Spawn")) then
- newSquare(v)
- end
- end
- while true do
- for i, v in next, toUpdate do
- local pos, visi = camera:WorldToViewportPoint(v[2].Position)
- if visi and v[2].ItemName.Value ~= "" then
- v[1].Visible = true;
- v[1].Position = Vector2.new(pos.X, pos.Y)
- v[3].Text = v[2].ItemName.Value
- v[3].Visible = true;
- v[3].Position = v[1].Position + Vector2.new(0, 10)
- else
- v[1].Visible = false
- v[3].Visible = false
- end
- end
- wait()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement