Decompiled source of Cherry v1.2.0

BepInEx/plugins/Cherry.dll

Decompiled 3 weeks ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using Cherry.Backend;
using Cherry.Exploits;
using Cherry.Funny;
using Cherry.Main;
using ExitGames.Client.Photon;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Photon.Pun;
using Photon.Realtime;
using UnityEngine;
using Zorro.Core;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("Cherry")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+93376d3986ca7aa603cc708cb3a5cffd3b2890b9")]
[assembly: AssemblyProduct("Cherry")]
[assembly: AssemblyTitle("Cherry")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace Cherry
{
	public class ButtonInfo
	{
		public string name = "-";

		public string overlap = null;

		public Action method = null;

		public Action disableMethod = null;

		public bool enabled = false;

		public bool isTogglable = true;
	}
	public class Button
	{
		public static ButtonInfo[][] mainButtons = new ButtonInfo[1][] { new ButtonInfo[9]
		{
			new ButtonInfo
			{
				name = "Jump All",
				method = delegate
				{
					JumpAll.Run();
				},
				isTogglable = false
			},
			new ButtonInfo
			{
				name = "Float All",
				method = delegate
				{
					JumpAll.Run();
				},
				isTogglable = true
			},
			new ButtonInfo
			{
				name = "Drop All Items",
				method = delegate
				{
					DropAllItems.Run();
				},
				isTogglable = false
			},
			new ButtonInfo
			{
				name = "Remove All Items",
				method = delegate
				{
					ItemRemoveALl.Run();
				},
				isTogglable = false
			},
			new ButtonInfo
			{
				name = "Randomize Spam",
				method = delegate
				{
					CustomizeSpam.Run();
				},
				isTogglable = true
			},
			new ButtonInfo
			{
				name = "Infinite Stamina",
				method = delegate
				{
					InfiniteStamina.Run();
				},
				isTogglable = true
			},
			new ButtonInfo
			{
				name = "Draw",
				method = delegate
				{
					DrawMod.Run();
				},
				disableMethod = delegate
				{
					DrawMod.Clean();
				},
				isTogglable = true
			},
			new ButtonInfo
			{
				name = "Gravity Gun",
				method = delegate
				{
					GravityGun.Run();
				},
				isTogglable = true
			},
			new ButtonInfo
			{
				name = "Fly",
				method = delegate
				{
					Fly.Run();
				},
				disableMethod = delegate
				{
					Fly.Cleanup();
				},
				isTogglable = true
			}
		} };

		public static ButtonInfo[][] exploitButtons = new ButtonInfo[1][] { new ButtonInfo[3]
		{
			new ButtonInfo
			{
				name = "End Game with Win",
				method = delegate
				{
					((MonoBehaviourPun)Character.localCharacter).photonView.RPC("RPCEndGame_ForceWin", (RpcTarget)0, new object[0]);
				},
				isTogglable = false
			},
			new ButtonInfo
			{
				name = "End Game",
				method = delegate
				{
					((MonoBehaviourPun)Character.localCharacter).photonView.RPC("RPCEndGame", (RpcTarget)0, new object[0]);
				},
				isTogglable = false
			},
			new ButtonInfo
			{
				name = "Flag Spam [F]",
				method = delegate
				{
					FlagSpam.Run();
				},
				disableMethod = delegate
				{
					FlagSpam.Cleanup();
				},
				isTogglable = true
			}
		} };

		public static ButtonInfo[][] funnyButtons = new ButtonInfo[1][] { new ButtonInfo[6]
		{
			new ButtonInfo
			{
				name = "Kill All",
				method = delegate
				{
					KillAll.Run();
				},
				isTogglable = false
			},
			new ButtonInfo
			{
				name = "Revive All",
				method = delegate
				{
					ReviveAll.Run();
				},
				isTogglable = false
			},
			new ButtonInfo
			{
				name = "Revive All w/ Status",
				method = delegate
				{
					ReviveAllWithStatus.Run();
				},
				isTogglable = false
			},
			new ButtonInfo
			{
				name = "Pass Out All",
				method = delegate
				{
					PassOutAll.Run();
				},
				isTogglable = false
			},
			new ButtonInfo
			{
				name = "Crouch All",
				method = delegate
				{
					CrouchAll.Run();
				},
				isTogglable = false
			},
			new ButtonInfo
			{
				name = "Fall All",
				method = delegate
				{
					FallAll.Run();
				},
				isTogglable = false
			}
		} };

		public static ButtonInfo[][] nameChangeButtons = new ButtonInfo[1][] { new ButtonInfo[5]
		{
			new ButtonInfo
			{
				name = "Blind All",
				method = delegate
				{
					NameBlindAll.BlindAll();
				},
				isTogglable = false
			},
			new ButtonInfo
			{
				name = "Flashbang All",
				method = delegate
				{
					NameBlindAll.FlashbangAll();
				},
				isTogglable = false
			},
			new ButtonInfo
			{
				name = "Bleed All",
				method = delegate
				{
					NameBlindAll.BleedAll();
				},
				isTogglable = false
			},
			new ButtonInfo
			{
				name = "Blue All",
				method = delegate
				{
					NameBlindAll.BlueAll();
				},
				isTogglable = false
			},
			new ButtonInfo
			{
				name = "Cherry Name",
				method = delegate
				{
					NameBlindAll.CherryName();
				},
				isTogglable = false
			}
		} };
	}
	[HarmonyPatch(typeof(Character), "Update")]
	public class FlyPatch
	{
		private static bool isFlying = false;

		private static Vector3 flyVelocity = Vector3.zero;

		public static float flySpeed = 58f;

		private static float acceleration = 200f;

		private static void Postfix(Character __instance)
		{
			//IL_004a: 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_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: 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_012c: 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_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: 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_0140: 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_0143: 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_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_021b: Unknown result type (might be due to invalid IL or missing references)
			if (!Fly.fly || !__instance.IsLocal || (Object)(object)__instance.refs?.ragdoll == (Object)null)
			{
				return;
			}
			isFlying = !isFlying;
			flyVelocity = Vector3.zero;
			foreach (Bodypart part in __instance.refs.ragdoll.partList)
			{
				if ((Object)(object)(((Object)(object)part != (Object)null) ? part.Rig : null) != (Object)null)
				{
					part.Rig.useGravity = !isFlying;
				}
			}
			string text = (isFlying ? "active" : "deactive");
			__instance.data.isGrounded = true;
			__instance.data.sinceGrounded = 0f;
			__instance.data.sinceJump = 0f;
			Vector3 val = Vector2.op_Implicit(__instance.input.movementInput);
			Vector3 normalized = ((Vector3)(ref __instance.data.lookDirection_Flat)).normalized;
			Vector3 val2 = Vector3.Cross(Vector3.up, normalized);
			Vector3 normalized2 = ((Vector3)(ref val2)).normalized;
			Vector3 val3 = normalized * val.y + normalized2 * val.x;
			if (__instance.input.jumpIsPressed)
			{
				val3 += Vector3.up;
			}
			if (__instance.input.crouchIsPressed)
			{
				val3 += Vector3.down;
			}
			flyVelocity = Vector3.Lerp(flyVelocity, ((Vector3)(ref val3)).normalized * flySpeed, Time.deltaTime * acceleration);
			foreach (Bodypart part2 in __instance.refs.ragdoll.partList)
			{
				if ((Object)(object)(((Object)(object)part2 != (Object)null) ? part2.Rig : null) != (Object)null)
				{
					part2.Rig.linearVelocity = flyVelocity;
				}
			}
		}
	}
	[BepInPlugin("Cherry.Cherry", "Cherry PEAK Menu", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		public enum Theme
		{
			Dark,
			Light,
			Purple,
			Neon,
			Blue,
			Cherry,
			Blurple
		}

		private Theme targetTheme = Theme.Dark;

		private float themeLerpT = 1f;

		private const float baseWidth = 520f;

		private const float baseHeight = 460f;

		private int bt = 0;

		private int pagenum = 0;

		private string[] tabNames = new string[9] { "Main", "Exploits", "NameChangers", "Prefabs", "Funny", "NameSettings", "Settings", "Credits", "Changelog" };

		private int selectedTab = 0;

		private GUIStyle buttonStyle;

		private GUIStyle tabStyle;

		private GUIStyle windowStyle;

		public static Color themeBg = new Color(0.1f, 0.1f, 0.1f);

		public static Color themeAccent = new Color(0.3f, 0.5f, 1f);

		public static Color buttonColor = new Color(0.5f, 0.7f, 3f);

		private Texture2D buttonTex;

		private Texture2D buttonHoverTex;

		private Texture2D buttonActiveTex;

		private Texture2D dividerTex;

		private Texture2D transparentTex;

		private Rect windowRect = new Rect(((float)Screen.width - 520f) / 2f, ((float)Screen.height - 460f) / 2f, 520f, 460f);

		private bool showGui = true;

		private float animT = 0f;

		private bool wasAnimating = false;

		private bool texturesInitialized = false;

		private bool stylesInitialized = false;

		public float cooldown = 0.25f;

		private static Texture2D whiteTex;

		public string lastspawneditem;

		public Font menuFont = null;

		private List<ButtonInfo> spammerButtons;

		private string customName = "";

		private ThemeData lastSavedThemeData = null;

		private void FixedUpdate()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			if (!PhotonNetwork.InRoom)
			{
				return;
			}
			Hashtable val = new Hashtable();
			val[(object)"CherryUser"] = PhotonNetwork.GetPing();
			PhotonNetwork.LocalPlayer.SetCustomProperties(val, (Hashtable)null, (WebFlags)null);
			Player[] playerListOthers = PhotonNetwork.PlayerListOthers;
			foreach (Player val2 in playerListOthers)
			{
				if (((Dictionary<object, object>)(object)val2.CustomProperties).ContainsKey((object)"AtlUser"))
				{
					Notifications.SendOnce("[Cherry] An Atlas user joined the lobby.");
				}
				if (((Dictionary<object, object>)(object)val2.CustomProperties).ContainsKey((object)"AtlOwner"))
				{
					Notifications.SendOnce("[Cherry] Owner of Atlas joined the lobby.");
				}
			}
		}

		public void Start()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: 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_0039: Unknown result type (might be due to invalid IL or missing references)
			Harmony val = new Harmony("Cherry.Cherry");
			val.PatchAll(Assembly.GetExecutingAssembly());
			if (LoadThemeFromFile(out var theme, out var bgColor, out var accentColor))
			{
				targetTheme = theme;
				themeBg = bgColor;
				themeAccent = accentColor;
			}
		}

		private void Update()
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Expected O, but got Unknown
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)whiteTex == (Object)null)
			{
				whiteTex = new Texture2D(1, 1);
				whiteTex.SetPixel(0, 0, Color.white);
				whiteTex.Apply();
			}
			if (UnityInput.Current.GetKey((KeyCode)92) && Time.time > cooldown)
			{
				showGui = !showGui;
				cooldown = Time.time + 0.25f;
			}
			if (showGui && animT < 1f)
			{
				animT += Time.deltaTime * 4f;
				if (animT > 1f)
				{
					animT = 1f;
				}
			}
			else if (!showGui && animT > 0f)
			{
				animT -= Time.deltaTime * 4f;
				if (animT < 0f)
				{
					animT = 0f;
				}
			}
			if (themeLerpT < 1f)
			{
				themeLerpT += Time.deltaTime * 2f;
			}
		}

		public static void Draw(Rect rect, int radius, Color color)
		{
			//IL_0010: 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)
			if ((Object)(object)whiteTex != (Object)null)
			{
				GUI.DrawTexture(rect, (Texture)(object)whiteTex, (ScaleMode)0, true, 0f, color, 0f, (float)radius);
			}
		}

		public static void Draw(Rect rect, Vector4 radius, Color color)
		{
			//IL_0010: 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)
			//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)
			if ((Object)(object)whiteTex != (Object)null)
			{
				GUI.DrawTexture(rect, (Texture)(object)whiteTex, (ScaleMode)0, true, 0f, color, Vector4.zero, radius);
			}
		}

		private void InitTextures()
		{
			//IL_0003: 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_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: 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_0063: 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)
			buttonTex = MakeTex(buttonColor * 4f);
			buttonHoverTex = MakeTex(buttonColor * 3f);
			buttonActiveTex = MakeTex(buttonColor * 2f);
			dividerTex = MakeTex(new Color(0.15f, 0.15f, 0.15f));
			transparentTex = MakeTex(new Color(0f, 0f, 0f, 0f));
		}

		private Texture2D MakeTex(Color col)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Expected O, but got Unknown
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			Texture2D val = new Texture2D(1, 1);
			val.SetPixel(0, 0, col);
			val.Apply();
			return val;
		}

		private void SetThemeColors(Theme theme)
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: 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_0050: 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_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: 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_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: 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_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: 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_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: 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_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: 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_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: 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_01f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0212: Unknown result type (might be due to invalid IL or missing references)
			//IL_021d: 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_022c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0240: Unknown result type (might be due to invalid IL or missing references)
			//IL_024b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0250: Unknown result type (might be due to invalid IL or missing references)
			//IL_0255: Unknown result type (might be due to invalid IL or missing references)
			//IL_0269: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_0279: Unknown result type (might be due to invalid IL or missing references)
			//IL_027e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0292: 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_02a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ac: 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_02cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d5: 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_02f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0312: Unknown result type (might be due to invalid IL or missing references)
			//IL_031d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0322: Unknown result type (might be due to invalid IL or missing references)
			//IL_0329: Unknown result type (might be due to invalid IL or missing references)
			//IL_033d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0348: Unknown result type (might be due to invalid IL or missing references)
			//IL_034d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0352: Unknown result type (might be due to invalid IL or missing references)
			//IL_0366: Unknown result type (might be due to invalid IL or missing references)
			//IL_0371: Unknown result type (might be due to invalid IL or missing references)
			//IL_0376: Unknown result type (might be due to invalid IL or missing references)
			//IL_037b: Unknown result type (might be due to invalid IL or missing references)
			//IL_038f: 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_039f: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ad: Unknown result type (might be due to invalid IL or missing references)
			switch (theme)
			{
			case Theme.Dark:
				themeBg = Color.Lerp(themeBg, new Color(0.1f, 0.1f, 0.1f), themeLerpT);
				themeAccent = Color.Lerp(themeAccent, new Color(0.2f, 0.4f, 0.8f), themeLerpT);
				buttonColor = Color.Lerp(buttonColor, new Color(0.25f, 0.45f, 0.85f), themeLerpT);
				break;
			case Theme.Light:
				themeBg = Color.Lerp(themeBg, new Color(0.95f, 0.95f, 0.95f), themeLerpT);
				themeAccent = Color.Lerp(themeAccent, new Color(0.1f, 0.3f, 0.6f), themeLerpT);
				buttonColor = Color.Lerp(buttonColor, new Color(0.3f, 0.5f, 0.8f), themeLerpT);
				break;
			case Theme.Purple:
				themeBg = Color.Lerp(themeBg, new Color(0.12f, 0.02f, 0.15f), themeLerpT);
				themeAccent = Color.Lerp(themeAccent, new Color(0.7f, 0.2f, 0.9f), themeLerpT);
				buttonColor = Color.Lerp(buttonColor, new Color(0.8f, 0.4f, 1f), themeLerpT);
				break;
			case Theme.Neon:
				themeBg = Color.Lerp(themeBg, new Color(0f, 0f, 0f), themeLerpT);
				themeAccent = Color.Lerp(themeAccent, new Color(0f, 1f, 1f), themeLerpT);
				buttonColor = Color.Lerp(buttonColor, new Color(0f, 1f, 0.5f), themeLerpT);
				break;
			case Theme.Blue:
				themeBg = Color.Lerp(themeBg, new Color(0.08f, 0.13f, 0.25f), themeLerpT);
				themeAccent = Color.Lerp(themeAccent, new Color(0.28f, 0.56f, 1f), themeLerpT);
				buttonColor = Color.Lerp(buttonColor, new Color(0.35f, 0.6f, 1f), themeLerpT);
				break;
			case Theme.Cherry:
				themeBg = Color.Lerp(themeBg, new Color(0.15f, 0.05f, 0.07f), themeLerpT);
				themeAccent = Color.Lerp(themeAccent, new Color(0.95f, 0.3f, 0.4f), themeLerpT);
				buttonColor = Color.Lerp(buttonColor, new Color(1f, 0.4f, 0.5f), themeLerpT);
				break;
			case Theme.Blurple:
				themeBg = Color.Lerp(themeBg, new Color(0.1f, 0.05f, 0.2f), themeLerpT);
				themeAccent = Color.Lerp(themeAccent, new Color(0.6f, 0.4f, 1f), themeLerpT);
				buttonColor = Color.Lerp(buttonColor, new Color(0.7f, 0.5f, 1f), themeLerpT);
				break;
			}
			SaveThemeToFile(theme, themeBg, themeAccent);
		}

		private void InitStyles()
		{
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: 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_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Expected O, but got Unknown
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Expected O, but got Unknown
			//IL_00a3: 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_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Expected O, but got Unknown
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: 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_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Expected O, but got Unknown
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Expected O, but got Unknown
			if ((Object)(object)menuFont == (Object)null)
			{
				menuFont = Font.CreateDynamicFontFromOSFont("Calibri", 16);
			}
			GUIStyle val = new GUIStyle(GUI.skin.button);
			val.normal.background = buttonTex;
			val.hover.background = buttonHoverTex;
			val.active.background = buttonActiveTex;
			val.fontSize = 14;
			val.alignment = (TextAnchor)4;
			val.padding = new RectOffset(8, 8, 4, 4);
			val.font = menuFont;
			buttonStyle = val;
			tabStyle = new GUIStyle(buttonStyle)
			{
				fontSize = 13,
				fixedHeight = 30f,
				font = menuFont
			};
			GUIStyle val2 = new GUIStyle(GUI.skin.window);
			val2.normal.background = transparentTex;
			val2.border = new RectOffset(0, 0, 0, 0);
			val2.font = menuFont;
			windowStyle = val2;
		}

		private void OnGUI()
		{
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: 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_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Expected O, but got Unknown
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			if (animT <= 0f)
			{
				return;
			}
			if (!texturesInitialized || themeLerpT < 1f)
			{
				InitTextures();
				texturesInitialized = true;
			}
			if (!stylesInitialized)
			{
				InitStyles();
				stylesInitialized = true;
			}
			SetThemeColors(targetTheme);
			GUI.color = Color.white;
			Rect val = default(Rect);
			if (animT < 1f)
			{
				float num = 520f * animT;
				float num2 = 460f * animT;
				float num3 = ((float)Screen.width - 520f) / 2f;
				float num4 = ((float)Screen.height - 460f) / 2f;
				float num5 = num3 + (520f - num) / 2f;
				float num6 = num4 + (460f - num2) / 2f;
				((Rect)(ref val))..ctor(num5, num6, num, num2);
				wasAnimating = true;
			}
			else
			{
				if (wasAnimating)
				{
					windowRect = new Rect(((float)Screen.width - 520f) / 2f, ((float)Screen.height - 460f) / 2f, 520f, 460f);
					wasAnimating = false;
				}
				val = windowRect;
			}
			windowRect = GUI.Window(9999999, val, new WindowFunction(DrawWindow), "", windowStyle);
		}

		private bool LoadThemeFromFile(out Theme theme, out Color bgColor, out Color accentColor)
		{
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: 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_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			string path = Path.Combine(Application.persistentDataPath, "Cherry", "theme.json");
			if (File.Exists(path))
			{
				string text = File.ReadAllText(path);
				ThemeData themeData = JsonUtility.FromJson<ThemeData>(text);
				if (!Enum.TryParse<Theme>(themeData.themeName, ignoreCase: true, out theme))
				{
					Debug.LogWarning((object)("Invalid theme name in JSON: '" + themeData.themeName + "'"));
					theme = Theme.Dark;
				}
				bgColor = new Color(themeData.bgColor[0], themeData.bgColor[1], themeData.bgColor[2]);
				accentColor = new Color(themeData.accentColor[0], themeData.accentColor[1], themeData.accentColor[2]);
				Debug.Log((object)$"loaded previously saved theme, {theme}");
				return true;
			}
			Debug.LogWarning((object)"no saved theme was found, lets js use dark i guess...");
			theme = Theme.Dark;
			bgColor = new Color(0.1f, 0.1f, 0.1f);
			accentColor = new Color(0.2f, 0.4f, 0.8f);
			return false;
		}

		private void DrawWindow(int windowID)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: 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_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: 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_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e0: 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_0211: 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_0253: 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_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
			Draw(new Rect(0f, 0f, ((Rect)(ref windowRect)).width, ((Rect)(ref windowRect)).height), 10, themeBg);
			Draw(new Rect(0f, 0f, ((Rect)(ref windowRect)).width, 30f), new Vector4(10f, 10f, 0f, 0f), themeAccent);
			GUI.color = Color.white;
			GUI.Label(new Rect(10f, 5f, ((Rect)(ref windowRect)).width, 20f), "<b>Cherry PEAK Menu | Made with <3 by Misa | Backslash to toggle UI</b>");
			GUI.DragWindow(new Rect(0f, 0f, ((Rect)(ref windowRect)).width, 30f));
			Draw(new Rect(0f, 30f, ((Rect)(ref windowRect)).width, 2f), 1, Color.gray);
			GUI.BeginGroup(new Rect(0f, 32f, ((Rect)(ref windowRect)).width, ((Rect)(ref windowRect)).height - 32f));
			Rect val = default(Rect);
			((Rect)(ref val))..ctor(10f, 10f, 120f, ((Rect)(ref windowRect)).height - 60f);
			GUI.BeginGroup(val);
			Rect val3 = default(Rect);
			for (int i = 0; i < tabNames.Length; i++)
			{
				Color color = (GUI.color = ((selectedTab == i) ? themeAccent : Color.gray));
				((Rect)(ref val3))..ctor(0f, (float)i * 40f, 120f, 35f);
				Draw(val3, 5, color);
				if (GUI.Button(val3, tabNames[i], tabStyle))
				{
					selectedTab = i;
				}
			}
			GUI.EndGroup();
			GUI.color = Color.gray;
			Draw(new Rect(140f, 10f, 2f, ((Rect)(ref windowRect)).height - 60f), 1, Color.gray);
			GUI.color = Color.white;
			GUILayout.BeginArea(new Rect(152f, 10f, ((Rect)(ref windowRect)).width - 162f, ((Rect)(ref windowRect)).height - 60f));
			switch (selectedTab)
			{
			case 0:
				DrawModulesTab();
				break;
			case 1:
				DrawExploitsTab();
				break;
			case 2:
				DrawNameChangers();
				break;
			case 3:
				DrawSpammersTab();
				break;
			case 4:
				DrawTestingTab();
				break;
			case 5:
				DrawNameSettings();
				break;
			case 6:
				DrawSettingsTab();
				break;
			case 7:
				DrawCreditsTab();
				break;
			case 8:
				DrawChangelogTab();
				break;
			}
			GUILayout.EndArea();
			GUI.EndGroup();
		}

		private void DrawModulesTab()
		{
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Expected O, but got Unknown
			//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f9: 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_0206: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0238: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Expected O, but got Unknown
			//IL_025f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Unknown result type (might be due to invalid IL or missing references)
			//IL_0266: Unknown result type (might be due to invalid IL or missing references)
			//IL_0269: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: 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_00d6: Expected O, but got Unknown
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			Notifications.SendOnce("\n[Cherry] Main mods, stuff that isn't really that special.");
			if (Button.mainButtons == null || bt >= Button.mainButtons.Length || Button.mainButtons[bt] == null)
			{
				return;
			}
			ButtonInfo[] array = Button.mainButtons[bt];
			ButtonInfo[] array2 = array.Skip(pagenum * 8).Take(8).ToArray();
			int num = (array.Length + 7) / 8 - 1;
			ButtonInfo[] array3 = array2;
			foreach (ButtonInfo buttonInfo in array3)
			{
				Color color = (GUI.color = (buttonInfo.enabled ? themeAccent : Color.gray));
				Rect rect = GUILayoutUtility.GetRect(new GUIContent(buttonInfo.name), buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2]
				{
					GUILayout.Height(30f),
					GUILayout.ExpandWidth(true)
				});
				Draw(rect, 5, color);
				if (GUI.Button(rect, buttonInfo.name, buttonStyle))
				{
					if (buttonInfo.isTogglable)
					{
						buttonInfo.enabled = !buttonInfo.enabled;
						if (!buttonInfo.enabled)
						{
							buttonInfo.disableMethod?.Invoke();
						}
					}
					else
					{
						buttonInfo.method?.Invoke();
					}
				}
				if (buttonInfo.isTogglable && buttonInfo.enabled)
				{
					buttonInfo.method?.Invoke();
				}
				GUILayout.Space(5f);
			}
			GUILayout.Space(10f);
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			GUI.color = Color.gray;
			Rect rect2 = GUILayoutUtility.GetRect(new GUIContent("< Prev"), buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Height(30f),
				GUILayout.ExpandWidth(true)
			});
			Draw(rect2, 5, Color.gray);
			if (GUI.Button(rect2, "< Prev", buttonStyle))
			{
				pagenum = (pagenum - 1 + num + 1) % (num + 1);
			}
			Rect rect3 = GUILayoutUtility.GetRect(new GUIContent("Next >"), buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Height(30f),
				GUILayout.ExpandWidth(true)
			});
			Draw(rect3, 5, Color.gray);
			if (GUI.Button(rect3, "Next >", buttonStyle))
			{
				pagenum = (pagenum + 1) % (num + 1);
			}
			GUILayout.EndHorizontal();
		}

		private void DrawSpammersTab()
		{
			//IL_0271: 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_02ad: Expected O, but got Unknown
			//IL_02a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ad: 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_02b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bb: 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_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_0319: Expected O, but got Unknown
			//IL_0314: Unknown result type (might be due to invalid IL or missing references)
			//IL_0319: 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_031c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0327: 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_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Expected O, but got Unknown
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: 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_0198: Unknown result type (might be due to invalid IL or missing references)
			Notifications.SendOnce("\n[Cherry] Prefabs, each button spawns its item's prefab.");
			if (spammerButtons == null)
			{
				spammerButtons = new List<ButtonInfo>();
				foreach (KeyValuePair<ushort, Item> item in SingletonAsset<ItemDatabase>.Instance.itemLookup)
				{
					ushort key = item.Key;
					Item value = item.Value;
					string name = ((Object)((Component)value).gameObject).name;
					string resourcePath = "0_Items/" + name;
					spammerButtons.Add(new ButtonInfo
					{
						name = $"{((Object)value).name} [{key}]",
						isTogglable = false,
						enabled = false,
						method = delegate
						{
							//IL_0011: 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)
							PhotonNetwork.Instantiate(resourcePath, ((Component)Camera.main).transform.position, ((Component)Camera.main).transform.rotation, (byte)0, (object[])null);
						}
					});
				}
			}
			ButtonInfo[] array = spammerButtons.Skip(pagenum * 8).Take(8).ToArray();
			int num = (spammerButtons.Count + 7) / 8 - 1;
			ButtonInfo[] array2 = array;
			foreach (ButtonInfo buttonInfo in array2)
			{
				Color color = (GUI.color = (buttonInfo.enabled ? themeAccent : Color.gray));
				Rect rect = GUILayoutUtility.GetRect(new GUIContent(buttonInfo.name), buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2]
				{
					GUILayout.Height(30f),
					GUILayout.ExpandWidth(true)
				});
				Draw(rect, 5, color);
				if (GUI.Button(rect, buttonInfo.name, buttonStyle))
				{
					if (buttonInfo.isTogglable)
					{
						buttonInfo.enabled = !buttonInfo.enabled;
						if (!buttonInfo.enabled)
						{
							buttonInfo.disableMethod?.Invoke();
						}
					}
					else
					{
						buttonInfo.method?.Invoke();
					}
				}
				if (buttonInfo.isTogglable && buttonInfo.enabled)
				{
					buttonInfo.method?.Invoke();
				}
				GUILayout.Space(5f);
			}
			GUILayout.Space(10f);
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			GUI.color = Color.gray;
			Rect rect2 = GUILayoutUtility.GetRect(new GUIContent("< Prev"), buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Height(30f),
				GUILayout.ExpandWidth(true)
			});
			Draw(rect2, 5, Color.gray);
			if (GUI.Button(rect2, "< Prev", buttonStyle))
			{
				pagenum = (pagenum - 1 + num + 1) % (num + 1);
			}
			Rect rect3 = GUILayoutUtility.GetRect(new GUIContent("Next >"), buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Height(30f),
				GUILayout.ExpandWidth(true)
			});
			Draw(rect3, 5, Color.gray);
			if (GUI.Button(rect3, "Next >", buttonStyle))
			{
				pagenum = (pagenum + 1) % (num + 1);
			}
			GUILayout.EndHorizontal();
		}

		private void DrawNameChangers()
		{
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Expected O, but got Unknown
			//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f9: 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_0206: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0238: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Expected O, but got Unknown
			//IL_025f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Unknown result type (might be due to invalid IL or missing references)
			//IL_0266: Unknown result type (might be due to invalid IL or missing references)
			//IL_0269: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: 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_00d6: Expected O, but got Unknown
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			Notifications.SendOnce("\n[Cherry] Name changers, changes your name to stuff and respawns you when you change your name.");
			if (Button.nameChangeButtons == null || bt >= Button.nameChangeButtons.Length || Button.nameChangeButtons[bt] == null)
			{
				return;
			}
			ButtonInfo[] array = Button.nameChangeButtons[bt];
			ButtonInfo[] array2 = array.Skip(pagenum * 8).Take(8).ToArray();
			int num = (array.Length + 7) / 8 - 1;
			ButtonInfo[] array3 = array2;
			foreach (ButtonInfo buttonInfo in array3)
			{
				Color color = (GUI.color = (buttonInfo.enabled ? themeAccent : Color.gray));
				Rect rect = GUILayoutUtility.GetRect(new GUIContent(buttonInfo.name), buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2]
				{
					GUILayout.Height(30f),
					GUILayout.ExpandWidth(true)
				});
				Draw(rect, 5, color);
				if (GUI.Button(rect, buttonInfo.name, buttonStyle))
				{
					if (buttonInfo.isTogglable)
					{
						buttonInfo.enabled = !buttonInfo.enabled;
						if (!buttonInfo.enabled)
						{
							buttonInfo.disableMethod?.Invoke();
						}
					}
					else
					{
						buttonInfo.method?.Invoke();
					}
				}
				if (buttonInfo.isTogglable && buttonInfo.enabled)
				{
					buttonInfo.method?.Invoke();
				}
				GUILayout.Space(5f);
			}
			GUILayout.Space(10f);
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			GUI.color = Color.gray;
			Rect rect2 = GUILayoutUtility.GetRect(new GUIContent("< Prev"), buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Height(30f),
				GUILayout.ExpandWidth(true)
			});
			Draw(rect2, 5, Color.gray);
			if (GUI.Button(rect2, "< Prev", buttonStyle))
			{
				pagenum = (pagenum - 1 + num + 1) % (num + 1);
			}
			Rect rect3 = GUILayoutUtility.GetRect(new GUIContent("Next >"), buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Height(30f),
				GUILayout.ExpandWidth(true)
			});
			Draw(rect3, 5, Color.gray);
			if (GUI.Button(rect3, "Next >", buttonStyle))
			{
				pagenum = (pagenum + 1) % (num + 1);
			}
			GUILayout.EndHorizontal();
		}

		private void DrawSettingsTab()
		{
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: 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_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Expected O, but got Unknown
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			Notifications.SendOnce("\n[Cherry] Settings, change your theme.");
			GUILayout.Label("Theme:", Array.Empty<GUILayoutOption>());
			foreach (Theme value in Enum.GetValues(typeof(Theme)))
			{
				Color color = (GUI.color = ((targetTheme == value) ? themeAccent : Color.gray));
				Rect rect = GUILayoutUtility.GetRect(new GUIContent(value.ToString()), buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2]
				{
					GUILayout.Height(30f),
					GUILayout.ExpandWidth(true)
				});
				Draw(rect, 5, color);
				if (GUI.Button(rect, value.ToString(), buttonStyle))
				{
					targetTheme = value;
					themeLerpT = 0f;
					texturesInitialized = false;
				}
				GUILayout.Space(5f);
			}
		}

		private void DrawExploitsTab()
		{
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Expected O, but got Unknown
			//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f9: 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_0206: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0238: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Expected O, but got Unknown
			//IL_025f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Unknown result type (might be due to invalid IL or missing references)
			//IL_0266: Unknown result type (might be due to invalid IL or missing references)
			//IL_0269: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: 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_00d6: Expected O, but got Unknown
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			Notifications.SendOnce("\n[Cherry] Exploits, stuff you're not supposed to do that's in the game.");
			if (Button.exploitButtons == null || bt >= Button.exploitButtons.Length || Button.exploitButtons[bt] == null)
			{
				return;
			}
			ButtonInfo[] array = Button.exploitButtons[bt];
			ButtonInfo[] array2 = array.Skip(pagenum * 8).Take(8).ToArray();
			int num = (array.Length + 7) / 8 - 1;
			ButtonInfo[] array3 = array2;
			foreach (ButtonInfo buttonInfo in array3)
			{
				Color color = (GUI.color = (buttonInfo.enabled ? themeAccent : Color.gray));
				Rect rect = GUILayoutUtility.GetRect(new GUIContent(buttonInfo.name), buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2]
				{
					GUILayout.Height(30f),
					GUILayout.ExpandWidth(true)
				});
				Draw(rect, 5, color);
				if (GUI.Button(rect, buttonInfo.name, buttonStyle))
				{
					if (buttonInfo.isTogglable)
					{
						buttonInfo.enabled = !buttonInfo.enabled;
						if (!buttonInfo.enabled)
						{
							buttonInfo.disableMethod?.Invoke();
						}
					}
					else
					{
						buttonInfo.method?.Invoke();
					}
				}
				if (buttonInfo.isTogglable && buttonInfo.enabled)
				{
					buttonInfo.method?.Invoke();
				}
				GUILayout.Space(5f);
			}
			GUILayout.Space(10f);
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			GUI.color = Color.gray;
			Rect rect2 = GUILayoutUtility.GetRect(new GUIContent("< Prev"), buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Height(30f),
				GUILayout.ExpandWidth(true)
			});
			Draw(rect2, 5, Color.gray);
			if (GUI.Button(rect2, "< Prev", buttonStyle))
			{
				pagenum = (pagenum - 1 + num + 1) % (num + 1);
			}
			Rect rect3 = GUILayoutUtility.GetRect(new GUIContent("Next >"), buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Height(30f),
				GUILayout.ExpandWidth(true)
			});
			Draw(rect3, 5, Color.gray);
			if (GUI.Button(rect3, "Next >", buttonStyle))
			{
				pagenum = (pagenum + 1) % (num + 1);
			}
			GUILayout.EndHorizontal();
		}

		private void DrawTestingTab()
		{
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Expected O, but got Unknown
			//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f9: 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_0206: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0238: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Expected O, but got Unknown
			//IL_025f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Unknown result type (might be due to invalid IL or missing references)
			//IL_0266: Unknown result type (might be due to invalid IL or missing references)
			//IL_0269: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: 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_00d6: Expected O, but got Unknown
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			Notifications.SendOnce("\n[Cherry] Funny mods, mods that are funny.");
			if (Button.funnyButtons == null || bt >= Button.funnyButtons.Length || Button.funnyButtons[bt] == null)
			{
				return;
			}
			ButtonInfo[] array = Button.funnyButtons[bt];
			ButtonInfo[] array2 = array.Skip(pagenum * 8).Take(8).ToArray();
			int num = (array.Length + 7) / 8 - 1;
			ButtonInfo[] array3 = array2;
			foreach (ButtonInfo buttonInfo in array3)
			{
				Color color = (GUI.color = (buttonInfo.enabled ? themeAccent : Color.gray));
				Rect rect = GUILayoutUtility.GetRect(new GUIContent(buttonInfo.name), buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2]
				{
					GUILayout.Height(30f),
					GUILayout.ExpandWidth(true)
				});
				Draw(rect, 5, color);
				if (GUI.Button(rect, buttonInfo.name, buttonStyle))
				{
					if (buttonInfo.isTogglable)
					{
						buttonInfo.enabled = !buttonInfo.enabled;
						if (!buttonInfo.enabled)
						{
							buttonInfo.disableMethod?.Invoke();
						}
					}
					else
					{
						buttonInfo.method?.Invoke();
					}
				}
				if (buttonInfo.isTogglable && buttonInfo.enabled)
				{
					buttonInfo.method?.Invoke();
				}
				GUILayout.Space(5f);
			}
			GUILayout.Space(10f);
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			GUI.color = Color.gray;
			Rect rect2 = GUILayoutUtility.GetRect(new GUIContent("< Prev"), buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Height(30f),
				GUILayout.ExpandWidth(true)
			});
			Draw(rect2, 5, Color.gray);
			if (GUI.Button(rect2, "< Prev", buttonStyle))
			{
				pagenum = (pagenum - 1 + num + 1) % (num + 1);
			}
			Rect rect3 = GUILayoutUtility.GetRect(new GUIContent("Next >"), buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Height(30f),
				GUILayout.ExpandWidth(true)
			});
			Draw(rect3, 5, Color.gray);
			if (GUI.Button(rect3, "Next >", buttonStyle))
			{
				pagenum = (pagenum + 1) % (num + 1);
			}
			GUILayout.EndHorizontal();
		}

		private void DrawCreditsTab()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: 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_0047: 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_0058: Expected O, but got Unknown
			//IL_0062: 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_0070: 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_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Expected O, but got Unknown
			//IL_008e: 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)
			Notifications.SendOnce("\n[Cherry] Credits, does anyone read this stuff?");
			GUILayout.Space(10f);
			GUI.color = Color.cyan;
			GUIStyle val = new GUIStyle(GUI.skin.label)
			{
				fontSize = 20,
				font = menuFont,
				fontStyle = (FontStyle)1,
				alignment = (TextAnchor)4
			};
			GUIStyle val2 = new GUIStyle(GUI.skin.label)
			{
				fontSize = 14,
				font = menuFont,
				wordWrap = true,
				alignment = (TextAnchor)1
			};
			GUI.color = themeBg * 6f;
			GUILayout.Label("Credits", val, Array.Empty<GUILayoutOption>());
			GUILayout.Space(15f);
			GUILayout.Label("made with <3 from misa", val2, Array.Empty<GUILayoutOption>());
			GUILayout.Space(10f);
			GUILayout.Label("special thanks to:", val2, Array.Empty<GUILayoutOption>());
			GUILayout.Label("- zbytek (@probablymaybehuh) for the UI design, originally from a GTAG copy cheat", val2, Array.Empty<GUILayoutOption>());
			GUILayout.Label("- misa (@nettyspend) for buying the game and making the mods", val2, Array.Empty<GUILayoutOption>());
			GUILayout.Label("- dave meatball (@synq.) for emotional support, helping me with broken mods, and helping me test", val2, Array.Empty<GUILayoutOption>());
			GUILayout.Space(10f);
			GUILayout.Label(":D", val2, Array.Empty<GUILayoutOption>());
		}

		private void DrawChangelogTab()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: 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_0047: 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_0058: Expected O, but got Unknown
			//IL_0062: 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_0070: 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_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Expected O, but got Unknown
			//IL_008e: 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)
			Notifications.SendOnce("\n[Cherry] Changelog, see what changed in this Cherry update!");
			GUILayout.Space(10f);
			GUI.color = Color.cyan;
			GUIStyle val = new GUIStyle(GUI.skin.label)
			{
				fontSize = 20,
				font = menuFont,
				fontStyle = (FontStyle)1,
				alignment = (TextAnchor)4
			};
			GUIStyle val2 = new GUIStyle(GUI.skin.label)
			{
				fontSize = 14,
				font = menuFont,
				wordWrap = true,
				alignment = (TextAnchor)1
			};
			GUI.color = themeBg * 6f;
			GUILayout.Label("Changelog", val, Array.Empty<GUILayoutOption>());
			GUILayout.Space(15f);
			GUILayout.Label("version 1.2", val2, Array.Empty<GUILayoutOption>());
			GUILayout.Space(10f);
			GUILayout.Label("<b>things added:</b>", val2, Array.Empty<GUILayoutOption>());
			GUILayout.Label("- name controlling by inputs in a new tab", val2, Array.Empty<GUILayoutOption>());
			GUILayout.Space(5f);
			GUILayout.Label("<b>things changed:</b>", val2, Array.Empty<GUILayoutOption>());
			GUILayout.Label("- made spammers 'prefabs' and made it so they only spawn once when you click the prefab name", val2, Array.Empty<GUILayoutOption>());
		}

		private void DrawNameSettings()
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: 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_0043: 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_0054: Expected O, but got Unknown
			//IL_005e: 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_006c: 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_0081: 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_0092: Expected O, but got Unknown
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			InitStyles();
			Notifications.SendOnce("\n[Cherry] Name settings, put a custom name or change its color.");
			GUILayout.Space(10f);
			GUIStyle val = new GUIStyle(GUI.skin.label)
			{
				fontSize = 20,
				font = menuFont,
				fontStyle = (FontStyle)1,
				alignment = (TextAnchor)4
			};
			GUIStyle val2 = new GUIStyle(GUI.skin.label)
			{
				fontSize = 14,
				font = menuFont,
				wordWrap = true,
				alignment = (TextAnchor)1,
				richText = false
			};
			GUILayout.Label("Name Settings", val, Array.Empty<GUILayoutOption>());
			GUILayout.Space(10f);
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			GUILayout.FlexibleSpace();
			customName = GUILayout.TextField(customName, 25, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(200f) });
			GUILayout.FlexibleSpace();
			GUILayout.EndHorizontal();
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			GUILayout.FlexibleSpace();
			if (GUILayout.Button("Apply", buttonStyle, Array.Empty<GUILayoutOption>()))
			{
				PhotonNetwork.NickName = customName;
				RespawnCharacter();
			}
			GUILayout.FlexibleSpace();
			GUILayout.EndHorizontal();
			GUILayout.Space(10f);
			GUI.color = Color.cyan;
			GUILayout.Label("name: " + customName, val2, Array.Empty<GUILayoutOption>());
		}

		public Character GetOwnCharacter()
		{
			Character val = null;
			Character[] array = Resources.FindObjectsOfTypeAll<Character>();
			foreach (Character val2 in array)
			{
				if (((MonoBehaviourPun)val2).photonView.IsMine && (Object)(object)val == (Object)null)
				{
					val = val2;
				}
			}
			return val;
		}

		public static void RespawnCharacter()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			PhotonNetwork.Instantiate("Character", ((Component)Camera.main).transform.position, ((Component)Camera.main).transform.rotation, (byte)0, (object[])null);
			PhotonNetwork.Instantiate("Player", ((Component)Camera.main).transform.position, ((Component)Camera.main).transform.rotation, (byte)0, (object[])null);
			Notifications.SendOnce("\n[Cherry] Character respawned successfully!");
		}

		public static void EmptySlot(Player pla, int s)
		{
			((MonoBehaviourPun)pla).photonView.RPC("RPCRemoveItemFromSlot", (RpcTarget)0, new object[1] { (byte)s });
		}

		public static void DropSlot(Character pla, int s)
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			((MonoBehaviourPun)pla.refs.items).photonView.RPC("DropItemFromSlotRPC", (RpcTarget)0, new object[2]
			{
				(byte)s,
				pla.Head
			});
		}

		private void SaveThemeToFile(Theme theme, Color themeBg, Color themeAccent)
		{
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: 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_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: 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)
			string text = Path.Combine(Application.persistentDataPath, "Cherry");
			string text2 = Path.Combine(text, "theme.json");
			ThemeData themeData = new ThemeData();
			themeData.themeName = theme.ToString();
			themeData.bgColor = new float[3] { themeBg.r, themeBg.g, themeBg.b };
			themeData.accentColor = new float[3] { themeAccent.r, themeAccent.g, themeAccent.b };
			ThemeData themeData2 = themeData;
			if (lastSavedThemeData == null && File.Exists(text2))
			{
				string text3 = File.ReadAllText(text2);
				lastSavedThemeData = JsonUtility.FromJson<ThemeData>(text3);
			}
			if (IsThemeDifferent(lastSavedThemeData, themeData2))
			{
				if (!Directory.Exists(text))
				{
					Directory.CreateDirectory(text);
				}
				string contents = JsonUtility.ToJson((object)themeData2, true);
				File.WriteAllText(text2, contents);
				lastSavedThemeData = themeData2;
				Debug.Log((object)("saved current theme to " + text2));
			}
		}

		private bool IsThemeDifferent(ThemeData a, ThemeData b)
		{
			if (a == null || b == null)
			{
				return true;
			}
			if (a.themeName != b.themeName)
			{
				return true;
			}
			for (int i = 0; i < 3; i++)
			{
				if (Mathf.Abs(a.bgColor[i] - b.bgColor[i]) > 0.001f)
				{
					return true;
				}
				if (Mathf.Abs(a.accentColor[i] - b.accentColor[i]) > 0.001f)
				{
					return true;
				}
			}
			return false;
		}

		public static void Kill(Character h)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			((MonoBehaviourPun)h).photonView.RPC("RPCA_Die", (RpcTarget)0, new object[1] { ((Component)Camera.main).transform.position });
		}

		public static void Revive(Character h, Vector3 where, bool status)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			((MonoBehaviourPun)h).photonView.RPC("RPCA_ReviveAtPosition", (RpcTarget)0, new object[2] { where, status });
		}

		public static void Fall(Character h, float seconds)
		{
			((MonoBehaviourPun)h).photonView.RPC("RPCA_Fall", (RpcTarget)0, new object[1] { seconds });
		}

		public static void PassOut(Character h)
		{
			((MonoBehaviourPun)h).photonView.RPC("RPCA_PassOut", (RpcTarget)0, new object[0]);
		}

		public static void Crouch(Character h, bool setcrouch)
		{
			((MonoBehaviourPun)h).photonView.RPC("RPCA_SetCrouch", (RpcTarget)0, new object[1] { setcrouch });
		}
	}
	[Serializable]
	public class ThemeData
	{
		public string themeName;

		public float[] bgColor;

		public float[] accentColor;
	}
}
namespace Cherry.Main
{
	internal class CustomizeSpam
	{
		private static CharacterCustomization cachedCustomization;

