local function G(E,x)if E:IsA("\066\097\115\101\080\097\114\116")then E.Touched:Connect(x)else for E,S in ipairs(E:GetChildren())do G(S,x)end end end

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
