This code basicly work but only only for solid wall that is placed inside of the compactmachine and not for walls, floor and roof
if(e.hand == 'OFF_HAND') return
if (e.player.isCrouching() && e.player.mainHandItem == Item.getEmpty()) {
e.block.popItem('kubejs:dirt_chunk')
}
})```
Also i would like to add little cooldown, like 0.5 sec, to it but i didn't find anything about cooldown at wiki or anywhere.
thank so much for help!