Advertisement
MinehutDev

Pickaxe Enchantments (2)

Mar 23rd, 2019
598
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. on rightclick:
  2. if player is holding a diamond pickaxe:
  3. set {h1} to "%player%" parsed as offlineplayer
  4. open virtual chest inventory with size 5 named "&6&lEnchant" to player
  5. loop integers from 0 to 44:
  6. make gui slot loop-value of player with yellow glass named " " to do nothing
  7. make gui slot 4 of player with {h1}'s skull named "&e%player%" with lore "&eBalance: &6&o%{balance.%player's uuid%}%||&eCurrent Menu: &6Enchant" to do nothing
  8. make gui slot 10 of player with book named "&eEfficiency" with lore "&7||&8» &ePrice: &f%{efficiency.price.%player's uuid%}%||&8» &eClick to buy" to run:
  9. if player's balance >= {efficiency.price.%player's uuid%}:
  10. remove {efficiency.price.%player's uuid%} from player's balance
  11. enchant the tool with "efficiency %level of efficiency of the tool + 1%" parsed as enchantment type
  12. send "&eYou have purchased &f1 &elevel of efficiency." to player
  13. add 500 to {efficiency.price.%player's uuid%}
  14. close player's inventory
  15. else:
  16. send "&eYou do not have enough money to make this transaction!" to player
  17. make gui slot 12 of player with book named "&eFortune" with lore "&7||&8» &ePrice: &f%{fortune.price.%player's uuid%}%||&8» &eClick to buy" to run:
  18. if player's balance >= {fortune.price.%player's uuid%}:
  19. remove {fortune.price.%player's uuid%} from player's balance
  20. enchant the tool with "fortune %level of fortune of the tool + 1%" parsed as enchantment type
  21. send "&eYou have purchased &f1 &elevel of fortune." to player
  22. add 5 to {sellamount.%player's uuid%}
  23. add 1000 to {fortune.price.%player's uuid%}
  24. close player's inventory
  25. else:
  26. send "&eYou do not have enough money to make this transaction!" to player
  27.  
  28. on break:
  29. add {sellamount.%player's uuid%} to player's balance
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement