Decompiled source of Atlas v1.10.5

BepInEx/plugins/AtlasPeak.dll

Decompiled a month ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using AtlasPeak.Patches;
using AtlasPeak.Tabs;
using AtlasPeak.Utils;
using BepInEx;
using ExitGames.Client.Photon;
using HarmonyLib;
using POpusCodec.Enums;
using Photon.Pun;
using Photon.Realtime;
using Photon.Voice.Unity;
using Steamworks;
using TMPro;
using UnityEngine;
using UnityEngine.SceneManagement;
using Zorro.Core;
using Zorro.Core.CLI;
using Zorro.Core.Serizalization;
using Zorro.UI.Modal;
using pworld.Scripts.Extensions;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("tsgamepeak")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("tsgamepeak")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("cb8cf5cb-96cd-4c9c-ba8f-24119eb3c729")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace tsgamepeak
{
	[BepInPlugin("synq.peak.atlas", "Atlas Peak", "1.10.5")]
	public class Plugin : BaseUnityPlugin
	{
		private bool loaded;

		public static GameObject atlas;

		private void Update()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Expected O, but got Unknown
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Expected O, but got Unknown
			if (!loaded)
			{
				Harmony val = new Harmony("synq.peak.atlas");
				val.PatchAll(Assembly.GetExecutingAssembly());
				atlas = new GameObject("atlasobj");
				atlas.AddComponent<UI>();
				atlas.AddComponent<Callbackstuff>();
				Object.DontDestroyOnLoad((Object)(object)atlas);
				((BaseUnityPlugin)this).Logger.LogInfo((object)"BepInEx ver loaded.");
				loaded = true;
			}
		}
	}
}
namespace AtlasPeak
{
	internal class PluginInfo
	{
		public const string Author = "synq.peak.atlas";

		public const string Name = "Atlas Peak";

		public const string Version = "1.10.5";
	}
}
namespace AtlasPeak.Utils
{
	public class Callbackstuff : MonoBehaviourPunCallbacks
	{
		public override void OnMasterClientSwitched(Player newMasterClient)
		{
			((MonoBehaviourPunCallbacks)this).OnMasterClientSwitched(newMasterClient);
			UI.NewNotification("<color=#8765ca>[Atlas] Masterclient switched to " + newMasterClient.NickName + "</color>");
		}

		public override void OnJoinedRoom()
		{
			((MonoBehaviourPunCallbacks)this).OnJoinedRoom();
			Player[] playerListOthers = PhotonNetwork.PlayerListOthers;
			foreach (Player val in playerListOthers)
			{
				if (((Dictionary<object, object>)(object)val.CustomProperties).ContainsKey((object)"CherryUser"))
				{
					UI.NewNotification("<color=#8765ca>[Atlas] A Cherry user is in your lobby.</color>");
				}
				if (((Dictionary<object, object>)(object)val.CustomProperties).ContainsKey((object)"AtlUser"))
				{
					UI.NewNotification("<color=#8765ca>[Atlas] A Atlas user is in your lobby.</color>");
				}
			}
		}

		public override void OnPlayerEnteredRoom(Player newPlayer)
		{
			((MonoBehaviourPunCallbacks)this).OnPlayerEnteredRoom(newPlayer);
			if (((Dictionary<object, object>)(object)newPlayer.CustomProperties).ContainsKey((object)"CherryUser"))
			{
				UI.NewNotification("<color=#8765ca>[Atlas] An Cherry user joined.</color>");
			}
			if (((Dictionary<object, object>)(object)newPlayer.CustomProperties).ContainsKey((object)"AtlUser"))
			{
				UI.NewNotification("<color=#8765ca>[Atlas] An Atlas user joined.</color>");
			}
		}

		public override void OnLeftRoom()
		{
			((MonoBehaviourPunCallbacks)this).OnLeftRoom();
		}

		public override void OnPlayerLeftRoom(Player otherPlayer)
		{
			((MonoBehaviourPunCallbacks)this).OnPlayerLeftRoom(otherPlayer);
			if (((Dictionary<object, object>)(object)otherPlayer.CustomProperties).ContainsKey((object)"CherryUser"))
			{
				UI.NewNotification("<color=#8765ca>[Atlas] An Cherry user left.</color>");
			}
			if (((Dictionary<object, object>)(object)otherPlayer.CustomProperties).ContainsKey((object)"AtlUser"))
			{
				UI.NewNotification("<color=#8765ca>[Atlas] An Atlas user left.</color>");
			}
		}
	}
	public class MenuManager
	{
		public static string[] tabs = new string[6] { "Self", "Lobby", "Spawn", "Visual", "Players", "Settings" };

		public static int currentTab = 0;

		public static bool isSectionOpen = false;

		public static Rect windowRect;

		public static bool uiopen = true;

		public static void Begin()
		{
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			GUILayout.BeginVertical(Array.Empty<GUILayoutOption>());
		}

		public static void End()
		{
			GUILayout.EndVertical();
			GUILayout.EndVertical();
			GUILayout.EndHorizontal();
			isSectionOpen = false;
		}

		public static void Separate()
		{
			GUILayout.EndVertical();
			GUILayout.EndVertical();
			GUILayout.BeginVertical(Array.Empty<GUILayoutOption>());
			isSectionOpen = false;
		}

		public static void NewSection(string text)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Expected O, but got Unknown
			if (isSectionOpen)
			{
				GUILayout.EndVertical();
				GUILayout.Space(4f);
			}
			float num = 285f;
			GUILayout.BeginVertical(new GUIContent(), GUIStyle.op_Implicit("Box"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(num) });
			GUILayout.Box(text ?? "", Array.Empty<GUILayoutOption>());
			isSectionOpen = true;
		}

