Mute / Unmute Widget

Ah, I managed to achieve what I wanted in the Mute widget → Volume slider direction using code from here. However, I still cannot get the slider to execute my AppleScript (or any AppleScript) in order to update the Mute widget.