forked from deadshoott/NoNameCheat
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMain.cs
345 lines (298 loc) · 13.4 KB
/
Main.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using EFT;
using System.IO;
using System.Runtime.InteropServices;
using EFT.Interactive;
// Released by TheWWorld on UnknowCheats
// I think the godmode cause my ban or maybe i was reported for for weird killings
namespace Absolutly
{
public class Abso : MonoBehaviour
{
public Abso() { }
private GameObject GameObjectHolder;
private IEnumerable<Player> _ply;
private IEnumerable<ExfiltrationPoint> _extractPoints;
private float _plyNextUpdateTime;
private float _evaNextUpdateTime;
protected float _infoUpdateInterval = 5f; // You can reduce this value for fastest update esp but can cause lag
private bool _isInfoMenuActive;
private bool _showPlayersInfo;
private bool _showExtractInfo;
private bool _godMode;
private float _maxVueDistance = 1200f; // View Distance (you can change it on overlay by pressing F11 and modify the red value)
public void Load()
{
GameObjectHolder = new GameObject();
GameObjectHolder.AddComponent<Abso>();
DontDestroyOnLoad(GameObjectHolder);
}
public void Unload()
{
Destroy(GameObjectHolder);
Destroy(this);
}
private void Update()
{
if (Input.GetKeyDown(KeyCode.F12))
{
Unload();
}
if (Input.GetKeyDown(KeyCode.F11))
{
_isInfoMenuActive = !_isInfoMenuActive;
}
if (_godMode)
{
GodMode();
}
}
private void OnGUI()
{
if (_isInfoMenuActive)
{
DrawInfoMenu();
}
if (_showPlayersInfo && Time.time >= _plyNextUpdateTime)
{
_ply = FindObjectsOfType<Player>();
_plyNextUpdateTime = Time.time + _infoUpdateInterval;
}
if (_showPlayersInfo)
{
DrawPlayers();
}
if (_showExtractInfo && Time.time >= _evaNextUpdateTime)
{
_extractPoints = FindObjectsOfType<ExfiltrationPoint>();
_evaNextUpdateTime = Time.time + _infoUpdateInterval;
}
if (_showExtractInfo)
{
DrawExtractInfo();
}
}
private void GodMode()
{
foreach (var player in _ply)
{
if (player != null)
{
// Don't forget to change or GodMode not work
if (player.Profile.AccountId == "YOUR_ACCOUNT_ID")
{
player.Physical.Sprinting.RestoreRate = 7.0f;
player.Physical.Sprinting.DrainRate = 3.5f;
player.Skills.StrengthBuffSprintSpeedInc.Value = 2.8f;
player.Skills.StrengthBuffMeleeCrits.Value = true;
player.Skills.StrengthBuffMeleePowerInc.Value = 4f;
player.Skills.StrengthBuffThrowDistanceInc.Value = 5f;
player.Skills.MagDrillsLoadSpeed.Value = 2f;
player.Skills.MagDrillsUnloadSpeed.Value = 2f;
player.Weapon.Template.isFastReload = true;
player.ProceduralWeaponAnimation.Shootingg.Intensity = 0;
player.ProceduralWeaponAnimation.Shootingg.RecoilStrengthXy = new Vector2(0, 0);
player.ProceduralWeaponAnimation.Shootingg.RecoilStrengthZ = new Vector2(0, 0);
}
}
}
}
private void DrawExtractInfo()
{
try
{
foreach (var point in _extractPoints)
{
float distanceToObject = Vector3.Distance(Camera.main.transform.position, point.transform.position);
var exfilContainerBoundingVector = new Vector3(
Camera.main.WorldToScreenPoint(point.transform.position).x,
Camera.main.WorldToScreenPoint(point.transform.position).y,
Camera.main.WorldToScreenPoint(point.transform.position).z);
if (exfilContainerBoundingVector.z > 0.01)
{
GUI.color = Color.green;
int distance = (int)distanceToObject;
String exfilName = point.name;
string boxText = $"{exfilName} - {distance}m";
GUI.Label(new Rect(exfilContainerBoundingVector.x - 50f, (float)Screen.height - exfilContainerBoundingVector.y, 100f, 50f), boxText);
}
}
}
catch (Exception ex)
{
File.WriteAllText("evasion.txt", ex.ToString());
}
}
private void DrawPlayers()
{
try
{
foreach (var player in _ply)
{
float distanceToObject = Vector3.Distance(Camera.main.transform.position, player.Transform.position);
var playerBoundingVector = new Vector3(
Camera.main.WorldToScreenPoint(player.Transform.position).x,
Camera.main.WorldToScreenPoint(player.Transform.position).y,
Camera.main.WorldToScreenPoint(player.Transform.position).z);
if (distanceToObject <= _maxVueDistance && playerBoundingVector.z > 0.01)
{
var playerHeadVector = new Vector3(
Camera.main.WorldToScreenPoint(player.PlayerBones.Head.position).x,
Camera.main.WorldToScreenPoint(player.PlayerBones.Head.position).y,
Camera.main.WorldToScreenPoint(player.PlayerBones.Head.position).z);
float boxXOffset = Camera.main.WorldToScreenPoint(player.Transform.position).x;
float boxYOffset = Camera.main.WorldToScreenPoint(player.PlayerBones.Head.position).y + 10f;
float boxHeight = Math.Abs(Camera.main.WorldToScreenPoint(player.PlayerBones.Head.position).y - Camera.main.WorldToScreenPoint(player.Transform.position).y) + 10f;
float boxWidth = boxHeight * 0.65f;
var playerColor = GetPlayerColor(player.Side);
var isAi = player.Profile.Info.RegistrationDate <= 0;
var deadcolor = player.HealthController.IsAlive ? playerColor : Color.gray;
GUI.color = deadcolor;
Vlcrpc.DrawBox(boxXOffset - boxWidth / 2f, (float)Screen.height - boxYOffset, boxWidth, boxHeight, deadcolor);
Vlcrpc.DrawLine(new Vector2(playerHeadVector.x - 2f, (float)Screen.height - playerHeadVector.y), new Vector2(playerHeadVector.x + 2f, (float)Screen.height - playerHeadVector.y), deadcolor);
Vlcrpc.DrawLine(new Vector2(playerHeadVector.x, (float)Screen.height - playerHeadVector.y - 2f), new Vector2(playerHeadVector.x, (float)Screen.height - playerHeadVector.y + 2f), deadcolor);
var playerName = isAi ? "AI" : player.Profile.Info.Nickname;
float playerHealth = 0f; //ToDo need another way player.HealthController.SummaryHealth.CurrentValue / 435f * 100f;
string playerDisplayName = player.HealthController.IsAlive ? playerName : playerName + " (Dead)";
string playerText = $"[{(int)playerHealth}%] {playerDisplayName} [{(int)distanceToObject}m]";
var playerTextVector = GUI.skin.GetStyle(playerText).CalcSize(new GUIContent(playerText));
GUI.Label(new Rect(playerBoundingVector.x - playerTextVector.x / 2f, (float)Screen.height - boxYOffset - 20f, 300f, 50f), playerText);
/*
You can enable it for show player weapon, but cause ESP Disapear bug and i don't know why, maybe take too many time
if (player.Profile.Health.IsAlive)
{
CurrentWeaponIDtoName($"{player.Weapon}");
string playerWeaponText = CurrentWeaponIDtoName($"{player.Weapon}");
var playerWeaponTextVector = GUI.skin.GetStyle(playerWeaponText).CalcSize(new GUIContent(playerWeaponText));
GUI.Label(new Rect(playerBoundingVector.x - playerWeaponTextVector.x / 2f, (float)Screen.height - boxYOffset - 28f, 320f, 50f), playerWeaponText);
}
*/
}
}
}
catch (Exception ex)
{
File.WriteAllText("plyzlog.txt", ex.ToString());
}
}
private string CurrentWeaponIDtoName(string id)
{
if (id.Contains("p226"))
return "P226R";
else if (id.Contains("mp443"))
return "MP443";
else if (id.Contains("aks74"))
return "AKS-74";
else if (id.Contains("_mr133_"))
return "MR-133";
else if (id.Contains("_mr153_"))
return "MR-153";
else if (id.Contains("saiga12"))
return "Saig.12";
else if (id.Contains("akm"))
return "AKM";
else if (id.Contains("ak74n"))
return "AK-7N";
else if (id.Contains("ak74m"))
return "AK-7M";
else if (id.Contains("mr43e"))
return "MR-43E";
else if (id.Contains("model_870"))
return "M870";
else if (id.Contains("mosin"))
return "Mosin";
else if (id.Contains("_zarya_"))
return "Zarya";
else if (id.Contains("_pb_"))
return "PB9x18PM";
else if (id.Contains("_izhmeh_pm_"))
return "Makarov";
else if (id.Contains("saiga_9"))
return "SaigaPM";
else if (id.Contains("_tt_"))
return "TT";
else if (id.Contains("pp-9"))
return "pp91";
else if (id.Contains("vepr"))
return "VEPR";
else if (id.Contains("glock"))
return "Glock";
else if (id.Contains("sks"))
return "SKS";
else if (id.Contains("akms"))
return "AKMS";
else if (id.Contains("akm_vpo"))
return "AKM VPO";
else if (id.Contains("vepr_km"))
return "VEPR KM VPO";
else if (id.Contains("mp5"))
return "MP5";
else if (id.Contains("mp7a1"))
return "MP7";
else if (id.Contains("_mpx_"))
return "MPX";
else if (id.Contains("molot_aps"))
return "Molot";
else if (id.Contains("m1a"))
return "m1a";
else if (id.Contains("sa58"))
return "SA58";
else if (id.Contains("ak101"))
return "AK101";
else if (id.Contains("ak102"))
return "AK102";
else if (id.Contains("ak103"))
return "AK103";
else if (id.Contains("ak104"))
return "AK104";
else if (id.Contains("ak105"))
return "AK105";
else if (id.Contains("m4a1"))
return "M4A1";
else if (id.Contains("sv-98"))
return "SV-98";
else if (id.Contains("_val_"))
return "ASVAL";
else if (id.Contains("_vss_"))
return "VSS";
else if (id.Contains("rsass"))
return "RSASS";
else if (id.Contains("dvl-10"))
return "DVL10";
else
return id;
}
private Color GetPlayerColor(EPlayerSide side)
{
switch (side)
{
case EPlayerSide.Bear:
return Color.red;
case EPlayerSide.Usec:
return Color.blue;
case EPlayerSide.Savage:
return Color.white;
default:
return Color.white;
}
}
private void DrawInfoMenu()
{
GUI.color = Color.black;
GUI.Box(new Rect(100f, 100f, 190f, 190f), "");
GUI.color = Color.white;
GUI.Label(new Rect(180f, 110f, 150f, 20f), "Options");
_showPlayersInfo = GUI.Toggle(new Rect(110f, 140f, 120f, 20f), _showPlayersInfo, "Joueurs");
_showExtractInfo = GUI.Toggle(new Rect(110f, 160f, 120f, 20f), _showExtractInfo, "Evasion");
_godMode = GUI.Toggle(new Rect(110f, 180f, 120f, 20f), _godMode, "God mode");
_maxVueDistance = float.Parse(GUI.TextField(new Rect(110f, 200f, 120f, 20f), _maxVueDistance.ToString(), 10, "Distance"));
}
private double GetDistance(double x1, double y1, double x2, double y2)
{
return Math.Sqrt(Math.Pow(x2 - x1, 2.0) + Math.Pow(y2 - y1, 2.0));
}
}
}