command /staffchat:
permission: sc.chat.toggle
trigger:
if {staffchat} is false:
set {staffchat} to true
message "&c[&6StaffChat&c] &7Staff chat &aenabled&7!" to player
else if {staffchat} is true:
set {staffchat} to false
message "&c[&6StaffChat&c] &7Staff chat &cdisabled&7!" to player
on chat:
if {staffchat} is true:
loop all players:
if loop-player has permission "sc.chat":
cancel event
message "&c[&6StaffChat&c] &7%player% › %message%" to loop-player