Only This script:
local DataStore = game:GetService("DataStoreService")
local MyData = DataStore:GetDataStore("leaderstats")
game.Players.PlayerAdded:Connect(function(player)
local Folder = Instance.new("Folder")
Folder.Parent = player
Folder.Name = "leaderstats"
local Points = Instance.new("IntValue")
Points.Name = "Points"
Points.Parent = Folder
Points.Value = MyData:GetAsync("stat1-"..player.UserId)
end)
game.Players.PlayerRemoving:Connect(function(player)
local Data1 = player.leaderstats.Points.Value
MyData:SetAsync("stat1-"..player.UserId, Data1)
end)
[/quote]