function survivalplus:tools/deatheffect
function survivalplus:tools/killtag
function survivalplus:tools/pot/killtimer
execute if entity @e[type=item,nbt={Item:{id:"minecraft:copper_ingot",components:{"minecraft:custom_data":{revive:tag}}}},distance=..2] unless dimension minecraft:the_end run function survivalplus:tools/trinkets/ankh
execute if entity @e[type=item,nbt={Item:{id:"minecraft:recovery_compass",components:{"minecraft:custom_data":{gravefinder:tag}}}},distance=..2] run function survivalplus:tools/trinkets/gravefinder
execute if entity @e[type=item,nbt={Item:{id:"minecraft:gunpowder",components:{"minecraft:custom_data":{boom:tag}}}},distance=..2] run function survivalplus:tools/trinkets/kamikaze
execute if entity @e[type=item,nbt={Item:{id:"minecraft:raw_iron",components:{"minecraft:custom_data":{itemguard:tag}}}},distance=..2] as @e[type=item,nbt={Item:{id:"minecraft:raw_iron",components:{"minecraft:custom_data":{itemguard:tag}}}},distance=..2] run function survivalplus:tools/trinkets/itemguard
execute if entity @e[type=item,nbt={Item:{components:{"minecraft:custom_data":{corpserun:tag}}}},distance=..2] run tag @s add corpserun
execute if score bookstats hardmode matches 8 run function survivalplus:tools/trinkets/itemguard
execute as @e[type=item,nbt={Item:{components:{"minecraft:custom_data":{itemguardme:tag}}}},distance=..2] run function survivalplus:tools/trinkets/itemguardsolo
execute if score bookstats hardmode matches 10 run tag @s add corpserun
execute if entity @s[tag=cursehelm] run tag @s add keepitem
execute if entity @s[tag=1uptotem] run tag @s add keepitem
execute if entity @s[predicate=survivalplus:adventuremode,gamemode=adventure] run tag @s add deathgamemodefix
execute if score bookstats hardmode matches 2 run tag @s add 40healthfull
execute at @e[tag=converttitan] if block ~ ~-8 ~ warped_wart_block positioned ~-1.5 ~-.5 ~-1.5 if entity @s[dz=2,dx=2] run function survivalplus:giant_deal/convert/removecurse
scoreboard players set @s sanity 20
scoreboard players reset @s Insomnia
scoreboard players reset @s stunned
execute if score @s TotalDeaths matches 906 run function survivalplus:tools/906deaths
execute if score @s Deaths matches 906 run function survivalplus:tools/906deaths
tellraw @s [{"text":"You have died "},{"score":{"name":"@s","objective":"Deaths"},"color":"yellow"},{"text":" times"}]
execute as @s[scores={death=1..}] run scoreboard players reset @s death