Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /gen:
- permission: *
- trigger:
- give player 1 white stained glass named "&7Tier &f1 &7Generator" with lore "&6Place to earn cash!"
- on place:
- if {place::%player%} = {max::%player%}:
- send "&cYou can't place any more gens!"
- cancel event
- else:
- set {playerblock::%player%} to player
- if event-block is white stained glass:
- add 1 to {block::%player%}
- add 1 to {place::%player%}
- set {generator::%player%} to event-location
- if {otherblock::%player%} is set:
- set {otherblock2::%player%} to "white stained glass"
- else:
- set {otherblock::%player%} to "white stained glass"
- else if event-block is cyan stained glass:
- add 3 to {block::%player%}
- add 1 to {place::%player%}
- set {genowner::%event-location%} to player
- else if event-block is light blue stained glass:
- add 5 to {block::%player%}
- add 1 to {place::%player%}
- set {genowner::%event-location%} to player
- else if event-block is blue stained glass:
- add 7 to {block::%player%}
- add 1 to {place::%player%}
- set {genowner::%event-location%} to player
- else if event-block is green stained glass:
- add 10 to {block::%player%}
- add 1 to {place::%player%}
- set {genowner::%event-location%} to player
- else if event-block is lime stained glass:
- add 12 to {block::%player%}
- add 1 to {place::%player%}
- set {genowner::%event-location%} to player
- else if event-block is magenta stained glass:
- add 14 to {block::%player%}
- add 1 to {place::%player%}
- set {genowner::%event-location%} to player
- else if event-block is red stained glass:
- add 16 to {block::%player%}
- add 1 to {place::%player%}
- set {genowner::%event-location%} to player
- else if event-block is orange stained glass:
- add 18 to {block::%player%}
- add 1 to {place::%player%}
- set {genowner::%event-location%} to player
- else if event-block is yellow stained glass:
- add 20 to {block::%player%}
- add 1 to {place::%player%}
- set {genowner::%event-location%} to player
- on join:
- if {max::%player%} is not set:
- set {max::%player%} to 2
- if {place::%player%} is not set:
- set {place::%player%} to 0
- on break:
- if event-block is white stained glass:
- cancel event
- send "&cYou cannot break this block!"
- else if event-block is cyan stained glass:
- cancel event
- send "&cYou cannot break this block!"
- on right click:
- set {_block} to location of event-block
- if event-block is white stained glass:
- open virtual chest inventory with size 3 named "&8&lGen" to player
- format gui slot 15 of player with red stained glass named "&cPick up Gen" to close:
- set block at {_block} to air
- send "&aPicked up Gen!"
- subtract 1 from {block::%player%}
- give player 1 white stained glass named "&7Tier &f1 &7Generator" with lore "&6Place to earn cash!"
- if {place::%player%} = 0:
- stop
- else:
- subtract 1 from {place::%player%}
- format gui slot 11 of player with green stained glass named "&aUpgrade Gen" with lore "&7Cost: &a$500" to close:
- if balance of player >= 500:
- subtract 500 from balance of player
- send "&a$500 &7has been taken from your account!"
- give player 1 cyan stained glass named "&7Tier &f2 &7Generator" with lore "&6Place to earn cash!"
- set block at {_block} to air
- subtract 1 from {block::%player%}
- else:
- send "&cYou don't have enough money!"
- else if event-block is cyan stained glass:
- open virtual chest inventory with size 3 named "&8&lGen" to player
- format gui slot 15 of player with red stained glass named "&cPick up Gen" to close:
- set block at {_block} to air
- subtract 3 from {block::%player%}
- send "&aPicked up Gen!"
- give player 1 cyan stained glass named "&7Tier &f2 &7Generator" with lore "&6Place to earn cash!"
- if {place::%player%} = 0:
- stop
- else:
- subtract 1 from {place::%player%}
- format gui slot 11 of player with green stained glass named "&aUpgrade Gen" with lore "&7Cost: &a$2,000" to close:
- if balance of player >= 2000:
- subtract 2000 from balance of player
- send "&a$2,000 &7has been taken from your account!"
- give player 1 light blue stained glass named "&7Tier &f3 &7Generator" with lore "&6Place to earn cash!"
- set block at {_block} to air
- subtract 3 from {block::%player%}
- else:
- send "&cYou don't have enough money!"
- else if event-block is light blue stained glass:
- open virtual chest inventory with size 3 named "&8&lGen" to player
- format gui slot 15 of player with red stained glass named "&cPick up Gen" to close:
- set block at {_block} to air
- subtract 5 from {block::%player%}
- send "&aPicked up Gen!"
- give player 1 light blue stained glass named "&7Tier &f3 &7Generator" with lore "&6Place to earn cash!"
- if {place::%player%} = 0:
- stop
- else:
- subtract 1 from {place::%player%}
- format gui slot 11 of player with green stained glass named "&aUpgrade Gen" with lore "&7Cost: &a$4,000" to close:
- if balance of player >= 4000:
- subtract 4000 from balance of player
- send "&a$4,000 &7has been taken from your account!"
- give player 1 blue stained glass named "&7Tier &f4 &7Generator" with lore "&6Place to earn cash!"
- set block at {_block} to air
- subtract 5 from {block::%player%}
- else:
- send "&cYou don't have enough money!"
- else if event-block is blue stained glass:
- open virtual chest inventory with size 3 named "&8&lGen" to player
- format gui slot 15 of player with red stained glass named "&cPick up Gen" to close:
- set block at {_block} to air
- subtract 7 from {block::%player%}
- send "&aPicked up Gen!"
- give player 1 blue stained glass named "&7Tier &f4 &7Generator" with lore "&6Place to earn cash!"
- if {place::%player%} = 0:
- stop
- else:
- subtract 1 from {place::%player%}
- format gui slot 11 of player with green stained glass named "&aUpgrade Gen" with lore "&7Cost: &a$15,000" to close:
- if balance of player >= 2000:
- subtract 15000 from balance of player
- send "&a$15,000 &7has been taken from your account!"
- give player 1 green stained glass named "&7Tier &f5 &7Generator" with lore "&6Place to earn cash!"
- set block at {_block} to air
- subtract 7 from {block::%player%}
- else:
- send "&cYou don't have enough money!"
- else if event-block is green stained glass:
- open virtual chest inventory with size 3 named "&8&lGen" to player
- format gui slot 15 of player with red stained glass named "&cPick up Gen" to close:
- set block at {_block} to air
- subtract 3 from {block::%player%}
- send "&aPicked up Gen!"
- give player 1 green stained glass named "&7Tier &f5 &7Generator" with lore "&6Place to earn cash!"
- if {place::%player%} = 0:
- stop
- else:
- subtract 1 from {place::%player%}
- format gui slot 11 of player with green stained glass named "&aUpgrade Gen" with lore "&7Cost: &a$30,000" to close:
- if balance of player >= 30000:
- subtract 30000 from balance of player
- send "&a$30,000 &7has been taken from your account!"
- give player 1 lime stained glass named "&7Tier &f6 &7Generator" with lore "&6Place to earn cash!"
- set block at {_block} to air
- subtract 10 from {block::%player%}
- else:
- send "&cYou don't have enough money!"
- else if event-block is lime stained glass:
- open virtual chest inventory with size 3 named "&8&lGen" to player
- format gui slot 15 of player with red stained glass named "&cPick up Gen" to close:
- set block at {_block} to air
- subtract 12 from {block::%player%}
- send "&aPicked up Gen!"
- give player 1 lime stained glass named "&7Tier &f6 &7Generator" with lore "&6Place to earn cash!"
- if {place::%player%} = 0:
- stop
- else:
- subtract 1 from {place::%player%}
- format gui slot 11 of player with green stained glass named "&aUpgrade Gen" with lore "&7Cost: &a$50,000" to close:
- if balance of player >= 50000:
- subtract 50000 from balance of player
- send "&a$50,000 &7has been taken from your account!"
- give player 1 magenta stained glass named "&7Tier &f7 &7Generator" with lore "&6Place to earn cash!"
- set block at {_block} to air
- subtract 12 from {block::%player%}
- else:
- send "&cYou don't have enough money!"
- else if event-block is magenta stained glass:
- open virtual chest inventory with size 3 named "&8&lGen" to player
- format gui slot 15 of player with red stained glass named "&cPick up Gen" to close:
- set block at {_block} to air
- subtract 14 from {block::%player%}
- send "&aPicked up Gen!"
- give player 1 magenta stained glass named "&7Tier &f7 &7Generator" with lore "&6Place to earn cash!"
- if {place::%player%} = 0:
- stop
- else:
- subtract 1 from {place::%player%}
- format gui slot 11 of player with green stained glass named "&aUpgrade Gen" with lore "&7Cost: &a$75,000" to close:
- if balance of player >= 75000:
- subtract 75000 from balance of player
- send "&a$75,000 &7has been taken from your account!"
- give player 1 red stained glass named "&7Tier &f8 &7Generator" with lore "&6Place to earn cash!"
- set block at {_block} to air
- subtract 14 from {block::%player%}
- else:
- send "&cYou don't have enough money!"
- else if event-block is red stained glass:
- open virtual chest inventory with size 3 named "&8&lGen" to player
- format gui slot 15 of player with red stained glass named "&cPick up Gen" to close:
- set block at {_block} to air
- subtract 16 from {block::%player%}
- send "&aPicked up Gen!"
- give player 1 red stained glass named "&7Tier &f8 &7Generator" with lore "&6Place to earn cash!"
- if {place::%player%} = 0:
- stop
- else:
- subtract 1 from {place::%player%}
- format gui slot 11 of player with green stained glass named "&aUpgrade Gen" with lore "&7Cost: &a$125,000" to close:
- if balance of player >= 125000:
- subtract 125000 from balance of player
- send "&a$125,000 &7has been taken from your account!"
- give player 1 orange stained glass named "&7Tier &f9 &7Generator" with lore "&6Place to earn cash!"
- set block at {_block} to air
- subtract 16 from {block::%player%}
- else:
- send "&cYou don't have enough money!"
- else if event-block is orange stained glass:
- open virtual chest inventory with size 3 named "&8&lGen" to player
- format gui slot 15 of player with red stained glass named "&cPick up Gen" to close:
- set block at {_block} to air
- subtract 18 from {block::%player%}
- send "&aPicked up Gen!"
- give player 1 orange stained glass named "&7Tier &f9 &7Generator" with lore "&6Place to earn cash!"
- if {place::%player%} = 0:
- stop
- else:
- subtract 1 from {place::%player%}
- format gui slot 11 of player with green stained glass named "&aUpgrade Gen" with lore "&7Cost: &a$200,000" to close:
- if balance of player >= 200000:
- subtract 200000 from balance of player
- send "&a$200,000 &7has been taken from your account!"
- give player 1 yellow stained glass named "&7Tier &f10 &7Generator" with lore "&6Place to earn cash!"
- set block at {_block} to air
- subtract 18 from {block::%player%}
- else:
- send "&cYou don't have enough money!"
- else if event-block is yellow stained glass:
- open virtual chest inventory with size 3 named "&8&lGen" to player
- format gui slot 15 of player with red stained glass named "&cPick up Gen" to close:
- set block at {_block} to air
- subtract 20 from {block::%player%}
- send "&aPicked up Gen!"
- give player 1 yellow stained glass named "&7Tier &f10 &7Generator" with lore "&6Place to earn cash!"
- if {place::%player%} = 0:
- stop
- else:
- subtract 1 from {place::%player%}
- every 3 seconds in world "void":
- loop all players:
- if {block::%loop-player%} >= 1:
- set {_money::%loop-player%} to {block::%loop-player%}
- set action bar of loop-player to "&7[&a+%{_money::%loop-player%}% Cash&7]"
- add {_money::%loop-player%} to balance of loop-player
- every second in world "void":
- loop all players:
- if {generator::%loop-player%} is air:
- if {otherblock::%loop-player%} is "white stained glass":
- if {otherblock2::%loop-player%} is set:
- subtract 1 from {place::%loop-player%}
- subtract 1 from {block::%loop-player%}
- delete {otherblock2::%loop-player%}
- else:
- stop
- subtract 1 from {place::%loop-player%}
- subtract 1 from {block::%loop-player%}
- delete {otherblock2::%loop-player%}
- command /fix [<offlineplayer>]:
- permission: *
- trigger:
- set {place::%arg 1%} to 0
- set {max::%arg 1%} to 2
- set {block::%arg 1%} to 0
- delete {block::%arg 1%}
- command /fixall:
- permission: *
- trigger:
- loop all players:
- set {place::%loop-player%} to 0
- set {max::%loop-player%} to 2
- set {block::%loop-player%} to 0
- delete {block::%loop-player%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement