#Layer 1
execute if score @s countdown matches 150 run function items:obj/ice_wall/layer_particle
execute if score @s countdown matches 1.. run function items:obj/ice_wall/0_freeze/layer_1

#Layer 2
execute if score @s countdown matches 140 positioned ~ ~1 ~ run function items:obj/ice_wall/layer_particle
execute if score @s countdown matches 10..140 run function items:obj/ice_wall/0_freeze/layer_2

#Layer 3
execute if score @s countdown matches 130 positioned ~ ~2 ~ run function items:obj/ice_wall/layer_particle
execute if score @s countdown matches 20..130 run function items:obj/ice_wall/0_freeze/layer_3

#Remove Layer 3
execute if score @s countdown matches 20 positioned ~ ~2 ~ run function items:obj/ice_wall/layer_particle
execute if score @s countdown matches 20 run function items:obj/ice_wall/1_melt/layer_3

#Remove Layer 2
execute if score @s countdown matches 10 positioned ~ ~1 ~ run function items:obj/ice_wall/layer_particle
execute if score @s countdown matches 10 run function items:obj/ice_wall/1_melt/layer_2

#Remove Layer 1
execute if score @s countdown matches 1 run function items:obj/ice_wall/layer_particle
execute if score @s countdown matches 1 run function items:obj/ice_wall/1_melt/layer_1
