Advertisement
EconomicSerg

Give player cash every something seconds

Jan 13th, 2021
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. local amount = 5 -- Change this to how much you want the player to have
  2. local timedelay = 4 -- Change this to how long you want the player to suffer and wait
  3. local currency = "Cash" -- Change this to the name of your currency
  4.  
  5. while wait(timedelay) do -- An alternate is while true do and then the next line is wait(timedelay)
  6. for i, v in pairs(game.Players:GetPlayers()) do
  7. if v:FindFirstChild("leaderstats") then
  8. v.leaderstats[currency].Value = v.leaderstats[currency].Value + amount
  9. end
  10. end
  11. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement