execute if entity @s[tag=gravefinder] run function survivalplus:tools/trinkets/gravefound
execute if entity @s[tag=cursehelm] run item replace entity @s armor.head with wither_skeleton_skull[custom_data={losesanity:tag,cursed:tag,cursehelm:tag,del:tag},item_name={"text":"Sentient Helmet","italic":false,"color":"red"},lore=[{"text":"Cursed","italic":false,"color":"red"},{"text":"Curse of Possesion","italic":false,"color":"red"},{"text":"Curse of Insanity","italic":false,"color":"red"},{"text":"Spiritual Visions","italic":false,"color":"light_purple"},{"text":"It thanks you for your cooperation","color":"gray"}],enchantments={binding_curse:1,blast_protection:2,projectile_protection:1,protection:2},attribute_modifiers=[{type:"armor",amount:3,slot:head,operation:add_value,id:"-124112852544623579-1050892"},{type:"armor_toughness",amount:2,slot:head,operation:add_value,id:"-124112852574623579-1051492"},{type:"attack_damage",amount:.5,slot:head,operation:add_multiplied_base,id:"-124112852604623579-1052092"},{type:"attack_speed",amount:.25,slot:head,operation:add_multiplied_base,id:"-124112852634623579-1052692"},{type:"max_health",amount:.4,slot:head,operation:add_multiplied_base,id:"-124112852664623579-1053292"}],unbreakable={},tooltip_display={hidden_components:[enchantments,unbreakable]}]
execute if entity @s[tag=corpserun] run function survivalplus:tools/corpserun
execute if entity @s[tag=1uptotem] run loot replace entity @s weapon.offhand loot survivalplus:ngtools/1uptotem
tag @s remove 1uptotem
tag @s remove keepitem
tag @s remove corpserun
advancement revoke @s only survivalplus:tools/tick/keepitem