Make Game Pause When Text Box Is Shown

The title explains it all.
In my game foes appear on the over world as events
that move around. On the over world when you talk
to an NPC the enemy's still move.

I want the game to
pause when text appears then when the text goes away
the game and the enemy's unpause. Is there a script for this?
if there is please let me know.
I've translated my old script that might suits your need
PHP:
 SceneManager._scene._active = false;
@Jonforum but it's not MV
@Jonforum but it's not MV
Ho !! sorry
I've translated my old script that might suits your need
Thanks dude this is exactly what I was looking for.

Original thread: https://forums.rpgmakerweb.com/threads/make-game-pause-when-text-box-is-shown.91582/