execute store result score @s apothecary_potion_pick run random value 1..7

execute if score @s apothecary_potion_pick matches 1 run give @s splash_potion[potion_contents={custom_effects:[{id:"minecraft:regeneration",amplifier:3,duration:1200},{id:"minecraft:health_boost",amplifier:3,duration:2400},{id:"minecraft:saturation",amplifier:3,duration:400}]},custom_name='[{"bold":true,"color":"gold","italic":false,"text":"[LEGENDARY] "},{"bold":false,"color":"white","italic":false,"text":"Amrita"}]'] 1
execute if score @s apothecary_potion_pick matches 2 run give @s splash_potion[potion_contents={custom_effects:[{id:"minecraft:wither",amplifier:4,duration:288000},{id:"minecraft:poison",amplifier:4,duration:288000}]},custom_name='[{"bold":true,"color":"gold","italic":false,"text":"[LEGENDARY] "},{"bold":false,"color":"white","italic":false,"text":"Halahala"}]'] 1
execute if score @s apothecary_potion_pick matches 3 run give @s splash_potion[potion_contents={custom_effects:[{id:"minecraft:instant_damage",amplifier:4,duration:20}]},custom_name='[{"bold":true,"color":"gold","italic":false,"text":"[LEGENDARY] "},{"bold":false,"color":"white","italic":false,"text":"Potassium Cyanide"}]'] 1
execute if score @s apothecary_potion_pick matches 4 run give @s splash_potion[potion_contents={custom_effects:[{id:"minecraft:instant_health",amplifier:4,duration:20}]},custom_name='[{"bold":true,"color":"gold","italic":false,"text":"[LEGENDARY] "},{"bold":false,"color":"white","italic":false,"text":"Elixir of Life"}]'] 1
execute if score @s apothecary_potion_pick matches 5 run give @s splash_potion[potion_contents={custom_effects:[{id:"minecraft:slowness",amplifier:5,duration:1800}]},custom_name='[{"bold":true,"color":"gold","italic":false,"text":"[LEGENDARY] "},{"bold":false,"color":"white","italic":false,"text":"α-Bungarotoxin"}]'] 1
execute if score @s apothecary_potion_pick matches 6 run give @s splash_potion[potion_contents={custom_effects:[{id:"minecraft:dolphins_grace",amplifier:5,duration:3600},{id:"minecraft:fire_resistance",amplifier:5,duration:3600},{id:"minecraft:glowing",amplifier:5,duration:3600},{id:"minecraft:conduit_power",amplifier:5,duration:3600},{id:"minecraft:luck",amplifier:5,duration:3600},{id:"minecraft:saturation",amplifier:5,duration:3600},{id:"minecraft:speed",amplifier:5,duration:3600},{id:"minecraft:slow_falling",amplifier:5,duration:3600}]},custom_name='[{"bold":true,"color":"gold","italic":false,"text":"[LEGENDARY] "},{"bold":false,"color":"white","italic":false,"text":"Cloud 9"}]'] 1
execute if score @s apothecary_potion_pick matches 7 run give @s splash_potion[potion_contents={custom_effects:[{id:"minecraft:strength",amplifier:5,duration:600},{id:"minecraft:nausea",amplifier:5,duration:600},{id:"minecraft:poison",amplifier:5,duration:2400}]},custom_name='[{"bold":true,"color":"gold","italic":false,"text":"[LEGENDARY] "},{"bold":false,"color":"white","italic":false,"text":"Norse God\'s Ale"}]'] 1

title @s actionbar [{"text": "xxx ","obfuscated": true,"color": "#ffe920","bold": true},{"bold":true,"color":"gold","obfuscated": false,"italic":false,"text":"[LEGENDARY]"},{"text": " xxx","obfuscated": true,"color": "#ffe920","bold": true}]
playsound minecraft:block.beacon.activate player @a[distance=..20] ~ ~1 ~ 10 1
playsound minecraft:entity.ender_dragon.growl player @a[distance=..20] ~ ~1 ~ 10 1.5
playsound minecraft:ui.toast.challenge_complete player @a[distance=..20] ~ ~1 ~ 10 1
particle end_rod ~ ~1 ~ 0 0 0 0.8 75
particle totem_of_undying ~ ~1 ~ 0 0 0 0.8 75
particle enchant ~ ~1 ~ 3 3 3 0.8 500
particle flash ~ ~1 ~ 3 3 3 0.8 25

tag @s remove apothecary_rolling