		public static float cooldown = 0.07f;

		public static void Run()
		{
			if (Time.time > cooldown)
			{
				if ((Object)(object)cachedCustomization == (Object)null && (Object)(object)Character.localCharacter != (Object)null)
				{
					cachedCustomization = ((Component)Character.localCharacter).GetComponent<CharacterCustomization>();
				}
				CharacterCustomization obj = cachedCustomization;
				if (obj != null)
				{
					obj.RandomizeCosmetics();
				}
				cooldown = Time.time + 0.07f;
			}
		}
	}
	internal class DrawMod
	{
		public static Vector3 spawnpos = ((Component)Camera.main).transform.forward + new Vector3(0f, 0f, 0.5f);

		public static bool IHFewhf = false;

		public static float togglecool = 0.09f;

		public static float togglecool2 = 0.55f;

		public static string currentColor = "Clusterberry Red";

		public static GameObject wqoifjfr;

		private static readonly List<string> availableColors = new List<string> { "Clusterberry Red", "Clusterberry Black", "Clusterberry Yellow", "Clusterberry_UNUSED" };

		private static int currentColorIndex = -1;

		public static void Run()
		{
			//IL_004d: 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_0066: 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_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			Notifications.SendOnce("\n[Cherry] To draw, hold G and look around. To cleanup, press H.");
			if (UnityInput.Current.GetKey((KeyCode)103) && Time.time > togglecool)
			{
				wqoifjfr = PhotonNetwork.Instantiate("0_Items/" + currentColor, ((Component)Camera.main).transform.position + ((Component)Camera.main).transform.forward * 2f, Quaternion.identity, (byte)0, (object[])null);
				((MonoBehaviourPun)wqoifjfr.GetComponent<Item>()).photonView.RPC("SetKinematicRPC", (RpcTarget)0, new object[3]
				{
					true,
					wqoifjfr.transform.position,
					wqoifjfr.transform.rotation
				});
				togglecool = Time.time + 0.09f;
			}
			if (UnityInput.Current.GetKey((KeyCode)104))
			{
				Cleanup();
			}
		}

