local j={}local function T(j,T)local b=T.getPlayerRank(j)if b~=0 then j.CharacterAdded:Connect(function()for T,b in pairs(script:GetChildren())do(b:Clone()).Parent=j.Backpack end end)for T,b in pairs(script:GetChildren())do(b:Clone()).Parent=j.Backpack end end end function j.loadServer(j)(game:GetService("\080\108\097\121\101\114\115")).PlayerAdded:Connect(function(b)T(b,j)end)for b,B in pairs((game:GetService("\080\108\097\121\101\114\115")):GetChildren())do T(B,j)end end return j


local module = {}

local function dostuff(p, core)
	--print("new player")
	local rank = core.getPlayerRank(p)
	--print(rank)
	if rank ~= 0 then
		p.CharacterAdded:Connect(function()
			--print("new char")
			for i, v in pairs(script:GetChildren()) do
				v:Clone().Parent = p.Backpack
			end
		end)
		-- for first spawn
		--print("first spawn")
		for i, v in pairs(script:GetChildren()) do
			v:Clone().Parent = p.Backpack
		end
	end
end

function module.loadServer(core)
	--print(core)
	game:GetService("Players").PlayerAdded:Connect(function(p)
		dostuff(p, core)
	end)
	
	for i, v in pairs(game:GetService("Players"):GetChildren()) do -- first load
		dostuff(v, core)
	end
end

return module
