var scriptName = "Timer FastEat"; 
var scriptVersion = 1.0; 
var scriptAuthor = "soulplexis";
var timerModule = moduleManager.getModule("Timer");

var timerEat = new TimerEat();
var timerEatClient;

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

    this.getDescription = function() {
        return "Timer with FastEat";
    };

    this.getCategory = function() {
        return "Player";
    };
	this.onUpdate = function() {
		timerModule.setState(false);
	}

    this.onMotion = function() {
		if (mc.thePlayer.isUsingItem() == true) {
	    mc.timer.timerSpeed = mc.timer.timerSpeed + 0.15
    } if(mc.thePlayer.isUsingItem() == false) { 
	 mc.timer.timerSpeed = 1.0;
	} if(mc.timer.timerSpeed >= 10) {
		mc.timer.timerSpeed = 0.7;
	}
   }
    this.onDisable = function() {
    	mc.timer.timerSpeed = 1.0;
    }
}

function onLoad() {
};

function onEnable() {
    timerEatClient = moduleManager.registerModule(timerEat);
};

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