void DrawOverlays()
{
int i = 0;
foreach(Hack hack in HackManager.getEnabledHacks())
{
Vector2 textDimensions = GUI.skin.label.CalcSize(new GUIContent(hack.Name));
float x = Screen.width - textDimensions.x - 10;
float y = 10 + i * (10 + textDimensions.y);
GUI.Label(new Rect(x, y, textDimensions.x, textDimensions.y), hack.Name);
i++;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
using Steamworks;
public class Hacks : MonoBehaviour
{
bool gui;
private bool toggleBool = true;
void Start()
{
}
void Update()
{
if (Input.GetKeyDown(KeyCode.T))
{
gui = !gui;
}
}
void OnGUI()
{
if (gui)
{
toggleBool = GUI.Toggle(new Rect(25, 25, 100, 30), toggleBool, "Full bright");
{
if (toggleBool)
{
RenderSettings.ambientLight = new Color(0.95f, 0.95f, 0.95f);
base.ligh*****lor = Color.black;
base.light.intensity = 0f;
{
if (GUI.Button(new Rect(20, 40, 80, 20), "Its a trap"))
{
float adv = 0f;
for (int i = 0; i < 1000; i++)
{
adv = adv + 1f;
SpawnStructures.placeStructure(0x4269, Camera.main.transform.position + ((Vector3)Camera.main.transform.forward * adv), 1, string.Empty);
{
}
}
}
}
}
}
}
}
}
SDG.Unturned.Player // Player Class SDG.Unturned.Zombie // Zombie Class