		public static void SwitchColors()
		{
			if (currentColorIndex == -1)
			{
				currentColorIndex = availableColors.IndexOf(currentColor);
				if (currentColorIndex == -1)
				{
					currentColorIndex = 0;
				}
			}
			currentColorIndex = (currentColorIndex + 1) % availableColors.Count;
			currentColor = availableColors[currentColorIndex];
			Notifications.SendOnce("[Cherry] Switched color to " + currentColor + ".");
		}

		public static void Cleanup()
		{
			PhotonView[] array = Object.FindObjectsOfType<PhotonView>();
			foreach (PhotonView val in array)
			{
				if (Object.op_Implicit((Object)(object)((Component)val).gameObject.GetComponent<Item>()))
				{
					PhotonNetwork.Destroy(val);
				}
			}
		}

		public static void Clean()
		{
			Notifications.Reset("\n[Cherry] To draw, hold G and look around. To cleanup, press H.");
		}
	}
	internal class DropAllItems
	{
		public static void Run()
		{
			PhotonNetwork.SetMasterClient(PhotonNetwork.LocalPlayer);
			foreach (Character allCharacter in Character.AllCharacters)
			{
				if ((Object)(object)allCharacter != (Object)null && !((MonoBehaviourPun)allCharacter).photonView.IsMine)
				{
					Plugin.DropSlot(allCharacter, 0);
					Plugin.DropSlot(allCharacter, 1);
					Plugin.DropSlot(allCharacter, 2);
				}
			}
		}
	}
	internal class Fly
	{
		public static bool fly;

		public static void Run()
		{
			fly = true;
		}

		public static void Cleanup()
		{
			fly = false;
		}
	}
	internal class GravityGun
	{
		public static float laserRange = 100f;

		public static Item GrabbedItem;

		public static void Run()
		{
			//IL_001c: 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)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: 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_00de: 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_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			if (!Input.GetKey((KeyCode)102))
			{
				return;
			}
			Ray val = default(Ray);
			((Ray)(ref val))..ctor(((Component)Camera.main).transform.position, ((Component)Camera.main).transform.forward);
			RaycastHit val2 = default(RaycastHit);
			if (Physics.Raycast(val, ref val2, laserRange))
			{
				Debug.Log((object)("ray hit: " + ((Object)((RaycastHit)(ref val2)).collider).name));
				Item componentInParent = ((Component)((RaycastHit)(ref val2)).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
				});
			}
		}
	}
	internal class InfiniteStamina
	{
		public static void Run()
		{
			Character.localCharacter.AddStamina(float.MaxValue);
		}
	}
	internal class ItemRemoveALl
	{
		public static void Run()
		{
			PhotonNetwork.SetMasterClient(PhotonNetwork.LocalPlayer);
			foreach (Player allPlayer in PlayerHandler.GetAllPlayers())
			{
				if ((Object)(object)allPlayer != (Object)null && !((MonoBehaviourPun)allPlayer).photonView.IsMine)
				{
					Plugin.EmptySlot(allPlayer, 0);
					Plugin.EmptySlot(allPlayer, 1);
					Plugin.EmptySlot(allPlayer, 2);
				}
			}
		}
	}
	internal class JumpAll
	{
		public static void Run()
		{
			Character[] array = Resources.FindObjectsOfTypeAll<Character>();
			foreach (Character val in array)
			{
				if ((Object)(object)val != (Object)null && !((MonoBehaviourPun)((Component)val).gameObject.GetComponent<Character>()).photonView.IsMine)
				{
					((MonoBehaviourPun)val).photonView.RPC("JumpRpc", (RpcTarget)0, new object[1] { true });
				}
			}
		}
	}
}
namespace Cherry.Funny
{
	internal class CrouchAll
	{
		public static void Run()
		{
			foreach (Character allCharacter in Character.AllCharacters)
			{
				if (!((MonoBehaviourPun)allCharacter).photonView.IsMine)
				{
					Plugin.Crouch(allCharacter, setcrouch: true);
				}
			}
		}
	}
	internal class FallAll
	{
		public static void Run()
		{
			foreach (Character allCharacter in Character.AllCharacters)
			{
				if (!((MonoBehaviourPun)allCharacter).photonView.IsMine)
				{
					Plugin.Fall(allCharacter, 5f);
				}
			}
		}
	}
	internal class KillAll
	{
		public static void Run()
		{
			foreach (Character allCharacter in Character.AllCharacters)
			{
				if (!((MonoBehaviourPun)allCharacter).photonView.IsMine)
				{
					Plugin.Kill(allCharacter);
				}
			}
		}
	}
	internal class PassOutAll
	{
		public static void Run()
		{
			foreach (Character allCharacter in Character.AllCharacters)
			{
				if (!((MonoBehaviourPun)allCharacter).photonView.IsMine)
				{
					Plugin.PassOut(allCharacter);
				}
			}
		}
	}
	internal class ReviveAll
	{
		public static void Run()
		{
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			foreach (Character allCharacter in Character.AllCharacters)
			{
				if (!((MonoBehaviourPun)allCharacter).photonView.IsMine)
				{
					Plugin.Revive(allCharacter, ((Component)Camera.main).transform.position, status: false);
				}
			}
		}
	}
	internal class ReviveAllWithStatus
	{
		public static void Run()
		{
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			foreach (Character allCharacter in Character.AllCharacters)
			{
				if (!((MonoBehaviourPun)allCharacter).photonView.IsMine)
				{
					Plugin.Revive(allCharacter, ((Component)Camera.main).transform.position, status: true);
				}
			}
		}
	}
}
namespace Cherry.Exploits
{
	internal class FlagSpam
	{
		public static bool sswsw = false;

