Randall123459

AntiSpam skript

Jul 12th, 2015
566
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. options:
  2. mutelength: 10m #How long you want them muted for
  3. checktime: 5 #in seconds
  4. maxmessages: 3 #How many messages they can send in a row
  5. P: &8[&cIgniteUHC&8] #Prefix
  6.  
  7. on chat:
  8. player does not have the permission "skript.op"
  9. add 1 to {spamcheck::%player%}
  10. wait 3 ticks
  11. if {spamcheck::%player%} is set:
  12. if {spamcheck::%player%} is {@maxmessages}:
  13. command "/mute %player% {@mutelength}"
  14. loop all players:
  15. loop-player has permission "skript.op"
  16. send "{@P} &b%player% &ahas been muted for &b{@mutelength} &aminutes as he spammed messages &b&l{@maxmessages} &atimes!" to loop-player
  17. message "{@P} &aYou have been muted for &b{@mutelength} &aminutes as you spammed messages &b&l{@maxmessages} &atimes!"
  18. set {checktime} to {@checktime}
  19. wait {checktime} seconds
  20. delete {spamcheck::%player}
Advertisement
Add Comment
Please, Sign In to add comment