scoreboard players set .duration dialog 0
execute unless score .spacebar dialog matches 1.. run scoreboard players set .spacebar dialog 5
execute if score .number dialog >= .number_max dialog run return run function main:dialog/end
execute as @a run function main:dialog/id/pick with storage dialog