clear @s paper[custom_data={del:tag}] 1
#execute if data entity @s {Inventory:[{id:"minecraft:paper",components:{"minecraft:custom_data":{temphpup:"tag"}}}]}
#execute if data entity @s {Inventory:[{id:"minecraft:paper",components:{"minecraft:custom_data":{tempdmgup:"tag"}}}]}
#execute if data entity @s {Inventory:[{id:"minecraft:paper",components:{"minecraft:custom_data":{tempignorehunger:"tag"}}}]}
advancement revoke @s only survivalplus:tools/delpaper
execute if data entity @s {Inventory:[{id:"minecraft:paper",components:{"minecraft:custom_data":{del:tag}}}]} run advancement grant @s only survivalplus:tools/delpaper