execute as @a if items entity @s player.cursor *[custom_data~{ui_item:{}}] at @s run function pctf:logic/shop/on_click

kill @e[type=item,nbt={Item:{components:{"minecraft:custom_data":{ui_item:{}}}}}]

function pctf:logic/shop/mask with storage pctf:shop item
execute if score .apocalypse settings matches 1 run function pctf:logic/shop/mask_apocalypse with storage pctf:shop item
execute if score .wizard_battle settings matches 1 run function pctf:logic/shop/mask_wizard_battle with storage pctf:shop item
execute if score .apocalypse settings matches 1 if score .wizard_battle settings matches 1 run function pctf:logic/shop/mask_apocalypse_wizard with storage pctf:shop item