You can use functions from code, but it’s very cumbersome, they’re not meant to be used from JS… after all if you know Javascript you can use Javascript functions which are more powerful
For the if/else you need an extra variable, check this out: [url]on/off Button for Background music]