0% found this document useful (0 votes)
2 views12 pages

Example Cs

This is example script
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views12 pages

Example Cs

This is example script
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

using [Link].

Generic;
using [Link];
using UnityEngine;
using [Link];
using [Link];
public class Hacks : MonoBehaviour
{

public static Rect rc = new Rect([Link]/2, 100, 350, 220);


public bool menu = false;
public int one;
public int two = 50;
public static bool nograss = false;
public static bool amlight = false;
public static Texture2D texture;
public static Texture2D inactivetexture;
public static Texture2D texture2;
public static Texture2D Activetexture;
public static Texture2D backgroundtexture;
public static Texture2D background;
public static Texture2D hoverbackground;
public static Color HoverColor = new Color32(149, 0, 1, 255);
public static Color BackGround = new Color32(64, 64, 64, 220);
public static Color BackGroundColor = new Color32(13, 13, 13, 255);
public static Color hoverColor = new Color32(26, 26, 26, 255);
public static Color Color3 = new Color32(0, 149, 1, 255);
public static GUIStyle MenuItemStyle;
public static GUIStyle ActiveMenuItemStyle;

[DllImport("[Link]")]
static extern void mouse_event(int dwFlags, int dx, int dy, int dwData, int
dwExtraInfo);

public static string nameToAdd = "client_bear";


public static string objectlist;
public static string NoGrassButton = "NoGrass: OFF";
public static string NoTreeButton = "NoTree: OFF";
public static string LightButton = "Brightness: OFF";
public static string ChamsButton = "WALLHACK: OFF";
public static string BoxButton = "BOX ESP: ON";
public static string LineButton = "LINE ESP: ON";
public static string DistButton = "DIST ESP: ON";
public static string AimButton = "BONE: HEAD";
public static string FovButton = "FOV: ";
public static string SmoothButton = "SMOOTH: ";
public static string KeyButton = "KEY: ";
public static KeyCode aimkey = KeyCode.V;
public static List<GameObject> badguys = new List<GameObject>();
public static List<Vector3> targets = new List<Vector3>();
public static List<GameObject> objects = new List<GameObject>();
public static List<GameObject> grass = new List<GameObject>();
public static List<GameObject> trees = new List<GameObject>();
public static List<GameObject> chams = new List<GameObject>();
public static Color AmbientColor = [Link];
public static Shader DefaultShader;
public string Shit1;

public static int smooth = 2;


public static int fov = 3;
public static float think = 2f;
public static bool wallhack = false;
public static bool BoxEsp = true;
public static bool LineESP = true;
public static bool DistESP = true;
public static string bone = "NPC_Head";
private static Texture2D aaLineTex = null;
private static Texture2D lineTex = null;
private static Material blitMaterial = null;
private static Material blendMaterial = null;
private static Rect lineRect = new Rect(0f, 0f, 1f, 1f);
public static void DrawLine(Vector2 pointA, Vector2 pointB, Color color, float
width, bool antiAlias)
{
float num = pointB.x - pointA.x;
float num2 = pointB.y - pointA.y;
float num3 = [Link](num * num + num2 * num2);
if (num3 < 0.001f)
{
return;
}
Texture2D texture2D;
if (antiAlias)
{
width *= 3f;
texture2D = aaLineTex;
Material material = blendMaterial;
}
else
{
texture2D = lineTex;
Material material2 = blitMaterial;
}
float num4 = width * num2 / num3;
float num5 = width * num / num3;
Matrix4x4 identity = [Link];
identity.m00 = num;
identity.m01 = -num4;
identity.m03 = pointA.x + 0.5f * num4;
identity.m10 = num2;
identity.m11 = num5;
identity.m13 = pointA.y - 0.5f * num5;
[Link]();
[Link](identity);
[Link] = color;
[Link](lineRect, texture2D);
[Link]();
}

public static void RectFilled(float x, float y, float width, float height,


Texture2D text)
{
[Link](new Rect(x, y, width, height), text);
}

public static void RectOutlined(float x, float y, float width, float height,


Texture2D text, float thickness = 1f)
{
RectFilled(x, y, thickness, height, text);
RectFilled(x + width - thickness, y, thickness, height, text);
RectFilled(x + thickness, y, width - thickness * 2f, thickness, text);
RectFilled(x + thickness, y + height - thickness, width - thickness * 2f,
thickness, text);
}

public static void Box(float x, float y, float width, float height, Texture2D
text, float thickness = 1f)
{
RectOutlined(x - width / 2f, y - height, width, height, text, thickness);
}

private bool IsVisable(GameObject origin, Vector3 toCheck)


{
RaycastHit hit;
if ([Link]([Link], toCheck, out hit))
{
if ([Link]("NPC") ||
[Link]("client")
|| [Link] == [Link] || [Link] ==
[Link]
|| [Link] == [Link] ||
[Link]("Player"))
{
return true;
}
}
return false;
}

public static void GI(int id)


{
MenuItemStyle = new GUIStyle([Link]);
[Link] = [Link];
[Link] = [Link];
[Link] = texture;
[Link] = [Link];
[Link] = inactivetexture;
[Link] = inactivetexture;

ActiveMenuItemStyle = new GUIStyle([Link]);


[Link] = [Link];
[Link] = [Link];
[Link] = texture2;
[Link] = [Link];
[Link] = Activetexture;
[Link] = Activetexture;

GUIStyle TextStyle = new GUIStyle([Link]);


[Link] = [Link];
[Link] = 15;

GUIStyle Button1;
if (nameToAdd == "client_u") Button1 = ActiveMenuItemStyle;
else Button1 = MenuItemStyle;

GUIStyle Button2;
if (nameToAdd == "client_bear") Button2 = ActiveMenuItemStyle;
else Button2 = MenuItemStyle;

GUIStyle Button3;
if (nameToAdd == "client_player") Button3 = ActiveMenuItemStyle;
else Button3 = MenuItemStyle;

GUIStyle Button4;
if (nograss) Button4 = ActiveMenuItemStyle;
else Button4 = MenuItemStyle;

GUIStyle Button5;
if ([Link]("ON")) Button5 = ActiveMenuItemStyle;
else Button5 = MenuItemStyle;

GUIStyle Button6;
if (amlight) Button6 = ActiveMenuItemStyle;
else Button6 = MenuItemStyle;

GUIStyle Button7;
if ([Link]("ON")) Button7 = ActiveMenuItemStyle;
else Button7 = MenuItemStyle;

GUIStyle Button8;
if ([Link]("ON")) Button8 = ActiveMenuItemStyle;
else Button8 = MenuItemStyle;

GUIStyle Button9;
if ([Link]("ON")) Button9 = ActiveMenuItemStyle;
else Button9 = MenuItemStyle;

GUIStyle Button10;
if ([Link]("ON")) Button10 = ActiveMenuItemStyle;
else Button10 = MenuItemStyle;

[Link](new Rect(0, 0, 350, 20), hoverbackground);


[Link](new Rect(39, 20, 140, 20), "TARGET TEAM:", TextStyle);
if ([Link](new Rect(20, 40, 140, 20), "USEC", Button1))
{
[Link]();
nameToAdd = "client_u";
}
if ([Link](new Rect(20, 60, 140, 20), "BEAR", Button2))
{
[Link]();
nameToAdd = "client_bear";
}
if ([Link](new Rect(20, 80, 140, 20), "DeathMatch", Button3))
{
[Link]();
nameToAdd = "client_player";
}
[Link](new Rect(67, 100, 140, 20), "MISC:", TextStyle);
if ([Link](new Rect(20, 120, 140, 20), NoGrassButton, Button4))
{
if (nograss)
{
nograss = false;
NoGrassButton = "NoGrass: OFF";
try
{
foreach (GameObject go in grass) [Link](true);
}
catch
{
nograss = false;
NoGrassButton = "NoGrass: OFF";
}
}
else
{
[Link]();
foreach (GameObject go in
[Link](typeof(GameObject)))
{
if ([Link])
{
if ([Link]("grass") || [Link]("brush")
|| [Link]("paporotnik") || [Link]("bush"))
{
[Link](go);
[Link](false);
}
}
}
nograss = true;
NoGrassButton = "NoGrass: ON";
}
}
if ([Link](new Rect(20, 140, 140, 20), LightButton, Button6))
{
if (amlight)
{
amlight = false;
try
{
[Link] = true;
[Link] = AmbientColor;
LightButton = "Brightness: OFF";
}
catch { amlight = false; }

}
else
{
AmbientColor = [Link];
[Link] = false;
[Link] = [Link];
LightButton = "Brightness: ON";
amlight = true;
}
}
if ([Link](new Rect(20, 160, 140, 20), ChamsButton, Button7))
{
if(wallhack)
{
ChamsButton = "WALLHACK: OFF";
wallhack = false;
}
else
{
ChamsButton = "WALLHACK: ON";
wallhack = true;
}
}
if ([Link](new Rect(20, 180, 140, 20), "Patch chams", MenuItemStyle))
{
foreach (GameObject gameObj in badguys)
{
var distance = [Link]([Link],
[Link]);
{
if (distance < 10 && distance > 2)
{
[Link](false);
}
else
{
var rend = [Link]<Renderer>();
foreach (Renderer renderer in rend)
[Link] = texture;
}
}
}
}

[Link](new Rect(215, 20, 140, 20), "VISUALS:", TextStyle);


if ([Link](new Rect(180, 40, 140, 20), BoxButton, Button8))
{
if (BoxEsp)
{
BoxEsp = false;
BoxButton = "BOX ESP: OFF";
}
else
{
BoxEsp = true;
BoxButton = "BOX ESP: ON";
}
}
if ([Link](new Rect(180, 60, 140, 20), LineButton, Button9))
{
if (LineESP)
{
LineESP = false;
LineButton = "LINE ESP: OFF";
}
else
{
LineESP = true;
LineButton = "LINE ESP: ON";
}
}
if ([Link](new Rect(180, 80, 140, 20), DistButton, Button10))
{
if (DistESP)
{
DistESP = false;
DistButton = "DIST ESP: OFF";
}
else
{
DistESP = true;
DistButton = "DIST ESP: ON";
}
}
[Link](new Rect(220, 100, 140, 20), "AIMBOT:", TextStyle);
if ([Link](new Rect(180, 120, 140, 20), AimButton, MenuItemStyle))
{
if([Link]("HEAD"))
{
bone = "NPC_Neck";
AimButton = "BONE: NECK";
}
else if ([Link]("NECK"))
{
bone = "NPC_Spine1";
AimButton = "BONE: BODY";
}
else if ([Link]("BODY"))
{
bone = "NPC_Head";
AimButton = "BONE: HEAD";
}
}
FovButton = "FOV: " + [Link]();
if ([Link](new Rect(180, 140, 140, 20), FovButton, MenuItemStyle))
{
if (fov == 1) fov = 2;
else if (fov == 2) fov = 3;
else if (fov == 3) fov = 4;
else if (fov == 4) fov = 5;
else if (fov == 5) fov = 1;
}
SmoothButton = "SMOOTH: " + [Link]();
if ([Link](new Rect(180, 160, 140, 20), SmoothButton, MenuItemStyle))
{
if (smooth == 1) smooth = 2;
else if(smooth == 2) smooth = 3;
else if(smooth == 3) smooth = 4;
else if (smooth == 4) smooth = 5;
else if (smooth == 5) smooth = 1;
}
SmoothButton = "SMOOTH: " + [Link]();
if ([Link](new Rect(180, 160, 140, 20), SmoothButton, MenuItemStyle))
{
if (smooth == 1) smooth = 2;
else if (smooth == 2) smooth = 3;
else if (smooth == 3) smooth = 4;
else if (smooth == 4) smooth = 5;
else if (smooth == 5) smooth = 1;
}
KeyButton = "KEY: " + [Link]();
if ([Link](new Rect(180, 180, 140, 20), KeyButton, MenuItemStyle))
{
if (aimkey == KeyCode.V) aimkey = KeyCode.Mouse1;
else if (aimkey == KeyCode.Mouse1) aimkey = KeyCode.Mouse0;
else if (aimkey == KeyCode.Mouse0) aimkey = [Link];
else if (aimkey == [Link]) aimkey = [Link];
else if (aimkey == [Link]) aimkey = KeyCode.V;
}

[Link]();
}

void Start()
{
texture = new Texture2D(2, 2, TextureFormat.ARGB32, false);
[Link](0, 0, [Link]);
[Link](1, 0, [Link]);
[Link](0, 1, [Link]);
[Link](1, 1, [Link]);
[Link]();

inactivetexture = new Texture2D(2, 2, TextureFormat.ARGB32, false);


[Link](0, 0, HoverColor);
[Link](1, 0, HoverColor);
[Link](0, 1, HoverColor);
[Link](1, 1, HoverColor);
[Link]();

texture2 = new Texture2D(2, 2, TextureFormat.ARGB32, false);


[Link](0, 0, [Link]);
[Link](1, 0, [Link]);
[Link](0, 1, [Link]);
[Link](1, 1, [Link]);
[Link]();

Activetexture = new Texture2D(2, 2, TextureFormat.ARGB32, false);


[Link](0, 0, Color3);
[Link](1, 0, Color3);
[Link](0, 1, Color3);
[Link](1, 1, Color3);
[Link]();

backgroundtexture = new Texture2D(2, 2, TextureFormat.ARGB32, false);


[Link](0, 0, BackGroundColor);
[Link](1, 0, BackGroundColor);
[Link](0, 1, BackGroundColor);
[Link](1, 1, BackGroundColor);
[Link]();

hoverbackground = new Texture2D(2, 2, TextureFormat.ARGB32, false);


[Link](0, 0, hoverColor);
[Link](1, 0, hoverColor);
[Link](0, 1, hoverColor);
[Link](1, 1, hoverColor);
[Link]();

background = new Texture2D(2, 2, TextureFormat.ARGB32, false);


[Link](0, 0, BackGround);
[Link](1, 0, BackGround);
[Link](0, 1, BackGround);
[Link](1, 1, BackGround);
[Link]();
if (lineTex == null)
{
lineTex = new Texture2D(1, 1, TextureFormat.ARGB32, false);
[Link](0, 1, [Link]);
[Link]();
}
if (aaLineTex == null)
{
aaLineTex = new Texture2D(1, 3, TextureFormat.ARGB32, false);
[Link](0, 0, new [Link](1, 1, 1, 0));
[Link](0, 1, [Link]);
[Link](0, 2, new [Link](1, 1, 1, 0));
[Link]();
}

blitMaterial = (Material)typeof(GUI).GetMethod("get_blitMaterial",
[Link] | [Link]).Invoke(null, null);
blendMaterial = (Material)typeof(GUI).GetMethod("get_blendMaterial",
[Link] | [Link]).Invoke(null, null);
}

void Update()
{
float minDist = 99999;
Vector2 AimTarget = [Link];
try
{
foreach (GameObject go in badguys)
{
Transform[] allChildren =
[Link]<Transform>();
foreach (Transform child in allChildren)
{
if ([Link] == bone) //NPC_Spine1 "NPC_Neck"
{
var shit =
[Link]([Link]);
if (shit.z > -8)
{
float dist = [Link]([Link](new
Vector2(shit.x, [Link] - shit.y), new Vector2(([Link] / 2),
([Link] / 2))));
if (dist < 300) //in fov
{
if (dist < minDist)
{
minDist = dist;
AimTarget = new Vector2(shit.x, [Link] -
shit.y);
}
}
}
}
}
}
if(AimTarget != [Link])
{
double DistX = AimTarget.x - [Link] / 2.0f;
double DistY = AimTarget.y - [Link] / 2.0f;
//aimsmooth
DistX /= smooth;
DistY /= smooth;

//if aimkey is pressed


if(!menu)
if ([Link](aimkey)) mouse_event(0x0001, (int)DistX,
(int)DistY, 0, 0);
}
}
catch { }

/////////MENU HOTKEY////////////
if ([Link]([Link])) menu = !menu;

////////////////ENEMY LIST UPDATE/////////


try
{
if (one <= two)
{
one = one - 1;
if (one == two - 1)
{
foreach (GameObject go in
[Link](typeof(GameObject)))
{
if ([Link](nameToAdd))
{
var distance =
[Link]([Link], [Link]);
if (distance > 2)
{
if (![Link](go))
{
var rend =
[Link]<Renderer>();
if ([Link]("S") ||
[Link]("B")) //"p0/Bumped Specular Mask" "p0/Reflective/Bumped
Specular Mask W"
{
[Link](go);
if (wallhack)
{
var rend2 =
[Link]<Renderer>();
[Link](go);
foreach (Renderer renderer in rend2)
{
DefaultShader =
[Link];
[Link] =
[Link]("Hidden/Internal-GUITexture");
}
}
}
else if (distance > 12) [Link](go);
else [Link](go);
}
}
}
}
}
}
if (one <= 0)
{
[Link]();
if (wallhack)
{
try
{
foreach (GameObject gameObj in chams)
{
if (gameObj != null)
{
var rend =
[Link]<Renderer>();
foreach (Renderer renderer in rend)
[Link] = DefaultShader;
}
}
}
catch { }
}
one = two;
}
}
catch { }
}

void OnGUI()
{
[Link] = backgroundtexture;
[Link] = backgroundtexture;
[Link] = backgroundtexture;
[Link] = backgroundtexture;
[Link] = backgroundtexture;
[Link] = backgroundtexture;
[Link] = backgroundtexture;
[Link] = 10;

[Link](new Rect(10, 100, 200, 20), Shit1);


try
{
if (menu) rc = [Link](0, rc, new [Link](GI), "Trash");
foreach (GameObject gameObj in badguys)
{
Transform[] allChildren =
[Link]<Transform>();
foreach (Transform child in allChildren)
{
if ([Link] == "NPC_Head") //NPC_Spine1 "NPC_Neck"
{
Vector3 w2s =
[Link]([Link]);
Vector3 w2s2 =
[Link]([Link]);
if (w2s.z > -1)
// if (w2s.z > 0)
{
// if ((w2s.x > 0) || (w2s.x < [Link]) || (w2s.y
> 0) || (w2s.y < [Link]))
{
var distance =
[Link]([Link], [Link]);
// if (distance > 10)
{
float num = [Link](w2s.y - w2s2.y);
if (IsVisable([Link],
[Link]))
{
if (BoxEsp) Box(w2s.x, [Link] -
w2s.y, num / 1.8f, num, texture2, 1f);
if (LineESP) DrawLine(new
Vector2([Link] / 2, [Link]), new Vector2(w2s.x, [Link] -
w2s.y), [Link], think, false);
if (DistESP) [Link](new Rect((int)w2s.x
- 5, [Link] - w2s.y - 10, 40, 40), ((int)(distance)).ToString());
}
else
{
if (BoxEsp) Box(w2s.x, [Link] -
w2s.y, num / 1.8f, num, texture, 1f);
if (LineESP) DrawLine(new
Vector2([Link] / 2, [Link]), new Vector2(w2s.x, [Link] -
w2s.y), [Link], think, false);
if (DistESP) [Link](new Rect((int)w2s2.x
- 5, [Link] - w2s2.y - 14, 40, 40), ((int)(distance)).ToString());
}
}
}
}
}
}
}
}
catch { }
}
}

You might also like