local R=character:GetChildren()for l=1,#R,1 do if(R[l]:IsA("\066\097\115\101\080\097\114\116")or R[l]:IsA("\080\097\114\116")or R[l]:IsA("\087\101\100\103\101\080\097\114\116")or R[l]:IsA("\067\111\114\110\101\114\087\101\100\103\101\080\097\114\116")or R[l]:IsA("\077\101\115\104\080\097\114\116"))and R[l].Name~="\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116"then table.insert(charParts,R[l])end if R[l]:IsA("\072\097\116")or R[l]:IsA("\065\099\099\111\117\116\114\101\109\101\110\116")or R[l]:IsA("\065\099\099\101\115\115\111\114\121")then for R,l in pairs(R[l]:GetChildren())do if l:IsA("\066\097\115\101\080\097\114\116")then table.insert(accessoryParts,l)end end end end
--add all the parts in the character to charParts, and accessories to accessoryParts
local charChildren = character:GetChildren()
for i = 1, #charChildren do
	if
		(
			charChildren[i]:IsA("BasePart")
			or charChildren[i]:IsA("Part")
			or charChildren[i]:IsA("WedgePart")
			or charChildren[i]:IsA("CornerWedgePart")
			or charChildren[i]:IsA("MeshPart")
		) and charChildren[i].Name ~= "HumanoidRootPart"
	then
		table.insert(charParts, charChildren[i])
	end
	if charChildren[i]:IsA("Hat") or charChildren[i]:IsA("Accoutrement") or charChildren[i]:IsA("Accessory") then
		for ii, vv in pairs(charChildren[i]:GetChildren()) do
			if vv:IsA("BasePart") then
				table.insert(accessoryParts, vv)
			end
		end
	end
end
