Using one button to turn music on/off

Is it possible to have one button the toggle my ‘my_sound.setVolume();’ between 0 and 100.

I’m having a hard time getting the as correct, but here is my idea:

music_but = "on"
if music_but == "on" {
music_but.onPress = function(){
music_but = "off";
else if (music_but == "off"){
music_but.onPress = function(){
music_but = "on";

Can anyone help me format this correctly? Thanks!