Changing title screen image and music mid game

I'm making it so that if you get the bad ending in my game that the title screen image and music change to be sorrowful, and if you get the good ending, a more upbeat image as well as music. How would I go about this?
This script will allow you to change the title screen at any point where you activate a particular switch. Add one to the variable to give you your good ending, add two to give you your bad ending.  For the title music, Rachael also had a dynamic title music script, but I don't have a link for that.  A quick search should turn it up for you.
Thanks a ton!

Original thread: https://forums.rpgmakerweb.com/threads/changing-title-screen-image-and-music-mid-game.44553/