I recently made a gen skript but when I place down a coal block it still spawns coal. I only want it to spawn coal when you place down a coal block named &e&lCOAL GEN
I tried everything I can think of please help me
Code:
on place of coal block:
if name of player's held item is "&e&lCOAL GEN":
add location of event-block to {placed::gens::*}
send "&aYou Have Placed Down A Coal Gen!" to the player
on left click:
if event-block is coal block:
if {placed::gens::*} contains location of event-block:
cancel event
set event-block to air
remove location of event-block from {placed::gens::*}
give player glowing coal block named "&e&lCOAL GEN" with lore "&7Output: &aCoal" and "&7Upgrade Price: &a$2,500"
send "&aYou Have Picked Up A Coal Gen!" to the player
every 5 seconds:
loop all players:
loop all blocks in radius 30 of loop-player:
if loop-block is coal block:
if {placed::gens::*} contains location of loop-value-2:
drop 1 coal at block above loop-value-2
I tried everything I can think of please help me