Boss music

Im trying to make a datapack that adds boss music to the enderdragon fight without using boss.ogg. i need the datappack to do these 2 things: constantly run this command, but only while in the end execute unless entity @e[type= minecraft:ender_dragon] run stopsound @a master minecraft:entity.silverfish.step and when enetering the end or when the dragon re-spawns, play minecraft:entity.silverfish.step once and only if you are in the end and there is an enderdragon

Continue to help post