PostRust Source Code Directory

Posts 1–12 of 12 · Page 1 of 1
Rust Source Code Directory
Flyhack.
Credits: Luciz
Code:
        if (FlyHack)
        {
            if (Input.GetKey(KeyCode.Space))
                Controllable.localPlayerControllable.ccmotor.movement.velocity.y = SpeedHackSpeed;
            else
                Controllable.localPlayerControllable.ccmotor.movement.velocity.y = 0f;

            if (Input.GetKey(KeyCode.LeftControl))
                Controllable.localPlayerControllable.ccmotor.movement.velocity.y = -SpeedHackSpeed;
        }
Speedhack.
Credits: Luciz
Code:
        if (SpeedHack)
        {
            Controllable.localPlayerControllable.ccmotor.movement.acceleration = new Vector3(SpeedHackSpeed, SpeedHackSpeed, SpeedHackSpeed);

            Controllable.localPlayerControllable.ccmotor.movement.setup.maxForwardSpeed = SpeedHackSpeed;
            Controllable.localPlayerControllable.ccmotor.movement.setup.maxBackwardsSpeed = SpeedHackSpeed;
            Controllable.localPlayerControllable.ccmotor.movement.setup.maxSidewaysSpeed = SpeedHackSpeed;
        }
        else
        {
            Controllable.localPlayerControllable.ccmotor.movement.setup.maxForwardSpeed = 4;
            Controllable.localPlayerControllable.ccmotor.movement.setup.maxBackwardsSpeed = 3;
            Controllable.localPlayerControllable.ccmotor.movement.setup.maxSidewaysSpeed = 4;
        }
Hidewalls.
Credits: KingAemon
Code:
        if (HideWalls)
        {
            foreach (StructureComponent obj in UnityEngine.Object.FindObjectsOfType(typeof(StructureComponent)))
            {
                if (obj.type == StructureComponent.StructureComponentType.Wall ||
                    obj.type == StructureComponent.StructureComponentType.Doorway ||
                    obj.type == StructureComponent.StructureComponentType.Ceiling)
                {
                    if (obj.gameObject != null && obj.gameObject.activeInHierarchy)
                    {
                        obj.gameObject.SetActive(false);
                    }
                }
            }
        }
Resource ESP.
Credits: GAFO666 & Luciz
Code:
        if (ResourceESP)
        {
            UnityEngine.Object[] gObjects;
            gObjects = UnityEngine.Object.FindObjectsOfType(typeof(ResourceObject));
            Camera mainCam = Camera.main;

            foreach (UnityEngine.Object obj2 in gObjects)
            {
                if (obj2 != null)
                {
                    ResourceObject resource = (ResourceObject)obj2;
                    if (resource != null)
                    {
                        float tempDistance = Vector3.Distance(mainCam.transform.position, resource.transform.position);
                        Vector3 Pos = new Vector3(mainCam.WorldToScreenPoint(resource.transform.position).x, mainCam.WorldToScreenPoint(resource.transform.position).y, mainCam.WorldToScreenPoint(resource.transform.position).z);
                        int Distance = (int)tempDistance;
                        if (Pos.z > 0.01f)
                        {
                            GUI.color = Color.yellow;
                            GUI.Label(new Rect((Pos.x), (Screen.height - Pos.y), 100F, 50F), ("" + resource.name + " [" + Distance + "]"));
                        }
                    }
                }
            }
        }
