execute if score #samsung_money value matches 250.. if score #servers_tier value matches 1.. run tellraw @a [{"selector":"@s"},{text:" unlocked "},{"text":"Samsung Accounts","click_event":{"action":"show_dialog","dialog":"samsung:upgrades/devices/samsung_accounts"}},"!"]
execute if score #samsung_money value matches 250.. if score #servers_tier value matches 1.. run advancement grant @s only samsung:upgrades/unlock_samsung_accounts
function samsung:upgrades/errors/samsung_accounts
execute if score #samsung_money value matches 250.. if score #servers_tier value matches 1.. run scoreboard players set #samsung_accounts_unlocked value 1
execute if score #samsung_money value matches 250.. if score #servers_tier value matches 1.. run scoreboard players add #store_quality value 4
execute if score #samsung_money value matches 250.. if score #servers_tier value matches 1.. at @s run playsound entity.player.levelup ui @s ~ ~ ~
execute if score #samsung_money value matches 250.. if score #servers_tier value matches 1.. run scoreboard players remove #samsung_money value 250