I am trying to fix a bug with my friends skript because when he made it for me, he didn't bug-check it, and there are a few bugs with it. And I tried to fix it, and now it does absolutely nothing. This is the skript.
command /helmet:
permission: hat.use
trigger:
helmet slot of player is not empty
send "&eE&4r&er&4o&er:&r &5&lTake the &d%{_hat}%&5 off your head first!"
stop trigger
helmet slot of player is empty
set {_old helmet} to player's helmet
set {_hat} to player's tool
set tool of player to {_old helmet}
set helmet of the player to {_hat}
send "&5Your new hat is a(n) &d%{_hat}%&5! Enjoy it!" to player
command /helmet:
permission: hat.use
trigger:
helmet slot of player is not empty
send "&eE&4r&er&4o&er:&r &5&lTake the &d%{_hat}%&5 off your head first!"
stop trigger
helmet slot of player is empty
set {_old helmet} to player's helmet
set {_hat} to player's tool
set tool of player to {_old helmet}
set helmet of the player to {_hat}
send "&5Your new hat is a(n) &d%{_hat}%&5! Enjoy it!" to player