Player & Animal ESP
Credits: GAFO666 & Luciz
Code:
        if (PlayerESP || AnimalESP)
        {
            UnityEngine.Object[] gObjects;
            gObjects = UnityEngine.Object.FindObjectsOfType(typeof(Character));
            Camera mainCam = Camera.main;
            int maxDistance = 400;
            
            foreach (UnityEngine.Object obj2 in gObjects)
            {
                if (obj2 != null)
                {
                    Character character = (Character)obj2;
                    if(AimBot)
                    {
                        Transform myTransform = Controllable.localPlayerControllable.transform;
                        if (myTransform.position != character.transform.position)
                        {
                            myTransform****tation = Quaternion.Slerp(myTransform****tation, Quaternion.LookRotation(character.transform.position - myTransform.position), 10 * Time.deltaTime);
                            myTransform.position += myTransform.forward * 0.1f * Time.deltaTime;
                        }
                    }

                    if (character != null)
                    {                 
                        float tempDistance = Vector3.Distance(mainCam.transform.position, character.transform.position);
                        Vector3 Pos = new Vector3(mainCam.WorldToScreenPoint(character.transform.position).x, mainCam.WorldToScreenPoint(character.transform.position).y, mainCam.WorldToScreenPoint(character.transform.position).z);
                        if (tempDistance > maxDistance)
                            continue;

                        int Distance = (int)tempDistance;
                        if (PlayerESP && character.npcName == "soldier")
                        {
                            if (Pos.z > 0.01f)
                            {
                                GUI.color = Color.green;
                                GUI.Label(new Rect((Pos.x - 50F), (Screen.height - Pos.y), 100F, 50F), ("" + character.playerClient.userName + " [" + Distance + "]"));
                            }
                        }
                        if (AnimalESP && character.npcName != "soldier")
                        {
                            if (Pos.z > 0.01f)
                            {
                                GUI.color = Color.blue;
                                GUI.Label(new Rect((Pos.x - 50F), (Screen.height - Pos.y), 100F, 50F), ("" + character.name + " [" + Distance + "]"));
                            }
                        }
                    }
                }
            }
        }
may be a couple of photos and the user manual at least as well as where it is inserted?
Quote Originally Posted by spixels793 View Post
may be a couple of photos and the user manual at least as well as where it is inserted?
This is a part of code that's used to code hacks. It's of no use to the average hack user.
What classes are used for this? , The standard UnityEngine Classes or the ones for Rust specifically?
If for Rust, could you share the classes too?

Thanks for this post!
Quote Originally Posted by steven1578 View Post
What classes are used for this? , The standard UnityEngine Classes or the ones for Rust specifically?
If for Rust, could you share the classes too?

Thanks for this post!
Both.
//tooshort
Quote Originally Posted by gtaplayer2 View Post
Both.
//tooshort
Does the aimbot work? In the PlayerESP/AnimalESP source..?
I know what to fill in for the **** so thats not the problem
Quote Originally Posted by steven1578 View Post
Does the aimbot work? In the PlayerESP/AnimalESP source..?
I know what to fill in for the **** so thats not the problem
Whops, thats just something I was testing out, it's not working.
Quote Originally Posted by gtaplayer2 View Post
Whops, thats just something I was testing out, it's not working.
I see haha, already tested it. Buggy as hell
Perhaps use an aimbot from another game?
Quote Originally Posted by steven1578 View Post
I see haha, already tested it. Buggy as hell
Perhaps use an aimbot from another game?
I decompiled someones aimbot already, just been to lazy to add it.
plEAS HELP how DO i RuN?????
is safe, is really undetectable by vac?
Quote Originally Posted by gtaplayer2 View Post
Flyhack.
Credits: Luciz
Code:
        if (FlyHack)
        {
            if (Input.GetKey(KeyCode.Space))
                Controllable.localPlayerControllable.ccmotor.movement.velocity.y = SpeedHackSpeed;
            else
                Controllable.localPlayerControllable.ccmotor.movement.velocity.y = 0f;

            if (Input.GetKey(KeyCode.LeftControl))
                Controllable.localPlayerControllable.ccmotor.movement.velocity.y = -SpeedHackSpeed;
        }
Speedhack.
Credits: Luciz
Code:
        if (SpeedHack)
        {
            Controllable.localPlayerControllable.ccmotor.movement.acceleration = new Vector3(SpeedHackSpeed, SpeedHackSpeed, SpeedHackSpeed);

            Controllable.localPlayerControllable.ccmotor.movement.setup.maxForwardSpeed = SpeedHackSpeed;
            Controllable.localPlayerControllable.ccmotor.movement.setup.maxBackwardsSpeed = SpeedHackSpeed;
            Controllable.localPlayerControllable.ccmotor.movement.setup.maxSidewaysSpeed = SpeedHackSpeed;
        }
        else
        {
            Controllable.localPlayerControllable.ccmotor.movement.setup.maxForwardSpeed = 4;
            Controllable.localPlayerControllable.ccmotor.movement.setup.maxBackwardsSpeed = 3;
            Controllable.localPlayerControllable.ccmotor.movement.setup.maxSidewaysSpeed = 4;
        }
