Advertisement
AdamLam

Untitled

Feb 3rd, 2020
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function GuiFillForge(p: player,s: number,m: material):
  2.     set {_times} to {_s}
  3.     set {_slot} to 0
  4.     loop {_times} times:
  5.         create gui slot {_slot} of {_p} with {_m} named " " with lore " " to do nothing
  6.         set {_slot} to {_slot}+1
  7.     if {_m} is red stained glass pane:
  8.         create gui slot {_s}-5 of {_p} with barrier block named "&4&lEXIT" with lore " " to run:
  9.             play raw sound "note.hat" at player with pitch 1 volume 1
  10.             close player's inventory
  11. on craft:
  12.     if event-item is helmet or chestplate or leggings or boots or sword or pickaxe or axe or shovel:
  13.         send "&6>> &cYou can craft Tools and Sets only in &7&lForge &cstructure."
  14.         cancel event
  15.         play raw sound "note.bassattack" at player with pitch 1 volume 1
  16.         close player's inventory
  17. on rightclick on anvil:
  18.     if block below event-block is glowstone:
  19.         cancel event
  20.         if {%player%.ForgeInProgress} is not set:
  21.             set {%player%.ForgeInProgress} to false
  22.         if {%player%.ForgeInProgress} is true:
  23.             if now is greater than {%player%.ForgeTime}:
  24.                 play raw sound "note.hat" at player with pitch 1 volume 1
  25.                 give {%player%.ForgeItem} to player
  26.                 delete {%player%.ForgeItem}
  27.                 delete {%player%.ForgeTime}
  28.                 set {%player%.ForgeInProgress} to false
  29.             else:
  30.                 send "&6>> &cThe item will be forged at %{%player%.ForgeTime}% &6&l(GMT+1)"
  31.         else:
  32.             open virtual chest with size 4 named "Forge" to player
  33.             wait 2 ticks
  34.             GuiFillForge(player,36,red stained glass pane)
  35.             wait 2 ticks
  36.             GuiFillForge(player,27,black stained glass pane)
  37.             wait 2 ticks
  38.             create gui slot 13 of player with anvil named "&f&lRepair" with lore "&6>> &7&lRepair item you're currently holding" to run:
  39.                 if player's balance is greater than or equal to 100:
  40.                     play raw sound "note.hat" at player with pitch 1 volume 1
  41.                     remove 100 from player's balance
  42.                     repair tool of player
  43.                 else:
  44.                     play raw sound "note.bassattack" at player with pitch 1 volume 1
  45.                     send "&6>> &cYou have insufficient funds to repair"
  46.                
  47.             create gui slot 11 of player with iron ingot named "&7&lForge Iron Items" with lore "&6>> &bClick to forge iron items" to run:
  48.                 play raw sound "note.hat" at player with pitch 1 volume 1
  49.                 close player's inventory
  50.                 wait 2 ticks
  51.                 open virtual chest with size 5 named "Forge Iron Items" to player
  52.                 wait 2 ticks
  53.                 GuiFillForge(player,45,red stained glass pane)
  54.                 GuiFillForge(player,36,black stained glass pane)
  55.                 wait 2 ticks
  56.                 create gui slot 1 of player with iron helmet named "Helmet" with lore "Price: $100 and 10 iron ingots" to run:
  57.                     if player's balance is greater than or equal to 100:
  58.                         if player has 10 iron ingots:
  59.                             remove 10 iron ingots from player's inventory
  60.                             remove 100 from player's balance
  61.                             play raw sound "note.hat" at player with pitch 1 volume 1
  62.                             close player's inventory
  63.                             set {%player%.ForgeInProgress} to true
  64.                             set {_cooldown} to 30 minutes
  65.                             set {%player%.ForgeTime} to now
  66.                             add {_cooldown} to {%player%.ForgeTime}
  67.                             set {%player%.ForgeItem} to iron helmet
  68.                         else:
  69.                             play raw sound "note.bassattack" at player with pitch 1 volume 1
  70.                             send "&6>> &cYou don't have enough iron ingots to craft this"
  71.                     else:
  72.                         play raw sound "note.bassattack" at player with pitch 1 volume 1
  73.                         send "&6>> &cYou have insufficient funds to craft this"
  74.                 create gui slot 10 of player with iron chestplate named "Chestplate" with lore "Price: $100 and 10 iron ingots" to run:
  75.                     if player's balance is greater than or equal to 100:
  76.                         if player has 10 iron ingots:
  77.                             remove 10 iron ingots from player's inventory
  78.                             remove 100 from player's balance
  79.                             play raw sound "note.hat" at player with pitch 1 volume 1
  80.                             close player's inventory
  81.                             set {%player%.ForgeInProgress} to true
  82.                             set {_cooldown} to 30 minutes
  83.                             set {%player%.ForgeTime} to now
  84.                             add {_cooldown} to {%player%.ForgeTime}
  85.                             set {%player%.ForgeItem} to iron helmet
  86.                         else:
  87.                             play raw sound "note.bassattack" at player with pitch 1 volume 1
  88.                             send "&6>> &cYou don't have enough iron ingots to craft this"
  89.                     else:
  90.                         play raw sound "note.bassattack" at player with pitch 1 volume 1
  91.                         send "&6>> &cYou have insufficient funds to craft this"
  92.                 create gui slot 19 of player with iron Leggings named "Leggings" with lore "Price: $100 and 10 iron ingots" to run:
  93.                     if player's balance is greater than or equal to 100:
  94.                         if player has 10 iron ingots:
  95.                             remove 10 iron ingots from player's inventory
  96.                             remove 100 from player's balance
  97.                             play raw sound "note.hat" at player with pitch 1 volume 1
  98.                             close player's inventory
  99.                             set {%player%.ForgeInProgress} to true
  100.                             set {_cooldown} to 30 minutes
  101.                             set {%player%.ForgeTime} to now
  102.                             add {_cooldown} to {%player%.ForgeTime}
  103.                             set {%player%.ForgeItem} to iron helmet
  104.                         else:
  105.                             play raw sound "note.bassattack" at player with pitch 1 volume 1
  106.                             send "&6>> &cYou don't have enough iron ingots to craft this"
  107.                     else:
  108.                         play raw sound "note.bassattack" at player with pitch 1 volume 1
  109.                         send "&6>> &cYou have insufficient funds to craft this"
  110.                 create gui slot 28 of player with iron boots named "Boots" with lore "Price: $100 and 10 iron ingots" to run:
  111.                     if player's balance is greater than or equal to 100:
  112.                         if player has 10 iron ingots:
  113.                             remove 10 iron ingots from player's inventory
  114.                             remove 100 from player's balance
  115.                             play raw sound "note.hat" at player with pitch 1 volume 1
  116.                             close player's inventory
  117.                             set {%player%.ForgeInProgress} to true
  118.                             set {_cooldown} to 30 minutes
  119.                             set {%player%.ForgeTime} to now
  120.                             add {_cooldown} to {%player%.ForgeTime}
  121.                             set {%player%.ForgeItem} to iron helmet
  122.                         else:
  123.                             play raw sound "note.bassattack" at player with pitch 1 volume 1
  124.                             send "&6>> &cYou don't have enough iron ingots to craft this"
  125.                     else:
  126.                         play raw sound "note.bassattack" at player with pitch 1 volume 1
  127.                         send "&6>> &cYou have insufficient funds to craft this"
  128.                 create gui slot 7 of player with iron sword named "Sword" with lore "Price: $100 and 10 iron ingots" to run:
  129.                     if player's balance is greater than or equal to 100:
  130.                         if player has 10 iron ingots:
  131.                             remove 10 iron ingots from player's inventory
  132.                             remove 100 from player's balance
  133.                             play raw sound "note.hat" at player with pitch 1 volume 1
  134.                             close player's inventory
  135.                             set {%player%.ForgeInProgress} to true
  136.                             set {_cooldown} to 30 minutes
  137.                             set {%player%.ForgeTime} to now
  138.                             add {_cooldown} to {%player%.ForgeTime}
  139.                             set {%player%.ForgeItem} to iron helmet
  140.                         else:
  141.                             play raw sound "note.bassattack" at player with pitch 1 volume 1
  142.                             send "&6>> &cYou don't have enough iron ingots to craft this"
  143.                     else:
  144.                         play raw sound "note.bassattack" at player with pitch 1 volume 1
  145.                         send "&6>> &cYou have insufficient funds to craft this"
  146.                 create gui slot 16 of player with iron pickaxe named "Pickaxe" with lore "Price: $100 and 10 iron ingots" to run:
  147.                     if player's balance is greater than or equal to 100:
  148.                         if player has 10 iron ingots:
  149.                             remove 10 iron ingots from player's inventory
  150.                             remove 100 from player's balance
  151.                             play raw sound "note.hat" at player with pitch 1 volume 1
  152.                             close player's inventory
  153.                             set {%player%.ForgeInProgress} to true
  154.                             set {_cooldown} to 30 minutes
  155.                             set {%player%.ForgeTime} to now
  156.                             add {_cooldown} to {%player%.ForgeTime}
  157.                             set {%player%.ForgeItem} to iron helmet
  158.                         else:
  159.                             play raw sound "note.bassattack" at player with pitch 1 volume 1
  160.                             send "&6>> &cYou don't have enough iron ingots to craft this"
  161.                     else:
  162.                         play raw sound "note.bassattack" at player with pitch 1 volume 1
  163.                         send "&6>> &cYou have insufficient funds to craft this"
  164.                 create gui slot 25 of player with iron shovel named "Shovel" with lore "Price: $100 and 10 iron ingots" to run:
  165.                     if player's balance is greater than or equal to 100:
  166.                         if player has 10 iron ingots:
  167.                             remove 10 iron ingots from player's inventory
  168.                             remove 100 from player's balance
  169.                             play raw sound "note.hat" at player with pitch 1 volume 1
  170.                             close player's inventory
  171.                             set {%player%.ForgeInProgress} to true
  172.                             set {_cooldown} to 30 minutes
  173.                             set {%player%.ForgeTime} to now
  174.                             add {_cooldown} to {%player%.ForgeTime}
  175.                             set {%player%.ForgeItem} to iron helmet
  176.                         else:
  177.                             play raw sound "note.bassattack" at player with pitch 1 volume 1
  178.                             send "&6>> &cYou don't have enough iron ingots to craft this"
  179.                     else:
  180.                         play raw sound "note.bassattack" at player with pitch 1 volume 1
  181.                         send "&6>> &cYou have insufficient funds to craft this"
  182.             if block 2 below event-block is emerald block:
  183.                 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:
  184.                     play raw sound "note.bassattack" at player with pitch 1 volume 1
  185.                     send "&6>> &cTo unlock forging diamond tools and sets, upgrade &7&lForge&c."
  186.                     close player's inventory
  187.             else:
  188.                 create gui slot 15 of event-player with diamond named "&b&lForge Diamond Items" with lore "&6>> &bClick to forge diamond items" to run:
  189.                     play raw sound "note.hat" at player with pitch 1 volume 1
  190.                     close player's inventory
  191.                     wait 2 ticks
  192.                     open virtual chest with size 5 named "Forge Diamond Items" to player
  193.                     wait 2 ticks
  194.                     GuiFillForge(player,45,red stained glass pane)
  195.                     GuiFillForge(player,36,black stained glass pane)
  196.                     wait 2 ticks
  197.                     create gui slot 1 of player with diamond helmet named "Helmet" with lore "Price: $100 and 10 diamonds" to run:
  198.                         if player's balance is greater than or equal to 100:
  199.                             if player has 10 diamonds:
  200.                                 remove 10 diamonds from player's inventory
  201.                                 remove 100 from player's balance
  202.                                 play raw sound "note.hat" at player with pitch 1 volume 1
  203.                                 close player's inventory
  204.                                 set {%player%.ForgeInProgress} to true
  205.                                 set {_cooldown} to 30 minutes
  206.                                 set {%player%.ForgeTime} to now
  207.                                 add {_cooldown} to {%player%.ForgeTime}
  208.                                 set {%player%.ForgeItem} to diamond helmet
  209.                             else:
  210.                                 play raw sound "note.bassattack" at player with pitch 1 volume 1
  211.                                 send "&6>> &cYou don't have enough diamonds to craft this"
  212.                         else:
  213.                             play raw sound "note.bassattack" at player with pitch 1 volume 1
  214.                             send "&6>> &cYou have insufficient funds to craft this"
  215.                     create gui slot 10 of player with diamond chestplate named "Chestplate" with lore "Price: $100 and 10 diamonds" to run:
  216.                         if player's balance is greater than or equal to 100:
  217.                             if player has 10 diamonds:
  218.                                 remove 10 diamonds from player's inventory
  219.                                 remove 100 from player's balance
  220.                                 play raw sound "note.hat" at player with pitch 1 volume 1
  221.                                 close player's inventory
  222.                                 set {%player%.ForgeInProgress} to true
  223.                                 set {_cooldown} to 30 minutes
  224.                                 set {%player%.ForgeTime} to now
  225.                                 add {_cooldown} to {%player%.ForgeTime}
  226.                                 set {%player%.ForgeItem} to diamond helmet
  227.                             else:
  228.                                 play raw sound "note.bassattack" at player with pitch 1 volume 1
  229.                                 send "&6>> &cYou don't have enough diamonds to craft this"
  230.                         else:
  231.                             play raw sound "note.bassattack" at player with pitch 1 volume 1
  232.                             send "&6>> &cYou have insufficient funds to craft this"
  233.                     create gui slot 19 of player with diamond Leggings named "Leggings" with lore "Price: $100 and 10 diamonds" to run:
  234.                         if player's balance is greater than or equal to 100:
  235.                             if player has 10 diamonds:
  236.                                 remove 10 diamonds from player's inventory
  237.                                 remove 100 from player's balance
  238.                                 play raw sound "note.hat" at player with pitch 1 volume 1
  239.                                 close player's inventory
  240.                                 set {%player%.ForgeInProgress} to true
  241.                                 set {_cooldown} to 30 minutes
  242.                                 set {%player%.ForgeTime} to now
  243.                                 add {_cooldown} to {%player%.ForgeTime}
  244.                                 set {%player%.ForgeItem} to diamond helmet
  245.                             else:
  246.                                 play raw sound "note.bassattack" at player with pitch 1 volume 1
  247.                                 send "&6>> &cYou don't have enough diamonds to craft this"
  248.                         else:
  249.                             play raw sound "note.bassattack" at player with pitch 1 volume 1
  250.                             send "&6>> &cYou have insufficient funds to craft this"
  251.                     create gui slot 28 of player with diamond boots named "Boots" with lore "Price: $100 and 10 diamonds" to run:
  252.                         if player's balance is greater than or equal to 100:
  253.                             if player has 10 diamonds:
  254.                                 remove 10 diamonds from player's inventory
  255.                                 remove 100 from player's balance
  256.                                 play raw sound "note.hat" at player with pitch 1 volume 1
  257.                                 close player's inventory
  258.                                 set {%player%.ForgeInProgress} to true
  259.                                 set {_cooldown} to 30 minutes
  260.                                 set {%player%.ForgeTime} to now
  261.                                 add {_cooldown} to {%player%.ForgeTime}
  262.                                 set {%player%.ForgeItem} to diamond helmet
  263.                             else:
  264.                                 play raw sound "note.bassattack" at player with pitch 1 volume 1
  265.                                 send "&6>> &cYou don't have enough diamonds to craft this"
  266.                         else:
  267.                             play raw sound "note.bassattack" at player with pitch 1 volume 1
  268.                             send "&6>> &cYou have insufficient funds to craft this"
  269.                     create gui slot 7 of player with diamond sword named "Sword" with lore "Price: $100 and 10 diamonds" to run:
  270.                         if player's balance is greater than or equal to 100:
  271.                             if player has 10 diamonds:
  272.                                 remove 10 diamonds from player's inventory
  273.                                 remove 100 from player's balance
  274.                                 play raw sound "note.hat" at player with pitch 1 volume 1
  275.                                 close player's inventory
  276.                                 set {%player%.ForgeInProgress} to true
  277.                                 set {_cooldown} to 30 minutes
  278.                                 set {%player%.ForgeTime} to now
  279.                                 add {_cooldown} to {%player%.ForgeTime}
  280.                                 set {%player%.ForgeItem} to diamond helmet
  281.                             else:
  282.                                 play raw sound "note.bassattack" at player with pitch 1 volume 1
  283.                                 send "&6>> &cYou don't have enough diamonds to craft this"
  284.                         else:
  285.                             play raw sound "note.bassattack" at player with pitch 1 volume 1
  286.                             send "&6>> &cYou have insufficient funds to craft this"
  287.                     create gui slot 16 of player with diamond pickaxe named "Pickaxe" with lore "Price: $100 and 10 diamonds" to run:
  288.                         if player's balance is greater than or equal to 100:
  289.                             if player has 10 diamonds:
  290.                                 remove 10 diamonds from player's inventory
  291.                                 remove 100 from player's balance
  292.                                 play raw sound "note.hat" at player with pitch 1 volume 1
  293.                                 close player's inventory
  294.                                 set {%player%.ForgeInProgress} to true
  295.                                 set {_cooldown} to 30 minutes
  296.                                 set {%player%.ForgeTime} to now
  297.                                 add {_cooldown} to {%player%.ForgeTime}
  298.                                 set {%player%.ForgeItem} to diamond helmet
  299.                             else:
  300.                                 play raw sound "note.bassattack" at player with pitch 1 volume 1
  301.                                 send "&6>> &cYou don't have enough diamonds to craft this"
  302.                         else:
  303.                             play raw sound "note.bassattack" at player with pitch 1 volume 1
  304.                             send "&6>> &cYou have insufficient funds to craft this"
  305.                     create gui slot 25 of player with diamond shovel named "Shovel" with lore "Price: $100 and 10 diamonds" to run:
  306.                         if player's balance is greater than or equal to 100:
  307.                             if player has 10 diamonds:
  308.                                 remove 10 diamonds from player's inventory
  309.                                 remove 100 from player's balance
  310.                                 play raw sound "note.hat" at player with pitch 1 volume 1
  311.                                 close player's inventory
  312.                                 set {%player%.ForgeInProgress} to true
  313.                                 set {_cooldown} to 30 minutes
  314.                                 set {%player%.ForgeTime} to now
  315.                                 add {_cooldown} to {%player%.ForgeTime}
  316.                                 set {%player%.ForgeItem} to diamond helmet
  317.                             else:
  318.                                 play raw sound "note.bassattack" at player with pitch 1 volume 1
  319.                                 send "&6>> &cYou don't have enough diamonds to craft this"
  320.                         else:
  321.                             play raw sound "note.bassattack" at player with pitch 1 volume 1
  322.                             send "&6>> &cYou have insufficient funds to craft this"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement