Code:
variables:
{gui.slot0} = light blue stained glass pane
{gui.slot1} = light blue stained glass pane
{gui.slot2} = light blue stained glass pane
{gui.slot3} = light blue stained glass pane
{gui.slot4} = light blue stained glass pane
{gui.slot5} = light blue stained glass pane
{gui.slot6} = light blue stained glass pane
{gui.slot7} = light blue stained glass pane
{gui.slot8} = light blue stained glass pane
{gui.slot9} = light blue stained glass pane
{gui.slot10} = light blue stained glass pane
{gui.slot11} = light blue stained glass pane
{gui.slot12} = light blue stained glass pane
{gui.slot13} = light blue stained glass pane
{gui.slot14} = light blue stained glass pane
{gui.slot15} = light blue stained glass pane
{gui.slot16} = light blue stained glass pane
{gui.slot17} = light blue stained glass pane
{gui.slot18} = light blue stained glass pane
{gui.slot19} = light blue stained glass pane
{gui.slot20} = light blue stained glass pane
{gui.slot21} = light blue stained glass pane
{gui.slot22} = light blue stained glass pane
{gui.slot23} = light blue stained glass pane
{gui.slot24} = light blue stained glass pane
{gui.slot25} = light blue stained glass pane
{gui.slot26} = light blue stained glass pane
{gui.slot27} = light blue stained glass pane
{gui.slot28} = light blue stained glass pane
{gui.slot29} = light blue stained glass pane
{gui.slot30} = light blue stained glass pane
{gui.slot31} = light blue stained glass pane
{gui.slot32} = light blue stained glass pane
{gui.slot33} = light blue stained glass pane
{gui.slot34} = light blue stained glass pane
{gui.slot35} = light blue stained glass pane
{gui.slot36} = light blue stained glass pane
{gui.slot37} = light blue stained glass pane
{gui.slot38} = light blue stained glass pane
{gui.slot39} = light blue stained glass pane
{gui.slot40} = light blue stained glass pane
{gui.slot41} = light blue stained glass pane
{gui.slot42} = light blue stained glass pane
{gui.slot43} = light blue stained glass pane
{gui.slot44} = light blue stained glass pane
{tmp.hystery.%player%} = 0
{keyitem} = 0
command /hystery:
trigger:
open virtual chest inventory with size 5 named "&b[&fhystery GUI&b]" to player
wait 2 ticks
format gui slot 0 of player with {gui.slot0} to run player command "/givehead 1"
format gui slot 1 of player with {gui.slot1} to run player command "/givehead 2"
format gui slot 2 of player with {gui.slot2} to run player command "/givehead 3"
format gui slot 3 of player with {gui.slot3} to run player command "/givehead 4"
format gui slot 4 of player with {gui.slot4} to run player command "/givehead 5"
format gui slot 5 of player with {gui.slot5} to run player command "/givehead 6"
format gui slot 6 of player with {gui.slot6} to run player command "/givehead 7"
format gui slot 7 of player with {gui.slot7} to run player command "/givehead 8"
format gui slot 8 of player with {gui.slot8} to run player command "/givehead 9"
format gui slot 9 of player with {gui.slot9} to run player command "/givehead 10"
format gui slot 10 of player with {gui.slot10} to run player command "/givehead 11"
format gui slot 11 of player with {gui.slot11} to run player command "/givehead 12"
format gui slot 12 of player with {gui.slot12} to run player command "/givehead 13"
format gui slot 13 of player with {gui.slot13} to run player command "/givehead 14"
format gui slot 14 of player with {gui.slot14} to run player command "/givehead 15"
format gui slot 15 of player with {gui.slot15} to run player command "/givehead 16"
format gui slot 16 of player with {gui.slot16} to run player command "/givehead 17"
format gui slot 17 of player with {gui.slot17} to run player command "/givehead 18"
format gui slot 18 of player with {gui.slot18} to run player command "/givehead 19"
format gui slot 19 of player with {gui.slot19} to run player command "/givehead 20"
format gui slot 20 of player with {gui.slot20} to run player command "/givehead 21"
format gui slot 21 of player with {gui.slot21} to run player command "/givehead 22"
format gui slot 22 of player with {gui.slot22} to run player command "/givehead 23"
format gui slot 23 of player with {gui.slot23} to run player command "/givehead 24"
format gui slot 24 of player with {gui.slot24} to run player command "/givehead 25"
format gui slot 25 of player with {gui.slot25} to run player command "/givehead 26"
format gui slot 26 of player with {gui.slot26} to run player command "/givehead 27"
format gui slot 27 of player with {gui.slot27} to run player command "/givehead 28"
format gui slot 28 of player with {gui.slot28} to run player command "/givehead 29"
format gui slot 29 of player with {gui.slot29} to run player command "/givehead 30"
format gui slot 30 of player with {gui.slot30} to run player command "/givehead 31"
format gui slot 31 of player with {gui.slot31} to run player command "/givehead 32"
format gui slot 32 of player with {gui.slot32} to run player command "/givehead 33"
format gui slot 33 of player with {gui.slot33} to run player command "/givehead 34"
format gui slot 34 of player with {gui.slot34} to run player command "/givehead 35"
format gui slot 35 of player with {gui.slot35} to run player command "/givehead 36"
format gui slot 36 of player with {gui.slot36} to run player command "/givehead 37"
format gui slot 37 of player with {gui.slot37} to run player command "/givehead 38"
format gui slot 38 of player with {gui.slot38} to run player command "/givehead 39"
format gui slot 39 of player with {gui.slot39} to run player command "/givehead 40"
format gui slot 40 of player with {gui.slot40} to run player command "/givehead 41"
format gui slot 41 of player with {gui.slot41} to run player command "/givehead 42"
format gui slot 42 of player with {gui.slot42} to run player command "/givehead 43"
format gui slot 43 of player with {gui.slot43} to run player command "/givehead 44"
format gui slot 44 of player with {gui.slot44} to run player command "/givehead 45"
command /sethead [<text>]:
permission: hystery.set
permission message: &8[&fHystery&8] &cDu hast keine Rechte dazu!
trigger:
if arg is not set:
message "&8[&fHystery&8] &e/sethead <1 - 54>"
if arg is set:
if arg is "1":
set {gui.slot0} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "2":
set {gui.slot1} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "3":
set {gui.slot2} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "4":
set {gui.slot3} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "5":
set {gui.slot4} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "6":
set {gui.slot5} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "7":
set {gui.slot6} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "8":
set {gui.slot7} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "9":
set {gui.slot8} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "10":
set {gui.slot9} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "11":
set {gui.slot10} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "12":
set {gui.slot11} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "13":
set {gui.slot12} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "14":
set {gui.slot13} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "15":
set {gui.slot14} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "16":
set {gui.slot15} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "17":
set {gui.slot16} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "18":
set {gui.slot17} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "19":
set {gui.slot18} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "20":
set {gui.slot19} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "21":
set {gui.slot20} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "22":
set {gui.slot21} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "23":
set {gui.slot22} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "24":
set {gui.slot23} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "25":
set {gui.slot24} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "26":
set {gui.slot25} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "27":
set {gui.slot26} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "28":
set {gui.slot27} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "29":
set {gui.slot28} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "30":
set {gui.slot29} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "31":
set {gui.slot30} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "32":
set {gui.slot31} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "33":
set {gui.slot32} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "34":
set {gui.slot33} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "35":
set {gui.slot34} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "36":
set {gui.slot35} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "37":
set {gui.slot36} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "38":
set {gui.slot37} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "39":
set {gui.slot38} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "40":
set {gui.slot39} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "41":
set {gui.slot40} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "42":
set {gui.slot41} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "43":
set {gui.slot42} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "44":
set {gui.slot43} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is "45":
set {gui.slot44} to player's tool
message "&8[&fHystery&8] &7Slot %arg% ist jetzt &e%player's tool%."
if arg is not "1" or "2" or "3" or "4" or "5" or "6" or "7" or "8" or "9" or "10" or "11" or "12" or "13" or "14" or "15" or "16" or "17" or "18" or "19" or "20" or "21" or "22" or "23" or "24" or "25" or "26" or "27" or "28" or "29" or "30" or "31" or "32" or "33" or "34" or "35" or "36" or "37" or "38" or "39" or "40" or "41" or "42" or "43" or "44" or "45" or "46" or "47" or "48" or "49" or "50" or "51" or "52" or "53" or "54":
message "&8[&fHystery&8] &e/sethead <1 - 54>"
command /givehead [<text>]:
trigger:
if arg is not set:
message "&fUnknown command. Type ""/help"" for help."
if arg is set:
loop all items in player's inventory:
if loop-item is {keyitem}:
add 1 to {tmp.hystery.%player%}
if {tmp.hystery.%player%} is 0:
message "&8[&fHystery&8] &cDu musst einen Hystery Key in deinem Inventar haben!"
stop
if {tmp.hystery.%player%} is not set:
message "&8[&fHystery&8] &cDu musst einen Hystery Key in deinem Inventar haben!"
stop
set {tmp.hystery.%player%} to 0
if arg is "1":
give {gui.slot0} to the player
remove {keyitem} from the player's inventory
if arg is "2":
give {gui.slot1} to the player
remove {keyitem} from the player's inventory
if arg is "3":
give {gui.slot2} to the player
remove {keyitem} from the player's inventory
if arg is "4":
give {gui.slot3} to the player
remove {keyitem} from the player's inventory
if arg is "5":
give {gui.slot4} to the player
remove {keyitem} from the player's inventory
if arg is "6":
give {gui.slot5} to the player
remove {keyitem} from the player's inventory
if arg is "7":
give {gui.slot6} to the player
remove {keyitem} from the player's inventory
if arg is "8":
give {gui.slot7} to the player
remove {keyitem} from the player's inventory
if arg is "9":
give {gui.slot8} to the player
remove {keyitem} from the player's inventory
if arg is "10":
give {gui.slot9} to the player
remove {keyitem} from the player's inventory
if arg is "11":
give {gui.slot10} to the player
remove {keyitem} from the player's inventory
if arg is "12":
give {gui.slot11} to the player
remove {keyitem} from the player's inventory
if arg is "13":
give {gui.slot12} to the player
remove {keyitem} from the player's inventory
if arg is "14":
give {gui.slot13} to the player
remove {keyitem} from the player's inventory
if arg is "15":
give {gui.slot14} to the player
remove {keyitem} from the player's inventory
if arg is "16":
give {gui.slot15} to the player
remove {keyitem} from the player's inventory
if arg is "17":
give {gui.slot16} to the player
remove {keyitem} from the player's inventory
if arg is "18":
give {gui.slot17} to the player
remove {keyitem} from the player's inventory
if arg is "19":
give {gui.slot18} to the player
remove {keyitem} from the player's inventory
if arg is "20":
give {gui.slot19} to the player
remove {keyitem} from the player's inventory
if arg is "21":
give {gui.slot20} to the player
remove {keyitem} from the player's inventory
if arg is "22":
give {gui.slot21} to the player
remove {keyitem} from the player's inventory
if arg is "23":
give {gui.slot22} to the player
remove {keyitem} from the player's inventory
if arg is "24":
give {gui.slot23} to the player
remove {keyitem} from the player's inventory
if arg is "25":
give {gui.slot24} to the player
remove {keyitem} from the player's inventory
if arg is "26":
give {gui.slot25} to the player
remove {keyitem} from the player's inventory
if arg is "27":
give {gui.slot26} to the player
remove {keyitem} from the player's inventory
if arg is "28":
give {gui.slot27} to the player
remove {keyitem} from the player's inventory
if arg is "29":
give {gui.slot28} to the player
remove {keyitem} from the player's inventory
if arg is "30":
give {gui.slot29} to the player
remove {keyitem} from the player's inventory
if arg is "31":
give {gui.slot30} to the player
remove {keyitem} from the player's inventory
if arg is "32":
give {gui.slot31} to the player
remove {keyitem} from the player's inventory
if arg is "33":
give {gui.slot32} to the player
remove {keyitem} from the player's inventory
if arg is "34":
give {gui.slot33} to the player
remove {keyitem} from the player's inventory
if arg is "35":
give {gui.slot34} to the player
remove {keyitem} from the player's inventory
if arg is "36":
give {gui.slot35} to the player
remove {keyitem} from the player's inventory
if arg is "37":
give {gui.slot36} to the player
remove {keyitem} from the player's inventory
if arg is "38":
give {gui.slot37} to the player
remove {keyitem} from the player's inventory
if arg is "39":
give {gui.slot38} to the player
remove {keyitem} from the player's inventory
if arg is "40":
give {gui.slot39} to the player
remove {keyitem} from the player's inventory
if arg is "41":
give {gui.slot40} to the player
remove {keyitem} from the player's inventory
if arg is "42":
give {gui.slot41} to the player
remove {keyitem} from the player's inventory
if arg is "43":
give {gui.slot42} to the player
remove {keyitem} from the player's inventory
if arg is "44":
give {gui.slot43} to the player
remove {keyitem} from the player's inventory
if arg is "45":
give {gui.slot44} to the player
remove {keyitem} from the player's inventory
if arg is not "1" or "2" or "3" or "4" or "5" or "6" or "7" or "8" or "9" or "10" or "11" or "12" or "13" or "14" or "15" or "16" or "17" or "18" or "19" or "20" or "21" or "22" or "23" or "24" or "25" or "26" or "27" or "28" or "29" or "30" or "31" or "32" or "33" or "34" or "35" or "36" or "37" or "38" or "39" or "40" or "41" or "42" or "43" or "44" or "45" or "46" or "47" or "48" or "49" or "50" or "51" or "52" or "53" or "54":
message "&8[&fHystery&8] &e/givehead <1 - 54>"
command /setkey:
permission: hystery.set
permission message: &8[&fHystery&8] &cDu hast keine Rechte dazu!
trigger:
set {keyitem} to player's tool
message "&8[&fHystery&8] &7Das Tauschitem ist nun &e%player's tool%."
The script is for players who can buy decoration heads with "Hystery Keys".