How to change game over screen music in game?

So i chose the default music that will be player in game over screen in settings, but i also want it to change after certain condition in the game is reached, and play different song instead. So far could not find a way to change it via event, is it possible?
I think you would need a JS plugin or script to change the gameover music after a certain point in the game is reached.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-change-game-over-screen-music-in-game.97785/