Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.46 KB | None | 0 0
  1. --local multiplier = 1 --// set the multiplier of the Furnace
  2. local state = 1
  3.  
  4. function getMultiplier()
  5. if state == 1 then
  6. return math.floor( ((2^Random.new():NextNumber(0,3))^Random.new():NextNumber(0,3))^Random.new():NextNumber(0.7,2) )
  7. elseif state == 2 then
  8. return Random.new():NextInteger(1,50)
  9. elseif state == 3 then
  10. return 25
  11. elseif state == 4 then
  12. state = Random.new():NextInteger(2,4)
  13. getMultiplier()
  14. elseif state == 5 then
  15. return 0
  16. elseif state >= 6 then
  17. state = 4
  18. getMultiplier()
  19. end
  20. end
  21.  
  22. local textColor = Color3.fromRGB(250,250,250) --// set the color of shown money amount on sell
  23.  
  24. local MathModule = require(game.ReplicatedStorage.Modules.MathModule)
  25. script.Parent.Touched:connect(function(hit)
  26. if hit:FindFirstChild("OreValue") then
  27. if hit:FindFirstChild("Upgrades") then
  28. if not hit:FindFirstChild("Processing") then
  29. local tag = Instance.new("BoolValue")
  30. tag.Name = "Processing"
  31. local player = game.Players[script.Parent.Parent.Parent.Parent.Owner.Value]
  32. if hit.Parent == script.Parent.Parent.Parent.Parent.DroppedOres then
  33. if hit.OreValue.Value > -1 then
  34. --[[player.Stats.CurOres.Value >= 1 and player.Stats.CurOres.Value <= player.Stats.OreLimit.Value then
  35. player.Stats.CurOres.Value = player.Stats.CurOres.Value - 1
  36. end]]
  37. local cash = player.Stats.RawMoney
  38. local temppart = Instance.new("Part", script.Parent.TempParts)
  39. temppart.Transparency = 1
  40. temppart.Anchored = true
  41. temppart.CanCollide = false
  42. local bbgui = Instance.new("BillboardGui",temppart)
  43. bbgui.Size = UDim2.new(1,0,1,0)
  44. local tex = Instance.new("TextLabel", bbgui)
  45. tex.BackgroundTransparency = 1
  46. tex.Size = UDim2.new(2,0,1,0)
  47. tex.TextColor3 = textColor
  48. tex.TextStrokeTransparency = 0
  49. tex.TextScaled = true
  50. tex.TextWrapped = true
  51. tex.Font = Enum.Font.SourceSansBold
  52. state = Random.new():NextInteger(1,10)
  53. local m = math.floor( ((2^Random.new():NextNumber(0,3))^Random.new():NextNumber(0,3))^Random.new():NextNumber(0.7,2) )
  54. if m < 30 then
  55. m = 30
  56. elseif m > 5000 then
  57. m = 5000
  58. end
  59. tex.Text = "$ "..MathModule:GetSuffix(math.floor((hit.OreValue.Value)*m))
  60. cash.Value = cash.Value + math.floor((hit.OreValue.Value)*m)
  61. wait(.25)
  62. temppart.Position = hit.Position + Vector3.new(0,1.5,0)
  63. hit:Destroy()
  64. wait(1.5)
  65. temppart:Destroy()
  66. end
  67. end
  68. if hit and hit.Parent then
  69. hit:Destroy()
  70. end
  71. end
  72. end
  73. end
  74. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement