Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for i,v in next, game.Workspace:GetChildren() do
- if v.ClassName == "Folder" and i == 15 then
- local Num = v:GetChildren()
- v.Name = "TrinketFolder"
- elseif v.ClassName == "Folder" and i == 1385 then
- local Num = v:GetChildren()
- v.Name = "TrinketFolder"
- end
- end
- local Trinkets = {}
- print(game.Workspace.TrinketFolder)
- 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 Remove = false;
- local update = function()
- for _, a in pairs(Trinkets) do
- local pos = worldtoscreen(a["Object"], a["Text"])
- local trink = a["Object"]
- local main = a["Actual"]
- local text = a["Text"]
- local name = a["Name"]
- text.Text = ("%s \n [%s]"):format(name, math.floor((workspace.Camera.CFrame.p - trink.Position).magnitude + 0.5))
- text.Size = 18.0
- if Trinkets[trink].Rarity == "Artifact" then
- text.Color = Color3.new(255/255,20/255,147/255)
- elseif Trinkets[trink].Rarity == "Scroll" then
- text.Color = Color3.new(255/255,140/255,0/255)
- else
- text.Color = trink.Color
- end
- text.Outline = true
- text.Center = true
- text.Position = pos
- if Remove == true then
- pcall(function() text:Remove() end)
- end
- end
- end
- local Insert = function(trink, nam, rar, actual)
- if Trinkets[trink] ~= nil then --| if its already in the table then cancel cus shits gay
- return
- end
- Trinkets[trink] = {
- ["Object"] = trink,
- ["Name"] = nam,
- ["CFrame"] = trink.CFrame,
- ["Rarity"] = rar,
- ["Actual"] = actual,
- ["Text"] = Drawing.new("Text")
- }
- end
- local GetTouchingParts = function(part)
- local connection = part.Touched:Connect(function() end)
- local results = part:GetTouchingParts()
- connection:Disconnect()
- return results
- end
- function RefreshTrinket()
- for i, v in next, game.Workspace.TrinketFolder:GetChildren() do
- for p, b in next, GetTouchingParts(v) do
- if b.CFrame == v.CFrame and b.Size == Vector3.new(0.333724976, 1.20092773, 2.03625488) then
- Insert(b, "Amulet", "Common", v)
- elseif b.CFrame == v.CFrame and b.Size == Vector3.new(0.5, 0.192000002, 0.527999997) then
- Insert(b, "Ring", "Common", v)
- elseif b.CFrame == v.CFrame and b.Size == Vector3.new(0.5, 0.899999976, 0.5) then
- Insert(b, "Goblet", "Common", v)
- elseif b.CFrame == v.CFrame and b.Size == Vector3.new(1.65999925, 0.480000198, 0.340004832) then
- Insert(b, "Scroll", "Scroll", v)
- elseif b.CFrame == v.CFrame and b.Size == Vector3.new(0.400000006, 0.5, 0.300000012) then
- Insert(b, "Opal", "Common", v)
- elseif b.CFrame == v.CFrame and b.Size == Vector3.new(0.70098877, 0.655492067, 0.68299824) then
- Insert(b, "Idol", "Common", v)
- elseif b.CFrame == v.CFrame and b.Size == Vector3.new(0.800000012, 0.523999989, 0.800000012) then
- local nam = "Ruby"
- if b.BrickColor == BrickColor.new("Really red") then
- nam = "Ruby"
- elseif b.BrickColor == BrickColor.new("Lime green") then
- nam = "Emerald"
- elseif b.BrickColor == BrickColor.new("Lapis") then
- nam = "Saphire"
- elseif b.BrickColor == BrickColor.new("Institutional white") then
- nam = "Diamond"
- else
- nam = "Rift JEMMMMMMMMMMMMMMMMMMMMMMMMM"
- end
- Insert(b, nam, "Rare", v)
- elseif b.CFrame == v.CFrame and b.Size == Vector3.new(0.443721384, 0.443579674, 0.43334952) and b.Transparency == 1 then
- Insert(b, "Ice Eccesnse", "Rare", v)
- elseif v.CFrame == v.CFrame and b.Size == Vector3.new(1,1,1) then
- Insert(b, "???", "Rare", v)
- elseif b.CFrame == v.CFrame and b.Size == Vector3.new(0.211999997, 1.96399999, 1.125) then
- Insert(b, "LANUSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS", "Artifact", v)
- elseif b.CFrame == v.CFrame and b.Size == Vector3.new(0.38940832, 1.64949799, 1.24002481) then
- Insert(b, "Bound Book", "Scroll", v)
- elseif b.CFrame == v.CFrame then
- Insert(b, "Artifact", "Artifact", v)
- end
- end
- end
- end
- RefreshTrinket()
- local WorkChild,Stepped;
- WorkChild = workspace.ChildAdded:connect(function()
- RefreshTrinket()
- end)
- Stepped = game:GetService'RunService'.RenderStepped:connect(function()
- update()
- end)
- game:GetService("UserInputService").InputBegan:connect(function(inputObject)
- if inputObject.KeyCode == Enum.KeyCode.F3 then
- WorkChild:Disconnect()
- Stepped:Disconnect()
- Remove = true
- update()
- Trinkets = {}
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement