I'm trying to make it so that anytime that anybody on the server clicks it, it will affect me. I can't figure out how to specify this though. The line of code that says, "set ElementAstronaut's max health to 10" is the one that I want to specify, but ElementAstronaut doesn't get recognized
Code:
on inventory click:
if inventory name of player's current inventory is "&b&lRevive Menu":
cancel event
clicked slot is 9:
set ElementAstronaut's max health to 10
close player's inventory
loop all players:
send title "&4&lElementAstronaut &e&lHas" with subtitle "&e&lBeen &b&lRevived!" to player for 5 seconds
play sound "block.note_block.chime" at volume 10 at pitch 1 to player
play sound "block.note_block.chime" at volume 10 at pitch 1 to player
play sound "block.note_block.chime" at volume 10 at pitch 2 to player
play sound "block.note_block.chime" at volume 10 at pitch 3 to player