Needs help to crate two leader stats value for example: Stage value and Points Value? my script just showing Stage Value.I hope to edit my script because I am not good at English: Note: this script auto saving players data
local DataStore = game:GetService("DataStoreService")
local ds = DataStore:GetDataStore("StageSaveSystem")
game.Players.PlayerAdded:connect(function(player)
local leader = Instance.new("Folder",player)
leader.Name = "leaderstats"
local Stage = Instance.new("IntValue",leader)
Stage.Name = "Stage"
Stage.Value = ds:GetAsync(player.UserId) or 0
ds:SetAsync(player.UserId, Stage.Value)
Stage.Changed:connect(function()
ds:SetAsync(player.UserId, Stage.Value)
end)
end)
game.Players.PlayerRemoving:connect(function(player)
ds:SetAsync(player.UserId, player.leaderstats.Stage.Value)
end)

2 comments
If you want it to actually save the amount, I would remove the or 0 in line 09. I did that and it worked like a charm for me. If you want to make it save 2 different points systems, I suggest you split the script into 2 parts. Top one being for making the leaderboard stats, and the second part, below, is for saving the stats. You can easily find how to make multiple Datasaves on youtube.
can you give me ready 2 value script ... plz .