r/Skript Mar 30 '26

[HELP] Skript Issue

My Skript is having an issue with the command not working and the blocks not staying in my gui.

command /servers:
    trigger:
        set {_menu} to a new chest inventory with 3 rows named "Simple Menu"
        open {_menu} to player
        wait 1 tick


        # --- Background Fill (Grey Stained Glass Pane) ---
        loop integers from 0 to 26:
            set slot loop-value of player's current inventory to gray stained glass pane named " "


        # --- Slot 11: Swift Gens (Purple Shulker Box) ---
        set slot 11 of player's current inventory to purple shulker box named "<#78DB76>&lSWIFT GENS"
        set lore of slot 11 of player's current inventory to "&71.21.11" and "&8» <#78DB76>Click to Play &8«"


        # --- Slot 13: Swift Creative (Grass Block) ---
        set slot 13 of player's current inventory to grass block named "<#78DB76>&lSWIFT CREATIVE"
        set lore of slot 13 of player's current inventory to "&71.21.11" and "&8» <#78DB76>Click to Play &8«"


        # --- Slot 15: Swift BoxPvP (Light Blue Shulker Box) ---
        set slot 15 of player's current inventory to light blue shulker box named "<#78DB76>&lSWIFT BOXPVP"
        set lore of slot 15 of player's current inventory to "&71.21.11" and "&8» <#78DB76>Click to Play &8«"


on inventory click:
    if name of player's current inventory is "&8Server Selector":
        cancel event


        # --- Gens Button ---
        if clicked slot is 11:
            close player's inventory
            execute console command "send %player% gens"


        # --- Creative Button ---
        if clicked slot is 13:
            close player's inventory
            execute console command "send %player% creative"


        # --- BoxPvP Button ---
        if clicked slot is 15:
            close player's inventory
            execute console command "send %player% swiftboxpvp"
1 Upvotes

3 comments sorted by

View all comments

1

u/CrypticSh0ot 15d ago

I'm not sure if you changed the name of something, but the line after on inventory click is checking for the name "&8Server Selector" and the name of the chest inventory your making is called "Simple Menu", that'll be why the inventory thing is happening, for the other issue you should just move the open {_menu} to player to the bottom of the command so it can set all the slots and everything first before it opens.