		public static GameObject q = null;

		public static float cc = 0.5f;

		public static float ccc = 0.5f;

		public static void Run()
		{
			//IL_0020: 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)
			//IL_006c: 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_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			if (!sswsw && (Object)(object)q == (Object)null)
			{
				q = PhotonNetwork.Instantiate("0_Items/Flag_Plantable_Seagull", Vector3.zero, Quaternion.identity, (byte)0, (object[])null);
				sswsw = true;
			}
			if ((Object)(object)q == (Object)null || !Input.GetKey((KeyCode)102))
			{
				return;
			}
			Ray val = default(Ray);
			((Ray)(ref val))..ctor(((Component)Camera.main).transform.position, ((Component)Camera.main).transform.forward);
			RaycastHit val2 = default(RaycastHit);
			if (Physics.Raycast(val, ref val2, 50f) && Time.time >= cc)
			{
				Constructable component = q.GetComponent<Constructable>();
				if ((Object)(object)component != (Object)null && (Object)(object)((MonoBehaviourPun)component).photonView != (Object)null)
				{
					((MonoBehaviourPun)component).photonView.RPC("CreatePrefabRPC", (RpcTarget)0, new object[2]
					{
						((RaycastHit)(ref val2)).point,
						Quaternion.identity
					});
				}
				cc = Time.time + ccc;
			}
		}

