I need a script that gives cash every 60 seconds preferably 5. Here is my leader board script
CashData = game:GetService("DataStoreService"):GetDataStore("CashData")
GemsData = game:GetService("DataStoreService"):GetDataStore("GemsData")
game.Players.PlayerAdded:connect(function(plr)
local stats = Instance.new('IntValue', plr)
stats.Name = 'leaderstats'
local cash = Instance.new('IntValue', stats)
cash.Name = 'Cash'
cash.Value = 0
stats.Name = 'leaderstats'
local cash = Instance.new('IntValue', stats)
cash.Name = 'Gems'
cash.Value = 0
end)
Please help me a could not find a way!

1 comment
Would recommend adding checks..such as, checking if the player actually has leaderstats before you go to change their cash