It's easiest to look at examples as opposed to the syntax(which can be super confusing at first). Firstly, use this button here to put your code in a code box:
, it'll be so much easier to read, second, it's as easy as removing "to be unstealable" and adding "gui" before slot. So it would look like this:
code_language.skript:
format gui slot 0 of player with gray glass pane named "banana"
items formatted with tuske are unstealable by default
[doublepost=1503022848,1503022591][/doublepost]This example command is a great example of many diff ways you can use it.
code_language.skript:
command /guiExample:
trigger:
open virtual chest inventory to player
format gui slot 0 of player with stone named "It won't do anything"
format gui slot 1 of player with stone named "It will just close" to close
format gui slot 2 of player with stone named "It will just close but only with pressing a number key" to close using number key
format gui slot 3 of player with stone named "It will make the player execute a command, but he might not have permission" to run player command "/gui"
format gui slot 4 of player with stone named "It will make the player execute a command with ""*"" permission" to run player command "/gui" with permission "*"
format gui slot 5 of player with stone named "It will make the console execute a command" to run console command "/gui"
format gui slot 6 of player with stone named "It will run the function doSomething()" to run function doSomething()
format gui slot 7 of player with stone named "It will close and then run the function doSomething()" to close then run function doSomething()
format gui slot 8 of player with stone named "It will run doSomething() if you click on it with a stone" to run function doSomething() with cursor stone
format gui slot 9 of player with stone named "It will run the gui event" to run gui event
format gui slot 10 of player with stone named "It will execute the code below":
send "Hi" to player
give a stone to player
heal player