Solved Making a GUI do something on item click. (SOLVED)

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

JustBellow

Member
Mar 10, 2025
12
1
3
16
Hello, I am currently trying to make a GUI that closes the menu, then replaces the player's item with something else, I tried using TuSKe but it just made all my custom commands not work, is there any other plugin that wouldn't make me have to use this code?
Code:
command /menu:
 trigger:
  wait 1 tick
  open chest with 3 rows named "Menu" to player
  wait 1 tick
 
  format slot 0 of player with diamond named "&6Spawn" to close then run [execute player command "/spawn"]
 
Hello, I am currently trying to make a GUI that closes the menu, then replaces the player's item with something else, I tried using TuSKe but it just made all my custom commands not work, is there any other plugin that wouldn't make me have to use this code?
Code:
command /menu:
 trigger:
  wait 1 tick
  open chest with 3 rows named "Menu" to player
  wait 1 tick
 
  format slot 0 of player with diamond named "&6Spawn" to close then run [execute player command "/spawn"]
Do you want to create a gui? Can you explain clearly?
 
Yes, I would like to create a GUI that closes the menu and can run a skript command such as give 1 dirt or smth.
You can simply create a GUI like this:

Python:
command /menu:
    trigger:
        open chest with 3 rows named "test GUI" to player
        set {_inv} to current inventory of player
    
        set slot 0 of {_inv} to stick named "&aclick me!"

on inventory click:
    if name of clicked inventory is "test GUI":
        send "&aClicked!" to player
        play sound "entity.experience_orb.pickup" to player
 
You can simply create a GUI like this:

Python:
command /menu:
    trigger:
        open chest with 3 rows named "test GUI" to player
        set {_inv} to current inventory of player
   
        set slot 0 of {_inv} to stick named "&aclick me!"

on inventory click:
    if name of clicked inventory is "test GUI":
        send "&aClicked!" to player
        play sound "entity.experience_orb.pickup" to player
I forgot to add a slot check, you can add it.

if index of event-slot is 0: