Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GuiFill(p: player):
- set {i.loop} to 0
- loop 27 times:
- create gui slot {i.loop} of {_p} with black stained glass pane named " " with lore " " to do nothing
- set {i.loop} to {i.loop}+1
- inventory click:
- if inventory name of current inventory of player contains "&4Enchant":
- cancel event
- on click on enchantment table:
- if {anvil.enchant.time.%player%} is greater than 0:
- send "cooldown"
- cancel event
- else:
- set {anvil.enchant.time.%player%} to 10
- if block below event-block is quartz block:
- stopEffect "%player%"
- set {block} to location at event-block
- drawDot count 2, particle "witchSpell", material wool, XYZ 0.5, 0.4, 0.5, center location of event-block, visibleRange 10, pulseDelay 1, keepFor 1 seconds
- if event-item is sword:
- cancel event
- open virtual chest with size 3 named "&4Enchant - sword" to event-player
- wait 5 ticks
- GuiFill(player)
- wait 5 ticks
- if player's held item is event-item:
- create gui slot 10 of event-player with red dye named "&6&lSharpness V" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with sharpness 5
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- create gui slot 11 of event-player with green dye named "&6&lFire aspect III" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with Fire aspect 3
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- create gui slot 12 of event-player with purple dye named "&6&lLooting III" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with looting 3
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- create gui slot 13 of event-player with cyan dye named "&6&lUnbreaking III" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with unbreaking 3
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- create gui slot 14 of event-player with light gray dye named "&6&lKnockback II" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with knockback 2
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- create gui slot 15 of event-player with lime dye named "&6&lBane of Arthropods V" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with bane of arthropods 5
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- create gui slot 16 of event-player with orange dye named "&6&lSmite" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with smite 5
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- else:
- create gui slot 13 of event-player with barrier block named "&4&lError" with lore "&6&lClick to exit" to run:
- close player's inventory
- if event-item is helmet:
- cancel event
- open virtual chest with size 3 named "&4Enchant - Helmet" to event-player
- wait 5 ticks
- GuiFill(player)
- wait 5 ticks
- if player's held item is event-item:
- create gui slot 10 of event-player with red dye named "&6&lProtection IV" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with Protection 4
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- create gui slot 11 of event-player with green dye named "&6&lUnbreaking III" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with Unbreaking 3
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- create gui slot 12 of event-player with orange dye named "&6&lBlast Protection" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with Blast Protection 4
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- create gui slot 13 of event-player with purple dye named "&6&lThorns" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with thorns 3
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- create gui slot 14 of event-player with light gray dye named "&6&lFire Protection" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with fire protection 4
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- else:
- create gui slot 13 of event-player with barrier block named "&4&lError" with lore "&6&lClick to exit" to run:
- close player's inventory
- if event-item is chestplate:
- cancel event
- open virtual chest with size 3 named "&4Enchant - Chestplate" to event-player
- wait 5 ticks
- GuiFill(player)
- wait 5 ticks
- if player's held item is event-item:
- create gui slot 10 of event-player with red dye named "&6&lProtection IV" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with Protection 4
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- create gui slot 11 of event-player with green dye named "&6&lUnbreaking III" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with Unbreaking 3
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- create gui slot 12 of event-player with orange dye named "&6&lBlast Protection" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with Blast Protection 4
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- create gui slot 13 of event-player with purple dye named "&6&lThorns" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with thorns 3
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- create gui slot 14 of event-player with light gray dye named "&6&lFire Protection" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with fire protection 4
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- else:
- create gui slot 13 of event-player with barrier block named "&4&lError" with lore "&6&lClick to exit" to run:
- close player's inventory
- if event-item is leggings:
- cancel event
- open virtual chest with size 3 named "&4Enchant - Leggings" to event-player
- wait 5 ticks
- GuiFill(player)
- wait 5 ticks
- if player's held item is event-item:
- create gui slot 10 of event-player with red dye named "&6&lProtection IV" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with Protection 4
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- create gui slot 11 of event-player with green dye named "&6&lUnbreaking III" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with Unbreaking 3
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- create gui slot 12 of event-player with orange dye named "&6&lBlast Protection" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with Blast Protection 4
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- create gui slot 13 of event-player with purple dye named "&6&lThorns" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with thorns 3
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- create gui slot 14 of event-player with light gray dye named "&6&lFire Protection" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with fire protection 4
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- else:
- create gui slot 13 of event-player with barrier block named "&4&lError" with lore "&6&lClick to exit" to run:
- close player's inventory
- if event-item is boots:
- cancel event
- open virtual chest with size 3 named "&4Enchant - Boots" to event-player
- wait 5 ticks
- GuiFill(player)
- wait 5 ticks
- if player's held item is event-item:
- create gui slot 10 of event-player with red dye named "&6&lProtection IV" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with Protection 4
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- create gui slot 11 of event-player with green dye named "&6&lUnbreaking III" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with Unbreaking 3
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- create gui slot 12 of event-player with orange dye named "&6&lBlast Protection" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with Blast Protection 4
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- create gui slot 13 of event-player with purple dye named "&6&lThorns" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with thorns 3
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- create gui slot 14 of event-player with light gray dye named "&6&lFire Protection" with lore "Price: 5 diamonds" to run:
- if player has 5 diamonds:
- remove 5 diamonds from player
- enchant the player's tool with fire protection 4
- send "wiadomosc z enchantem"
- else:
- send "wiadomosc z brakiem waluty"
- close player's inventory
- else:
- create gui slot 13 of event-player with barrier block named "&4&lError" with lore "&6&lClick to exit" to run:
- close player's inventory
- else if player's tool is not boots or sword or leggings or chestplate or helmet:
- cancel event
- send "Wybierz bron wiadomosc"
- wait 5 seconds
- set {anvil.enchant.time.%player%} to 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement