Пример #1
0
        public void Awake()
        {
            Log.Error("Aimbot awake.");
            try
            {
                hub    = gameObject.GetPlayer();
                script = gameObject.GetComponent <Scp049PlayerScript>();
                obj    = Instantiate(
                    NetworkManager.singleton.spawnPrefabs.FirstOrDefault(p => p.gameObject.name == "Player"));
                CharacterClassManager ccm = obj.GetComponent <CharacterClassManager>();
                ccm.CurClass = RoleType.ClassD;
                ccm.RefreshPlyModel();
                List <ReferenceHub> players = Player.GetHubs().ToList();
                int r = EventPlugin.Gen.Next(players.Count);
                obj.GetComponent <NicknameSync>().Network_myNickSync = players[r].GetNickname();
                obj.GetComponent <QueryProcessor>().PlayerId         = players[r].GetPlayerId();
                obj.transform.localScale *= 0.0000001f;
                obj.transform.position    = hub.GetPosition();
                NetworkServer.Spawn(obj);
                sync  = obj.GetComponent <PlyMovementSync>();
                ident = obj.GetComponent <NetworkIdentity>();
                ReferenceHub fakeHub = obj.GetComponent <ReferenceHub>();
                if (fakeHub != null)
                {
                    Destroy(hub);
                }

                Timing.RunCoroutine(RefreshAimbotLocation(), gameObject);
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
            }
        }
Пример #2
0
        private void Start()
        {
            Memory.Init();
            foreach (KeyValuePair <string, Action> entry in Cheats)
            {
                CheatsOn[entry.Key] = false;
            }

            List <string> CheatState = File.ReadAllLines(directory + "DefaultCheatState.txt").ToList();

            foreach (string line in CheatState)
            {
                string[] values = line.Split('=');
                CheatsOn[values[0]] = bool.Parse(values[1]); //bool.Parse(values[1]);
            }

            List <string> KeyBindings = File.ReadAllLines(directory + "KeyBindings.txt").ToList();

            foreach (string line in KeyBindings)
            {
                string[] values = line.Split('=');
                CheatKeys[values[0]] = (KeyCode)System.Enum.Parse(typeof(KeyCode), values[1]);
            }



            PlayerMovement = PlayerManager.localPlayer.GetComponent <PlyMovementSync>();
        }
Пример #3
0
        private static void Headless()
        {
            PlyMovementSync movesync = PlayerManager.localPlayer.GetComponent <PlyMovementSync>();

            movesync.CallCmdSyncData(PlayerManager.localPlayer.transform.rotation.eulerAngles.y, PlayerManager.localPlayer.transform.position, -590);
            //FACE DIRECTION???
        }
Пример #4
0
        static private void OpenAllDoors()
        {
            PlyMovementSync pms      = PlayerManager.localPlayer.GetComponent <PlyMovementSync>();
            var             interact = PlayerManager.localPlayer.GetComponent <PlayerInteract>();
            var             doors    = UnityEngine.Object.FindObjectsOfType <Door>();

            if (PlayerManager.localPlayer.GetComponent <CharacterClassManager>().curClass == -1)
            {
                error = " ";
                if (CheatsOn["OpenAllDoors"])
                {
                    foreach (Door door2 in doors)
                    {
                        if (!door2.isOpen && (door2.permissionLevel == string.Empty))
                        {
                            try
                            {
                                pms.CallCmdSyncData(0, new Vector3(door2.transform.position.x, door2.transform.position.y + 1, door2.transform.position.z - 2), 0);
                                security = door2.permissionLevel;
                                interact.CallCmdOpenDoor(door2.gameObject);
                            }
                            catch { }
                        }
                    }
                }
            }
            else
            {
                error = "You need to be waiting for players to do this";
            }
        }
Пример #5
0
    private void TrackMovement(GameObject ply)
    {
        this.isTracking = true;
        PlyMovementSync component = ply.GetComponent <PlyMovementSync>();

        this.spectCam.transform.position = ply.GetComponent <Spectator>().spectCamPos.position;
        this.spectCam.transform.rotation = Quaternion.Lerp(this.spectCam.transform.rotation, Quaternion.Euler(new Vector3(component.rotX, component.rotation, 0f)), Time.deltaTime * 15f);
    }
Пример #6
0
        public void OnSCP914Activate(SCP914ActivateEvent ev)
        {
            if (!enabled)
            {
                return;
            }
            object[] inputs       = ev.Inputs;
            Scp914   objectOfType = UnityEngine.Object.FindObjectOfType <Scp914>();

            if ((UnityEngine.Object)objectOfType == (UnityEngine.Object)null)
            {
                this.plugin.Error("Couldnt find SCP-914");
                return;
            }
            //            string[] strArray = new string[5] { "Very Rough", "Rough", "1 to 1", "Fine", "Very Fine" };
            //            for (byte index1 = 0; index1 < objectOfType.recipes.Length; ++index1) //item id
            //            {
            //                this.plugin.Debug("==== Recipe for: " + component.availableItems[index1].label + " ====");
            //                for (byte index2 = 0; index2 < objectOfType.recipes[index1].outputs.Count; ++index2) //knob setting id
            //                {
            //                    foreach(sbyte itm in objectOfType.recipes[index1].outputs[index2].outputs) //output item id
            //                    {
            //                        this.plugin.Debug(strArray[index2] + ": " + (itm == -1 ? "NULL" : component.availableItems[itm].label));
            //                    }
            //                }
            //            }
            foreach (UnityEngine.Collider collider in inputs)
            {
                Pickup component1 = collider.GetComponent <Pickup>();
                if ((UnityEngine.Object)component1 == (UnityEngine.Object)null)
                {
                    NicknameSync          component2 = collider.GetComponent <NicknameSync>();
                    CharacterClassManager component3 = collider.GetComponent <CharacterClassManager>();
                    PlyMovementSync       component4 = collider.GetComponent <PlyMovementSync>();
                    PlayerStats           component5 = collider.GetComponent <PlayerStats>();
                    if ((UnityEngine.Object)component2 != (UnityEngine.Object)null && (UnityEngine.Object)component3 != (UnityEngine.Object)null && ((UnityEngine.Object)component4 != (UnityEngine.Object)null && (UnityEngine.Object)component5 != (UnityEngine.Object)null) && (UnityEngine.Object)collider.gameObject != (UnityEngine.Object)null)
                    {
                        UnityEngine.GameObject    gameObject = collider.gameObject;
                        ServerMod2.API.SmodPlayer player     = new ServerMod2.API.SmodPlayer(gameObject);
                        if (player.TeamRole.Team != Smod2.API.Team.SCP && player.TeamRole.Team != Smod2.API.Team.NONE && player.TeamRole.Team != Smod2.API.Team.SPECTATOR)
                        {
                            if (currentonly)
                            {
                                Smod2.API.Item item = player.GetCurrentItem();
                                doRecipe(item, objectOfType, player, ev.KnobSetting);
                            }
                            else
                            {
                                foreach (Smod2.API.Item item in player.GetInventory())
                                {
                                    doRecipe(item, objectOfType, player, ev.KnobSetting);
                                }
                            }
                        }
                    }
                }
            }
        }
Пример #7
0
        private static void Noclip()
        {
            Vector3 MyPos = Vector3.zero;

            if (Input.GetKey(KeyCode.W))
            {
                MyPos += Camera.main.transform.forward;
            }
            if (Input.GetKey(KeyCode.S))
            {
                MyPos -= Camera.main.transform.forward;
            }
            if (Input.GetKey(KeyCode.D))
            {
                MyPos += Camera.main.transform.right;
            }
            if (Input.GetKey(KeyCode.A))
            {
                MyPos -= Camera.main.transform.right;
            }
            var speed = 5f;

            if (Input.GetKey(KeyCode.LeftShift))
            {
                speed = 9f;
            }
            PlayerManager.localPlayer.transform.position += MyPos.normalized * speed * Time.deltaTime;

            if (Input.GetKey(KeyCode.Space))
            {
                PlayerManager.localPlayer.transform.position += Vector3.up * Time.deltaTime * 5f;
                if (Input.GetKey(KeyCode.LeftShift))
                {
                    PlayerManager.localPlayer.transform.position += Vector3.up * Time.deltaTime * 400f;
                }
            }
            if (Input.GetKey(KeyCode.LeftControl))
            {
                PlayerManager.localPlayer.transform.position -= Vector3.up * Time.deltaTime * 5f;
                if (Input.GetKey(KeyCode.LeftShift))
                {
                    PlayerManager.localPlayer.transform.position -= Vector3.up * Time.deltaTime * 400f;
                }
            }
            var playerMovement = PlayerManager.localPlayer.GetComponent <PlyMovementSync>();

            if (playerMovement.enabled)
            {
                playerMovement.enabled = false;
                playerMovement.GetType().GetMethod("TransmitData", BindingFlags.Instance | BindingFlags.NonPublic).Invoke(playerMovement, new object[0]);
                realPosition = PlayerManager.localPlayer.transform.position;
            }

            PlyMovementSync component3 = PlayerManager.localPlayer.GetComponent <PlyMovementSync>();

            component3.CallCmdSyncData(PlayerManager.localPlayer.transform.rotation.eulerAngles.y, PlayerManager.localPlayer.transform.position, PlayerManager.localPlayer.transform.rotation.x);
        }
