I have a auto-jump script too, never gonna use mine again cause this is way better!
Edit: Like the other guy said, it uses P_IsObjectOnGround(player.mo) instead of (player.mo.eflags & MFE_JUSTHITFLOOR), but I can change the code anyways but i recommend updating it to the better one.