I fixed up some of the code and added comments explaining some of the math or random blocks in the project. I hope you can understand it @Fire_Man95 and other viewers.
I made a game like this after I saw @Fire_Man95 's concept so here is an "ad" https://scratch.mit.edu/projects/905299381/ People are gonna hate me for this