private void Update_AimBot()
        {
            this.heliosBoxPos = Vector2.zero;
            if (ChatUI.IsVisible() || !GUIAimbot.SetAimKey)
            {
                return;
            }
            if (!Input.GetKey(CVars.Aimbot.AimKey) && !CVars.Aimbot.AutoAim)
            {
                return;
            }
            Character localCharacter     = HackLocal.LocalCharacter;
            Character closestToCrosshair = this.GetClosestToCrosshair();

            if (closestToCrosshair == null)
            {
                return;
            }
            if (!CVars.Aimbot.SilentAim)
            {
                this.heliosBoxPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2));
                this.AutoAimAtPlayer(localCharacter, closestToCrosshair);
                return;
            }
            if (this.SilentAim(localCharacter, closestToCrosshair))
            {
                Vector3 position = HackLocal.GetHeadBone(closestToCrosshair).transform.position;
                Vector3 vector   = Camera.main.WorldToScreenPoint(position);
                if (vector.z > 0f)
                {
                    vector.y          = (float)Screen.height - (vector.y + 1f);
                    this.heliosBoxPos = new Vector2(vector.x, vector.y);
                }
            }
        }
Beispiel #2
0
 private void Update_AimBot()
 {
     this.heliosBoxPos = Vector2.zero;
     if ((!ChatUI.IsVisible() && GUIAimbot.SetAimKey) && (Input.GetKey(CVars.Aimbot.AimKey) || CVars.Aimbot.AutoAim))
     {
         Character localCharacter     = ESP_UpdateOBJs.LocalCharacter;
         Character closestToCrosshair = this.GetClosestToCrosshair();
         if (closestToCrosshair != null)
         {
             if (!CVars.Aimbot.SilentAim)
             {
                 this.heliosBoxPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2));
                 this.AutoAimAtPlayer(localCharacter, closestToCrosshair);
             }
             else if (this.SilentAim(localCharacter, closestToCrosshair))
             {
                 Vector3 position = Local.GetHeadBone(closestToCrosshair).transform.position;
                 Vector3 vector2  = Camera.main.WorldToScreenPoint(position);
                 if (vector2.z > 0f)
                 {
                     vector2.y         = Screen.height - (vector2.y + 1f);
                     this.heliosBoxPos = new Vector2(vector2.x, vector2.y);
                 }
             }
         }
     }
 }
 public void Update()
 {
     if (Input.GetKeyDown(KeyCode.M) && !ConsoleWindow.IsVisible() && !ChatUI.IsVisible() && !MainMenu.IsVisible())
     {
         if (ShowMap)
         {
             ShowMap = false;
         }
         else
         {
             ShowMap = true;
         }
     }
 }
        // ADMIN ONLY STUFF BELOW

        private void OnGUI()
        {
            if (AdminPlus.IsAllowed)
            {
                if (IsAlive)
                {
                    if (GUI.Button(new Rect(5, 5, 80, 20), "Admin"))
                    {
                        AdminPlus.Enabled = !AdminPlus.Enabled;
                        if (!ChatUI.IsVisible() && !ConsoleWindow.IsVisible() && !MainMenu.IsVisible())
                        {
                            Screen.lockCursor = !AdminPlus.Enabled;
                        }
                    }

                    if (AdminPlus.Enabled)
                    {
                        GUILayout.Window(0, menuwindow, Menu, "AdminPlus V" + AdminPlus.Instance.Version);
                        if (PlayerSelector)
                        {
                            GUILayout.Window(1, editorwindow, PlayerEditorWindow, "Select a player from the list to lookup");
                        }

                        if (ESPoptions)
                        {
                            GUILayout.Window(2, espwindow, ESP, "ESP Options");
                        }

                        if (NoClip)
                        {
                            GUILayout.Window(3, noclipwindow, NoClipMenu, "NoClip Options");
                        }

                        if (SelectedPlayer)
                        {
                            GUILayout.Window(34, playerwindow, PlayerMenu, "Looking up: " + LookupName);
                        }

                        if (GiveItemMenu)
                        {
                            GUILayout.Window(5, givewindow, GiveScreen, "Give " + LookupName + " an item, Maybe some C4?");
                        }
                    }

                    if (ESPPlayers || ESPAnimals)
                    {
                        foreach (UnityEngine.Object GameObject in FindObjectsOfType(typeof(Character)))
                        {
                            if (GameObject != null)
                            {
                                var Character = GameObject as Character;

                                if (ESPPlayers)
                                {
                                    PlayerClient playerClient = Character?.playerClient ?? null;
                                    if (playerClient != null && playerClient.gameObject != this)
                                    {
                                        DrawLabel(Character.origin, playerClient.userName, Color.blue);
                                    }
                                }

                                if (ESPAnimals)
                                {
                                    string distance = String.Format("{0:0}", Vector3.Distance(Character.transform.position,
                                                                                              character.transform.position));
                                    switch (Character.name.Replace("(Clone)", ""))
                                    {
                                    case "MutantBear":
                                        DrawLabel(Character.origin,
                                                  String.Format("Mutant Bear [{0}]", distance, Color.yellow));
                                        break;

                                    case "MutantWolf":
                                        DrawLabel(Character.origin,
                                                  String.Format("Mutant Wolf [{0}]", distance, Color.yellow));
                                        break;

                                    case "Chicken_A":
                                        DrawLabel(Character.origin,
                                                  String.Format("Chicken [{0}]", distance, Color.yellow));
                                        break;

                                    case "Rabbit_A":
                                        DrawLabel(Character.origin,
                                                  String.Format("Rabbit [{0}]", distance, Color.yellow));
                                        break;

                                    case "Stag_A":
                                        DrawLabel(Character.origin,
                                                  String.Format("Deer [{0}]", distance, Color.yellow));
                                        break;

                                    case "Bear":
                                        DrawLabel(Character.origin,
                                                  String.Format("Bear [{0}]", distance, Color.yellow));
                                        break;

                                    case "Wolf":
                                        DrawLabel(Character.origin,
                                                  String.Format("Wolf [{0}]", distance, Color.yellow));
                                        break;

                                    case "Boar_A":
                                        DrawLabel(Character.origin,
                                                  String.Format("Boar [{0}]", distance, Color.yellow));
                                        break;
                                    }
                                }
                            }
                        }
                    }

                    if (ESPBases)
                    {
                        foreach (StructureMaster structureMaster in Resources.FindObjectsOfTypeAll(typeof(StructureMaster)))
                        {
                            if (structureMaster != null)
                            {
                                Vector3 pos = structureMaster.transform.position;
                                pos.y = pos.y + 5;
                                string distance = String.Format("{0:0}", Vector3.Distance(pos, character.transform.position));

                                if (structureMaster.gameObject != this)
                                {
                                    DrawLabel(structureMaster.transform.position, String.Format("{0} [{1}]", structureMaster.ownerID.ToString(), distance));
                                }
                            }
                        }
                    }

                    if (ESPLootables)
                    {
                        foreach (UnityEngine.Object GameObject in FindObjectsOfType(typeof(LootableObject)))
                        {
                            if (GameObject != null)
                            {
                                var lootableObject = GameObject as LootableObject;

                                string distance = String.Format("{0:0}", Vector3.Distance(lootableObject.transform.position, character.transform.position));
                                if (lootableObject.gameObject != this)
                                {
                                    DrawLabel(lootableObject.transform.position, String.Format("{0} [{1}]", lootableObject.name.Replace("(Clone)", ""), distance));
                                }
                            }
                        }
                    }

                    if (ESPSleepers)
                    {
                        foreach (UnityEngine.Object GameObject in FindObjectsOfType(typeof(SleepingAvatar)))
                        {
                            if (GameObject != null)
                            {
                                var sleepingAvatar = GameObject as SleepingAvatar;

                                string distance = String.Format("{0:0}", Vector3.Distance(sleepingAvatar.transform.position, character.transform.position));
                                if (sleepingAvatar.gameObject != this)
                                {
                                    DrawLabel(sleepingAvatar.transform.position, String.Format("{0} [{1}]", sleepingAvatar.name.Replace("(Clone)", ""), distance));
                                }
                            }
                        }
                    }

                    if (ESPOres)
                    {
                        foreach (UnityEngine.Object GameObject in FindObjectsOfType(typeof(ResourceObject)))
                        {
                            if (GameObject != null)
                            {
                                var   resourceObject = GameObject as ResourceObject;
                                float Vdistance      = Vector3.Distance(resourceObject.transform.position, character.transform.position);
                                if (Vdistance < 1000)
                                {
                                    string distance = String.Format("{0:0}", Vdistance);
                                    if (resourceObject.gameObject != this)
                                    {
                                        DrawLabel(resourceObject.transform.position, String.Format("{0} [{1}m]", resourceObject.name.Replace("(Clone)", ""), distance));
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        public void Update()
        {
            try
            {
                character = Hooks.LocalPlayer?.controllable?.GetComponent <Character>() ?? null;
                if (character != null)
                {
                    IsAlive = character.alive;
                }

                if (AdminPlus.IsAllowed)
                {
                    if (!ChatUI.IsVisible() && !ConsoleWindow.IsVisible() && !MainMenu.IsVisible() && Input.GetKeyDown(KeyCode.BackQuote))
                    {
                        AdminPlus.Enabled = !AdminPlus.Enabled;
                        Screen.lockCursor = !AdminPlus.Enabled;
                    }

                    if (IsAlive)
                    {
                        //-- Speed / Jump hack --
                        character.ccmotor.jumping.setup.baseHeight          = 1f + JumpHeight;
                        character.ccmotor.movement.setup.maxForwardSpeed    = 4f + SpeedLevel;
                        character.ccmotor.movement.setup.maxSidewaysSpeed   = 4f + SpeedLevel;
                        character.ccmotor.movement.setup.maxBackwardsSpeed  = 3f + SpeedLevel;
                        character.ccmotor.movement.setup.maxAirAcceleration = 20f + SpeedLevel;
                        //----------------

                        if (Fly)
                        {
                            var LocalController   = PlayerClient.GetLocalPlayer().controllable.GetComponent <HumanController>();
                            var LocalPlayerClient = PlayerClient.GetLocalPlayer().controllable.GetComponent <PlayerClient>();

                            CCMotor ccmotor = LocalController.ccmotor;
                            ccmotor.velocity = Vector3.zero;
                            Angle2  eyesAngles = character.eyesAngles;
                            Vector3 forward    = eyesAngles.forward;
                            Vector3 back       = eyesAngles.back;
                            Vector3 right      = eyesAngles.right;
                            Vector3 left       = eyesAngles.left;
                            Vector3 up         = eyesAngles.up;
                            if (!ChatUI.IsVisible() && !ConsoleWindow.IsVisible() && !MainMenu.IsVisible())
                            {
                                if (Input.GetKey(KeyCode.W))
                                {
                                    if (Input.GetKey(KeyCode.LeftShift))
                                    {
                                        ccmotor.velocity = ccmotor.velocity + forward * (ccmotor.movement.setup.maxForwardSpeed * 20f);
                                    }
                                    else
                                    {
                                        ccmotor.velocity = ccmotor.velocity + forward * (ccmotor.movement.setup.maxForwardSpeed * 5f);
                                    }
                                }
                                if (Input.GetKey(KeyCode.S))
                                {
                                    if (Input.GetKey(KeyCode.LeftShift))
                                    {
                                        ccmotor.velocity = ccmotor.velocity + back * (ccmotor.movement.setup.maxBackwardsSpeed * 20f);
                                    }
                                    else
                                    {
                                        ccmotor.velocity = ccmotor.velocity + back * (ccmotor.movement.setup.maxBackwardsSpeed * 5f);
                                    }
                                }
                                if (Input.GetKey(KeyCode.A))
                                {
                                    if (Input.GetKey(KeyCode.LeftShift))
                                    {
                                        ccmotor.velocity = ccmotor.velocity + left * (ccmotor.movement.setup.maxSidewaysSpeed * 20f);
                                    }
                                    else
                                    {
                                        ccmotor.velocity = ccmotor.velocity + left * (ccmotor.movement.setup.maxSidewaysSpeed * 5f);
                                    }
                                }
                                if (Input.GetKey(KeyCode.D))
                                {
                                    if (Input.GetKey(KeyCode.LeftShift))
                                    {
                                        ccmotor.velocity = ccmotor.velocity + right * (ccmotor.movement.setup.maxSidewaysSpeed * 20f);
                                    }
                                    else
                                    {
                                        ccmotor.velocity = ccmotor.velocity + right * (ccmotor.movement.setup.maxSidewaysSpeed * 5f);
                                    }
                                }
                                if (Input.GetKey(KeyCode.Space))
                                {
                                    if (Input.GetKey(KeyCode.LeftShift))
                                    {
                                        ccmotor.velocity = ccmotor.velocity + up * (ccmotor.movement.setup.maxSidewaysSpeed * 10f);
                                    }
                                    else
                                    {
                                        ccmotor.velocity = ccmotor.velocity + up * (ccmotor.movement.setup.maxSidewaysSpeed * 4f);
                                    }
                                }
                            }
                            if (ccmotor.velocity == Vector3.zero)
                            {
                                ccmotor.velocity = ccmotor.velocity + Vector3.up * (float)((double)ccmotor.settings.gravity * (double)Time.deltaTime * 0.5);
                            }
                        }
                    }
                }
            }
            catch
            {
            }
        }
Beispiel #6
0
 public static HumanController.InputSample Poll(bool noLamp, bool noLaser)
 {
     HumanController.InputSample inputSample = new HumanController.InputSample();
     if (ConsoleWindow.IsVisible())
     {
         return(new HumanController.InputSample());
     }
     if (MainMenu.IsVisible())
     {
         return(new HumanController.InputSample());
     }
     if (ChatUI.IsVisible())
     {
         return(new HumanController.InputSample());
     }
     if (LockEntry.IsVisible())
     {
         return(new HumanController.InputSample());
     }
     if (LockCursorManager.IsLocked(true))
     {
         float single = Time.deltaTime;
         inputSample.info__crouchBlocked = false;
         inputSample.walk = 0f;
         if (GameInput.GetButton("Up").IsDown())
         {
             inputSample.walk = inputSample.walk + 1f;
         }
         if (GameInput.GetButton("Down").IsDown())
         {
             inputSample.walk = inputSample.walk - 1f;
         }
         inputSample.strafe = 0f;
         if (GameInput.GetButton("Right").IsDown())
         {
             inputSample.strafe = inputSample.strafe + 1f;
         }
         if (GameInput.GetButton("Left").IsDown())
         {
             inputSample.strafe = inputSample.strafe - 1f;
         }
         inputSample.yaw   = GameInput.mouseDeltaX + HumanController.InputSample.yawSensitivityJoy * Input.GetAxis("Yaw") * single;
         inputSample.pitch = GameInput.mouseDeltaY + HumanController.InputSample.pitchSensitivityJoy * Input.GetAxis("Pitch") * single;
         if (input.flipy)
         {
             inputSample.pitch = inputSample.pitch * -1f;
         }
         inputSample.jump      = GameInput.GetButton("Jump").IsDown();
         inputSample.crouch    = GameInput.GetButton("Duck").IsDown();
         inputSample.sprint    = GameInput.GetButton("Sprint").IsDown();
         inputSample.aim       = false;
         inputSample.attack    = GameInput.GetButton("Fire").IsDown();
         inputSample.attack2   = GameInput.GetButton("AltFire").IsDown();
         inputSample.reload    = GameInput.GetButton("Reload").IsDown();
         inputSample.inventory = GameInput.GetButton("Inventory").IsPressed();
         inputSample.lamp      = (!noLamp ? HumanController.InputSample.saved.GetLamp(GameInput.GetButton("Flashlight").IsPressed()) : HumanController.InputSample.saved.lamp);
         inputSample.laser     = (!noLaser ? HumanController.InputSample.saved.GetLaser(GameInput.GetButton("Laser").IsPressed()) : HumanController.InputSample.saved.laser);
     }
     else
     {
         inputSample = new HumanController.InputSample();
         if (!UIUnityEvents.shouldBlockButtonInput)
         {
             inputSample.inventory = GameInput.GetButton("Inventory").IsPressed();
         }
         inputSample.lamp  = HumanController.InputSample.saved.lamp;
         inputSample.laser = HumanController.InputSample.saved.laser;
     }
     if (GameInput.GetButton("Chat").IsPressed())
     {
         ChatUI.Open();
     }
     return(inputSample);
 }
Beispiel #7
0
        public void Update()
        {
            if (_fly)
            {
                CCMotor ccmotor         = this.localController.ccmotor;
                var     defaultMovement = new CCMotor.Movement?(ccmotor.movement.setup);

                ccmotor.velocity = Vector3.zero;
                Vector3 forward = this.localCharacter.eyesAngles.forward;
                Vector3 right   = this.localCharacter.eyesAngles.right;
                if (!ChatUI.IsVisible())
                {
                    if (Input.GetKey(KeyCode.W))
                    {
                        ccmotor.velocity += forward * (ccmotor.movement.setup.maxForwardSpeed * flySpeed);
                    }

                    if (Input.GetKey(KeyCode.S))
                    {
                        ccmotor.velocity -= forward * (ccmotor.movement.setup.maxBackwardsSpeed * flySpeed);
                    }

                    if (Input.GetKey(KeyCode.A))
                    {
                        ccmotor.velocity -= right * (ccmotor.movement.setup.maxSidewaysSpeed * flySpeed);
                    }

                    if (Input.GetKey(KeyCode.D))
                    {
                        ccmotor.velocity += right * (ccmotor.movement.setup.maxSidewaysSpeed * flySpeed);
                    }

                    if (Input.GetKey(KeyCode.Space))
                    {
                        ccmotor.velocity += Vector3.up * (defaultMovement.Value.maxAirAcceleration * flySpeed);
                    }
                }

                if (ccmotor.velocity == Vector3.zero)
                {
                    ccmotor.velocity += Vector3.up * (ccmotor.settings.gravity * Time.deltaTime * 0.5f);
                }
            }

            if (Input.GetKeyDown(KeyCode.PageUp))
            {
                flySpeed += 0.5f;
                if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift))
                {
                    flySpeed += 1.5f;
                }
            }
            else if (Input.GetKeyDown(KeyCode.PageDown))
            {
                flySpeed -= 0.5f;
                if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift))
                {
                    flySpeed -= 1.5f;
                }
            }

            if (!WorldEditor.Instance.Enabled)
            {
                return;
            }

            if (Input.GetKeyDown(KeyCode.LeftAlt))
            {
                if (ShowList)
                {
                    Screen.lockCursor = true;
                    ShowList          = false;
                }
                else
                {
                    Screen.lockCursor = false;
                    ShowList          = true;
                }
            }

            if (SpawnedObject != null && SpawnedObject.ObjectInstantiate != null)
            {
                if (Input.GetKey(KeyCode.Keypad1))
                {
                    if (Input.GetKey(KeyCode.RightControl))
                    {
                        SpawnedObject.ObjectInstantiate.transform.position += new Vector3(0.1f, 0, 0); //POSX
                    }
                    else if (Input.GetKey(KeyCode.RightShift))
                    {
                        SpawnedObject.ObjectInstantiate.transform.position += new Vector3(1f, 0, 0); //POSX
                    }
                    else
                    {
                        SpawnedObject.ObjectInstantiate.transform.position += new Vector3(0.01f, 0, 0); //POSX
                    }
                }

                if (Input.GetKey(KeyCode.Keypad2))
                {
                    if (Input.GetKey(KeyCode.RightControl))
                    {
                        SpawnedObject.ObjectInstantiate.transform.position -= new Vector3(0.1f, 0, 0); //POSX
                    }
                    else if (Input.GetKey(KeyCode.RightShift))
                    {
                        SpawnedObject.ObjectInstantiate.transform.position -= new Vector3(1f, 0, 0); //POSX
                    }
                    else
                    {
                        SpawnedObject.ObjectInstantiate.transform.position -= new Vector3(0.01f, 0, 0); //POSX
                    }
                }

                if (Input.GetKey(KeyCode.Keypad4))
                {
                    if (Input.GetKey(KeyCode.RightControl))
                    {
                        SpawnedObject.ObjectInstantiate.transform.position += new Vector3(0, 0, 0.1f); //POSZ
                    }
                    else if (Input.GetKey(KeyCode.RightShift))
                    {
                        SpawnedObject.ObjectInstantiate.transform.position += new Vector3(0, 0, 1f); //POSZ
                    }
                    else
                    {
                        SpawnedObject.ObjectInstantiate.transform.position += new Vector3(0, 0, 0.01f); //POSZ
                    }
                }

                if (Input.GetKey(KeyCode.Keypad5))
                {
                    if (Input.GetKey(KeyCode.RightControl))
                    {
                        SpawnedObject.ObjectInstantiate.transform.position -= new Vector3(0, 0, 0.1f); //POSZ
                    }
                    else if (Input.GetKey(KeyCode.RightShift))
                    {
                        SpawnedObject.ObjectInstantiate.transform.position -= new Vector3(0, 0, 1f); //POSZ
                    }
                    else
                    {
                        SpawnedObject.ObjectInstantiate.transform.position -= new Vector3(0, 0, 0.01f); //POSZ
                    }
                }

                if (Input.GetKey(KeyCode.Keypad7))
                {
                    if (Input.GetKey(KeyCode.RightControl))
                    {
                        SpawnedObject.ObjectInstantiate.transform.position += new Vector3(0, 0.1f, 0); //POSY
                    }
                    else if (Input.GetKey(KeyCode.RightShift))
                    {
                        SpawnedObject.ObjectInstantiate.transform.position += new Vector3(0, 1f, 0); //POSY
                    }
                    else
                    {
                        SpawnedObject.ObjectInstantiate.transform.position += new Vector3(0, 0.01f, 0); //POSY
                    }
                }

                if (Input.GetKey(KeyCode.Keypad8))
                {
                    if (Input.GetKey(KeyCode.RightControl))
                    {
                        SpawnedObject.ObjectInstantiate.transform.position -= new Vector3(0, 0.1f, 0); //POSY
                    }
                    else if (Input.GetKey(KeyCode.RightShift))
                    {
                        SpawnedObject.ObjectInstantiate.transform.position -= new Vector3(0, 1f, 0); //POSY
                    }
                    else
                    {
                        SpawnedObject.ObjectInstantiate.transform.position -= new Vector3(0, 0.01f, 0); //POSY
                    }
                }

                if (Input.GetKey(KeyCode.UpArrow))
                {
                    if (Input.GetKey(KeyCode.RightControl))
                    {
                        var rot = SpawnedObject.ObjectInstantiate.transform.rotation;
                        rot.x = rot.x + 0.1f;
                        SpawnedObject.ObjectInstantiate.transform.rotation = rot;
                    }
                    else if (Input.GetKey(KeyCode.RightShift))
                    {
                        var rot = SpawnedObject.ObjectInstantiate.transform.rotation;
                        rot.x = rot.x + 1f;
                        SpawnedObject.ObjectInstantiate.transform.rotation = rot;
                    }
                    else
                    {
                        var rot = SpawnedObject.ObjectInstantiate.transform.rotation;
                        rot.x = rot.x + 0.01f;
                        SpawnedObject.ObjectInstantiate.transform.rotation = rot;
                    }
                }

                if (Input.GetKey(KeyCode.DownArrow))
                {
                    if (Input.GetKey(KeyCode.RightControl))
                    {
                        var rot = SpawnedObject.ObjectInstantiate.transform.rotation;
                        rot.x = rot.x - 0.1f;
                        SpawnedObject.ObjectInstantiate.transform.rotation = rot;
                    }
                    else if (Input.GetKey(KeyCode.RightShift))
                    {
                        var rot = SpawnedObject.ObjectInstantiate.transform.rotation;
                        rot.x = rot.x - 1f;
                        SpawnedObject.ObjectInstantiate.transform.rotation = rot;
                    }
                    else
                    {
                        var rot = SpawnedObject.ObjectInstantiate.transform.rotation;
                        rot.x = rot.x - 0.01f;
                        SpawnedObject.ObjectInstantiate.transform.rotation = rot;
                    }
                }

                if (Input.GetKey(KeyCode.LeftArrow))
                {
                    if (Input.GetKey(KeyCode.RightControl))
                    {
                        var rot = SpawnedObject.ObjectInstantiate.transform.rotation;
                        rot.y = rot.y + 0.1f;
                        SpawnedObject.ObjectInstantiate.transform.rotation = rot;
                    }
                    else if (Input.GetKey(KeyCode.RightShift))
                    {
                        var rot = SpawnedObject.ObjectInstantiate.transform.rotation;
                        rot.y = rot.y + 1f;
                        SpawnedObject.ObjectInstantiate.transform.rotation = rot;
                    }
                    else
                    {
                        var rot = SpawnedObject.ObjectInstantiate.transform.rotation;
                        rot.y = rot.y + 0.01f;
                        SpawnedObject.ObjectInstantiate.transform.rotation = rot;
                    }
                }

                if (Input.GetKey(KeyCode.RightArrow))
                {
                    if (Input.GetKey(KeyCode.RightControl))
                    {
                        var rot = SpawnedObject.ObjectInstantiate.transform.rotation;
                        rot.y = rot.y - 0.1f;
                        SpawnedObject.ObjectInstantiate.transform.rotation = rot;
                    }
                    else if (Input.GetKey(KeyCode.RightShift))
                    {
                        var rot = SpawnedObject.ObjectInstantiate.transform.rotation;
                        rot.y = rot.y - 1f;
                        SpawnedObject.ObjectInstantiate.transform.rotation = rot;
                    }
                    else
                    {
                        var rot = SpawnedObject.ObjectInstantiate.transform.rotation;
                        rot.y = rot.y - 0.01f;
                        SpawnedObject.ObjectInstantiate.transform.rotation = rot;
                    }
                }

                if (Input.GetKey(KeyCode.Keypad3))
                {
                    if (Input.GetKey(KeyCode.RightControl))
                    {
                        var rot = SpawnedObject.ObjectInstantiate.transform.rotation;
                        rot.z = rot.z + 0.1f;
                        SpawnedObject.ObjectInstantiate.transform.rotation = rot;
                    }
                    else if (Input.GetKey(KeyCode.RightShift))
                    {
                        var rot = SpawnedObject.ObjectInstantiate.transform.rotation;
                        rot.z = rot.z + 1f;
                        SpawnedObject.ObjectInstantiate.transform.rotation = rot;
                    }
                    else
                    {
                        var rot = SpawnedObject.ObjectInstantiate.transform.rotation;
                        rot.z = rot.z + 0.01f;
                        SpawnedObject.ObjectInstantiate.transform.rotation = rot;
                    }
                }

                if (Input.GetKey(KeyCode.KeypadEnter))
                {
                    if (Input.GetKey(KeyCode.RightControl))
                    {
                        var rot = SpawnedObject.ObjectInstantiate.transform.rotation;
                        rot.z = rot.z - 0.1f;
                        SpawnedObject.ObjectInstantiate.transform.rotation = rot;
                    }
                    else if (Input.GetKey(KeyCode.RightShift))
                    {
                        var rot = SpawnedObject.ObjectInstantiate.transform.rotation;
                        rot.z = rot.z - 1f;
                        SpawnedObject.ObjectInstantiate.transform.rotation = rot;
                    }
                    else
                    {
                        var rot = SpawnedObject.ObjectInstantiate.transform.rotation;
                        rot.z = rot.z - 0.01f;
                        SpawnedObject.ObjectInstantiate.transform.rotation = rot;
                    }
                }


                if (Input.GetKey(KeyCode.KeypadMultiply))
                {
                    if (Input.GetKey(KeyCode.RightControl))
                    {
                        SpawnedObject.ObjectInstantiate.transform.localScale += new Vector3(0.1f, 0.1f, 0.1f); //SIZE +
                    }
                    else if (Input.GetKey(KeyCode.RightShift))
                    {
                        SpawnedObject.ObjectInstantiate.transform.localScale += new Vector3(1f, 1f, 1f);
                    }
                    else
                    {
                        SpawnedObject.ObjectInstantiate.transform.localScale +=
                            new Vector3(0.01f, 0.01f, 0.01f); //SIZE +
                    }
                }

                if (Input.GetKey(KeyCode.KeypadMinus))
                {
                    if (SpawnedObject.ObjectInstantiate.transform.localScale == Vector3.zero)
                    {
                        return;
                    }

                    if (Input.GetKey(KeyCode.RightControl))
                    {
                        SpawnedObject.ObjectInstantiate.transform.localScale -= new Vector3(0.1f, 0.1f, 0.1f); //SIZE -
                    }
                    else if (Input.GetKey(KeyCode.RightShift))
                    {
                        SpawnedObject.ObjectInstantiate.transform.localScale -= new Vector3(1f, 1f, 1f);
                    }
                    else
                    {
                        SpawnedObject.ObjectInstantiate.transform.localScale -=
                            new Vector3(0.01f, 0.01f, 0.01f); //SIZE -
                    }
                }
            }
        }
        private void MotorHacks()
        {
            HumanController localController = HackLocal.LocalController;
            Character       localCharacter  = HackLocal.LocalCharacter;
            CCMotor         ccmotor         = localController.ccmotor;

            if (ccmotor != null)
            {
                if (!this.defaultJumping.HasValue)
                {
                    this.defaultJumping = new CCMotor.Jumping?(ccmotor.jumping.setup);
                }
                else
                {
                    ccmotor.minTimeBetweenJumps      = 0.1f;
                    ccmotor.jumping.setup.baseHeight = this.defaultJumping.Value.baseHeight * CVars.Misc.JumpModifer;
                }
                if (!this.defaultMovement.HasValue)
                {
                    this.defaultMovement = new CCMotor.Movement?(ccmotor.movement.setup);
                }
                else
                {
                    ccmotor.movement.setup.maxForwardSpeed       = this.defaultMovement.Value.maxForwardSpeed * CVars.Misc.SpeedModifer / 10f;
                    ccmotor.movement.setup.maxSidewaysSpeed      = this.defaultMovement.Value.maxSidewaysSpeed * CVars.Misc.SpeedModifer / 10f;
                    ccmotor.movement.setup.maxBackwardsSpeed     = this.defaultMovement.Value.maxBackwardsSpeed * CVars.Misc.SpeedModifer / 10f;
                    ccmotor.movement.setup.maxGroundAcceleration = this.defaultMovement.Value.maxGroundAcceleration * CVars.Misc.SpeedModifer / 10f;
                    ccmotor.movement.setup.maxAirAcceleration    = this.defaultMovement.Value.maxAirAcceleration * CVars.Misc.SpeedModifer / 10f;
                    if (CVars.Misc.NoFallDamage)
                    {
                        ccmotor.movement.setup.maxFallSpeed = 17f;
                    }
                    else
                    {
                        ccmotor.movement.setup.maxFallSpeed = this.defaultMovement.Value.maxFallSpeed;
                    }
                }
                if (CVars.Misc.FlyHack)
                {
                    ccmotor.velocity = Vector3.zero;
                    Vector3 forward = localCharacter.eyesAngles.forward;
                    Vector3 right   = localCharacter.eyesAngles.right;
                    if (!ChatUI.IsVisible())
                    {
                        if (Input.GetKey(KeyCode.W))
                        {
                            ccmotor.velocity += forward * (ccmotor.movement.setup.maxForwardSpeed * 3f);
                        }
                        if (Input.GetKey(KeyCode.S))
                        {
                            ccmotor.velocity -= forward * (ccmotor.movement.setup.maxBackwardsSpeed * 3f);
                        }
                        if (Input.GetKey(KeyCode.A))
                        {
                            ccmotor.velocity -= right * (ccmotor.movement.setup.maxSidewaysSpeed * 3f);
                        }
                        if (Input.GetKey(KeyCode.D))
                        {
                            ccmotor.velocity += right * (ccmotor.movement.setup.maxSidewaysSpeed * 3f);
                        }
                        if (Input.GetKey(KeyCode.Space))
                        {
                            ccmotor.velocity += Vector3.up * (this.defaultMovement.Value.maxAirAcceleration * 3f);
                        }
                    }
                    if (ccmotor.velocity == Vector3.zero)
                    {
                        ccmotor.velocity += Vector3.up * (ccmotor.settings.gravity * Time.deltaTime * 0.5f);
                    }
                }
            }
        }