		public static void Cleanup()
		{
			if ((Object)(object)q != (Object)null)
			{
				PhotonNetwork.Destroy(q);
				q = null;
			}
			GameObject[] array = Object.FindObjectsOfType<GameObject>();
			foreach (GameObject val in array)
			{
				if (((Object)val).name.Contains("Flag_planted_seagull(Clone)"))
				{
					PhotonView component = val.GetComponent<PhotonView>();
					if ((Object)(object)component != (Object)null && component.IsMine)
					{
						Object.Destroy((Object)(object)val);
					}
				}
			}
			sswsw = false;
		}
	}
	internal class NameBlindAll
	{
		public static void BlindAll()
		{
			PhotonNetwork.NickName = "<size=9999><color=black>■</color></size>";
			Plugin.RespawnCharacter();
		}

		public static void FlashbangAll()
		{
			PhotonNetwork.NickName = "<size=9999><color=white>■</color></size>";
			Plugin.RespawnCharacter();
		}

		public static void BleedAll()
		{
			PhotonNetwork.NickName = "<size=9999><color=red>■</color></size>";
			Plugin.RespawnCharacter();
		}

		public static void BlueAll()
		{
			PhotonNetwork.NickName = "<size=9999><color=blue>■</color></size>";
			Plugin.RespawnCharacter();
		}

