$execute unless score #VB vb.settings.$(setting) matches 0..1 run scoreboard players set #VB vb.settings.$(setting) 0

scoreboard players set #VB vb.dummy1 1

$scoreboard players operation #VB vb.dummy1 -= #VB vb.settings.$(setting)
$scoreboard players operation #VB vb.settings.$(setting) = #VB vb.dummy1

function vb:settings/open