hiturys

eyyyyy

Dec 29th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. command /filter [<text>]:
  2. trigger:
  3. if player has permission "filtermsg":
  4. if arg-1 is set:
  5. if {blockedwords::%arg-1%} is set:
  6. Message "&8[&eSmokePVP&8] &cThis word is already added!"
  7. stop
  8. if {blockedwords::%arg-1%} is not set:
  9. set {blockedwords::%arg-1%} to true
  10. Message "&aSuccess!"
  11. stop
  12.  
  13.  
  14. on chat:
  15. if message contains {blockedwords::*}:
  16. cancel event
  17. add 1 to {w.%player%}
  18. set {warnedplayer.%player%} to player
  19. Message "&cPlease do not swear! you have &c%{w.%player%}% &cout of 5 warnings"
  20. if {w.%player%} is 5:
  21. reset {w.%player%}
  22. add 1 to {mutes.%player%}
  23. if {mutes.%player%} is 1:
  24. execute console command "mute %player% 12h Innapropiate Language"
  25. stop
  26. if {mutes.%player%} is 2:
  27. execute console command "mute %player% 2d Innapropiate Language (2nd mute)"
  28. stop
  29. #Continue from here
  30. if {w.%player%} is less than 5:
  31. log "yeah boiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii"
  32.  
  33. loop all players:
  34. if loop-player has permission "filter.notify":
  35. Message "&3&lCHAT FILTER &8>> &7%{warnedplayer.%player%}% has swore! Message: %message%" to loop-player
Add Comment
Please, Sign In to add comment