Guest User

MainScript

a guest
May 6th, 2021
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.24 KB | None | 0 0
  1. local ds=game:GetService("DataStoreService"):GetDataStore("Limiteds")
  2. local dr=game:GetService("DataStoreService"):GetDataStore("CaseBux")
  3. local u=game:GetService("DataStoreService"):GetDataStore("Upgrades")
  4. local codes=game:GetService("DataStoreService"):GetDataStore("Codes")
  5.  
  6. local bux={
  7. ['51401076']=1000;
  8. ['51358496']=10000;
  9. ['51401103']=25000;
  10. ['51401121']=50000;
  11. ['51401137']=75000;
  12. ['51401148']=100000;
  13. ['51401163']=250000;
  14. ['51401176']=500000;
  15. ['51401193']=750000;
  16. ['51401204']=1000000;
  17. };
  18.  
  19.  
  20. function Count(player,item,place)
  21. local a=0;
  22. for i,v in next,player[place]:GetChildren() do
  23. if v.Name==item then
  24. a=a+1
  25. end
  26. end
  27. return a;
  28. end
  29.  
  30. function GetRap(v)
  31. return workspace.Limiteds:FindFirstChild(v) and workspace.Limiteds[v].Value or 100000;
  32. end
  33.  
  34. local function GetDescendants(parent)
  35. local Children, Index = parent:GetChildren(), 1 -- set the initial frame
  36. local Stack, All = {}, {}
  37. while true do
  38. local Child = Children[Index]
  39. if Child then -- more children to get, hooray!
  40. table.insert(All, Child) -- push the child onto the array
  41. table.insert(Stack, {Children, Index}) -- push the current frame onto the stack
  42. Children, Index = Child:GetChildren(), 0 -- create a new frame from the child's children
  43. else -- no more children
  44. if #Stack > 0 then
  45. local Frame = table.remove(Stack) -- get the last frame off the top of the stack
  46. Children, Index = Frame[1], Frame[2] -- set Children and Index to the previous frame's values
  47. else
  48. break -- stack is empty, we are at the top level, time to exit
  49. end
  50. end
  51. Index = Index + 1 -- increment the index
  52. end
  53. return All
  54. end
  55.  
  56. function Update(player)
  57. spawn(function()
  58. local amount=player:WaitForChild("TotalValue").Value-game:GetService("PointsService"):GetGamePointBalance(player.userId)
  59. if amount~=0 and player.userId>0 then
  60. game:GetService("PointsService"):AwardPoints(player.userId,amount)
  61. end
  62. end)
  63. repeat wait() until player.Character
  64. for i,v in next,player.Character:GetChildren() do
  65. if v:IsA("Accessory") or v:IsA("Tool") then
  66. v:Destroy()
  67. end
  68. end
  69. for i,v in next,player.Items:GetChildren() do
  70. if v.Value then
  71. local t=game:GetService("InsertService"):LoadAsset(tonumber(v.Name)):GetChildren()[1]
  72. if t:IsA("Decal") then
  73. player.Character.Head.face.Texture=t.Texture
  74. else
  75. if t:IsA("Tool") then
  76. for _,x in next,GetDescendants(t) do
  77. if x:IsA("Script") or x:IsA("LocalScript") or x:IsA("GuiObject") then
  78. x:Destroy()
  79. end
  80. end
  81. end
  82. t.Parent=player.Character
  83. end
  84. end
  85. end
  86. if player.TotalValue.Value>=100000000 then
  87. for i,v in next,player.Character:GetChildren() do
  88. if v:IsA("BasePart") then
  89. v.BrickColor=BrickColor.Yellow()
  90. v.Material=Enum.Material.Neon
  91. end
  92. end
  93. elseif player.TotalValue.Value>=50000000 then
  94. for i,v in next,player.Character:GetChildren() do
  95. if v:IsA("BasePart") then
  96. v.BrickColor=BrickColor.Red()
  97. v.Material=Enum.Material.Neon
  98. end
  99. end
  100. elseif player.TotalValue.Value>=10000000 then
  101. for i,v in next,player.Character:GetChildren() do
  102. if v:IsA("BasePart") then
  103. v.BrickColor=BrickColor.Green()
  104. v.Material=Enum.Material.Neon
  105. end
  106. end
  107. elseif player.TotalValue.Value>=1000000 then
  108. for i,v in next,player.Character:GetChildren() do
  109. if v:IsA("BasePart") then
  110. v.BrickColor=BrickColor.Blue()
  111. v.Material=Enum.Material.Neon
  112. end
  113. end
  114. elseif player.TotalValue.Value>=100000 then
  115. for i,v in next,player.Character:GetChildren() do
  116. if v:IsA("BasePart") then
  117. v.BrickColor=BrickColor.Yellow()
  118. v.Material=Enum.Material.Foil
  119. end
  120. end
  121. elseif player.TotalValue.Value>=50000 then
  122. for i,v in next,player.Character:GetChildren() do
  123. if v:IsA("BasePart") then
  124. v.BrickColor=BrickColor.Red()
  125. v.Material=Enum.Material.Slate
  126. end
  127. end
  128. elseif player.TotalValue.Value>=10000 then
  129. for i,v in next,player.Character:GetChildren() do
  130. if v:IsA("BasePart") then
  131. v.BrickColor=BrickColor.Green()
  132. v.Material=Enum.Material.Grass
  133. end
  134. end
  135. else
  136. for i,v in next,player.Character:GetChildren() do
  137. if v:IsA("BasePart") then
  138. v.BrickColor=BrickColor.Blue()
  139. v.Material=Enum.Material.Plastic
  140. end
  141. end
  142. end
  143. end
  144.  
  145. game:GetService("MarketplaceService").ProcessReceipt=(function(info)
  146. if info.ProductId==51400901 then
  147. for _,player in next,game.Players:GetPlayers() do
  148. if player.userId==info.PlayerId then
  149. local t={}
  150. for i=1,100 do
  151. local number=math.random()+(player.CaseOdds.Value*0.01)
  152. local rand;
  153. if number<=0.5 then
  154. repeat rand=workspace.Limiteds:GetChildren()[math.random(#workspace.Limiteds:GetChildren())] until rand.Value>=10000 and rand.Value<50000 and rand.Value~=100000 or (player.Unobtainable.Value and rand.Value==100000)
  155. elseif number<=0.75 then
  156. repeat rand=workspace.Limiteds:GetChildren()[math.random(#workspace.Limiteds:GetChildren())] until rand.Value>=50000 and rand.Value<100000 and rand.Value~=100000 or (player.Unobtainable.Value and rand.Value==100000)
  157. else
  158. repeat rand=workspace.Limiteds:GetChildren()[math.random(#workspace.Limiteds:GetChildren())] until rand.Value>=100000 and rand.Value~=100000
  159. end
  160. table.insert(t,rand)
  161. end
  162. local chosen=math.random(30,90)
  163. Instance.new("BoolValue",player.Items).Name=t[chosen].Name
  164. workspace.OpenCase:FireClient(player,t,chosen)
  165. return Enum.ProductPurchaseDecision.PurchaseGranted
  166. end
  167. end
  168. elseif bux[tostring(info.ProductId)] then
  169. for i,v in next,game.Players:GetPlayers() do
  170. if v.userId==info.PlayerId then
  171. v:WaitForChild("Robux").Value=v.Robux.Value+bux[tostring(info.ProductId)]
  172. return Enum.ProductPurchaseDecision.PurchaseGranted
  173. end
  174. end
  175. end
  176. end)
  177.  
  178. spawn(function()
  179. while wait(60) do
  180. for i,player in next,game.Players:GetPlayers() do
  181. if player:FindFirstChild("Robux") and player:FindFirstChild("Items") and player:WaitForChild("Loaded").Value then
  182. if game:GetService("BadgeService"):UserHasBadge(player.userId,687032973) then
  183. player.Robux.Value=player.Robux.Value+10000
  184. end
  185. local success;
  186. repeat success=pcall(function()
  187. dr:SetAsync(tostring(player.userId),player.Robux.Value)
  188. end) until success
  189. repeat success=pcall(function()
  190. local t={}
  191. for i,v in next,player.Items:GetChildren() do
  192. table.insert(t,v.Name)
  193. end
  194. ds:SetAsync(tostring(player.userId),t);
  195. end) until success
  196. repeat success=pcall(function()
  197. local t={}
  198. t[1]=player.Click.Value
  199. t[2]=player.CaseOdds.Value
  200. t[3]=player.Tester.Value
  201. u:SetAsync(tostring(player.userId),t);
  202. end) until success
  203. repeat success=pcall(function()
  204. local t={}
  205. for i,v in next,player.Codes:GetChildren() do
  206. table.insert(t,v.Name)
  207. end
  208. codes:SetAsync(tostring(player.userId),t);
  209. end) until success
  210. end
  211. end
  212. end
  213. end)
  214.  
  215. game.Players.PlayerAdded:connect(function(player)
  216. player.CanLoadCharacterAppearance=false
  217. Instance.new("BoolValue",player).Name='Unobtainable'
  218. player.Unobtainable.Value=game:GetService("BadgeService"):UserHasBadge(player.userId,688165577)
  219. if player.userId==game.CreatorId then
  220. player.Unobtainable.Value=false
  221. end
  222. Instance.new("IntValue",player).Name='Robux'
  223. Instance.new("IntValue",player).Name='Items'
  224. Instance.new("IntValue",player).Name='TotalValue'
  225. Instance.new("NumberValue",player).Name='DontExploit'
  226. Instance.new("BoolValue",player).Name='Loaded'
  227. Instance.new("StringValue",player).Name='Trade'
  228. Instance.new("BoolValue",player).Name='Busy'
  229. Instance.new("BoolValue",player).Name='Accept'
  230. Instance.new("BoolValue",player).Name='Case'
  231. Instance.new("IntValue",player).Name='Click'
  232. Instance.new("IntValue",player).Name='Codes'
  233. Instance.new("IntValue",player).Name='CaseOdds'
  234. Instance.new("BoolValue",player).Name='Tester'
  235. local upgrades=u:GetAsync(tostring(player.userId))
  236. player.Click.Value=upgrades and type(upgrades)=='table' and upgrades[1] or 25
  237. player.CaseOdds.Value=upgrades and type(upgrades)=='table' and upgrades[2] or 0
  238. player.Tester.Value=upgrades and type(upgrades)=='table' and upgrades[3] or false
  239. player.Case.Value=true
  240. player.Robux.Value=dr:GetAsync(tostring(player.userId)) or 10000
  241. player.CharacterAdded:connect(function(char)
  242. Update(player)
  243. player.Busy.Value=false
  244. player.Accept.Value=false
  245. for i,v in next,player.Trade:GetChildren() do
  246. v:Destroy()
  247. end
  248. end)
  249. player.Items.ChildAdded:connect(function(item)
  250. wait()
  251. if not workspace.Limiteds:FindFirstChild(item.Name) or (workspace.Limiteds:FindFirstChild(item.Name).Value==100000) then
  252. local rap=GetRap(item.Name)
  253. local t=Instance.new("IntValue",workspace.Limiteds)
  254. t.Name=item.Name
  255. t.Value=rap
  256. end
  257. item.Changed:connect(function()
  258. Update(player)
  259. end)
  260. end)
  261. player.Items.ChildRemoved:connect(function()
  262. Update(player)
  263. end)
  264. local loaded_data=ds:GetAsync(tostring(player.userId))
  265. if loaded_data and type(loaded_data)=='table' then
  266. for i,v in next,loaded_data do
  267. if tonumber(v) then
  268. Instance.new("BoolValue",player.Items).Name=v
  269. if not workspace.Limiteds:FindFirstChild(v) then
  270. local newval=GetRap(v)
  271. local new=Instance.new("IntValue",workspace.Limiteds)
  272. new.Name=v
  273. new.Value=newval
  274. end
  275. end
  276. end
  277. end
  278. local loaded_data=codes:GetAsync(tostring(player.userId))
  279. if loaded_data and type(loaded_data)=='table' then
  280. for i,v in next,loaded_data do
  281. Instance.new("BoolValue",player.Codes).Name=v
  282. end
  283. end
  284. if not player.Tester.Value and game:GetService("DataStoreService"):GetDataStore("Robux"):GetAsync(tostring(player.userId)) and game:GetService("DataStoreService"):GetDataStore("Robux"):GetAsync(tostring(player.userId))~=0 then
  285. player.Tester.Value=true
  286. game:GetService("DataStoreService"):GetDataStore("Robux"):SetAsync(tostring(player.userId),0)
  287. Instance.new("BoolValue",player.Items).Name=89171071
  288. end
  289. player.Loaded.Value=true
  290. if player.Character then
  291. player:LoadCharacter()
  292. end
  293. end)
  294.  
  295. game.Players.PlayerRemoving:connect(function(player)
  296. if player:WaitForChild("Loaded").Value then
  297. dr:SetAsync(tostring(player.userId),player:WaitForChild("Robux").Value)
  298. local t={}
  299. for i,v in next,player.Items:GetChildren() do
  300. table.insert(t,v.Name)
  301. end
  302. ds:SetAsync(tostring(player.userId),t);
  303. repeat success=pcall(function()
  304. local t={}
  305. t[1]=player.Click.Value
  306. t[2]=player.CaseOdds.Value
  307. t[3]=player.Tester.Value
  308. u:SetAsync(tostring(player.userId),t);
  309. end) until success
  310. repeat success=pcall(function()
  311. local t={}
  312. for i,v in next,player.Codes:GetChildren() do
  313. table.insert(t,v.Name)
  314. end
  315. codes:SetAsync(tostring(player.userId),t);
  316. end) until success
  317. end
  318. end)
  319.  
  320. workspace.CompleteTrade.OnServerEvent:connect(function(player,other)
  321. if player and other and player.Parent and other.Parent and player.Accept.Value and other.Accept.Value and player.Loaded.Value and other.Loaded.Value then
  322. for i,v in next,player.Trade:GetChildren() do
  323. if player.Items:FindFirstChild(v.Name) then
  324. v.Value=false
  325. v.Parent=other.Items
  326. player.Items[v.Name]:Destroy()
  327. end
  328. end
  329. for i,v in next,other.Trade:GetChildren() do
  330. if other.Items:FindFirstChild(v.Name) then
  331. v.Value=false
  332. v.Parent=player.Items
  333. other.Items[v.Name]:Destroy()
  334. end
  335. end
  336. end
  337. player.Trade:ClearAllChildren()
  338. other.Trade:ClearAllChildren()
  339. player.Accept.Value=false
  340. other.Accept.Value=false
  341. player.Busy.Value=false
  342. other.Busy.Value=false
  343. end)
  344.  
  345. workspace.SendTrade.OnServerEvent:connect(function(sender,other)
  346. if not sender.Busy.Value and not other.Busy.Value and sender.Loaded.Value and other.Loaded.Value then
  347. sender.Busy.Value=true
  348. other.Busy.Value=true
  349. workspace.SendTrade:FireClient(sender,sender,other)
  350. workspace.SendTrade:FireClient(other,sender,other)
  351. end
  352. end)
  353.  
  354. workspace.StartTrade.OnServerEvent:connect(function(player1,player2)
  355. if player1.Loaded.Value and player2.Loaded.Value then
  356. player1.Accept.Value=false
  357. player2.Accept.Value=false
  358. workspace.StartTrade:FireClient(player1,player2)
  359. workspace.StartTrade:FireClient(player2,player1)
  360. end
  361. end)
  362.  
  363. workspace.AddToTrade.OnServerEvent:connect(function(player,item,bool)
  364. if bool and player.Items:FindFirstChild(item) and player.Loaded.Value and Count(player,item,'Trade')<Count(player,item,'Items') then
  365. player.Items[item]:Clone().Parent=player.Trade
  366. elseif not bool and player.Trade:FindFirstChild(item) then
  367. player.Trade[item]:Destroy()
  368. end
  369. end)
  370.  
  371. workspace.TradeDecision.OnServerEvent:connect(function(player,bool,other)
  372. if bool then
  373. player.Accept.Value=true
  374. elseif other then
  375. player.Accept.Value=false
  376. other.Accept.Value=false
  377. else
  378. player.Busy.Value=false
  379. end
  380. end)
  381.  
  382. workspace.GiveRobux.OnServerEvent:connect(function(player,item)
  383. if item and item=='Click' then
  384. if player.Robux.Value>=player.Click.Value*1000 then
  385. player.Robux.Value=player.Robux.Value-player.Click.Value*1000
  386. player.Click.Value=player.Click.Value+5
  387. end
  388. elseif item and item=='Case' then
  389. if player.Robux.Value>=(player.CaseOdds.Value+1)*100000 and player.CaseOdds.Value<50 then
  390. player.Robux.Value=player.Robux.Value-(player.CaseOdds.Value+1)*100000
  391. player.CaseOdds.Value=player.CaseOdds.Value+1
  392. end
  393. elseif item then
  394. if player.Items:FindFirstChild(item) then
  395. player:WaitForChild("Robux").Value=player.Robux.Value+workspace.Limiteds[item].Value
  396. player.Items[item]:Destroy()
  397. end
  398. else
  399. if player.DontExploit.Value<13 then
  400. player.DontExploit.Value=player.DontExploit.Value+1
  401. player:WaitForChild("Robux").Value=player.Robux.Value+player:WaitForChild("Click").Value
  402. else player:Kick('You have been kicked for auto clicking. This is your warning!');
  403. end
  404. end
  405. end)
  406.  
  407. spawn(function()
  408. while wait(1) do
  409. for i,v in next,game.Players:GetPlayers() do
  410. if v:FindFirstChild("DontExploit") then
  411. v.DontExploit.Value=0
  412. end
  413. end
  414. end
  415. end)
  416.  
  417. workspace.EquipItem.OnServerEvent:connect(function(player,item)
  418. local val=player.Items:WaitForChild(item).Value
  419. if game:GetService("InsertService"):LoadAsset(tonumber(item)):GetChildren()[1]:IsA("Decal") then
  420. for i,v in next,player.Items:GetChildren() do
  421. if v.Value and game:GetService("InsertService"):LoadAsset(tonumber(v.Name)):GetChildren()[1]:IsA("Decal") then
  422. v.Value=false
  423. end
  424. end
  425. elseif game:GetService("InsertService"):LoadAsset(tonumber(item)):GetChildren()[1]:IsA("Tool") then
  426. for i,v in next,player.Items:GetChildren() do
  427. if v.Value and game:GetService("InsertService"):LoadAsset(tonumber(v.Name)):GetChildren()[1]:IsA("Tool") then
  428. v.Value=false
  429. end
  430. end
  431. end
  432. player.Items[item].Value=not val
  433. if not player.Items[item].Value and game:GetService("InsertService"):LoadAsset(tonumber(item)):GetChildren()[1]:IsA("Decal") then
  434. player.Character.Head.face.Texture='rbxasset://textures/face.png'
  435. end
  436. end)
  437.  
  438. local codes={
  439. ['DOMINOSAREWHITE']=702899078;
  440. ['CODESLOL']=702898507;
  441. ['sAmUeLkInGxIsThEbEsTpLeAsEdOnTpUtThIsCoDeIn1']=695402043;
  442. ['sAmUeLkInGxIsThEbEsTpLeAsEdOnTpUtThIsCoDeIn2']=695400614;
  443. }
  444. local code_ids={}
  445. for i,v in next,codes do
  446. code_ids[tostring(v)]=true
  447. end
  448. workspace.FireCode.OnServerEvent:connect(function(player,code)
  449. if codes[code] and not player:WaitForChild("Codes"):FindFirstChild(code) then
  450. Instance.new("IntValue",player.Codes).Name=code
  451. Instance.new("BoolValue",player.Items).Name=codes[code]
  452. end
  453. end)
  454.  
  455. local case_prices={
  456. ['Common']=2500;
  457. ['Uncommon']=5000;
  458. ['Rare']=15000;
  459. ['Epic']=40000;
  460. };
  461. workspace.OpenCase.OnServerEvent:connect(function(player,case_type)
  462. if player.Robux.Value>=case_prices[case_type] and player.Case.Value then
  463. player.Case.Value=false
  464. local t={}
  465. for i=1,100 do
  466. if math.random()>0.65 then wait() end
  467. local rand;
  468. repeat
  469. local number=math.random()+(player:WaitForChild("CaseOdds").Value*0.01)
  470. if case_type=='Common' then
  471. if number<=0.8 then
  472. repeat rand=workspace.Limiteds:GetChildren()[math.random(#workspace.Limiteds:GetChildren())] until rand.Value<10000 and rand.Value~=100000 or (player.Unobtainable.Value and rand.Value==100000 )
  473. else
  474. repeat rand=workspace.Limiteds:GetChildren()[math.random(#workspace.Limiteds:GetChildren())] until rand.Value>=10000 and rand.Value<50000 and rand.Value~=100000 or (player.Unobtainable.Value and rand.Value==100000 )
  475. end
  476. elseif case_type=='Uncommon' then
  477. if number<=0.7 then
  478. repeat rand=workspace.Limiteds:GetChildren()[math.random(#workspace.Limiteds:GetChildren())] until rand.Value<10000 and rand.Value~=100000 or (player.Unobtainable.Value and rand.Value==100000 )
  479. elseif number<=0.95 then
  480. repeat rand=workspace.Limiteds:GetChildren()[math.random(#workspace.Limiteds:GetChildren())] until rand.Value>=10000 and rand.Value<50000 and rand.Value~=100000 or (player.Unobtainable.Value and rand.Value==100000 )
  481. else
  482. repeat rand=workspace.Limiteds:GetChildren()[math.random(#workspace.Limiteds:GetChildren())] until rand.Value>=50000 and rand.Value<100000 and rand.Value~=100000 or (player.Unobtainable.Value and rand.Value==100000 )
  483. end
  484. elseif case_type=='Rare' then
  485. if number<=0.6 then
  486. repeat rand=workspace.Limiteds:GetChildren()[math.random(#workspace.Limiteds:GetChildren())] until rand.Value<10000 and rand.Value~=100000 or (player.Unobtainable.Value and rand.Value==100000 )
  487. elseif number<=0.75 then
  488. repeat rand=workspace.Limiteds:GetChildren()[math.random(#workspace.Limiteds:GetChildren())] until rand.Value>=10000 and rand.Value<50000 and rand.Value~=100000 or (player.Unobtainable.Value and rand.Value==100000 )
  489. elseif number<=0.9 then
  490. repeat rand=workspace.Limiteds:GetChildren()[math.random(#workspace.Limiteds:GetChildren())] until rand.Value>=50000 and rand.Value<100000 and rand.Value~=100000 or (player.Unobtainable.Value and rand.Value==100000 )
  491. else
  492. repeat rand=workspace.Limiteds:GetChildren()[math.random(#workspace.Limiteds:GetChildren())] until rand.Value>=100000 and rand.Value<=500000 and rand.Value~=100000
  493. end
  494. elseif case_type=='Epic' then
  495. if number<=0.5 then
  496. repeat rand=workspace.Limiteds:GetChildren()[math.random(#workspace.Limiteds:GetChildren())] until rand.Value<10000 and rand.Value~=100000 or (player.Unobtainable.Value and rand.Value==100000 )
  497. elseif number<=0.65 then
  498. repeat rand=workspace.Limiteds:GetChildren()[math.random(#workspace.Limiteds:GetChildren())] until rand.Value>=10000 and rand.Value<50000 and rand.Value~=100000 or (player.Unobtainable.Value and rand.Value==100000 )
  499. elseif number<=0.85 then
  500. repeat rand=workspace.Limiteds:GetChildren()[math.random(#workspace.Limiteds:GetChildren())] until rand.Value>=50000 and rand.Value<100000 and rand.Value~=100000 or (player.Unobtainable.Value and rand.Value==100000 )
  501. else
  502. repeat rand=workspace.Limiteds:GetChildren()[math.random(#workspace.Limiteds:GetChildren())] until rand.Value>=100000 and rand.Value~=100000
  503. end
  504. end
  505. until rand and not code_ids[tostring(rand.Name)] and (rand.Value~=100000 or math.random()>0.5) and rand.Name~='89171071'
  506. table.insert(t,rand)
  507. end
  508. local chosen=math.random(30,90)
  509. Instance.new("BoolValue",player:WaitForChild("Items")).Name=t[chosen].Name
  510. player.Robux.Value=player.Robux.Value-case_prices[case_type]
  511. workspace.OpenCase:FireClient(player,t,chosen)
  512. wait(1)
  513. player.Case.Value=true
  514. end
  515. end)
  516.  
  517. local l=Instance.new("BoolValue",workspace)
  518. l.Name='Limiteds'
  519. l.ChildAdded:connect(function(thing)
  520. wait(1)
  521. if thing.Value==0 then
  522. thing.Value=100000
  523. end
  524. end)
  525.  
  526. local u={1114768;6128663;1078202;4640898;10468797;76059498;76382978;42070576}
  527. for i,v in next,u do
  528. local val=Instance.new("IntValue",l)
  529. val.Name=v
  530. val.Value=100000
  531. end
  532.  
  533. local info=require(game.ServerStorage.JSON)
  534. local decoded=game:GetService("HttpService"):JSONDecode(info)
  535. for i,v in next,decoded do
  536. if not workspace.Limiteds:FindFirstChild(v.AssetId) then
  537. local t=Instance.new("IntValue",l)
  538. t.Name=v.AssetId
  539. t.Value=(v.AveragePrice>0 and v.AveragePrice or 100000)
  540. else workspace.Limiteds[v.AssetId].Value=(v.AveragePrice>0 and v.AveragePrice or 100000)
  541. end
  542. if math.random()>0.7 then wait() end
  543. end
  544. l.Value=true
Advertisement
Add Comment
Please, Sign In to add comment