Ultra Customizer Guides
  • 👋Welcome
  • ❔Basics
    • Getting started
    • Elements details
    • Manage folders
      • Global management
      • Import export
  • 💻GUI's
    • How to open your GUI
    • Custom buttons
      • Custom button icon
      • Player head (Opening the GUI)
    • Button Lores
      • Players placeholders
    • Unlockable Buttons
  • ⚙️Simple systems
  • Creating a mute chat script
    • Creating the /mutechat command
    • Creating the /unmutechat command
    • Creating the script
  • Text message replacement
    • Creating the script
  • ---------------------------
    • Changelog
Powered by GitBook
On this page

Was this helpful?

  1. Creating a mute chat script

Creating the script

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

PreviousCreating the /unmutechat commandNextText message replacement

Last updated 3 years ago

Was this helpful?

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

/customizer >> Scripts >> Add >> Player Chat Message

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.

We will not write a compare script for "off" because if it is off. This script will do nothing if the value is not "on."

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.

When the value is false we are going to return nothing (Put no elements in place)

When you've finished writing the script, it's time to put it to use.