SlowChat / Slow Chat

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
Jul 16, 2020
30
2
8
18
I am so confused why this isnt working

Code:
command /slowchat [<number>]:
    trigger:
        if {rank.perms.%{rank.%player%}%::*} does not contain "*" or "server.staff":
            noPermMsg(player)
        else:
            if arg-1 is not set:
                broadcast "&r "
                broadcast "&3Slow Chat &8» &r%{rank.%player%.color}%%player% &3set slow chat to &b0 seconds&3."
                broadcast "&r "
                set {slowchat} to 0
            else:
                broadcast "&r "
                broadcast "&3Slow Chat &8» &r%{rank.%player%.color}%%player% &3set slow chat to &b%arg-1% seconds&3."
                broadcast "&r "
                set {slowchat} to arg-1

on chat:
    set message format to "&7[%{lvl.%player%}%] &r%{rank.%player%.prefix}%%{rank.%player%.color}%%player%&7: %{chatc.%player%}%%message%"

on chat:
    if {slowchat.%player%} =< 0:
        set {slowchat.%player%} to {slowchat}
        while {slowchat.%player%} > 0:
            wait 1 second
            remove 1 from {slowchat.%player%}
    else if {slowchat.%player%} >= 1:
        cancel event
        msg(player, "&3Please wait &b%{slowchat.%player%}% seconds&3.")
 
Status
Not open for further replies.