var scriptName = "RedeskySpeed"; // The name of your script
var scriptVersion = 0.1; // The version of your script 
var scriptAuthor = "Coccocoa's Helper"; // The author of your script

var RedeskySpeed = new RedeskySpeed();
var RedeskySpeedClient;
var Strafe = moduleManager.getModule("Strafe");
var nohurtcam = moduleManager.getModule("nohurtcam");

BlockPos = Java.type('net.minecraft.util.BlockPos')
BlockAir = Java.type('net.minecraft.block.BlockAir')
EntityPlayer = Java.type("net.minecraft.entity.player.EntityPlayer")



 Math.radians = function(degrees) {
    return degrees * Math.PI / 180;
  };
   
  // Converts from radians to degrees.
  Math.degrees = function(radians) {
    return radians * 180 / Math.PI;
  };
  
  function vClip(offset) {
		mc.thePlayer.setPosition(mc.thePlayer.posX, mc.thePlayer.posY + offset, mc.thePlayer.posZ);
	}

	function hClip(offset) {
		var playerYaw = Math.radians(mc.thePlayer.rotationYaw);
		mc.thePlayer.setPosition(mc.thePlayer.posX - (Math.sin(playerYaw) * offset), mc.thePlayer.posY, mc.thePlayer.posZ + (Math.cos(playerYaw) * offset));
	}
	
	 function hMotion(offset) {
        mc.thePlayer.motionX = parseFloat(Math.cos(Math.radians(mc.thePlayer.rotationYaw + 90.0)) * offset)
        mc.thePlayer.motionZ = parseFloat(Math.sin(Math.radians(mc.thePlayer.rotationYaw + 90.0)) * offset)
	}
 
 
function RedeskySpeed() {
    this.getName = function() {
        return "RedeskySpeed";
    };

    this.getDescription = function() {
        return "Redesky Ground Speed (Test)";
    };

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

	
    this.onUpdate = function() {
	
		if(mc.thePlayer.ticksExisted % 8 == 0){			
			mc.timer.timerSpeed = 0.9;
	}
	
		if(mc.thePlayer.ticksExisted % 10 == 0){			
			mc.timer.timerSpeed = 3.5;
	}		
		
}

	
	this.onDisable = function() {
    //Activates on disabling module
	mc.timer.timerSpeed = 1.0;
	

 }
 	this.onEnable = function() {
	//Activates on Enabling module
	
 }
 }
 


function onLoad() {
    // Currently this event has to be in every script even if it is not directly needed.
};

function onEnable() {
    RedeskySpeedClient = moduleManager.registerModule(RedeskySpeed);
		
};

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