Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /autokfc:
- trigger:
- if player has scoreboard tag "autokfc":
- remove "autokfc" from scoreboard tags of player
- send "&7AutoKFC: &cOFF"
- else:
- add "autokfc" to scoreboard tags of player
- send "&7AutoKFC: &aON"
- on packet event play_client_chat:
- player has scoreboard tag "autokfc"
- set {_msg} to string pinfo 0 of event-packet
- first 5 characters of {_msg} is "/kfc "
- set string pinfo 0 of event-packet to last length of {_msg} - 5 characters of {_msg}
- set metadata value "KFCFlag" of player to true
- wait 3 tick
- delete metadata value "KFCFlag" of player
- on chat:
- metadata value "KFCFlag" of player is true
- delete metadata value "KFCFlag" of player
- set {_msg} to message
- cancel event
- execute player command "kfc #%{_msg}%"
Advertisement
Add Comment
Please, Sign In to add comment