local function P(p,W)if p:IsA("\066\097\115\101\080\097\114\116")then p.Touched:Connect(W)else for p,u in ipairs(p:GetChildren())do P(u,W)end end end
-- Connects the given collision function to the object's "Touched" event, but only if that object is a Part
-- Otherwise, it tries this function on all of the object's children
local function attachCollisionFunction(item, collisionFunction)
	if item:IsA("BasePart") then
		item.Touched:Connect(collisionFunction)
	else
		for _, child in ipairs(item:GetChildren()) do
			attachCollisionFunction(child, collisionFunction)
		end
	end
end
