create mic mute button

Hi everyone.
I'm new to macOS and BetterTouchTools. I wanted to create a touch bar button so I could mute/unmute my mic when pressing It. I was searching and found this: https://www.reddit.com/r/apple/comments/7ko4a6/useful_macros_for_the_touch_bar_using_btt/
I wanted to modify the code presented for the action but I don't know-how. I wanted to change it so that when the mic status changes.
Thanks all.

Should point out that most of the apps out there that use the mic have a hotkey for muting the mic (Zoom, Google Meet, Teams, Slack, Discord, etc.. I don't know FaceTime as I never use that) So you could just create a trigger in BTT that runs an AppleScript to check the name of the active window, and if it matches a certain application send the appropriate keyboard short to mute the mic..

I wanted to change it so that when the mic status changes.

You want the icon to change when the mic is muted vs not mute? Is that what you are asking?