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:
- cancel event
- if {%player%.ForgeInProgress} is not set:
- set {%player%.ForgeInProgress} to false
- if {%player%.ForgeInProgress} is true:
- if now is greater than {%player%.ForgeTime}:
- play raw sound "note.hat" at player with pitch 1 volume 1
- give {%player%.ForgeItem} to player
- delete {%player%.ForgeItem}
- delete {%player%.ForgeTime}
- set {%player%.ForgeInProgress} to false
- else:
- send "&6>> &cThe item will be forged at %{%player%.ForgeTime}% &6&l(GMT+1)"
- else:
- 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
- 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 "Helmet" 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
- 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 "Chestplate" 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
- 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 "Leggings" 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
- 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 "Boots" 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
- 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 "Sword" 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
- 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 "Pickaxe" 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
- 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 "Shovel" 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
- 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 "Helmet" 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
- 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 "Chestplate" 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
- 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 "Leggings" 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
- 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 "Boots" 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
- 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 "Sword" 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
- 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 "Pickaxe" 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
- 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 "Shovel" 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
- 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