Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --local multiplier = 1 --// set the multiplier of the Furnace
- local state = 1
- function getMultiplier()
- if state == 1 then
- return math.floor( ((2^Random.new():NextNumber(0,3))^Random.new():NextNumber(0,3))^Random.new():NextNumber(0.7,2) )
- elseif state == 2 then
- return Random.new():NextInteger(1,50)
- elseif state == 3 then
- return 25
- elseif state == 4 then
- state = Random.new():NextInteger(2,4)
- getMultiplier()
- elseif state == 5 then
- return 0
- elseif state >= 6 then
- state = 4
- getMultiplier()
- end
- end
- local textColor = Color3.fromRGB(250,250,250) --// set the color of shown money amount on sell
- local MathModule = require(game.ReplicatedStorage.Modules.MathModule)
- script.Parent.Touched:connect(function(hit)
- if hit:FindFirstChild("OreValue") then
- if hit:FindFirstChild("Upgrades") then
- if not hit:FindFirstChild("Processing") then
- local tag = Instance.new("BoolValue")
- tag.Name = "Processing"
- local player = game.Players[script.Parent.Parent.Parent.Parent.Owner.Value]
- if hit.Parent == script.Parent.Parent.Parent.Parent.DroppedOres then
- if hit.OreValue.Value > -1 then
- --[[player.Stats.CurOres.Value >= 1 and player.Stats.CurOres.Value <= player.Stats.OreLimit.Value then
- player.Stats.CurOres.Value = player.Stats.CurOres.Value - 1
- end]]
- local cash = player.Stats.RawMoney
- local temppart = Instance.new("Part", script.Parent.TempParts)
- temppart.Transparency = 1
- temppart.Anchored = true
- temppart.CanCollide = false
- local bbgui = Instance.new("BillboardGui",temppart)
- bbgui.Size = UDim2.new(1,0,1,0)
- local tex = Instance.new("TextLabel", bbgui)
- tex.BackgroundTransparency = 1
- tex.Size = UDim2.new(2,0,1,0)
- tex.TextColor3 = textColor
- tex.TextStrokeTransparency = 0
- tex.TextScaled = true
- tex.TextWrapped = true
- tex.Font = Enum.Font.SourceSansBold
- state = Random.new():NextInteger(1,10)
- local m = math.floor( ((2^Random.new():NextNumber(0,3))^Random.new():NextNumber(0,3))^Random.new():NextNumber(0.7,2) )
- if m < 30 then
- m = 30
- elseif m > 5000 then
- m = 5000
- end
- tex.Text = "$ "..MathModule:GetSuffix(math.floor((hit.OreValue.Value)*m))
- cash.Value = cash.Value + math.floor((hit.OreValue.Value)*m)
- wait(.25)
- temppart.Position = hit.Position + Vector3.new(0,1.5,0)
- hit:Destroy()
- wait(1.5)
- temppart:Destroy()
- end
- end
- if hit and hit.Parent then
- hit:Destroy()
- end
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement