So these 3 generators work absolutely perfectly:
But these 2 spawn the last few items as well as the ones they're meant to?
Because im stumped. It has 0 errors
Code:
on right click:
if event-block is hay_block:
if player is sneaking:
if player's balance is greater than or equal to 5000:
set {_deleteloc} to location of block at event-block
add 2 to the y-coordinate of {_deleteloc}
remove {_deleteloc} from {wheatgen::*}
add {_deleteloc} to {melongen::*}
set event-block to melon
remove 5000 from player's balance
send player title "&6&l+1 Melon Generator" with subtitle "&6&lYou have upgraded a wheat generator!" for 3 seconds
else:
send "&6&lGen &8>> &cYou need $5,000 to do that!"
else:
send "&6&lGen &8>> &cYou must be shifting to do that!"
on right click:
if event-block is melon:
if player is sneaking:
if player's balance is greater than or equal to 15000:
set {_deleteloc} to location of block at event-block
add 2 to the y-coordinate of {_deleteloc}
remove {_deleteloc} from {melongen::*}
add {_deleteloc} to {carrotgen::*}
set event-block to orange_concrete
remove 15000 from player's balance
send player title "&6&l+1 Carrot Generator" with subtitle "&6&lYou have upgraded a melon generator!" for 3 seconds
else:
send "&6&lGen &8>> &cYou need $15,000 to do that!"
else:
send "&6&lGen &8>> &cYou must be shifting to do that!"
on right click:
if event-block is orange_concrete:
if player is sneaking:
if player's balance is greater than or equal to 50000:
set {_deleteloc} to location of block at event-block
add 2 to the y-coordinate of {_deleteloc}
remove {_deleteloc} from {carrotgen::*}
add {_deleteloc} to {pumpkingen::*}
set event-block to pumpkin
remove 50000 from player's balance
send player title "&6&l+1 Pumpkin Generator" with subtitle "&6&lYou have upgraded a carrot generator!" for 3 seconds
else:
send "&6&lGen &8>> &cYou need $50,000 to do that!"
else:
send "&6&lGen &8>> &cYou must be shifting to do that!"
Code:
on right click:
if event-block is pumpkin:
if player is sneaking:
if player's balance is greater than or equal to 75000:
set {_deleteloc} to location of block at event-block
add 2 to the y-coordinate of {_deleteloc}
remove {_deleteloc} from {pumpkingen::*}
add {_deleteloc} to {coalgen::*}
set event-block to coal_block
remove 75000 from player's balance
send player title "&6&l+1 Coal Generator" with subtitle "&6&lYou have upgraded a Pumpkin generator!" for 3 seconds
else:
send "&6&lGen &8>> &cYou need $75,000 to do that!"
else:
send "&6&lGen &8>> &cYou must be shifting to do that!"
on right click:
if event-block is coal_block:
if player is sneaking:
if player's balance is greater than or equal to 100000:
set {_deleteloc} to location of block at event-block
add 2 to the y-coordinate of {_deleteloc}
remove {_deleteloc} from {coalgen::*}
add {_deleteloc} to {irongen::*}
set event-block to iron_block
remove 100000 from player's balance
send player title "&6&l+1 Iron Generator" with subtitle "&6&lYou have upgraded a &8&LCoal generator!" for 3 seconds
else:
send "&6&lGen &8>> &cYou need $100,000 to do that!"
else:
send "&6&lGen &8>> &cYou must be shifting to do that!"