diff --git a/DevourClient/DevourClient.csproj b/DevourClient/DevourClient.csproj index ae616ae..ffc73e4 100644 --- a/DevourClient/DevourClient.csproj +++ b/DevourClient/DevourClient.csproj @@ -95,6 +95,7 @@ + diff --git a/DevourClient/Helpers/Render.cs b/DevourClient/Helpers/Render.cs new file mode 100644 index 0000000..624ad75 --- /dev/null +++ b/DevourClient/Helpers/Render.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace DevourClient.Render +{ + public class Render + { + public static GUIStyle StringStyle { get; set; } = new GUIStyle(GUI.skin.label); + + public static Color Color + { + get { return GUI.color; } + set { GUI.color = value; } + } + + public static void DrawString(Vector2 position, string label, bool centered = true) + { + var content = new GUIContent(label); + var size = StringStyle.CalcSize(content); + var upperLeft = centered ? position - size / 2f : position; + GUI.Label(new Rect(upperLeft, size), content); + } + + public static Texture2D lineTex; + public static void DrawLine(Vector2 pointA, Vector2 pointB, Color color, float width) + { + Matrix4x4 matrix = GUI.matrix; + if (!lineTex) + lineTex = new Texture2D(1, 1); + + Color color2 = GUI.color; + GUI.color = color; + float num = Vector3.Angle(pointB - pointA, Vector2.right); + + if (pointA.y > pointB.y) + num = -num; + + GUIUtility.ScaleAroundPivot(new Vector2((pointB - pointA).magnitude, width), new Vector2(pointA.x, pointA.y + 0.5f)); + GUIUtility.RotateAroundPivot(num, pointA); + GUI.DrawTexture(new Rect(pointA.x, pointA.y, 1f, 1f), lineTex); + GUI.matrix = matrix; + GUI.color = color2; + } + + public static void DrawBox(float x, float y, float w, float h, Color color, float thickness) + { + DrawLine(new Vector2(x, y), new Vector2(x + w, y), color, thickness); + DrawLine(new Vector2(x, y), new Vector2(x, y + h), color, thickness); + DrawLine(new Vector2(x + w, y), new Vector2(x + w, y + h), color, thickness); + DrawLine(new Vector2(x, y + h), new Vector2(x + w, y + h), color, thickness); + } + + public static void DrawBoxESP(Vector3 footpos, Vector3 headpos, Color color, string playername = "", bool snapline = false, bool esp = true) + { + float height = headpos.y - footpos.y; + float widthOffset = 2f; + float width = height / widthOffset; + + if (playername != "" && esp) + { + Render.DrawString(new Vector2((footpos.x - (width / 2)) + 25, (float)Screen.height - footpos.y - height), playername, false); + } + + //ESP BOX + if (esp) + { + Render.DrawBox(footpos.x - (width / 2), (float)Screen.height - footpos.y - height, width, height, color, 2f); + } + + //Snapline + if (snapline) + { + Render.DrawLine(new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)), new Vector2(footpos.x, (float)Screen.height - footpos.y), color, 2f); + } + } + } +} diff --git a/DevourClient/MelonMain.cs b/DevourClient/MelonMain.cs index d9f0902..fecdd40 100644 --- a/DevourClient/MelonMain.cs +++ b/DevourClient/MelonMain.cs @@ -9,17 +9,22 @@ namespace DevourClient { bool flashlight_toggle = false; bool flashlight_colorpick = false; + bool player_esp_colorpick = false; + bool azazel_esp_colorpick = false; bool level_70 = false; bool level_666 = false; bool change_server_name = false; bool change_steam_name = false; bool fly = false; float fly_speed = 5; - public bool _IsCarryingFirstAidOnLocalCharacter = false; public bool _IsAutoRespawn = false; public static bool exp_modifier = false; public static float exp = 1000f; - + bool player_esp = false; + bool player_snapline = false; + bool azazel_esp = false; + bool azazel_snapline = false; + bool item_esp = false; bool spam_message = false; public override void OnApplicationStart() @@ -99,6 +104,66 @@ namespace DevourClient public override void OnGUI() { + if (this.player_esp || this.player_snapline) + { + foreach (NolanBehaviour player in UnityEngine.Object.FindObjectsOfType() as UnhollowerBaseLib.Il2CppReferenceArray) + { + if (player != null) + { + + + Vector3 pivotPos = player.transform.position; //Pivot point NOT at the origin, at the center + Vector3 playerFootPos; playerFootPos.x = pivotPos.x; playerFootPos.z = pivotPos.z; playerFootPos.y = pivotPos.y - 2f; //At the feet + Vector3 playerHeadPos; playerHeadPos.x = pivotPos.x; playerHeadPos.z = pivotPos.z; playerHeadPos.y = pivotPos.y + 2f; //At the head + + if (Camera.main == null) + { + continue; + } + + Vector3 w2s_footpos = Camera.main.WorldToScreenPoint(playerFootPos); + Vector3 w2s_headpos = Camera.main.WorldToScreenPoint(playerHeadPos); + + if (w2s_footpos.z > 0f) + { + //string playername = player.field_Private_PhotonView_0.field_Private_ObjectPublicObInBoStBoHaStObInHaUnique_0.field_Private_String_0;//player.photonView._Controller_k__BackingField.NickName; + + if (player.entity.IsOwner) + { + continue; + } + + Render.Render.DrawBoxESP(w2s_footpos, w2s_headpos, Settings.Settings.player_esp_color, "", this.player_snapline, this.player_esp); + } + + } + } + } + + if (this.azazel_esp || this.azazel_snapline) + { + SurvivalAzazelBehaviour survivalAzazel = UnityEngine.Object.FindObjectOfType(); + if (survivalAzazel != null) + { + + + Vector3 pivotPos = survivalAzazel.transform.position; //Pivot point NOT at the origin, at the center + Vector3 playerFootPos; playerFootPos.x = pivotPos.x; playerFootPos.z = pivotPos.z; playerFootPos.y = pivotPos.y - 2f; //At the feet + Vector3 playerHeadPos; playerHeadPos.x = pivotPos.x; playerHeadPos.z = pivotPos.z; playerHeadPos.y = pivotPos.y + 2f; //At the head + + if (Camera.main != null) + { + Vector3 w2s_footpos = Camera.main.WorldToScreenPoint(playerFootPos); + Vector3 w2s_headpos = Camera.main.WorldToScreenPoint(playerHeadPos); + + if (w2s_footpos.z > 0f) + { + Render.Render.DrawBoxESP(w2s_footpos, w2s_headpos, Settings.Settings.azazel_esp_color, "Azazel", this.azazel_snapline, this.azazel_esp); + } + } + } + } + if (Settings.Settings.menu_enable) //Si on appuie sur INSERT { GUI.Label(new Rect(300, Settings.Settings.y, 100, 30), "Devour Client"); //Titre du menu @@ -111,12 +176,17 @@ namespace DevourClient this.fly = GUI.Toggle(new Rect(Settings.Settings.x + 200, Settings.Settings.y + 100, 150, 20), this.fly, "Fly"); //Checkbox fly this.fly_speed = GUI.HorizontalSlider(new Rect(Settings.Settings.x + 200, Settings.Settings.y + 130, 100, 10), this.fly_speed, 5f, 20f); //Slider for the fly speed GUI.Label(new Rect(Settings.Settings.x + 310, Settings.Settings.y + 125, 100, 30), this.fly_speed.ToString()); //Prints the value of the slider; - this._IsCarryingFirstAidOnLocalCharacter = GUI.Toggle(new Rect(Settings.Settings.x + 200, Settings.Settings.y + 190, 150, 20), this._IsCarryingFirstAidOnLocalCharacter, "IsCarryingFirstAid"); - this._IsAutoRespawn = GUI.Toggle(new Rect(Settings.Settings.x + 200, Settings.Settings.y + 220, 150, 20), this._IsAutoRespawn, "Auto-Respawn"); + this._IsAutoRespawn = GUI.Toggle(new Rect(Settings.Settings.x + 200, Settings.Settings.y + 190, 150, 20), this._IsAutoRespawn, "Auto-Respawn"); - Load.exp_modifier = GUI.Toggle(new Rect(Settings.Settings.x + 350, Settings.Settings.y + 40, 150, 20), Load.exp_modifier, "Exp Modifier"); - Load.exp = GUI.HorizontalSlider(new Rect(Settings.Settings.x + 350, Settings.Settings.y + 70, 100, 10), Load.exp, 1000f, 50000f); //Slider for the fly speed - GUI.Label(new Rect(Settings.Settings.x + 410, Settings.Settings.y + 75, 100, 30), Load.exp.ToString()); //Prints the value of the slider; + Load.exp_modifier = GUI.Toggle(new Rect(Settings.Settings.x + 390, Settings.Settings.y + 40, 150, 20), Load.exp_modifier, "Exp Modifier"); + Load.exp = GUI.HorizontalSlider(new Rect(Settings.Settings.x + 390, Settings.Settings.y + 70, 100, 10), Load.exp, 1000f, 3000f); //Slider for the fly speed + GUI.Label(new Rect(Settings.Settings.x + 500, Settings.Settings.y + 65, 100, 30), Load.exp.ToString()); //Prints the value of the slider; + + this.player_esp = GUI.Toggle(new Rect(Settings.Settings.x + 390, Settings.Settings.y + 100, 150, 20), this.player_esp, "Player ESP"); + this.player_snapline = GUI.Toggle(new Rect(Settings.Settings.x + 390, Settings.Settings.y + 130, 150, 20), this.player_snapline, "Player Snapline"); + + this.azazel_esp = GUI.Toggle(new Rect(Settings.Settings.x + 390, Settings.Settings.y + 190, 150, 20), this.azazel_esp, "Azazel ESP"); + this.azazel_snapline = GUI.Toggle(new Rect(Settings.Settings.x + 390, Settings.Settings.y + 220, 150, 20), this.azazel_snapline, "Azazel Snapline"); if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 40, 150, 20), "Unlock Achievements")) { @@ -134,6 +204,32 @@ namespace DevourClient MelonLogger.Msg("Doors Unlocked !"); } + if (GUI.Button(new Rect(Settings.Settings.x + 390, Settings.Settings.y + 250, 150, 20), "Azazel ESP Color")) + { + azazel_esp_colorpick = !azazel_esp_colorpick; + MelonLogger.Msg("azazel_esp_colorpick color picker : " + azazel_esp_colorpick.ToString()); + + } + + if (azazel_esp_colorpick) + { + Color azazel_esp_colorpick_color_input = DevourClient.Helpers.GUIHelper.ColorPick("Azazel ESP Color", Settings.Settings.azazel_esp_color); + Settings.Settings.azazel_esp_color = azazel_esp_colorpick_color_input; + } + + if (GUI.Button(new Rect(Settings.Settings.x + 390, Settings.Settings.y + 160, 150, 20), "Player ESP Color")) + { + player_esp_colorpick = !player_esp_colorpick; + MelonLogger.Msg("player_esp_colorpick color picker : " + player_esp_colorpick.ToString()); + + } + + if (player_esp_colorpick) + { + Color player_esp_colorpick_color_input = DevourClient.Helpers.GUIHelper.ColorPick("Player ESP Color", Settings.Settings.player_esp_color); + Settings.Settings.player_esp_color = player_esp_colorpick_color_input; + } + if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 130, 150, 20), "Flashlight Color")) { flashlight_colorpick = !flashlight_colorpick; diff --git a/DevourClient/Settings/Settings.cs b/DevourClient/Settings/Settings.cs index e75d13a..121ba52 100644 --- a/DevourClient/Settings/Settings.cs +++ b/DevourClient/Settings/Settings.cs @@ -10,6 +10,8 @@ namespace DevourClient.Settings public static float x = 0; public static float y = 0; public static Color flashlight_color = new Color(1.00f, 1.00f, 1.00f, 1); + public static Color player_esp_color = new Color(0.00f, 1.00f, 0.00f, 1); + public static Color azazel_esp_color = new Color(1.00f, 0.00f, 0.00f, 1); public static float speed = 1f; public const string message_to_spam = "Deez Nutz"; } diff --git a/README.md b/README.md index 8cbc1fc..f1dfb20 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,10 @@ Everything about spoofing ehre (steam name, server name, level...) will persist * Random Sound (make your character play a random acting sound) * Always carrying a medkit * Change your exp at the end of the game, changing it is permanant ! +* Player ESP (with a home made color picker) +* Player snaplines (with a home made color picker) +* Azazel ESP (with a home made color picker) +* Azazel snapline (with a home made color picker) ## Installation In order to get all of this working you need to generate the DevourClient.dll file by building the source code.