Advertisement
Guest User

Untitled

a guest
Feb 18th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.09 KB | None | 0 0
  1. command /chat [<text>]:
  2.     trigger:
  3.         if player has the permission "Chat.manage":
  4.             if arg-1 isn't set:
  5.                 send "&cUsage: /chat <Mute/Clear/Unmute>"
  6.             else if arg-1 is set:
  7.                 if arg-1 is "mute":
  8.                     set {ChatMuted} to true
  9.                     broadcast ""
  10.                     broadcast "&c%executor% &7has muted the chat."
  11.                     broadcast ""
  12.                 if arg-1 contains "Clear":
  13.                     loop 150 times:
  14.                         broadcast ""
  15.                     broadcast "&7Chat has been cleared by &c%executor%&7."
  16.                 if arg-1 is "Unmute":
  17.                     delete {ChatMuted}
  18.                     broadcast ""
  19.                     broadcast "&c%executor% &7has unmuted the chat."
  20.                     broadcast ""
  21.         else:
  22.             send "&cInsufficient Permissions!"
  23.  
  24. on chat:
  25.    if {Muted::%player%} or {PermanentMute::%player%} is true:
  26.        cancel event
  27.        send "&cYou cannot talk while muted."
  28.    if {ChatMuted} is true:
  29.        if player doesn't have the permission "Staff":
  30.             cancel event
  31.             send "&cYou cannot talk while chat is muted."
  32.         set chat format to "%colored player's prefix%%player%&f: &f%message%"
  33.     set chat format to "%colored player's prefix%%player%&f: &f%message%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement