akon1248

AutoKFC

Jul 22nd, 2019
500
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. command /autokfc:
  2. trigger:
  3. if player has scoreboard tag "autokfc":
  4. remove "autokfc" from scoreboard tags of player
  5. send "&7AutoKFC: &cOFF"
  6. else:
  7. add "autokfc" to scoreboard tags of player
  8. send "&7AutoKFC: &aON"
  9. on packet event play_client_chat:
  10. player has scoreboard tag "autokfc"
  11. set {_msg} to string pinfo 0 of event-packet
  12. first 5 characters of {_msg} is "/kfc "
  13. set string pinfo 0 of event-packet to last length of {_msg} - 5 characters of {_msg}
  14. set metadata value "KFCFlag" of player to true
  15. wait 3 tick
  16. delete metadata value "KFCFlag" of player
  17. on chat:
  18. metadata value "KFCFlag" of player is true
  19. delete metadata value "KFCFlag" of player
  20. set {_msg} to message
  21. cancel event
  22. execute player command "kfc #%{_msg}%"
Advertisement
Add Comment
Please, Sign In to add comment