Im trying to make a gen server with placeable gens but the upgrade from tier 1 to tier 2 does not work, i cant find out why it doesn't work
on right click on white glazed terracotta:
if player is sneaking:
if {cooldown.%player%} is true:
send "%{prefix}% Slow down!"
cancel event
stop
if {cooldown.%player%} is false:
if {money.%player%} is more than 99:
set event-block to orange glazed terracotta
send action bar "&3You upgraded your gen for 100 money" to player
remove event-block's location from {white glazed terracotta.generator::1::*}
add event-block's location to {orange glazed terracotta.generator::1::*}
remove 100 from {money.%player%}
else:
send action bar "&cYou need 100 money to do this!" to player
set {cooldown.%player%} to true
wait 4 ticks
set {cooldown.%player%} to false
on right click on white glazed terracotta:
if player is sneaking:
if {cooldown.%player%} is true:
send "%{prefix}% Slow down!"
cancel event
stop
if {cooldown.%player%} is false:
if {money.%player%} is more than 99:
set event-block to orange glazed terracotta
send action bar "&3You upgraded your gen for 100 money" to player
remove event-block's location from {white glazed terracotta.generator::1::*}
add event-block's location to {orange glazed terracotta.generator::1::*}
remove 100 from {money.%player%}
else:
send action bar "&cYou need 100 money to do this!" to player
set {cooldown.%player%} to true
wait 4 ticks
set {cooldown.%player%} to false