I’m not sure what you mean by “costum codes”
What are you having problems with?
I did an animation on a rubic’s cube a little while ago: https://youtu.be/bgcScY7CiMs
I didn’t do any rigging.
The key here was changing the rotation mode to quaternion - otherwise the animation didn’t look quite right.
doing an animation like that is very restricting, you cant rotate where ever you want,as you can easily get gimbal locked.
also, if you want to do a lot of animations, its a lot more practical to have it rigged, so you dont have to spend so long every time you wanna make a selection.