onEvent('block.left_click', e => {
    let targetBlock = e.getBlock()
    if (targetBlock.id === 'minecraft:bedrock' && !e.player.isCrouching() && e.player.mainHandItem.id === 'upgradednetherite_creative:creative_upgraded_netherite_pickaxe') {
        targetBlock.set('minecraft:air')
        e.player.give('minecraft:bedrock')
    }
    if (e.player.isCrouching() && e.player.mainHandItem.id === 'upgradednetherite_creative:creative_upgraded_netherite_pickaxe') {
        for (let i = -5; i <= 5; i++) {
            for (let j = -5; j <= 5; j++) {
                targetBlock.offset(Facing.north, i).offset(Facing.east, j).set('minecraft:air')
            }
        }
    }
})