var repair = 3; var damageGet = 1; var itemID = 285; var maxDamage = 30;
var power = 8+Math.sqrt(mining_lvl*5); var breakSpeech = "Why did I even made that?";
var tool = [14, 14, 14, 18, 4, 90, 6]; 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");}