Advertisement
Guest User

Armorer.sk

a guest
May 3rd, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VBScript 19.45 KB | None | 0 0
  1. on respawn:
  2.     wait 1 tick
  3.     set helmet slot of player to a leather helmet
  4.     set chestplate slot of player to a leather chestplate
  5.     set legging slot of player to leather chestplates
  6.     set boot slot of player to leather boots
  7.  
  8. on inventory click:
  9.     if clicked slot is 36 or 37 or 38 or 39:
  10.         player does not have permission "custom.armorclick.bypass"
  11.         cancel event
  12.      
  13.  
  14.  
  15. on rightclick on entity:
  16.     if clicked entity is a citizen:
  17.         if entity is "Armorer":
  18.             open chest with 6 row named "&6&lArmor Upgrades" to player
  19.  
  20. #close menu
  21.             format gui slot 53 of the player with red stained glass pane named "&c&lExit Menu" to run:
  22.                 cancel event
  23.                 close player's inventory
  24.  
  25.  
  26. #Chain Helmet-----------------------------------------------------------------------------------------
  27. #-----------------------------------------------------------------------------------------------------
  28.  
  29.             if {custom.armorer.chainheadUnlocked.%player%} is true:
  30.                 format gui slot 10 of the player with chainmail helmet named "&7&nChainmail Helmet" with lore "&6Unlocked", "", and "&aCost: $50" to run:
  31.                     cancel event
  32.                     if helmet slot of player is chain helmet or gold helmet or iron helmet or diamond helmet:
  33.                         send "&c&lError!&7 you already have a better helmet equipped!"
  34.                         play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  35.                         close player's inventory
  36.                    else:
  37.                         if player's money >= 50:
  38.                            remove 50 from player's money
  39.                            set helmet slot of player to chainmail helmet
  40.                             close player's inventory
  41.                            play sound "entity.experience_orb.pickup" with volume 1 and pitch 1 at player for player
  42.                         else:
  43.                             send "&c&lError! &7You do not have enough money to purchase this item!"
  44.                             play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  45.                             close player's inventory
  46.            else if {custom.armorer.chainheadUnlocked.%player%} is not true:
  47.                 format gui slot 10 of the player with chainmail helmet named "&7&nChainmail Helmet" with lore "&cNot Unlocked", "&bCost to unlock:", "&a - 32 Coal", and "&a - 8 Iron Ingots" to run:
  48.                     cancel event
  49.                     if number of coal in player's inventory >= 32:
  50.                        if number of iron ingot in player's inventory >= 8:
  51.                            remove 32 coal from player's inventory
  52.                            remove 8 iron ingot from player's inventory
  53.                            set helmet slot of player to chainmail helmet
  54.                             send "&a&lUNLOCK! &7Chainmail Helmet"
  55.                             play sound "entity.player.levelup" with volume 1 and pitch 2 at player for player
  56.                             set {custom.armorer.chainheadUnlocked.%player%} to true
  57.                         else:
  58.                             send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
  59.                             play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  60.                     else:
  61.                         send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
  62.                         play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  63.                     close player's inventory
  64.  
  65. #-----------------------------------------------------------------------------------------------------
  66. #Chain Helmet-----------------------------------------------------------------------------------------
  67.  
  68.  
  69.  
  70. #Chain Chestplate-------------------------------------------------------------------------------------
  71. #-----------------------------------------------------------------------------------------------------
  72.  
  73.             if {custom.armorer.chainchestUnlocked.%player%} is true:
  74.                 format gui slot 19 of the player with chainmail chestplate named "&7&nChainmail Chestplate" with lore "&6Unlocked", "", and "&aCost: $100" to run:
  75.                     cancel event
  76.                     if chestplate slot of player is chain chestplate or gold chestplate or iron chestplate or diamond chestplate:
  77.                         send "&c&lError!&7 you already have a better chestplate equipped!"
  78.                         play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  79.                         close player's inventory
  80.                    else:
  81.                         if player's money >= 100:
  82.                            remove 100 from player's money
  83.                            set chestplate slot of player to chainmail chestplate
  84.                             close player's inventory
  85.                            play sound "entity.experience_orb.pickup" with volume 1 and pitch 1 at player for player
  86.                         else:
  87.                             send "&c&lError! &7You do not have enough money to purchase this item!"
  88.                             play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  89.                             close player's inventory
  90.            else if {custom.armorer.chainchestUnlocked.%player%} is not true:
  91.                 format gui slot 19 of the player with chainmail chestplate named "&7&nChainmail Chestplate" with lore "&cNot Unlocked", "&bCost to unlock:", "&a - 32 Coal", and "&a - 16 Iron Ingots" to run:
  92.                     cancel event
  93.                     if number of coal in player's inventory >= 32:
  94.                        if number of iron ingot in player's inventory >= 16:
  95.                            remove 32 coal from player's inventory
  96.                            remove 16 iron ingot from player's inventory
  97.                            set chestplate slot of player to chainmail chestplate
  98.                             send "&a&lUNLOCK! &7Chainmail Chestplate"
  99.                             set {custom.armorer.chainchestUnlocked.%player%} to true
  100.                             play sound "entity.player.levelup" with volume 1 and pitch 2 at player for player
  101.                         else:
  102.                             send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
  103.                             play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  104.                     else:
  105.                         send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
  106.                         play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  107.                     close player's inventory
  108.  
  109. #-----------------------------------------------------------------------------------------------------
  110. #Chain Chestplate-------------------------------------------------------------------------------------
  111.  
  112.  
  113.  
  114. #Chain Leggings---------------------------------------------------------------------------------------
  115. #-----------------------------------------------------------------------------------------------------
  116.  
  117.             if {custom.armorer.chainlegsUnlocked.%player%} is true:
  118.                 format gui slot 28 of the player with chainmail leggings named "&7&nChainmail Leggings" with lore "&6Unlocked", "", and "&aCost: $80" to run:
  119.                     cancel event
  120.                     if leggings slot of player is chain leggings or gold leggings or iron leggings or diamond leggings:
  121.                         send "&c&lError!&7 you already have better leggings equipped!"
  122.                         play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  123.                         close player's inventory
  124.                    else:
  125.                         if player's money >= 80:
  126.                            remove 80 from player's money
  127.                            set leggings slot of player to chainmail leggings
  128.                             close player's inventory
  129.                            play sound "entity.experience_orb.pickup" with volume 1 and pitch 1 at player for player
  130.                         else:
  131.                             send "&c&lError! &7You do not have enough money to purchase this item!"
  132.                             play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  133.                             close player's inventory
  134.            else if {custom.armorer.chainlegsUnlocked.%player%} is not true:
  135.                 format gui slot 28 of the player with chainmail leggings named "&7&nChainmail Leggings" with lore "&cNot Unlocked", "&bCost to unlock:", "&a - 32 Coal", and "&a - 12 Iron Ingots" to run:
  136.                     cancel event
  137.                     if number of coal in player's inventory >= 32:
  138.                        if number of iron ingot in player's inventory >= 12:
  139.                            remove 32 coal from player's inventory
  140.                            remove 12 iron ingot from player's inventory
  141.                            set leggings slot of player to chainmail leggings
  142.                             send "&a&lUNLOCK! &7Chainmail Leggings"
  143.                             set {custom.armorer.chainlegsUnlocked.%player%} to true
  144.                             play sound "entity.player.levelup" with volume 1 and pitch 2 at player for player
  145.                         else:
  146.                             send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
  147.                             play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  148.                     else:
  149.                         send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
  150.                         play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  151.                     close player's inventory
  152.  
  153. #-----------------------------------------------------------------------------------------------------
  154. #Chain Leggings---------------------------------------------------------------------------------------
  155.  
  156.  
  157. #Chain Boots-----------------------------------------------------------------------------------------
  158. #-----------------------------------------------------------------------------------------------------
  159.  
  160.             if {custom.armorer.chainbootsUnlocked.%player%} is true:
  161.                 format gui slot 37 of the player with chainmail boots named "&7&nChainmail Boots" with lore "&6Unlocked", "", and "&aCost: $50" to run:
  162.                     cancel event
  163.                     if boots slot of player is chain boots or gold boots or iron boots or diamond boots:
  164.                         send "&c&lError!&7 you already have better boots equipped!"
  165.                         play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  166.                         close player's inventory
  167.                    else:
  168.                         if player's money >= 50:
  169.                            remove 50 from player's money
  170.                            set boots slot of player to chainmail boots
  171.                             close player's inventory
  172.                            play sound "entity.experience_orb.pickup" with volume 1 and pitch 1 at player for player
  173.                         else:
  174.                             send "&c&lError! &7You do not have enough money to purchase this item!"
  175.                             play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  176.                             close player's inventory
  177.            else if {custom.armorer.chainbootsUnlocked.%player%} is not true:
  178.                 format gui slot 37 of the player with chainmail boots named "&7&nChainmail Boots" with lore "&cNot Unlocked", "&bCost to unlock:", "&a - 32 Coal", and "&a - 8 Iron Ingots" to run:
  179.                     cancel event
  180.                     if number of coal in player's inventory >= 32:
  181.                        if number of iron ingot in player's inventory >= 8:
  182.                            remove 32 coal from player's inventory
  183.                            remove 8 iron ingot from player's inventory
  184.                            set boots slot of player to chainmail boots
  185.                             send "&a&lUNLOCK! &7Chainmail Boots"
  186.                             set {custom.armorer.chainbootsUnlocked.%player%} to true
  187.                             play sound "entity.player.levelup" with volume 1 and pitch 2 at player for player
  188.                         else:
  189.                             send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
  190.                             play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  191.                     else:
  192.                         send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
  193.                         play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  194.                     close player's inventory
  195.  
  196. #-----------------------------------------------------------------------------------------------------
  197. #Chain Boots-----------------------------------------------------------------------------------------
  198.  
  199.  
  200.  
  201.  
  202. #Iron Helmet------------------------------------------------------------------------------------------
  203. #-----------------------------------------------------------------------------------------------------
  204.  
  205.             if {custom.armorer.ironheadUnlocked.%player%} is true:
  206.                 format gui slot 11 of the player with iron helmet named "&7&nIron Helmet" with lore "&6Unlocked", "", and "&aCost: $250" to run:
  207.                     cancel event
  208.                     if helmet slot of player is gold helmet or iron helmet or diamond helmet:
  209.                         send "&c&lError!&7 you already have a better helmet equipped!"
  210.                         play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  211.                         close player's inventory
  212.                    else:
  213.                         if player's money >= 250:
  214.                            remove 250 from player's money
  215.                            set helmet slot of player to iron helmet
  216.                             close player's inventory
  217.                            play sound "entity.experience_orb.pickup" with volume 1 and pitch 1 at player for player
  218.                         else:
  219.                             send "&c&lError! &7You do not have enough money to purchase this item!"
  220.                             play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  221.                             close player's inventory
  222.            else if {custom.armorer.ironheadUnlocked.%player%} is not true:
  223.                 format gui slot 11 of the player with iron helmet named "&7&nIron Helmet" with lore "&cNot Unlocked", "&bCost to unlock:", "&a - 16 Coal", and "&a - 32 Iron Ingots" to run:
  224.                     cancel event
  225.                     if number of coal in player's inventory >= 16:
  226.                        if number of iron ingot in player's inventory >= 32:
  227.                            remove 16 coal from player's inventory
  228.                            remove 32 iron ingot from player's inventory
  229.                            set helmet slot of player to iron helmet
  230.                             send "&a&lUNLOCK! &7Iron Helmet"
  231.                             play sound "entity.player.levelup" with volume 1 and pitch 2 at player for player
  232.                             set {custom.armorer.ironheadUnlocked.%player%} to true
  233.                         else:
  234.                             send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
  235.                             play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  236.                     else:
  237.                         send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
  238.                         play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  239.                     close player's inventory
  240.  
  241. #-----------------------------------------------------------------------------------------------------
  242. #Iron Helmet------------------------------------------------------------------------------------------
  243.  
  244.  
  245.  
  246.  
  247. #Iron Chestplate-----------------------------------------------------------------------------------------
  248. #-----------------------------------------------------------------------------------------------------
  249.  
  250.             if {custom.armorer.ironchestUnlocked.%player%} is true:
  251.                 format gui slot 20 of the player with iron chestplate named "&7&nIron Chestplate" with lore "&6Unlocked", "", and "&aCost: $300" to run:
  252.                     cancel event
  253.                     if chestplate slot of player is gold chestplate or iron chestplate or diamond chestplate:
  254.                         send "&c&lError!&7 you already have a better chestplate equipped!"
  255.                         play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  256.                         close player's inventory
  257.                    else:
  258.                         if player's money >= 300:
  259.                            remove 300 from player's money
  260.                            set chestplate slot of player to iron chestplate
  261.                             close player's inventory
  262.                            play sound "entity.experience_orb.pickup" with volume 1 and pitch 1 at player for player
  263.                         else:
  264.                             send "&c&lError! &7You do not have enough money to purchase this item!"
  265.                             play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  266.                             close player's inventory
  267.            else if {custom.armorer.ironchestUnlocked.%player%} is not true:
  268.                 format gui slot 20 of the player with iron chestplate named "&7&nIron Chestplate" with lore "&cNot Unlocked", "&bCost to unlock:", "&a - 16 Coal", and "&a - 40 Iron Ingots" to run:
  269.                     cancel event
  270.                     if number of coal in player's inventory >= 16:
  271.                        if number of iron ingot in player's inventory >= 40:
  272.                            remove 16 coal from player's inventory
  273.                            remove 40 iron ingot from player's inventory
  274.                            set chestplate slot of player to iron chestplate
  275.                             send "&a&lUNLOCK! &7Iron Chestplate"
  276.                             play sound "entity.player.levelup" with volume 1 and pitch 2 at player for player
  277.                             set {custom.armorer.ironchestUnlocked.%player%} to true
  278.                         else:
  279.                             send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
  280.                             play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  281.                     else:
  282.                         send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
  283.                         play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
  284.                     close player's inventory
  285.  
  286. #-----------------------------------------------------------------------------------------------------
  287. #Iron Chestplate------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement