execute unless score @s pay matches 500.. run return run function ws:store/bar/fail
scoreboard players remove @s pay 500
title @s title {"translate":"luxury.buysuccess","color":"green"}
give @s potion[minecraft:custom_name='[{"translate":"bar.rum","italic":false}]',potion_contents={custom_effects:[{id:"minecraft:absorption",duration:600,amplifier:4},{id:"minecraft:blindness",duration:300},{id:"minecraft:fire_resistance",duration:600},{id:"minecraft:glowing",duration:300},{id:"minecraft:haste",duration:600,amplifier:4},{id:"minecraft:health_boost",duration:600,amplifier:4},{id:"minecraft:hunger",duration:300,amplifier:2},{id:"minecraft:instant_damage",duration:20},{id:"minecraft:luck",duration:2400},{id:"minecraft:nausea",duration:600,amplifier:4},{id:"minecraft:night_vision",duration:2400},{id:"minecraft:regeneration",duration:300},{id:"minecraft:resistance",duration:100,amplifier:2},{id:"minecraft:speed",duration:300,amplifier:9}]},minecraft:custom_model_data=1009,minecraft:custom_data={bardrink:1}]
execute at @s run playsound minecraft:block.brewing_stand.brew player @s ~ ~ ~ 0.5 1
scoreboard players add @a[tag=bar] pay 250
tellraw @a[tag=bar] [{"translate":"business.bonus"},{"text":": "},{"text":"250$"},{"text":" ("},{"translate":"bar.name"},{"text":")"}]
execute as @a[tag=bar] at @s run playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 0.05 0