Decompiled source of ChestESP v1.1.5

ESP.dll

Decompiled 4 days ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using Microsoft.CodeAnalysis;
using RoR2;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("ESP")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("ESP")]
[assembly: AssemblyTitle("ESP")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace ESP
{
	public class ESP : MonoBehaviour
	{
		public static List<PurchaseInteraction> PurchaseInteractions;

		public static List<MultiShopController> Shops;

		public static List<ScrapperController> Scrappers;

		public static List<TeleporterInteraction> Teleporters;

		public static List<ShopTerminalBehavior> Terminals;

		public static bool showLabels;

		public static int LabelSize = 12;

		public static string AltText = "+";

		public static bool DrawChestsToggle = true;

		public static bool DrawChestItemNames = true;

		public static bool AltTextToggle = false;

		public static Color AltTextColor = Color.yellow;

		public static bool DrawTeleportersToggle = true;

		public static Color TeleporterColor = Color.red;

		public static bool DrawScrappersToggle = true;

		public static Color ScrapperColor = Color.yellow;

		public static bool DrawPortalStatuesToggle = true;

		public static bool DrawPrintersToggle = true;

		public static Color PrinterColor = new Color(0.8f, 0.8f, 0f);

		public static bool PrinterItemNamesToggle = true;

		public static bool DrawAllPurchaseInteractionsToggle = false;

		public static Color AllInteractionColor = new Color(0.75f, 0.75f, 0.75f);

		public static void Find()
		{
			PurchaseInteractions = Object.FindObjectsOfType<PurchaseInteraction>().ToList();
			Shops = Object.FindObjectsOfType<MultiShopController>().ToList();
			Scrappers = Object.FindObjectsOfType<ScrapperController>().ToList();
			Terminals = Object.FindObjectsOfType<ShopTerminalBehavior>().ToList();
			Teleporters = Object.FindObjectsOfType<TeleporterInteraction>().ToList();
		}

		public static void OnStageStart(Stage stage)
		{
			Find();
		}

		public static void DrawESP()
		{
			if (DrawChestsToggle)
			{
				DrawChests();
				DrawShops();
			}
			if (DrawScrappersToggle)
			{
				DrawScrapper();
			}
			if (DrawTeleportersToggle)
			{
				DrawTeleporters();
			}
			if (DrawPortalStatuesToggle)
			{
				DrawPortalStatues();
			}
			if (DrawPrintersToggle)
			{
				DrawPrinters();
			}
			if (DrawAllPurchaseInteractionsToggle)
			{
				DrawAllPurchaseInteractions();
			}
		}

		public static void DrawChests()
		{
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0303: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b1: Invalid comparison between Unknown and I4
			//IL_029a: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a0: Invalid comparison between Unknown and I4
			//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_021e: Expected I4, but got Unknown
			//IL_02ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_0220: Unknown result type (might be due to invalid IL or missing references)
			//IL_0225: Unknown result type (might be due to invalid IL or missing references)
			//IL_0229: Unknown result type (might be due to invalid IL or missing references)
			//IL_022e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0232: Unknown result type (might be due to invalid IL or missing references)
			//IL_0237: Unknown result type (might be due to invalid IL or missing references)
			//IL_0244: Unknown result type (might be due to invalid IL or missing references)
			//IL_0249: Unknown result type (might be due to invalid IL or missing references)
			//IL_023b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0240: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02db: Unknown result type (might be due to invalid IL or missing references)
			foreach (PurchaseInteraction purchaseInteraction in PurchaseInteractions)
			{
				if (!Object.op_Implicit((Object)(object)purchaseInteraction) || !purchaseInteraction.available)
				{
					continue;
				}
				ChestBehavior component = ((Component)purchaseInteraction).GetComponent<ChestBehavior>();
				if (!Object.op_Implicit((Object)(object)component))
				{
					continue;
				}
				Vector3 objectPosition = ((Component)purchaseInteraction).transform.position + new Vector3(0f, 2f, 0f);
				Color labelColor = Color.white;
				string labelText = "Chest";
				if (((Object)((Component)component).gameObject).name.Contains("Lunar"))
				{
					labelText = "Lunar Pod";
					labelColor = Color.cyan;
				}
				else if (((Object)((Component)component).gameObject).name.Contains("Void"))
				{
					labelText = "Void Cradle";
					((Color)(ref labelColor))..ctor(0.776f, 0.47f, 0.705f);
				}
				else if (((Object)((Component)component).gameObject).name.Contains("Equipment"))
				{
					labelText = "Equipment Barrel";
					((Color)(ref labelColor))..ctor(1f, 0.5f, 0f);
				}
				else if (((Object)((Component)component).gameObject).name.Contains("Chest2"))
				{
					labelText = "Large Chest";
					labelColor = Color.green;
				}
				else if (((Object)((Component)component).gameObject).name.Contains("Chest3"))
				{
					labelText = "Legendery Chest";
					labelColor = Color.red;
				}
				PickupDef pickupDef = PickupCatalog.GetPickupDef(component.dropPickup);
				if (pickupDef != null && DrawChestItemNames)
				{
					if ((int)pickupDef.itemIndex != -1)
					{
						ItemDef itemDef = ItemCatalog.GetItemDef(pickupDef.itemIndex);
						labelText = Language.GetString(ItemCatalog.GetItemDef(pickupDef.itemIndex).nameToken);
						ItemTier tier = itemDef.tier;
						ItemTier val = tier;
						switch ((int)val)
						{
						case 0:
							labelColor = Color.white;
							break;
						case 1:
							labelColor = Color.green;
							break;
						case 2:
							labelColor = Color.red;
							break;
						case 4:
							labelColor = Color.yellow;
							break;
						case 3:
							labelColor = Color.cyan;
							break;
						case 6:
							((Color)(ref labelColor))..ctor(0.988f, 0.725f, 0.925f);
							break;
						case 7:
							((Color)(ref labelColor))..ctor(0.776f, 0.47f, 0.705f);
							break;
						case 8:
							((Color)(ref labelColor))..ctor(0.584f, 0.043f, 0.458f);
							break;
						}
					}
					else if ((int)pickupDef.equipmentIndex != -1)
					{
						EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(pickupDef.equipmentIndex);
						labelText = Language.GetString(equipmentDef.nameToken);
						if (equipmentDef.isLunar)
						{
							labelColor = Color.cyan;
						}
						else
						{
							((Color)(ref labelColor))..ctor(1f, 0.5f, 0f);
						}
					}
				}
				DrawLabel(objectPosition, labelText, LabelSize, labelColor);
			}
		}

		public static void DrawShops()
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			Color labelColor = default(Color);
			foreach (MultiShopController shop in Shops)
			{
				if (Object.op_Implicit((Object)(object)shop) && shop.available)
				{
					Vector3 position = ((Component)shop).transform.position;
					((Color)(ref labelColor))..ctor(0f, 0.5f, 1f);
					string labelText = "Shop";
					DrawLabel(position, labelText, LabelSize, labelColor);
				}
			}
		}

		public static void DrawPrinters()
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Invalid comparison between Unknown and I4
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Invalid comparison between Unknown and I4
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Expected I4, but got Unknown
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			foreach (ShopTerminalBehavior terminal in Terminals)
			{
				if (!Object.op_Implicit((Object)(object)terminal))
				{
					continue;
				}
				PurchaseInteraction component = ((Component)terminal).GetComponent<PurchaseInteraction>();
				if ((int)component.costType == 1 || (int)component.costType == 0)
				{
					continue;
				}
				Vector3 position = ((Component)terminal).transform.position;
				string labelText = "Printer";
				if (PrinterItemNamesToggle)
				{
					PickupDef pickupDef = PickupCatalog.GetPickupDef(terminal.pickupIndex);
					if (pickupDef != null)
					{
						ItemDef itemDef = ItemCatalog.GetItemDef(pickupDef.itemIndex);
						ItemTier tier = itemDef.tier;
						Color labelColor = Color.white;
						ItemTier tier2 = itemDef.tier;
						ItemTier val = tier2;
						switch ((int)val)
						{
						case 0:
							labelColor = Color.white;
							break;
						case 1:
							labelColor = Color.green;
							break;
						case 2:
							labelColor = Color.red;
							break;
						case 4:
							labelColor = Color.yellow;
							break;
						case 3:
							labelColor = Color.cyan;
							break;
						case 6:
							((Color)(ref labelColor))..ctor(0.988f, 0.725f, 0.925f);
							break;
						case 7:
							((Color)(ref labelColor))..ctor(0.776f, 0.47f, 0.705f);
							break;
						case 8:
							((Color)(ref labelColor))..ctor(0.584f, 0.043f, 0.458f);
							break;
						}
						DrawLabel(((Component)terminal).transform.position + new Vector3(0f, -2f, 0f), Language.GetString(itemDef.nameToken), LabelSize, labelColor);
					}
				}
				DrawLabel(position, labelText, LabelSize, PrinterColor);
			}
		}

		public static void DrawScrapper()
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			foreach (ScrapperController scrapper in Scrappers)
			{
				if (Object.op_Implicit((Object)(object)scrapper))
				{
					Vector3 position = ((Component)scrapper).transform.position;
					string labelText = "Scrapper";
					DrawLabel(position, labelText, LabelSize, ScrapperColor);
				}
			}
		}

		public static void DrawTeleporters()
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			foreach (TeleporterInteraction teleporter in Teleporters)
			{
				if (Object.op_Implicit((Object)(object)teleporter))
				{
					DrawLabel(((Component)teleporter).transform.position, "Teleporter", LabelSize, TeleporterColor);
				}
			}
		}

		public static void DrawAllPurchaseInteractions()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			foreach (PurchaseInteraction purchaseInteraction in PurchaseInteractions)
			{
				Vector3 position = ((Component)purchaseInteraction).transform.position;
				string labelText = "Interaction";
				DrawLabel(position, labelText, LabelSize, AllInteractionColor);
			}
		}

		public static void DrawPortalStatues()
		{
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			foreach (PurchaseInteraction purchaseInteraction in PurchaseInteractions)
			{
				if (!Object.op_Implicit((Object)(object)purchaseInteraction) || !purchaseInteraction.available)
				{
					continue;
				}
				PortalStatueBehavior component = ((Component)purchaseInteraction).GetComponent<PortalStatueBehavior>();
				if ((Object)(object)component != (Object)null)
				{
					Vector3 position = ((Component)purchaseInteraction).transform.position;
					Color labelColor = Color.white;
					string labelText = "Portal Statue";
					string text = ((object)(PortalType)(ref component.portalType)).ToString();
					if (text == "Shop")
					{
						labelText = "Newt Altar";
						labelColor = Color.cyan;
					}
					else if (text == "Goldshores")
					{
						labelText = "Altar of Gold";
						((Color)(ref labelColor))..ctor(0.796078f, 0.631372f, 0.207843f);
					}
					DrawLabel(position, labelText, LabelSize, labelColor);
				}
			}
		}

		private static void DrawLabel(Vector3 objectPosition, string labelText, int labelSize, Color labelColor)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Expected O, but got Unknown
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			if (AltTextToggle)
			{
				labelText = AltText;
			}
			GUIContent val = new GUIContent(labelText);
			GUIStyle val2 = new GUIStyle();
			val2.fontSize = labelSize;
			val2.alignment = (TextAnchor)4;
			val2.normal.textColor = labelColor;
			Vector2 val3 = val2.CalcSize(val);
			Vector3 val4 = Camera.main.WorldToScreenPoint(objectPosition);
			val4.y = (float)Screen.height - val4.y;
			if (val4.z >= 0f)
			{
				GUI.Label(new Rect(val4.x - val3.x / 2f, val4.y, val3.x, val3.y), labelText, val2);
			}
		}
	}
	[BepInPlugin("Rabusu.ESP", "ESP", "1.1.5")]
	public class Load : BaseUnityPlugin
	{
		public const string PluginGUID = "Rabusu.ESP";

		public const string PluginAuthor = "Rabusu";

		public const string PluginName = "ESP";

		public const string PluginVersion = "1.1.5";

		private Menu menu;

		public void Awake()
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			Stage.onStageStartGlobal += ESP.OnStageStart;
			menu = new GameObject("ESP Menu").AddComponent<Menu>();
		}

		private void Update()
		{
			if (Input.GetKeyDown((KeyCode)283))
			{
				ESP.Find();
				ESP.showLabels = !ESP.showLabels;
			}
			if (Input.GetKeyDown((KeyCode)284))
			{
				menu.showMenu = !menu.showMenu;
			}
		}

		public void OnGUI()
		{
			menu.OnGUI();
			if (ESP.showLabels)
			{
				ESP.DrawESP();
			}
		}

		private void OnDestroy()
		{
			Stage.onStageStartGlobal -= ESP.OnStageStart;
		}
	}
	public class Menu : MonoBehaviour
	{
		public bool showMenu;

		private bool showColorPickerScrappers = false;

		private bool showColorPickerTeleporters = false;

		private bool showColorPickerPrinters = false;

		private bool showColorPickerAllInteractions = false;

		private bool showColorPickerAltText = false;

		public void OnGUI()
		{
			if (showMenu)
			{
				ShowMenu();
			}
		}

		public void ShowMenu()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0225: Unknown result type (might be due to invalid IL or missing references)
			//IL_0244: Unknown result type (might be due to invalid IL or missing references)
			//IL_025d: Unknown result type (might be due to invalid IL or missing references)
			//IL_027c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0310: Unknown result type (might be due to invalid IL or missing references)
			//IL_032f: Unknown result type (might be due to invalid IL or missing references)
			//IL_035e: Unknown result type (might be due to invalid IL or missing references)
			//IL_038b: Unknown result type (might be due to invalid IL or missing references)
			float num = 60f;
			float num2 = 18f;
			GUI.color = Color.white;
			GUI.Box(new Rect(40f, 40f, 300f, 320f), "ESP Settings");
			GUI.Label(new Rect(52f, num += num2, 160f, 20f), "Label Size");
			ESP.LabelSize = (int)GUI.HorizontalSlider(new Rect(150f, num + 5f, 150f, 20f), (float)ESP.LabelSize, 1f, 100f);
			GUI.color = Color.white;
			ESP.AltTextToggle = GUI.Toggle(new Rect(50f, num += num2, 160f, 20f), ESP.AltTextToggle, " Alternative look");
			GUI.color = Color.white;
			ESP.DrawChestsToggle = GUI.Toggle(new Rect(50f, num += num2, 160f, 20f), ESP.DrawChestsToggle, " Chests");
			ESP.DrawChestItemNames = GUI.Toggle(new Rect(70f, num += num2, 160f, 20f), ESP.DrawChestItemNames, " Chest Item Names");
			GUI.color = ESP.ScrapperColor;
			ESP.DrawScrappersToggle = GUI.Toggle(new Rect(50f, num += num2, 160f, 20f), ESP.DrawScrappersToggle, " Scrappers");
			if (GUI.Button(new Rect(250f, num + 4f, 40f, 15f), ""))
			{
				Close();
				showColorPickerScrappers = !showColorPickerScrappers;
			}
			GUI.color = ESP.TeleporterColor;
			ESP.DrawTeleportersToggle = GUI.Toggle(new Rect(50f, num += num2, 160f, 20f), ESP.DrawTeleportersToggle, " Teleporter");
			if (GUI.Button(new Rect(250f, num + 4f, 40f, 15f), ""))
			{
				Close();
				showColorPickerTeleporters = !showColorPickerTeleporters;
			}
			GUI.color = Color.white;
			ESP.DrawPortalStatuesToggle = GUI.Toggle(new Rect(50f, num += num2, 160f, 20f), ESP.DrawPortalStatuesToggle, " Portal Statues");
			GUI.color = ESP.PrinterColor;
			ESP.DrawPrintersToggle = GUI.Toggle(new Rect(50f, num += num2, 160f, 20f), ESP.DrawPrintersToggle, " Printers");
			if (GUI.Button(new Rect(250f, num + 4f, 40f, 15f), ""))
			{
				Close();
				showColorPickerPrinters = !showColorPickerPrinters;
			}
			GUI.color = Color.white;
			ESP.PrinterItemNamesToggle = GUI.Toggle(new Rect(70f, num += num2, 160f, 20f), ESP.PrinterItemNamesToggle, " Printer Item Names");
			GUI.color = ESP.AllInteractionColor;
			ESP.DrawAllPurchaseInteractionsToggle = GUI.Toggle(new Rect(50f, num += num2, 160f, 20f), ESP.DrawAllPurchaseInteractionsToggle, " All interactions");
			if (GUI.Button(new Rect(250f, num + 4f, 40f, 15f), ""))
			{
				Close();
				showColorPickerAllInteractions = !showColorPickerAllInteractions;
			}
			GUI.color = Color.white;
			if (showColorPickerScrappers)
			{
				ShowColorPicker(ref ESP.ScrapperColor, 50f, 270f);
			}
			else if (showColorPickerTeleporters)
			{
				ShowColorPicker(ref ESP.TeleporterColor, 50f, 270f);
			}
			else if (showColorPickerPrinters)
			{
				ShowColorPicker(ref ESP.PrinterColor, 50f, 270f);
			}
			else if (showColorPickerAllInteractions)
			{
				ShowColorPicker(ref ESP.AllInteractionColor, 50f, 270f);
			}
			else if (showColorPickerAltText)
			{
				ShowColorPicker(ref ESP.AltTextColor, 50f, 270f);
			}
		}

		public void ShowColorPicker(ref Color color, float x, float y)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			GUI.Label(new Rect(x, y, 100f, 20f), "R");
			color.r = GUI.HorizontalSlider(new Rect(x + 15f, y, 100f, 20f), color.r, 0f, 1f);
			GUI.Label(new Rect(x, y + 20f, 100f, 20f), "G");
			color.g = GUI.HorizontalSlider(new Rect(x + 15f, y + 20f, 100f, 20f), color.g, 0f, 1f);
			GUI.Label(new Rect(x, y + 40f, 100f, 20f), "B");
			color.b = GUI.HorizontalSlider(new Rect(x + 15f, y + 40f, 100f, 20f), color.b, 0f, 1f);
			if (GUI.Button(new Rect(x, y + 60f, 50f, 20f), "Close"))
			{
				Close();
			}
		}

		private void Close()
		{
			showColorPickerScrappers = false;
			showColorPickerTeleporters = false;
			showColorPickerPrinters = false;
			showColorPickerAllInteractions = false;
		}
	}
}