So i am trying to make it when u click a item it changes variables and updates the gui
My Code so far
command /skills:
trigger:
skills()
function skills():
open virtual chest named "&4&lSkills" with size 3 to player
format gui slot 0 and 1 and 2 and 3 and 4 and 5 and 6 and 7 and 8 and 9 and 15 and 17 and 18 and 19 and 20 and 21 and 22 and 23 and 24 and 25 and 26 of player with White Stained Glass Pane named " " to do nothing
format gui slot 16 of player with Beacon named "&6&lSkill Points" with lore "&a%{skill}%" to do nothing
format gui slot 10 of player with golden apple named "&c&lHealth &6+%{Health}%" to run:
if {skill} > 0:
set {skill} to {skill} - 1
set {health} to {health} + 1
skills()
I don't really know how to use functions the best but this was my idea to try and get it to reload.