Use arrows to turn parts of the cube (the ones further away turn more at once). Check the original 3x3x3 cube here: http://scratch.mit.edu/projects/41883578/ And our studio for Rubik's cubes here: http://scratch.mit.edu/studios/832048/
This is an ancient project of mine. Its design is kind of silly - all turns are hardcoded in a giant list. There are a million ways to do this "the right way" (use stamping and a single tile sprite, set up a 2D colour table for each side), but this is a testament to that very naïve way of working that still somehow got things done. For "the right way" (but, unfortunately, bad program readability), check out: https://scratch.mit.edu/projects/112346027/