Hidewalls.
Credits: KingAemon
Code:
        if (HideWalls)
        {
            foreach (StructureComponent obj in UnityEngine.Object.FindObjectsOfType(typeof(StructureComponent)))
            {
                if (obj.type == StructureComponent.StructureComponentType.Wall ||
                    obj.type == StructureComponent.StructureComponentType.Doorway ||
                    obj.type == StructureComponent.StructureComponentType.Ceiling)
                {
                    if (obj.gameObject != null && obj.gameObject.activeInHierarchy)
                    {
                        obj.gameObject.SetActive(false);
                    }
                }
            }
        }
Resource ESP.
Credits: GAFO666 & Luciz
Code:
        if (ResourceESP)
        {
            UnityEngine.Object[] gObjects;
            gObjects = UnityEngine.Object.FindObjectsOfType(typeof(ResourceObject));
            Camera mainCam = Camera.main;

            foreach (UnityEngine.Object obj2 in gObjects)
            {
                if (obj2 != null)
                {
                    ResourceObject resource = (ResourceObject)obj2;
                    if (resource != null)
                    {
                        float tempDistance = Vector3.Distance(mainCam.transform.position, resource.transform.position);
                        Vector3 Pos = new Vector3(mainCam.WorldToScreenPoint(resource.transform.position).x, mainCam.WorldToScreenPoint(resource.transform.position).y, mainCam.WorldToScreenPoint(resource.transform.position).z);
                        int Distance = (int)tempDistance;
                        if (Pos.z > 0.01f)
                        {
                            GUI.color = Color.yellow;
                            GUI.Label(new Rect((Pos.x), (Screen.height - Pos.y), 100F, 50F), ("" + resource.name + " [" + Distance + "]"));
                        }
                    }
                }
            }
        }
Player & Animal ESP
Credits: GAFO666 & Luciz
Code:
        if (PlayerESP || AnimalESP)
        {
            UnityEngine.Object[] gObjects;
            gObjects = UnityEngine.Object.FindObjectsOfType(typeof(Character));
            Camera mainCam = Camera.main;
            int maxDistance = 400;
            
            foreach (UnityEngine.Object obj2 in gObjects)
            {
                if (obj2 != null)
                {
                    Character character = (Character)obj2;
                    if(AimBot)
                    {
                        Transform myTransform = Controllable.localPlayerControllable.transform;
                        if (myTransform.position != character.transform.position)
                        {
                            myTransform****tation = Quaternion.Slerp(myTransform****tation, Quaternion.LookRotation(character.transform.position - myTransform.position), 10 * Time.deltaTime);
                            myTransform.position += myTransform.forward * 0.1f * Time.deltaTime;
                        }
                    }

                    if (character != null)
                    {                 
                        float tempDistance = Vector3.Distance(mainCam.transform.position, character.transform.position);
                        Vector3 Pos = new Vector3(mainCam.WorldToScreenPoint(character.transform.position).x, mainCam.WorldToScreenPoint(character.transform.position).y, mainCam.WorldToScreenPoint(character.transform.position).z);
                        if (tempDistance > maxDistance)
                            continue;

                        int Distance = (int)tempDistance;
                        if (PlayerESP && character.npcName == "soldier")
                        {
                            if (Pos.z > 0.01f)
                            {
                                GUI.color = Color.green;
                                GUI.Label(new Rect((Pos.x - 50F), (Screen.height - Pos.y), 100F, 50F), ("" + character.playerClient.userName + " [" + Distance + "]"));
                            }
                        }
                        if (AnimalESP && character.npcName != "soldier")
                        {
                            if (Pos.z > 0.01f)
                            {
                                GUI.color = Color.blue;
                                GUI.Label(new Rect((Pos.x - 50F), (Screen.height - Pos.y), 100F, 50F), ("" + character.name + " [" + Distance + "]"));
                            }
                        }
                    }
                }
            }
        }




How to use this code
Posts 1–12 of 12 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?