If you have been sent a skript from StrxmyLive#0001 that includes this websites link but it isn't on here it just hasn't been added yet!
Creating a GUI in skript may seem difficult but it isn't that hard, thats why I am making this tutorial!
First, lets get a command created:
command /testgui:
trigger:
Secondly lets make the command create the GUI:
command /testgui:
trigger:
set {_testgui} to a new chest inventory with 3 row named "&aGUI Testing"
Now lets add an item or block to the GUI:
command /testgui:
trigger:
set {_testgui} to a new chest inventory with 3 row named "&aGUI Testing"
set slot 1 of {_testgui} to water bucket named "&1Make it rain"
Time to make the bucket of water in the gui do something:
command /testgui:
trigger:
set {_testgui} to a new chest inventory with 3 row named "&aGUI Testing"
set slot 1 of {_testgui} to water bucket named "&1Make it rain"
open {_testgui} to player
#INV-CLICK-EVNT
on inventory click:
if name of event-inventory is "&aGUI Testing"
if index of event-slot = 1:
cancel event
set weather to rain
message "&1Made it rain :D"
There you have a working GUI!
NOTE: I would recommend you lay it out like this:
command /testgui:
trigger:
#INV-GUI-MAIN
set {_testgui} to a new chest inventory with 3 row named "&aGUI Testing"
set slot 1 of {_testgui} to water bucket named "&1Make it rain"
#INV-CLICK-EVNT
on inventory click:
if name of event-inventory is "&aGUI Testing"
if index of event-slot = 1:
cancel event
set weather to rain
message "&1Made it rain :D"
For a second slot do this:
command /testgui:
trigger:
#INV-GUI-MAIN
set {_testgui} to a new chest inventory with 3 row named "&aGUI Testing"
set slot 1 of {_testgui} to water bucket named "&1Make it rain"
set slot 2 of (_testgui} to bedrock named "&1Set it to night"
#INV-CLICK-EVNT
on inventory click:
if name of event-inventory is "&aGUI Testing"
if index of event-slot = 1:
cancel event
set weather to rain
message "&1Made it rain :D"
on inventory click:
if name of event-inventory is "&aGUI Testing"
if index of event-slot = 2:
cancel event
set time to night
message "&f:o | Its dark!"
If you have any suggestions on what we should add here feel free to contact staff in the discord!