Creating the script

In this step, we will write the script for the mute chat script.

First, we must write our script. For this script, we will use the "Player Chat Message" script.

/customizer >> Scripts >> Add >> Player Chat Message
circle-info

The script's name can be whatever you want it to be. I used "mute-script" for this guide.

Once we have the script, we will use the "Get Variable (String)" and "Compare String" elements to see if the mute-command has been used and the script is on.

triangle-exclamation

We'll add the "If Else Statement" element after you've added the "Compare String" element.

When the mute-script is enabled, we will add the element "Block Vanilla Behaviour," which will prevent the message from being sent.

Once we've blocked the message, we'd like to notify the player that the chat has been locked. This is possible with the "Player Message" element.

circle-check

Last updated