		public static void NewScrollView(Vector2 scrollPos, int width, int height)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			scrollPos = GUILayout.BeginScrollView(scrollPos, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Width((float)width),
				GUILayout.Height((float)height)
			});
		}

		public static void NewButton(string text, Action callback)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Expected O, but got Unknown
			GUIStyle val = new GUIStyle(GUIStyle.op_Implicit("Box"))
			{
				fontSize = 12,
				richText = false
			};
			if (GUILayout.Button(text, val, Array.Empty<GUILayoutOption>()))
			{
				callback();
			}
		}

		public static void NewLabel(string text)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Expected O, but got Unknown
			GUIStyle val = new GUIStyle(GUIStyle.op_Implicit("Box"))
			{
				fontSize = 12
			};
			GUILayout.Label("<b><color=white>" + text + "</color></b>", val, Array.Empty<GUILayoutOption>());
		}

		public static void EndScrollView()
		{
			GUILayout.EndScrollView();
		}

		public static bool NewToggle(bool value, string text)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Expected O, but got Unknown
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			GUIStyle val = new GUIStyle(GUIStyle.op_Implicit("Box"))
			{
				fontSize = 12
			};
			if (value)
			{
				if (!Visual.ActiveModules.Contains(text))
				{
					Visual.ActiveModules.Add(text);
				}
				val.normal.textColor = new Color(0f, 1f, 0f);
				text += " [ENABLED]";
			}
			else
			{
				if (Visual.ActiveModules.Contains(text))
				{
					Visual.ActiveModules.Remove(text);
				}
				val.normal.textColor = new Color(1f, 0f, 0f);
				text += " [DISABLED]";
			}
			return GUILayout.Toggle(value, text, val, Array.Empty<GUILayoutOption>());
		}

		public static float NewSlider(string text, float value, float minimum, float maximum)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Expected O, but got Unknown
			GUIStyle val = new GUIStyle(GUIStyle.op_Implicit("Box"))
			{
				fontSize = 12
			};
			GUILayout.Label(text + " : " + value, val, Array.Empty<GUILayoutOption>());
			return GUILayout.HorizontalSlider(value, minimum, maximum, Array.Empty<GUILayoutOption>());
		}

		public static string NewTextField(string text)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Expected O, but got Unknown
			GUIStyle val = new GUIStyle(GUIStyle.op_Implicit("Box"))
			{
				fontSize = 12,
				richText = false
			};
			return GUILayout.TextField(text, val, Array.Empty<GUILayoutOption>());
		}
	}
	public class Render
	{
		private static Texture2D drawingTex;

		private static Color lastTexColour;

		private static Color __color;

		private static GUIStyle __style = new GUIStyle();

		private static Material overlayMaterial = null;

		private static GUIStyle __outlineStyle = new GUIStyle();

		public Texture2D Texture;

		public Color DefaultColor;

		public static Font gamefont;

		public Render()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Expected O, but got Unknown
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			Texture = new Texture2D(2, 2);
			for (int i = 0; i < ((Texture)Texture).width; i++)
			{
				for (int j = 0; j < ((Texture)Texture).height; j++)
				{
					Texture.SetPixel(i, j, DefaultColor);
				}
			}
		}

		public void Draw(Rect size, Color color, float r)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < 5; i++)
			{
				GUI.DrawTexture(size, (Texture)(object)Texture, (ScaleMode)Type.EmptyTypes.Length, Type.EmptyTypes.Length != 0, 0f, color, 0f, r);
			}
		}

		public void Draw(Rect size, Color color, Vector4 radius)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < 5; i++)
			{
				GUI.DrawTexture(size, (Texture)(object)Texture, (ScaleMode)Type.EmptyTypes.Length, Type.EmptyTypes.Length != 0, 0f, color, Vector4.zero, radius);
			}
		}

		public void DrawTransparent(Rect size, Color color, float r)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			GUI.DrawTexture(size, (Texture)(object)Texture, (ScaleMode)Type.EmptyTypes.Length, Type.EmptyTypes.Length != 0, 0f, color, 0f, r);
		}

		internal static void Init()
		{
			//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_0030: Expected O, but got Unknown
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)overlayMaterial == (Object)null)
			{
				overlayMaterial = new Material(Shader.Find("Hidden/Internal-Colored"))
				{
					hideFlags = (HideFlags)5
				};
				overlayMaterial.SetInt("_SrcBlend", 5);
				overlayMaterial.SetInt("_DstBlend", 10);
				overlayMaterial.SetInt("_Cull", 0);
				overlayMaterial.SetInt("_ZTest", 8);
				overlayMaterial.SetInt("_ZWrite", 0);
				overlayMaterial.SetColor("_Color", Color.white);
			}
		}

		internal static Color GetRainbow(float offset = 0f)
		{
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			float num = (Time.time + offset) * 2f;
			float num2 = Mathf.Sin(num) * 0.5f + 0.5f;
			float num3 = Mathf.Sin(num + 2f) * 0.5f + 0.5f;
			float num4 = Mathf.Sin(num + 4f) * 0.5f + 0.5f;
			return new Color(num2, num3, num4);
		}

		internal static void DrawString(Vector2 pos, string text, Color color, bool center = true, int size = 12, FontStyle fontStyle = 1, int depth = 1)
		{
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: 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_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Expected O, but got Unknown
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Expected O, but got Unknown
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: 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_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: Unknown result type (might be due to invalid IL or missing references)
			//IL_021c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: 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_0248: Unknown result type (might be due to invalid IL or missing references)
			//IL_0254: Unknown result type (might be due to invalid IL or missing references)
			//IL_026a: Unknown result type (might be due to invalid IL or missing references)
			//IL_027b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0287: Unknown result type (might be due to invalid IL or missing references)
			//IL_029d: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ca: 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)
			//IL_02e1: 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_0308: Unknown result type (might be due to invalid IL or missing references)
			//IL_030e: Unknown result type (might be due to invalid IL or missing references)
			//IL_031e: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)gamefont == (Object)null)
			{
				gamefont = ((TMP_Text)Object.FindObjectOfType<PlayerConnectionLog>().text).font.sourceFontFile;
			}
			__style.fontSize = size;
			__style.richText = true;
			__style.font = gamefont;
			__style.normal.textColor = color;
			__style.fontStyle = fontStyle;
			__outlineStyle.fontSize = size;
			__outlineStyle.richText = true;
			__outlineStyle.font = gamefont;
			__outlineStyle.normal.textColor = new Color(0f, 0f, 0f, 1f);
			__outlineStyle.fontStyle = fontStyle;
			GUIContent val = new GUIContent(text);
			GUIContent val2 = new GUIContent(text);
			if (center)
			{
				pos.x -= __style.CalcSize(val).x / 2f;
			}
			switch (depth)
			{
			case 0:
				GUI.Label(new Rect(pos.x, pos.y, 300f, 25f), val, __style);
				break;
			case 1:
				GUI.Label(new Rect(pos.x + 1f, pos.y + 1f, 300f, 25f), val2, __outlineStyle);
				GUI.Label(new Rect(pos.x, pos.y, 300f, 25f), val, __style);
				break;
			case 2:
				GUI.Label(new Rect(pos.x + 1f, pos.y + 1f, 300f, 25f), val2, __outlineStyle);
				GUI.Label(new Rect(pos.x - 1f, pos.y - 1f, 300f, 25f), val2, __outlineStyle);
				GUI.Label(new Rect(pos.x, pos.y, 300f, 25f), val, __style);
				break;
			case 3:
				GUI.Label(new Rect(pos.x + 1f, pos.y + 1f, 300f, 25f), val2, __outlineStyle);
				GUI.Label(new Rect(pos.x - 1f, pos.y - 1f, 300f, 25f), val2, __outlineStyle);
				GUI.Label(new Rect(pos.x, pos.y - 1f, 300f, 25f), val2, __outlineStyle);
				GUI.Label(new Rect(pos.x, pos.y + 1f, 300f, 25f), val2, __outlineStyle);
				GUI.Label(new Rect(pos.x, pos.y, 300f, 25f), val, __style);
				break;
			}
		}

		internal static void DrawBox(Color color, Vector2 position, float width, float height)
		{
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: 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_006b: 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_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: 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_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: 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_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: 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_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			Init();
			width /= 2f;
			height /= 2f;
			GL.PushMatrix();
			overlayMaterial.SetPass(0);
			GL.LoadPixelMatrix(0f, (float)Screen.width, (float)Screen.height, 0f);
			GL.Begin(7);
			GL.Color(color);
			GL.TexCoord2(position.x + width, position.y + height);
			GL.Vertex(new Vector3(position.x + width, position.y + height));
			GL.TexCoord2(position.x + width, position.y - height);
			GL.Vertex(new Vector3(position.x + width, position.y - height));
			GL.TexCoord2(position.x - width, position.y - height);
			GL.Vertex(new Vector3(position.x - width, position.y - height));
			GL.TexCoord2(position.x - width, position.y + height);
			GL.Vertex(new Vector3(position.x - width, position.y + height));
			GL.End();
			GL.PopMatrix();
		}

		internal static bool IsOnScreen(Vector3 position)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			return position.y > 0.01f && position.y < (float)Screen.height - 5f && position.z > 0.01f;
		}

		internal static bool IsBehindCamera(Vector3 screenPosition)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return screenPosition.z < 0f;
		}

		internal static Vector3 ToScreen(Vector3 worldPosition)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = Camera.main.WorldToScreenPoint(worldPosition);
			val.y = (float)Screen.height - val.y;
			return val;
		}

		internal static void DrawCircle(Color color, Vector2 position, float radius)
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: 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_009f: Unknown result type (might be due to invalid IL or missing references)
			Init();
			GL.PushMatrix();
			overlayMaterial.SetPass(0);
			GL.LoadPixelMatrix(0f, (float)Screen.width, (float)Screen.height, 0f);
			GL.Begin(2);
			GL.Color(color);
			for (float num = 0f; num < (float)Math.PI * 2f; num += 0.05f)
			{
				GL.Vertex(new Vector3(Mathf.Cos(num) * radius + position.x, Mathf.Sin(num) * radius + position.y));
				GL.Vertex(new Vector3(Mathf.Cos(num + 0.05f) * radius + position.x, Mathf.Sin(num + 0.05f) * radius + position.y));
			}
			GL.End();
			GL.PopMatrix();
		}

		internal static void DrawFullCircle(Color color, Vector2 position, float width, float height, float radius)
		{
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: 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_006b: 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_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: 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_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: 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_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: 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_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			Init();
			width /= 2f;
			height /= 2f;
			GL.PushMatrix();
			overlayMaterial.SetPass(0);
			GL.LoadPixelMatrix(0f, (float)Screen.width, (float)Screen.height, 0f);
			GL.Begin(2);
			GL.Color(color);
			GL.TexCoord2(position.x + width, position.y + height);
			GL.Vertex(new Vector3(position.x + width, position.y + height));
			GL.TexCoord2(position.x + width, position.y - height);
			GL.Vertex(new Vector3(position.x + width, position.y - height));
			GL.TexCoord2(position.x - width, position.y - height);
			GL.Vertex(new Vector3(position.x - width, position.y - height));
			GL.TexCoord2(position.x - width, position.y + height);
			GL.Vertex(new Vector3(position.x - width, position.y + height));
			for (float num = 0f; num < (float)Math.PI * 2f; num += 0.05f)
			{
				GL.Vertex(new Vector3(Mathf.Cos(num) * radius + position.x, Mathf.Sin(num) * radius + position.y));
				GL.Vertex(new Vector3(Mathf.Cos(num + 0.05f) * radius + position.x, Mathf.Sin(num + 0.05f) * radius + position.y));
			}
			GL.End();
			GL.PopMatrix();
		}

		internal static void DrawLine(Color color, Vector3 origin, Vector3 destination)
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			Init();
			GL.PushMatrix();
			overlayMaterial.SetPass(0);
			GL.LoadPixelMatrix(0f, (float)Screen.width, (float)Screen.height, 0f);
			GL.Begin(2);
			GL.Color(color);
			GL.Vertex(new Vector3(origin.x, origin.y));
			GL.Vertex(new Vector3(destination.x, destination.y));
			GL.End();
			GL.PopMatrix();
		}

		internal static void DrawLine1(Vector2 start, Vector2 end, Color color, float width)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: 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_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: 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)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: 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)
			Color color2 = GUI.color;
			float num = 57.29578f;
			Vector2 val = end - start;
			float num2 = num * Mathf.Atan(val.y / val.x);
			if (val.x < 0f)
			{
				num2 += 180f;
			}
			int num3 = (int)Mathf.Ceil(width / 2f);
			GUIUtility.RotateAroundPivot(num2, start);
			GUI.color = color;
			GUI.DrawTexture(new Rect(start.x, start.y - (float)num3, ((Vector2)(ref val)).magnitude, width), (Texture)(object)Texture2D.whiteTexture, (ScaleMode)0);
			GUIUtility.RotateAroundPivot(0f - num2, start);
			GUI.color = color2;
		}

		internal static void CornerBox(Vector2 Head, float Width, float Height, float thickness, Color color, bool outline)
		{
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0209: Unknown result type (might be due to invalid IL or missing references)
			//IL_0211: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: Unknown result type (might be due to invalid IL or missing references)
			//IL_022f: 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_0245: Unknown result type (might be due to invalid IL or missing references)
			//IL_0252: Unknown result type (might be due to invalid IL or missing references)
			//IL_025a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0268: Unknown result type (might be due to invalid IL or missing references)
			//IL_027d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0285: Unknown result type (might be due to invalid IL or missing references)
			//IL_0293: 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_02b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0309: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: 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_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: 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_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: 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_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: 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_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			int num = (int)(Width / 4f);
			int num2 = num;
			if (outline)
			{
				RectFilled(Head.x - Width / 2f - 1f, Head.y - 1f, num + 2, 3f, Color.black);
				RectFilled(Head.x - Width / 2f - 1f, Head.y - 1f, 3f, num2 + 2, Color.black);
				RectFilled(Head.x + Width / 2f - (float)num - 1f, Head.y - 1f, num + 2, 3f, Color.black);
				RectFilled(Head.x + Width / 2f - 1f, Head.y - 1f, 3f, num2 + 2, Color.black);
				RectFilled(Head.x - Width / 2f - 1f, Head.y + Height - 4f, num + 2, 3f, Color.black);
				RectFilled(Head.x - Width / 2f - 1f, Head.y + Height - (float)num2 - 4f, 3f, num2 + 2, Color.black);
				RectFilled(Head.x + Width / 2f - (float)num - 1f, Head.y + Height - 4f, num + 2, 3f, Color.black);
				RectFilled(Head.x + Width / 2f - 1f, Head.y + Height - (float)num2 - 4f, 3f, num2 + 3, Color.black);
			}
			RectFilled(Head.x - Width / 2f, Head.y, num, 1f, color);
			RectFilled(Head.x - Width / 2f, Head.y, 1f, num2, color);
			RectFilled(Head.x + Width / 2f - (float)num, Head.y, num, 1f, color);
			RectFilled(Head.x + Width / 2f, Head.y, 1f, num2, color);
			RectFilled(Head.x - Width / 2f, Head.y + Height - 3f, num, 1f, color);
			RectFilled(Head.x - Width / 2f, Head.y + Height - (float)num2 - 3f, 1f, num2, color);
			RectFilled(Head.x + Width / 2f - (float)num, Head.y + Height - 3f, num, 1f, color);
			RectFilled(Head.x + Width / 2f, Head.y + Height - (float)num2 - 3f, 1f, num2 + 1, color);
		}

		internal static void DrawHealth(Vector2 pos, float health, bool center = false)
		{
			//IL_001f: 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_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_0036: 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)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: 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_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: 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_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: 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_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			if (center)
			{
				pos -= new Vector2(26f, 0f);
			}
			pos += new Vector2(0f, 18f);
			BoxRect(new Rect(pos.x, pos.y, 52f, 5f), Color.black);
			pos += new Vector2(1f, 1f);
			Color color = Color.green;
			if (health <= 50f)
			{
				color = Color.yellow;
			}
			if (health <= 25f)
			{
				color = Color.red;
			}
			BoxRect(new Rect(pos.x, pos.y, 0.5f * health, 3f), color);
		}

		internal static void BoxRect(Rect rect, Color color)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: 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)
			//IL_0018: 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_002b: Unknown result type (might be due to invalid IL or missing references)
			if (color != __color)
			{
				drawingTex.SetPixel(0, 0, color);
				drawingTex.Apply();
				__color = color;
			}
			GUI.DrawTexture(rect, (Texture)(object)drawingTex);
		}

		internal static void RectFilled(float x, float y, float width, float height, Color color)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: 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)
			if (!Object.op_Implicit((Object)(object)drawingTex))
			{
				drawingTex = new Texture2D(1, 1);
			}
			if (color != lastTexColour)
			{
				drawingTex.SetPixel(0, 0, color);
				drawingTex.Apply();
				lastTexColour = color;
			}
			GUI.DrawTexture(new Rect(x, y, width, height), (Texture)(object)drawingTex);
		}
	}
	public class UI : MonoBehaviour
	{
		[CompilerGenerated]
		private sealed class <WFS>d__34 : IEnumerator<object>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private object <>2__current;

			public float seconds;

			public UI <>4__this;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <WFS>d__34(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0027: Unknown result type (might be due to invalid IL or missing references)
				//IL_0031: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = (object)new WaitForSeconds(seconds);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public static Color darkerColor = new Color(0.7f, 0.30745098f, 0.532549f);

		private bool menuOpen = true;

		private static Texture2D mainrender;

		public static Color clb = new Color(0.4745f, 0.6509f, 1f);

		public static Color cprp = new Color(0.9333f, 0.6667f, 1f);

		private Vector3 lookDirection = Vector3.forward;

		private Vector2 look;

		private int ModuleCount = 0;

		private bool oninit;

		public static KeyCode menubind = (KeyCode)277;

		public static KeyCode flybind = (KeyCode)102;

		public static KeyCode unlockbind = (KeyCode)92;

		private static bool setobjs;

		public float moveSpeed = 10f;

		public float verticalSpeed = 5f;

		public bool flyEnabled = true;

		private bool resetspeed = true;

		private bool resetgrav = true;

		private bool resetclimb = true;

		private float spawnCooldown = 0.05f;

		private float spawnTimer = 0f;

		private Item[] allitmes;

		private float checkcooldown = 0.5f;

		private float checktimer;

		private Luggage[] alllug;

		private float Lcheckcooldown = 0.5f;

		private float Lchecktimer;

		private GameObject gurt;

		public float laserRange = 100f;

		private Item GrabbedItem;

		private float iforogt = 0f;

		private void KH()
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Invalid comparison between Unknown and I4
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			if (!Input.anyKey || !Input.anyKeyDown)
			{
				return;
			}
			if (!Settings.menurec)
			{
				if ((int)menubind == 277)
				{
					if (Input.GetKeyDown((KeyCode)277) || Input.GetKeyDown((KeyCode)256))
					{
						menuOpen = !menuOpen;
					}
				}
				else if (Input.GetKeyDown(menubind))
				{
					menuOpen = !menuOpen;
				}
			}
			if (!Settings.unlockrec && Input.GetKeyDown(unlockbind))
			{
				Debug.Log((object)"down");
				Singleton<CursorHandler>.Instance.isMenuScene = !Singleton<CursorHandler>.Instance.isMenuScene;
			}
			if (Input.GetKeyDown((KeyCode)32) && (Object)(object)Character.localCharacter != (Object)null && Self.IJump)
			{
				((MonoBehaviourPun)Character.localCharacter).photonView.RPC("JumpRpc", (RpcTarget)0, new object[1] { false });
			}
		}

		private void Update()
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Expected O, but got Unknown
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: 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_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Expected O, but got Unknown
			//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Expected O, but got Unknown
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f5: Expected O, but got Unknown
			//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0200: Expected O, but got Unknown
			//IL_0200: Expected O, but got Unknown
			KH();
			if (oninit)
			{
				return;
			}
			mainrender = new Texture2D(2, 2);
			for (int i = 0; i < ((Texture)mainrender).width; i++)
			{
				for (int j = 0; j < ((Texture)mainrender).height; j++)
				{
					mainrender.SetPixel(i, j, Color.black);
				}
			}
			KeyCode val = (KeyCode)277;
			if (Enum.TryParse<KeyCode>(PlayerPrefs.GetString("atlasmenubind", ((object)(KeyCode)(ref val)).ToString()), out KeyCode result))
			{
				menubind = result;
				Debug.Log((object)$"menu bind key: {menubind}");
			}
			val = (KeyCode)102;
			if (Enum.TryParse<KeyCode>(PlayerPrefs.GetString("atlasflightbind", ((object)(KeyCode)(ref val)).ToString()), out KeyCode result2))
			{
				flybind = result2;
				Debug.Log((object)$"fL>Ight bind key: {flybind}");
			}
			val = (KeyCode)92;
			if (Enum.TryParse<KeyCode>(PlayerPrefs.GetString("atlasunlockbind", ((object)(KeyCode)(ref val)).ToString()), out KeyCode result3))
			{
				unlockbind = result3;
				Debug.Log((object)$"unlock bind key: {unlockbind}");
			}
			if (PlayerPrefs.GetString("seenvers") != "1.10.5")
			{
				Modal.OpenModal((HeaderModalOption)new DefaultHeaderModalOption("<color=#FF70C2>Atlas</color> 1.10.5", "Would you like to join the <color=#2457e5>discord</color>?"), (ModalContentOption)new ModalButtonsOption((Option[])(object)new Option[3]
				{
					new Option("Join", (Action)delegate
					{
						Application.OpenURL("https://discord.gg/YG9KPA7j2m");
					}),
					new Option("Not Now", (Action)null),
					new Option("Dont Show Again", (Action)delegate
					{
						PlayerPrefs.SetString("seenvers", "1.10.5");
					})
				}), (Action)null);
			}
			PhotonNetwork.NetworkingClient.EventReceived += Recieved;
			oninit = true;
		}

		private void Recieved(EventData eventData)
		{
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Expected O, but got Unknown
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Expected O, but got Unknown
			//IL_00f3: Expected O, but got Unknown
			if (eventData.Code != 18)
			{
				return;
			}
			if (eventData.Sender != PhotonNetwork.MasterClient.ActorNumber)
			{
				Debug.LogWarning((object)"sum1 just tried to kick us... ts so smart");
				NewDebugNotif($"Blocked fake kick event from non-master client (Actor #{eventData.Sender})");
			}
			else
			{
				if (!(eventData.CustomData is object[] array) || array.Length < 1)
				{
					return;
				}
				int num = (int)array[0];
				string text = (string)array[1];
				if (num == PhotonNetwork.LocalPlayer.ActorNumber)
				{
					Debug.LogWarning((object)"Recieved Kick from master client, leaving room");
					GameHandler.GetService<SteamLobbyHandler>().LeaveLobby();
					if (PhotonNetwork.InRoom)
					{
						PhotonNetwork.Disconnect();
					}
					Modal.OpenModal((HeaderModalOption)new DefaultHeaderModalOption("<color=#FF70C2>Atlas</color>", text), (ModalContentOption)new ModalButtonsOption((Option[])(object)new Option[1]
					{
						new Option("Okay", (Action)null)
					}), (Action)null);
				}
			}
		}

		internal static Vector3 LookToEuler(Vector2 lookRotationValues)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			return new Vector3(0f - lookRotationValues.y, lookRotationValues.x, 0f);
		}

		internal static Vector3 EulerToDirection(Vector3 euler, Vector3 targetDir)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			return Quaternion.Euler(euler) * targetDir;
		}

		internal static Vector3 LookToDirection(Vector3 look, Vector3 targetDir)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			return EulerToDirection(LookToEuler(Vector2.op_Implicit(look)), targetDir);
		}

		[IteratorStateMachine(typeof(<WFS>d__34))]
		public IEnumerator WFS(float seconds)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <WFS>d__34(0)
			{
				<>4__this = this,
				seconds = seconds
			};
		}

		public static void NewNotification(string the)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			Scene activeScene = SceneManager.GetActiveScene();
			if (!(((Scene)(ref activeScene)).name != "Title"))
			{
				return;
			}
			PlayerConnectionLog val = Object.FindFirstObjectByType<PlayerConnectionLog>();
			if ((Object)(object)val == (Object)null)
			{
				return;
			}
			MethodInfo method = typeof(PlayerConnectionLog).GetMethod("AddMessage", BindingFlags.Instance | BindingFlags.NonPublic);
			if (method != null)
			{
				method.Invoke(val, new object[1] { the });
				if (Object.op_Implicit((Object)(object)val.sfxJoin))
				{
					val.sfxJoin.Play(default(Vector3));
				}
			}
			else
			{
				Debug.LogWarning((object)"AddMessage method not found.");
			}
		}

		public static void NewDebugNotif(string the)
		{
			if (Settings.debugnotifs)
			{
				NewNotification("<color=#8765ca>[Atlas] " + the + "</color>");
			}
		}

		private void FixedUpdate()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			if (PhotonNetwork.InRoom)
			{
				Hashtable val = new Hashtable();
				val[(object)"AtlUser"] = PhotonNetwork.GetPing();
				PhotonNetwork.LocalPlayer.SetCustomProperties(val, (Hashtable)null, (WebFlags)null);
			}
			GameObject val2 = GameObject.Find("Post Fog");
			if ((Object)(object)val2 != (Object)null)
			{
				val2.SetActive(!Visual.DisableFog);
			}
		}

		private void OnGUI()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Expected O, but got Unknown
			//IL_0047: 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_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: 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_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: 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_0139: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_0613: Unknown result type (might be due to invalid IL or missing references)
			//IL_0622: Unknown result type (might be due to invalid IL or missing references)
			//IL_062c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0578: Unknown result type (might be due to invalid IL or missing references)
			//IL_0587: Unknown result type (might be due to invalid IL or missing references)
			//IL_0591: Unknown result type (might be due to invalid IL or missing references)
			//IL_0555: Unknown result type (might be due to invalid IL or missing references)
			//IL_055a: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d4: 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_01f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0204: Unknown result type (might be due to invalid IL or missing references)
			//IL_020e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0210: Unknown result type (might be due to invalid IL or missing references)
			//IL_0218: 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_0228: Unknown result type (might be due to invalid IL or missing references)
			//IL_022d: 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_0239: 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_0242: Unknown result type (might be due to invalid IL or missing references)
			//IL_024a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0252: Unknown result type (might be due to invalid IL or missing references)
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_025c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0263: Unknown result type (might be due to invalid IL or missing references)
			//IL_0265: Unknown result type (might be due to invalid IL or missing references)
			//IL_026d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0275: 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_0281: Unknown result type (might be due to invalid IL or missing references)
			//IL_0286: Unknown result type (might be due to invalid IL or missing references)
			//IL_028d: Unknown result type (might be due to invalid IL or missing references)
			//IL_028f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0296: Unknown result type (might be due to invalid IL or missing references)
			//IL_029e: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_02af: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0302: Unknown result type (might be due to invalid IL or missing references)
			//IL_0309: Unknown result type (might be due to invalid IL or missing references)
			//IL_030b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0313: Unknown result type (might be due to invalid IL or missing references)
			//IL_031a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0321: Unknown result type (might be due to invalid IL or missing references)
			//IL_0326: Unknown result type (might be due to invalid IL or missing references)
			//IL_032b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0332: Unknown result type (might be due to invalid IL or missing references)
			//IL_0334: Unknown result type (might be due to invalid IL or missing references)
			//IL_033b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0342: Unknown result type (might be due to invalid IL or missing references)
			//IL_0349: Unknown result type (might be due to invalid IL or missing references)
			//IL_034e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0353: Unknown result type (might be due to invalid IL or missing references)
			//IL_0698: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_065d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0662: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_07bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_038d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0392: Unknown result type (might be due to invalid IL or missing references)
			//IL_039a: Unknown result type (might be due to invalid IL or missing references)
			//IL_039c: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03db: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0411: Unknown result type (might be due to invalid IL or missing references)
			//IL_0418: Unknown result type (might be due to invalid IL or missing references)
			//IL_0422: Unknown result type (might be due to invalid IL or missing references)
			//IL_0429: Unknown result type (might be due to invalid IL or missing references)
			//IL_0435: Unknown result type (might be due to invalid IL or missing references)
			//IL_043c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0448: Unknown result type (might be due to invalid IL or missing references)
			//IL_044f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0469: Unknown result type (might be due to invalid IL or missing references)
			//IL_0474: Unknown result type (might be due to invalid IL or missing references)
			//IL_047b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0495: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0996: Unknown result type (might be due to invalid IL or missing references)
			//IL_09a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_09af: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_09cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a04: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a18: Unknown result type (might be due to invalid IL or missing references)
			//IL_08f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0905: Unknown result type (might be due to invalid IL or missing references)
			//IL_090f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0914: Unknown result type (might be due to invalid IL or missing references)
			//IL_0921: Unknown result type (might be due to invalid IL or missing references)
			//IL_085b: Unknown result type (might be due to invalid IL or missing references)
			//IL_086a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0874: Unknown result type (might be due to invalid IL or missing references)
			//IL_0879: Unknown result type (might be due to invalid IL or missing references)
			//IL_0886: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d6a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d7e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d92: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d97: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ce7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cfb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e1b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e22: Expected O, but got Unknown
			//IL_0e66: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e6b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e70: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e7a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e8d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e9b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e9d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ea7: Unknown result type (might be due to invalid IL or missing references)
			//IL_116f: Unknown result type (might be due to invalid IL or missing references)
			//IL_1179: Invalid comparison between Unknown and I4
			//IL_10ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_1109: Invalid comparison between Unknown and I4
			//IL_0f64: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f69: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f6e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f78: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f8b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1020: Unknown result type (might be due to invalid IL or missing references)
			//IL_1025: Unknown result type (might be due to invalid IL or missing references)
			//IL_102a: Unknown result type (might be due to invalid IL or missing references)
			//IL_102c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f99: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f9b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fa8: Unknown result type (might be due to invalid IL or missing references)
			//IL_122c: Unknown result type (might be due to invalid IL or missing references)
			//IL_1231: Unknown result type (might be due to invalid IL or missing references)
			//IL_1243: Unknown result type (might be due to invalid IL or missing references)
			//IL_1245: Unknown result type (might be due to invalid IL or missing references)
			//IL_124a: Unknown result type (might be due to invalid IL or missing references)
			//IL_124c: Unknown result type (might be due to invalid IL or missing references)
			//IL_1068: Unknown result type (might be due to invalid IL or missing references)
			//IL_107b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1080: Unknown result type (might be due to invalid IL or missing references)
			//IL_135e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1365: Unknown result type (might be due to invalid IL or missing references)
			//IL_136a: Unknown result type (might be due to invalid IL or missing references)
			//IL_136f: Unknown result type (might be due to invalid IL or missing references)
			//IL_1394: Unknown result type (might be due to invalid IL or missing references)
			//IL_1399: Unknown result type (might be due to invalid IL or missing references)
			//IL_13a4: Expected O, but got Unknown
			//IL_13a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_13a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_13b4: Expected O, but got Unknown
			//IL_13e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_13f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_140f: Unknown result type (might be due to invalid IL or missing references)
			//IL_1419: Expected O, but got Unknown
			//IL_1414: Unknown result type (might be due to invalid IL or missing references)
			//IL_1419: Unknown result type (might be due to invalid IL or missing references)
			//IL_1424: Unknown result type (might be due to invalid IL or missing references)
			//IL_142e: Expected O, but got Unknown
			//IL_1429: Unknown result type (might be due to invalid IL or missing references)
			//IL_142e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1454: Unknown result type (might be due to invalid IL or missing references)
			//IL_1459: Unknown result type (might be due to invalid IL or missing references)
			//IL_145c: Unknown result type (might be due to invalid IL or missing references)
			//IL_1463: Unknown result type (might be due to invalid IL or missing references)
			//IL_14b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_14c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_14c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_14d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_14e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_150a: Unknown result type (might be due to invalid IL or missing references)
			//IL_1513: Unknown result type (might be due to invalid IL or missing references)
			//IL_1482: Unknown result type (might be due to invalid IL or missing references)
			//IL_1489: Unknown result type (might be due to invalid IL or missing references)
			//IL_1475: Unknown result type (might be due to invalid IL or missing references)
			//IL_15fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_1605: Unknown result type (might be due to invalid IL or missing references)
			//IL_1613: Unknown result type (might be due to invalid IL or missing references)
			//IL_161a: Unknown result type (might be due to invalid IL or missing references)
			//IL_162c: Unknown result type (might be due to invalid IL or missing references)
			//IL_1633: Unknown result type (might be due to invalid IL or missing references)
			//IL_1640: Unknown result type (might be due to invalid IL or missing references)
			//IL_1655: Unknown result type (might be due to invalid IL or missing references)
			//IL_165c: Unknown result type (might be due to invalid IL or missing references)
			//IL_166a: Unknown result type (might be due to invalid IL or missing references)
			//IL_1671: Unknown result type (might be due to invalid IL or missing references)
			//IL_1683: Unknown result type (might be due to invalid IL or missing references)
			//IL_168a: Unknown result type (might be due to invalid IL or missing references)
			//IL_1697: Unknown result type (might be due to invalid IL or missing references)
			//IL_154f: Unknown result type (might be due to invalid IL or missing references)
			//IL_1556: Unknown result type (might be due to invalid IL or missing references)
			//IL_1564: Unknown result type (might be due to invalid IL or missing references)
			//IL_156b: Unknown result type (might be due to invalid IL or missing references)
			//IL_157d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1584: Unknown result type (might be due to invalid IL or missing references)
			//IL_1591: Unknown result type (might be due to invalid IL or missing references)
			//IL_15a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_15ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_15bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_15c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_15d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_15db: Unknown result type (might be due to invalid IL or missing references)
			//IL_15e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_149b: Unknown result type (might be due to invalid IL or missing references)
			if (menuOpen)
			{
				MenuManager.windowRect = GUI.Window(0, MenuManager.windowRect, new WindowFunction(BuildMenu), "<color=#FF70C2>Atlas</color> [" + ((object)(KeyCode)(ref menubind)).ToString() + "] (1.10.5)", GUIStyle.op_Implicit("Box"));
			}
			RaycastHit val = default(RaycastHit);
			if (Self.ClickToTp && Input.GetMouseButtonDown(0) && PExt.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), ref val, HelperExtensions.ToLayerMask((LayerType)1), -1f))
			{
				((MonoBehaviourPun)Character.localCharacter).photonView.RPC("WarpPlayerRPC", (RpcTarget)0, new object[2]
				{
					((RaycastHit)(ref val)).point,
					true
				});
			}
			RaycastHit val2 = default(RaycastHit);
			if (Lobby.PingWithAll && Input.GetMouseButton(2) && PExt.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), ref val2, HelperExtensions.ToLayerMask((LayerType)1), -1f))
			{
				PointPinger[] array = Object.FindObjectsOfType<PointPinger>();
				foreach (PointPinger val3 in array)
				{
					((Component)val3).GetComponent<PhotonView>().RPC("ReceivePoint_Rpc", (RpcTarget)0, new object[2]
					{
						((RaycastHit)(ref val2)).point,
						((RaycastHit)(ref val2)).normal
					});
				}
			}
			if (Self.NoR)
			{
				Character.localCharacter.data.fallSeconds = 0f;
			}
			if (Visual.Watermark)
			{
				Watermark.Draw();
			}
			if (Visual.Boxes)
			{
				Vector2 val4 = default(Vector2);
				Vector2 val5 = default(Vector2);
				Vector2 val8 = default(Vector2);
				foreach (Character allCharacter in Character.AllCharacters)
				{
					if ((Object)(object)allCharacter == (Object)null)
					{
						return;
					}
					Renderer mainRenderer = (Renderer)(object)allCharacter.refs.mainRenderer;
					Bounds bounds = mainRenderer.bounds;
					Vector3 center = ((Bounds)(ref bounds)).center;
					Vector3 extents = ((Bounds)(ref bounds)).extents;
					Vector3[] array2 = (Vector3[])(object)new Vector3[8]
					{
						center + new Vector3(0f - extents.x, 0f - extents.y, 0f - extents.z),
						center + new Vector3(extents.x, 0f - extents.y, 0f - extents.z),
						center + new Vector3(0f - extents.x, 0f - extents.y, extents.z),
						center + new Vector3(extents.x, 0f - extents.y, extents.z),
						center + new Vector3(0f - extents.x, extents.y, 0f - extents.z),
						center + new Vector3(extents.x, extents.y, 0f - extents.z),
						center + new Vector3(0f - extents.x, extents.y, extents.z),
						center + new Vector3(extents.x, extents.y, extents.z)
					};
					((Vector2)(ref val4))..ctor(float.MaxValue, float.MaxValue);
					((Vector2)(ref val5))..ctor(float.MinValue, float.MinValue);
					bool flag = true;
					Vector3[] array3 = array2;
					foreach (Vector3 val6 in array3)
					{
						Vector3 val7 = Camera.main.WorldToScreenPoint(val6);
						if (val7.z < 0f)
						{
							flag = false;
							break;
						}
						val7.y = (float)Screen.height - val7.y;
						val4 = Vector2.Min(val4, Vector2.op_Implicit(val7));
						val5 = Vector2.Max(val5, Vector2.op_Implicit(val7));
					}
					if (flag)
					{
						float num = val5.x - val4.x;
						float num2 = val5.y - val4.y;
						((Vector2)(ref val8))..ctor(val4.x, val4.y);
						Render.RectFilled(val8.x, val8.y, num, 1f, allCharacter.refs.customization.PlayerColor);
						Render.RectFilled(val8.x, val8.y, 1f, num2, allCharacter.refs.customization.PlayerColor);
						Render.RectFilled(val8.x + num, val8.y, 1f, num2, allCharacter.refs.customization.PlayerColor);
						Render.RectFilled(val8.x, val8.y + num2, num, 1f, allCharacter.refs.customization.PlayerColor);
					}
				}
			}
			if (Spawn.FlagGun && Input.GetMouseButton(0))
			{
				if ((Object)(object)gurt == (Object)null)
				{
					gurt = PhotonNetwork.Instantiate("0_Items/Flag_Plantable_Seagull", Vector3.zero, Quaternion.identity, (byte)0, (object[])null);
				}
				Ray val9 = default(Ray);
				((Ray)(ref val9))..ctor(((Component)Camera.main).transform.position, ((Component)Camera.main).transform.forward);
				RaycastHit val10 = default(RaycastHit);
				if (Physics.Raycast(val9, ref val10, laserRange))
				{
					((MonoBehaviourPun)gurt.GetComponent<Constructable>()).photonView.RPC("CreatePrefabRPC", (RpcTarget)0, new object[2]
					{
						((RaycastHit)(ref val10)).point,
						Quaternion.identity
					});
				}
			}
			if (Lobby.BlowdartShotGun && Input.GetMouseButton(0))
			{
				Ray val11 = default(Ray);
				((Ray)(ref val11))..ctor(((Component)Camera.main).transform.position, ((Component)Camera.main).transform.forward);
				RaycastHit val12 = default(RaycastHit);
				if (Physics.Raycast(val11, ref val12, laserRange))
				{
					Action_RaycastDart val13 = Object.FindFirstObjectByType<Action_RaycastDart>();
					if ((Object)(object)val13 == (Object)null)
					{
						val13 = PhotonNetwork.Instantiate("0_Items/HealingDart Variant", Vector3.zero, Quaternion.identity, (byte)0, (object[])null).GetComponent<Action_RaycastDart>();
						NewDebugNotif("Spawned healingdart at 0,0,0");
					}
					((Component)val13).GetComponent<PhotonView>().RPC("RPC_DartImpact", (RpcTarget)0, new object[3]
					{
						null,
						((RaycastHit)(ref val12)).point,
						((RaycastHit)(ref val12)).point
					});
				}
			}
			if (Self.Deaggro)
			{
				BeeSwarm[] array4 = Object.FindObjectsOfType<BeeSwarm>();
				foreach (BeeSwarm val14 in array4)
				{
					if ((Object)(object)val14.currentAggroCharacter == (Object)(object)Character.localCharacter)
					{
						((MonoBehaviourPun)val14).photonView.RPC("DisperseRPC", (RpcTarget)0, new object[0]);
					}
				}
			}
			if (Self.testting && Input.GetKeyDown((KeyCode)103))
			{
				if (((Behaviour)((Component)Character.localCharacter).GetComponent<CharacterMovement>()).enabled)
				{
					((Behaviour)((Component)Character.localCharacter).GetComponent<CharacterMovement>()).enabled = false;
				}
				else
				{
					((Behaviour)((Component)Character.localCharacter).GetComponent<CharacterMovement>()).enabled = true;
				}
			}
			if (Spawn.GravityGun && Input.GetKey((KeyCode)102))
			{
				Ray val15 = default(Ray);
				((Ray)(ref val15))..ctor(((Component)Camera.main).transform.position, ((Component)Camera.main).transform.forward);
				RaycastHit val16 = default(RaycastHit);
				if (Physics.Raycast(val15, ref val16, laserRange))
				{
					Debug.Log((object)("ray hit: " + ((Object)((RaycastHit)(ref val16)).collider).name));
					Item componentInParent = ((Component)((RaycastHit)(ref val16)).collider).GetComponentInParent<Item>();
					if ((Object)(object)componentInParent != (Object)null && (Object)(object)((MonoBehaviourPun)componentInParent).photonView != (Object)null)
					{
						Debug.Log((object)"im nut");
						GrabbedItem = componentInParent;
						((MonoBehaviourPun)componentInParent).photonView.RPC("SetKinematicRPC", (RpcTarget)0, new object[3]
						{
							true,
							((Component)Camera.main).transform.position + ((Component)Camera.main).transform.forward * 6f,
							Quaternion.identity
						});
					}
					else
					{
						Debug.Log((object)"no itm or pv");
					}
				}
				else
				{
					Debug.Log((object)"hit nothing");
				}
				if ((Object)(object)GrabbedItem != (Object)null)
				{
					((MonoBehaviourPun)GrabbedItem).photonView.RPC("SetKinematicRPC", (RpcTarget)0, new object[3]
					{
						true,
						((Component)Camera.main).transform.position + ((Component)Camera.main).transform.forward * 6f,
						Quaternion.identity
					});
				}
			}
			if (Spawn.DrawItem)
			{
				if (Input.GetMouseButton(0))
				{
					spawnTimer -= Time.deltaTime;
					if (spawnTimer <= 0f)
					{
						spawnTimer = spawnCooldown;
						Vector3 val17 = ((Component)Camera.main).transform.position + ((Component)Camera.main).transform.forward * 2f;
						Item component = PhotonNetwork.Instantiate("0_Items/" + Spawn.SItemName, val17, Quaternion.identity, (byte)0, (object[])null).GetComponent<Item>();
						((MonoBehaviourPun)component).photonView.RPC("SetKinematicRPC", (RpcTarget)0, new object[3]
						{
							true,
							((Component)component).transform.position,
							((Component)component).transform.rotation
						});
					}
				}
				else
				{
					spawnTimer = 0f;
				}
			}
			if (Self.Noclip)
			{
				Collider[] array5 = Object.FindObjectsOfType<Collider>();
				foreach (Collider val18 in array5)
				{
					if (val18.enabled)
					{
						val18.enabled = false;
					}
					setobjs = false;
				}
			}
			else if (!setobjs)
			{
				Collider[] array6 = Object.FindObjectsOfType<Collider>();
				foreach (Collider val19 in array6)
				{
					if (!val19.enabled)
					{
						val19.enabled = true;
					}
				}
				setobjs = true;
			}
			if (Self.CClimbSpeed)
			{
				Character.localCharacter.refs.climbing.climbSpeedMod = Self.ClimbSpeed;
				Character.localCharacter.refs.vineClimbing.climbSpeedMod = Self.ClimbSpeed;
				Character.localCharacter.refs.ropeHandling.climbSpeedMod = Self.ClimbSpeed;
				resetclimb = false;
			}
			else if (!resetclimb)
			{
				Character.localCharacter.refs.climbing.climbSpeedMod = 1f;
				Character.localCharacter.refs.vineClimbing.climbSpeedMod = 1f;
				Character.localCharacter.refs.ropeHandling.climbSpeedMod = 1f;
				resetclimb = true;
			}
			if (Self.IStamina)
			{
				Character.localCharacter.data.currentStamina = 1f;
			}
			if (Self.CSpeed)
			{
				Character.localCharacter.refs.movement.movementModifier = Self.MovementSpeed;
				resetspeed = false;
			}
			else if (!resetspeed)
			{
				Character.localCharacter.refs.movement.movementModifier = 1f;
				resetspeed = true;
			}
			if (Self.CJumpGrav)
			{
				Character.localCharacter.refs.movement.jumpGravity = Self.JumpGrav;
				resetgrav = false;
			}
			else if (!resetgrav)
			{
				Character.localCharacter.refs.movement.jumpGravity = 10f;
				resetgrav = true;
			}
			if (Spawn.FreezeItems && !Spawn.SpinItems)
			{
				Item[] array7 = Object.FindObjectsOfType<Item>();
				foreach (Item val20 in array7)
				{
					((MonoBehaviourPun)val20).photonView.RPC("SetKinematicRPC", (RpcTarget)0, new object[3]
					{
						true,
						((Component)val20).transform.position,
						((Component)val20).transform.rotation
					});
				}
			}
			if (Spawn.SpinItems)
			{
				Item[] array8 = Object.FindObjectsOfType<Item>();
				foreach (Item val21 in array8)
				{
					((MonoBehaviourPun)val21).photonView.RPC("SetKinematicRPC", (RpcTarget)0, new object[3]
					{
						Spawn.FreezeItems,
						((Component)val21).transform.position,
						((Component)val21).transform.rotation * Quaternion.Euler(0f, Spawn.SpinSpeed, 0f)
					});
				}
			}
			if (Self.CSpam)
			{
				Character.localCharacter.refs.customization.RandomizeCosmetics();
			}
			if (Visual.LESp)
			{
				if (Time.time - Lchecktimer > Lcheckcooldown)
				{
					alllug = Object.FindObjectsOfType<Luggage>();
					Lchecktimer = Time.time;
				}
				GUIStyle val22 = new GUIStyle();
				if (alllug != null)
				{
					Luggage[] array9 = alllug;
					foreach (Luggage val23 in array9)
					{
						if ((Object)(object)val23 != (Object)null)
						{
							Vector3 val24 = Camera.main.WorldToScreenPoint(((Component)val23).transform.position);
							val24.y = (float)Screen.height - (val24.y + 1f);
							if (Render.IsOnScreen(val24))
							{
								Render.DrawString(Vector2.op_Implicit(val24), "Luggage", Color.magenta, center: true, 12, (FontStyle)1, 0);
							}
						}
					}
				}
			}
			else
			{
				Lchecktimer = 0f;
			}
			if (Visual.ItemTags)
			{
				if (Time.time - checktimer > checkcooldown)
				{
					allitmes = Object.FindObjectsOfType<Item>();
					checktimer = Time.time;
				}
				if (allitmes != null)
				{
					Item[] array10 = allitmes;
					foreach (Item val25 in array10)
					{
						if ((Object)(object)val25 != (Object)null)
						{
							Vector3 val26 = Camera.main.WorldToScreenPoint(((Component)val25).transform.position);
							val26.y = (float)Screen.height - (val26.y + 1f);
							if (Render.IsOnScreen(val26))
							{
								Render.DrawString(Vector2.op_Implicit(val26), val25.GetItemName((ItemInstanceData)null), Color.cyan, center: true, 12, (FontStyle)1, 0);
							}
						}
					}
				}
			}
			else
			{
				checktimer = 0f;
			}
			if (Visual.Tracers)
			{
				foreach (Character allCharacter2 in Character.AllCharacters)
				{
					if (((MonoBehaviourPun)allCharacter2).photonView.IsMine)
					{
						continue;
					}
					Vector3 val27 = Render.ToScreen(allCharacter2.Head);
					if (!Render.IsBehindCamera(val27))
					{
						float num6 = 0f;
						int num7 = 0;
						if (num7 % 2 == 0)
						{
							num6 += 0.01f;
						}
						num7++;
						Render.DrawLine(Render.GetRainbow(num6), new Vector3((float)(Screen.width / 2), (float)Screen.height), val27);
					}
				}
			}
			if ((Object)(object)Character.localCharacter != (Object)null && (Object)(object)((Component)Character.localCharacter).transform.GetChild(2) != (Object)null)
			{
				if (Self.BadMic)
				{
					if ((int)((Component)((Component)Character.localCharacter).transform.GetChild(2)).GetComponent<Recorder>().SamplingRate != 8000)
					{
						((Component)((Component)Character.localCharacter).transform.GetChild(2)).GetComponent<Recorder>().SamplingRate = (SamplingRate)8000;
						((Component)((Component)Character.localCharacter).transform.GetChild(2)).GetComponent<Recorder>().Bitrate = 6000;
					}
				}
				else if ((int)((Component)((Component)Character.localCharacter).transform.GetChild(2)).GetComponent<Recorder>().SamplingRate == 8000)
				{
					((Component)((Component)Character.localCharacter).transform.GetChild(2)).GetComponent<Recorder>().SamplingRate = (SamplingRate)24000;
					((Component)((Component)Character.localCharacter).transform.GetChild(2)).GetComponent<Recorder>().Bitrate = 30000;
				}
				((Component)((Component)Character.localCharacter).transform.GetChild(2)).GetComponent<Recorder>().DebugEchoMode = Self.HearYourself;
			}
			if (!Visual.PlayerTags)
			{
				return;
			}
			Vector2 val32 = default(Vector2);
			foreach (Character allCharacter3 in Character.AllCharacters)
			{
				if (((MonoBehaviourPun)allCharacter3).photonView.IsMine)
				{
					continue;
				}
				Vector3 head = allCharacter3.Head;
				head.y += 0.5f;
				Vector3 val28 = Render.ToScreen(head);
				if (Render.IsBehindCamera(val28))
				{
					continue;
				}
				string text;
				if (((Dictionary<object, object>)(object)allCharacter3.refs.view.Owner.CustomProperties).ContainsKey((object)"AtlUser"))
				{
					text = "Name [" + allCharacter3.refs.view.Owner.NickName + "] [Atlas]";
				}
				else
				{
					text = "Name [" + allCharacter3.refs.view.Owner.NickName + "]";
				}
				text = ((!((Dictionary<object, object>)(object)allCharacter3.refs.view.Owner.CustomProperties).ContainsKey((object)"CherryUser")) ? ("Name [" + allCharacter3.refs.view.Owner.NickName + "]") : ("Name [" + allCharacter3.refs.view.Owner.NickName + "] <color=#c53637>[Cherry]</color>"));
				Vector3 val29 = Character.localCharacter.Head - allCharacter3.Head;
				string text2 = "Distance [" + Math.Round(((Vector3)(ref val29)).magnitude, 1) + "]";
				GUIStyle val30 = new GUIStyle
				{
					fontSize = 10
				};
				GUIStyle val31 = new GUIStyle
				{
					fontSize = 10
				};
				float num8 = 0f;
				int num9 = 0;
				if (num9 % 2 == 0)
				{
					num8 += 0.01f;
				}
				num9++;
				val30.normal.textColor = Color.white;
				val31.normal.textColor = Render.GetRainbow(num8);
				Vector2[] array11 = (Vector2[])(object)new Vector2[2]
				{
					val30.CalcSize(new GUIContent(text)),
					val30.CalcSize(new GUIContent(text2))
				};
				((Vector2)(ref val32))..ctor(0f, 0f);
				Vector2[] array12 = array11;
				foreach (Vector2 val33 in array12)
				{
					if (val33.x > val32.x)
					{
						val32.x = val33.x;
					}
					if (val33.y > val32.y)
					{
						val32.y = val33.y;
					}
				}
				float x = val28.x;
				float num11 = val28.y + (val32.y + 5f);
				float width = val32.x + 10f;
				float height = val32.y * (float)array11.Length + 5f;
				Render.DrawBox(new Color(0.15f, 0.15f, 0.15f), new Vector2(x, num11), width, height);
				int num12 = 1;
				if (((Dictionary<object, object>)(object)allCharacter3.refs.view.Owner.CustomProperties).ContainsKey((object)"AtlUser"))
				{
					GUI.Label(new Rect(val28.x - val32.x / 2f, val28.y + val32.y / 2f * (float)num12, val32.x, val32.y * 1.5f), text, val31);
					num12 += 2;
					GUI.Label(new Rect(val28.x - val32.x / 2f, val28.y + val32.y / 2f * (float)num12, val32.x, val32.y * 1.5f), text2, val30);
				}
				else
				{
					GUI.Label(new Rect(val28.x - val32.x / 2f, val28.y + val32.y / 2f * (float)num12, val32.x, val32.y * 1.5f), text, val30);
					num12 += 2;
					GUI.Label(new Rect(val28.x - val32.x / 2f, val28.y + val32.y / 2f * (float)num12, val32.x, val32.y * 1.5f), text2, val30);
				}
			}
		}

		public void Start()
		{
			//IL_0027: 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)
			int num = 750;
			int num2 = 500;
			int num3 = 200;
			int num4 = Screen.height / 2 - num2 / 2;
			MenuManager.windowRect = new Rect((float)num3, (float)num4, (float)num, (float)num2);
			menuOpen = true;
		}

		private static void Draw(Rect size, Color color, float r)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < 5; i++)
			{
				GUI.DrawTexture(size, (Texture)(object)mainrender, (ScaleMode)Type.EmptyTypes.Length, Type.EmptyTypes.Length != 0, 0f, color, 0f, r);
			}
		}

		private static void Draw(Rect size, Color color, Vector4 radius)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < 5; i++)
			{
				GUI.DrawTexture(size, (Texture)(object)mainrender, (ScaleMode)Type.EmptyTypes.Length, Type.EmptyTypes.Length != 0, 0f, color, Vector4.zero, radius);
			}
		}

		private static void BuildMenu(int _)
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Expected O, but got Unknown
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01be: Unknown result type (might be due to invalid IL or missing references)
			GUILayout.BeginArea(new Rect(15f, 15f, ((Rect)(ref MenuManager.windowRect)).width - 15f, ((Rect)(ref MenuManager.windowRect)).height - 15f));
			GUILayout.Space(5f);
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			GUILayout.BeginVertical((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) });
			for (int i = 0; i < MenuManager.tabs.Length; i++)
			{
				bool flag = MenuManager.currentTab == i;
				string text = MenuManager.tabs[i];
				GUIStyle val = new GUIStyle(GUIStyle.op_Implicit("Box"));
				if (flag)
				{
					val.normal.textColor = Color.Lerp(clb, cprp, Mathf.PingPong(Time.time * 0.5f, 2f) / 2f);
				}
				else
				{
					val.normal.textColor = darkerColor;
				}
				if (GUILayout.Toggle(flag, text ?? "", val, Array.Empty<GUILayoutOption>()))
				{
					MenuManager.currentTab = i;
				}
			}
			GUILayout.EndVertical();
			GUILayout.BeginVertical(Array.Empty<GUILayoutOption>());
			switch (MenuManager.currentTab)
			{
			case 0:
				Self.Tab();
				break;
			case 1:
				Lobby.Tab();
				break;
			case 2:
				Spawn.Tab();
				break;
			case 3:
				Visual.Tab();
				break;
			case 4:
				Players.Tab();
				break;
			case 5:
				Settings.Tab();
				break;
			default:
				Self.Tab();
				break;
			}
			GUILayout.EndVertical();
			GUILayout.EndHorizontal();
			GUILayout.EndArea();
			GUI.DragWindow(new Rect(0f, 0f, ((Rect)(ref MenuManager.windowRect)).width, 20f));
		}
	}
	public class Watermark : MonoBehaviour
	{
		public static void Draw()
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Expected O, but got Unknown
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Expected O, but got Unknown
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Expected O, but got Unknown
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			string text = DateTime.Now.ToString("hh:mm:ss tt");
			Render render = new Render
			{
				DefaultColor = Color.white
			};
			GUIContent val = ((Visual.ActiveModules.Count != 0) ? new GUIContent("<b><color=#FF70C2>Atlas</color></b> v1.10.5 | " + text + " [" + PhotonNetwork.LocalPlayer.NickName + "]" + " [" + Visual.ActiveModules.Count + "]") : new GUIContent("<b><color=#FF70C2>Atlas</color></b> v1.10.5 | " + text + " [" + PhotonNetwork.LocalPlayer.NickName + "]"));
			GUIStyle val2 = new GUIStyle(GUIStyle.op_Implicit("Label"))
			{
				wordWrap = false,
				alignment = (TextAnchor)4
			};
			float num = val2.CalcSize(val).x + 20f;
			float num2 = 30f;
			Vector2 val3 = default(Vector2);
			((Vector2)(ref val3))..ctor(num / 2f + 20f, num2 / 2f + 20f);
			render.DrawTransparent(new Rect(30f, 30f, num, 30f), Color.black, 6f);
			GUI.Label(new Rect(31f, 30f, num, 30f), val, val2);
		}
	}
}
namespace AtlasPeak.Tabs
{
	public class Lobby : MonoBehaviour
	{
		public static bool IncludeSelf;

