SHARE
TWEET

Untitled

AdamLam Jan 24th, 2020 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function GuiFill(p: player):
  2.     set {i.loop} to 0
  3.     loop 27 times:
  4.         create gui slot {i.loop} of {_p} with black stained glass pane named " " with lore " " to do nothing
  5.         set {i.loop} to {i.loop}+1
  6. inventory click:
  7.     if inventory name of current inventory of player contains "&4Enchant":
  8.         cancel event
  9. on click on anvil:
  10.     if {anvil.enchant.time.%player%} is greater than 0:
  11.         send "cooldown"
  12.         cancel event
  13.     else:
  14.         set {anvil.enchant.time.%player%} to 10
  15.         if block below event-block is quartz block:
  16.             stopEffect "%player%"
  17.             set {block} to location at event-block
  18.             drawDot count 5, particle "lava", material wool, XYZ 1, 1, 1, center location of event-block, visibleRange 5, pulseDelay 1, keepFor 4 seconds
  19.             if event-item is sword:
  20.                 cancel event
  21.                 open virtual chest with size 3 named "&4Enchant - sword" to event-player
  22.                 wait 5 ticks
  23.                 GuiFill(player)
  24.                 wait 5 ticks
  25.                 if player's held item is event-item:
  26.                     create gui slot 10 of event-player with red dye named "&6&lSharpness V" with lore "Price: 5 diamonds" to run:
  27.                         if player has 5 diamonds:
  28.                             remove 5 diamonds from player
  29.                             enchant the player's tool with sharpness 5
  30.                             send "wiadomosc z enchantem"
  31.                         else:
  32.                             send "wiadomosc z brakiem waluty"
  33.                         close player's inventory
  34.                     create gui slot 11 of event-player with green dye named "&6&lFire aspect III" with lore "Price: 5 diamonds" to run:
  35.                         if player has 5 diamonds:
  36.                             remove 5 diamonds from player
  37.                             enchant the player's tool with Fire aspect 3
  38.                             send "wiadomosc z enchantem"
  39.                         else:
  40.                             send "wiadomosc z brakiem waluty"
  41.                         close player's inventory
  42.                     create gui slot 12 of event-player with purple dye named "&6&lLooting III" with lore "Price: 5 diamonds" to run:
  43.                         if player has 5 diamonds:
  44.                             remove 5 diamonds from player
  45.                             enchant the player's tool with looting 3
  46.                             send "wiadomosc z enchantem"
  47.                         else:
  48.                             send "wiadomosc z brakiem waluty"
  49.                         close player's inventory
  50.                     create gui slot 13 of event-player with cyan dye named "&6&lUnbreaking III" with lore "Price: 5 diamonds" to run:
  51.                         if player has 5 diamonds:
  52.                             remove 5 diamonds from player
  53.                             enchant the player's tool with unbreaking 3
  54.                             send "wiadomosc z enchantem"
  55.                         else:
  56.                             send "wiadomosc z brakiem waluty"
  57.                         close player's inventory
  58.                     create gui slot 14 of event-player with light gray dye named "&6&lKnockback II" with lore "Price: 5 diamonds" to run:
  59.                         if player has 5 diamonds:
  60.                             remove 5 diamonds from player
  61.                             enchant the player's tool with knockback 2
  62.                             send "wiadomosc z enchantem"
  63.                         else:
  64.                             send "wiadomosc z brakiem waluty"
  65.                         close player's inventory
  66.                     create gui slot 15 of event-player with lime dye named "&6&lBane of Arthropods V" with lore "Price: 5 diamonds" to run:
  67.                         if player has 5 diamonds:
  68.                             remove 5 diamonds from player
  69.                             enchant the player's tool with bane of arthropods 5
  70.                             send "wiadomosc z enchantem"
  71.                         else:
  72.                             send "wiadomosc z brakiem waluty"
  73.                         close player's inventory
  74.                     create gui slot 16 of event-player with orange dye named "&6&lSmite" with lore "Price: 5 diamonds" to run:
  75.                         if player has 5 diamonds:
  76.                             remove 5 diamonds from player
  77.                             enchant the player's tool with smite 5
  78.                             send "wiadomosc z enchantem"
  79.                         else:
  80.                             send "wiadomosc z brakiem waluty"
  81.                         close player's inventory
  82.                 else:
  83.                     create gui slot 13 of event-player with barrier block named "&4&lError" with lore "&6&lClick to exit" to run:
  84.                         close player's inventory
  85.             if event-item is helmet:
  86.                 cancel event
  87.                 open virtual chest with size 3 named "&4Enchant - Helmet" to event-player
  88.                 wait 5 ticks
  89.                 GuiFill(player)
  90.                 wait 5 ticks
  91.                 if player's held item is event-item:
  92.                     create gui slot 10 of event-player with red dye named "&6&lProtection IV" with lore "Price: 5 diamonds" to run:
  93.                         if player has 5 diamonds:
  94.                             remove 5 diamonds from player
  95.                             enchant the player's tool with Protection 4
  96.                             send "wiadomosc z enchantem"
  97.                         else:
  98.                             send "wiadomosc z brakiem waluty"
  99.                         close player's inventory
  100.                     create gui slot 11 of event-player with green dye named "&6&lUnbreaking III" with lore "Price: 5 diamonds" to run:
  101.                         if player has 5 diamonds:
  102.                             remove 5 diamonds from player
  103.                             enchant the player's tool with Unbreaking 3
  104.                             send "wiadomosc z enchantem"
  105.                         else:
  106.                             send "wiadomosc z brakiem waluty"
  107.                         close player's inventory
  108.                     create gui slot 12 of event-player with orange dye named "&6&lBlast Protection" with lore "Price: 5 diamonds" to run:
  109.                         if player has 5 diamonds:
  110.                             remove 5 diamonds from player
  111.                             enchant the player's tool with Blast Protection 4
  112.                             send "wiadomosc z enchantem"
  113.                         else:
  114.                             send "wiadomosc z brakiem waluty"
  115.                         close player's inventory
  116.                     create gui slot 13 of event-player with purple dye named "&6&lThorns" with lore "Price: 5 diamonds" to run:
  117.                         if player has 5 diamonds:
  118.                             remove 5 diamonds from player
  119.                             enchant the player's tool with thorns 3
  120.                             send "wiadomosc z enchantem"
  121.                         else:
  122.                             send "wiadomosc z brakiem waluty"
  123.                         close player's inventory
  124.                     create gui slot 14 of event-player with light gray dye named "&6&lFire Protection" with lore "Price: 5 diamonds" to run:
  125.                         if player has 5 diamonds:
  126.                             remove 5 diamonds from player
  127.                             enchant the player's tool with fire protection 4
  128.                             send "wiadomosc z enchantem"
  129.                         else:
  130.                             send "wiadomosc z brakiem waluty"
  131.                         close player's inventory
  132.                 else:
  133.                     create gui slot 13 of event-player with barrier block named "&4&lError" with lore "&6&lClick to exit" to run:
  134.                         close player's inventory
  135.             if event-item is chestplate:
  136.                 cancel event
  137.                 open virtual chest with size 3 named "&4Enchant - Chestplate" to event-player
  138.                 wait 5 ticks
  139.                 GuiFill(player)
  140.                 wait 5 ticks
  141.                 if player's held item is event-item:
  142.                     create gui slot 10 of event-player with red dye named "&6&lProtection IV" with lore "Price: 5 diamonds" to run:
  143.                         if player has 5 diamonds:
  144.                             remove 5 diamonds from player
  145.                             enchant the player's tool with Protection 4
  146.                             send "wiadomosc z enchantem"
  147.                         else:
  148.                             send "wiadomosc z brakiem waluty"
  149.                         close player's inventory
  150.                     create gui slot 11 of event-player with green dye named "&6&lUnbreaking III" with lore "Price: 5 diamonds" to run:
  151.                         if player has 5 diamonds:
  152.                             remove 5 diamonds from player
  153.                             enchant the player's tool with Unbreaking 3
  154.                             send "wiadomosc z enchantem"
  155.                         else:
  156.                             send "wiadomosc z brakiem waluty"
  157.                         close player's inventory
  158.                     create gui slot 12 of event-player with orange dye named "&6&lBlast Protection" with lore "Price: 5 diamonds" to run:
  159.                         if player has 5 diamonds:
  160.                             remove 5 diamonds from player
  161.                             enchant the player's tool with Blast Protection 4
  162.                             send "wiadomosc z enchantem"
  163.                         else:
  164.                             send "wiadomosc z brakiem waluty"
  165.                         close player's inventory
  166.                     create gui slot 13 of event-player with purple dye named "&6&lThorns" with lore "Price: 5 diamonds" to run:
  167.                         if player has 5 diamonds:
  168.                             remove 5 diamonds from player
  169.                             enchant the player's tool with thorns 3
  170.                             send "wiadomosc z enchantem"
  171.                         else:
  172.                             send "wiadomosc z brakiem waluty"
  173.                         close player's inventory
  174.                     create gui slot 14 of event-player with light gray dye named "&6&lFire Protection" with lore "Price: 5 diamonds" to run:
  175.                         if player has 5 diamonds:
  176.                             remove 5 diamonds from player
  177.                             enchant the player's tool with fire protection 4
  178.                             send "wiadomosc z enchantem"
  179.                         else:
  180.                             send "wiadomosc z brakiem waluty"
  181.                         close player's inventory
  182.                 else:
  183.                     create gui slot 13 of event-player with barrier block named "&4&lError" with lore "&6&lClick to exit" to run:
  184.                         close player's inventory
  185.             if event-item is leggings:
  186.                 cancel event
  187.                 open virtual chest with size 3 named "&4Enchant - Leggings" to event-player
  188.                 wait 5 ticks
  189.                 GuiFill(player)
  190.                 wait 5 ticks
  191.                 if player's held item is event-item:
  192.                     create gui slot 10 of event-player with red dye named "&6&lProtection IV" with lore "Price: 5 diamonds" to run:
  193.                         if player has 5 diamonds:
  194.                             remove 5 diamonds from player
  195.                             enchant the player's tool with Protection 4
  196.                             send "wiadomosc z enchantem"
  197.                         else:
  198.                             send "wiadomosc z brakiem waluty"
  199.                         close player's inventory
  200.                     create gui slot 11 of event-player with green dye named "&6&lUnbreaking III" with lore "Price: 5 diamonds" to run:
  201.                         if player has 5 diamonds:
  202.                             remove 5 diamonds from player
  203.                             enchant the player's tool with Unbreaking 3
  204.                             send "wiadomosc z enchantem"
  205.                         else:
  206.                             send "wiadomosc z brakiem waluty"
  207.                         close player's inventory
  208.                     create gui slot 12 of event-player with orange dye named "&6&lBlast Protection" with lore "Price: 5 diamonds" to run:
  209.                         if player has 5 diamonds:
  210.                             remove 5 diamonds from player
  211.                             enchant the player's tool with Blast Protection 4
  212.                             send "wiadomosc z enchantem"
  213.                         else:
  214.                             send "wiadomosc z brakiem waluty"
  215.                         close player's inventory
  216.                     create gui slot 13 of event-player with purple dye named "&6&lThorns" with lore "Price: 5 diamonds" to run:
  217.                         if player has 5 diamonds:
  218.                             remove 5 diamonds from player
  219.                             enchant the player's tool with thorns 3
  220.                             send "wiadomosc z enchantem"
  221.                         else:
  222.                             send "wiadomosc z brakiem waluty"
  223.                         close player's inventory
  224.                     create gui slot 14 of event-player with light gray dye named "&6&lFire Protection" with lore "Price: 5 diamonds" to run:
  225.                         if player has 5 diamonds:
  226.                             remove 5 diamonds from player
  227.                             enchant the player's tool with fire protection 4
  228.                             send "wiadomosc z enchantem"
  229.                         else:
  230.                             send "wiadomosc z brakiem waluty"
  231.                         close player's inventory
  232.                 else:
  233.                     create gui slot 13 of event-player with barrier block named "&4&lError" with lore "&6&lClick to exit" to run:
  234.                         close player's inventory
  235.             if event-item is boots:
  236.                 cancel event
  237.                 open virtual chest with size 3 named "&4Enchant - Boots" to event-player
  238.                 wait 5 ticks
  239.                 GuiFill(player)
  240.                 wait 5 ticks
  241.                 if player's held item is event-item:
  242.                     create gui slot 10 of event-player with red dye named "&6&lProtection IV" with lore "Price: 5 diamonds" to run:
  243.                         if player has 5 diamonds:
  244.                             remove 5 diamonds from player
  245.                             enchant the player's tool with Protection 4
  246.                             send "wiadomosc z enchantem"
  247.                         else:
  248.                             send "wiadomosc z brakiem waluty"
  249.                         close player's inventory
  250.                     create gui slot 11 of event-player with green dye named "&6&lUnbreaking III" with lore "Price: 5 diamonds" to run:
  251.                         if player has 5 diamonds:
  252.                             remove 5 diamonds from player
  253.                             enchant the player's tool with Unbreaking 3
  254.                             send "wiadomosc z enchantem"
  255.                         else:
  256.                             send "wiadomosc z brakiem waluty"
  257.                         close player's inventory
  258.                     create gui slot 12 of event-player with orange dye named "&6&lBlast Protection" with lore "Price: 5 diamonds" to run:
  259.                         if player has 5 diamonds:
  260.                             remove 5 diamonds from player
  261.                             enchant the player's tool with Blast Protection 4
  262.                             send "wiadomosc z enchantem"
  263.                         else:
  264.                             send "wiadomosc z brakiem waluty"
  265.                         close player's inventory
  266.                     create gui slot 13 of event-player with purple dye named "&6&lThorns" with lore "Price: 5 diamonds" to run:
  267.                         if player has 5 diamonds:
  268.                             remove 5 diamonds from player
  269.                             enchant the player's tool with thorns 3
  270.                             send "wiadomosc z enchantem"
  271.                         else:
  272.                             send "wiadomosc z brakiem waluty"
  273.                         close player's inventory
  274.                     create gui slot 14 of event-player with light gray dye named "&6&lFire Protection" with lore "Price: 5 diamonds" to run:
  275.                         if player has 5 diamonds:
  276.                             remove 5 diamonds from player
  277.                             enchant the player's tool with fire protection 4
  278.                             send "wiadomosc z enchantem"
  279.                         else:
  280.                             send "wiadomosc z brakiem waluty"
  281.                         close player's inventory
  282.                 else:
  283.                     create gui slot 13 of event-player with barrier block named "&4&lError" with lore "&6&lClick to exit" to run:
  284.                         close player's inventory
  285.             else if player's tool is not boots or sword or leggings or chestplate or helmet:
  286.                 cancel event
  287.                 send "Wybierz bron wiadomosc"
  288.         wait 5 seconds
  289.         set {anvil.enchant.time.%player%} to 0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top