1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Vanilla GUI stealable glitch

Discussion in 'Skript' started by KingDooms, Dec 8, 2021.

Tags:
  1. KingDooms

    KingDooms Member

    Joined:
    Jun 10, 2020
    Messages:
    23
    Likes Received:
    0
    So there's a weird bug with vanilla GUIs where there's a way to take out items by SHIFTING + RIGHT CLICKING + CLOSING INVENTORY. I can't use TuSKe due to server problems, so is there any fix?

    Code (Text):
    1. command /test:
    2.     permission: op
    3.     trigger:
    4.     open chest inventory with 3 rows named "§c§lTest" to player
    5.     loop 27 times:
    6.       set slot (loop-integer -1) of player's current inventory to gray stained glass pane named "§r" with all flags hidden
    7.  
    8. on inventory click:
    9.     if name of event-inventory is "§c§lTest":
    10.       if event-slot is gray stained glass pane named "§r" with all flags hidden:
    11.           cancel event
    12.           stop
     
  2. KokoPlayzYT

    KokoPlayzYT Member

    Joined:
    Aug 6, 2021
    Messages:
    20
    Likes Received:
    1
    just do that if the cancel event after the inventory's name check, it wont stop the event it will just cancel the action, you can still check witch slot he clicked and do the normal coding like this:
    Code (Text):
    1. on inventory click:
    2.     if name of event-inventory is "§c§lTest":
    3.       cancel event
    4.       if event-slot is gray stained glass pane named "§r" with all flags hidden:
    5.           stop
    Hope i helped!:emoji_smiley:
     
  3. yea rite

    yea rite Active Member

    Joined:
    Jul 11, 2021
    Messages:
    60
    Likes Received:
    3
    i suggest you replace this "§" with the and symbol(&) cus it makes sk reloading look weird
     

Share This Page

Loading...