scoreboard players operation % rng = @p luck
scoreboard players set #tmp rng 3
scoreboard players operation % rng /= #tmp rng
scoreboard players add % rng 40
execute if score % rng matches 101.. run scoreboard players set % rng 100
execute if predicate rng:percentage_check as @e[tag=hitted] at @s run function items:weapon/unstable_sword/prime
