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
  • Required Addons
  • GUI Stack
  • Unlock Script
  • Deactivated Script
  • Activated Script

Was this helpful?

  1. GUI's

Unlockable Buttons

A GUI button, that needs to be unlocked and can be toggled.

PreviousPlayers placeholdersNextCreating a mute chat script

Last updated 3 years ago

Was this helpful?

Required Addons

  • Vault Addon (If requiring money to unlock)

GUI Stack

First, you need to set up the "GUI stack". The first item should be the "activated" button, the second should be the "deactivated" button, and the third should be the "purchase" button.

For the "activated" and the "deactivated" button you will need to set a permission to view the item. For example button.unlocked could be the perm for the deactivated button, and button.active the perm for the active button.

Unlock Script

First we need to check if they have what is needed to unlock the button.

Start by checking the players balance to see if they have the 10 coins (dollars) required.

If they do, take the money from them, if they don't, send a message saying they don't have enough money.

Next, you will want to get the name of the player who clicke don the button.

Now we will give the player the permission needed to view the deactivated button (button.unlocked). You need to use the the command associated with the permission plugin you use. For uperms its upc addPlayerPermission %1 button.unlocked

Deactivated Script

First we need to get the player name of the player who clicked the button.

Then you just have to add the permission button.active to the user.

After this, you add any elements you need to activate the perk, skill, or thing that is associated with this button. For example you could execute the command needed to put the player into vanish.

Activated Script

Once again we need to get the name of the player who clicked the button.

Then we will remove the permission button.active using your permission plugins command. For uperms the command is upc removePlayerPermission %1 button.active

Now you use whatever elements you need to deactivate the perk, skill, or thing associated with the button. For example taking a player out of vanish.

💻