
scoreboard players operation tmp times_appeared = spear times_appeared
scoreboard players operation tmp times_appeared -= min times_appeared
scoreboard players operation tmp times_appeared *= factor times_appeared
function rng:percentage
execute if score tmp times_appeared > out rng run kill @e[tag=3,tag=rand_item]
