Microphone toggle and HUD

Hi,

I just found on GitHub a useful Apple Script for muting the microphone in BTT, which also contains a variable that can be used to display a HUD notification. In short, it works, the microphone turns it off/on, the HUD also pops up, but the text is reversed. When the microphone is muted, it will write :loud_sound:Unmute and vice versa.

Don't know what's wrong? Of course, I can replace the texts with each other, but then the script will work differently than I would expect.

Thanks.


Script

set inputVolume to input volume of (get volume settings)
if inputVolume = 0 then
	set inputVolume to 80
	tell application "BetterTouchTool"
		set_string_variable "micState" to "🔊Unmute"
	end tell
else
	set inputVolume to 0
	tell application "BetterTouchTool"
		set_string_variable "micState" to "🔇MUTED"
	end tell
end if
set volume input volume inputVolume

tell application "BetterTouchTool"
	set_string_variable "micVolume" to inputVolume
end tell