var scriptName = "STGlide";
var scriptVersion = 0.1;
var scriptAuthor = "SeMxoss";

function SpartanGlide() {
    var tick = 0;

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

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

    this.getDescription = function () {
        return "Spartan Glide";
    }

    this.onUpdate = function () {
        if (!mc.thePlayer.onGround) {
            if (tick == 3 || tick == 5 || tick == 7 || tick == 9 || tick == 11 || tick == 15 || tick == 17 || tick == 19) {
                mc.thePlayer.motionY = 0.0;

            } if (tick == 20) {
                tick = 0;
            } else {
                tick++;
                mc.thePlayer.onGround = false;
            }
        }
    }
}


var StGlide = new SpartanGlide();
var StGlideClient;

function onEnable() {
    StGlideClient = moduleManager.registerModule(StGlide);
}

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

