execute unless entity @p[distance=..6] run return 0

data modify storage ui current set from entity @s Items
execute on passengers run data modify storage ui previous set from entity @s data.previous
execute store result score .bool temp on passengers run data modify entity @s data.previous set from storage ui current

tp @s @n[type=item_display,tag=shop]

execute if score .bool temp matches 1 run function pctf:logic/shop/on_change