CrastAndNoob

Money Script

Jul 31st, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.93 KB | None | 0 0
  1. for _,i in pairs(game:GetService("Players"):GetChildren())do
  2. if i:FindFirstChild("leaderstats")~=nil then
  3. i.leaderstats:Destroy()
  4. end
  5. end
  6. function moneySetup(plr)
  7. local rebirthamount = 10000000
  8. local doubleamount = 50
  9. local tripleamount = 75
  10. local quadrupleamount = 100
  11. local quintupleamount = 125
  12. local sextupleamount = 150
  13. local septupleamount = 175
  14. local octupleamount = 200
  15. local gives = 1
  16. local debounce = false
  17. local ls = Instance.new("Folder",plr)
  18. ls.Name = "leaderstats"
  19. local money = Instance.new("NumberValue",ls)
  20. money.Name = "Money"
  21. money.Value = 15
  22. local rebirths = Instance.new("NumberValue",ls)
  23. rebirths.Name = "Rebirths"
  24. rebirths.Value = 0
  25. plr.Chatted:connect(function(msg)
  26. if string.sub(msg:lower(),1,1)=="."then
  27. local command = string.sub(msg:lower(),2)
  28. local command2 = string.sub(msg,2)
  29. if string.sub(command,1,7)=="donate "then
  30. if money.Value>9 then
  31. local sub = string.sub(command2,8)
  32. local p = game:GetService("Players"):FindFirstChild(sub)
  33. if p~=nil then
  34. money.Value = money.Value - 5
  35. p.leaderstats.Money.Value = p.leaderstats.Money.Value + 5
  36. local moneys = Instance.new("Sound",plr.PlayerGui)
  37. moneys.SoundId = "rbxassetid://534538511"
  38. moneys.Volume = 99999999999999999999
  39. moneys:Play()
  40. local moneys = Instance.new("Sound",p.PlayerGui)
  41. moneys.SoundId = "rbxassetid://534538511"
  42. moneys.Volume = 99999999999999999999
  43. moneys:Play()
  44. end
  45. elseif money.Value<10 then
  46. local moneys = Instance.new("Sound",plr.PlayerGui)
  47. moneys.SoundId = "rbxassetid://676289384"
  48. moneys.Volume = 99999999999999999999
  49. moneys:Play()
  50. end
  51. end
  52. if string.sub(command,1,4)=="buy "then
  53. local sub = string.sub(command,5)
  54. if sub=="double"then
  55. if money.Value>(doubleamount-1) then
  56. money.Value = money.Value - doubleamount
  57. gives = gives * 2
  58. local moneys = Instance.new("Sound",plr.PlayerGui)
  59. moneys.SoundId = "rbxassetid://534538511"
  60. moneys.Volume = 99999999999999999999
  61. moneys:Play()
  62. elseif money.Value<doubleamount then
  63. local moneys = Instance.new("Sound",plr.PlayerGui)
  64. moneys.SoundId = "rbxassetid://676289384"
  65. moneys.Volume = 99999999999999999999
  66. moneys:Play()
  67. end
  68. end
  69. if sub=="triple"then
  70. if money.Value>(tripleamount-1) then
  71. money.Value = money.Value - tripleamount
  72. gives = gives * 3
  73. local moneys = Instance.new("Sound",plr.PlayerGui)
  74. moneys.SoundId = "rbxassetid://534538511"
  75. moneys.Volume = 99999999999999999999
  76. moneys:Play()
  77. elseif money.Value<tripleamount then
  78. local moneys = Instance.new("Sound",plr.PlayerGui)
  79. moneys.SoundId = "rbxassetid://676289384"
  80. moneys.Volume = 99999999999999999999
  81. moneys:Play()
  82. end
  83. end
  84. if sub=="quadruple"then
  85. if money.Value>(quadrupleamount-1) then
  86. money.Value = money.Value - quadrupleamount
  87. gives = gives * 4
  88. local moneys = Instance.new("Sound",plr.PlayerGui)
  89. moneys.SoundId = "rbxassetid://534538511"
  90. moneys.Volume = 99999999999999999999
  91. moneys:Play()
  92. elseif money.Value<quadrupleamount then
  93. local moneys = Instance.new("Sound",plr.PlayerGui)
  94. moneys.SoundId = "rbxassetid://676289384"
  95. moneys.Volume = 99999999999999999999
  96. moneys:Play()
  97. end
  98. end
  99. if sub=="quintuple"then
  100. if money.Value>(quintupleamount-1) then
  101. money.Value = money.Value - quintupleamount
  102. gives = gives * 5
  103. local moneys = Instance.new("Sound",plr.PlayerGui)
  104. moneys.SoundId = "rbxassetid://534538511"
  105. moneys.Volume = 99999999999999999999
  106. moneys:Play()
  107. elseif money.Value<quintupleamount then
  108. local moneys = Instance.new("Sound",plr.PlayerGui)
  109. moneys.SoundId = "rbxassetid://676289384"
  110. moneys.Volume = 99999999999999999999
  111. moneys:Play()
  112. end
  113. end
  114. if sub=="sextuple"then
  115. if money.Value>(sextupleamount-1) then
  116. money.Value = money.Value - sextupleamount
  117. gives = gives * 6
  118. local moneys = Instance.new("Sound",plr.PlayerGui)
  119. moneys.SoundId = "rbxassetid://534538511"
  120. moneys.Volume = 99999999999999999999
  121. moneys:Play()
  122. elseif money.Value<sextupleamount then
  123. local moneys = Instance.new("Sound",plr.PlayerGui)
  124. moneys.SoundId = "rbxassetid://676289384"
  125. moneys.Volume = 99999999999999999999
  126. moneys:Play()
  127. end
  128. end
  129. if sub=="septuple"then
  130. if money.Value>(septupleamount-1) then
  131. money.Value = money.Value - septupleamount
  132. gives = gives * 7
  133. local moneys = Instance.new("Sound",plr.PlayerGui)
  134. moneys.SoundId = "rbxassetid://534538511"
  135. moneys.Volume = 99999999999999999999
  136. moneys:Play()
  137. elseif money.Value<septupleamount then
  138. local moneys = Instance.new("Sound",plr.PlayerGui)
  139. moneys.SoundId = "rbxassetid://676289384"
  140. moneys.Volume = 99999999999999999999
  141. moneys:Play()
  142. end
  143. end
  144. if sub=="octuple"then
  145. if money.Value>(octupleamount-1) then
  146. money.Value = money.Value - octupleamount
  147. gives = gives * 8
  148. local moneys = Instance.new("Sound",plr.PlayerGui)
  149. moneys.SoundId = "rbxassetid://534538511"
  150. moneys.Volume = 99999999999999999999
  151. moneys:Play()
  152. elseif money.Value<octupleamount then
  153. local moneys = Instance.new("Sound",plr.PlayerGui)
  154. moneys.SoundId = "rbxassetid://676289384"
  155. moneys.Volume = 99999999999999999999
  156. moneys:Play()
  157. end
  158. end
  159. end
  160. if command=="rebirth"then
  161. if money.Value>(rebirthamount-1) then
  162. money.Value = 15
  163. rebirths.Value = rebirths.Value + 1
  164. gives = (rebirths.Value + 1)
  165. doubleamount = doubleamount + 50
  166. tripleamount = tripleamount + 75
  167. quadrupleamount = quadrupleamount + 100
  168. quintupleamount = quintupleamount + 125
  169. sextupleamount = sextupleamount + 150
  170. septupleamount = septupleamount + 175
  171. octupleamount = octupleamount + 200
  172. rebirthamount = rebirthamount + 10000000
  173. local moneys = Instance.new("Sound",plr.PlayerGui)
  174. moneys.SoundId = "rbxassetid://534538511"
  175. moneys.Volume = 99999999999999999999
  176. moneys:Play()
  177. elseif money.Value<rebirthamount then
  178. local moneys = Instance.new("Sound",plr.PlayerGui)
  179. moneys.SoundId = "rbxassetid://676289384"
  180. moneys.Volume = 99999999999999999999
  181. moneys:Play()
  182. end
  183. end
  184. end
  185. end)
  186. plr.CharacterAdded:connect(function(char)
  187. char.Humanoid.Running:connect(function()
  188. if debounce == false then
  189. debounce = true
  190. money.Value = money.Value + gives
  191. wait(1)
  192. debounce = false
  193. end
  194. end)
  195. char.Humanoid.Jumping:connect(function()
  196. if debounce == false then
  197. debounce = true
  198. money.Value = money.Value + gives
  199. wait(1)
  200. debounce = false
  201. end
  202. end)
  203. end)
  204.  
  205. local t = coroutine.wrap(function()
  206. while true do
  207. if rebirthamount>1000000000 then
  208. if money>rebirthamount then
  209. money.Value = 15
  210. rebirths.Value = rebirths.Value + 1
  211. gives = (rebirths.Value + 1)
  212. doubleamount = doubleamount + 50
  213. tripleamount = tripleamount + 75
  214. quadrupleamount = quadrupleamount + 100
  215. quintupleamount = quintupleamount + 125
  216. sextupleamount = sextupleamount + 150
  217. septupleamount = septupleamount + 175
  218. octupleamount = octupleamount + 200
  219. rebirthamount = rebirthamount + 10000000
  220. local moneys = Instance.new("Sound",plr.PlayerGui)
  221. moneys.SoundId = "rbxassetid://534538511"
  222. moneys.Volume = 99999999999999999999
  223. moneys:Play()
  224. end
  225. else
  226. if money>1000000000 then
  227. money.Value = 15
  228. rebirths.Value = rebirths.Value + 1
  229. gives = (rebirths.Value + 1)
  230. doubleamount = doubleamount + 50
  231. tripleamount = tripleamount + 75
  232. quadrupleamount = quadrupleamount + 100
  233. quintupleamount = quintupleamount + 125
  234. sextupleamount = sextupleamount + 150
  235. septupleamount = septupleamount + 175
  236. octupleamount = octupleamount + 200
  237. rebirthamount = rebirthamount + 10000000
  238. local moneys = Instance.new("Sound",plr.PlayerGui)
  239. moneys.SoundId = "rbxassetid://534538511"
  240. moneys.Volume = 99999999999999999999
  241. moneys:Play()
  242. end
  243. end
  244. wait()
  245. end
  246. end)
  247. t()
  248. end
  249.  
  250. game:GetService("Players").PlayerAdded:connect(function(pl)
  251. moneySetup(pl)
  252. end)
  253.  
  254. for _,i in pairs(game:GetService("Players"):GetChildren())do
  255. moneySetup(i)
  256. wait()
  257. i:LoadCharacter()
  258. end
  259.  
  260. function secsTo(str1,num1)
  261. if str1:lower()=="femtosecond"then
  262. return num1/1000000000000000
  263. end
  264. if str1:lower()=="picosecond"then
  265. return num1/1000000000000
  266. end
  267. if str1:lower()=="nanosecond"then
  268. return num1/1000000000
  269. end
  270. if str1:lower()=="microsecond"then
  271. return num1/1000000
  272. end
  273. if str1:lower()=="millisecond"then
  274. return num1/1000
  275. end
  276. if str1:lower()=="second"then
  277. return num1*1
  278. end
  279. if str1:lower()=="minute"then
  280. return num1*60
  281. end
  282. if str1:lower()=="hour"then
  283. return num1*60*60
  284. end
  285. if str1:lower()=="day"then
  286. return num1*60*60*24
  287. end
  288. if str1:lower()=="week"then
  289. return num1*60*60*24*7
  290. end
  291. if str1:lower()=="month"then
  292. return (num1*60*60*24*7*4)+2
  293. end
  294. if str1:lower()=="year"then
  295. return ((num1*60*60*24*7*4)+2)*12*1
  296. end
  297. if str1:lower()=="decade"then
  298. return ((num1*60*60*24*7*4)+2)*12*10
  299. end
  300. if str1:lower()=="century"then
  301. return ((num1*60*60*24*7*4)+2)*12*100
  302. end
  303. if str1:lower()=="millenium"then
  304. return ((num1*60*60*24*7*4)+2)*12*1000
  305. end
  306. end
  307.  
  308. while true do
  309. wait(60)
  310. local amounts = {10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,100,100,100,100,100,100,100,100,100,100,100,250,250,250,250,250,250,250,500,500,500,500,500,500,1000,1000,1000,2500,2500,5000}
  311. local amount = amounts[math.random(1,#amounts)]
  312. local x = coroutine.wrap(function()
  313. local message = Instance.new("Message",workspace)
  314. message.Text = "A money boost has appeared! Get it before the others to recieve some money!"
  315. wait(5)
  316. message:Destroy()
  317. end)
  318. x()
  319. local f = coroutine.wrap(function()
  320. local part = Instance.new("Part",workspace)
  321. part.Name = "Boost"
  322. part.Size = Vector3.new(2,2,2)
  323. part.Position = Vector3.new(math.random(-200,200),50,math.random(-200,200))
  324. part.Shape = "Ball"
  325. part.Transparency = 0.55
  326. part.BrickColor = BrickColor.new("Electric blue")
  327. part.Touched:connect(function(ch)
  328. if ch.Parent.ClassName=="Model"then
  329. local plr = game:GetService("Players"):FindFirstChild(ch.Parent.Name)
  330. local char = ch.Parent
  331. if plr~=nil then
  332. part:Destroy()
  333. plr.leaderstats.Money.Value = plr.leaderstats.Money.Value + amount
  334. local moneys = Instance.new("Sound",plr.PlayerGui)
  335. moneys.SoundId = "rbxassetid://534538511"
  336. moneys.Volume = 99999999999999999999
  337. moneys:Play()
  338. end
  339. end
  340. end)
  341. end)
  342. f()
  343. end
Add Comment
Please, Sign In to add comment