Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. options:
  2. ChatFilter: &cSwearing is not cool!
  3.  
  4. Prefix: &8[&cAlert&8]
  5. Muted: &7The chat has been temporarily muted by &n%player%&7.
  6. UnMuted: &7The chat has been unmuted by &n%player%&7.
  7. ChatCleared: &7Chat cleared by &n%player%&7.
  8. BypassPerm: Chat.bypass
  9.  
  10.  
  11.  
  12. function contains(list: objects, check: object) :: boolean:
  13. loop {_list::*}:
  14. if {_check} contains loop-value:
  15. return true
  16. return false
  17.  
  18. on chat:
  19. set {Words::*} to "shit", "fuck" and "pussy"
  20. if contains({Words::*}, message):
  21. cancel event
  22. send "{@ChatFilter}"
  23. if {Chat.Mute} is true:
  24. if player doesn't have the permission "{@BypassPerm}":
  25. cancel event
  26. send "&7You cannot speak while the chat is muted!"
  27.  
  28. command /chc [<text>]:
  29. aliases: /chc, /chatcontrol, /chat
  30. permission: sk.chatcontrol
  31. trigger:
  32. if arg-1 isn't set:
  33. send "&cIncorrect Usage! /chc <mute/clear>"
  34. else:
  35. if arg-1 contains "mute":
  36. if {Chat.Mute} isn't set:
  37. set {Chat.Mute} to true
  38. broadcast ""
  39. broadcast "{@Muted}"
  40. broadcast ""
  41. else:
  42. delete {Chat.Mute}
  43. broadcast ""
  44. broadcast "{@UnMuted}"
  45. broadcast ""
  46. else if arg-1 contains "clear":
  47. loop 200 times:
  48. broadcast ""
  49. broadcast "{@ChatCleared}"
  50.  
  51. command /alert [<text>]:
  52. permission: sk.alert
  53. trigger:
  54. if arg-1 isn't set:
  55. send "&cIncorrect Usage! /alert <message>"
  56. else:
  57. broadcast "{@Prefix} &7%colored arg-1%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement