Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.
on right click with diamond helmet:
set {save.item.%player%} to player's held item
set {save.helm.%player%} to the helmet of the player
remove {save.item.%player%} from player
wait 1 tick
set helmet of the player to air
set helmet of the player to {save.item.%player%}
give player {save.helm.%player%}
stop
on right click with iron helmet:
set {save.item.%player%} to player's held item
set {save.helm.%player%} to the helmet of the player
remove {save.item.%player%} from player
wait 1 tick
set helmet of the player to air
set helmet of the player to {save.item.%player%}
give player {save.helm.%player%}
on right click with chain helmet:
set {save.item.%player%} to player's held item
set {save.helm.%player%} to the helmet of the player
remove {save.item.%player%} from player
wait 1 tick
set helmet of the player to air
set helmet of the player to {save.item.%player%}
give player {save.helm.%player%}
on right click with diamond chestplate:
set {save.item.%player%} to player's held item
set {save.helm.%player%} to the chestplate of the player
remove {save.item.%player%} from player
wait 1 tick
set chestplate of the player to air
set chestplate of the player to {save.item.%player%}
give player {save.helm.%player%}
stop
on right click with iron chestplate:
set {save.item.%player%} to player's held item
set {save.helm.%player%} to the chestplate of the player
remove {save.item.%player%} from player
wait 1 tick
set chestplate of the player to air
set chestplate of the player to {save.item.%player%}
give player {save.helm.%player%}
on right click with chain chestplate:
set {save.item.%player%} to player's held item
set {save.helm.%player%} to the chestplate of the player
remove {save.item.%player%} from player
wait 1 tick
set chestplate of the player to air
set chestplate of the player to {save.item.%player%}
give player {save.helm.%player%}
on right click with diamond leggings:
set {save.item.%player%} to player's held item
set {save.helm.%player%} to the leggings of the player
remove {save.item.%player%} from player
wait 1 tick
set leggings of the player to air
set leggings of the player to {save.item.%player%}
give player {save.helm.%player%}
stop
on right click with iron leggings:
set {save.item.%player%} to player's held item
set {save.helm.%player%} to the leggings of the player
remove {save.item.%player%} from player
wait 1 tick
set leggings of the player to air
set leggings of the player to {save.item.%player%}
give player {save.helm.%player%}
on right click with chain leggings:
set {save.item.%player%} to player's held item
set {save.helm.%player%} to the leggings of the player
remove {save.item.%player%} from player
wait 1 tick
set leggings of the player to air
set leggings of the player to {save.item.%player%}
give player {save.helm.%player%}
on right click with diamond boots:
set {save.item.%player%} to player's held item
set {save.helm.%player%} to the boots of the player
remove {save.item.%player%} from player
wait 1 tick
set boots of the player to air
set boots of the player to {save.item.%player%}
give player {save.helm.%player%}
stop
on right click with iron boots:
set {save.item.%player%} to player's held item
set {save.helm.%player%} to the boots of the player
remove {save.item.%player%} from player
wait 1 tick
set boots of the player to air
set boots of the player to {save.item.%player%}
give player {save.helm.%player%}
on right click with chain boots:
set {save.item.%player%} to player's held item
set {save.helm.%player%} to the boots of the player
remove {save.item.%player%} from player
wait 1 tick
set boots of the player to air
set boots of the player to {save.item.%player%}
give player {save.helm.%player%}
on right click with golden helmet:
set {save.item.%player%} to player's held item
set {save.helm.%player%} to the helmet of the player
remove {save.item.%player%} from player
wait 1 tick
set helmet of the player to air
set helmet of the player to {save.item.%player%}
give player {save.helm.%player%}
on right click with golden chestplate:
set {save.item.%player%} to player's held item
set {save.helm.%player%} to the chestplate of the player
remove {save.item.%player%} from player
wait 1 tick
set chestplate of the player to air
set chestplate of the player to {save.item.%player%}
give player {save.helm.%player%}
stop
on right click with golden leggings:
set {save.item.%player%} to player's held item
set {save.helm.%player%} to the leggings of the player
remove {save.item.%player%} from player
wait 1 tick
set leggings of the player to air
set leggings of the player to {save.item.%player%}
give player {save.helm.%player%}
on right click with golden boots:
set {save.item.%player%} to player's held item
set {save.helm.%player%} to the boots of the player
remove {save.item.%player%} from player
wait 1 tick
set boots of the player to air
set boots of the player to {save.item.%player%}
give player {save.helm.%player%}
on right click with leather helmet:
set {save.item.%player%} to player's held item
set {save.helm.%player%} to the helmet of the player
remove {save.item.%player%} from player
wait 1 tick
set helmet of the player to air
set helmet of the player to {save.item.%player%}
give player {save.helm.%player%}
on right click with leather chestplate:
set {save.item.%player%} to player's held item
set {save.helm.%player%} to the chestplate of the player
remove {save.item.%player%} from player
wait 1 tick
set chestplate of the player to air
set chestplate of the player to {save.item.%player%}
give player {save.helm.%player%}
stop
on right click with leather leggings:
set {save.item.%player%} to player's held item
set {save.helm.%player%} to the leggings of the player
remove {save.item.%player%} from player
wait 1 tick
set leggings of the player to air
set leggings of the player to {save.item.%player%}
give player {save.helm.%player%}
on right click with leather boots:
set {save.item.%player%} to player's held item
set {save.helm.%player%} to the boots of the player
remove {save.item.%player%} from player
wait 1 tick
set boots of the player to air
set boots of the player to {save.item.%player%}
give player {save.helm.%player%}