Have you tried implementing this with events?
Requesting a script be upgraded to use in VX ace format.
RGSS3 Script RequestsOriginal thread: https://forums.rpgmakerweb.com/threads/requesting-a-script-be-upgraded-to-use-in-vx-ace-format.24305/