Basis for a Hack Menu Using Unity
I wrote a small base for unturned/unity hack menus.
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
public class Hacks : MonoBehaviour
{
bool hack = false;
bool esp = true;
float scrHeight = Screen.height;
int selection = 1;
int maxSelect = 4;
float scrWidth = Screen.width;
void Start()
{
}
void Update()
{
//Keycode hack activation
if (Input.GetKeyDown(KeyCode.Insert))
{
hack = !hack;
}
if (hack)
{
if(Input.GetKeyDown(KeyCode.DownArrow))
{
if (selection != maxSelect)
{
selection += 1;
}
else
{
if (selection == maxSelect)
{
selection = 1;
}
}
}
if (Input.GetKeyDown(KeyCode.UpArrow))
{
if (selection != 1)
{
selection -= 1;
}
else
{
if (selection == 1)
{
selection = maxSelect;
}
}
}
if (Input.GetKeyDown(KeyCode.RightControl))
{
if (selection == 1)
{
selection1();
}
else
{
if (selection == 2)
{
selection2();
}
else
{
if (selection == 3)
{
selection3();
}
else
{
if (selection == 4)
{
selection4();
}
else
{
}
}
}
}
}
}
}
// FUNCTIONS
void selection1()
{
}
void selection2()
{
}
void selection3()
{
}
void selection4()
{
}
void OnGUI()
{
//Nice GUI
GUI.color = Color.magenta;
GUI.Label(new Rect(200, 0, 200, 40), "Hack Name v1.0");
GUI.color = Color.white;
if (hack)
{
GUI.Box(new Rect(0, 290, 120, 300), "- Functions -");
if (selection == 1)
{
GUI.color = Color.red;
}
else
{
GUI.color = Color.white;
}
GUI.Label(new Rect(10, 320, 100, 30), "Selection1");
if (selection == 2)
{
GUI.color = Color.red;
}
else
{
GUI.color = Color.white;
}
GUI.Label(new Rect(10, 350, 100, 30), "Selection2");
if (selection == 3)
{
GUI.color = Color.red;
}
else
{
GUI.color = Color.white;
}
GUI.Label(new Rect(10, 380, 100, 30), "Selection3");
if (selection == 4)
{
GUI.color = Color.red;
}
else
{
GUI.color = Color.white;
}
GUI.Label(new Rect(10, 410, 100, 30), "Selection4");
}
}
}
If anyone releases a menu using this I would appreciate a small credit. Thanks

Just seems like extra work to me.
Website c?a bên mình hình nhu code gi?ng website c?a b?n, b?n th? qua tham kh?o website c?a mình xem "bepthaison.vn"