Data store works I just want to know if there's any way I could improve it

Hi my DataStore works I just want to know if theres any way I can improve it that’s all
script:

local DSS = game:GetService("DataStoreService")
local PTSStore = DSS:GetDataStore("PointsStore")
game.Players.PlayerAdded:Connect(function(player)
	local role = player:GetRoleInGroup(7886882)
	local ls = Instance.new("Folder",player)
	ls.Name = "leaderstats"
	local rankname = Instance.new("StringValue",ls)
	rankname.Name = ("Rank")
	if player:GetRankInGroup(7886882) >=1 then
		rankname.Value = role
	else
		rankname.Value = ("Guest")
	end
	
	local pts = Instance.new("IntValue",ls)
	pts.Name = ("Points")
	pts.Value = PTSStore:GetAsync(player, player.leaderstats.Points.Value) or 0
end)

game.Players.PlayerRemoving:Connect(function(player)
	local success, err = pcall(function()
		PTSStore:SetAsync(player, player.leaderstats.Points.Value)
	end)
	if success then
		print("Successfully saved "..player.Name.."'s Data!")
	else
		print("Couldn't save the user:"..player.Name.."'s Data!")
		warn(err)
	end
end)