scoreboard players add #one_ui_version value 1
execute store result score #function_price_add value run random value 10..30
scoreboard players add #store_quality value 3
execute if score #galaxy_ai_unlocked value matches 1.. run scoreboard players add #store_quality value 3
scoreboard players operation #samsung_functions value -= #functions_needed value
scoreboard players operation #functions_needed value += #function_price_add value
scoreboard players set #function_price_add value 0