# ==================================================
# void vb.button.toggle()
# ==================================================

scoreboard players set vb.button.toggle.__hasFunctionReturned__ tbms.var 0
scoreboard players add @s vb.button.switched 1
execute if score @s vb.button.switched matches 2.. run scoreboard players set @s vb.button.switched 0
scoreboard players operation vb.button.toggle._0._1 tbms.var = @s vb.button.switched
execute if score vb.button.toggle._0._1 tbms.var matches 0 run function vb/zzz_sl_block/289
execute if score vb.button.toggle._0._1 tbms.var matches 1 run function vb/zzz_sl_block/290
playsound toggle_on @a ~ ~ ~
