Skip to content
home/guides/how to make a Minecraft shop gui with Skript
guide·5 min read·May 25, 2026

how to make a Minecraft shop gui with Skript

Build a clickable chest-inventory shop for your Minecraft server using Skript. Players click items to buy them — money deducted, item given. No extra plugins needed.

A chest-inventory shop is one of the highest-impact features you can add to a Minecraft server. Players click an item, money gets deducted, the item lands in their inventory. With Skript and a few lines of Skript code, you can ship this in under ten minutes.

What you'll build

  • A /shop command that opens a chest GUI
  • Three buyable items (diamond, emerald, gold) with set prices
  • Item-lock so players can't take items out of the GUI
  • Money deduction on click + give the item if affordable

The pattern

Skript supports chest inventories natively — no addon needed. The trick is that `set slot X of <inv> to <item>` does NOT accept inline `named`/`with lore` modifiers. You have to assemble the item first in a temp variable, then assign it. The click handler uses `on inventory click` and matches the GUI by reference (storing it per-player) rather than by title, because Skript can't reliably read inventory titles back.

The code

shop.sk — no extra plugins needed
command /shop:
    trigger:
        set {_gui} to chest inventory with 3 rows named "&aShop"
        set {_diamond} to diamond named "&bDiamond" with lore "&7Cost: $100"
        set slot 11 of {_gui} to {_diamond}
        set {_emerald} to emerald named "&aEmerald" with lore "&7Cost: $50"
        set slot 13 of {_gui} to {_emerald}
        set {_gold} to gold ingot named "&6Gold" with lore "&7Cost: $25"
        set slot 15 of {_gui} to {_gold}
        set {gui::%uuid of player%} to {_gui}
        open {_gui} to player

on inventory click:
    if event-inventory is {gui::%uuid of player%}:
        cancel event
        if event-slot is slot 11 of event-inventory:
            if {money.%uuid of player%} >= 100:
                remove 100 from {money.%uuid of player%}
                give 1 diamond to player
                send "&aBought 1 diamond for $100." to player
            else:
                send "&cYou don't have $100." to player
        if event-slot is slot 13 of event-inventory:
            if {money.%uuid of player%} >= 50:
                remove 50 from {money.%uuid of player%}
                give 1 emerald to player
                send "&aBought 1 emerald for $50." to player
            else:
                send "&cYou don't have $50." to player
Heads up: many tutorials online use `if name of event-inventory is "&aShop":` to identify which GUI was clicked. This is unreliable in Skript — titles aren't always readable back. Use a per-player reference variable instead (`{gui::%uuid of player%}`) like the code above.
Build this visually — no typing
Drag items into a chest grid, set prices, define click actions. The GUI Designer outputs this exact pattern automatically.

Adding click actions

The example above buys an item and gives money. You can add ANY effect: run a console command (`execute console command "/kit pvp"`), broadcast a server-wide message, play a sound, teleport the player. Multiple effects per slot are fine — just chain them under the same `if event-slot is slot N` block.

/ faq

frequently asked

Do I need skBee or any other plugin?
No. This is 100% no-addon Skript. The chest inventory expression, slot assignment, click event, and the cancel-event effect are all built in.
How do I add more rows?
Change `chest inventory with 3 rows` to 1–6. Each row is 9 slots. Slot numbering starts at 0 in the top-left and goes left-to-right, top-to-bottom.
Can the GUI auto-refresh prices from a variable?
Yes — replace the hardcoded lore with a placeholder like `with lore "&7Cost: $%{price.diamond}%"`. Skript interpolates the variable when the slot is set.