Use WASD, arrow keys and Z and X. I looked at fyromaniac1's 3D cube project that Z-demensions helped with to figure out the custom block math code. I modified it and added velocity.
Credit to @Eriquito360 Uses 3D layering I used this wikipedia page: https://en.wikipedia.org/wiki/Bubble_sort