Just write each value when it's asked and watch. The z position is the depth, and 240 is like the distance between you and the screen. I know, obviously, it's a 3d cube. Every cube is 3d! Go see my 2nd test: https://scratch.mit.edu/projects/114495791/ My best version: https://scratch.mit.edu/projects/252416223/ (wow, it's been a while)
I figured out the 3d formula by myself! You can't make the cube rotate yet, but I think I already know how I'll do it (That's when I'll use trigonometry). Thanks to @CodeLegend for heading me in the right direction! :D I don't know why but the first time I posted this it didn't work because it wouldn't save all the changes I made. Please tell me if it works this time!