I added wall collision and fixed the scrolling (the main issue with the ground was that the scrollO variable was for all sprites), but I was unable to add proper gravity or fix the jump animation. This code is very foreign to me.
Creds to @b1048546 Replaced Hitbox's "X Velocity" variable with "X"