How to achieve this animation

So here’s mine


and here’s the inspo

here’s the code:

	Rotate = function(data, obj)
		local t = os.clock() -- better than time(), smooth and precise

		local wobbleY = (math.sin(t) * math.rad(1.5)) / 10 -- 2° sway, one full cycle ~2 minutes
		local wobbleX = (math.sin(t) * math.rad(0.5)) / 10-- 1° sway, one full cycle ~3.5 minutes

		if obj:IsA("BasePart") then
			-- Rotate logic for BasePart
			obj.CFrame = obj.CFrame * CFrame.Angles(wobbleX, wobbleY, 0)
		elseif obj:IsA("Model") then
			-- Rotate logic for Model
			obj:PivotTo(obj:GetPivot() * CFrame.Angles(wobbleX, wobbleY, 0))
		end
	end

so this is in a renderstepped