how to give a player 1 point after every 60 seconds.
local DataStore2 = require(1936396537)
local defaultValue = 0
game.Players.PlayerAdded:Connect(function(plr)
local pointsDataStore = DataStore2("points",plr)
local leaderstats = Instance.new("Folder",plr)
leaderstats.Name = "leaderstats"
local points = Instance.new("IntValue",leaderstats)
points.Name = "Points"
local function pointsUpdate(updatedValue)
points.Value = pointsDataStore:Get(updatedValue)
end
pointsUpdate(defaultValue)
pointsDataStore:OnUpdate(pointsUpdate)
end)
while true do
wait(60)
local pointsDataStore = DataStore2("points",player)
pointsDataStore:Increment(1,defaultValue)
end)

1 comment
If you want it to do it every time add a while loop or repeat loop.