k so this is probably really obvious but i just cant figure it out. (skript-gui syntax)

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

    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!

completeidiot

Member
May 5, 2024
46
1
8
so i checked the skript-gui documentation, and i cannot understand it at all so thats nice

tell me if you need the full code but this is probably the only required one i think (?)
the issue is that when i put "if clicked slot is <whatever number> it includes the inventory slots and not just the base gui

code:

Code:
on script load:
    create a gui with id "moneygenshop" with virtual chest inventory with 5 rows named "shop" and shape "ympdfwgay", "ttttttttt", "xxxxxxxxx", "xxxxxxxxx", and "xxxxxxxxx":
        make gui slot "y" with yellow stained glass named "&e Click These Icons to Change Shop Page!" with lore "&8Welcome %player%!"
        make gui slot "t" with yellow glazed terracotta named "&7↑Categories" with lore "" and "&7↓Purchase"
        make gui slot "x" with light gray stained glass pane named " "
        make gui slot "-" with red stained glass pane named "&c&lIn Progress"
        make gui slot "m" with sunflower of mending with all item flags named "&fMoney Generation" with lore "&8Welcome %player%!" and "&aSelected!"
        make gui slot "p" with iron sword with all item flags named "&fPvP" with lore "&8Welcome %player%!"
        make gui slot "d" with shield with all item flags named "&fDefences" with lore "&8Welcome %player%!"
        make gui slot "f" with golden carrot with all item flags named "&fFood" with lore "&8Welcome %player%!"
        make gui slot "w" with iron horse armor with all item flags named "&fGuns" with lore "&8Welcome %player%!"
        make gui slot "g" with gold ingot with all item flags named "&fGold" with lore "&8Welcome %player%!"
        make gui slot "a" with end crystal with all item flags named "&fAscension" with lore "&8Welcome %player%!"
        make gui slot "1" with iron sword with all item flags named "&fPvP" with lore "&8Welcome %player%!"

    create a gui with id "pvpshop" with virtual chest inventory with 5 rows named "shop" and shape "ympdfwgay", "ttttttttt", "xxxxxxxxx", "xxxxxxxxx", and "xxxxxxxxx":
        make gui slot "y" with yellow stained glass named "&e Click These Icons to Change Shop Page!" with lore "&8Welcome %player%!"
        make gui slot "t" with yellow glazed terracotta named "&7↑Categories" with lore "" and "&7↓Purchase"
        make gui slot "x" with light gray stained glass pane named " "
        make gui slot "-" with red stained glass pane named "&c&lIn Progress"
        make gui slot "m" with sunflower with all item flags named "&fMoney Generation" with lore "&8Welcome %player%!"
        make gui slot "p" with iron sword of mending with all item flags named "&fPvP" with lore "&8Welcome %player%!" and "&aSelected!"
        make gui slot "d" with shield with all item flags named "&fDefences" with lore "&8Welcome %player%!"
        make gui slot "f" with golden carrot with all item flags named "&fFood" with lore "&8Welcome %player%!"
        make gui slot "w" with iron horse armor with all item flags named "&fGuns" with lore "&8Welcome %player%!"
        make gui slot "g" with gold ingot with all item flags named "&fGold" with lore "&8Welcome %player%!"
        make gui slot "a" with end crystal with all item flags named "&fAscension" with lore "&8Welcome %player%!"
        make gui slot "1" with iron sword with all item flags named "&fPvP" with lore "&8Welcome %player%!"

on inventory click:
    if name of player's current inventory is "shop":
        if clicked slot is 1:
            close inventory of player
            open gui with id "moneygenshop" to player
        if clicked slot is 2:
            close inventory of player
            open gui with id "pvpshop" to player

sorry if this is confusing or whatever, also sorry for making this in the most annoying way possible, but basically when i click the second and third slot on my hotbar, it detects it instead of the second and third slot on the gui

also yes this is a blatant copy of the Minehut server Moneyfight
1754650386088.png
 
Yes, if you use if the clicked slot is 1 or similarly if event-slot is 1 It detects both the GUI you created and your personal inventory. I suggest using the names of the items you click on. For example: if name of event-slot is "name"

My first time seeing this abnormal way of making a GUI. :emoji_laughing:
 
Last edited: