Script can be found here:
alias musicL0 "play ui/gamestartup1.mp3; echo TF2 Main Theme; alias music musicL1"
alias musicL1 "play ui/gamestartup2.mp3; echo Playing With Danger; alias music musicL2"
alias musicL2 "play ui/gamestartup3.mp3; echo Rocket Jump Waltz; alias music musicL3"
alias musicL3 "play ui/gamestartup4.mp3; echo The Art Of War; alias music musicL4"
alias musicL4 "play ui/gamestartup5.mp3; echo Faster Than A Speeding Bullet; alias music musicL5"
alias musicL5 "play ui/gamestartup6.mp3; echo Petite Chou-Flour*; alias music musicL6"
alias musicL6 "play ui/gamestartup7.mp3; echo Right Behind You*; alias music musicL7"
alias musicL7 "play ui/gamestartup8.mp3; echo Intruder Alert; alias music musicL8"
alias musicL8 "play ui/gamestartup9.mp3; echo Drunken Pipe Bomb; alias music musicL9"
alias musicL9 "play ui/gamestartup10.mp3; echo More Gun; alias music musicL10"
alias musicL10 "play ui/gamestartup11.mp3; echo A Little Heart to Heart*; alias music musicL11"
alias musicL11 "play ui/gamestartup12.mp3; echo Medic!*; alias music musicL12"
alias musicL12 "play ui/gamestartup13.mp3; echo Archimedes*; alias music musicL13"
alias musicL13 "play ui/gamestartup14.mp3; echo Dreams of Cruelty*; alias music musicL14"
alias musicL14 "play ui/gamestartup15.mp3; echo The Calm*; alias music musicL15"
alias musicL15 "play ui/gamestartup16.mp3; echo Robots!*; alias music musicL16"
alias musicL16 "play ui/gamestartup17.mp3; echo Dapper Cadaver*; alias music musicL17"
alias musicL17 "play ui/gamestartup18.mp3; echo Rise of the Living Bread; alias music musicL18"
alias musicL18 "play ui/gamestartup19.mp3; echo Red Bread; alias music musicL19"
alias musicL19 "play ui/gamestartup20.mp3; echo Three Days to Live; alias music musicL20"
alias musicL20 "play ui/gamestartup21.mp3; echo Seduce Me!; alias music musicL21"
alias musicL21 "play ui/gamestartup22.mp3; echo Stink Lines; alias music musicL22"
alias musicL22 "play ui/gamestartup23.mp3; echo It Hates Me So Much; alias music musicL23"
alias musicL23 "play ui/gamestartup24.mp3; echo Soldier of Dance; alias music musicL24"
alias musicL24 "play ui/gamestartup25.mp3; echo RED Triumphs!; alias music musicL25"
alias musicL25 "play ui/gamestartup26.mp3; echo BLU Triumphs!; alias music musicL26"
alias musicL26 "play music/carousel_of_curses.wav; echo ; alias music musicL27"
alias musicL27 "play ui/holiday/gamestartup_halloween1.mp3; echo ; alias music musicL28"
alias musicL28 "play music/bump_in_the_night.wav; echo ; alias music musicL29"
alias musicL29 "play ui/holiday/gamestartup_halloween.mp3; echo ; alias music musicL0"
alias music musicL0
bind PGDN music
as well as in the Script Code Section
simply save file as music.cfg in your cfg folder
in your autoexec.cfg file add exec music
(if you don't have autoexec.cfg in your "Team Fortress 2\tf\cfg" folder then creating one yourself works to just make a blank text file and name it autoexec.cfg)
it uses PGDN key as the key that plays the music you can change that to any other key if you know the name of that key e.g. KP_5 is the 5 key on the numpad