var scriptName = "skidded fly";
var scriptVersion = 1.0;
var scriptAuthor = "proffesional retard: webos_xd";

function CustomFly() {
	//////////////
	//Custom Fly//
	//////////////
	var resetH = value.createBoolean("resetH", false);
	var resetY = value.createBoolean("resetY", false);
	var airSpeed = value.createFloat("airSpeed", 0.02, 0, 0.5);
	var ticksClip1 = value.createInteger("ticksClip1", 0, 0, 20);
	var yClipDistance1 = value.createFloat("yClipDistance1", 0, -1, 1);
	var ticksMotion1 = value.createInteger("ticksMotion1", 0, 0, 20);
	var hMotionDistanceType1 = value.createList("hMotionDistanceType1", ["Add", "Set", "Times"], "Add");
	var hMotionDistance1 = value.createFloat("hMotionDistance1", 0, -5, 5);
	var yMotionDistanceType1 = value.createList("yMotionDistanceType1", ["Add", "Set", "Times"], "Set");
	var ticksMotion2 = value.createInteger("ticksMotion2", 0, 0, 20);
	var hMotionDistance2 = value.createFloat("hMotionDistance2", 0, -5, 5);
	var hMotionDistanceType2 = value.createList("hMotionDistanceType2", ["Add", "Set", "Times"], "Add");
	var yMotionDistanceType2 = value.createList("yMotionDistanceType2", ["Add", "Set", "Times"], "Set");
	var ticksTimer1 = value.createInteger("ticksTimer1", 0, 0, 20);
	var Timer1 = value.createFloat("Timer1", 1, 0.1, 3);
	//////////////////
	//disabled parts//
	//////////////////
	var ticksTimerE1 = value.createInteger("ticksTimerE1", 0, 0, 20);
	var ticksMotionE2 = value.createInteger("ticksMotionE2", 0, 0, 20);
	var ticksMotionE1 = value.createInteger("ticksMotionE1", 0, 0, 20);
	var yMotionDistance2 = value.createFloat("yMotionDistance2", 0, -5, 5);
	var ticksMotionE2 = value.createInteger("ticksMotionE2", 0, 0, 20);
	var hClipDistance1 = value.createFloat("hClipDistance1", 0, -5, 5);
	var ticksClipE1 = value.createInteger("ticksClipE1", 0, 0, 20);
	var yMotionDistance1 = value.createFloat("yMotionDistance1", 0, -5, 5);
	////////////////
	//Verus Damage//
	////////////////
	var sex321 = value.createFloat("distance",3.11, 0.01, 5);
	var shit = moduleManager.getModule("VerusDamage");
	var ticksD1 = value.createInteger("ticksD1", 12, 1, 20);
    var ticksDE1 = value.createInteger("ticksDE1", 0, 0, 20);
	var jumps123 = value.createInteger("JumpsToDamage", 4, 0, 20);
	var RTX = value.createBoolean("weboz_pasaconfig", false);
	var VanillaSpeed = value.createFloat("VanillaSpeed", 1.00, 0.00, 5.00);	
	var secs = value.createBoolean("test", false);
	var Damage = value.createBoolean("Damage?", false);
	var jumps = 0;
	var three = false;
	var kys = false;
	//////////
	//VoidTP//
	//////////
	var ticksTP = value.createInteger("ticksTP", 0, 0, 20);
	var ticksTPE = value.createInteger("ticksETP", 0, 0, 20);
	var ticksPackets = value.createInteger("ticksReturnPacket", 0, 0, 20);
	var ticksPacketsE = value.createInteger("ticksEReturnPacket", 0, 0, 20);
	var sendY = value.createBoolean("Packet Y", false);
	var PacketTPMin = value.createFloat("PacketyTPDistanceMin", 1, -1000000000, 10000000);
	var PacketTPMax = value.createFloat("PacketyTPDistanceMax", 1, -1000000000, 10000000);
	var sendX = value.createBoolean("Packet X", false);
	var xteleportMin= value.createFloat("PacketXTPDistanceMin", 1, -3000000, 3000000);
	var xteleportMax = value.createFloat("PacketXTPDistanceMax", 1, -3000000, 3000000);
    var PacketYTP = value.createBoolean("PacketyTP", false);
	var spoofground = value.createBoolean("spoofground", false);
	var ReturnPacket = value.createBoolean("returnpacket", false);
	var VoidTP = value.createBoolean("VoidTP", false);
	var updatepacket = 0;
    this.getName = function() {
        return "69VerusFly";
    };
    this.getDescription = function() {
        return "Custom Fly by Sms_Gamer, other code skidded by webos_xd";
    };
    this.getCategory = function() {
        return "Movement";
    };
    this.onEnable = function() {
		
    }
    this.onUpdate = function() {
		
    }
    this.onDisable = function() {
		
    }
	this.onMove = function(event) {
	
	}
	this.onPacket = function(event){
		
	}
    this.addValues = function(values) {
		values.add(resetH);
		values.add(resetY);
		values.add(airSpeed);
		values.add(ticksClip1);
		values.add(yClipDistance1);
		values.add(ticksMotion1);
		values.add(ticksMotionE1);
		values.add(hMotionDistanceType1);
		values.add(hMotionDistance1);
		values.add(yMotionDistanceType1);
		values.add(ticksMotion2);
		values.add(hMotionDistanceType2);
		values.add(hMotionDistance2);
		values.add(yMotionDistanceType2);
		values.add(ticksTimer1);
		values.add(Timer1);
		values.add(Damage);
		values.add(sex321);
		values.add(ticksD1);
		values.add(ticksDE1);
		values.add(jumps123);
		values.add(RTX);
		values.add(VanillaSpeed);
		values.add(secs);
		values.add(sendY);
		values.add(PacketTPMax);
		values.add(PacketTPMin);
		values.add(sendX);
		values.add(xteleportMax);
		values.add(xteleportMin);
		values.add(PacketYTP);
		values.add(ticksTP);
		values.add(ticksTPE);
		values.add(ticksPackets);
		values.add(ticksPacketsE);
		values.add(spoofground);
		values.add(ReturnPacket);
		values.add(VoidTP);
    }
}
Math.radians = function(degrees) {
  return degrees * Math.PI / 180;
};
Math.degrees = function(radians) {
  return radians * 180 / Math.PI;
};
Math.rad = function(deg) {
  return deg * Math.PI / 180;
};
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 airSpeed(offset) {
    mc.thePlayer.speedInAir = offset;
}
function mY(type, offset){
        if(type.equals("Set")){
          mc.thePlayer.motionY = offset;
        }
        if(type.equals("Times")){
          mc.thePlayer.motionY *= offset;
        }
        if(type.equals("Add")){
          mc.thePlayer.motionY += offset;
        }
}
function mXZ(type, offset){
  var playerYaw = Math.radians(mc.thePlayer.rotationYaw);
        if(type.equals("Times")){
          mc.thePlayer.motionX *= offset;
          mc.thePlayer.motionZ *= offset;
        }
        if(type.equals("Add")){
          mc.thePlayer.motionX += Math.cos(Math.radians(mc.thePlayer.rotationYaw + 90.0)) * offset;
          mc.thePlayer.motionZ += Math.sin(Math.radians(mc.thePlayer.rotationYaw + 90.0)) * offset;
        }
        if(type.equals("Set")){
          mc.thePlayer.motionX = Math.cos(Math.radians(mc.thePlayer.rotationYaw + 90.0)) * offset;
          mc.thePlayer.motionZ = Math.sin(Math.radians(mc.thePlayer.rotationYaw + 90.0)) * offset;
        }
}
var CustomFly = new CustomFly();
var client;

function onLoad() {}

function onEnable() {
    client = moduleManager.registerModule(CustomFly);
}

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