Script minecraft?

Sh
- in Worlds
1

How can you do it that you loop all players but eg only the one who is above a certain y-cord should be looped. Here:

every 2 ticks in "ffa":

loop all players:

if loop-player is in world "ffa":

if y-coord of loop-player is bigger than 8:

if slot 0 of loop-player is a diamond sword:

stop

else:

equip loop-player with all iron armor of unbreaking 2

stop

Ul

Should be that is above a certain y-cord.

Insert coordinate as an additional condition?

The scripting language is terrible, by the way, learn something clever that will also bring you something in the future.