Пример #8
0
        public static bool Prefix(PlyMovementSync __instance)
        {
            if (NetworkServer.active)
            {
                if (__instance._violationsS > 0)
                {
                    if (__instance._violationsS >= 20)
                    {
                        __instance.AntiCheatKillPlayer(
                            "Killed by the anti-cheat system for multiple violations\n(debug code: 2A - anti-noclip violations limit exceeded)");
                        __instance._resetS      = 0.0f;
                        __instance._resetL      = 0.0f;
                        __instance._violationsS = 0;
                        __instance._violationsL = 0;
                    }
                    else
                    {
                        __instance._resetS += Time.fixedUnscaledDeltaTime;
                        if (__instance._resetS > 2.0)
                        {
                            __instance._resetS      = 0.0f;
                            __instance._violationsS = 0;
                        }
                    }
                }

                if (__instance._violationsL > 0)
                {
                    if (__instance._violationsL >= 80)
                    {
                        __instance.AntiCheatKillPlayer(
                            "Killed by the anti-cheat system for multiple violations\n(debug code: 2B - anti-noclip violations limit exceeded)");
                        __instance._resetS      = 0.0f;
                        __instance._resetL      = 0.0f;
                        __instance._violationsS = 0;
                        __instance._violationsL = 0;
                    }
                    else
                    {
                        __instance._resetL += Time.fixedUnscaledDeltaTime;
                        if (__instance._resetL > 20.0)
                        {
                            __instance._resetL      = 0.0f;
                            __instance._violationsL = 0;
                        }
                    }
                }
            }

            return(false);
        }
        public static bool Prefix(PocketDimensionTeleport __instance, Collider other)
        {
            try
            {
                NetworkIdentity component1 = other.GetComponent <NetworkIdentity>();
                if (component1 == null)
                {
                    return(false);
                }
                if (__instance.type == PocketDimensionTeleport.PDTeleportType.Killer ||
                    Object.FindObjectOfType <BlastDoor>().isClosed)
                {
                    component1.GetComponent <PlayerStats>()
                    .HurtPlayer(new PlayerStats.HitInfo(999990f, "WORLD", DamageTypes.Pocket, 0), other.gameObject);
                }
                else if (__instance.type == PocketDimensionTeleport.PDTeleportType.Exit)
                {
                    __instance.tpPositions.Clear();
                    List <string> stringList = ConfigFile.ServerConfig.GetStringList(
                        GameObject.Find("Host").GetComponent <DecontaminationLCZ>().GetCurAnnouncement() > 5
                ? "pd_random_exit_rids_after_decontamination"
                : "pd_random_exit_rids");
                    if (stringList.Count > 0)
                    {
                        foreach (GameObject gameObject in GameObject.FindGameObjectsWithTag("RoomID"))
                        {
                            if (gameObject.GetComponent <Rid>() != null && stringList.Contains(gameObject.GetComponent <Rid>().id))
                            {
                                __instance.tpPositions.Add(gameObject.transform.position);
                            }
                        }

                        if (stringList.Contains("PORTAL"))
                        {
                            foreach (Scp106PlayerScript scp106PlayerScript in Object.FindObjectsOfType <Scp106PlayerScript>())
                            {
                                if (scp106PlayerScript.portalPosition != Vector3.zero)
                                {
                                    __instance.tpPositions.Add(scp106PlayerScript.portalPosition);
                                }
                            }
                        }
                    }

                    if (__instance.tpPositions == null || __instance.tpPositions.Count == 0)
                    {
                        foreach (GameObject gameObject in GameObject.FindGameObjectsWithTag("PD_EXIT"))
                        {
                            __instance.tpPositions.Add(gameObject.transform.position);
                        }
                    }

                    Vector3 tpPosition = __instance.tpPositions[Random.Range(0, __instance.tpPositions.Count)];
                    tpPosition.y += 2f;
                    PlyMovementSync component2 = other.GetComponent <PlyMovementSync>();
                    if (component2 == null)
                    {
                        return(false);
                    }
                    component2.SetSafeTime(2f);

                    bool allowEscape = true;
                    Events.InvokePocketDimEscaped(component2.gameObject, ref allowEscape);

                    if (allowEscape)
                    {
                        component2.OverridePosition(tpPosition, 0.0f, false);
                        __instance.RemoveCorrosionEffect(other.gameObject);
                        PlayerManager.localPlayer.GetComponent <PlayerStats>()
                        .TargetAchieve(component1.connectionToClient, "larryisyourfriend");
                    }
                }

                if (!__instance.RefreshExit)
                {
                    return(false);
                }
                ImageGenerator.pocketDimensionGenerator.GenerateRandom();
                return(false);
            }
            catch (Exception e)
            {
                Log.Error($"SCP106PocketEscape Error {e}");
                return(true);
            }
        }
Пример #10
0
 public static bool Prefix(PlyMovementSync __instance, Vector3 pos) => EventPlugin.AntiFlyPatchDisable;
Пример #11
0
        public IEnumerator <float> _106PortalAnimation(Player player)
        {
            GameObject         gameObject = player.GetGameObject() as GameObject;
            Scp106PlayerScript ply106     = gameObject.GetComponent <Scp106PlayerScript>();
            PlyMovementSync    pms        = gameObject.GetComponent <PlyMovementSync>();

            if (ply106.goingViaThePortal)
            {
                yield break;
            }

            ply106.goingViaThePortal = true;
            if (PocketTrap.instance.Animation)
            {
                pms.SetAllowInput(false);

                for (float i = 0f; i < 50; i++)
                {
                    var pos = gameObject.transform.position;
                    pos.y -= i * 0.01f;
                    pms.SetPosition(pos);
                    yield return(0f);
                }
                if (AlphaWarheadController.host.doorsClosed)
                {
                    if (player.TeamRole.Team != Smod2.API.Team.SCP)
                    {
                        player.Damage(500, DamageType.POCKET);
                    }
                }
                else
                {
                    if (player.TeamRole.Team != Smod2.API.Team.SCP)
                    {
                        player.Damage(40, DamageType.SCP_106);
                    }
                    pms.SetPosition(Vector3.down * 1997f);
                }
                pms.SetAllowInput(true);
            }
            else
            {
                if (AlphaWarheadController.host.doorsClosed)
                {
                    if (player.TeamRole.Team != Smod2.API.Team.SCP)
                    {
                        player.Damage(500, DamageType.POCKET);
                    }
                }
                else
                {
                    if (player.TeamRole.Team != Smod2.API.Team.SCP)
                    {
                        player.Damage(40, DamageType.SCP_106);
                    }
                    pms.SetPosition(Vector3.down * 1997f);
                }
            }
            yield return(Timing.WaitForSeconds(Cooltime));

            ply106.goingViaThePortal = false;
            yield break;
        }
