Proper If/Else Statement?

I using the code below to fade a loop in and out, but I need an if/else statement so I can use one button. I can’t seem to get it right. Can someone please help?

Here’s what I’m using on the button:

on(release) {
turnSound(“off”);
turnSound(“on”);
}

Thanks!