loot spawn ~ ~ ~ loot next_level:custom_blocks/enchant_roll
execute store result score @s nl.Rng at @s run data get entity @e[type=minecraft:item,distance=..1,limit=1,nbt={Item:{tag:{nl_roll100:1b}}}] Item.tag.AttributeModifiers.[0].Amount
kill @e[limit=1,nbt={Item:{tag:{nl_roll100:1b}}}]

execute as @s[scores={nl.Rng=..10}] if entity @e[type=minecraft:player,sort=nearest,scores={nl.DetectDamage=1..},nbt={SelectedItem:{tag:{nl_Enchant_BleedLvl:1b}}}] run scoreboard players add @s nl.DMG.Bleed 100
execute as @s[scores={nl.Rng=..20}] if entity @e[type=minecraft:player,sort=nearest,scores={nl.DetectDamage=1..},nbt={SelectedItem:{tag:{nl_Enchant_BleedLvl:2b}}}] run scoreboard players add @s nl.DMG.Bleed 100
execute as @s[scores={nl.Rng=..30}] if entity @e[type=minecraft:player,sort=nearest,scores={nl.DetectDamage=1..},nbt={SelectedItem:{tag:{nl_Enchant_BleedLvl:3b}}}] run scoreboard players add @s nl.DMG.Bleed 100
execute as @s[scores={nl.Rng=..40}] if entity @e[type=minecraft:player,sort=nearest,scores={nl.DetectDamage=1..},nbt={SelectedItem:{tag:{nl_Enchant_BleedLvl:4b}}}] run scoreboard players add @s nl.DMG.Bleed 100
execute as @s[scores={nl.Rng=..50}] if entity @e[type=minecraft:player,sort=nearest,scores={nl.DetectDamage=1..},nbt={SelectedItem:{tag:{nl_Enchant_BleedLvl:5b}}}] run scoreboard players add @s nl.DMG.Bleed 100
