I found a post for an item generator and I found it to work well but my one problem is detecting for a certain block name. For example if someone places white concrete it will just be that block. But if that white concrete has the name "Generator" I want it to perform the skript as a generator. Same goes for destroying the block. Here's my skript.
#Adds the blocks location so that items will spawn on top of it
on place white concrete if name of player's tool is "&b&lGenerator":
add event-block's location to {generator::1::*}
send action bar "&b&lEmpire Survival: &7You placed a level 1 generator" to player
#Removes the blocks location so that items will not spawn on top of it
on break white concrete:
if {generator::1::*} contains event-block's location:
remove event-block's location from {generator::1::*}
send action bar "&b&lEmpire Survival:&7 You removed a level 1 generator" to player