Decompiled source of SuperLab v0.1.0

Mods/SuperLab.dll

Decompiled 2 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BoneLib;
using BoneLib.BoneMenu;
using Il2CppInterop.Runtime;
using Il2CppInterop.Runtime.InteropTypes;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppSLZ.Marrow;
using Il2CppSLZ.Marrow.Data;
using Il2CppSLZ.Marrow.PuppetMasta;
using MelonLoader;
using MelonLoader.Preferences;
using Microsoft.CodeAnalysis;
using SuperLab;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: MelonInfo(typeof(Core), "SuperLab", "1.0.0", "gamergaming (ported by trev)", null)]
[assembly: MelonGame("Stress Level Zero", "BONELAB")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("SuperLab")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("SuperLab")]
[assembly: AssemblyTitle("SuperLab")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace SuperLab
{
	public class Core : MelonMod
	{
		private bool floating = false;

		private bool firstPress = false;

		private bool firstPress2 = false;

		private float previousPressedTime;

		private float previousPressedTime2;

		internal HeatVisionLaserComponent laserLeft;

		internal HeatVisionLaserComponent laserRight;

		internal static AudioSource heatSfx;

		public static Transform leftEye;

		public static Transform rightEye;

		public MelonPreferences_Category Category;

		private MelonPreferences_Entry<bool> modtoggle;

		private MelonPreferences_Entry<bool> canAirMove;

		private MelonPreferences_Entry<bool> canStrength;

		private MelonPreferences_Entry<bool> flydamp;

		private MelonPreferences_Entry<bool> floatdamp;

		private MelonPreferences_Entry<bool> canFly;

		private MelonPreferences_Entry<bool> canFloat;

		private MelonPreferences_Entry<bool> canHeat;

		private MelonPreferences_Entry<bool> canFreeze;

		private MelonPreferences_Entry<float> overallMutliplier;

		private MelonPreferences_Entry<float> airmulti;

		private MelonPreferences_Entry<float> Exponent;

		private MelonPreferences_Entry<float> Divisor;

		private MelonPreferences_Entry<float> GripMinimum;

		private MelonPreferences_Entry<float> GripMaximum;

		private MelonPreferences_Entry<float> doublePressDelay;

		private MelonPreferences_Entry<float> doublePressDelay2;

		private MelonPreferences_Entry<bool> canSpeed;

		private MelonPreferences_Entry<float> overallMutliplierSpeed;

		private MelonPreferences_Entry<float> overallMutliplierDist;

		private Vector3 PosPrevFrLf;

		private Vector3 PosPrevFrRt;

		private Vector3 PlrPosCurFr;

		private Vector3 PlrPosPrevFr;

		private Vector3 PosCurFrLf;

		private Vector3 PosCurFrRt;

		public static MelonPreferences_Entry<bool> heatenabled;

		public static MelonPreferences_Entry<bool> weightlessGrabbing;

		public static float weightlessMass = 0.1f;

		private bool canFlyControl = true;

		private float floatstate = 0f;

		private bool isfloatingDampRequired = false;

		private bool isflyDampRequired = false;

		private static bool funny;

		private List<GameObject> kryptonite = new List<GameObject>();

		private bool kryptonited = false;

		public override void OnInitializeMelon()
		{
			//IL_02bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_030d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0335: Unknown result type (might be due to invalid IL or missing references)
			//IL_035d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0385: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_03df: 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_0428: Unknown result type (might be due to invalid IL or missing references)
			//IL_042d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0471: Unknown result type (might be due to invalid IL or missing references)
			//IL_0476: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0503: Unknown result type (might be due to invalid IL or missing references)
			//IL_0508: Unknown result type (might be due to invalid IL or missing references)
			//IL_054c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0551: Unknown result type (might be due to invalid IL or missing references)
			//IL_0589: Unknown result type (might be due to invalid IL or missing references)
			//IL_058e: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_05de: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_061c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0654: Unknown result type (might be due to invalid IL or missing references)
			//IL_068b: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0704: Unknown result type (might be due to invalid IL or missing references)
			//IL_073a: Unknown result type (might be due to invalid IL or missing references)
			//IL_078e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0793: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_07bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0805: Unknown result type (might be due to invalid IL or missing references)
			//IL_080a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0841: Unknown result type (might be due to invalid IL or missing references)
			//IL_0856: Unknown result type (might be due to invalid IL or missing references)
			//IL_087f: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_08cb: Unknown result type (might be due to invalid IL or missing references)
			Category = MelonPreferences.CreateCategory("Superman");
			modtoggle = Category.CreateEntry<bool>("TOGGLED", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			canAirMove = Category.CreateEntry<bool>("AIRMOVEMENT", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			flydamp = Category.CreateEntry<bool>("FLYVELDAMP", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			floatdamp = Category.CreateEntry<bool>("FLOATVELDAMP", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			canSpeed = Category.CreateEntry<bool>("SPEED TOGGLE", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			canStrength = Category.CreateEntry<bool>("STRENGTH TOGGLE", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			weightlessGrabbing = Category.CreateEntry<bool>("WEIGHTLESS GRABBING TOGGLE", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			canFly = Category.CreateEntry<bool>("FLIGHT TOGGLE", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			canFloat = Category.CreateEntry<bool>("FLOAT TOGGLE", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			canHeat = Category.CreateEntry<bool>("HEAT TOGGLE", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			canFreeze = Category.CreateEntry<bool>("FREEZE TOGGLE", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			heatenabled = Category.CreateEntry<bool>("HEAT VISUAL TESTING", false, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			overallMutliplier = Category.CreateEntry<float>("OVERALL MUTLI", 1f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			overallMutliplierSpeed = Category.CreateEntry<float>("SPEED MUTLI", 1f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			overallMutliplierDist = Category.CreateEntry<float>("DISTANCE MUTLI", 1f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			airmulti = Category.CreateEntry<float>("AIR MUTLI", 1f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Exponent = Category.CreateEntry<float>("EXPONENT", 1f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Divisor = Category.CreateEntry<float>("DIVISOR", 1f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			GripMinimum = Category.CreateEntry<float>("GripMinimum", 1f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			GripMaximum = Category.CreateEntry<float>("GripMaximum", 1.1f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			doublePressDelay = Category.CreateEntry<float>("FloatDoubleTimespan", 0.3f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			doublePressDelay2 = Category.CreateEntry<float>("FlyDoubleTimespan", 0.3f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
			Page val = Page.Root.CreatePage("Superman", Color.white, 0, true);
			Page val2 = val.CreatePage("Mod Options", Color.red, 0, true);
			val2.CreateBool("Mod Toggled", Color.red, modtoggle.Value, (Action<bool>)delegate(bool value)
			{
				modtoggle.Value = value;
			});
			val2.CreateBool("Fly Toggled", Color.red, canFly.Value, (Action<bool>)delegate(bool value)
			{
				canFly.Value = value;
			});
			val2.CreateBool("Float Toggled", Color.red, canFloat.Value, (Action<bool>)delegate(bool value)
			{
				canFloat.Value = value;
			});
			val2.CreateBool("[WIP] Heat Toggle", Color.red, canHeat.Value, (Action<bool>)delegate(bool value)
			{
				canHeat.Value = value;
			});
			val2.CreateBool("[TC] Freeze Toggle", Color.red, canFreeze.Value, (Action<bool>)delegate(bool value)
			{
				canFreeze.Value = value;
			});
			Page val3 = val.CreatePage("Flight Options", Color32.op_Implicit(new Color32((byte)0, (byte)99, byte.MaxValue, byte.MaxValue)), 0, true);
			val3.CreateFloat("Overall Multiplier", Color32.op_Implicit(new Color32((byte)0, (byte)99, byte.MaxValue, byte.MaxValue)), overallMutliplier.Value, 1f, 0f, float.MaxValue, (Action<float>)delegate(float value)
			{
				overallMutliplier.Value = value;
			});
			val3.CreateFloat("Magnitude Exponent", Color32.op_Implicit(new Color32((byte)0, (byte)99, byte.MaxValue, byte.MaxValue)), Exponent.Value, 0.1f, 0f, float.MaxValue, (Action<float>)delegate(float value)
			{
				Exponent.Value = value;
			});
			val3.CreateFloat("Magnitude Divisor", Color32.op_Implicit(new Color32((byte)0, (byte)99, byte.MaxValue, byte.MaxValue)), Divisor.Value, 0.1f, 0f, float.MaxValue, (Action<float>)delegate(float value)
			{
				Divisor.Value = value;
			});
			val3.CreateFloat("Grip Minimum", Color32.op_Implicit(new Color32((byte)0, (byte)99, byte.MaxValue, byte.MaxValue)), GripMinimum.Value, 0.1f, 0f, 1.1f, (Action<float>)delegate(float value)
			{
				GripMinimum.Value = value;
			});
			val3.CreateFloat("Grip Maximum", Color32.op_Implicit(new Color32((byte)0, (byte)99, byte.MaxValue, byte.MaxValue)), GripMaximum.Value, 0.1f, 0f, 1.1f, (Action<float>)delegate(float value)
			{
				GripMaximum.Value = value;
			});
			val3.CreateBool("Fly Velocity Dampening", Color32.op_Implicit(new Color32((byte)0, (byte)99, byte.MaxValue, byte.MaxValue)), flydamp.Value, (Action<bool>)delegate(bool value)
			{
				flydamp.Value = value;
			});
			Page val4 = val.CreatePage("Float Options", Color32.op_Implicit(new Color32((byte)242, (byte)0, (byte)250, byte.MaxValue)), 0, true);
			val4.CreateBool("Float Velocity Dampening", Color32.op_Implicit(new Color32((byte)242, (byte)0, (byte)250, byte.MaxValue)), floatdamp.Value, (Action<bool>)delegate(bool value)
			{
				floatdamp.Value = value;
			});
			Page val5 = val.CreatePage("[WIP] SuperSpeed Options", Color.cyan, 0, true);
			val5.CreateBool("SuperSpeed", Color.cyan, canSpeed.Value, (Action<bool>)delegate(bool value)
			{
				canSpeed.Value = value;
			});
			val5.CreateFloat("Overall Multiplier", Color.cyan, overallMutliplierSpeed.Value, 0.5f, 0f, float.MaxValue, (Action<float>)delegate(float value)
			{
				overallMutliplier.Value = value;
			});
			val5.CreateFloat("Distance Mutliplier", Color.cyan, overallMutliplierDist.Value, 0.5f, 0f, float.MaxValue, (Action<float>)delegate(float value)
			{
				overallMutliplier.Value = value;
			});
			Page val6 = val.CreatePage("[WIP] SuperStrength Options", Color.gray, 0, true);
			val6.CreateBool("SuperStrength", Color.gray, canStrength.Value, (Action<bool>)delegate(bool value)
			{
				canStrength.Value = value;
			});
			val6.CreateBool("Weightless Grabbing", Color.gray, weightlessGrabbing.Value, (Action<bool>)delegate(bool value)
			{
				weightlessGrabbing.Value = value;
			});
			val6.CreateBool("weightless ungripping", Color.gray, funny, (Action<bool>)delegate(bool value)
			{
				funny = value;
			});
			val6.CreateFloat("Weightless Mass", Color.gray, weightlessMass, 0.1f, 0f, float.MaxValue, (Action<float>)delegate(float value)
			{
				weightlessMass = value;
			});
			Page val7 = val.CreatePage("Control Options", Color32.op_Implicit(new Color32((byte)192, (byte)0, (byte)220, byte.MaxValue)), 0, true);
			val7.CreateFloat("FloatDoubleTimespan", Color32.op_Implicit(new Color32((byte)192, (byte)0, (byte)220, byte.MaxValue)), doublePressDelay.Value, 0.05f, 0f, float.MaxValue, (Action<float>)delegate(float value)
			{
				doublePressDelay.Value = value;
			});
			val7.CreateFloat("FlyDoubleTimespan", Color32.op_Implicit(new Color32((byte)192, (byte)0, (byte)220, byte.MaxValue)), doublePressDelay2.Value, 0.05f, 0f, float.MaxValue, (Action<float>)delegate(float value)
			{
				doublePressDelay2.Value = value;
			});
			Page val8 = val.CreatePage("Mid-Air Options", Color.white, 0, true);
			val8.CreateBool("Mid-Air Movement Enabled", Color.white, canAirMove.Value, (Action<bool>)delegate(bool value)
			{
				canAirMove.Value = value;
			});
			val8.CreateFloat("Multiplier", Color.white, airmulti.Value, 0.5f, 0f, float.MaxValue, (Action<float>)delegate(float value)
			{
				airmulti.Value = value;
			});
			Page val9 = val.CreatePage("[WIP] HeatVision Options", Color.white, 0, true);
			val9.CreateBool("HeatVision Enabled", Color.yellow, heatenabled.Value, (Action<bool>)delegate(bool value)
			{
				heatenabled.Value = value;
			});
			Hooking.OnLevelLoaded += OnLevelInitialized;
			Hooking.OnGripAttached += OnGripAttatched;
			Hooking.OnGripDetached += OnGripDetached;
		}

		private static void OnGripAttatched(Grip grip, Hand hand)
		{
			GameObject gameObject = ((Component)((Component)grip).transform.root).gameObject;
			foreach (Rigidbody componentsInChild in gameObject.GetComponentsInChildren<Rigidbody>())
			{
				((Component)componentsInChild).gameObject.AddComponent<GrabbedObject>().RemoveWeight();
			}
		}

		private static void OnGripDetached(Grip grip, Hand hand)
		{
			GameObject gameObject = ((Component)((Component)grip).transform.root).gameObject;
			if (funny)
			{
				return;
			}
			foreach (Rigidbody componentsInChild in gameObject.GetComponentsInChildren<Rigidbody>())
			{
				GrabbedObject component = ((Component)componentsInChild).gameObject.GetComponent<GrabbedObject>();
				if ((Object)(object)component != (Object)null)
				{
					component.RestoreWeight();
				}
			}
		}

		private void OnLevelInitialized(LevelInfo info)
		{
			leftEye = ((Component)Player.RigManager.animationRig).transform.Find("Pelvis/Spine/Chest/Neck/Head");
			rightEye = ((Component)Player.RigManager.animationRig).transform.Find("Pelvis/Spine/Chest/Neck/Head");
			MelonLogger.Msg(((Object)((Component)Player.RigManager.animationRig).transform.Find("Pelvis/Spine/Chest/Neck/Head")).name);
			EmebeddedAssetBundleLakatrazz.LoadSFX(((MelonBase)this).MelonAssembly.Assembly);
		}

		public override void OnDeinitializeMelon()
		{
			MelonPreferences.Save();
		}

		public override void OnUpdate()
		{
			//IL_0050: 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_00ca: 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_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00fd: 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_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: 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_0219: Unknown result type (might be due to invalid IL or missing references)
			//IL_021e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: 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_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ce: 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_01dd: 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)
			if (!modtoggle.Value || !Player.HandsExist)
			{
				return;
			}
			foreach (GameObject item in kryptonite)
			{
				if (Vector3.Distance(Player.Head.position, item.transform.position) < 10f)
				{
					kryptonited = true;
				}
				else
				{
					kryptonited = true;
				}
			}
			if (canSpeed.Value)
			{
				PosCurFrLf = ((Component)Player.LeftHand).transform.position;
				PosCurFrRt = ((Component)Player.RightHand).transform.position;
				float num = Vector3.Distance(PosPrevFrLf, PosCurFrLf);
				float num2 = Vector3.Distance(PosPrevFrRt, PosCurFrRt);
				float num3 = (num + num2) * overallMutliplierDist.Value * 5f;
				float num4 = num3 * overallMutliplierSpeed.Value * 5f;
				if (Player.LeftController._thumbstickAxis.y > 0f)
				{
					float num5 = Player.LeftController._thumbstickAxis.y * num4;
					Vector3 val = Player.ControllerRig.directionMasterTransform.rotation * new Vector3(Player.LeftController._thumbstickAxis.x, 0f, Player.LeftController._thumbstickAxis.y) * num5;
					Vector3 val2 = new Vector3(val.x, 0f, val.z) * 1f;
					Player.PhysicsRig.torso.rbPelvis.AddForce(val2, (ForceMode)5);
					((MelonBase)this).LoggerInstance.Msg((object)num5);
				}
				PosPrevFrLf = PosCurFrLf;
				PosPrevFrRt = PosCurFrRt;
			}
		}

		public override void OnFixedUpdate()
		{
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: 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)
			//IL_00a7: 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_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: 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_018d: 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_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: 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)
			//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01de: 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_01fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0201: Unknown result type (might be due to invalid IL or missing references)
			//IL_0203: Unknown result type (might be due to invalid IL or missing references)
			//IL_020a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0241: 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_0255: 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_026e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0443: Unknown result type (might be due to invalid IL or missing references)
			//IL_044d: Unknown result type (might be due to invalid IL or missing references)
			if (!modtoggle.Value || !Player.HandsExist || kryptonited)
			{
				return;
			}
			if (canAirMove.Value && floating)
			{
				Vector3 val = default(Vector3);
				((Vector3)(ref val))..ctor(Player.LeftController._thumbstickAxis.x, 0f, Player.LeftController._thumbstickAxis.y);
				Vector3 val2 = Player.ControllerRig.directionMasterTransform.rotation * val;
				Vector3 val3 = val2 * airmulti.Value;
				Player.PhysicsRig.torso.rbPelvis.AddForce(val3 * airmulti.Value, (ForceMode)1);
			}
			if (Player.RightController.GetGripForce() >= GripMinimum.Value && Player.RightController.GetGripForce() < GripMaximum.Value && !Player.RightController._thumbstick && Player.LeftController.GetGripForce() >= GripMinimum.Value && Player.LeftController.GetGripForce() < GripMaximum.Value && !Player.LeftController._thumbstick && canFly.Value && canFlyControl)
			{
				Vector3 val4 = (((Component)Player.RightHand).transform.position + ((Component)Player.LeftHand).transform.position) / 2f;
				Vector3 val5 = (val4 + ((Component)Player.Head).transform.position) / 2f;
				Vector3 val6 = (((Component)Player.RightHand).transform.forward + ((Component)Player.LeftHand).transform.forward) / 2f;
				float num = Mathf.Pow(Vector3.Distance(val5, Player.Head.position), Exponent.Value) / Divisor.Value;
				Player.PhysicsRig.torso.rbPelvis.AddForceAtPosition(val6 * num * overallMutliplier.Value * Player.Avatar.massTotal, Player.Head.position, (ForceMode)1);
				isflyDampRequired = true;
			}
			else
			{
				isflyDampRequired = false;
			}
			if (Player.RightController.GetBButtonDown() && canFloat.Value)
			{
				if (firstPress)
				{
					if (Time.unscaledTime - previousPressedTime <= doublePressDelay.Value)
					{
						float num2 = floatstate;
						float num3 = num2;
						if (num3 != 0f)
						{
							if (num3 != 1f)
							{
								if (num3 == 2f)
								{
									floatstate = 0f;
									Player.PhysicsRig.torso.rbPelvis.constraints = (RigidbodyConstraints)4;
									isfloatingDampRequired = true;
								}
							}
							else
							{
								floatstate = 2f;
								Player.PhysicsRig.torso.rbPelvis.constraints = (RigidbodyConstraints)(floatdamp.Value ? 4 : 0);
								isfloatingDampRequired = true;
							}
						}
						else
						{
							floatstate = 1f;
							Player.PhysicsRig.torso.rbPelvis.constraints = (RigidbodyConstraints)0;
							isfloatingDampRequired = false;
						}
						floating = !floating;
						firstPress = false;
					}
				}
				else
				{
					firstPress = true;
				}
				previousPressedTime = Time.unscaledTime;
			}
			if ((isfloatingDampRequired && floatdamp.Value) || (isflyDampRequired && flydamp.Value))
			{
				Rigidbody rbPelvis = Player.PhysicsRig.torso.rbPelvis;
				rbPelvis.velocity /= 1.2f;
			}
			if (firstPress && Time.unscaledTime - previousPressedTime > doublePressDelay.Value)
			{
				firstPress = false;
			}
			if (Player.LeftController.GetBButtonDown())
			{
				if (firstPress2)
				{
					if (Time.unscaledTime - previousPressedTime2 <= doublePressDelay2.Value)
					{
						canFlyControl = !canFlyControl;
						firstPress2 = false;
					}
				}
				else
				{
					firstPress2 = true;
				}
				previousPressedTime2 = Time.unscaledTime;
			}
			if (firstPress2 && Time.unscaledTime - previousPressedTime2 > doublePressDelay2.Value)
			{
				firstPress2 = false;
			}
			if (Player.LeftController.GetGripForce() >= GripMinimum.Value && Player.LeftController._thumbstick && Player.RightController.GetGripForce() >= GripMinimum.Value && !Player.RightController._thumbstick)
			{
			}
		}
	}
	public static class EmebeddedAssetBundleLakatrazz
	{
		private static AssetBundle assetBundle;

		public static AssetBundle LoadFromAssembly(Assembly assembly, string name)
		{
			string[] manifestResourceNames = assembly.GetManifestResourceNames();
			string[] array = manifestResourceNames;
			foreach (string text in array)
			{
				MelonLogger.Msg(text);
			}
			if (!manifestResourceNames.Contains(name) || true)
			{
				MelonLogger.Msg("Loading embedded bundle data " + name + "...", new object[1] { ConsoleColor.DarkCyan });
				byte[] array2;
				using (Stream stream = assembly.GetManifestResourceStream(name))
				{
					using MemoryStream memoryStream = new MemoryStream();
					stream.CopyTo(memoryStream);
					array2 = memoryStream.ToArray();
				}
				MelonLogger.Msg("Loading bundle from data " + name + "...", new object[1] { ConsoleColor.DarkCyan });
				AssetBundle result = AssetBundle.LoadFromMemory(Il2CppStructArray<byte>.op_Implicit(array2));
				MelonLogger.Msg("Done!", new object[1] { ConsoleColor.DarkCyan });
				return result;
			}
			return null;
		}

		internal static void LoadAssetBundle(Assembly executingAssembly, HeatVisionLaserComponent yes, HeatVisionLaserComponent yes2)
		{
			if ((Object)(object)assetBundle == (Object)null)
			{
				assetBundle = LoadFromAssembly(executingAssembly, "SuperLab.Resources.supermanmod.bundle");
			}
			if ((Object)(object)assetBundle == (Object)null)
			{
				throw new NullReferenceException("ASSET BUNDLE NULL; YOU SUCK AT PROGRAMMING JOE");
			}
			GameObject val = ((Il2CppObjectBase)assetBundle.LoadAsset("HEAT_LASER", Il2CppType.Of<GameObject>())).Cast<GameObject>();
			LineRenderer val2 = (yes.heatLaser = Object.Instantiate<GameObject>(val).GetComponent<LineRenderer>());
			yes.laserObject = ((Component)val2).gameObject;
			yes2.laserObject = ((Component)(yes2.heatLaser = Object.Instantiate<GameObject>(val).GetComponent<LineRenderer>())).gameObject;
			((Object)val2).hideFlags = (HideFlags)32;
			assetBundle.Unload(false);
		}

		internal static void LoadSFX(Assembly executingAssembly)
		{
			if ((Object)(object)assetBundle == (Object)null)
			{
				assetBundle = LoadFromAssembly(executingAssembly, "SuperLab.Resources.supermanmod.bundle");
			}
			if ((Object)(object)assetBundle == (Object)null)
			{
				throw new NullReferenceException("ASSET BUNDLE NULL; YOU SUCK AT PROGRAMMING JOE");
			}
			GameObject val = Object.Instantiate<GameObject>(((Il2CppObjectBase)assetBundle.LoadAsset("HEAT_SFX", Il2CppType.Of<GameObject>())).Cast<GameObject>());
			AudioSource component = val.GetComponent<AudioSource>();
			Core.heatSfx = component;
			((Object)val).hideFlags = (HideFlags)32;
			assetBundle.Unload(false);
		}

		internal static GameObject SpawnKryptonite(Assembly executingAssembly, Vector3 Position)
		{
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)assetBundle == (Object)null)
			{
				assetBundle = LoadFromAssembly(executingAssembly, "SuperLab.Resources.supermanmod.bundle");
			}
			if ((Object)(object)assetBundle == (Object)null)
			{
				throw new NullReferenceException("ASSET BUNDLE NULL; YOU SUCK AT PROGRAMMING JOE");
			}
			GameObject val = Object.Instantiate<GameObject>(((Il2CppObjectBase)assetBundle.LoadAsset("kryptonite", Il2CppType.Of<GameObject>())).Cast<GameObject>());
			val.transform.position = Position;
			((Object)val).hideFlags = (HideFlags)32;
			assetBundle.Unload(false);
			return val;
		}
	}
	[RegisterTypeInIl2Cpp]
	public class GrabbedObject : MonoBehaviour
	{
		public float originalMass;

		public float originalDrag;

		public float originalAngularDrag;

		private Rigidbody rb;

		public GrabbedObject(IntPtr ptr)
			: base(ptr)
		{
		}

		public void Start()
		{
			rb = ((Component)this).gameObject.GetComponent<Rigidbody>();
		}

		public void RemoveWeight()
		{
			if (Core.weightlessGrabbing.Value)
			{
				rb = rb ?? ((Component)this).gameObject.GetComponent<Rigidbody>();
				originalMass = rb.mass;
				originalDrag = rb.drag;
				originalAngularDrag = rb.angularDrag;
				rb.mass = Core.weightlessMass;
				rb.drag = 0.01f;
				rb.angularDrag = 0.01f;
			}
		}

		public void RestoreWeight()
		{
			if (Core.weightlessGrabbing.Value)
			{
				rb = rb ?? ((Component)this).gameObject.GetComponent<Rigidbody>();
				rb.mass = originalMass;
				rb.drag = originalDrag;
				rb.angularDrag = originalAngularDrag;
			}
		}
	}
	[RegisterTypeInIl2Cpp]
	internal class HeatVisionLaserComponent : MonoBehaviour
	{
		public GameObject eyeObj;

		public GameObject laserObject;

		public LineRenderer heatLaser;

		public GameObject hitObject;

		public Vector3 startPos;

		public Vector3 endPos;

		public bool laserEnabled;

		private bool alreadyFound;

		public HeatVisionLaserComponent(IntPtr ptr)
			: base(ptr)
		{
		}

		public void Start()
		{
		}

		public void Update()
		{
			//IL_00b5: 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_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: 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_026d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0277: 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_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: 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_0242: Unknown result type (might be due to invalid IL or missing references)
			//IL_024c: Unknown result type (might be due to invalid IL or missing references)
			if (!Core.heatenabled.Value || !Object.op_Implicit((Object)(object)heatLaser))
			{
				return;
			}
			if (laserEnabled && heatLaser.positionCount == 0)
			{
				EnableLaser();
				((Behaviour)Core.heatSfx).enabled = true;
				Core.heatSfx.Play();
			}
			else if (!laserEnabled)
			{
				EndLaser();
				((Behaviour)Core.heatSfx).enabled = true;
				Core.heatSfx.Stop();
				return;
			}
			RaycastHit val = default(RaycastHit);
			if (Physics.Raycast(startPos + eyeObj.transform.forward / 6f, ((Component)((Component)Player.ControllerRig).GetComponentInChildren<Camera>()).transform.forward, ref val, 10000f))
			{
				endPos = ((RaycastHit)(ref val)).point;
				if ((Object)(object)hitObject == (Object)(object)((Component)((RaycastHit)(ref val)).collider).gameObject)
				{
					alreadyFound = true;
				}
				else
				{
					alreadyFound = false;
				}
				hitObject = ((Component)((RaycastHit)(ref val)).collider).gameObject;
				if (!alreadyFound)
				{
					PuppetMaster componentInChildren = ((Component)hitObject.transform.root).GetComponentInChildren<PuppetMaster>();
					ObjectDestructible componentInChildren2 = ((Component)hitObject.transform.root).GetComponentInChildren<ObjectDestructible>();
					Health componentInChildren3 = ((Component)hitObject.transform.root).GetComponentInChildren<Health>();
					if (Object.op_Implicit((Object)(object)componentInChildren))
					{
						componentInChildren.Kill();
					}
					if (Object.op_Implicit((Object)(object)componentInChildren2))
					{
						componentInChildren2.TakeDamage(Vector3.zero, float.MaxValue, true, (AttackType)0);
					}
					if (Object.op_Implicit((Object)(object)componentInChildren3))
					{
						componentInChildren3.TAKEDAMAGE(float.MaxValue);
					}
					Rigidbody component = hitObject.GetComponent<Rigidbody>();
					if ((Object)(object)component != (Object)null)
					{
						component.AddForce(eyeObj.transform.forward * 50f);
					}
				}
			}
			else
			{
				endPos = ((Component)((Component)Player.ControllerRig).GetComponentInChildren<Camera>()).transform.forward * 1000f;
			}
		}

		public void LateUpdate()
		{
			//IL_000d: 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)
			//IL_002b: 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_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: 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)
			startPos = eyeObj.transform.position - new Vector3(0f, 0.1f, 0f);
			if (Object.op_Implicit((Object)(object)heatLaser))
			{
				heatLaser.SetPositions(Il2CppStructArray<Vector3>.op_Implicit((Vector3[])(object)new Vector3[2] { startPos, endPos }));
			}
		}

		public LineRenderer GetLaserRenderer()
		{
			return heatLaser;
		}

		public void EnableLaser()
		{
			heatLaser.positionCount = 2;
		}

		public void EndLaser()
		{
			heatLaser.positionCount = 0;
		}

		public void DestroyLaser()
		{
			Object.Destroy((Object)(object)heatLaser);
			Object.Destroy((Object)(object)this);
		}
	}
}