IRremote for my 8x8x8 led cube on the mega

If you don't understand, ask. I will try to explain.

As first step for going further, you can try to stop and start the effect_rain when pressing buttons on the remote. (e.g. 1-> start and 2 -> stop). That should give you an understanding.

You will need to modify all your effects; take one at a time.

I think I mentioned state machine for the more complicated effects. When you get there, shout.