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!
Here's a simple script...
local interval = 60 spawn(function() while true do for i,v in pairs(game.Players:GetPlayers())do v.leaderstats.Cash.Value = v.leaderstats.Cash.Value + 5 end wait(interval) end end)