var repair = 3; var damageGet = 1; var itemID = 270; var maxDamage = 60;
var power = 4+Math.sqrt(mining_lvl); var breakSpeech = "Wooden tools break so fast";
var tool = [10, 10, 10, 25, 5, 80, 5]; itemUsed = true; mainSkill = mining_lvl;

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);
script.runScript("destructable blocks.js");}