Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on respawn:
- wait 1 tick
- set helmet slot of player to a leather helmet
- set chestplate slot of player to a leather chestplate
- set legging slot of player to leather chestplates
- set boot slot of player to leather boots
- on inventory click:
- if clicked slot is 36 or 37 or 38 or 39:
- player does not have permission "custom.armorclick.bypass"
- cancel event
- on rightclick on entity:
- if clicked entity is a citizen:
- if entity is "Armorer":
- open chest with 6 row named "&6&lArmor Upgrades" to player
- #close menu
- format gui slot 53 of the player with red stained glass pane named "&c&lExit Menu" to run:
- cancel event
- close player's inventory
- #Chain Helmet-----------------------------------------------------------------------------------------
- #-----------------------------------------------------------------------------------------------------
- if {custom.armorer.chainheadUnlocked.%player%} is true:
- format gui slot 10 of the player with chainmail helmet named "&7&nChainmail Helmet" with lore "&6Unlocked", "", and "&aCost: $50" to run:
- cancel event
- if helmet slot of player is chain helmet or gold helmet or iron helmet or diamond helmet:
- send "&c&lError!&7 you already have a better helmet equipped!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- close player's inventory
- else:
- if player's money >= 50:
- remove 50 from player's money
- set helmet slot of player to chainmail helmet
- close player's inventory
- play sound "entity.experience_orb.pickup" with volume 1 and pitch 1 at player for player
- else:
- send "&c&lError! &7You do not have enough money to purchase this item!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- close player's inventory
- else if {custom.armorer.chainheadUnlocked.%player%} is not true:
- 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:
- cancel event
- if number of coal in player's inventory >= 32:
- if number of iron ingot in player's inventory >= 8:
- remove 32 coal from player's inventory
- remove 8 iron ingot from player's inventory
- set helmet slot of player to chainmail helmet
- send "&a&lUNLOCK! &7Chainmail Helmet"
- play sound "entity.player.levelup" with volume 1 and pitch 2 at player for player
- set {custom.armorer.chainheadUnlocked.%player%} to true
- else:
- send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- else:
- send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- close player's inventory
- #-----------------------------------------------------------------------------------------------------
- #Chain Helmet-----------------------------------------------------------------------------------------
- #Chain Chestplate-------------------------------------------------------------------------------------
- #-----------------------------------------------------------------------------------------------------
- if {custom.armorer.chainchestUnlocked.%player%} is true:
- format gui slot 19 of the player with chainmail chestplate named "&7&nChainmail Chestplate" with lore "&6Unlocked", "", and "&aCost: $100" to run:
- cancel event
- if chestplate slot of player is chain chestplate or gold chestplate or iron chestplate or diamond chestplate:
- send "&c&lError!&7 you already have a better chestplate equipped!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- close player's inventory
- else:
- if player's money >= 100:
- remove 100 from player's money
- set chestplate slot of player to chainmail chestplate
- close player's inventory
- play sound "entity.experience_orb.pickup" with volume 1 and pitch 1 at player for player
- else:
- send "&c&lError! &7You do not have enough money to purchase this item!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- close player's inventory
- else if {custom.armorer.chainchestUnlocked.%player%} is not true:
- 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:
- cancel event
- if number of coal in player's inventory >= 32:
- if number of iron ingot in player's inventory >= 16:
- remove 32 coal from player's inventory
- remove 16 iron ingot from player's inventory
- set chestplate slot of player to chainmail chestplate
- send "&a&lUNLOCK! &7Chainmail Chestplate"
- set {custom.armorer.chainchestUnlocked.%player%} to true
- play sound "entity.player.levelup" with volume 1 and pitch 2 at player for player
- else:
- send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- else:
- send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- close player's inventory
- #-----------------------------------------------------------------------------------------------------
- #Chain Chestplate-------------------------------------------------------------------------------------
- #Chain Leggings---------------------------------------------------------------------------------------
- #-----------------------------------------------------------------------------------------------------
- if {custom.armorer.chainlegsUnlocked.%player%} is true:
- format gui slot 28 of the player with chainmail leggings named "&7&nChainmail Leggings" with lore "&6Unlocked", "", and "&aCost: $80" to run:
- cancel event
- if leggings slot of player is chain leggings or gold leggings or iron leggings or diamond leggings:
- send "&c&lError!&7 you already have better leggings equipped!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- close player's inventory
- else:
- if player's money >= 80:
- remove 80 from player's money
- set leggings slot of player to chainmail leggings
- close player's inventory
- play sound "entity.experience_orb.pickup" with volume 1 and pitch 1 at player for player
- else:
- send "&c&lError! &7You do not have enough money to purchase this item!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- close player's inventory
- else if {custom.armorer.chainlegsUnlocked.%player%} is not true:
- 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:
- cancel event
- if number of coal in player's inventory >= 32:
- if number of iron ingot in player's inventory >= 12:
- remove 32 coal from player's inventory
- remove 12 iron ingot from player's inventory
- set leggings slot of player to chainmail leggings
- send "&a&lUNLOCK! &7Chainmail Leggings"
- set {custom.armorer.chainlegsUnlocked.%player%} to true
- play sound "entity.player.levelup" with volume 1 and pitch 2 at player for player
- else:
- send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- else:
- send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- close player's inventory
- #-----------------------------------------------------------------------------------------------------
- #Chain Leggings---------------------------------------------------------------------------------------
- #Chain Boots-----------------------------------------------------------------------------------------
- #-----------------------------------------------------------------------------------------------------
- if {custom.armorer.chainbootsUnlocked.%player%} is true:
- format gui slot 37 of the player with chainmail boots named "&7&nChainmail Boots" with lore "&6Unlocked", "", and "&aCost: $50" to run:
- cancel event
- if boots slot of player is chain boots or gold boots or iron boots or diamond boots:
- send "&c&lError!&7 you already have better boots equipped!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- close player's inventory
- else:
- if player's money >= 50:
- remove 50 from player's money
- set boots slot of player to chainmail boots
- close player's inventory
- play sound "entity.experience_orb.pickup" with volume 1 and pitch 1 at player for player
- else:
- send "&c&lError! &7You do not have enough money to purchase this item!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- close player's inventory
- else if {custom.armorer.chainbootsUnlocked.%player%} is not true:
- 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:
- cancel event
- if number of coal in player's inventory >= 32:
- if number of iron ingot in player's inventory >= 8:
- remove 32 coal from player's inventory
- remove 8 iron ingot from player's inventory
- set boots slot of player to chainmail boots
- send "&a&lUNLOCK! &7Chainmail Boots"
- set {custom.armorer.chainbootsUnlocked.%player%} to true
- play sound "entity.player.levelup" with volume 1 and pitch 2 at player for player
- else:
- send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- else:
- send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- close player's inventory
- #-----------------------------------------------------------------------------------------------------
- #Chain Boots-----------------------------------------------------------------------------------------
- #Iron Helmet------------------------------------------------------------------------------------------
- #-----------------------------------------------------------------------------------------------------
- if {custom.armorer.ironheadUnlocked.%player%} is true:
- format gui slot 11 of the player with iron helmet named "&7&nIron Helmet" with lore "&6Unlocked", "", and "&aCost: $250" to run:
- cancel event
- if helmet slot of player is gold helmet or iron helmet or diamond helmet:
- send "&c&lError!&7 you already have a better helmet equipped!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- close player's inventory
- else:
- if player's money >= 250:
- remove 250 from player's money
- set helmet slot of player to iron helmet
- close player's inventory
- play sound "entity.experience_orb.pickup" with volume 1 and pitch 1 at player for player
- else:
- send "&c&lError! &7You do not have enough money to purchase this item!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- close player's inventory
- else if {custom.armorer.ironheadUnlocked.%player%} is not true:
- 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:
- cancel event
- if number of coal in player's inventory >= 16:
- if number of iron ingot in player's inventory >= 32:
- remove 16 coal from player's inventory
- remove 32 iron ingot from player's inventory
- set helmet slot of player to iron helmet
- send "&a&lUNLOCK! &7Iron Helmet"
- play sound "entity.player.levelup" with volume 1 and pitch 2 at player for player
- set {custom.armorer.ironheadUnlocked.%player%} to true
- else:
- send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- else:
- send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- close player's inventory
- #-----------------------------------------------------------------------------------------------------
- #Iron Helmet------------------------------------------------------------------------------------------
- #Iron Chestplate-----------------------------------------------------------------------------------------
- #-----------------------------------------------------------------------------------------------------
- if {custom.armorer.ironchestUnlocked.%player%} is true:
- format gui slot 20 of the player with iron chestplate named "&7&nIron Chestplate" with lore "&6Unlocked", "", and "&aCost: $300" to run:
- cancel event
- if chestplate slot of player is gold chestplate or iron chestplate or diamond chestplate:
- send "&c&lError!&7 you already have a better chestplate equipped!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- close player's inventory
- else:
- if player's money >= 300:
- remove 300 from player's money
- set chestplate slot of player to iron chestplate
- close player's inventory
- play sound "entity.experience_orb.pickup" with volume 1 and pitch 1 at player for player
- else:
- send "&c&lError! &7You do not have enough money to purchase this item!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- close player's inventory
- else if {custom.armorer.ironchestUnlocked.%player%} is not true:
- 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:
- cancel event
- if number of coal in player's inventory >= 16:
- if number of iron ingot in player's inventory >= 40:
- remove 16 coal from player's inventory
- remove 40 iron ingot from player's inventory
- set chestplate slot of player to iron chestplate
- send "&a&lUNLOCK! &7Iron Chestplate"
- play sound "entity.player.levelup" with volume 1 and pitch 2 at player for player
- set {custom.armorer.ironchestUnlocked.%player%} to true
- else:
- send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- else:
- send "&c&lError!&7 You do not have the materials necessary to unlock this item!"
- play sound "block.note.guitar" with volume 10 and pitch 1 at player for player
- close player's inventory
- #-----------------------------------------------------------------------------------------------------
- #Iron Chestplate------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement