Advertisement
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."
- cancel event
- play raw sound "note.bassattack" at player with pitch 1 volume 1
- close player's inventory
- on rightclick on anvil:
- if block below event-block is glowstone:
- if event-block is very damaged anvil:
- cancel event
- if {%player%.ForgeInProgress} is true:
- if now is greater than {%player%.ForgeTime}:
- if player has enough space for 1 stone:
- play raw sound "note.hat" at player with pitch 1 volume 1
- give {%player%.ForgeItem} to player
- send "&6>> Here is your freshly forged %{%player%.ForgeItemName}%"
- delete {%player%.ForgeItem}
- delete {%player%.ForgeTime}
- delete {%player%.ForgeItemName}
- set {%player%.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 %{%player%.ForgeTime}% &6&l(GMT+1)"
- else:
- cancel event
- if {%player%.ForgeInProgress} is not set:
- set {%player%.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>> &7&lRepair item you're currently holding" to run:
- if player's balance is greater than or equal to 100:
- 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 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 "&6&lIron &f&lHelmet" with lore "Price: $100 and 10 iron ingots" to run:
- if player's balance is greater than or equal to 100:
- if player has 10 iron ingots:
- remove 10 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 {%player%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%player%.ForgeTime} to now
- add {_cooldown} to {%player%.ForgeTime}
- set {%player%.ForgeItem} to iron helmet
- set block at {_loc} to very damaged anvil
- set {%player%.ForgeItemName} to "&6&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 "&6&lIron &f&lChestplate" with lore "Price: $100 and 10 iron ingots" to run:
- if player's balance is greater than or equal to 100:
- if player has 10 iron ingots:
- remove 10 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 {%player%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%player%.ForgeTime} to now
- add {_cooldown} to {%player%.ForgeTime}
- set {%player%.ForgeItem} to iron chestplate
- set block at {_loc} to very damaged anvil
- set {%player%.ForgeItemName} to "&6&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 "&6&lIron &f&lLeggings" with lore "Price: $100 and 10 iron ingots" to run:
- if player's balance is greater than or equal to 100:
- if player has 10 iron ingots:
- remove 10 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 {%player%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%player%.ForgeTime} to now
- add {_cooldown} to {%player%.ForgeTime}
- set {%player%.ForgeItem} to iron leggings
- set block at {_loc} to very damaged anvil
- set {%player%.ForgeItemName} to "&6&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 "&6&lIron &f&lBoots" with lore "Price: $100 and 10 iron ingots" to run:
- if player's balance is greater than or equal to 100:
- if player has 10 iron ingots:
- remove 10 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 {%player%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%player%.ForgeTime} to now
- add {_cooldown} to {%player%.ForgeTime}
- set {%player%.ForgeItem} to iron boots
- set block at {_loc} to very damaged anvil
- set {%player%.ForgeItemName} to "&6&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 "&6&lIron &f&lSword" with lore "Price: $100 and 10 iron ingots" to run:
- if player's balance is greater than or equal to 100:
- if player has 10 iron ingots:
- remove 10 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 {%player%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%player%.ForgeTime} to now
- add {_cooldown} to {%player%.ForgeTime}
- set {%player%.ForgeItem} to iron sword
- set block at {_loc} to very damaged anvil
- set {%player%.ForgeItemName} to "&6&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 "&6&lIron &f&lPickaxe" with lore "Price: $100 and 10 iron ingots" to run:
- if player's balance is greater than or equal to 100:
- if player has 10 iron ingots:
- remove 10 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 {%player%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%player%.ForgeTime} to now
- add {_cooldown} to {%player%.ForgeTime}
- set {%player%.ForgeItem} to iron pickaxe
- set block at {_loc} to very damaged anvil
- set {%player%.ForgeItemName} to "&6&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 shovel named "&6&lIron &f&lAxe" with lore "Price: $100 and 10 iron ingots" to run:
- if player's balance is greater than or equal to 100:
- if player has 10 iron ingots:
- remove 10 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 {%player%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%player%.ForgeTime} to now
- add {_cooldown} to {%player%.ForgeTime}
- set {%player%.ForgeItem} to iron axe
- set block at {_loc} to very damaged anvil
- set {%player%.ForgeItemName} to "&6&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 axe named "&6&lIron &f&lShovel" with lore "Price: $100 and 10 iron ingots" to run:
- if player's balance is greater than or equal to 100:
- if player has 10 iron ingots:
- remove 10 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 {%player%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%player%.ForgeTime} to now
- add {_cooldown} to {%player%.ForgeTime}
- set {%player%.ForgeItem} to iron shovel
- set block at {_loc} to very damaged anvil
- set {%player%.ForgeItemName} to "&6&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&lUnlock Forge level II" with lore "&6>> &cClick to 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 {%player%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%player%.ForgeTime} to now
- add {_cooldown} to {%player%.ForgeTime}
- set {%player%.ForgeItem} to diamond helmet
- set block at {_loc} to very damaged anvil
- set {%player%.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 {%player%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%player%.ForgeTime} to now
- add {_cooldown} to {%player%.ForgeTime}
- set {%player%.ForgeItem} to diamond chestplate
- set block at {_loc} to very damaged anvil
- set {%player%.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 {%player%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%player%.ForgeTime} to now
- add {_cooldown} to {%player%.ForgeTime}
- set {%player%.ForgeItem} to diamond leggings
- set block at {_loc} to very damaged anvil
- set {%player%.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 {%player%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%player%.ForgeTime} to now
- add {_cooldown} to {%player%.ForgeTime}
- set {%player%.ForgeItem} to diamond boots
- set block at {_loc} to very damaged anvil
- set {%player%.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 {%player%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%player%.ForgeTime} to now
- add {_cooldown} to {%player%.ForgeTime}
- set {%player%.ForgeItem} to diamond sword
- set block at {_loc} to very damaged anvil
- set {%player%.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 {%player%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%player%.ForgeTime} to now
- add {_cooldown} to {%player%.ForgeTime}
- set {%player%.ForgeItem} to diamond pickaxe
- set block at {_loc} to very damaged anvil
- set {%player%.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 {%player%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%player%.ForgeTime} to now
- add {_cooldown} to {%player%.ForgeTime}
- set {%player%.ForgeItem} to diamond shovel
- set block at {_loc} to very damaged anvil
- set {%player%.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 {%player%.ForgeInProgress} to true
- set {_cooldown} to 30 minutes
- set {%player%.ForgeTime} to now
- add {_cooldown} to {%player%.ForgeTime}
- set {%player%.ForgeItem} to diamond axe
- set block at {_loc} to very damaged anvil
- set {%player%.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"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement