Format Slot

  • 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 want to make a Format gui with on and off but there is always this error message "end crystal named "&a&lTest" is not an nbt compound" Can somebody fix that?

Code:
function uGUI(p: player):
    set {_p}'s metadata tag "uGUI" to chest inventory with 5 rows named "TEST"
    set slot 30 of {_p}'s metadata tag "uGUI" to End Crystal named "&a&lTest" with lore "&fClick to change <##ff0000>OFF"
    open {_p}'s metadata tag "uGUI" to {_p}

command /test:
    trigger:
        uGUI(player)
on inventory click:
    if event-inventory = player's metadata tag "uGUI":
        cancel event
        if index of event-slot = 30:
            format slot 30 of player with End Crystal named "&a&lTest" with lore "&fClick to change &aON"