Settings GUI Skript! I need Help

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

Oct 29, 2023
34
2
8
24
So I'am a beginner with skript and I want to code a /settings gui Skript for my SMP Server. I made it but I dont know how to solve the error messages.
Can someone fix this please. Tuske wont work on my server.

command /Settings:
trigger:
set {_settings} to chest inventory with 5 rows named "Settings"
set slot 11 of {_settings} to End_Crystal named ""<00bfff>&lᴛᴏɢɢʟᴇ ꜰᴀꜱᴛᴄʀʏꜱᴛᴀʟ" with lore ", "&f&lᴄʟɪᴄᴋ ᴛᴏ ᴛᴏɢɢʟᴇ ꜰᴀꜱᴛ ᴄʀʏꜱᴛᴀʟ"
set slot 13 of {_settings} to Gold_Ingot named ""<#ffd700>&lᴛᴏɢɢʟᴇ ᴘᴀʏᴍᴇɴᴛꜱ" with lore ", "&f&lᴄʟɪᴄᴋ ᴛᴏ ᴛᴏɢɢʟᴇ ᴘᴀʏᴍᴇɴᴛꜱ"
set slot 15 of {_settings} to Oak_Sign named ""<#f4a460>&lᴛᴏɢɢʟᴇ ᴄʜᴀᴛ" with lore ", "&f&lᴄʟɪᴄᴋ ᴛᴏ ᴛᴏɢɢʟᴇ ᴄʜᴀᴛ &a&lOn"
set slot 17 of {_settings} to Warped_Sign named ""<#20b2aa>&lᴛᴏɢɢʟᴇ ᴍꜱɢ" with lore ","&f&lᴄʟɪᴄᴋ ᴛᴏ ᴛᴏɢɢʟᴇ ᴍꜱɢ &a&lOn"
set slot 31 of {_settings} to Potion_of_Night_Vision named ""<#0000ff>&lɴɪɢʜᴛᴠɪꜱᴏɴ ᴛᴏɢɢʟᴇ" with lore "", "&f&lᴄʟɪᴄᴋ ᴛᴏ ɢᴇᴛ ɴɪɢʜᴛᴠɪꜱɪᴏɴ"
set slot 33 of {_settings} to Ender_Pearl named ""<#00ff00>&lᴛᴘᴀ/ʜᴇʀᴇ ᴛᴏɢɢʟᴇ" with lore ", "&f&lᴄʟɪᴄᴋ ᴛᴏ ʀᴇᴄᴇɪᴠᴇ ᴛᴘᴀ ᴀɴᴅ ᴛᴘᴀʜᴇʀᴇ ʀᴇQᴜᴇꜱᴛꜱ"
set slot 45 of {_settings} to Barrier named ""<#ff0000>&lʙᴀᴄᴋ"
open gui to player



on inventory click:
if name of inventory = "Settings":
cancel event
if clicked slot = 11
make player execute command "/fastcrystal"
cancel event
if clicked slot = 13
make player execute command "/paytoggle"
cancel event
if clicked slot = 15
make player execute command ""
cancel event
if clicked slot = 17
make player execute command "/msgtoggle"
cancel event
if clicked slot = 31
make player execute command "/effect give @s minecraft:night_vision infinite"
cancel event
if clicked slot = 33
make player execute command "/tptoggle"
cancel event
if clicked slot = 45
close player's inventory
stop
 
Hey, you can try this, im not sure, if the signs will display well.
Code:
function GUI(p: player):
    set {_p}'s metadata tag "settingsGUI" to chest inventory with 5 rows named "Settings"
    set slot 11 of {_p}'s metadata tag "settingsGUI" to End Crystal named "<##00bfff>&lᴛᴏɢɢʟᴇ ꜰᴀꜱᴛᴄʀʏꜱᴛᴀʟ" with lore "&f&lᴄʟɪᴄᴋ ᴛᴏ ᴛᴏɢɢʟᴇ ꜰᴀꜱᴛ ᴄʀʏꜱᴛᴀʟ"
    set slot 13 of {_p}'s metadata tag "settingsGUI" to Gold ingot named "<##ffd700>&lᴛᴏɢɢʟᴇ ᴘᴀʏᴍᴇɴᴛꜱ" with lore "&f&lᴄʟɪᴄᴋ ᴛᴏ ᴛᴏɢɢʟᴇ ᴘᴀʏᴍᴇɴᴛꜱ"
    set slot 15 of {_p}'s metadata tag "settingsGUI" to oak sign named "<##f4a460>&lᴛᴏɢɢʟᴇ ᴄʜᴀᴛ" with lore "&f&lᴄʟɪᴄᴋ ᴛᴏ ᴛᴏɢɢʟᴇ ᴄʜᴀᴛ &a&lOn"
    set slot 29 of {_p}'s metadata tag "settingsGUI" to warped sign named "<##20b2aa>&lᴛᴏɢɢʟᴇ ᴍꜱɢ" with lore "&f&lᴄʟɪᴄᴋ ᴛᴏ ᴛᴏɢɢʟᴇ ᴍꜱɢ &a&lOn"
    set slot 31 of {_p}'s metadata tag "settingsGUI" to potion of night vision with all flags hidden named "<##0000ff>&lɴɪɢʜᴛᴠɪꜱᴏɴ ᴛᴏɢɢʟᴇ" with lore "&f&lᴄʟɪᴄᴋ ᴛᴏ ɢᴇᴛ ɴɪɢʜᴛᴠɪꜱɪᴏɴ"
    set slot 33 of {_p}'s metadata tag "settingsGUI" to ender pearl named "<##00ff00>&lᴛᴘᴀ/ʜᴇʀᴇ ᴛᴏɢɢʟᴇ" with lore "&f&lᴄʟɪᴄᴋ ᴛᴏ ʀᴇᴄᴇɪᴠᴇ ᴛᴘᴀ ᴀɴᴅ ᴛᴘᴀʜᴇʀᴇ ʀᴇQᴜᴇꜱᴛꜱ"
    set slot 44 of {_p}'s metadata tag "settingsGUI" to barrier named "<##ff0000>&lʙᴀᴄᴋ"
    open {_p}'s metadata tag "settingsGUI" to {_p}
   
command /settings:
    trigger:
        GUI(player)
on inventory click:
    if event-inventory = player's metadata tag "settingsGUI":
        cancel event
        if index of event-slot = 11:
            make player execute command "/fastcrystal"
        if index of event-slot = 13:
            make player execute command "/paytoggle"
        if index of event-slot = 15:
            make player execute command ""
        if index of event-slot = 29:
            make player execute command "/msgtoggle"
        if index of event-slot = 31:
            make player execute command "/effect give @s minecraft:night_vision infinite"
        if index of event-slot = 33:
            make player execute command "/tptoggle"
        if index of event-slot = 44:
            close inventory of player
Next time please use code format to send your code.