Nothing was wrong with the code, it was just with the sprites. Changed things---------------------------------------------------- Made the sprites more centered on the mouse. Made the X change color Shape button hitbox is larger and that's it.
Credit to the original creator, @lucas3073