EDIT: Solved. Found out that the script already does this.
Script Add-On
RGSS3 Script RequestsThis thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/script-add-on.19051/