Hello, i'm trying to make it so when a player clicks on the green wool (clear inventory confirm) it does this: execute console command "clear %player%" and when you click the red wool (cancel) it closes the GUI. I'm quite new to skript, don't know much. Any ideas?
Code:
command /ci:
permission: ci.sk
permission message: &cNo Permission.
trigger:
wait 2 ticks
open chest with 3 rows named "&8Clear Inventory" to player
format slot 0 of player with gray stained glass pane named " " to be unstealable
format slot 1 of player with gray stained glass pane named " " to be unstealable
format slot 2 of player with gray stained glass pane named " " to be unstealable
format slot 3 of player with gray stained glass pane named " " to be unstealable
format slot 4 of player with gray stained glass pane named " " to be unstealable
format slot 5 of player with gray stained glass pane named " " to be unstealable
format slot 6 of player with gray stained glass pane named " " to be unstealable
format slot 7 of player with gray stained glass pane named " " to be unstealable
format slot 8 of player with gray stained glass pane named " " to be unstealable
format slot 9 of player with gray stained glass pane named " " to be unstealable
format slot 10 of player with gray stained glass pane named " " to be unstealable
format slot 11 of player with lime wool named "&a&l✔ &2&lCONFIRM " with lore "&aDescription:" and " &a&l| &r&7Confirm that you want to clear" and " &a&l| &r&7the items from your inventory." and " " and "&eClick to clear your inventory. " to be unstealable
format slot 12 of player with gray stained glass pane named " " to be unstealable
format slot 13 of player with gray stained glass pane named " " to be unstealable
format slot 14 of player with gray stained glass pane named " " to be unstealable
format slot 15 of player with red wool named "&c&l❌ &4&lCANCEL " with lore "&cDescription:" and " &c&l| &r&7Click to cancel and close menu." and " " and "&eClick to cancel. " to be unstealable
format slot 16 of player with gray stained glass pane named " " to be unstealable
format slot 17 of player with gray stained glass pane named " " to be unstealable
format slot 18 of player with gray stained glass pane named " " to be unstealable
format slot 19 of player with gray stained glass pane named " " to be unstealable
format slot 20 of player with gray stained glass pane named " " to be unstealable
format slot 21 of player with gray stained glass pane named " " to be unstealable
format slot 22 of player with gray stained glass pane named " " to be unstealable
format slot 23 of player with gray stained glass pane named " " to be unstealable
format slot 24 of player with gray stained glass pane named " " to be unstealable
format slot 25 of player with gray stained glass pane named " " to be unstealable
format slot 26 of player with gray stained glass pane named " " to be unstealable