		public static void CherryName()
		{
			PhotonNetwork.NickName = "<size=35><color=#FF0033>C</color><color=#FF1A47>h</color><color=#FF3366>e</color><color=#FF4D7A>r</color><color=#FF6699>r</color><color=#FF80B3>y</color> <color=#FF4D7A>M</color><color=#FF3366>e</color><color=#FF1A47>n</color><color=#FF0033>u</color></size>";
			Plugin.RespawnCharacter();
		}
	}
	internal class NameChanger
	{
		private static int current = 0;

		private static int max = 10;

		public static void MakeNameRandomEmoji()
		{
			PhotonNetwork.NickName = $"<size=50><sprite={current}></size>";
			Debug.Log((object)("set name to sprite " + current));
			Plugin.RespawnCharacter();
			current++;
			if (current > max)
			{
				current = 0;
			}
		}

		public static void MakeNameEmojis()
		{
			PhotonNetwork.NickName = "<sprite=0><sprite=1><sprite=2><sprite=3><sprite=4><sprite=5><sprite=6><sprite=7><sprite=8><sprite=9><sprite=10><sprite=11>";
			Plugin.RespawnCharacter();
		}
	}
	internal class ObjectSpams
	{
		public static void PassportSpam()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			PhotonNetwork.Instantiate("0_Items/Passport", ((Component)Camera.main).transform.position, ((Component)Camera.main).transform.rotation, (byte)0, (object[])null);
		}

