This script is to make it so you gain 1 Skip per every 10 Stages you complete.
Both Skips and Stages are Statistics in PlayerStats
In the future i want to make gamepasses that add skips to your stats, and this code makes it so if you are on stage 12 and you have 30 skips then you would go back down to 1 that is not good and if you used your skip than it would still give it back to you which is not good again..
game.Players.PlayerAdded:connect(function(plr)
local PlayerStats = plr:WaitForChild("PlayerStats")
local Stage = PlayerStats:WaitForChild("Stage")
local Skips = PlayerStats:WaitForChild("Skips")
Stage.Value.Changed:connect(function()
Skips.Value = math.floor(Stage.Value/10)
end)

6 comments
I was gonna say to use your brain, but there's no need, because the answer doesn't even require a brain...
Yeah, you already have it sorted.
+1?
Guys lol what is it? i want it to add 1 every time you reach 10 stages and if you have only done 10 stages and you have 5 it takes away the 5 and turns it into 1..
Well that comment makes it sound more complicated but based on the title, you would use a plus sign...
Explain better? I am confused lol