every 10 seconds:
if {zombie.count} < 10:
set {_x} to a random integer between -5 and 20
set {_y} to -60
set {_z} to a random integer between -5 and 20
set {_location} to location({_x}, {_y}, {_z}, world "world")
spawn a zombie at {_location}
set AI of last spawned entity to false
set Silent of last spawned entity to false
set {_helmet} to netherite helmet
set helmet of last spawned entity to {_helmet}
set display name of last spawned entity to "Health: %max health of last spawned entity%"
add 1 to {zombie.count}
if {zombie.count} < 10:
set {_x} to a random integer between -5 and 20
set {_y} to -60
set {_z} to a random integer between -5 and 20
set {_location} to location({_x}, {_y}, {_z}, world "world")
spawn a zombie at {_location}
set AI of last spawned entity to false
set Silent of last spawned entity to false
set {_helmet} to netherite helmet
set helmet of last spawned entity to {_helmet}
set display name of last spawned entity to "Health: %max health of last spawned entity%"
add 1 to {zombie.count}