Um, I am trying to make a Chat delay skript, but it does not work, I am trying to make it only donors can bypass this, but members can't
Here is my code:
Thank you
Here is my code:
Code:
command /chatdelay [<text>] [<number>]:
aliases: /delaychat
permission: mythical.chatdelay
permission message: Unknown command. Type "/help" for help.
trigger:
if arg-1 is not set:
clear {delay.timer}
loop all players:
set {delay.%loop-player%.timer} to 0
send "&cSuccessfully removed the timer."
if arg-1 is "set":
if arg-2 is set:
set {delay.timer} to arg-2
send "&cYou have successfully set the chat delay to %arg-2%"
stop
if arg-1 is "help":
send "&8&m-----------------------------------------"
send "&c/chatdelay set <seconds> - Sets the chat delay."
send "&c/chatdelay - Removes the chat delay."
send "&c/chatdelay help - Displays this page."
send "&c/chatdelay info - Extra info."
send "&8&m-----------------------------------------"
stop
if arg-1 is "info":
send "&8&m-----------------------"
send "&cVersion: 1.0"
send "&cMade By: ???"
send "&8&m-----------------------"
stop
on chat:
if {delay.%player%.timer} is higher than 0:
if player does not have permission "mythical.chatdelaybypass":
send "&cYou must wait {delay.timer} before chatting."
send "&cPurchase a rank at https://mythicalrpg.tebex.io to bypass this."
stop
add {delay.timer} to {delay.%player%.timer}
Thank you