all the scripts are in server script service
Leaderboard script:
game.Players.PlayerAdded:connect(function(plr)
local stats = Instance.new(“BoolValue”,plr)
stats.Name = “leaderstats”
local Love = Instance.new("IntValue",stats)
Love.Name = "Love"
Love.Value = 0
end)
the script that gives the points to the player each second:
amount = 2 – this varibel is the amount of love we get each time
timedelay = 4 – this varibeble is the amount of seconds inbetween each time the cash reward
currencyname = “Love” – this is name of our curaency
while true do
wait(timedelay)
for i,v in pairs(game.Players:GetPlayers()) do
if v:FindFirstChild(“leaderstats”) then
v.leaderstats[currencyname].Value = v.leaderstats[currencyname].Value + Amount
end
end
end