Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on place:
- if event-block is hay block:
- if {genLimit::%player's uuid%} is less than 15:
- add 1 to {genLimit::%player's uuid%}
- add event-block's location to {gens::%player's uuid%::*}
- else:
- send "&cSorry! You seem to be at your gen limit. &8(&c15&8)&c."
- cancel event
- if event-block is melon:
- if {genLimit::%player's uuid%} is less than 15:
- add 1 to {genLimit::%player's uuid%}
- add event-block's location to {gens::%player's uuid%::*}
- else:
- send "&cSorry! You seem to be at your gen limit. &8(&c15&8)&c."
- cancel event
- if event-block is pumpkin:
- if {genLimit::%player's uuid%} is less than 15:
- add 1 to {genLimit::%player's uuid%}
- add event-block's location to {gens::%player's uuid%::*}
- else:
- send "&cSorry! You seem to be at your gen limit. &8(&c15&8)&c."
- cancel event
- every 10 seconds:
- loop all players:
- loop all blocks in radius 5 of loop-player:
- if loop-block is hay block:
- if {gens::%loop-player's uuid%::*} contains loop-block's location:
- drop 1 wheat above {gens::%loop-player's uuid%::*} named "&8[&2+&8] &7$1"
- if loop-block is melon:
- if {gens::%loop-player's uuid%::*} contains loop-block's location:
- drop 1 melon slice above {gens::%loop-player's uuid%::*} named "&8[&2+&8] &7$2"
- if loop-block is pumpkin:
- if {gens::%loop-player's uuid%::*} contains loop-block's location:
- drop 1 pumpkin pie above {gens::%loop-player's uuid%::*} named "&8[&2+&8] &7$3"
- on rightclick:
- if player's tool is wheat:
- set {_e} to amount of wheat in player's inventory
- remove {_e} of wheat from player's inventory
- set {_s} to {_e} * 1.2
- send title "&2Sold!" with subtitle "&aSold {_e} wheat(s) for {_s}"
- add {_s} to {balance::%player's uuid%}
- if player's tool is melon slice:
- set {_e} to amount of melon slice in player's inventory
- remove {_e} of melon slice from player's inventory
- set {_s} to {_e} * 1.2
- send title "&2Sold!" with subtitle "&aSold {_e} melon(s) for {_s}"
- add {_s} to {balance::%player's uuid%}
- if player's tool is pumpkin pie:
- set {_e} to amount of pumpkin pie in player's inventory
- remove {_e} of pumpkin pie from player's inventory
- set {_s} to {_e} * 1.2
- send title "&2Sold!" with subtitle "&aSold {_e} pumpkin(s) for {_s}"
- add {_s} to {balance::%player's uuid%}
- on rightclick;
- if {gens::%player's uuid%::*} contains event-block's location:
- if player is sneaking:
- if event-block is hay:
- if {balance::%player's uuid%} is equal to or greater than 10000:
- remove 10000 from {balance::%player's uuid%}
- set event-block to melon
- send title "&2Success!" with subtitle "&eSuccessfully upgraded your wheat gen to a melon gen."
- else:
- send title "&cError!" with subtitle "&cYou don't have enough money to do that."
- if event-block is melon:
- if {balance::%player's uuid%} is equal to or greater than 20000:
- remove 20000 from {balance::%player's uuid%}
- set event-block to pumpkin
- send title "&2Success!" with subtitle "&eSuccessfully upgraded your melon gen to a pumpkin gen."
- else:
- send title "&cError!" with subtitle "&cYou don't have enough money to do that.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement