Hmm wiz, the script you provided changes the volume based on distance to entity, I believe what is being sought after here is a way to change the actual piece of music being played,
Musicoverride= (file path to music file to play)
You can modify the musicvolume states in the script wizardous provided to get the fading in and out that you want, thats all controlled by the musicvolume=command and an etimer, getting the music to change on demand is easy.
Use the musicoverride=(filepath) to override the current background music and change it to a different piece, use the musicvolume= and a timer to create the fade in and out
Just remember fpsc handles one piece of background music only, and this as far as i know is the only audio source affected by musicvolume= (still havent found out how to change a sound's volume)
So once the piece has finished playing it will loop again until you select another piece, so say if the player is caught and you over ride the music, that piece will continue to play unless you set a condition and action to set it back, Ie playing a tense piece of music whenever the player is spotted, then in the command that checks to see if that player is no longer in view, a second music override will need to be in place to return the music back to its original state.
smoke em if you got em