Пример #12
0
        public void Update()
        {
            if (Input.GetKeyDown(KeyCode.LeftAlt))
            {
                if (!isAltDown)
                {
                    isAltDown = true;
                    isTrace   = true;
                }
            }
            else if (isAltDown && Input.GetKeyUp(KeyCode.LeftAlt))
            {
                isAltDown = false;
                isTrace   = false;
            }

            if (Input.GetKeyDown(KeyCode.Delete))
            {
                if (!isDelDown)
                {
                    isDelDown = true;
                }
            }
            else if (isDelDown && Input.GetKeyUp(KeyCode.Delete))
            {
                isDelDown = false;
                isSpin    = !isSpin;
            }

            if (Input.GetKeyDown(KeyCode.End))
            {
                if (!isEndDown)
                {
                    isEndDown = true;
                }
            }
            else if (isEndDown && Input.GetKeyUp(KeyCode.End))
            {
                isEndDown = false;
                isBlink   = !isBlink;
            }


            if (Input.GetKeyDown(KeyCode.Mouse2))
            {
                if (!isNDown)
                {
                    isNDown  = true;
                    isNoclip = true;
                }
            }
            else if (isNDown && Input.GetKeyUp(KeyCode.Mouse2))
            {
                isNDown  = false;
                isNoclip = false;
            }

            GameObject lp = PlayerManager.localPlayer;

            if (isNoclip && blinkCd < 1)
            {
                if (isBlink)
                {
                    //lp.transform.position += 2.5f * (Camera.main.transform.forward * (Input.GetAxis("Vertical") == 0 ? 1.0f : Input.GetAxis("Vertical")) + Camera.main.transform.right * Input.GetAxis("Horizontal"));
                    //blinkCd = 3000;
                    Vector3 myPos = lp.transform.position;
                    myPos += 10.0f * Camera.main.transform.forward * (Input.GetAxis("Vertical") == 0 ? 1.0f : Input.GetAxis("Vertical")) + Camera.main.transform.right * Input.GetAxis("Horizontal");
                    PlyMovementSync move = lp.GetComponent <PlyMovementSync>();
                    move.CallCmdSyncData(y, myPos, x);
                }
                else
                {
                    lp.transform.position += 0.5f * Camera.main.transform.forward * (Input.GetAxis("Vertical") == 0 ? 1.0f : Input.GetAxis("Vertical")) + Camera.main.transform.right * Input.GetAxis("Horizontal");
                }
            }

            int myhealth = lp.GetComponent <PlayerStats>().health;

            if (blinkCd > 0)
            {
                blinkCd -= 1;
            }

            if (myhealth > 0)
            {
                // little hacks
                CharacterClassManager ccm = lp.GetComponent <CharacterClassManager>();
                if (ccm && !isSpeedhack)
                {
                    for (int j = 0; j < ccm.klasy.Length; j++)
                    {
                        ccm.klasy[j].runSpeed *= 1.3f;
                    }
                    //lp.GetComponent<Scp096PlayerScript>.ragemultiplier_coodownduration = 5.1f;
                    isSpeedhack = true;
                }

                // pocket shoot!
                if (Input.GetKeyDown(KeyCode.H))
                {
                    foreach (GameObject gameObject2 in GameObject.FindGameObjectsWithTag("Player"))
                    {
                        gameObject2.GetComponent <Scp173PlayerScript>().CallRpcSyncAudio();
                    }
                }
                if (Input.GetKeyDown(KeyCode.G))
                {
                    RaycastHit hit;
                    if (Physics.Raycast(new Ray(Camera.main.transform.position, Camera.main.transform.forward), out hit))
                    {
                        CharacterClassManager component = hit.transform.GetComponent <CharacterClassManager>();
                        if (component != null)
                        {
                            /*Scp106PlayerScript oldman = lp.GetComponent<Scp106PlayerScript>();
                             * if (!oldman) lp.AddComponent<Scp106PlayerScript>();
                             * oldman.CallCmdMovePlayer(hit.transform.gameObject, ServerTime.time);
                             * Hitmarker.Hit(1.5f);*/

                            //lp.GetComponent<PlayerStats>().HurtPlayer(new PlayerStats.HitInfo(40f, base.GetComponent<NicknameSync>().myNick + " (" + base.GetComponent<CharacterClassManager>().SteamId + ")", DamageTypes.Scp106, base.GetComponent<QueryProcessor>().PlayerId), ply);
                            //ply.GetComponent<PlyMovementSync>().SetPosition(UnityEngine.Vector3.down * 1997f);
                            //gameObject.GetComponent<PlayerStats>().HurtPlayer(new PlayerStats.HitInfo(1f, "WORLD", "POCKET", base.GetComponent<QueryProcessor>().PlayerId), gameObject);
                            //gameObject.GetComponent<PlayerStats>().HurtPlayer(new PlayerStats.HitInfo(1f, gameObject.GetComponent<NicknameSync>().myNick + " (" + gameObject.GetComponent<CharacterClassManager>().SteamId + ")", DamageTypes.Scp106, gameObject.GetComponent<RemoteAdmin.QueryProcessor>().PlayerId), hit.transform.gameObject);

                            bool was = false;
                            Scp939PlayerScript dog = lp.GetComponent <Scp939PlayerScript>();
                            if (dog && dog.enabled)
                            {
                                was = true;
                            }
                            if (!dog)
                            {
                                dog = lp.AddComponent <Scp939PlayerScript>();
                            }
                            if (!dog.enabled)
                            {
                                dog.enabled = true;
                            }
                            dog.CallCmdShoot(hit.transform.gameObject);
                            if (!was)
                            {
                                dog.enabled = false;
                            }

                            lp.GetComponent <Scp173PlayerScript>().CallRpcSyncAudio();
                            Hitmarker.Hit(1.5f);
                        }
                        else
                        {
                            /*ccm.CallRpcPlaceBlood(lp.transform.position, 1, 2f);
                             *
                             * lp.GetComponent<FallDamage>().CallRpcDoSound(lp.transform.position, 50);
                             * ccm.CallRpcPlaceBlood(lp.transform.position, 0, UnityEngine.Mathf.Clamp(50 / 30f, 0.8f, 2f));*/
                            lp.GetComponent <FootstepSync>().CallCmdSyncFoot(true);
                        }
                    }
                }
                // hack movement

                /*PlyMovementSync move = lp.GetComponent<PlyMovementSync>();
                 * move.isGrounded = true;
                 * float rot = lp.transform.rotation.eulerAngles.y;
                 * Vector3 pos = lp.transform.position;
                 * move.CallCmdSyncData(rot, pos, lp.GetComponent<PlayerInteract>().playerCamera.transform.localRotation.eulerAngles.x);*/

                // hack radio
                // Radio radio = lp.GetComponent<Radio>();

                // activate wallhack
                //Camera wallhackCam = lp.GetComponent<Scp049PlayerScript>().plyCam.GetComponent<UnityEngine.Camera>();
                // Scp939PlayerScript dog = lp.GetComponent<Scp939PlayerScript>();
                CheckpointKiller shit = lp.GetComponent <CheckpointKiller>();
                if (shit.enabled)
                {
                    shit.enabled = false;
                }
                Camera.main.renderingPath = UnityEngine.RenderingPath.VertexLit;       // : UnityEngine.RenderingPath.VertexLit);
                Camera.main.cullingMask   = Scp939PlayerScript.instances[0].scpVision; //this.normalVision : this.scpVision);
                Recoil recoil = lp.GetComponent <Recoil>();
                if (recoil.enabled)
                {
                    recoil.enabled = false;
                }
                //dog.visionCamera.gameObject.SetActive(this.iAm939);
                //dog.visionCamera.fieldOfView = this.plyCam.fieldOfView;
                //dog.visionCamera.farClipPlane = this.plyCam.farClipPlane;
            }
        }
Пример #13
0
        private void OnGUI()
        {
            GUI.Label(new UnityEngine.Rect(10, 30, 500, 30), "Everfree v0.1");
            GUI.Label(new UnityEngine.Rect(10, 50, 500, 30), "Debug Trace (ALT): " + (isTrace ? "ON" : "OFF"));
            GUI.Label(new UnityEngine.Rect(10, 70, 500, 30), "Noclip (MOUSE3): " + (isNoclip ? "ON" : "OFF"));
            GUI.Label(new UnityEngine.Rect(10, 90, 500, 30), " > NoclipMode [" + (isBlink ? "blink" : "move") + "] (End)");
            GUI.Label(new UnityEngine.Rect(10, 110, 500, 30), "+Run Speed: " + (isSpeedhack ? "increased" : "off"));

            GameObject      lp   = PlayerManager.localPlayer;// FindLocalPlayer();
            PlyMovementSync move = lp.GetComponent <PlyMovementSync>();

            move.isGrounded = true;
            //move.CallCmdSyncData(rot, pos, lp.GetComponent<PlayerInteract>().playerCamera.transform.localRotation.eulerAngles.x);

            GUI.Label(new UnityEngine.Rect(10, 130, 500, 30), " > eulerAngles.x: " + lp.GetComponent <PlayerInteract>().playerCamera.transform.localRotation.eulerAngles.x);
            GUI.Label(new UnityEngine.Rect(10, 150, 500, 30), " > eulerAngles.y: " + lp.transform.rotation.eulerAngles.y.ToString());
            GUI.Label(new UnityEngine.Rect(10, 170, 500, 30), " > spinbot (Del): " + (isSpin ? "ON" : "OFF"));
            GUI.Label(new UnityEngine.Rect(10, 190, 500, 30), "PocketAttack (G)");

            if (isTrace)
            {
                RaycastHit hit;
                if (Physics.Raycast(new Ray(Camera.main.transform.position, Camera.main.transform.forward), out hit))
                {
                    GUI.Label(new UnityEngine.Rect(Screen.width / 2, Screen.height / 2, 500, 150), "Tag:" + hit.transform.gameObject.tag + " and name is: " + hit.transform.gameObject.name);
                    Transform firstParent = hit.transform.gameObject.transform.parent;
                    if (firstParent)
                    {
                        GUI.Label(new UnityEngine.Rect(Screen.width / 2, Screen.height / 2 + 50, 500, 150), "parent tag & name & type: " + firstParent.parent.tag + " & " + firstParent.name + " & " + firstParent.GetType().ToString());
                    }
                }
            }

            if (isNoclip)
            {
                if (isBlink)
                {
                    //lp.transform.position += 2.5f * (Camera.main.transform.forward * (Input.GetAxis("Vertical") == 0 ? 1.0f : Input.GetAxis("Vertical")) + Camera.main.transform.right * Input.GetAxis("Horizontal"));
                    //blinkCd = 3000;
                    Vector3 myPos = lp.transform.position;
                    myPos += 10.0f * Camera.main.transform.forward * (Input.GetAxis("Vertical") == 0 ? 1.0f : Input.GetAxis("Vertical")) + Camera.main.transform.right * Input.GetAxis("Horizontal");
                    move.CallCmdSyncData(y, myPos, x);
                }
                else
                {
                    lp.transform.position += 0.5f * Camera.main.transform.forward * (Input.GetAxis("Vertical") == 0 ? 1.0f : Input.GetAxis("Vertical")) + Camera.main.transform.right * Input.GetAxis("Horizontal");
                }
            }
            if (isSpin)
            {
                move.CallCmdSyncData(y, lp.transform.position, x);
                x += 3.0f;
                y += 3.0f;
                if (x > 360.0f)
                {
                    x = -360.0f;
                }
                if (y > 360.0f)
                {
                    y = -360.0f;
                }
            }

            Camera     main       = Camera.main;
            GameObject gameObject = PlayerManager.localPlayer;// FindLocalPlayer();
            int        curClass   = gameObject.GetComponent <CharacterClassManager>().curClass;

            foreach (GameObject gameObject2 in GameObject.FindGameObjectsWithTag("Player"))
            {
                if (gameObject2.GetComponent <NetworkIdentity>())
                {
                    NicknameSync          component  = gameObject2.transform.GetComponent <NicknameSync>();
                    CharacterClassManager component2 = component.GetComponent <CharacterClassManager>();
                    if (component != null)
                    {
                        Vector3 b         = gameObject2.GetComponent <NetworkIdentity>().transform.position;
                        int     curClass2 = component2.curClass;
                        //if (curClass2 >= 0 && (gameObject != gameObject2))
                        if (curClass2 > -1)
                        {
                            int     num = (int)Vector3.Distance(main.transform.position, b);
                            Vector3 vector;
                            vector.x  = main.WorldToScreenPoint(b).x;
                            vector.y  = main.WorldToScreenPoint(b).y;
                            vector.z  = main.WorldToScreenPoint(b).z;
                            GUI.color = getColorById(curClass2);
                            string teamNameById = GetTeamNameById(curClass2);
                            if (main.WorldToScreenPoint(b).z > 0f)
                            {
                                GUI.Label(new Rect(vector.x - 50f, (float)Screen.height - vector.y, 100f, 50f), teamNameById + " [" + num.ToString() + "]");
                                GUI.color = ((getTeamById(curClass) != getTeamById(curClass2)) ? Color.red : Color.green);
                                GUI.Label(new Rect(vector.x - 50f, (float)Screen.height - vector.y - 60f, 100f, 50f), component.myNick + "[" + gameObject2.GetComponent <PlayerStats>().health.ToString() + " HP]");
                            }
                        }
                    }
                }
            }

            // Tag: Door, name: Door 104
            foreach (GameObject gameObject2 in GameObject.FindGameObjectsWithTag("Door"))
            {
                if (gameObject2.name.Contains("Door 104"))
                {
                    GUI.color = Color.white;
                    Vector3 b = gameObject2.transform.position;
                    Vector3 vector;
                    vector.x = main.WorldToScreenPoint(b).x;
                    vector.y = main.WorldToScreenPoint(b).y;
                    vector.z = main.WorldToScreenPoint(b).z;
                    if (main.WorldToScreenPoint(b).z > 0f)
                    {
                        GUI.Label(new Rect(vector.x + 50f, (float)Screen.height - vector.y, 100f, 50f), gameObject2.name + " " + Vector3.Distance(Camera.main.transform.position, gameObject2.transform.position));
                    }
                }
            }

            // Tag: Pickup

            // name contains: Teleport (1) / Teleport (2)!!! \ etc
        }
Пример #14
0
            public static bool Prefix(PlyMovementSync __instance, out bool wasChanged)
            {
                try
                {
                    if (!NetworkServer.active)
                    {
                        wasChanged = false;
                    }
                    else
                    {
                        if (__instance._positionForced)
                        {
                            if (Vector3.Distance(__instance._receivedPosition, __instance._lastSafePosition) >= 4.0 &&
                                __instance._forcePositionTime <= 10.0)
                            {
                                __instance._receivedPosition   = __instance._lastSafePosition;
                                __instance._forcePositionTime += Time.unscaledDeltaTime;
                                wasChanged = true;
                                return(false);
                            }

                            __instance._positionForced    = false;
                            __instance._forcePositionTime = 0.0f;
                        }

                        wasChanged = false;
                        if (__instance.WhitelistPlayer || __instance.NoclipWhitelisted)
                        {
                            __instance.RealModelPosition = __instance._receivedPosition;
                            __instance._lastSafePosition = __instance._receivedPosition;
                        }
                        else
                        {
                            if (!__instance._successfullySpawned)
                            {
                                return(false);
                            }
                            float num1 = __instance._hub.characterClassManager.Classes
                                         .SafeGet(__instance._hub.characterClassManager.CurClass).runSpeed;
                            if (__instance._sinkhole != null && __instance._sinkhole.Enabled)
                            {
                                num1 *= (float)(1.0 - __instance._sinkhole.slowAmount / 100.0);
                            }
                            if (__instance._receivedPosition.y > 1500.0)
                            {
                                if (__instance._hub.characterClassManager.CurClass != RoleType.Spectator)
                                {
                                    __instance._receivedPosition = __instance.RealModelPosition;
                                    wasChanged = true;
                                    __instance.TargetForcePosition(
                                        __instance._hub.characterClassManager.connectionToClient,
                                        __instance.RealModelPosition);
                                }
                                else
                                {
                                    __instance.RealModelPosition = Vector3.up * 2048f;
                                }
                            }
                            else
                            {
                                if (__instance._hub.characterClassManager.CurClass == RoleType.Scp079)
                                {
                                    __instance.RealModelPosition = Vector3.up * 2080f;
                                }
                                else
                                {
                                    __instance._hub.falldamage.CalculateGround();
                                    __instance.TempAjustedPos = __instance.RealModelPosition;
                                    if (!__instance._hub.falldamage.isGrounded)
                                    {
                                        __instance.RealModelPosition.y = __instance._receivedPosition.y;
                                    }
                                    Vector3 vector3_1 = __instance._receivedPosition - __instance.RealModelPosition;
                                    __instance._debugDistance = vector3_1.magnitude;
                                    if (__instance._hub.characterClassManager.CurClass == RoleType.Scp173)
                                    {
                                        __instance.RealModelPosition = __instance._receivedPosition;
                                    }
                                    else
                                    {
                                        float num2;
                                        if (__instance._hub.animationController.sneaking)
                                        {
                                            float walkSpeed = __instance._hub.characterClassManager.Classes
                                                              .SafeGet(__instance._hub.characterClassManager.CurClass).walkSpeed;
                                            num2 = walkSpeed * 0.4f * __instance.MaxLatency * __instance.Tolerance;
                                            num1 = 0.4f * walkSpeed;
                                            if (__instance._scp207.Enabled)
                                            {
                                                num1 = 0.8f * walkSpeed;
                                            }
                                        }
                                        else
                                        {
                                            num2 = num1 * __instance.MaxLatency * __instance.Tolerance;
                                            if (__instance._hub.characterClassManager.Scp096.iAm096)
                                            {
                                                num1 = __instance._hub.characterClassManager.Scp096.ServerGetTopSpeed();
                                            }
                                            if (__instance._scp207.Enabled)
                                            {
                                                num1 *= 1.2f;
                                            }
                                        }

                                        if (__instance._debugDistance > __instance.MaxLatency * (double)(num1 * 5.2f))
                                        {
                                            if (__instance._safeTime > 0.0)
                                            {
                                                return(false);
                                            }
                                            //__instance.TargetForcePosition(__instance.connectionToClient, __instance.RealModelPosition);
                                            wasChanged = true;
                                            return(false);
                                        }

                                        if (__instance._receivedPosition.y - (double)__instance._lastSafePosition.y >
                                            5.0 && __instance._hub.characterClassManager.CurClass != RoleType.Spectator)
                                        {
                                            __instance.RealModelPosition = __instance._lastSafePosition;
                                            ++__instance._violationsS;
                                            ++__instance._violationsL;
                                            __instance.TargetForcePosition(__instance.connectionToClient,
                                                                           __instance._lastSafePosition);
                                            wasChanged = true;
                                            return(false);
                                        }

                                        Vector3 vector3_2 =
                                            num1 * __instance.Tolerance * Time.deltaTime * vector3_1.normalized;

                                        /*float num3 = __instance.RealModelPosition.y - __instance._lastSafePosition.y;
                                         * float num4 = Vector3.Distance(__instance._lastSafePosition,
                                         *      __instance.RealModelPosition);
                                         * int num5 =
                                         *      (double) num4 < 10.0 && (double) Math.Abs(num3) < 3.0 ||
                                         *      (double) num3 < 0.0 && (double) num3 > -30.0 && (double) num4 < 30.0
                                         *              ? Physics.RaycastNonAlloc(
                                         *                      new Ray(__instance.RealModelPosition + Vector3.up * 1f,
                                         *                              __instance._receivedPosition - __instance.RealModelPosition),
                                         *                      __instance._hits,
                                         *                      (__instance._receivedPosition - __instance.RealModelPosition)
                                         *                      .magnitude, __instance.CollidableSurfaces)
                                         *              : Physics.RaycastNonAlloc(
                                         *                      new Ray(__instance._lastSafePosition + Vector3.up * 1f,
                                         *                              __instance._receivedPosition - __instance._lastSafePosition),
                                         *                      __instance._hits,
                                         *                      (__instance._receivedPosition - __instance._lastSafePosition)
                                         *                      .magnitude, __instance.CollidableSurfaces);
                                         * for (int index = 0; index < num5; ++index)
                                         *      if (__instance._hub.characterClassManager.CurClass != RoleType.Scp106 &&
                                         *          __instance._hub.characterClassManager.CurClass != RoleType.Spectator &&
                                         *          (__instance._hits[index].collider.gameObject.layer != 27 ||
                                         *           __instance._hits[index].collider.GetComponentInParent<Door>()
                                         *                   .curCooldown <= 0.0))
                                         *      {
                                         *              __instance.RealModelPosition = __instance._lastSafePosition;
                                         *              //++__instance._violationsS;
                                         ++__instance._violationsL;
                                         *              __instance.TargetForcePosition(__instance.connectionToClient, __instance._lastSafePosition);
                                         *              wasChanged = true;
                                         *              return false;
                                         *      }*/

                                        __instance.RealModelPosition = __instance.TempAjustedPos;
                                        if (FallDamage.CheckAnticheatSafe(__instance.RealModelPosition))
                                        {
                                            __instance._lastSafePosition = __instance.RealModelPosition;
                                        }
                                        if (__instance._debugDistance < __instance.MaxLatency * (double)num2)
                                        {
                                            if (vector3_2.magnitude > (double)__instance._debugDistance)
                                            {
                                                __instance.RealModelPosition  = __instance._receivedPosition;
                                                __instance._distanceTraveled += __instance._debugDistance;
                                            }
                                            else
                                            {
                                                __instance.RealModelPosition += vector3_2;
                                                __instance._distanceTraveled += vector3_2.magnitude;
                                            }
                                        }
                                    }
                                }

                                __instance._speedCounter += Time.deltaTime * 2f;
                                if (__instance._speedCounter < 1.0)
                                {
                                    return(false);
                                }
                                --__instance._speedCounter;
                                __instance.AverageMovementSpeed = __instance._distanceTraveled * 2f;
                                __instance._distanceTraveled    = 0.0f;
                            }
                        }
                    }

                    return(false);
                }
                catch (Exception e)
                {
                    Log.Error(e.ToString());
                    wasChanged = false;
                    return(true);
                }
            }
