scoreboard objectives add TutorialStage dummy
scoreboard players add .current TutorialStage 0
execute if score .current TutorialStage matches 4 unless entity @p[hasitem={item=ldz:gem_vanilla,quantity=4..}] run tp @e[type=item,r=30] ~ ~2 ~
execute if score .current TutorialStage matches 5.. unless entity @p[hasitem={item=ldz:morph_vanilla}] run tp @e[type=item,r=30] ~ ~2 ~
execute as @e[type=item] at @s if block ~ ~-1 ~ lava run event entity @s add_fire_immune
execute as @e[type=item] at @s if block ~ ~ ~ lava run event entity @s add_fire_immune
execute as @e[type=item] at @s if block ~ ~-1 ~ lava at @p run tp ~ ~2 ~
execute as @e[type=item] at @s if block ~ ~ ~ lava at @p run tp ~ ~2 ~