advancement revoke @s only kiwi2:limitbreak_interaction_passive_points

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

execute if score passive_points 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 passive_points world_upgrades matches 3 if score @s Credits matches ..39 run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 2 0
execute if score passive_points world_upgrades matches 3 if score @s Credits matches 40.. run title @s actionbar {"bold":true,"color":"yellow","italic":false,"text":"Passive Points - IV"}
execute if score passive_points world_upgrades matches 3 if score @s Credits matches 40.. run tellraw @s {"color":"white","italic":false,"text":"Gain 4 Points at the end of each wave."}
execute if score passive_points world_upgrades matches 3 if score @s Credits matches 40.. run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 2 1
execute if score passive_points 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 passive_points world_upgrades matches 3 if score @s Credits matches 40.. run schedule function kiwi2:upgrades/world_upgrades/passive_points/passive_points_upgrade_4 1t
execute if score passive_points world_upgrades matches 3 if score @s Credits matches 40.. run scoreboard players remove @s Credits 40

execute if score passive_points 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 passive_points world_upgrades matches 2 if score @s Credits matches ..24 run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 2 0
execute if score passive_points world_upgrades matches 2 if score @s Credits matches 25.. run title @s actionbar {"bold":true,"color":"yellow","italic":false,"text":"Passive Points - III"}
execute if score passive_points world_upgrades matches 2 if score @s Credits matches 25.. run tellraw @s {"color":"white","italic":false,"text":"Gain 3 Points at the end of each wave."}
execute if score passive_points world_upgrades matches 2 if score @s Credits matches 25.. run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 2 1
execute if score passive_points 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 passive_points world_upgrades matches 2 if score @s Credits matches 25.. run schedule function kiwi2:upgrades/world_upgrades/passive_points/passive_points_upgrade_3 1t
execute if score passive_points world_upgrades matches 2 if score @s Credits matches 25.. run scoreboard players remove @s Credits 25

execute if score passive_points 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 passive_points world_upgrades matches 1 if score @s Credits matches ..14 run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 2 0
execute if score passive_points world_upgrades matches 1 if score @s Credits matches 15.. run title @s actionbar {"bold":true,"color":"yellow","italic":false,"text":"Passive Points - II"}
execute if score passive_points world_upgrades matches 1 if score @s Credits matches 15.. run tellraw @s {"color":"white","italic":false,"text":"Gain 2 Points at the end of each wave."}
execute if score passive_points world_upgrades matches 1 if score @s Credits matches 15.. run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 2 1
execute if score passive_points 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 passive_points world_upgrades matches 1 if score @s Credits matches 15.. run schedule function kiwi2:upgrades/world_upgrades/passive_points/passive_points_upgrade_2 1t
execute if score passive_points world_upgrades matches 1 if score @s Credits matches 15.. run scoreboard players remove @s Credits 15

execute unless score passive_points 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 passive_points world_upgrades matches 1.. if score @s Credits matches ..9 run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 2 0
execute unless score passive_points world_upgrades matches 1.. if score @s Credits matches 10.. run title @s actionbar {"bold":true,"color":"yellow","italic":false,"text":"Passive Points - I"}
execute unless score passive_points world_upgrades matches 1.. if score @s Credits matches 10.. run tellraw @s {"color":"white","italic":false,"text":"Gain 1 Points at the end of each wave."}
execute unless score passive_points world_upgrades matches 1.. if score @s Credits matches 10.. run playsound minecraft:entity.arrow.hit_player master @s ~ ~ ~ 2 1
execute unless score passive_points 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 passive_points world_upgrades matches 1.. if score @s Credits matches 10.. run schedule function kiwi2:upgrades/world_upgrades/passive_points/passive_points_upgrade_1 1t
execute unless score passive_points world_upgrades matches 1.. if score @s Credits matches 10.. run scoreboard players remove @s Credits 10