pointer = script.Parent

function rotateMod(mod, center, rotation)
	local parts = {}
	local function scan(parent)
		for _, obj in pairs(parent:GetChildren()) do
			if (obj:IsA("BasePart")) then
				table.insert(parts, obj)
			end
			scan(obj)
		end
	end

	scan(mod)
	for _, part in pairs(parts) do
		part.CFrame = (center * rotation * (center:inverse() * part.CFrame))
	end
end

while true do

	local mod = pointer
	local step = 1
	for i = 0, 10, step do

		local randomizer = math.random(1, 3)
		local choice = 1
		if randomizer == 1 then
			choice = 0.1
		else
			choice = -0.1
		end

		rotateMod(mod, mod:GetModelCFrame(), CFrame.Angles(0, choice, 0))
		wait()
	end
end

