data modify entity @s Item.tag.nl_Has_Slot1_Enchantment set value 1b
# scan #
execute as @s[scores={nl.Rng=1..20}] run function next_level:custom_blocks/emerald_enchanter/enchant_slot1/custom_enchantments/scan
# Infect #
execute as @s[scores={nl.Rng=21..40}] run function next_level:custom_blocks/emerald_enchanter/enchant_slot1/custom_enchantments/infect
# Bleed #
execute as @s[scores={nl.Rng=41..60}] run function next_level:custom_blocks/emerald_enchanter/enchant_slot1/custom_enchantments/bleed
# Soul Burst #
execute as @s[scores={nl.Rng=61..80}] run function next_level:custom_blocks/emerald_enchanter/enchant_slot1/custom_enchantments/soul_slice
# Leech Life #
execute as @s[scores={nl.Rng=81..100}] run function next_level:custom_blocks/emerald_enchanter/enchant_slot1/custom_enchantments/leech_life

execute as @e[tag=nl_Enchanter,limit=1,sort=nearest,distance=..7] at @s run function next_level:custom_blocks/emerald_enchanter/remove_emerald
execute at @s run playsound minecraft:entity.experience_orb.pickup voice @a[distance=..10] ~ ~ ~ 1 1
execute at @s run xp add @p[level=10..] -10 levels 



