Watch. If you want to see the cube rotate then click the see inside button. Make the tx (transition x) ty (transition y) and tz (transition z) all sliders. Then go to the top and you should see the go to x and y at the top. Then remove the custom blocks (DON' T DELETE THEM!!) (just put them somewhere else) and put the script under the Go to X Y Z script. If you change the slider values and look at the cube, it should seem 3D and look cool. Continue moving the slider values and have fun!!! Happy Scratching!!
Credit to @MathMathMath for his tutorial. This is all straight out of his tutorials.