Pretty sure the issues are in this section of the code:
class PokemonPauseMenu
def pbStartPokemonMenu
if !$player
if $DEBUG
pbMessage(_INTL("The player trainer was not defined, so the pause menu can't be displayed."))
pbMessage(_INTL("Please see the...
Not sure what the procedure for this is, but I made a version of this with the PBS and spritenames formatted for v20:
https://mega.nz/file/cYUg1bxL#I5lYgpLLPBF_1wDWlMfGIUlt5f6A31q1OeGlTS2Quzk
Hope it helps!