Advertisement
Guest User

Untitled

a guest
Mar 28th, 2020
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.80 KB | None | 0 0
  1. function shop(p: player,i1: item,i1a: number,i2: item,i2a: number,ig: item):
  2. if amount of {_i1} in {_p}'s inventory >= {_i1a}:
  3. if amount of {_i2} in {_p}'s inventory >= {_i2a}:
  4. remove {_i2a} of {_i2} from {_p}'s inventory
  5. remove {_i1a} of {_i1} from {_p}'s inventory
  6. give {_p} {_ig}
  7. send "&3&lQuarryX &aSuccessful Purchase" to {_p}
  8. else:
  9. send "&3&lQuarryX &cNot Enough Materials" to {_p}
  10. else:
  11. send "&3&lQuarryX &cNot Enough Materials" to {_p}
  12.  
  13. function minerwood(p: player):
  14. open virtual chest inventory with size 1 named "Wooden Pickaxes" to {_p}
  15. wait 1.5 ticks
  16. format gui slot 0,1,7 and 8 of {_p} with gray stained glass pane named "&f" to do nothing
  17. format gui slot 2 of {_p} with wooden pickaxe named "&7&lWooden Pickaxe I" with lore "&9Efficiency 1", "&f", "&6&lItems:", "&f", "&716 Cobblestone" and "&7Starter Pickaxe" to run function shop({_p},cobblestone,16,unbreakable wooden pickaxe named "&7Starter Pickaxe",1,unbreakable wooden pickaxe of efficiency 1 named "&7&lWooden Pickaxe I")
  18. format gui slot 3 of {_p} with wooden pickaxe of unbreaking 1 with hidden enchants named "&7&lWooden Pickaxe II" with lore "&9Efficiency 2", "&f", "&6&lItems:", "&f", "&732 Cobblestone" and "&7&lWooden Pickaxe II" to run function shop({_p},cobblestone,32,unbreakable wooden pickaxe of efficiency 1 named "&7&lWooden Pickaxe I",1,unbreakable wooden pickaxe of efficiency 2 named "&7&lWooden Pickaxe II")
  19. format gui slot 4 of {_p} with wooden pickaxe of unbreaking 1 with hidden enchants named "&7&lWooden Pickaxe III" with lore "&9Efficiency 3", "&f", "&6&lItems:", "&f", "&764 Cobblestone" and "&7&lWooden Pickaxe II" to run function shop({_p},cobblestone,64,unbreakable wooden pickaxe of efficiency 2 named "&7&lWooden Pickaxe II",1,unbreakable wooden pickaxe of efficiency 3 named "&7&lWooden Pickaxe III")
  20. format gui slot 5 of {_p} with wooden pickaxe of unbreaking 1 with hidden enchants named "&7&lWooden Pickaxe IV" with lore "&9Efficiency 4", "&f", "&6&lItems:", "&f", "&72 Stacks of Cobblestone" and "&7&lWooden Pickaxe III" to run function shop({_p},cobblestone,128,unbreakable wooden pickaxe of efficiency 3 named "&7&lWooden Pickaxe III",1,unbreakable wooden pickaxe of efficiency 4 named "&7&lWooden Pickaxe IV")
  21. format gui slot 6 of {_p} with wooden pickaxe of unbreaking 1 with hidden enchants named "&7&lWooden Pickaxe V" with lore "&9Efficiency 5", "&f", "&6&lItems:", "&f", "&75 Stacks of Cobblestone" and "&7&lWooden Pickaxe IV" to run function shop({_p},cobblestone,320,unbreakable wooden pickaxe of efficiency 4 named "&7&lWooden Pickaxe IV",1,unbreakable wooden pickaxe of efficiency 5 named "&7&lWooden Pickaxe V")
  22. format gui slot 8 of {_p} with red concrete named "&c&lGo Back" to run function minershop({_p})
  23.  
  24. function minerstone(p: player):
  25. open virtual chest inventory with size 1 named "Stone" to {_p}
  26. wait 1.5 ticks
  27. format gui slot 0,7 and 8 of {_p} with gray stained glass pane named "&f" to do nothing
  28. format gui slot 8 of {_p} with red concrete named "&c&lGo Back" to run function minershop({_p})
  29.  
  30. format gui slot 1 of {_p} with stone pickaxe of unbreaking 1 with hidden enchants named "&7&lStone Pickaxe I" with lore "&f", "&6&lItems:", "&f", "&71 Stacks of Coal" and "&7&lWooden Pickaxe V" to run function shop({_p},coal,64,unbreakable wooden pickaxe of efficiency 5 named "&7&lWooden Pickaxe V",1,unbreakable stone pickaxe named "&7&lStone Pickaxe I")
  31. format gui slot 2 of {_p} with stone pickaxe of unbreaking 1 with hidden enchants named "&7&lStone Pickaxe II" with lore "&9Efficiency 1", "&f", "&6&lItems:", "&f", "&72 Stacks of Coal" and "&7&lStone Pickaxe I" to run function shop({_p},coal,128,unbreakable stone pickaxe named "&7&lStone Pickaxe I",1,unbreakable stone pickaxe of efficiency 1 named "&7&lStone Pickaxe II")
  32. format gui slot 3 of {_p} with stone pickaxe of unbreaking 1 with hidden enchants named "&7&lStone Pickaxe III" with lore "&9Efficiency 2", "&f", "&6&lItems:", "&f", "&73 Stacks of Coal" and "&7&lStone Pickaxe II" to run function shop({_p},coal,192,unbreakable stone pickaxe of efficiency 1 named "&7&lStone Pickaxe II",1,unbreakable stone pickaxe of efficiency 2 named "&7&lStone Pickaxe III")
  33. format gui slot 4 of {_p} with stone pickaxe of unbreaking 1 with hidden enchants named "&7&lStone Pickaxe IV" with lore "&9Efficiency 3", "&f", "&6&lItems:", "&f", "&74 Stacks of Coal" and "&7&lStone Pickaxe III" to run function shop({_p},coal,256,unbreakable stone pickaxe of efficiency 2 named "&7&lStone Pickaxe III",1,unbreakable stone pickaxe of efficiency 3 named "&7&lStone Pickaxe IV")
  34. format gui slot 5 of {_p} with stone pickaxe of unbreaking 1 with hidden enchants named "&7&lStone Pickaxe V" with lore "&9Efficiency 4", "&f", "&6&lItems:", "&f", "&75 Stacks of Coal" and "&7&lStone Pickaxe IV" to run function shop({_p},coal,320,unbreakable stone pickaxe of efficiency 3 named "&7&lStone Pickaxe IV",1,unbreakable stone pickaxe of efficiency 4 named "&7&lStone Pickaxe V")
  35. format gui slot 6 of {_p} with stone pickaxe of unbreaking 1 with hidden enchants named "&7&lStone Pickaxe VI" with lore "&9Efficiency 5", "&f", "&6&lItems:", "&f", "&77 Stacks of Coal" and "&7&lStone Pickaxe V" to run function shop({_p},coal,448,unbreakable stone pickaxe of efficiency 4 named "&7&lStone Pickaxe V",1,unbreakable stone pickaxe of efficiency 5 named "&7&lStone Pickaxe VI")
  36.  
  37. format gui slot 8 of {_p} with red concrete named "&c&lGo Back" to run function minershop({_p})
  38.  
  39. function minershop(p: player):
  40. open virtual hopper inventory named "Miner" to {_p}
  41. wait 1.5 ticks
  42. format gui slot 0 of {_p} with wooden pickaxe named "&7Wooden" to run function minerwood({_p})
  43. format gui slot 1 of {_p} with stone pickaxe named "&7Stone" to run function minerstone({_p})
  44.  
  45.  
  46. on right click on entity:
  47. if clicked entity is a citizen:
  48. if clicked entity is "&eThe Miner":
  49. minershop(player)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement