advancement revoke @s only kiwi2:limitbreak_interaction_reward_chest_chance_upgrade

execute if score reward_chest_chance world_upgrades matches 5 run title @s actionbar {"bold":true,"color":"red","italic":false,"text":"Upgrade has been maxed!"}
execute if score reward_chest_chance world_upgrades matches 5 run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 2 0

execute if score reward_chest_chance world_upgrades matches 4 if score @s Credits matches ..59 run title @s actionbar [{"bold":true,"color":"red","italic":false,"text":"Not enough "},{"text": "⌬ Credits","color":"#76BDF8"}]
execute if score reward_chest_chance world_upgrades matches 4 if score @s Credits matches ..59 run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 2 0
execute if score reward_chest_chance world_upgrades matches 4 if score @s Credits matches 60.. run title @s actionbar {"bold":true,"color":"yellow","italic":false,"text":"Reward Chest Chance - V"}
execute if score reward_chest_chance world_upgrades matches 4 if score @s Credits matches 60.. run tellraw @s {"color":"white","italic":false,"text":"Reward chest chance 36% → 40%"}
execute if score reward_chest_chance world_upgrades matches 4 if score @s Credits matches 60.. run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 2 1
execute if score reward_chest_chance world_upgrades matches 4 if score @s Credits matches 60.. run particle end_rod ~ ~1 ~ 0.3 0.5 0.3 0.1 15
execute if score reward_chest_chance world_upgrades matches 4 if score @s Credits matches 60.. run schedule function kiwi2:upgrades/world_upgrades/reward_chest_chance/reward_chest_chance_upgrade_5 1t
execute if score reward_chest_chance world_upgrades matches 4 if score @s Credits matches 60.. run scoreboard players remove @s Credits 60

execute if score reward_chest_chance world_upgrades matches 3 if score @s Credits matches ..39 run title @s actionbar [{"bold":true,"color":"red","italic":false,"text":"Not enough "},{"text": "⌬ Credits","color":"#76BDF8"}]
execute if score reward_chest_chance world_upgrades matches 3 if score @s Credits matches ..39 run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 2 0
execute if score reward_chest_chance world_upgrades matches 3 if score @s Credits matches 40.. run title @s actionbar {"bold":true,"color":"yellow","italic":false,"text":"Reward Chest Chance - IV"}
execute if score reward_chest_chance world_upgrades matches 3 if score @s Credits matches 40.. run tellraw @s {"color":"white","italic":false,"text":"Reward chest chance 32% → 36%"}
execute if score reward_chest_chance world_upgrades matches 3 if score @s Credits matches 40.. run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 2 1
execute if score reward_chest_chance world_upgrades matches 3 if score @s Credits matches 40.. run particle end_rod ~ ~1 ~ 0.3 0.5 0.3 0.1 15
execute if score reward_chest_chance world_upgrades matches 3 if score @s Credits matches 40.. run schedule function kiwi2:upgrades/world_upgrades/reward_chest_chance/reward_chest_chance_upgrade_4 1t
execute if score reward_chest_chance world_upgrades matches 3 if score @s Credits matches 40.. run scoreboard players remove @s Credits 40

execute if score reward_chest_chance world_upgrades matches 2 if score @s Credits matches ..24 run title @s actionbar [{"bold":true,"color":"red","italic":false,"text":"Not enough "},{"text": "⌬ Credits","color":"#76BDF8"}]
execute if score reward_chest_chance world_upgrades matches 2 if score @s Credits matches ..24 run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 2 0
execute if score reward_chest_chance world_upgrades matches 2 if score @s Credits matches 25.. run title @s actionbar {"bold":true,"color":"yellow","italic":false,"text":"Reward Chest Chance - III"}
execute if score reward_chest_chance world_upgrades matches 2 if score @s Credits matches 25.. run tellraw @s {"color":"white","italic":false,"text":"Reward chest chance 28% → 32%"}
execute if score reward_chest_chance world_upgrades matches 2 if score @s Credits matches 25.. run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 2 1
execute if score reward_chest_chance world_upgrades matches 2 if score @s Credits matches 25.. run particle end_rod ~ ~1 ~ 0.3 0.5 0.3 0.1 15
execute if score reward_chest_chance world_upgrades matches 2 if score @s Credits matches 25.. run schedule function kiwi2:upgrades/world_upgrades/reward_chest_chance/reward_chest_chance_upgrade_3 1t
execute if score reward_chest_chance world_upgrades matches 2 if score @s Credits matches 25.. run scoreboard players remove @s Credits 25

execute if score reward_chest_chance world_upgrades matches 1 if score @s Credits matches ..14 run title @s actionbar [{"bold":true,"color":"red","italic":false,"text":"Not enough "},{"text": "⌬ Credits","color":"#76BDF8"}]
execute if score reward_chest_chance world_upgrades matches 1 if score @s Credits matches ..14 run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 2 0
execute if score reward_chest_chance world_upgrades matches 1 if score @s Credits matches 15.. run title @s actionbar {"bold":true,"color":"yellow","italic":false,"text":"Reward Chest Chance - II"}
execute if score reward_chest_chance world_upgrades matches 1 if score @s Credits matches 15.. run tellraw @s {"color":"white","italic":false,"text":"Reward chest chance 24% → 28%"}
execute if score reward_chest_chance world_upgrades matches 1 if score @s Credits matches 15.. run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 2 1
execute if score reward_chest_chance world_upgrades matches 1 if score @s Credits matches 15.. run particle end_rod ~ ~1 ~ 0.3 0.5 0.3 0.1 15
execute if score reward_chest_chance world_upgrades matches 1 if score @s Credits matches 15.. run schedule function kiwi2:upgrades/world_upgrades/reward_chest_chance/reward_chest_chance_upgrade_2 1t
execute if score reward_chest_chance world_upgrades matches 1 if score @s Credits matches 15.. run scoreboard players remove @s Credits 15

execute unless score reward_chest_chance world_upgrades matches 1.. if score @s Credits matches ..9 run title @s actionbar [{"bold":true,"color":"red","italic":false,"text":"Not enough "},{"text": "⌬ Credits","color":"#76BDF8"}]
execute unless score reward_chest_chance world_upgrades matches 1.. if score @s Credits matches ..9 run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 2 0
execute unless score reward_chest_chance world_upgrades matches 1.. if score @s Credits matches 10.. run title @s actionbar {"bold":true,"color":"yellow","italic":false,"text":"Reward Chest Chance - I"}
execute unless score reward_chest_chance world_upgrades matches 1.. if score @s Credits matches 10.. run tellraw @s {"color":"white","italic":false,"text":"Reward chest chance 20% → 24%"}
execute unless score reward_chest_chance world_upgrades matches 1.. if score @s Credits matches 10.. run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 2 1
execute unless score reward_chest_chance world_upgrades matches 1.. if score @s Credits matches 10.. run particle end_rod ~ ~1 ~ 0.3 0.5 0.3 0.1 15
execute unless score reward_chest_chance world_upgrades matches 1.. if score @s Credits matches 10.. run schedule function kiwi2:upgrades/world_upgrades/reward_chest_chance/reward_chest_chance_upgrade_1 1t
execute unless score reward_chest_chance world_upgrades matches 1.. if score @s Credits matches 10.. run scoreboard players remove @s Credits 10