var scriptName = "Emo";
var scriptAuthor = "Soulplexis";
var scriptVersion = 1.0;


function Emo() {

    var ticks = 0;

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

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

    this.getDescription = function() {
        return "Hurts you when you move";
    }

    this.onMotion = function() {
        ticks++;

        if (ticks >= 20) {
            if (mc.gameSettings.keyBindForward.isKeyDown() || mc.gameSettings.keyBindLeft.isKeyDown() || mc.gameSettings.keyBindRight.isKeyDown() || mc.gameSettings.keyBindBack.isKeyDown()) {
				ticks = 0;

            commandManager.executeCommand(".hurt");
			}
        }
    }
}

var emo = new Emo();
var emoClient;

function onEnable() {
    emoClient = moduleManager.registerModule(emo);
}

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