Code:
on sign change:
player has permission "*":
line 1 is "VM":
set line 1 to "====================="
set line 2 to "&4Vagt"
set line 3 to "&4Menu"
set line 4 to "====================="
else:
stop
else:
stop
on click on sign:
player has permission "vagt.*":
line 2 is "&4Vagt":
line 3 is "&4Menu":
if player is holding a iron_sword of sharpness 1:
open chest with 1 rows named "&cOpgrader dit jernsværd!" to player
wait 3 ticks
format slot 4 of player with glowing iron_sword named "&4Jernsværd" with lore "sharpness 2" to close then run [make player execute command "/up JS 2"]
stop
else if player is holding a iron_sword of sharpness 2:
open chest with 1 rows named "&cOpgrader dit jernsværd!" to player
wait 3 ticks
format slot 4 of player with glowing iron_sword named "&4Jernsværd" with lore "sharpness 3" to close then run [make player execute command "/up JS 3"]
stop
else if player is holding a iron_sword of sharpness 3:
open chest with 1 rows named "&cOpgrader dit jernsværd!" to player
wait 3 ticks
format slot 4 of player with glowing iron_sword named "&4Jernsværd" with lore "sharpness 4" to close then run [make player execute command "/up JS 4"]
stop
else if player is holding a iron_sword of sharpness 4:
open chest with 1 rows named "&cOpgrader dit jernsværd!" to player
wait 3 ticks
format slot 4 of player with glowing iron_sword named "&4Jernsværd" with lore "Den kan ikke opgraderes mere!" to close
stop
else if player is holding a iron_sword:
open chest with 1 rows named "&cOpgrader dit jernsværd!" to player
wait 3 ticks
format slot 4 of player with glowing iron_sword named "&4Jernsværd" with lore "sharpness 1" to close then run [make player execute command "/up JS 1"]
stop
else if player is holding a iron_helmet of protection 1:
open chest with 1 rows named "&cOpgrader dit jernhjelm!" to player
wait 3 ticks
format slot 4 of player with glowing iron_helmet named "&4Jernhjelm" with lore "protection 2" to close then run [make player execute command "/up Jh 2"]
stop
else if player is holding a iron_helmet of protection 2:
open chest with 1 rows named "&cOpgrader dit jernhjelm!" to player
wait 3 ticks
format slot 4 of player with glowing iron_helmet named "&4Jernhjelm" with lore "protection 3" to close then run [make player execute command "/up Jh 3"]
stop
else if player is holding a iron_helmet of protection 3:
open chest with 1 rows named "&cOpgrader dit jernhjelm!" to player
wait 3 ticks
format slot 4 of player with glowing iron_helmet named "&4Jernhjelm" with lore "protection 4" to close then run [make player execute command "/up Jh 4"]
stop
else if player is holding a iron_helmet of protection 4:
open chest with 1 rows named "&cOpgrader dit jernhjelm!" to player
wait 3 ticks
format slot 4 of player with glowing iron_helmet named "&4Jernhjelm" with lore "Den kan ikke opgraderes mere!" to close
stop
else if player is holding a iron_helmet:
open chest with 1 rows named "&cOpgrader dit jernhjelm!" to player
wait 3 ticks
format slot 4 of player with glowing iron_helmet named "&4Jernhjelm" with lore "protection 1" to close then run [make player execute command "/up Jh 1"]
stop
else if player is holding a iron_chestplate of protection 1:
open chest with 1 rows named "&cOpgrader dit jernbrystplade!" to player
wait 3 ticks
format slot 4 of player with glowing iron_chestplate named "&4Jernbrystplade" with lore "protection 2" to close then run [make player execute command "/up Jp 2"]
stop
else if player is holding a iron_chestplate of protection 2:
open chest with 1 rows named "&cOpgrader dit jernbrystplade!" to player
wait 3 ticks
format slot 4 of player with glowing iron_chestplate named "&4Jernbrystplade" with lore "protection 3" to close then run [make player execute command "/up Jp 3"]
stop
else if player is holding a iron_chestplate of protection 3:
open chest with 1 rows named "&cOpgrader dit jernbrystplade!" to player
wait 3 ticks
format slot 4 of player with glowing iron_chestplate named "&4Jernbrystplade" with lore "protection 4" to close then run [make player execute command "/up Jp 4"]
stop
else if player is holding a iron_chestplate of protection 4:
open chest with 1 rows named "&cOpgrader dit jernbrystplade!" to player
wait 3 ticks
format slot 4 of player with glowing iron_chestplate named "&4Jernbrystplade" with lore "Den kan ikke opgraderes mere!" to close
stop
else if player is holding a iron_chestplate:
open chest with 1 rows named "&cOpgrader dit jernbrystplade!" to player
wait 3 ticks
format slot 4 of player with glowing iron_chestplate named "&4Jernbrystplade" with lore "protection 1" to close then run [make player execute command "/up Jp 1"]
stop
else if player is holding a iron_leggings of protection 1:
open chest with 1 rows named "&cOpgrader dit jernbukser!" to player
wait 3 ticks
format slot 4 of player with glowing iron_leggings named "&4Jernbukser" with lore "protection 2" to close then run [make player execute command "/up Jb 2"]
stop
else if player is holding a iron_leggings of protection 2:
open chest with 1 rows named "&cOpgrader dit jernbukser!" to player
wait 3 ticks
format slot 4 of player with glowing iron_leggings named "&4Jernbukser" with lore "protection 3" to close then run [make player execute command "/up Jb 3"]
stop
else if player is holding a iron_leggings of protection 3:
open chest with 1 rows named "&cOpgrader dit jernbukser!" to player
wait 3 ticks
format slot 4 of player with glowing iron_leggings named "&4Jernbukser" with lore "protection 4" to close then run [make player execute command "/up Jb 4"]
stop
else if player is holding a iron_leggings of protection 4:
open chest with 1 rows named "&cOpgrader dit jernbukser!" to player
wait 3 ticks
format slot 4 of player with glowing iron_leggings named "&4Jernbukser" with lore "Den kan ikke opgraderes mere!" to close
stop
else if player is holding a iron_leggings:
open chest with 1 rows named "&cOpgrader dit jernbukser!" to player
wait 3 ticks
format slot 4 of player with glowing iron_leggings named "&4Jernbukser" with lore "protection 1" to close then run [make player execute command "/up Jb 1"]
stop
else if player is holding a iron_boots of protection 1:
open chest with 1 rows named "&cOpgrader dit jernsko!" to player
wait 3 ticks
format slot 4 of player with glowing iron_boots named "&4Jernsko" with lore "protection 2" to close then run [make player execute command "/up Jsk 2"]
stop
else if player is holding a iron_boots of protection 2:
open chest with 1 rows named "&cOpgrader dit jernsko!" to player
wait 3 ticks
format slot 4 of player with glowing iron_boots named "&4Jernsko" with lore "protection 3" to close then run [make player execute command "/up Jsk 3"]
stop
else if player is holding a iron_boots of protection 3:
open chest with 1 rows named "&cOpgrader dit jernsko!" to player
wait 3 ticks
format slot 4 of player with glowing iron_boots named "&4Jernsko" with lore "protection 4" to close then run [make player execute command "/up Jsk 4"]
stop
else if player is holding a iron_boots of protection 4:
open chest with 1 rows named "&cOpgrader dit jernsko!" to player
wait 3 ticks
format slot 4 of player with glowing iron_boots named "&4Jernsko" with lore "Den kan ikke opgraderes mere!" to close
stop
else if player is holding a iron_boots:
open chest with 1 rows named "&cOpgrader dit jernsko!" to player
wait 3 ticks
format slot 4 of player with glowing iron_boots named "&4Jernsko" with lore "protection 1" to close then run [make player execute command "/up Jsk 1"]
stop
else if player is holding a bow of Power 1:
open chest with 1 rows named "&cOpgrader dit Bue!" to player
wait 3 ticks
format slot 4 of player with glowing bow named "&4Bue" with lore "Power 2" to close then run [make player execute command "/up bue 2"]
stop
else if player is holding a bow of Power 2:
open chest with 1 rows named "&cOpgrader dit Bue!" to player
wait 3 ticks
format slot 4 of player with glowing bow named "&4Bue" with lore "Power 3" to close then run [make player execute command "/up bue 3"]
stop
else if player is holding a bow of Power 3:
open chest with 1 rows named "&cOpgrader dit Bue!" to player
wait 3 ticks
format slot 4 of player with glowing bow named "&4Bue" with lore "Power 4" to close then run [make player execute command "/up bue 4"]
stop
else if player is holding a bow of Power 4:
open chest with 1 rows named "&cOpgrader dit Bue!" to player
wait 3 ticks
format slot 4 of player with glowing bow named "&4Bue" with lore "Den kan ikke opgraderes mere!" to close
stop
else if player is holding a bow:
open chest with 1 rows named "&cOpgrader dit Bue!" to player
wait 3 ticks
format slot 4 of player with glowing bow named "&4Bue" with lore "Power 1" to close then run [make player execute command "/up bue 1"]
stop
else:
open chest with 1 rows named "&cVagtmenu!" to player
wait 3 ticks
format slot 3 of player with glowing paper named "&4Shop" to close then run [make player execute command "/vagtshop"]
format slot 5 of player with anvil named "&4Fix" with lore "Hold den ting du vil reparere i hånden!" to close then run [make player execute command "/fixden"]
stop
command /up [<text>] [<text>]:
permission: vagt.*
trigger:
if arg 1 is "js":
if arg 2 is "0":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
else if player's money is between 100 and 10000000000000:
give player iron_sword named "&4Jernsværd" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "1":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
else if player's money is between 100 and 10000000000000:
remove an iron_sword from the player
give player iron_sword of sharpness 1 named "&4Jernsværd" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "2":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
if player's money is between 100 and 10000000000000:
remove an iron_sword from the player
give player iron_sword of sharpness 2 named "&4Jernsværd" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "3":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
if player's money is between 100 and 10000000000000:
remove an iron_sword from the player
give player iron_sword of sharpness 3 named "&4Jernsværd" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "4":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
if player's money is between 100 and 10000000000000:
remove an iron_sword from the player
give player iron_sword of sharpness 4 named "&4Jernsværd" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
if arg 1 is "jh":
if arg 2 is "0":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
else if player's money is between 100 and 10000000000000:
give player iron_helmet named "&4Jernhjelm" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "1":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
else if player's money is between 100 and 10000000000000:
remove an iron_helmet from the player
give player iron_helmet of protection 1 named "&4Jernhjelm" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "2":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
if player's money is between 100 and 10000000000000:
remove an iron_helmet from the player
give player iron_helmet of protection 2 named "&4Jernhjelm" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "3":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
if player's money is between 100 and 10000000000000:
remove an iron_helmet from the player
give player iron_helmet of protection 3 named "&4Jernhjelm" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "4":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
if player's money is between 100 and 10000000000000:
remove an iron_helmet from the player
give player iron_helmet of protection 4 named "&4Jernhjelm" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
if arg 1 is "jp":
if arg 2 is "0":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
else if player's money is between 100 and 10000000000000:
give player iron_chestplate named "&4Jernbrystplade" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "1":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
else if player's money is between 100 and 10000000000000:
remove an iron_chestplate from the player
give player iron_chestplate of protection 1 named "&4Jernbrystplade" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "2":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
if player's money is between 100 and 10000000000000:
remove an iron_chestplate from the player
give player iron_chestplate of protection 2 named "&4Jernbrystplade" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "3":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
if player's money is between 100 and 10000000000000:
remove an iron_chestplate from the player
give player iron_chestplate of protection 3 named "&4Jernbrystplade" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "4":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
if player's money is between 100 and 10000000000000:
remove an iron_chestplate from the player
give player iron_chestplate of protection 4 named "&4Jernbrystplade" with lore "&4 Dette tilhøre %player%"
if arg 1 is "jb":
if arg 2 is "0":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
else if player's money is between 100 and 10000000000000:
give player iron_leggings named "&4Jernbukser" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "1":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
else if player's money is between 100 and 10000000000000:
remove an iron_leggings from the player
give player iron_leggings of protection 1 named "&4Jernbukser" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "2":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
if player's money is between 100 and 10000000000000:
remove an iron_leggings from the player
give player iron_leggings of protection 2 named "&4Jernbukser" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "3":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
if player's money is between 100 and 10000000000000:
remove an iron_leggings from the player
give player iron_leggings of protection 3 named "&4Jernbukser" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "4":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
if player's money is between 100 and 10000000000000:
remove an iron_leggings from the player
give player iron_leggings of protection 4 named "&4Jernbukser" with lore "&4 Dette tilhøre %player%"
if arg 1 is "jsk":
if arg 2 is "0":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
else if player's money is between 100 and 10000000000000:
give player iron_boots named "&4Jernsko" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "1":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
else if player's money is between 100 and 10000000000000:
remove an iron_boots from the player
give player iron_boots of protection 1 named "&4Jernsko" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "2":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
if player's money is between 100 and 10000000000000:
remove an iron_boots from the player
give player iron_boots of protection 2 named "&4Jernsko" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "3":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
if player's money is between 100 and 10000000000000:
remove an iron_boots from the player
give player iron_boots of protection 3 named "&4Jernsko" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "4":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
if player's money is between 100 and 10000000000000:
remove an iron_boots from the player
give player iron_boots of protection 4 named "&4Jernsko" with lore "&4 Dette tilhøre %player%"
if arg 1 is "food":
if arg 2 is "0":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
else if player's money is between 100 and 10000000000000:
give player 16 cooked_pork named "&4Bacon" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
if arg 1 is "bue":
if arg 2 is "0":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
else if player's money is between 100 and 10000000000000:
give player bow named "&4bue" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "1":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
else if player's money is between 100 and 10000000000000:
remove an bow from the player
give player bow of power 1 named "&4bue" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "2":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
if player's money is between 100 and 10000000000000:
remove an bow from the player
give player bow of power 2 named "&4bue" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "3":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
if player's money is between 100 and 10000000000000:
remove an bow from the player
give player bow of power 3 named "&4bue" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
else if arg 2 is "4":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
if player's money is between 100 and 10000000000000:
remove an bow from the player
give player bow of power 4 named "&4bue" with lore "&4 Dette tilhøre %player%"
if arg 1 is "pile":
if arg 2 is "0":
if player's money is between 0 and 99:
message "&4VagtMenu &fDu har ikke råd til dette"
else if player's money is between 100 and 10000000000000:
give player 64 arrow named "&4Pile" with lore "&4 Dette tilhøre %player%"
remove 100 from player's balance
command /vagtshop:
permission: vagt.*
trigger:
if player has permission "vagt.c":
wait 3 ticks
open chest with 1 rows named "&cVagt shop!" to player
wait 3 ticks
format slot 0 of player with iron_helmet named "&4Jernhjelm" with lore "&4Tryk for at købe!" to close then run [make player execute command "/up jh 0"]
format slot 1 of player with iron_chestplate named "&4Jernbrystplade" with lore "&4Tryk for at købe!" to close then run [make player execute command "/up jp 0"]
format slot 2 of player with iron_leggings named "&4Jernbukser" with lore "&4Tryk for at købe!" to close then run [make player execute command "/up jb 0"]
format slot 3 of player with iron_boots named "&4Jernsko" with lore "&4Tryk for at købe!" to close then run [make player execute command "/up jsk 0"]
format slot 5 of player with 16 cooked_pork named "&4Bacon" with lore "&4Tryk for at købe!" to close then run [make player execute command "/up food 0"]
format slot 6 of player with iron_sword named "&4Jernssværd" with lore "&4Tryk for at købe!" to close then run [make player execute command "/up js 0"]
format slot 7 of player with bow named "&4Bue" with lore "&4Tryk for at købe!" to close then run [make player execute command "/up bue 0"]
format slot 8 of player with 64 arrow named "&4pile" with lore "&4Tryk for at købe!" to close then run [make player execute command "/up pile 0"]
format a gui slot 1 of %players% with ironsword to close then run [make player execute command "/spawn"]
command /fixden:
permission: vagt.*
trigger:
if player's money is between 0 and 1499:
message "&4VagtMenu &fDu har ikke råd til dette"
else if player's money is between 1500 and 10000000000000:
repair tool of player
remove 1500 from player's balance