		public static bool PingWithAll;

		public static bool test;

		public static bool BlowdartShotGun;

		private static Vector2 ScrollPos;

		public static float FireWoodCount;

		public static float TimeOfDay = 1f;

		public static float TimerTime = 10f;

		public static string VersionText;

		public static void Tab()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: 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)
			MenuManager.Begin();
			MenuManager.NewSection("Lobby");
			ScrollPos = GUILayout.BeginScrollView(ScrollPos, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Width(275f),
				GUILayout.Height(400f)
			});
			MenuManager.NewLabel("-- Join Handler Options --");
			MenuManager.NewButton("[SM] Set Join Scene To Pretitle", delegate
			{
				SetJoinScene("Pretitle");
			});
			MenuManager.NewButton("[SM] Set Join Scene To Title", delegate
			{
				SetJoinScene("Title");
			});
			MenuManager.NewButton("[SM] Set Join Scene To MainMenu", delegate
			{
				SetJoinScene("MainMenu");
			});
			MenuManager.NewButton("[SM] Set Join Scene To WilIsland", delegate
			{
				SetJoinScene("WilIsland");
			});
			MenuManager.NewButton("[SM] Set Join Scene To Airport", delegate
			{
				SetJoinScene("Airport");
			});
			MenuManager.NewButton("[SM] Set Join Scene To Level_0", delegate
			{
				SetJoinScene("Level_0");
			});
			MenuManager.NewButton("[SM] Set Join Scene To Level_1", delegate
			{
				SetJoinScene("Level_1");
			});
			MenuManager.NewButton("[SM] Set Join Scene To Level_2", delegate
			{
				SetJoinScene("Level_2");
			});
			MenuManager.NewButton("[SM] Set Join Scene To Level_3", delegate
			{
				SetJoinScene("Level_3");
			});
			MenuManager.NewButton("[SM] Set Join Scene To Level_4", delegate
			{
				SetJoinScene("Level_4");
			});
			MenuManager.NewButton("[SM] Set Join Scene To Level_5", delegate
			{
				SetJoinScene("Level_5");
			});
			MenuManager.NewButton("[SM] Set Join Scene To Level_6", delegate
			{
				SetJoinScene("Level_6");
			});
			MenuManager.NewButton("[SM] Set Join Scene To Level_7", delegate
			{
				SetJoinScene("Level_7");
			});
			MenuManager.NewButton("[SM] Set Join Scene To Level_8", delegate
			{
				SetJoinScene("Level_8");
			});
			MenuManager.NewButton("[SM] Set Join Scene To Level_9", delegate
			{
				SetJoinScene("Level_9");
			});
			MenuManager.NewButton("[SM] Set Join Scene To Level_10", delegate
			{
				SetJoinScene("Level_10");
			});
			MenuManager.NewButton("[SM] Set Join Scene To Level_11", delegate
			{
				SetJoinScene("Level_11");
			});
			MenuManager.NewButton("[SM] Set Join Scene To Level_12", delegate
			{
				SetJoinScene("Level_12");
			});
			MenuManager.NewButton("[SM] Set Join Scene To Level_13", delegate
			{
				SetJoinScene("Level_13");
			});
			VersionText = MenuManager.NewTextField(VersionText);
			MenuManager.NewButton("[SM] Set Room Version Requirement", SetJoinVers);
			MenuManager.NewLabel("--------------------------");
			MenuManager.NewButton("Teleport All", delegate
			{
				TPAll();
			});
			MenuManager.NewButton("Destroy All", delegate
			{
				dall();
			});
			MenuManager.NewButton("Revive All And TP To Me", delegate
			{
				RevAllAndTPToMe();
			});
			MenuManager.NewButton("Spawn Character", delegate
			{
				SChar();
			});
			MenuManager.NewButton("Spawn Player", delegate
			{
				SPlayer();
			});
			MenuManager.NewButton("Load Airport [In Game]", delegate
			{
				LoadAirport();
			});
			MenuManager.NewButton("Softlock All", delegate
			{
				SoftLockPlayers();
			});
			MenuManager.NewButton("Force All Ghost To Me", delegate
			{
				ForceME();
			});
			MenuManager.NewButton("Start Moving Orb Fog", delegate
			{
				initfog();
			});
			MenuManager.NewButton("Force All Done With End Screen", ForceAllDone);
			MenuManager.NewButton("Detach All Ropes", DetachRopes);
			MenuManager.NewButton("Refresh All Character Weight", RefrshAll);
			MenuManager.NewButton("Light Campfire", delegate
			{
				ToglCampfir(v: true);
			});
			MenuManager.NewButton("Extinguish Campfire", delegate
			{
				ToglCampfir(v: false);
			});
			MenuManager.NewButton("Light All Lanterns", delegate
			{
				LightLanterns(v: true);
			});
			MenuManager.NewButton("Snuff All Lanterns", delegate
			{
				LightLanterns(v: false);
			});
			FireWoodCount = Mathf.Round(MenuManager.NewSlider("Fire Wood Amount", FireWoodCount, 0f, 200f));
			MenuManager.NewButton("Set Campfire Fire Wood Amount", SetWoodAmt);
			TimeOfDay = Mathf.Round(MenuManager.NewSlider("Time Of Day", TimeOfDay, 1f, 10f));
			MenuManager.NewButton("Set Time Of Day", delegate
			{
				SetTimeOfDay();
			});
			TimerTime = Mathf.Round(MenuManager.NewSlider("End Game Timer Time", TimerTime, 0f, 200f));
			MenuManager.NewButton("Set Timer Time", delegate
			{
				SetTimerTime();
			});
			MenuManager.NewButton("Make All Icecicles Fall", IcecicleFall);
			MenuManager.NewButton("Make All Bridges Fall", IcecicleFall);
			MenuManager.NewButton("Shake All Icecicles", ShakeAllIcecicles);
			MenuManager.NewButton("Shake All Bridges", ShakeAllBridges);
			MenuManager.NewButton("Fire All Arrow Shooters", FireAllArrows);
			MenuManager.NewButton("Flip All Guidebook Pages Left", FlipgbPageLeft);
			MenuManager.NewButton("Flip All Guidebook Pages Right", FlipgbPageRight);
			MenuManager.NewButton("Unlock BingBong Achievement", delegate
			{
				ThrowAchievement(1);
			});
			MenuManager.NewButton("Unlock Emergency Achievement", delegate
			{
				ThrowAchievement(2);
			});
			MenuManager.NewButton("Open All Luggages", delegate
			{
				openluggages(v: true);
			});
			MenuManager.NewButton("Open All Luggages Without Items", delegate
			{
				openluggages(v: