scoreboard players set r Random 6
function mctsts:util/random
execute if score n Random matches 1 run give @s diamond_sword{Enchantments:[{id:"knockback",lvl:1}],HideFlags:63,display:{Name:'[{"translate":"powerup.1.name","color":"white","bold":true,"italic":false}," - ",{"translate":"powerup.lvl","with":["I"]}]'},Damage:1561,powerup:1}
execute if score n Random matches 2 run give @s egg{Unbreakable:1,HideFlags:63,display:{Name:'[{"translate":"powerup.2.name","color":"white","bold":true,"italic":false}]'},powerup:2} 3
execute if score n Random matches 3 run give @s minecraft:carrot_on_a_stick{Damage:6,HideFlags:63,Unbreakable:1,display:{Name:'[{"translate":"powerup.8.name","color":"white","bold":true,"italic":false}," x1"]'},feather:1,powerup:8}
execute if score n Random matches 4 run give @s minecraft:carrot_on_a_stick{Damage:4,Unbreakable:1,HideFlags:63,display:{Name:'[{"translate":"powerup.6.name","color":"white","bold":true,"italic":false}]'},powerup:6}
execute if score n Random matches 5 run give @s minecraft:lingering_potion{Potion:"slow_falling",display:{Name:'[{"translate":"powerup.15.name","color":"white","bold":true,"italic":false}]'},powerup:15}
execute if score n Random matches 6 run give @s minecraft:lingering_potion{Potion:"strong_slowness",display:{Name:'[{"translate":"powerup.15.name","color":"white","bold":true,"italic":false}]'},powerup:15}
scoreboard players set n Random 0
tellraw @a ["",{"text":" |   ","color":"gray"},{"translate":"game.collect_powerup","color":"gray","with":[{"selector":"@s"},{"translate":"powerup.tier.1","color":"gray","bold":true}]}]