#execute if entity @s[nbt={Inventory:[{components:{"minecraft:custom_data":{takechallenge:tag}}}]}] run function survivalplus:giant_deal/takechallenge
#clear @s wither_skeleton_skull[custom_data={takechallenge:tag}]
execute if entity @s[nbt={Inventory:[{components:{"minecraft:custom_data":{takebook:tag}}}]}] run scoreboard players enable @s[tag=titans_gambit] titanmenu
execute if entity @s[nbt={Inventory:[{components:{"minecraft:custom_data":{taketool:tag}}}]}] run scoreboard players enable @s[tag=titans_gambit] titanmenu2
execute if entity @e[tag=deal2] at @s run playsound minecraft:block.respawn_anchor.set_spawn player @a ~ ~1 ~ 1 .8
execute if entity @e[tag=deal2] at @s run particle flash{color:[1,0,0,0]} ~ ~1.5 ~
kill @e[tag=devil_deal]
advancement revoke @s only survivalplus:tools/titan/takedeal