var scriptName = "Test BHop 4"; 
var scriptVersion = 1.0; 
var scriptAuthor = "soulplexis";

var bHop = new BHop();
var bHopClient;
var Strafe = moduleManager.getModule("Strafe")

function BHop() {
    this.getName = function() {
        return "FastBHop";
    };

    this.getDescription = function() {
        return "Fast BHop speed"; 
    };

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

    this.onMotion = function() {
		if(mc.gameSettings.keyBindForward.isKeyDown() || mc.gameSettings.keyBindLeft.isKeyDown() || mc.gameSettings.keyBindRight.isKeyDown() || mc.gameSettings.keyBindBack.isKeyDown()) {
            mc.thePlayer.motionX *= 1.03;
			mc.thePlayer.motionZ *= 1.03;
			Strafe.setState(true);
			mc.timer.timerSpeed = 1.03
			if (mc.thePlayer.onGround) {
				mc.thePlayer.jump();
				mc.timer.timerSpeed = 1.26;
        } 
   } else {
			Strafe.setState(false);
			mc.thePlayer.motionX = 0.0;
			mc.thePlayer.motionZ = 0.0;
			mc.timer.timerSpeed = 1.0;
		}
}
    this.onDisable = function() {
    	mc.timer.timerSpeed = 1.0;
		mc.thePlayer.motionX = 0.0;
		mc.thePlayer.motionZ = 0.0;
		Strafe.setState(false);
    }
}

function onLoad() {
};

function onEnable() {
    bHopClient = moduleManager.registerModule(bHop);
};

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