var repair = 3; var damageGet = 1; var itemID = 294; var maxDamage = 30;
var power = 6+Math.sqrt(harvesting_lvl*2+gardening_lvl*1.5); var breakSpeech = "Well gold was quite precious";
var blade = 25; var cut = 45; var chop = 20; var smash = 10; var harvest = 90;

if (pinv.getCurrentItem() != null)
{if (pinv.getCurrentItem().itemID == itemID) {var ent = pinv.getCurrentItem(); player.swingMainHand();}}
if (pinv.getOffhandItem() != null) 
{if (pinv.getOffhandItem().itemID == itemID) {var ent = pinv.getOffhandItem(); player.swingOffHand();}}

if (hitBlock != null) {time.sleep(0.05); var blockID = world.getBlockID(hitBlock.x,hitBlock.y,hitBlock.z);
var blockMD = world.getMetadata(hitBlock.x,hitBlock.y,hitBlock.z);
repairFun(repair,itemID,ent.damage); 

script.runScript("destructable blocks.js");}