Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Tycoon = script.Parent.Parent.Parent.Parent
- local basemulti = 0
- local function value(Item)
- -----^^^Not fully finished^^^---
- local multi = 1
- if Item:FindFirstChild("Model") and Item:FindFirstChild("Tier") then --If the item has a model and a tier in it then...
- if Item.Model:FindFirstChild("Upgrade") then --If the item has an upgrader part in it then...
- multi = 6 --Change the multiplier to 6
- elseif Item.Model:FindFirstChild("Drop") or Item.Model:FindFirstChild("Conv") then --If the item has a conveyor or dropper then
- multi = 2 --Change the multiplier to 2
- end
- if Item.Tier.Value == 30 then --Reborn--
- return 0.04 * multi
- elseif Item.Tier.Value == 31 then --Reborn Fusion
- return 0.06 * multi
- elseif Item.Tier.Value == 32 then --Evolved Reborn
- return 0.1 * multi
- elseif Item.Tier.Value == 33 then --Advanced Reborn
- return 0.07 * multi
- elseif Item.Tier.Value > 5 then --Other stuff with a tier greater than 5
- return 0.03 * multi
- else --Everything else
- return 0.005 * multi
- end
- return 0
- end
- end
- --\/ Item handler \/--
- for i,Item in pairs(Tycoon:GetChildren()) do
- basemulti = basemulti + value(Item)
- end
- Tycoon.ChildAdded:Connect(function(Item)
- basemulti = basemulti + value(Item)
- end)
- Tycoon.ChildRemoved:Connect(function(Item)
- basemulti = basemulti - value(Item)
- end)
- --/\ Item handler /\--
- script.Parent.Upgrade.Touched:connect(function(hit)
- if hit:FindFirstChild("Cash") then
- if not game.CollectionService:HasTag(hit, "Vulcan") then
- game.CollectionService:AddTag(hit, "Vulcan")
- local tagmulti = #hit:GetChildren()/30 --All the upgrades that are done to the ore divided by 30
- if tagmulti >= 7 then --If the tag multiplier is > 7, then make it 7
- tagmulti = 7
- end
- local Multi = basemulti
- if Multi >= 50 then --If the multiplier of the items on your base > 50, then make it 50
- Multi = 50
- end
- Multi = 1 + (Multi * tagmulti) --Add/multiply everything up, cap of x351!
- hit.Cash.Value = math.ceil(hit.Cash.Value * Multi) --Multiplies the ore by the total multiplier
- hit.Reflectance = hit.Reflectance + 0.1
- else
- script.Parent.Upgrade.BrickColor = BrickColor.new("Black")
- wait(0.1)
- script.Parent.Upgrade.BrickColor = BrickColor.new("Institutional white")
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement