function SaveData(P)local l={}for P,r in ipairs(P.Backpack:GetChildren())do if game.ServerStorage:FindFirstChild(r.Name)~=nil then if game.ServerStorage[r.Name]:IsA("\084\111\111\108")then table.insert(l,r.Name)end end end PlayersItems:SetAsync(P.UserId,l)end
--A data-saving function. SetAsync takes ten seconds to run,
--so the player will have to stay ten seconds after
function SaveData(Player)
	local Items = {}
	for i, Item in ipairs(Player.Backpack:GetChildren()) do
		if game.ServerStorage:FindFirstChild(Item.Name) ~= nil then
			if game.ServerStorage[Item.Name]:IsA("Tool") then
				table.insert(Items, Item.Name)
			end
		end
	end
	PlayersItems:SetAsync(Player.UserId, Items)
end
