variables: {chat} = true command /chat []: trigger: if arg 1 is not set: if player has permission "chat.pomoc": send "&8&m-----------------------------" send "&3Dostepne komendy:" send " &6/chat on &2- Wlacza chat" send " &6/chat off &2- Wylacza chat" send " &6/chat cc &2- Czysci chat" send "&8&m-----------------------------" stop else: send "&8>&cNie masz dostepu do tej komendy!" stop if arg 1 is "on": if {chat} is false: if player has permission "chat.on": set {chat} to true broadcast "&8>&bChat zostal wlaczony przez administratora: &c%player%" stop else: send "&8>&cNie masz dostepu do tej komendy!" stop else: send "&8>&cChat jest juz wlaczony!" stop if arg 1 is "off": if {chat} is true: if player has permission "chat.off": set {chat} to false broadcast "&8>&bChat zostal wylaczony przez administratora: &c%player%" stop else: send "&8>&cNie masz dostepu do tej komendy!" stop else: send "&8>&cChat jest juz wylaczony!" stop if arg 1 is "cc" or "clear": if player has permission "chat.cc": loop 128 times: broadcast "" broadcast "&8>&bChat zostal wyczyszczony przez administratora: &c%player%" stop else: send "&8>&cNie masz dostepu do tej komendy!" stop on chat: if {chat} is false: if player has permission "chat.pisanie": stop else: cancel event send "&8>&cChat jest aktualnie wylaczony!" stop else: if player has permission "chat.antyslow": stop set {_waited} to difference between {chat.%player%.spam} and now if {_waited} is less than 5 real seconds seconds: send "&8>&cWiadomosci mozesz wysylac co &a5 &csekund!" cancel event stop set {chat.%player%.spam} to now cancel event stop