Just have fun!
the code of the cube is from Another game of mine:Go Go Cube 3: https://scratch.mit.edu/projects/1044342616/ I juste add some thing to the code.