I'm trying to check a gui slot that a player can put items in that sets that gui slot to a variable and gives it a lore if it doesn't have one already. If anyone knows how to do this and could help me that would be amazing.
Code:
on right click on end portal frame:
if player's world is not "spawn":
send "&cNo"
stop
else:
set {_slot} to 0
create a gui with virtual chest with 4 rows named "&8&lItem Converter":
loop 36 times:
make gui slot {_slot} with gray stained glass pane named "&7"
add 1 to {_slot}
remove gui slot 11
set {_playerItem} to gui slot 11 of player
make gui slot 20 with gray dye named "&dConvert Item":
if {_playerItem} contains a diamond sword:
if lore of {_playerItem} tool doesn't contain "&cConverted Item":
close player's inventory
send "&eCongrats!"
give player {_playerItem}
else:
stop
else:
close player's inventory
give player {_playerItem}
send "&cYou can only convert weapons and armor to a converted item."
stop
open last gui to player