var scriptName = "Airwalk flying."; 
var scriptVersion = 1.0; 
var scriptAuthor = "soulplexis"; 

var hypixelFly = new HypixelFly();
var hypixelFlyClient;

function HypixelFly() {
	var ticks = 0;
    this.getName = function() {
        return "Airwalk";
    };

    this.getDescription = function() {
        return "Hold block with a sword to bypass NoCheatPlus on some servers (Does not bypass Hypixel).";
    };

    this.getCategory = function() {
        return "Movement";
    };
	this.onEnable = function() {
		mc.thePlayer.cameraYaw = 0.15;
	}

    this.onUpdate = function() {
		if(mc.gameSettings.keyBindJump.isKeyDown()) {
			mc.thePlayer.setPosition(mc.thePlayer.posX, mc.thePlayer.posY + 0.05, mc.thePlayer.posZ)
		}
        mc.thePlayer.motionY = 0.0;
        mc.thePlayer.setSprinting(true)
		mc.thePlayer.cameraYaw = 0.15;
        mc.thePlayer.onGround = true;
        ticks++
        if(ticks == 2 || ticks == 4 || ticks == 6 || ticks == 8 || ticks == 10 || ticks == 12 || ticks == 14 || ticks == 16 || ticks == 18 || ticks == 20) {
        if(mc.thePlayer.isUsingItem() == true) {
		mc.thePlayer.setPosition(mc.thePlayer.posX, mc.thePlayer.posY + 0.00000000128, mc.thePlayer.posZ)
		}
    } if(ticks == 20) {
    	ticks = 0;
    }
   }
    this.onDisable = function() {
    }
}

function onLoad() {
};

function onEnable() {
    hypixelFlyClient = moduleManager.registerModule(hypixelFly);
};

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