How can I make a tank that moves in all directions?

Hi, I’m trying to make the player character 2 cubes on top of each other in a top down shooter. The one on top should face the cursor, whilst the one below should rotate towards the direction it’s moving. I have managed to do each of these individually but cannot figure out how to merge them because they have different scripts.The player controls both cubes at the same time, kind of like a tank, except it can move in any direction.

Any help is greatly appreciated.

I couldn’t think of a better way of phrasing that question…