scoreboard players set r Random 6
function mctsts:util/random
execute if score n Random matches 1 run function mctsts:game/powerup/6
execute if score n Random matches 2.. run tellraw @a ["",{"text":" |   ","color":"gray"},{"translate":"game.collect_powerup","color":"gray","with":[{"selector":"@s"},{"translate":"powerup.tier.5","color":"gold","bold":true}]}]
execute if score n Random matches 2 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":["V"]}]'},Damage:250,powerup:1}
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}," x15"]'},feather:15,powerup:8}
execute if score n Random matches 4 run give @s minecraft:beetroot_seeds{HideFlags:63,Unbreakable:1,display:{Name:'[{"translate":"powerup.9.name","color":"white","bold":true,"italic":false}]'},powerup:9}
execute if score n Random matches 5 run give @s minecraft:netherite_sword{Damage:2026,Enchantments:[{id:"fire_aspect",lvl:1}],HideFlags:63,display:{Name:'[{"translate":"powerup.16.name","color":"white","bold":true,"italic":false}," - ",{"translate":"powerup.lvl","with":["II"]}]'},powerup:16}
execute if score n Random matches 6 run give @s minecraft:netherite_chestplate{Damage:582,HideFlags:63,display:{Name:'[{"translate":"powerup.17.name","color":"white","bold":true,"italic":false}," - ",{"translate":"powerup.lvl","with":["III"]}]'},AttributeModifiers:[{AttributeName:"generic.knockback_resistance",Name:"generic.knockback_resistance",Amount:1000,Operation:0,UUID:[I;1691954058,-2022881330,-1458623820,-668990075]}],powerup:17}
scoreboard players set n Random 0
