Advertisement
Guest User

Untitled

a guest
Oct 5th, 2020
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.16 KB | None | 0 0
  1. on place:
  2. if event-block is hay block:
  3. if {genLimit::%player's uuid%} is less than 15:
  4. add 1 to {genLimit::%player's uuid%}
  5. add event-block's location to {gens::%player's uuid%::*}
  6. else:
  7. send "&cSorry! You seem to be at your gen limit. &8(&c15&8)&c."
  8. cancel event
  9. if event-block is melon:
  10. if {genLimit::%player's uuid%} is less than 15:
  11. add 1 to {genLimit::%player's uuid%}
  12. add event-block's location to {gens::%player's uuid%::*}
  13. else:
  14. send "&cSorry! You seem to be at your gen limit. &8(&c15&8)&c."
  15. cancel event
  16. if event-block is pumpkin:
  17. if {genLimit::%player's uuid%} is less than 15:
  18. add 1 to {genLimit::%player's uuid%}
  19. add event-block's location to {gens::%player's uuid%::*}
  20. else:
  21. send "&cSorry! You seem to be at your gen limit. &8(&c15&8)&c."
  22. cancel event
  23.  
  24.  
  25.  
  26. every 10 seconds:
  27. loop all players:
  28. loop all blocks in radius 5 of loop-player:
  29. if loop-block is hay block:
  30. if {gens::%loop-player's uuid%::*} contains loop-block's location:
  31. drop 1 wheat above {gens::%loop-player's uuid%::*} named "&8[&2+&8] &7$1"
  32. if loop-block is melon:
  33. if {gens::%loop-player's uuid%::*} contains loop-block's location:
  34. drop 1 melon slice above {gens::%loop-player's uuid%::*} named "&8[&2+&8] &7$2"
  35. if loop-block is pumpkin:
  36. if {gens::%loop-player's uuid%::*} contains loop-block's location:
  37. drop 1 pumpkin pie above {gens::%loop-player's uuid%::*} named "&8[&2+&8] &7$3"
  38.  
  39.  
  40.  
  41.  
  42. on rightclick:
  43. if player's tool is wheat:
  44. set {_e} to amount of wheat in player's inventory
  45. remove {_e} of wheat from player's inventory
  46. set {_s} to {_e} * 1.2
  47. send title "&2Sold!" with subtitle "&aSold {_e} wheat(s) for {_s}"
  48. add {_s} to {balance::%player's uuid%}
  49. if player's tool is melon slice:
  50. set {_e} to amount of melon slice in player's inventory
  51. remove {_e} of melon slice from player's inventory
  52. set {_s} to {_e} * 1.2
  53. send title "&2Sold!" with subtitle "&aSold {_e} melon(s) for {_s}"
  54. add {_s} to {balance::%player's uuid%}
  55. if player's tool is pumpkin pie:
  56. set {_e} to amount of pumpkin pie in player's inventory
  57. remove {_e} of pumpkin pie from player's inventory
  58. set {_s} to {_e} * 1.2
  59. send title "&2Sold!" with subtitle "&aSold {_e} pumpkin(s) for {_s}"
  60. add {_s} to {balance::%player's uuid%}
  61.  
  62.  
  63. on rightclick;
  64. if {gens::%player's uuid%::*} contains event-block's location:
  65. if player is sneaking:
  66. if event-block is hay:
  67. if {balance::%player's uuid%} is equal to or greater than 10000:
  68. remove 10000 from {balance::%player's uuid%}
  69. set event-block to melon
  70. send title "&2Success!" with subtitle "&eSuccessfully upgraded your wheat gen to a melon gen."
  71. else:
  72. send title "&cError!" with subtitle "&cYou don't have enough money to do that."
  73. if event-block is melon:
  74. if {balance::%player's uuid%} is equal to or greater than 20000:
  75. remove 20000 from {balance::%player's uuid%}
  76. set event-block to pumpkin
  77. send title "&2Success!" with subtitle "&eSuccessfully upgraded your melon gen to a pumpkin gen."
  78. else:
  79. send title "&cError!" with subtitle "&cYou don't have enough money to do that.
  80.  
  81.  
  82.  
  83.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement