scoreboard players set r Random 5
function mctsts:util/random
tellraw @a ["",{"text":" |   ","color":"gray"},{"translate":"game.collect_powerup","color":"gray","with":[{"selector":"@s"},{"translate":"powerup.tier.6","color":"black","bold":true}]}]
execute if score n Random matches 1 run function mctsts:game/items/extra_life2
execute if score n Random matches 2 run give @s minecraft:beetroot_seeds{HideFlags:63,Unbreakable:1,display:{Name:'[{"translate":"powerup.9.name","color":"white","bold":true,"italic":false}]'},powerup:9} 3
execute if score n Random matches 3 run give @s minecraft:netherite_sword{Damage:2011,Enchantments:[{id:"fire_aspect",lvl:1}],HideFlags:63,display:{Name:'[{"translate":"powerup.16.name","color":"white","bold":true,"italic":false}," - ",{"translate":"powerup.lvl","with":["III"]}]'},powerup:16}
execute if score n Random matches 4 run give @s iron_sword{Enchantments:[{id:"knockback",lvl:10}],HideFlags:63,display:{Name:'[{"translate":"powerup.1.name","color":"white","bold":true,"italic":false}," - ",{"translate":"powerup.lvl","with":["VI"]}]'},Damage:230,powerup:1}
execute if score n Random matches 5 run give @s snowball{Unbreakable:1,HideFlags:63,display:{Name:'[{"translate":"powerup.3.name","color":"white","bold":true,"italic":false}]'},powerup:3} 16
scoreboard players set n Random 0
execute at @s run playsound minecraft:ui.toast.challenge_complete player @a ~ ~ ~ 1 1