game.Players.PlayerAdded:connect(function(f)local F=Instance.new("\070\111\108\100\101\114",f)F.Name="\083\107\105\110\115"local R=Instance.new("\083\116\114\105\110\103\086\097\108\117\101",F)R.Name=stat R.Value=ds:GetAsync(f.UserId)or startamount ds:SetAsync(f.UserId,R.Value)R.Changed:connect(function()ds:SetAsync(f.UserId,R.Value)end)end)game.Players.PlayerRemoving:connect(function(f)ds:SetAsync(f.UserId,f.Skins.Equipped.Value)end)
--Don't worry about the rest of the code, except for line 25.
game.Players.PlayerAdded:connect(function(player)
	local leader = Instance.new("Folder", player)
	leader.Name = "Skins"
	local Cash = Instance.new("StringValue", leader)
	Cash.Name = stat
	Cash.Value = ds:GetAsync(player.UserId) or startamount
	ds:SetAsync(player.UserId, Cash.Value)
	Cash.Changed:connect(function()
		ds:SetAsync(player.UserId, Cash.Value)
	end)
end)

game.Players.PlayerRemoving:connect(function(player)
	ds:SetAsync(player.UserId, player.Skins.Equipped.Value) --Change "Points" to the name of your leaderstat.
end)
