It is just like the real Rubik's Cube! r key = R -- If you don't know what those letters mean: r key + i key = R'; R = Right, L = Left, U = Up, D = Down, l key = L F = Front, B = Back. R means to turn the l key + i key = L'; right face clockwise, R'; means to turn it etc. counterclockwise, and R2 means to turn it twice in any direction. It's the same with all the other faces.
I did the code all by myself after failing one time. Credit to boaz4 for the background image. Also, the project works best in turbo mode (shift + green flag). If you click the first arrow on the bottom it will flip x, the second will flip y, and the third will flip z. Press the button on the top-left to toggle between 2x2x2 and 3x3x3. Please check out the improved version: https://scratch.mit.edu/projects/62673384/