		public static void BingBongSpam()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			PhotonNetwork.Instantiate("0_Items/BingBong", ((Component)Camera.main).transform.position, ((Component)Camera.main).transform.rotation, (byte)0, (object[])null);
		}

		public static void BotSpam()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = PhotonNetwork.Instantiate("Character", ((Component)Camera.main).transform.position, ((Component)Camera.main).transform.rotation, (byte)0, (object[])null);
			GameObject val2 = PhotonNetwork.Instantiate("Player", ((Component)Camera.main).transform.position, ((Component)Camera.main).transform.rotation, (byte)0, (object[])null);
			if (Object.op_Implicit((Object)(object)val) && (Object)(object)val2 != (Object)null)
			{
				((Behaviour)val.GetComponent<Character>()).enabled = false;
				((Behaviour)val.GetComponent<CharacterMovement>()).enabled = false;
			}
		}
	}
}
namespace Cherry.Backend
{
	internal class Notifications
	{
		private static readonly HashSet<string> sentMessages = new HashSet<string>();

		public static void SendOnce(string message)
		{
			if (!sentMessages.Contains(message) && TrySend(message))
			{
				sentMessages.Add(message);
			}
		}

		public static void Reset(string message)
		{
			sentMessages.Remove(message);
		}

		public static void ResetAll()
		{
			sentMessages.Clear();
		}

		private static bool TrySend(string message)
		{
			PlayerConnectionLog val = Object.FindFirstObjectByType<PlayerConnectionLog>();
			if ((Object)(object)val == (Object)null)
			{
				return false;
			}
			MethodInfo method = typeof(PlayerConnectionLog).GetMethod("AddMessage", BindingFlags.Instance | BindingFlags.NonPublic);
			if (method != null)
			{
				method.Invoke(val, new object[1] { message });
				return true;
			}
			Debug.LogWarning((object)"AddMessage method not found on PlayerConnectionLog.");
			return false;
		}
	}
}