var scriptName = "NopeFlag"; 
var scriptVersion = 1.0; 
var scriptAuthor = "LightZ";

var blockHit = new BlockHit();
var blockHitClient;

function BlockHit() {
	var ticks = 0;
    this.getName = function() {
        return "NopeFlag";
    };

    this.getDescription = function() {
        return "Bypass Flag in Minefc";
    };

    this.getCategory = function() {
        return "Player";
    };

    this.onUpdate = function() {
    	ticks++
    	if(ticks == 20 || ticks == 25 || ticks == 30 || ticks == 35 || ticks == 40 || ticks == 45 || ticks == 50 || ticks == 20 || ticks == 30 || ticks == 40) {
		if (mc.thePlayer.isUsingItem() == true) {
	    mc.thePlayer.swingSword();
    }
  } if(ticks == 20) {
	  ticks = 0;
  }
}
}

function onLoad() {
};

function onEnable() {
    blockHitClient = moduleManager.registerModule(blockHit);
};

function onDisable() {
    moduleManager.unregisterModule(blockHitClient);
};