/
Hacks.cs
199 lines (177 loc) · 8.32 KB
/
Hacks.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
using System;
using System.Threading;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
using Photon.Pun;
using SmartFPController;
using In_Silence.game_objects;
namespace In_Silence
{
class Hacks : MonoBehaviour
{
public static Camera MainCamera = null;
public static float Timer = 0f;
public static List<Item> eItem = new List<Item>();
public static List<ActivableItem> eActivableItem = new List<ActivableItem>();
public static List<ArmoryDoor> eArmoryDoor = new List<ArmoryDoor>();
public static List<BearTrap> eBearTrap = new List<BearTrap>();
public static List<Crow> eCrow = new List<Crow>();
public static List<CrowFlock> eCrowFlock = new List<CrowFlock>();
public static List<DeadBodyController> eDeadBodies = new List<DeadBodyController>();
public static List<DogHouse> eDogHouse = new List<DogHouse>();
public static List<GroundItem> eGroundItem = new List<GroundItem>();
public static List<JackInBox> eJackInBox = new List<JackInBox>();
public static List<SurvivorNetworking> ePlayableCharacter = new List<SurvivorNetworking>();
public static List<PuzzleButton> ePuzzleButton = new List<PuzzleButton>();
public static List<PuzzleCabin> ePuzzleCabin = new List<PuzzleCabin>();
public static List<PuzzleKey> ePuzzleKey = new List<PuzzleKey>();
public static List<PuzzleTablet> ePuzzleTablet = new List<PuzzleTablet>();
public static List<Radio> eRadio = new List<Radio>();
public static List<RabbitController> eRabbitController = new List<RabbitController>();
public static List<Rifle> eRifle = new List<Rifle>();
public static List<RifleItem> eRifleItem = new List<RifleItem>();
public static List<Rocket> eRocket = new List<Rocket>();
public static List<Stone> eStone = new List<Stone>();
public static List<StoneThrower> eStoneThrower = new List<StoneThrower>();
public static List<Telephone> eTelephone = new List<Telephone>();
public static List<Toy> eToy = new List<Toy>();
public static List<TruckPart> eTruckPart = new List<TruckPart>();
public static List<Witch> eWitch = new List<Witch>();
public static List<Television> eTelevision = new List<Television>();
public static List<CreatureAIManager> eCreature = new List<CreatureAIManager>();
public static List<PlayableCharacter> eBodyPlayer = new List<PlayableCharacter>();
public static SurvivorNetworking localPlayer = null;
private static bool runEndOfGame = false;
public static string dbg = "";
public static Vector3 newFlyPos;
public static float FlyPosY = 1f;
public void Start()
{
}
public void Update()
{
if (Input.GetKeyDown(KeyCode.End)) // Kill hacks on "End" key pressed
{
Loader.unload();
}
if (Input.GetKeyDown(KeyCode.Insert)) // Kill hacks on "End" key pressed
{
modules.UI.main_menu = !modules.UI.main_menu;
}
if (Input.GetKey(KeyCode.Mouse1) && modules.UI.t_Aimbot)
{
modules.Aimbot.AimAssist();
}
if (Input.GetKeyDown(KeyCode.Keypad1))
{
PhotonNetwork.SetMasterClient(PhotonNetwork.LocalPlayer);
}
if (Input.GetKeyDown(KeyCode.Keypad2))
{
//localPlayer.photonView.Owner.NickName = "";
localPlayer.guideCircle.enabled = true;
}
if (Input.GetKeyDown(KeyCode.Keypad3))
{
localPlayer.photonView.Owner.NickName = "GoodNoobTube";
}
if (Input.GetKeyDown(KeyCode.Keypad4))
{
PhotonNetwork.CurrentRoom.ClearExpectedUsers();
}
if (Input.GetKey(KeyCode.KeypadPlus) && modules.UI.t_FlyMode)
{
FlyPosY += 0.05f;
}
if (Input.GetKey(KeyCode.KeypadMinus) && modules.UI.t_FlyMode)
{
FlyPosY -= 0.05f;
}
if (Input.GetKey(KeyCode.Space))
{
//localPlayer.GetComponentInChildren<FirstPersonController>().jumpWaitTimer = 0.01f;
//localPlayer.GetComponentInChildren<FirstPersonController>().Jump();
}
//this.playerState.worldManager.photonView.RPC("SetPlayerPos", RpcTarget.All, (object) PhotonNetwork.LocalPlayer.NickName, (object) this.transform.position);
if (modules.UI.t_FlyMode)
{
foreach (SurvivorNetworking entity in Hacks.ePlayableCharacter)
{
if (entity != null && entity.photonView.IsMine)
{
entity.transform.position = new Vector3(entity.transform.position.x, FlyPosY, entity.transform.position.z);
if (Hacks.MainCamera.WorldToScreenPoint(entity.transform.position).z > 0f && Vector3.Distance(entity.transform.position, Hacks.MainCamera.transform.position) <= 1f)
{
entity.transform.position = new Vector3(entity.transform.position.x, FlyPosY, entity.transform.position.z);
}
}
}
}
// 5 Second timer to loop entities and objects to return to lists
Timer += Time.deltaTime;
if (Timer >= 5f)
{
Timer = 0f;
MainCamera = Camera.main;
if (!WorldManager.isGameFinished)
{
game_objects.in_silence.update();
}
}
if (WorldManager.isGameFinished)
{
if (runEndOfGame != true)
{
nullItems();
runEndOfGame = true;
}
}
else
{
runEndOfGame = false;
}
}
public void OnGUI()
{
modules.ESP.performESP();
modules.UI.displayUI();
GUI.Label(new Rect(0, 0, (float)Screen.width, (float)Screen.height), dbg);
}
private static void nullItems()
{
if (eItem.Count > 0) { eItem.Clear(); }
if (eActivableItem.Count > 0) { eActivableItem.Clear(); }
if (eArmoryDoor.Count > 0) { eArmoryDoor.Clear(); }
if (eBearTrap.Count > 0) { eBearTrap.Clear(); }
if (eCrow.Count > 0) { eCrow.Clear(); }
if (eCrowFlock.Count > 0) { eCrowFlock.Clear(); }
if (eDeadBodies.Count > 0) { eDeadBodies.Clear(); }
if (eDogHouse.Count > 0) { eDogHouse.Clear(); }
if (eGroundItem.Count > 0) { eGroundItem.Clear(); }
if (eJackInBox.Count > 0) { eJackInBox.Clear(); }
if (ePlayableCharacter.Count > 0) { ePlayableCharacter.Clear(); }
if (ePuzzleButton.Count > 0) { ePuzzleButton.Clear(); }
if (ePuzzleCabin.Count > 0) { ePuzzleCabin.Clear(); }
if (ePuzzleKey.Count > 0) { ePuzzleKey.Clear(); }
if (ePuzzleTablet.Count > 0) { ePuzzleTablet.Clear(); }
if (eRadio.Count > 0) { eRadio.Clear(); }
if (eRabbitController.Count > 0) { eRabbitController.Clear(); }
if (eRifle.Count > 0) { eRifle.Clear(); }
if (eRifleItem.Count > 0) { eRifleItem.Clear(); }
if (eRocket.Count > 0) { eRocket.Clear(); }
if (eStone.Count > 0) { eStone.Clear(); }
if (eStoneThrower.Count > 0) { eStoneThrower.Clear(); }
if (eToy.Count > 0) { eToy.Clear(); }
if (eTruckPart.Count > 0) { eTruckPart.Clear(); }
if (eWitch.Count > 0) { eWitch.Clear(); }
if (eTelevision.Count > 0) { eTelevision.Clear(); }
if (eCreature.Count > 0) { eCreature.Clear(); }
if (eBodyPlayer.Count > 0) { eBodyPlayer.Clear(); }
}
public static void DrawBoneLine(Vector3 w2s_objectStart, Vector3 w2s_objectFinish, Color color)
{
Render.DrawLine(new Vector2(w2s_objectStart.x, (float)Screen.height - w2s_objectStart.y), new Vector2(w2s_objectFinish.x, (float)Screen.height - w2s_objectFinish.y), color, 1f);
}
}
}