replace 1 message to random message from the list

  • 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.

varboosted

Active Member
Apr 20, 2020
50
3
8
24
Hello how can i do same as hypixel when you typing ez in chat everytime will be a different message when you type ez

thats what i tried but its only replacing to only 1 mesage
on chat:
player does not have permission "ez.bypass":
replace all "ez" in message with "Wait... This isn't what I typed!"
 
If you are trying to do it like in hypixel you have to check if the message contains "ez" and if it does cancel the event and then make the player say the message you want.
 
If you are trying to do it like in hypixel you have to check if the message contains "ez" and if it does cancel the event and then make the player say the message you want.
i want that it will choose random message from a list of many messages
 
code_language.skript:
on chat:
    if message contains "ez":
        set {_list::*} to "message 1", "message 2", "message 3" and "message 4"
        set {_m} to a random element out of {_list::*}
        replace every "ez" in message with {_m}
 
Status
Not open for further replies.