execute if score #samsung_money value matches 500.. if score #samsung_accounts_unlocked value matches 1.. if score #one_ui_version value matches 7.. run tellraw @a [{"selector":"@s"},{text:" unlocked "},{"text":"Galaxy AI","click_event":{"action":"show_dialog","dialog":"samsung:upgrades/devices/galaxy_ai"}},"!"]
execute if score #samsung_money value matches 500.. if score #samsung_accounts_unlocked value matches 1.. if score #one_ui_version value matches 7.. run advancement grant @s only samsung:upgrades/unlock_galaxy_ai
function samsung:upgrades/errors/galaxy_ai
execute if score #samsung_money value matches 500.. if score #samsung_accounts_unlocked value matches 1.. if score #one_ui_version value matches 7.. run scoreboard players set #galaxy_ai_unlocked value 1
execute if score #samsung_money value matches 500.. if score #samsung_accounts_unlocked value matches 1.. if score #one_ui_version value matches 7.. run scoreboard players add #store_quality value 10
execute if score #samsung_money value matches 500.. if score #samsung_accounts_unlocked value matches 1.. if score #one_ui_version value matches 7.. at @s run playsound entity.player.levelup ui @s ~ ~ ~
execute if score #samsung_money value matches 500.. if score #samsung_accounts_unlocked value matches 1.. if score #one_ui_version value matches 7.. run scoreboard players remove #samsung_money value 500