local n={}function n.RemoveHat(n)for M=1,#n,1 do if n[M].className=="\065\099\099\101\115\115\111\114\121"or n[M].className=="\072\097\116"then n[M]:remove()end end end function n.ShirtPant(n,M,h)if h.Current.Value<h.Max.Value then if M.Class.Current_Class.Value=="\078\111\110\101"then if n.Shirt.Value~=0 then(M.Character:WaitForChild("\083\104\105\114\116")):destroy();((game:GetService("\073\110\115\101\114\116\083\101\114\118\105\099\101")):LoadAsset(n.Shirt.Value)).Shirt.Parent=M.Character end if n.Pant.Value~=0 then(M.Character:WaitForChild("\080\097\110\116\115")):destroy();((game:GetService("\073\110\115\101\114\116\083\101\114\118\105\099\101")):LoadAsset(n.Pant.Value)).Pants.Parent=M.Character end end end end function n.GiveHat(n,M,h,P,L)if L.Current.Value<L.Max.Value then if h.Class.Current_Class.Value=="\078\111\110\101"then if n.Value~=""then local P=M.HATS[n.Value]:clone()P.Parent=h.Character local L=P:GetChildren()for M=1,#L,1 do if L[M]:IsA("\066\097\115\101\080\097\114\116")then local n=Instance.new("\087\101\108\100")n.Part0=P.Middle n.Part1=L[M]local h=CFrame.new(P.Middle.Position)local V=P.Middle.CFrame:inverse()*h local f=L[M].CFrame:inverse()*h n.C0=V n.C1=f n.Parent=P.Middle P.Middle.Transparency=1 end local V=Instance.new("\087\101\108\100")local f=n.Value:match("\066\065\067\075\080\065\067\075")if f==nil then V.Part0=h.Character.Head else V.Part0=h.Character.Torso end V.Part1=P.Middle V.C0=CFrame.new(0,0,0)V.Parent=V.Part0 end local V=P:GetChildren()for n=1,#V,1 do V[n].Anchored=false V[n].CanCollide=false end end end end end function n.giveclass(n,M,h,P,L)if n.Current.Value<n.Max.Value then if M.Class.Current_Class.Value=="\078\111\110\101"then M.Class.Current_Class.Value=h n.Current.Value=n.Current.Value+1 for n=1,#P,1 do(P[n]:Clone()).Parent=M.Backpack end L:Destroy()end end end return n

local _C = {}

function _C.RemoveHat(hts)
	for i=1, #hts do 
	if (hts[i].className == "Accessory") or (hts[i].className == "Hat") then 
	hts[i]:remove() 
end
end
end



function _C.ShirtPant (Outfit,Player,CClass)
	if CClass.Current.Value < CClass.Max.Value then
	if Player.Class.Current_Class.Value == "None" then
	if Outfit.Shirt.Value ~= 0 then
		Player.Character:WaitForChild("Shirt"):destroy()
		game:GetService("InsertService"):LoadAsset(Outfit.Shirt.Value).Shirt.Parent = Player.Character	
	end
	if Outfit.Pant.Value ~= 0 then
		Player.Character:WaitForChild("Pants"):destroy()
		game:GetService("InsertService"):LoadAsset(Outfit.Pant.Value).Pants.Parent = Player.Character
	end
	end
	end
end



function _C.GiveHat (s,CSYS,Player,Outfit,CClass)
if CClass.Current.Value < CClass.Max.Value then
	if Player.Class.Current_Class.Value == "None" then
if s.Value ~= "" then	
local g = CSYS.HATS[s.Value]:clone()
		g.Parent = Player.Character
		local C = g:GetChildren()
		for i=1, #C do
			if C[i]:IsA("BasePart")  then
				local W = Instance.new("Weld")
				W.Part0 = g.Middle
				W.Part1 = C[i]
				local CJ = CFrame.new(g.Middle.Position)
				local C0 = g.Middle.CFrame:inverse()*CJ
				local C1 = C[i].CFrame:inverse()*CJ
				W.C0 = C0
				W.C1 = C1
				W.Parent = g.Middle
				g.Middle.Transparency = 1
			end
				local Y = Instance.new("Weld")
				local Result = (s.Value):match("BACKPACK")
				if Result == nil then
				Y.Part0 = Player.Character.Head
				else
				Y.Part0 = Player.Character.Torso
				end
				Y.Part1 = g.Middle
				Y.C0 = CFrame.new(0, 0, 0)
				Y.Parent = Y.Part0
		end

		local h = g:GetChildren()
		for i = 1, # h do
			h[i].Anchored = false
			h[i].CanCollide = false
		end
end
end
end
end

function _C.giveclass (CClass,Player,CLNAME,Tools,Gui)
	if CClass.Current.Value < CClass.Max.Value then
	if Player.Class.Current_Class.Value == "None" then
	Player.Class.Current_Class.Value = CLNAME
	CClass.Current.Value = CClass.Current.Value + 1
	for i = 1, #Tools do
    Tools[i]:Clone().Parent = Player.Backpack
end
Gui:Destroy()
end
end
end

return _C
