var scriptName = "Speed walk"; 
var scriptVersion = 1.0; 
var scriptAuthor = "soulplexis";

var exampleModule = new ExampleModule();
var exampleModuleClient;

function ExampleModule() {
    this.getName = function() {
        return "SpeedWalk";
    };

    this.getDescription = function() {
        return "Makes you walk forward very quickly."; 
    };

    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.moveEntityWithHeading(0.0, 12.0); // Edit the second value for the speed.
        } 
   }
    this.onDisable = function() {
    	mc.thePlayer.speedInAir = 0.02;
    	mc.timer.timerSpeed = 1.0;
    }
}

function onLoad() {
};

function onEnable() {
    exampleModuleClient = moduleManager.registerModule(exampleModule);
};

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