scoreboard players set min times_appeared 0

execute if score #freeze shop matches 1 if score min times_appeared matches -1 run scoreboard players operation min times_appeared = freeze times_appeared
execute if score #freeze shop matches 1 if score freeze times_appeared < min times_appeared run scoreboard players operation min times_appeared = freeze times_appeared

execute if score #dash shop matches 1 if score min times_appeared matches -1 run scoreboard players operation min times_appeared = dash times_appeared
execute if score #dash shop matches 1 if score dash times_appeared < min times_appeared run scoreboard players operation min times_appeared = dash times_appeared

execute if score #molotov_fire shop matches 1 if score min times_appeared matches -1 run scoreboard players operation min times_appeared = molotov_fire times_appeared
execute if score #molotov_fire shop matches 1 if score molotov_fire times_appeared < min times_appeared run scoreboard players operation min times_appeared = molotov_fire times_appeared

execute if score #earth_shield shop matches 1 if score min times_appeared matches -1 run scoreboard players operation min times_appeared = earth_shield times_appeared
execute if score #earth_shield shop matches 1 if score earth_shield times_appeared < min times_appeared run scoreboard players operation min times_appeared = earth_shield times_appeared

execute if score #weakening shop matches 1 if score min times_appeared matches -1 run scoreboard players operation min times_appeared = weakening times_appeared
execute if score #weakening shop matches 1 if score weakening times_appeared < min times_appeared run scoreboard players operation min times_appeared = weakening times_appeared

execute if score #zaper shop matches 1 if score min times_appeared matches -1 run scoreboard players operation min times_appeared = zaper times_appeared
execute if score #zaper shop matches 1 if score zaper times_appeared < min times_appeared run scoreboard players operation min times_appeared = zaper times_appeared
execute if score min times_appeared matches -1 run scoreboard players set min times_appeared 0