scoreboard players set d_open b 0

execute if score plan_1 b matches 0 run function app/2/app_ng
execute if score plan_1 b matches 1 run function app/2/app_clear

execute if score plan_1 b matches 1 run scoreboard players set plan_1 b 2