itemUsed = true; mainSkill = sword_lvl;
var firstHit; var rand = Math.floor(Math.random()*4); var maxDamage = 250;
var itemID = 267; var breakSpeech = "Oh man! That was a good sword"; var repair = 5;
var power = Math.sqrt(sword_lvl*4); var basicDMG = 8;

swordEngine(firstHit,rand,maxDamage,citemID,breakSpeech,repair,power,basicDMG);
if (pinv.getCurrentItem() != null) {if (pinv.getCurrentItem().itemID == itemID) {var ent = pinv.getCurrentItem();}}
if (pinv.getOffhandItem() != null) {if (pinv.getOffhandItem().itemID == itemID) {var ent = pinv.getOffhandItem();}}

var damageGet = 1; var power = 8+Math.sqrt(sword_lvl*4); var tool = [78, 25, 20, 18, 6, 18, 6];

if (hitBlock != null) {time.sleep(0.05);
script.runScript("destructable blocks.js");}