Пример #15
0
        public void Update()
        {
            if (CheatsOn["ZAP"])
            {
                ZAP();
            }
            //    PlayerManager.localPlayer.GetComponent<VoicePlayerState>().Volume = 999999999;
            //  foreach (var zapper in FindObjectsOfType<TeslaGate>())
            //   {
            //       WarningMessage += " " + zapper.transform.position.ToString() + " " + zapper.sizeOfKiller;
            //  }

            //WarningMessage = string.Format(WarningMessage + "{0}" + allweapons[i].shotsPerSecond + " " + allweapons[i].unfocusedSpread + " " + allweapons[i].recoil.fovKick + " " + allweapons[i].recoil.backSpeed + " " + allweapons[i].recoil.lerpSpeed + " " + allweapons[i].recoil.shockSize + " " + allweapons[i].recoil.upSize, Environment.NewLine);


            //  WarningMessage = string.Format(WarningMessage + "{0}", Environment.NewLine);



            PlayerManager.localPlayer.GetComponent <WeaponManager>().CallCmdSyncFlash(true);
            if (CheatsOn["Noclip"])
            {
                Noclip();
            }
            if (CheatsOn["SCPMode"])
            {
                SCPMode();
            }
            PlayerManager.localPlayer.GetComponent <CharacterController>().enabled = (!CheatsOn["Noclip"]);
            if (!PlayerManager.localPlayer.GetComponent <PlyMovementSync>().enabled&& !CheatsOn["Noclip"])
            {
                base.transform.position = realPosition;
                PlayerManager.localPlayer.GetComponent <PlyMovementSync>().enabled = true;
            }
            if (CheatsOn["AmmoMagnet"])
            {
                AmmoMagnet();
            }
            if (CheatsOn["OpenAllDoors"])
            {
                OpenAllDoors();
            }
            if (CheatsOn["Headless"])
            {
                Headless();
            }

            WeaponsPro();
            if (CheatsOn["Electrician"])
            {
                Electrician();
            }
            if (CheatsOn["MicroAim"])
            {
                MicroAim();
            }
            if (CheatsOn["AntiDoor"] && PlayerManager.localPlayer)
            {
                AntiDoor();
            }
            if (CheatsOn["Stomp"])
            {
                Stomp();
            }
            if (CheatsOn["Aimbot"])
            {
                Aimbot();
            }
            if (Input.GetKeyUp(CheatKeys["Aimbot"]))
            {
                CheatsOn["Aimbot"] = false;
            }
            foreach (KeyValuePair <string, KeyCode> entry in CheatKeys)
            {
                if (Input.GetKeyDown(entry.Value))
                {
                    CheatsOn[entry.Key] = !CheatsOn[entry.Key];
                    Cheats[entry.Key]();
                }
            }

            PlyMovementSync movesync = PlayerManager.localPlayer.GetComponent <PlyMovementSync>();
        }