How would like every player gets 120 rubles per 2 minutes

How would I make the player in game get 120 rubles per 2 minutes? (LeaderBoard please btw)

I would be happy if anyone helped!:smiley: thanks!

2 Likes
game.Players.PlayerAdded:Connect(function(player)
If player then
Local folder = instance.new(“folder”)
folder.Parent = player
Local rubles = instance.new(“intvalue”)
rubles.Parent = folder
rubles.Name = (“rubles”)
while wait(120) do 
rubles.Value = rubles.Value + 1

End
End
end)
1 Like

Leadder board? Not quite what exactly what i wanted sir.

You would also wait 120, not 2. Wait uses seconds, not minutes.

Have a while loop and wait about the seconds in 2 minutes. Inside the while loop, increment the player’s rubies by 120.

I fixed it my bad I forgot how to make leaderstats I needed to check my game.

  • Create a Script Inside Of Server Script Service.
  • Insert This Code Into The Script
while true do
	wait(120)
	Players = game:GetService("Players")
	for i, player in pairs(Players:GetPlayers()) do
		player.Leaderstats.rubles.Value = player.Leaderstats.rubles.Value + 120
	end
end
  • This Code Gives All Players 120 Rubles Every 120 Seconds or 2 Minutes
1 Like

thank you this worked ! :heart: