Vanilla GUI stealable glitch

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

Status
Not open for further replies.

KingDooms

Member
Jun 10, 2020
26
0
1
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:
command /test:
    permission: op
    trigger:
    open chest inventory with 3 rows named "§c§lTest" to player
    loop 27 times:
      set slot (loop-integer -1) of player's current inventory to gray stained glass pane named "§r" with all flags hidden

on inventory click:
    if name of event-inventory is "§c§lTest":
      if event-slot is gray stained glass pane named "§r" with all flags hidden:
          cancel event
          stop
 
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:
on inventory click:
    if name of event-inventory is "§c§lTest":
      cancel event
      if event-slot is gray stained glass pane named "§r" with all flags hidden:
          stop
Hope i helped!:emoji_smiley:
 
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:
command /test:
    permission: op
    trigger:
    open chest inventory with 3 rows named "§c§lTest" to player
    loop 27 times:
      set slot (loop-integer -1) of player's current inventory to gray stained glass pane named "§r" with all flags hidden

on inventory click:
    if name of event-inventory is "§c§lTest":
      if event-slot is gray stained glass pane named "§r" with all flags hidden:
          cancel event
          stop
i suggest you replace this "§" with the and symbol(&) cus it makes sk reloading look weird
 
Status
Not open for further replies.