This works perfectly for rewarding the player when "Stage" is a multiple of 5, but the issue I've run into is that if a player is on stage 5 and continually reloads they'll keep being rewarded. is there a way i can make this function only applicable when changing, and not during initial "creation", or being pulled from the DataStore.
game.Players.PlayerAdded:Connect(function(plr) local Leaderstats = plr:WaitForChild("leaderstats") local Stage = Leaderstats:WaitForChild("Stage") local Gems = plr:WaitForChild("Gems") local Skips = plr:WaitForChild("Skips") Stage.Changed:Connect(function(new) if new % 5 == 0 then Gems.Value = Gems.Value + 10 end end) end)