RazBerry916

Untitled

Sep 14th, 2025
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.79 KB | None | 0 0
  1. --remotes
  2. local remotes=game.ReplicatedStorage:WaitForChild("Remotes")
  3.  
  4. --Folders
  5. local IG=game.ReplicatedStorage:WaitForChild("InGame")
  6.  
  7. local s=IG:WaitForChild("Sodas")
  8.  
  9. --requiring
  10.  
  11. local importances=require(IG:WaitForChild("Importances"))
  12.  
  13. local dataman=require(game.ServerScriptService:WaitForChild("Modules"):WaitForChild("DataManager"))
  14.  
  15. --Values
  16. local raritysValue=IG:WaitForChild("Values"):WaitForChild("Rarity")
  17.  
  18. local MG=IG:WaitForChild("Values"):WaitForChild("MythicGuaranteed")
  19.  
  20. MG.Value=false
  21.  
  22. local LG=IG:WaitForChild("Values"):WaitForChild("LegendaryGuaranteed")
  23.  
  24. LG.Value=false
  25.  
  26. local moneyLost=nil
  27.  
  28. --Timers
  29. local sodaTimer=workspace:WaitForChild("SodaSign"):WaitForChild("SodaTimer")
  30.  
  31. --Services
  32.  
  33. local ts=game:GetService("TweenService")
  34.  
  35. --Scripting
  36.  
  37. local rarityTable={
  38. ["Common"]={"Common",0.5},
  39. ["Rare"]={"Rare",0.44},
  40. ["Legendary"]={"Legendary",0.05},
  41. ["Mythic"]={"Mythic",0.01},
  42. }
  43. local mutationTable={
  44. ["Normal"]={"Normal",0.90},
  45. ["Golden"]={"Golden",0.06},
  46. ["Diamond"]={"Diamond",0.03},
  47. ["Rainbow"]={"Rainbow",0.01},
  48. }
  49.  
  50. task.spawn(function()
  51. --legendary
  52.  
  53. local LMS = 150
  54. local LRS = LMS
  55.  
  56. while true do
  57.  
  58.  
  59. task.wait(1)
  60.  
  61.  
  62. LRS-=1
  63. local LM = math.floor(LRS/60)
  64. local LSL = LRS-LM*60
  65.  
  66. if LSL<10 then
  67. sodaTimer.Legendary.Legendary.Text="Guaranteed <font color='rgb(255,255,0)'> Legendary </font> in " .. LM .. ":0" .. LSL
  68. else
  69. sodaTimer.Legendary.Legendary.Text="Guaranteed <font color='rgb(255,255,0)'> Legendary </font> in " .. LM .. ":" .. LSL
  70. end
  71. if LRS<=0 then
  72.  
  73. LRS=LMS
  74. LG.Value=true
  75. end
  76. end
  77. end)
  78. task.spawn(function()
  79. --mythic
  80.  
  81. local MMS = 300
  82. local MRS = MMS
  83.  
  84. while true do
  85.  
  86.  
  87. task.wait(1)
  88. MRS-=1
  89. local MM = math.floor(MRS/60)
  90. local MSL = MRS-MM*60
  91.  
  92. if MSL<10 then
  93. sodaTimer.Mythic.Mythic.Text="Guaranteed <font color='rgb(255,0,0)'> Mythic </font> in " .. MM .. ":0" .. MSL
  94. else
  95. sodaTimer.Mythic.Mythic.Text="Guaranteed <font color='rgb(255,0,0)'> Mythic </font> in " .. MM .. ":" .. MSL
  96. end
  97. if MRS<=0 then
  98. MRS=MMS
  99. MG.Value=true
  100. end
  101. end
  102. end)
  103. function comma_value(amount)
  104. local formatted, k = amount, nil
  105. local a, b = "^(-?%d+)(%d%d%d)", '%1,%2'
  106. repeat
  107. formatted, k = string.gsub(formatted, a, b)
  108. until (k == 0)
  109. return formatted
  110. end
  111. local function NPCMove(sodamodel)
  112.  
  113. sodamodel:SetPrimaryPartCFrame(workspace.Start.CFrame)
  114.  
  115.  
  116.  
  117. task.spawn(function()
  118.  
  119. local falseTouch=false
  120.  
  121. task.spawn(function()
  122. while true do
  123. if falseTouch== true then
  124. break
  125.  
  126. elseif not falseTouch then
  127.  
  128. if not sodamodel then return end
  129. sodamodel.Humanoid:MoveTo(workspace.Finish.Position)
  130.  
  131. end
  132.  
  133.  
  134. task.wait(5)
  135. end
  136. end)
  137.  
  138. sodamodel:WaitForChild("IsClaimed"):GetPropertyChangedSignal("Value"):Connect(function()
  139.  
  140. print(falseTouch)
  141. falseTouch=true
  142.  
  143. end)
  144.  
  145. local TouchFunction
  146. TouchFunction = sodamodel.ProxPart.Touched:Connect(function(hit)
  147. if hit.Name=="Finish" then
  148. TouchFunction:Disconnect()
  149. falseTouch=true
  150. task.wait(2)
  151. if sodamodel:WaitForChild("IsClaimed").Value==true or not sodamodel:WaitForChild("IsClaimed") then return end
  152. sodamodel:Destroy()
  153. end
  154.  
  155. end)
  156.  
  157. end)
  158. end
  159.  
  160. local function chanceSystem()
  161.  
  162. local RarityName
  163.  
  164. local SodaTable = {}
  165.  
  166.  
  167. local RNG=Random.new();
  168. local weight=0;
  169. local weight2=0;
  170. for i, v in pairs(rarityTable) do
  171. weight+=rarityTable[i][2]
  172. end
  173. for i, v in pairs(mutationTable) do
  174. weight2+=mutationTable[i][2]
  175. end
  176.  
  177. local chosen=RNG:NextNumber(0, weight);
  178. local chosen2=RNG:NextNumber(0, weight2);
  179.  
  180. for i, v in pairs(rarityTable) do
  181. weight-=rarityTable[i][2]
  182. if chosen>weight then
  183. print(rarityTable[i][1],rarityTable[i][2])
  184. RarityName=rarityTable[i][1]
  185. break
  186. end
  187. end
  188. for i, v in pairs(importances.Sodas) do
  189. if v.Rarity==RarityName then
  190. table.insert(SodaTable,i)
  191. end
  192. end
  193. local randomSoda=SodaTable[math.random(1,#SodaTable)]
  194.  
  195. local sodamodel = s:FindFirstChild(randomSoda):Clone()
  196.  
  197. local stringMutationValue=sodamodel:WaitForChild("MutationValue")
  198. for i, v in pairs(mutationTable) do
  199. weight2-=mutationTable[i][2]
  200. if chosen2>weight2 then
  201. stringMutationValue.Value=mutationTable[i][1]
  202. print(mutationTable[i][1],mutationTable[i][2],stringMutationValue.Value)
  203. break
  204. end
  205. end
  206. if not sodamodel then return end
  207.  
  208. local prox = Instance.new("ProximityPrompt", sodamodel.HumanoidRootPart)
  209. local Owner=nil
  210. prox.MaxActivationDistance=12
  211. prox.RequiresLineOfSight=false
  212. prox.HoldDuration=0.5
  213. local ProxFunction=nil
  214.  
  215. sodamodel.Parent=workspace
  216. sodamodel.PrimaryPart:SetNetworkOwner(nil)
  217. for i, v in sodamodel:GetChildren() do
  218. if v:IsA("MeshPart") or v:IsA("UnionOperation") or v:IsA("WedgePart") or v:IsA("Part") then
  219. if stringMutationValue.Value=="Rainbow" then
  220. task.spawn(function()
  221. while true do
  222. for i=0,1,0.001*10 do
  223. v.Color=Color3.fromHSV(i,1,1)
  224. task.wait()
  225. end
  226. end
  227. end)
  228. elseif stringMutationValue.Value=="Golden" then
  229. v.Color=Color3.new(1,1,0)
  230. elseif stringMutationValue.Value=="Diamond" then
  231. v.Color=Color3.new(0,1,1)
  232. end
  233. end
  234. end
  235. if sodamodel.Parent==workspace then
  236. NPCMove(sodamodel)
  237. end
  238. local NameTag
  239. if RarityName=="Common" then
  240. NameTag=IG:WaitForChild("Common"):Clone()
  241. elseif RarityName=="Rare" then
  242. NameTag=IG:WaitForChild("Rare"):Clone()
  243. elseif RarityName == "Legendary" then
  244. NameTag=IG:WaitForChild("Legendary"):Clone()
  245. elseif RarityName == "Mythic" then
  246. NameTag=IG:WaitForChild("Mythic"):Clone()
  247. end
  248. task.spawn(function()
  249. while task.wait() do
  250. local randomMythic=SodaTable[RNG:NextInteger(0, #SodaTable)]
  251. for i, v in pairs(mutationTable) do
  252. weight2-=mutationTable[i][2]
  253. if chosen2>weight2 then
  254. stringMutationValue.Value=mutationTable[i][1]
  255. break
  256. end
  257. end
  258. if MG.Value==true and importances.Sodas[randomMythic].Rarity=="Mythic" then
  259. MG.Value=false
  260. task.wait(2.5)
  261. local sodamodelMythic = s:FindFirstChild(randomMythic):Clone()
  262. sodamodelMythic.Parent=workspace
  263. sodamodelMythic.PrimaryPart:SetNetworkOwner(nil)
  264. game.Debris:AddItem(sodamodelMythic,21)
  265. NameTag=IG:WaitForChild("Mythic"):Clone()
  266. if importances.Sodas[sodamodelMythic.Name] then
  267. NameTag.Parent=sodamodelMythic.HumanoidRootPart
  268. NameTag:WaitForChild("SodaName").Text=sodamodelMythic.Name
  269. NameTag:WaitForChild("Price").Text=importances.Sodas[sodamodelMythic.Name].Price
  270. NameTag:WaitForChild("Rarity").Text=importances.Sodas[sodamodelMythic.Name].Rarity
  271. NameTag:WaitForChild("MPS").Text=importances.Sodas[sodamodelMythic.Name].MPS
  272. if stringMutationValue.Value=="Normal" then
  273. NameTag:WaitForChild("Mutation").Text="Normal"
  274. NameTag:WaitForChild("Mutation").TextColor3=Color3.fromHSV(0, 0, 1)
  275. NameTag:WaitForChild("MPS").Text=math.round(importances.Sodas[sodamodelMythic.Name].MPS)
  276. NameTag:WaitForChild("Price").Text=math.round(importances.Sodas[sodamodelMythic.Name].Price)
  277. elseif stringMutationValue.Value=="Golden" then
  278. NameTag:WaitForChild("Mutation").Text="Golden"
  279. NameTag:WaitForChild("Mutation").TextColor3=Color3.fromHSV(0.166667, 1, 1)
  280. NameTag:WaitForChild("MPS").Text=math.round(importances.Sodas[sodamodelMythic.Name].MPS*2)
  281. NameTag:WaitForChild("Price").Text=math.round(importances.Sodas[sodamodelMythic.Name].Price * 1.75)
  282. elseif stringMutationValue.Value=="Diamond" then
  283. NameTag:WaitForChild("Mutation").Text="Diamond"
  284. NameTag:WaitForChild("Mutation").TextColor3=Color3.fromHSV(0.5, 1, 1)
  285. NameTag:WaitForChild("MPS").Text=math.round(importances.Sodas[sodamodelMythic.Name].MPS*3)
  286. NameTag:WaitForChild("Price").Text=math.round(importances.Sodas[sodamodelMythic.Name].Price * 2.5)
  287. elseif stringMutationValue.Value=="Rainbow" then
  288. NameTag:WaitForChild("Mutation").Text="Rainbow"
  289. NameTag:WaitForChild("MPS").Text=math.round(importances.Sodas[sodamodelMythic.Name].MPS*4)
  290. NameTag:WaitForChild("Price").Text=math.round(importances.Sodas[sodamodelMythic.Name].Price * 3.25)
  291. task.spawn(function()
  292. while true do
  293. for i=0,1,0.001*10 do
  294. NameTag:WaitForChild("Mutation",3).TextColor3=Color3.fromHSV(i,1,1)
  295. task.wait()
  296. end
  297. end
  298. end)
  299. end
  300. end
  301. if sodamodelMythic.Parent==workspace then
  302. NPCMove(sodamodelMythic)
  303. end
  304. end
  305. local randomLegendary=SodaTable[RNG:NextInteger(0, #SodaTable)]
  306. for i, v in pairs(mutationTable) do
  307. weight2-=mutationTable[i][2]
  308. if chosen2>weight2 then
  309. stringMutationValue.Value=mutationTable[i][1]
  310. break
  311. end
  312. end
  313. if LG.Value==true and importances.Sodas[randomLegendary].Rarity=="Legendary" then
  314. LG.Value=false
  315. task.wait(2.5)
  316. local sodamodelLegendary = s:FindFirstChild(randomLegendary):Clone()
  317. sodamodelLegendary.Parent=workspace
  318. sodamodelLegendary.PrimaryPart:SetNetworkOwner(nil)
  319. game.Debris:AddItem(sodamodelLegendary,21)
  320. NameTag=IG:WaitForChild("Legendary"):Clone()
  321. if importances.Sodas[sodamodelLegendary.Name] then
  322. NameTag.Parent=sodamodelLegendary.HumanoidRootPart
  323. NameTag:WaitForChild("SodaName").Text=sodamodelLegendary.Name
  324. NameTag:WaitForChild("Price").Text=importances.Sodas[sodamodelLegendary.Name].Price
  325. NameTag:WaitForChild("Rarity").Text=importances.Sodas[sodamodelLegendary.Name].Rarity
  326. NameTag:WaitForChild("MPS").Text=importances.Sodas[sodamodelLegendary.Name].MPS
  327. if stringMutationValue.Value=="Normal" then
  328. NameTag:WaitForChild("Mutation").Text="Normal"
  329. NameTag:WaitForChild("Mutation").TextColor3=Color3.fromHSV(0, 0, 1)
  330. NameTag:WaitForChild("MPS").Text=math.round(importances.Sodas[sodamodelLegendary.Name].MPS)
  331. NameTag:WaitForChild("Price").Text=math.round(importances.Sodas[sodamodelLegendary.Name].Price)
  332. elseif stringMutationValue.Value=="Golden" then
  333. NameTag:WaitForChild("Mutation").Text="Golden"
  334. NameTag:WaitForChild("Mutation").TextColor3=Color3.fromHSV(0.166667, 1, 1)
  335. NameTag:WaitForChild("MPS").Text=math.round(importances.Sodas[sodamodelLegendary.Name].MPS*2)
  336. NameTag:WaitForChild("Price").Text=math.round(importances.Sodas[sodamodelLegendary.Name].Price * 1.75)
  337. elseif stringMutationValue.Value=="Diamond" then
  338. NameTag:WaitForChild("Mutation").Text="Diamond"
  339. NameTag:WaitForChild("Mutation").TextColor3=Color3.fromHSV(0.5, 1, 1)
  340. NameTag:WaitForChild("MPS").Text=math.round(importances.Sodas[sodamodelLegendary.Name].MPS*3)
  341. NameTag:WaitForChild("Price").Text=math.round(importances.Sodas[sodamodelLegendary.Name].Price * 2.5)
  342. elseif stringMutationValue.Value=="Rainbow" then
  343. NameTag:WaitForChild("Mutation").Text="Rainbow"
  344. NameTag:WaitForChild("MPS").Text=math.round(importances.Sodas[sodamodelLegendary.Name].MPS*4)
  345. NameTag:WaitForChild("Price").Text=math.round(importances.Sodas[sodamodelLegendary.Name].Price * 3.25)
  346. task.spawn(function()
  347. while true do
  348. for i=0,1,0.001*10 do
  349. NameTag:WaitForChild("Mutation",3).TextColor3=Color3.fromHSV(i,1,1)
  350. task.wait()
  351. end
  352. end
  353. end)
  354. end
  355. end
  356. if sodamodelLegendary.Parent==workspace then
  357. NPCMove(sodamodelLegendary)
  358. end
  359. end
  360. end
  361. end)
  362. task.spawn(function()
  363. while task.wait() do
  364. if sodamodel and moneyLost==nil then
  365. prox.ObjectText=tostring(sodamodel.Name)
  366. if stringMutationValue.Value=="Normal" then
  367. prox.ActionText="Buy for: $" .. math.round((importances.Sodas[sodamodel.Name].Price)) .. "?"
  368. elseif stringMutationValue.Value=="Golden" then
  369. prox.ActionText="Buy for: $" .. math.round((importances.Sodas[sodamodel.Name].Price * 1.75)) .. "?"
  370. elseif stringMutationValue.Value=="Diamond" then
  371. prox.ActionText="Buy for: $" .. math.round((importances.Sodas[sodamodel.Name].Price *2.5)) .. "?"
  372. elseif stringMutationValue.Value=="Rainbow" then
  373. prox.ActionText="Buy for: $" .. math.round((importances.Sodas[sodamodel.Name].Price * 3.25)) .. "?"
  374. end
  375. elseif moneyLost~=nil then
  376. prox.ActionText="Buy for: $" .. tostring(moneyLost) .. "?"
  377. prox.ObjectText=tostring(sodamodel.Name)
  378. end
  379. end
  380. end)
  381. if importances.Sodas[sodamodel.Name] then
  382. NameTag:WaitForChild("SodaName").Text=sodamodel.Name
  383. if stringMutationValue.Value=="Normal" then
  384. NameTag:WaitForChild("Mutation").Text="Normal"
  385. NameTag:WaitForChild("Mutation").TextColor3=Color3.fromHSV(0, 0, 1)
  386. NameTag:WaitForChild("MPS").Text="$" .. math.round(importances.Sodas[sodamodel.Name].MPS).. "/s"
  387. NameTag:WaitForChild("Price").Text= "$".. math.round(importances.Sodas[sodamodel.Name].Price)
  388. elseif stringMutationValue.Value=="Golden" then
  389. NameTag:WaitForChild("Mutation").Text="Golden"
  390. NameTag:WaitForChild("Mutation").TextColor3=Color3.fromHSV(0.166667, 1, 1)
  391. NameTag:WaitForChild("MPS").Text="$" .. math.round(importances.Sodas[sodamodel.Name].MPS * 2) .. "/s"
  392. NameTag:WaitForChild("Price").Text= "$".. math.round(importances.Sodas[sodamodel.Name].Price * 1.75)
  393. elseif stringMutationValue.Value=="Diamond" then
  394. NameTag:WaitForChild("Mutation").Text="Diamond"
  395. NameTag:WaitForChild("Mutation").TextColor3=Color3.fromHSV(0.5, 1, 1)
  396. NameTag:WaitForChild("MPS").Text="$" .. math.round(importances.Sodas[sodamodel.Name].MPS * 3) .. "/s"
  397. NameTag:WaitForChild("Price").Text= "$".. math.round(importances.Sodas[sodamodel.Name].Price * 2.5)
  398. elseif stringMutationValue.Value=="Rainbow" then
  399. NameTag:WaitForChild("Mutation").Text="Rainbow"
  400. NameTag:WaitForChild("MPS").Text="$" .. math.round(importances.Sodas[sodamodel.Name].MPS * 4) .. "/s"
  401. NameTag:WaitForChild("Price").Text= "$".. math.round(importances.Sodas[sodamodel.Name].Price * 3.25)
  402. task.spawn(function()
  403. while true do
  404. for i=0,1,0.001*10 do
  405. NameTag:WaitForChild("Mutation",math.huge).TextColor3=Color3.fromHSV(i,1,1)
  406. task.wait(0.001)
  407. end
  408. end
  409. end)
  410. end
  411. NameTag.Parent=sodamodel.HumanoidRootPart
  412. end
  413. --when it triggers it resets the stringmutationvalue.Value to normal????
  414. print(stringMutationValue.Value.." Line 414")
  415. prox.Triggered:Connect(function(plr)
  416. print(stringMutationValue.Value.." Line 416")
  417. local profile=dataman.Profile[plr]
  418. local TotalSlots=#profile.Data.Sodas
  419.  
  420. if TotalSlots<8 then
  421. if stringMutationValue.Value=="Normal" then
  422. moneyLost=math.round(importances.Sodas[sodamodel.Name].Price)
  423. elseif stringMutationValue.Value=="Golden" then
  424. moneyLost=math.round((importances.Sodas[sodamodel.Name].Price * 1.75))
  425. elseif stringMutationValue.Value=="Diamond" then
  426. moneyLost=math.round((importances.Sodas[sodamodel.Name].Price * 2.5))
  427. elseif stringMutationValue.Value=="Rainbow" then
  428. moneyLost=math.round((importances.Sodas[sodamodel.Name].Price * 3.25))
  429. end
  430. if profile.Data.Cash>=moneyLost then
  431. Owner=plr.Name
  432. game.ReplicatedStorage.Remotes.Bought:FireClient(plr, plr.Name, prox, moneyLost)
  433. profile.Data.Cash-=moneyLost
  434. moneyLost+=moneyLost
  435. plr.leaderstats.Cash.Value=profile.Data.Cash
  436. print(profile.Data.Cash)
  437. local hum = sodamodel:FindFirstChild("Humanoid")
  438. local connection=nil
  439. local important
  440. for i, v in importances.Sodas do
  441. if hum.Parent.Name==i then
  442. important=hum.Parent.Name
  443. end
  444. end
  445. sodamodel.IsClaimed.Value=true
  446. for i, v in workspace:WaitForChild("Bases"):GetChildren() do
  447. if v:IsA("Model") then
  448. for p, g in v:GetChildren() do
  449. if g.Name=="CashMultiplier" then
  450. if g.Parent.PlayerSign.PlayerName.Value==Owner and Owner==plr.Name then
  451. if hum:IsA("Humanoid") then
  452. local SodaModelTable = {}
  453. SodaModelTable.Name=sodamodel.Name
  454. SodaModelTable.Position = 0
  455. local number2
  456. local IntValue=Instance.new("IntValue")
  457. IntValue.Name=sodamodel.Name
  458. local Stringy=Instance.new("StringValue",IntValue)
  459. Stringy.Name="Mutation"
  460.  
  461. table.insert(profile.Data.Sodas,SodaModelTable)
  462.  
  463. task.spawn(function()
  464. local ConnectionNow
  465. local stillMoving
  466.  
  467. ConnectionNow = g.Touch.Touched:Connect(function(hit)
  468. for i = 1, 8 do
  469. number2=i
  470. local has = false
  471. for _, sodaplayer in pairs(plr.Sodas:GetChildren()) do
  472. if sodaplayer.Value==i then
  473. has=true
  474. end
  475. end
  476. if not has then
  477. IntValue.Value=i
  478. SodaModelTable.Position=i
  479. SodaModelTable.Mutation=stringMutationValue.Value
  480. Stringy.Value=SodaModelTable.Mutation
  481. break
  482. end
  483.  
  484. end
  485. local cloneSoda
  486. local cloneSodaName
  487. if hit.Parent.Name==sodamodel.Name then
  488.  
  489. ConnectionNow:Disconnect()
  490. task.wait(0.3)
  491. if SodaModelTable.Position==number2 then
  492. for blah, Soda in s:GetChildren() do
  493. if Soda:IsA("Model") and Soda.Name == SodaModelTable.Name then
  494. cloneSoda=Soda:Clone()
  495. cloneSoda.Parent=v
  496. cloneSodaName=cloneSoda.Name
  497. for blahblah, parts in cloneSoda:GetDescendants() do
  498. if parts:IsA("Part") or parts:IsA("MeshPart") or parts:IsA("WedgePart") or parts:IsA("UnionOperation") then
  499. parts.Anchored=true
  500. parts.CanCollide=false
  501. end
  502. end
  503. end
  504. end
  505. end
  506. cloneSoda:PivotTo(v.Podiums["Podium"..number2].SodaTP.CFrame - Vector3.new(0,3,0))
  507. local proxPrompt=Instance.new("ProximityPrompt",cloneSoda)
  508. proxPrompt.Name="ProximityPrompt"
  509. proxPrompt.HoldDuration=2
  510. game.ReplicatedStorage.Remotes.Steal:FireClient(plr, cloneSoda.Name, plr.Name, proxPrompt)
  511. IntValue.Parent=plr.Sodas
  512. NameTag.Parent=cloneSoda:WaitForChild("HumanoidRootPart")
  513. sodamodel:Destroy()
  514. for index, parts in cloneSoda:GetDescendants() do
  515. if parts:IsA("Part") or parts:IsA("MeshPart") or parts:IsA("WedgePart") or parts:IsA("UnionOperation") then
  516. if stringMutationValue.Value=="Golden" then
  517. parts.Color=Color3.fromRGB(255, 255, 0)
  518. elseif stringMutationValue.Value=="Diamond" then
  519. parts.Color=Color3.fromRGB(0, 255, 255)
  520. elseif stringMutationValue.Value=="Rainbow" then
  521. task.spawn(function()
  522. while true do
  523. for i=0,1,0.001*10 do
  524. NameTag:WaitForChild("Mutation",3).TextColor3=Color3.fromHSV(i,1,1)
  525. task.wait()
  526. end
  527. end
  528. end)
  529. end
  530. end
  531. end
  532. local cash
  533. if stringMutationValue.Value=="Normal" then
  534. cash=math.round((importances.Sodas[cloneSoda.Name].MPS * 1) * profile.Data.CashMultiplier)
  535. elseif stringMutationValue.Value=="Golden" then
  536. cash=math.round((importances.Sodas[cloneSoda.Name].MPS * 2) * profile.Data.CashMultiplier)
  537. elseif stringMutationValue.Value=="Diamond" then
  538. cash=math.round((importances.Sodas[cloneSoda.Name].MPS * 3) * profile.Data.CashMultiplier)
  539. elseif stringMutationValue.Value=="Rainbow" then
  540. cash=math.round((importances.Sodas[cloneSoda.Name].MPS * 4) * profile.Data.CashMultiplier)
  541. end
  542. task.spawn(function()
  543. while task.wait(1) do
  544. if not v:FindFirstChild(cloneSodaName) then
  545. v.Podiums["Podium"..number2].Collect.Money.Value=0
  546. v.Podiums["Podium"..number2].Collect.BillboardGui.TextLabel.Text="Collect: $" .. comma_value(v.Podiums["Podium"..number2].Collect.Money.Value)
  547. elseif v:FindFirstChild(cloneSodaName) then
  548. v.Podiums["Podium"..number2].Collect.Money.Value+=cash
  549. v.Podiums["Podium"..number2].Collect.BillboardGui.TextLabel.Text="Collect: $" .. comma_value(v.Podiums["Podium"..number2].Collect.Money.Value)
  550. end
  551. end
  552. end)
  553. v.Podiums["Podium"..number2].Collect.Touched:Connect(function(hit)
  554. local plr2=game.Players:GetPlayerFromCharacter(hit.Parent)
  555. if plr2 and plr2.Name==v.Name and plr2.Name==tostring(v.PlayerSign.PlayerName.Value) then
  556. profile.Data.Cash+=v.Podiums["Podium"..number2].Collect.Money.Value
  557. game.ReplicatedStorage.Remotes.Gained:FireClient(plr2, v.Podiums["Podium"..number2].Collect.Money.Value)
  558. plr2.leaderstats.Cash.Value=profile.Data.Cash
  559. v.Podiums["Podium"..number2].Collect.Money.Value=0
  560. v.Podiums["Podium"..number2].Collect.BillboardGui.TextLabel.Text="Collect: $" .. comma_value(v.Podiums["Podium"..number2].Collect.Money.Value)
  561. end
  562. end)
  563. end
  564. end)
  565. task.spawn(function()
  566. repeat
  567. hum:MoveTo(g.Touch.Position)
  568. stillMoving=hum.MoveToFinished:Wait()
  569. until stillMoving
  570. end)
  571. end)
  572. end
  573. end
  574. end
  575. end
  576. end
  577. end
  578. elseif profile.Data.Cash<importances.Sodas[sodamodel.Name].Price then
  579. game.ReplicatedStorage.Remotes.Alert:FireClient(plr, "LowOnMoney")
  580. end
  581. elseif TotalSlots==8 then
  582. game.ReplicatedStorage.Remotes.Alert:FireClient(plr,"MaxSodas")
  583. end
  584. end)
  585. end
  586. task.spawn(function()
  587. while task.wait(3) do
  588. chanceSystem()
  589. end
  590. end)
  591.  
Advertisement
Add Comment
Please, Sign In to add comment