# ───────────────────────────────────────────────
# Author: Miko – SkriptRush
# Version: 1.0
# Notes: Do not claim as your own or redistribute without permission.
# ───────────────────────────────────────────────

command /staffchat:
  aliases: /sc
  trigger:
    if player has permission "staff":
      if {staffChat::%player%} is not set:
        set {staffChat::%player%} to true
        send "&7[&6Staff Chat&7] &fYou are now in staff chat."
      else:
        delete {staffChat::%player%}
        send "&7[&6Staff Chat&7] &fYou are now out of staff chat."
    else:
      send "&7[&cPermission Error&7] &fYou do not have permission to use this command."

on chat:
  if {staffChat::%player%} is set:
    cancel event
    loop all players:
      if loop-player has permission "staff":
        send "&7[&6Staff Chat&7] &f%player%: %message%" to loop-player

on quit:
  delete {staffChat::%player%}
        
← Back to Skripts