Jump to content

Message skript


Recommended Posts

My first skript released. (pls don't bully)

command /text [<player>] [<text>]:
  aliases: /whisper, /whisp /t
  usage: &cNot enough arguments. /text (player) (message)
  trigger:
    set {text} to difference between {text.%player%} and now
    if {text} is less than 5 seconds:
      send "&cYou must wait &4%difference between {text} and 5 seconds% &cbefore messaging again!"
      stop
    set {text.%player%} to now
    if arg-1 is set:
      if arg-2 is set:
        send "&9%player% &b> &9You &b| %coloured arg-2%" to arg-1
        send "&9You &b> %arg-1% &b| %coloured arg-2%" to player
      else:
        send "&cNot enough arguments. /text (player) (message)"
    else:
      send "&cNot enough arguments. /text (player) (message)"
    loop all players:
      if loop-player has permission "skript.messagesee":
        send "&9%player% &bhas messaged &9%arg-1%&b: %coloured arg-2%"
        if arg-1 is online:
          send "&9You &b> %arg-1% &b| %coloured arg-2%" to player
        else:
          send "&cThis player doesn't exist!"
          
          the part where some people can see the messages is not perfect.

Link to comment
Share on other sites

23 hours ago, Yourdadisyourmom said:

My first skript released. (pls don't bully)

command /text [<player>] [<text>]:
  aliases: /whisper, /whisp /t
  usage: &cNot enough arguments. /text (player) (message)
  trigger:
    set {text} to difference between {text.%player%} and now
    if {text} is less than 5 seconds:
      send "&cYou must wait &4%difference between {text} and 5 seconds% &cbefore messaging again!"
      stop
    set {text.%player%} to now
    if arg-1 is set:
      if arg-2 is set:
        send "&9%player% &b> &9You &b| %coloured arg-2%" to arg-1
        send "&9You &b> %arg-1% &b| %coloured arg-2%" to player
      else:
        send "&cNot enough arguments. /text (player) (message)"
    else:
      send "&cNot enough arguments. /text (player) (message)"
    loop all players:
      if loop-player has permission "skript.messagesee":
        send "&9%player% &bhas messaged &9%arg-1%&b: %coloured arg-2%"
        if arg-1 is online:
          send "&9You &b> %arg-1% &b| %coloured arg-2%" to player
        else:
          send "&cThis player doesn't exist!"
          
          the part where some people can see the messages is not perfect.

You can use a pastebin link instead. Overall. It seems nice for a first post. 

I tried the skript out but minehut is overcoming this skript lol.

2021-06-09_20_22_08.jpg.422c39613f8b72de894e5ec1f3377dca.jpg

Yo who actually reads these

[Vip] - 12/29/2020
[Pro] - 1/25/2022
 

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...