Advertisement
Existence_YT

[MakingASimulator] Upgrade

May 27th, 2020
762
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1. local ds2 = require(1936396537)
  2. game.ReplicatedStorage.Upgrade.OnServerInvoke = function(plr)
  3.     local clicks = ds2("clicks", plr)
  4.     local multiplier = ds2("multiplier", plr)
  5.     local multipliers = {100, 200, 300, 400, 500, 600, 700, 800, 900, 1000}
  6.     for i,  v in pairs(multipliers) do
  7.         if multiplier:Get(0)+1 == i then
  8.             if clicks:Get(0) >= v then
  9.                 clicks:Increment(-v)
  10.                 multiplier:Increment(1)
  11.                 return {true, multipliers[i+1]}
  12.             end
  13.         end
  14.     end
  15.     return {false, 0}
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement