Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GuiFillForge(p: player,s: number,m: material):
- set {_times} to {_s}
- set {_slot} to 0
- loop {_times} times:
- create gui slot {_slot} of {_p} with {_m} named " " with lore " " to do nothing
- set {_slot} to {_slot}+1
- if {_m} is red stained glass pane:
- create gui slot {_s}-5 of {_p} with barrier block named "&4&lEXIT" with lore " " to run:
- play raw sound "note.hat" at player with pitch 1 volume 1
- close player's inventory
- on craft:
- if event-item is helmet or chestplate or leggings or boots or sword or pickaxe or axe or shovel:
- send "&6>> &cYou can craft Tools and Sets only in &7&lForge &cstructure."
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- cancel event
- close player's inventory
- on rightclick on anvil:
- if block below event-block is glowstone:
- set {_loc} to location of event-block
- if event-block is very damaged anvil:
- cancel event
- if {%{_loc}%.ForgeInProgress} is true:
- if now is greater than {%{_loc}%.ForgeTime}:
- if player has enough space for 1 stone:
- play raw sound "note.hat" at player with pitch 1 volume 1
- give {%{_loc}%.ForgeItem} to player
- send "&6>> Here is your freshly forged %{%{_loc}%.ForgeItemName}%"
- delete {%{_loc}%.ForgeItem}
- delete {%{_loc}%.ForgeTime}
- delete {%{_loc}%.ForgeItemName}
- set {%{_loc}%.ForgeInProgress} to false
- set block at location of event-block to anvil
- else:
- send "&6>> &cYou don't have space to receive forged item."
- else:
- send "&6>> &cThe item will be forged at %{%{_loc}%.ForgeTime}% &6&l(GMT+1)"
- else:
- cancel event
- if {%{_loc}%.ForgeInProgress} is not set:
- set {%{_loc}%.ForgeInProgress} to false
- else:
- set {_loc} to location of event-block
- open virtual chest with size 4 named "Forge" to player
- wait 2 ticks
- GuiFillForge(player,36,red stained glass pane)
- wait 2 ticks
- GuiFillForge(player,27,black stained glass pane)
- wait 2 ticks
- create gui slot 13 of player with anvil named "&f&lRepair" with lore "&6>> &7Repair item you're currently holding||&6>> &7Price: &a100$" to run:
- if player's balance is greater than or equal to 100:
- if player's tool is boots or sword or axe or pickaxe or leggings or chestplate or helmet:
- play raw sound "note.hat" at player with pitch 1 volume 1
- remove 100 from player's balance
- repair tool of player
- send "&6>> &aYou repaired an item"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou can't repair this item"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou have insufficient funds to repair"
- create gui slot 11 of player with iron ingot named "&7&lForge Iron Items" with lore "&6>> &bClick to forge iron items" to run:
- play raw sound "note.hat" at player with pitch 1 volume 1
- close player's inventory
- wait 2 ticks
- open virtual chest with size 5 named "Forge Iron Items" to player
- wait 2 ticks
- GuiFillForge(player,45,red stained glass pane)
- GuiFillForge(player,36,black stained glass pane)
- wait 2 ticks
- create gui slot 1 of player with iron helmet named "&7&lIron &f&lHelmet" with lore "Price: $100 and 5 iron ingots" to run:
- if player's balance is greater than or equal to 100:
- if player has 5 iron ingots:
- remove 5 iron ingots from player's inventory
- remove 100 from player's balance
- play raw sound "note.hat" at player with pitch 1 volume 1
- close player's inventory
- set {%{_loc}%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%{_loc}%.ForgeTime} to now
- add {_cooldown} to {%{_loc}%.ForgeTime}
- set {%{_loc}%.ForgeItem} to iron helmet
- set block at {_loc} to very damaged anvil
- set {%{_loc}%.ForgeItemName} to "&7&lIron &f&lHelmet"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou don't have enough iron ingots to craft this"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou have insufficient funds to craft this"
- create gui slot 10 of player with iron chestplate named "&7&lIron &f&lChestplate" with lore "Price: $100 and 5 iron ingots" to run:
- if player's balance is greater than or equal to 100:
- if player has 5 iron ingots:
- remove 5 iron ingots from player's inventory
- remove 100 from player's balance
- play raw sound "note.hat" at player with pitch 1 volume 1
- close player's inventory
- set {%{_loc}%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%{_loc}%.ForgeTime} to now
- add {_cooldown} to {%{_loc}%.ForgeTime}
- set {%{_loc}%.ForgeItem} to iron chestplate
- set block at {_loc} to very damaged anvil
- set {%{_loc}%.ForgeItemName} to "&7&lIron &f&lChestplate"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou don't have enough iron ingots to craft this"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou have insufficient funds to craft this"
- create gui slot 19 of player with iron Leggings named "&7&lIron &f&lLeggings" with lore "Price: $100 and 5 iron ingots" to run:
- if player's balance is greater than or equal to 100:
- if player has 5 iron ingots:
- remove 5 iron ingots from player's inventory
- remove 100 from player's balance
- play raw sound "note.hat" at player with pitch 1 volume 1
- close player's inventory
- set {%{_loc}%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%{_loc}%.ForgeTime} to now
- add {_cooldown} to {%{_loc}%.ForgeTime}
- set {%{_loc}%.ForgeItem} to iron leggings
- set block at {_loc} to very damaged anvil
- set {%{_loc}%.ForgeItemName} to "&7&lIron &f&lLeggings"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou don't have enough iron ingots to craft this"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou have insufficient funds to craft this"
- create gui slot 28 of player with iron boots named "&7&lIron &f&lBoots" with lore "Price: $100 and 5 iron ingots" to run:
- if player's balance is greater than or equal to 100:
- if player has 5 iron ingots:
- remove 5 iron ingots from player's inventory
- remove 100 from player's balance
- play raw sound "note.hat" at player with pitch 1 volume 1
- close player's inventory
- set {%{_loc}%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%{_loc}%.ForgeTime} to now
- add {_cooldown} to {%{_loc}%.ForgeTime}
- set {%{_loc}%.ForgeItem} to iron boots
- set block at {_loc} to very damaged anvil
- set {%{_loc}%.ForgeItemName} to "&7&lIron &f&lBoots"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou don't have enough iron ingots to craft this"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou have insufficient funds to craft this"
- create gui slot 7 of player with iron sword named "&7&lIron &f&lSword" with lore "Price: $100 and 5 iron ingots" to run:
- if player's balance is greater than or equal to 100:
- if player has 5 iron ingots:
- remove 5 iron ingots from player's inventory
- remove 100 from player's balance
- play raw sound "note.hat" at player with pitch 1 volume 1
- close player's inventory
- set {%{_loc}%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%{_loc}%.ForgeTime} to now
- add {_cooldown} to {%{_loc}%.ForgeTime}
- set {%{_loc}%.ForgeItem} to iron sword
- set block at {_loc} to very damaged anvil
- set {%{_loc}%.ForgeItemName} to "&7&lIron &f&lSword"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou don't have enough iron ingots to craft this"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou have insufficient funds to craft this"
- create gui slot 16 of player with iron pickaxe named "&7&lIron &f&lPickaxe" with lore "Price: $100 and 5 iron ingots" to run:
- if player's balance is greater than or equal to 100:
- if player has 5 iron ingots:
- remove 5 iron ingots from player's inventory
- remove 100 from player's balance
- play raw sound "note.hat" at player with pitch 1 volume 1
- close player's inventory
- set {%{_loc}%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%{_loc}%.ForgeTime} to now
- add {_cooldown} to {%{_loc}%.ForgeTime}
- set {%{_loc}%.ForgeItem} to iron pickaxe
- set block at {_loc} to very damaged anvil
- set {%{_loc}%.ForgeItemName} to "&7&lIron &f&lPickaxe"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou don't have enough iron ingots to craft this"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou have insufficient funds to craft this"
- create gui slot 25 of player with iron axe named "&7&lIron &f&lAxe" with lore "Price: $100 and 5 iron ingots" to run:
- if player's balance is greater than or equal to 100:
- if player has 5 iron ingots:
- remove 5 iron ingots from player's inventory
- remove 100 from player's balance
- play raw sound "note.hat" at player with pitch 1 volume 1
- close player's inventory
- set {%{_loc}%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%{_loc}%.ForgeTime} to now
- add {_cooldown} to {%{_loc}%.ForgeTime}
- set {%{_loc}%.ForgeItem} to iron axe
- set block at {_loc} to very damaged anvil
- set {%{_loc}%.ForgeItemName} to "&7&lIron &f&lAxe"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou don't have enough iron ingots to craft this"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou have insufficient funds to craft this"
- create gui slot 34 of player with iron shovel named "&7&lIron &f&lShovel" with lore "Price: $100 and 5 iron ingots" to run:
- if player's balance is greater than or equal to 100:
- if player has 5 iron ingots:
- remove 5 iron ingots from player's inventory
- remove 100 from player's balance
- play raw sound "note.hat" at player with pitch 1 volume 1
- close player's inventory
- set {%{_loc}%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%{_loc}%.ForgeTime} to now
- add {_cooldown} to {%{_loc}%.ForgeTime}
- set {%{_loc}%.ForgeItem} to iron shovel
- set block at {_loc} to very damaged anvil
- set {%{_loc}%.ForgeItemName} to "&7&lIron &f&lShovel"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou don't have enough iron ingots to craft this"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou have insufficient funds to craft this"
- if block 2 below event-block is emerald block:
- create gui slot 15 of event-player with light blue stained glass pane named "&b&lForge Diamond Items" with lore "&6>> &cTo unlock upgrade &7&lForge &cto level &a&lII" to run:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cTo unlock forging diamond tools and sets, upgrade &7&lForge&c."
- close player's inventory
- else:
- create gui slot 15 of event-player with diamond named "&b&lForge Diamond Items" with lore "&6>> &bClick to forge diamond items" to run:
- play raw sound "note.hat" at player with pitch 1 volume 1
- close player's inventory
- wait 2 ticks
- open virtual chest with size 5 named "Forge Diamond Items" to player
- wait 2 ticks
- GuiFillForge(player,45,red stained glass pane)
- GuiFillForge(player,36,black stained glass pane)
- wait 2 ticks
- create gui slot 1 of player with diamond helmet named "&b&lDiamond &f&lHelmet" with lore "Price: $100 and 10 diamonds" to run:
- if player's balance is greater than or equal to 100:
- if player has 10 diamonds:
- remove 10 diamonds from player's inventory
- remove 100 from player's balance
- play raw sound "note.hat" at player with pitch 1 volume 1
- close player's inventory
- set {%{_loc}%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%{_loc}%.ForgeTime} to now
- add {_cooldown} to {%{_loc}%.ForgeTime}
- set {%{_loc}%.ForgeItem} to diamond helmet
- set block at {_loc} to very damaged anvil
- set {%{_loc}%.ForgeItemName} to "&b&lDiamond &f&lHelmet"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou don't have enough diamonds to craft this"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou have insufficient funds to craft this"
- create gui slot 10 of player with diamond chestplate named "&b&lDiamond &f&lChestplate" with lore "Price: $100 and 10 diamonds" to run:
- if player's balance is greater than or equal to 100:
- if player has 10 diamonds:
- remove 10 diamonds from player's inventory
- remove 100 from player's balance
- play raw sound "note.hat" at player with pitch 1 volume 1
- close player's inventory
- set {%{_loc}%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%{_loc}%.ForgeTime} to now
- add {_cooldown} to {%{_loc}%.ForgeTime}
- set {%{_loc}%.ForgeItem} to diamond chestplate
- set block at {_loc} to very damaged anvil
- set {%{_loc}%.ForgeItemName} to "&b&lDiamond &f&lChestplate"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou don't have enough diamonds to craft this"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou have insufficient funds to craft this"
- create gui slot 19 of player with diamond Leggings named "&b&lDiamond &f&lLeggings" with lore "Price: $100 and 10 diamonds" to run:
- if player's balance is greater than or equal to 100:
- if player has 10 diamonds:
- remove 10 diamonds from player's inventory
- remove 100 from player's balance
- play raw sound "note.hat" at player with pitch 1 volume 1
- close player's inventory
- set {%{_loc}%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%{_loc}%.ForgeTime} to now
- add {_cooldown} to {%{_loc}%.ForgeTime}
- set {%{_loc}%.ForgeItem} to diamond leggings
- set block at {_loc} to very damaged anvil
- set {%{_loc}%.ForgeItemName} to "&b&lDiamond &f&lLeggings"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou don't have enough diamonds to craft this"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou have insufficient funds to craft this"
- create gui slot 28 of player with diamond boots named "&b&lDiamond &f&lBoots" with lore "Price: $100 and 10 diamonds" to run:
- if player's balance is greater than or equal to 100:
- if player has 10 diamonds:
- remove 10 diamonds from player's inventory
- remove 100 from player's balance
- play raw sound "note.hat" at player with pitch 1 volume 1
- close player's inventory
- set {%{_loc}%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%{_loc}%.ForgeTime} to now
- add {_cooldown} to {%{_loc}%.ForgeTime}
- set {%{_loc}%.ForgeItem} to diamond boots
- set block at {_loc} to very damaged anvil
- set {%{_loc}%.ForgeItemName} to "&b&lDiamond &f&lBoots"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou don't have enough diamonds to craft this"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou have insufficient funds to craft this"
- create gui slot 7 of player with diamond sword named "&b&lDiamond &f&lSword" with lore "Price: $100 and 10 diamonds" to run:
- if player's balance is greater than or equal to 100:
- if player has 10 diamonds:
- remove 10 diamonds from player's inventory
- remove 100 from player's balance
- play raw sound "note.hat" at player with pitch 1 volume 1
- close player's inventory
- set {%{_loc}%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%{_loc}%.ForgeTime} to now
- add {_cooldown} to {%{_loc}%.ForgeTime}
- set {%{_loc}%.ForgeItem} to diamond sword
- set block at {_loc} to very damaged anvil
- set {%{_loc}%.ForgeItemName} to "&b&lDiamond &f&lSword"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou don't have enough diamonds to craft this"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou have insufficient funds to craft this"
- create gui slot 16 of player with diamond pickaxe named "&b&lDiamond &f&lPickaxe" with lore "Price: $100 and 10 diamonds" to run:
- if player's balance is greater than or equal to 100:
- if player has 10 diamonds:
- remove 10 diamonds from player's inventory
- remove 100 from player's balance
- play raw sound "note.hat" at player with pitch 1 volume 1
- close player's inventory
- set {%{_loc}%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%{_loc}%.ForgeTime} to now
- add {_cooldown} to {%{_loc}%.ForgeTime}
- set {%{_loc}%.ForgeItem} to diamond pickaxe
- set block at {_loc} to very damaged anvil
- set {%{_loc}%.ForgeItemName} to "&b&lDiamond &f&lPickaxe"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou don't have enough diamonds to craft this"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou have insufficient funds to craft this"
- create gui slot 25 of player with diamond shovel named "&b&lDiamond &f&lShovel" with lore "Price: $100 and 10 diamonds" to run:
- if player's balance is greater than or equal to 100:
- if player has 10 diamonds:
- remove 10 diamonds from player's inventory
- remove 100 from player's balance
- play raw sound "note.hat" at player with pitch 1 volume 1
- close player's inventory
- set {%{_loc}%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%{_loc}%.ForgeTime} to now
- add {_cooldown} to {%{_loc}%.ForgeTime}
- set {%{_loc}%.ForgeItem} to diamond shovel
- set block at {_loc} to very damaged anvil
- set {%{_loc}%.ForgeItemName} to "&b&lDiamond &f&lShovel"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou don't have enough diamonds to craft this"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou have insufficient funds to craft this"
- create gui slot 34 of player with diamond axe named "&b&lDiamond &f&lAxe" with lore "Price: $100 and 10 diamonds" to run:
- if player's balance is greater than or equal to 100:
- if player has 10 diamonds:
- remove 10 diamonds from player's inventory
- remove 100 from player's balance
- play raw sound "note.hat" at player with pitch 1 volume 1
- close player's inventory
- set {%{_loc}%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%{_loc}%.ForgeTime} to now
- add {_cooldown} to {%{_loc}%.ForgeTime}
- set {%{_loc}%.ForgeItem} to diamond axe
- set block at {_loc} to very damaged anvil
- set {%{_loc}%.ForgeItemName} to "&b&lDiamond &f&lAxe"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou don't have enough diamonds to craft this"
- else:
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- send "&6>> &cYou have insufficient funds to craft this"
- delete {_loc}
- else:
- cancel event
- on drop:
- if event-item is iron boots named "&7&lIron &f&lBoots":
- cancel event
Advertisement
Add Comment
Please, Sign In to add comment