Don't run scripts when in pause menu (Fixes #1495)