# base = 65%   luck(100%) = 25%   -> max drop = 90
function rng:percentage
scoreboard players operation #tmp rng = @s luck
scoreboard players set #tmp1 rng 4
scoreboard players operation #tmp rng /= #tmp1 rng
scoreboard players operation out rng -= #tmp rng
execute if score out rng matches ..65 run function items:passive/crystal_generator/generate
