-- n0opimdumb3 says hi

local function createJointData(attach0, attach1, limits)
	assert(attach0)
	assert(attach1)
	assert(limits)
	assert(limits.UpperAngle >= 0)
	assert(limits.TwistLowerAngle <= limits.TwistUpperAngle)

	return {
		attachment0 = attach0,
		attachment1 = attach1,
		limits = limits
	}
end

local function find(model)
	return function(first, second, limits)
		local part0 = model:FindFirstChild(first[1])
		local part1 = model:FindFirstChild(second[1])
		if part0 and part1 then
			local attach0 = part0:FindFirstChild(first[2])
			local attach1 = part1:FindFirstChild(second[2])
			if attach0 and attach1 and attach0:IsA("Attachment") and attach1:IsA("Attachment") then
				return createJointData(attach0, attach1, limits)
			end
		end
	end
end

function RigTypes.getNoCollisions(model, rigType)
	if rigType == Enum.HumanoidRigType.R6 then
		return RigTypes.getR6NoCollisions(model)
	elseif rigType == Enum.HumanoidRigType.R15 then
		return RigTypes.getR15NoCollisions(model)
	else
		return {}
	end
end
