Decompiled source of Play as V2 v2.4.3

v2Ultrakill/v2Ultrakill.dll

Decompiled 4 days ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Sandbox.Arm;
using TMPro;
using ULTRAKILL.Cheats;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
using UnityEngine.InputSystem;
using UnityEngine.Rendering;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

[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("v2Ultrakill")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Play as V2 from ULTRAKILL in the hit game ULTRAKILL.")]
[assembly: AssemblyFileVersion("2.4.3.0")]
[assembly: AssemblyInformationalVersion("2.4.3")]
[assembly: AssemblyProduct("Play as V2")]
[assembly: AssemblyTitle("v2Ultrakill")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("2.4.3.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 v2Ultrakill
{
	[BepInPlugin("v2Ultrakill", "Play as V2", "2.4.3")]
	public class MainStuff : BaseUnityPlugin
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static UnityAction <0>__MainMenuSavesButton;
		}

		[CompilerGenerated]
		private sealed class <BadCodeForAdjustingStandardBloodTankGUIPositions>d__121 : IEnumerator<WaitForSecondsRealtime>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private WaitForSecondsRealtime <>2__current;

			public RectTransform rectTransform;

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

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

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

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

			private bool MoveNext()
			{
				//IL_0026: Unknown result type (might be due to invalid IL or missing references)
				//IL_0030: Expected O, but got Unknown
				//IL_01ac: 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_01d2: 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_0157: Unknown result type (might be due to invalid IL or missing references)
				//IL_0166: Unknown result type (might be due to invalid IL or missing references)
				//IL_017d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0191: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f3: 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_011e: Unknown result type (might be due to invalid IL or missing references)
				//IL_008f: Unknown result type (might be due to invalid IL or missing references)
				//IL_009e: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
				//IL_03b2: Unknown result type (might be due to invalid IL or missing references)
				//IL_03c1: Unknown result type (might be due to invalid IL or missing references)
				//IL_03d8: Unknown result type (might be due to invalid IL or missing references)
				//IL_03ec: 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_036c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0383: Unknown result type (might be due to invalid IL or missing references)
				//IL_0397: Unknown result type (might be due to invalid IL or missing references)
				//IL_02ea: 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_0310: Unknown result type (might be due to invalid IL or missing references)
				//IL_0324: Unknown result type (might be due to invalid IL or missing references)
				//IL_0295: Unknown result type (might be due to invalid IL or missing references)
				//IL_02a4: 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_02cf: Unknown result type (might be due to invalid IL or missing references)
				//IL_05a0: Unknown result type (might be due to invalid IL or missing references)
				//IL_05af: Unknown result type (might be due to invalid IL or missing references)
				//IL_05c6: Unknown result type (might be due to invalid IL or missing references)
				//IL_05da: Unknown result type (might be due to invalid IL or missing references)
				//IL_054b: Unknown result type (might be due to invalid IL or missing references)
				//IL_055a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0571: Unknown result type (might be due to invalid IL or missing references)
				//IL_0585: Unknown result type (might be due to invalid IL or missing references)
				//IL_04d8: Unknown result type (might be due to invalid IL or missing references)
				//IL_04e7: Unknown result type (might be due to invalid IL or missing references)
				//IL_04fe: Unknown result type (might be due to invalid IL or missing references)
				//IL_0512: Unknown result type (might be due to invalid IL or missing references)
				//IL_0483: Unknown result type (might be due to invalid IL or missing references)
				//IL_0492: Unknown result type (might be due to invalid IL or missing references)
				//IL_04a9: Unknown result type (might be due to invalid IL or missing references)
				//IL_04bd: Unknown result type (might be due to invalid IL or missing references)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = new WaitForSecondsRealtime(0.01f);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					if (timestopperPlugin == null)
					{
						if (!MonoSingleton<PrefsManager>.Instance.GetBool("weaponIcons", false))
						{
							if (MonoSingleton<PrefsManager>.Instance.GetInt("speedometer", 0) == 0)
							{
								rectTransform.anchoredPosition = new Vector2(rectTransform.anchoredPosition.x, 187f);
								rectTransform.anchoredPosition3D = new Vector3(rectTransform.anchoredPosition.x, 187f, 45f);
							}
							else
							{
								rectTransform.anchoredPosition = new Vector2(rectTransform.anchoredPosition.x, 293f);
								rectTransform.anchoredPosition3D = new Vector3(rectTransform.anchoredPosition.x, 293f, 45f);
							}
						}
						else if (MonoSingleton<PrefsManager>.Instance.GetInt("speedometer", 0) == 0)
						{
							rectTransform.anchoredPosition = new Vector2(rectTransform.anchoredPosition.x, 590f);
							rectTransform.anchoredPosition3D = new Vector3(rectTransform.anchoredPosition.x, 590f, 45f);
						}
						else
						{
							rectTransform.anchoredPosition = new Vector2(rectTransform.anchoredPosition.x, 693f);
							rectTransform.anchoredPosition3D = new Vector3(rectTransform.anchoredPosition.x, 693f, 45f);
						}
					}
					else if (timestopperPlugin != null)
					{
						if (((Object)(object)timeHUD[0] != (Object)null && !timeHUD[0].activeSelf) || ((Object)(object)goldArm != (Object)null && !goldArm.activeSelf))
						{
							if (!MonoSingleton<PrefsManager>.Instance.GetBool("weaponIcons", false))
							{
								if (MonoSingleton<PrefsManager>.Instance.GetInt("speedometer", 0) == 0)
								{
									rectTransform.anchoredPosition = new Vector2(rectTransform.anchoredPosition.x, 187f);
									rectTransform.anchoredPosition3D = new Vector3(rectTransform.anchoredPosition.x, 187f, 45f);
								}
								else
								{
									rectTransform.anchoredPosition = new Vector2(rectTransform.anchoredPosition.x, 293f);
									rectTransform.anchoredPosition3D = new Vector3(rectTransform.anchoredPosition.x, 293f, 45f);
								}
							}
							else if (MonoSingleton<PrefsManager>.Instance.GetInt("speedometer", 0) == 0)
							{
								rectTransform.anchoredPosition = new Vector2(rectTransform.anchoredPosition.x, 590f);
								rectTransform.anchoredPosition3D = new Vector3(rectTransform.anchoredPosition.x, 590f, 45f);
							}
							else
							{
								rectTransform.anchoredPosition = new Vector2(rectTransform.anchoredPosition.x, 693f);
								rectTransform.anchoredPosition3D = new Vector3(rectTransform.anchoredPosition.x, 693f, 45f);
							}
						}
						else if ((Object)(object)timeHUD[0] != (Object)null && timeHUD[0].activeSelf && (Object)(object)goldArm != (Object)null && goldArm.activeSelf)
						{
							if (!MonoSingleton<PrefsManager>.Instance.GetBool("weaponIcons", false))
							{
								if (MonoSingleton<PrefsManager>.Instance.GetInt("speedometer", 0) == 0)
								{
									rectTransform.anchoredPosition = new Vector2(rectTransform.anchoredPosition.x, 251f);
									rectTransform.anchoredPosition3D = new Vector3(rectTransform.anchoredPosition.x, 251f, 45f);
								}
								else
								{
									rectTransform.anchoredPosition = new Vector2(rectTransform.anchoredPosition.x, 357f);
									rectTransform.anchoredPosition3D = new Vector3(rectTransform.anchoredPosition.x, 357f, 45f);
								}
							}
							else if (MonoSingleton<PrefsManager>.Instance.GetInt("speedometer", 0) == 0)
							{
								rectTransform.anchoredPosition = new Vector2(rectTransform.anchoredPosition.x, 653f);
								rectTransform.anchoredPosition3D = new Vector3(rectTransform.anchoredPosition.x, 653f, 45f);
							}
							else
							{
								rectTransform.anchoredPosition = new Vector2(rectTransform.anchoredPosition.x, 757f);
								rectTransform.anchoredPosition3D = new Vector3(rectTransform.anchoredPosition.x, 757f, 45f);
							}
						}
					}
					return false;
				}
			}

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

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

		[CompilerGenerated]
		private sealed class <BadCodeForBloodTankEfficiencyHissing>d__106 : IEnumerator<WaitForSeconds>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private WaitForSeconds <>2__current;

			private AudioSource <audioSource>5__1;

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

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

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

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

			private bool MoveNext()
			{
				//IL_0073: Unknown result type (might be due to invalid IL or missing references)
				//IL_007d: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<audioSource>5__1 = ((Component)MonoSingleton<NewMovement>.Instance).gameObject.AddComponent<AudioSource>();
					<audioSource>5__1.clip = funnyAssets.LoadAsset<AudioClip>("Mechanism -  Designed Mega Steam Lever-002");
					<audioSource>5__1.volume = 0.8f;
					<audioSource>5__1.Play();
					<>2__current = new WaitForSeconds(2.7f);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					Object.Destroy((Object)(object)<audioSource>5__1);
					return false;
				}
			}

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

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

		[CompilerGenerated]
		private sealed class <BadCodeForPositioningStandardBloodTankGUIWithTimestopper>d__119 : IEnumerator<WaitForSeconds>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private WaitForSeconds <>2__current;

			public RectTransform rectTransform;

			private GameObject <punch>5__1;

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

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

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

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

			private bool MoveNext()
			{
				//IL_0026: Unknown result type (might be due to invalid IL or missing references)
				//IL_0030: Expected O, but got Unknown
				//IL_0288: Unknown result type (might be due to invalid IL or missing references)
				//IL_029f: Unknown result type (might be due to invalid IL or missing references)
				//IL_02b3: Unknown result type (might be due to invalid IL or missing references)
				//IL_023e: 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_01d6: 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_0201: Unknown result type (might be due to invalid IL or missing references)
				//IL_018c: 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)
				//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
				//IL_044a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0461: Unknown result type (might be due to invalid IL or missing references)
				//IL_0475: Unknown result type (might be due to invalid IL or missing references)
				//IL_0400: Unknown result type (might be due to invalid IL or missing references)
				//IL_0417: Unknown result type (might be due to invalid IL or missing references)
				//IL_042b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0398: Unknown result type (might be due to invalid IL or missing references)
				//IL_03af: Unknown result type (might be due to invalid IL or missing references)
				//IL_03c3: Unknown result type (might be due to invalid IL or missing references)
				//IL_034e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0365: Unknown result type (might be due to invalid IL or missing references)
				//IL_0379: Unknown result type (might be due to invalid IL or missing references)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = new WaitForSeconds(2.5f);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					if ((Object)(object)MonoSingleton<NewMovement>.Instance != (Object)null)
					{
						timeHUD = Traverse.Create((object)timestopperPlugin.Instance).Field("TimeHUD").GetValue<GameObject[]>();
						<punch>5__1 = ((Component)((Component)MonoSingleton<NewMovement>.Instance).transform.Find("Main Camera/Punch")).gameObject;
						if (Object.op_Implicit((Object)(object)<punch>5__1.transform.Find("Arm Gold")))
						{
							goldArm = ((Component)<punch>5__1.transform.Find("Arm Gold")).gameObject;
						}
						else
						{
							goldArm = null;
						}
						<punch>5__1 = null;
					}
					if ((Object)(object)timeHUD[0] == (Object)null || (Object)(object)goldArm == (Object)null || ((Object)(object)timeHUD[0] != (Object)null && !timeHUD[0].activeSelf) || ((Object)(object)goldArm != (Object)null && !goldArm.activeSelf))
					{
						if (!MonoSingleton<PrefsManager>.Instance.GetBool("weaponIcons", false))
						{
							if (MonoSingleton<PrefsManager>.Instance.GetInt("speedometer", 0) == 0)
							{
								rectTransform.anchoredPosition = new Vector2(-79f, 187f);
								rectTransform.anchoredPosition3D = new Vector3(rectTransform.anchoredPosition.x, 187f, 45f);
							}
							else
							{
								rectTransform.anchoredPosition = new Vector2(-79f, 293f);
								rectTransform.anchoredPosition3D = new Vector3(rectTransform.anchoredPosition.x, 293f, 45f);
							}
						}
						else if (MonoSingleton<PrefsManager>.Instance.GetInt("speedometer", 0) == 0)
						{
							rectTransform.anchoredPosition = new Vector2(-79f, 590f);
							rectTransform.anchoredPosition3D = new Vector3(rectTransform.anchoredPosition.x, 590f, 45f);
						}
						else
						{
							rectTransform.anchoredPosition = new Vector2(-79f, 693f);
							rectTransform.anchoredPosition3D = new Vector3(rectTransform.anchoredPosition.x, 693f, 45f);
						}
					}
					else if ((Object)(object)timeHUD[0] != (Object)null && timeHUD[0].activeSelf && (Object)(object)goldArm != (Object)null && goldArm.activeSelf)
					{
						if (!MonoSingleton<PrefsManager>.Instance.GetBool("weaponIcons", false))
						{
							if (MonoSingleton<PrefsManager>.Instance.GetInt("speedometer", 0) == 0)
							{
								rectTransform.anchoredPosition = new Vector2(-79f, 251f);
								rectTransform.anchoredPosition3D = new Vector3(rectTransform.anchoredPosition.x, 251f, 45f);
							}
							else
							{
								rectTransform.anchoredPosition = new Vector2(-79f, 357f);
								rectTransform.anchoredPosition3D = new Vector3(rectTransform.anchoredPosition.x, 357f, 45f);
							}
						}
						else if (MonoSingleton<PrefsManager>.Instance.GetInt("speedometer", 0) == 0)
						{
							rectTransform.anchoredPosition = new Vector2(-79f, 653f);
							rectTransform.anchoredPosition3D = new Vector3(rectTransform.anchoredPosition.x, 653f, 45f);
						}
						else
						{
							rectTransform.anchoredPosition = new Vector2(-79f, 757f);
							rectTransform.anchoredPosition3D = new Vector3(rectTransform.anchoredPosition.x, 757f, 45f);
						}
					}
					return false;
				}
			}

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

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

		[CompilerGenerated]
		private sealed class <BadCodeForReplaceQuitButton>d__164 : IEnumerator<WaitForSeconds>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private WaitForSeconds <>2__current;

			public GameObject quitButton;

			private Button <button>5__1;

			private ColorBlock <colorBlock>5__2;

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

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

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

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

			private bool MoveNext()
			{
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				//IL_0041: Expected O, but got Unknown
				//IL_0069: Unknown result type (might be due to invalid IL or missing references)
				//IL_006e: Unknown result type (might be due to invalid IL or missing references)
				//IL_008d: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d7: 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_010f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0114: Unknown result type (might be due to invalid IL or missing references)
				//IL_011a: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					Object.Destroy((Object)(object)quitButton.GetComponent<Button>());
					<>2__current = new WaitForSeconds(0.01f);
					<>1__state = 1;
					return true;
				case 1:
				{
					<>1__state = -1;
					<button>5__1 = quitButton.AddComponent<Button>();
					<colorBlock>5__2 = ((Selectable)<button>5__1).colors;
					((ColorBlock)(ref <colorBlock>5__2)).highlightedColor = new Color(0.5094f, 0.5094f, 0.5094f, 1f);
					((ColorBlock)(ref <colorBlock>5__2)).pressedColor = new Color(1f, 0f, 0f, 1f);
					((ColorBlock)(ref <colorBlock>5__2)).selectedColor = new Color(0.5094f, 0.5094f, 0.5094f, 1f);
					((Selectable)<button>5__1).colors = <colorBlock>5__2;
					ButtonClickedEvent onClick = <button>5__1.onClick;
					object obj = <>O.<0>__MainMenuSavesButton;
					if (obj == null)
					{
						UnityAction val = MainMenuSavesButton;
						<>O.<0>__MainMenuSavesButton = val;
						obj = (object)val;
					}
					((UnityEvent)onClick).AddListener((UnityAction)obj);
					return false;
				}
				}
			}

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

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

		[CompilerGenerated]
		private sealed class <BadFixForV2TerminalIcons>d__170 : IEnumerator<WaitForSeconds>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private WaitForSeconds <>2__current;

			public GameObject terminalContent;

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

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

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

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

			private bool MoveNext()
			{
				//IL_0026: Unknown result type (might be due to invalid IL or missing references)
				//IL_0030: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = new WaitForSeconds(0.01f);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					((Component)terminalContent.transform.GetChild(12).Find("Background/Enemy")).GetComponent<Image>().overrideSprite = funnyAssets.LoadAsset<Sprite>("V1");
					((Component)terminalContent.transform.GetChild(12).Find("Background/Enemy")).GetComponent<Image>().sprite = funnyAssets.LoadAsset<Sprite>("V1");
					((Component)terminalContent.transform.GetChild(14).Find("Background/Enemy")).GetComponent<Image>().overrideSprite = funnyAssets.LoadAsset<Sprite>("V1 2nd");
					((Component)terminalContent.transform.GetChild(14).Find("Background/Enemy")).GetComponent<Image>().sprite = funnyAssets.LoadAsset<Sprite>("V1 2nd");
					return false;
				}
			}

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

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

		[CompilerGenerated]
		private sealed class <BadFixForV2TerminalModels>d__169 : IEnumerator<WaitForSeconds>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private WaitForSeconds <>2__current;

			public string v2Version;

			public TextMeshProUGUI name;

			private SkinnedMeshRenderer <v2RendererTerminal>5__1;

			private string <>s__2;

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

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

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

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<v2RendererTerminal>5__1 = null;
				<>s__2 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0026: Unknown result type (might be due to invalid IL or missing references)
				//IL_0030: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = new WaitForSeconds(0.01f);
					<>1__state = 1;
					return true;
				case 1:
				{
					<>1__state = -1;
					string text = v2Version;
					<>s__2 = text;
					string text2 = <>s__2;
					if (!(text2 == "v2First"))
					{
						if (text2 == "v2Second")
						{
							<v2RendererTerminal>5__1 = ((Component)((TMP_Text)name).transform.parent.Find("Preview Window/Weapon Model/V2 2nd Preview Variant(Clone)/v2_GreenArm/v2_mdl")).GetComponent<SkinnedMeshRenderer>();
							((Renderer)<v2RendererTerminal>5__1).materials[0].mainTexture = (Texture)(object)funnyAssets.LoadAsset<Texture2D>("v1colour_tex");
							((Renderer)<v2RendererTerminal>5__1).materials[1].mainTexture = (Texture)(object)funnyAssets.LoadAsset<Texture2D>("v1_wingcolour_tex_new");
						}
					}
					else
					{
						<v2RendererTerminal>5__1 = ((Component)((TMP_Text)name).transform.parent.Find("Preview Window/Weapon Model/V2 Preview Variant(Clone)/v2_mdl")).GetComponent<SkinnedMeshRenderer>();
						((Renderer)<v2RendererTerminal>5__1).materials[0].mainTexture = (Texture)(object)funnyAssets.LoadAsset<Texture2D>("v1colour_tex");
						((Renderer)<v2RendererTerminal>5__1).materials[1].mainTexture = (Texture)(object)funnyAssets.LoadAsset<Texture2D>("v1_wingcolour_tex_new");
						InstantiateFeedbacker(<v2RendererTerminal>5__1, null);
						feedbacker.layer = 16;
					}
					<>s__2 = null;
					return false;
				}
				}
			}

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

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

		[CompilerGenerated]
		private sealed class <FeedbackerPunches>d__131 : IEnumerator<WaitForSeconds>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private WaitForSeconds <>2__current;

			public Punch punch;

			private AudioSource <aud>5__1;

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

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

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

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

			private bool MoveNext()
			{
				//IL_006e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0078: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<aud>5__1 = Traverse.Create((object)punch).Field("aud").GetValue<AudioSource>();
					punch.anim.Play("Jab", 0, 0f);
					<aud>5__1.Play();
					<>2__current = new WaitForSeconds(1f);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					punch.anim.Play("Hook", 0, 0.05f);
					<aud>5__1.Play();
					return false;
				}
			}

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

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

		private static readonly Harmony harmony = new Harmony("v2UltrakillMainStuff");

		private static AssetBundle funnyAssets;

		internal static ManualLogSource Logger;

		private static ConfigEntry<bool> modFirstTimeTutorial;

		private GameObject firstTimePopup;

		private static PluginInfo deltakillPlugin;

		private static PluginInfo timestopperPlugin;

		private static PluginInfo ultraskinsPlugin;

		private static PluginInfo vitruv1Plugin;

		private static GameObject[] timeHUD;

		private static GameObject goldArm;

		private static bool isPatched;

		private static bool tutorialCheck;

		private static bool s0Check;

		private static bool s5Check;

		private static bool p1Check;

		private static bool e0Check;

		private static float bloodTank;

		private static float bloodTankTimer;

		private static bool bloodTankActivated;

		private static float bloodTankEfficiency;

		private static float hpHealed;

		private static GameObject platformerPlayer;

		private static int playerDamage;

		private static bool shouldaDied;

		private static readonly GameObject[] hpBars = (GameObject[])(object)new GameObject[4];

		private static readonly GameObject[] afterImageBars = (GameObject[])(object)new GameObject[4];

		private static readonly GameObject[] hpRings = (GameObject[])(object)new GameObject[4];

		private static readonly GameObject[] afterImageRings = (GameObject[])(object)new GameObject[4];

		private static GameObject bloodTankGUI;

		private static Slider bloodTankActualSlider;

		private static GameObject bloodTankSliderText;

		private static GameObject bloodTankAltGUI;

		private static GameObject bloodTankAltGUIText;

		private static GameObject bloodTankAlt2GUI;

		private static GameObject bloodTankAlt2GUIText;

		private static InputManager inman;

		private static int currentVarNum;

		private static List<GameObject> spawnedArms;

		private static GameObject feedbacker;

		private static bool kbPunch;

		private static int revolverShotNumber;

		private static float revolverTimer;

		private static float shootCharge;

		private static int dualWieldCount;

		private static bool altFireShot;

		private static GameObject[] marksmanPanels = (GameObject[])(object)new GameObject[4];

		private static AudioSource marksmanAudio;

		private static GameObject[] sharpshooterPanels = (GameObject[])(object)new GameObject[3];

		private static AudioSource sharpshooterAudio;

		private static bool playedAudio;

		private static int rocketShotNumber;

		private static float rocketTimer;

		private static bool rocketOverheated;

		private static GameObject overheatGameObject;

		private static AudioSource overheatAudio;

		private static ParticleSystem overheatParticles;

		private static SkinnedMeshRenderer v2Renderer;

		private static EnemySimplifier enemySimplifier;

		private static Machine v2Machine;

		private static float v2StartHp;

		private static bool recharging;

		private static float heatResistance;

		private static float rechargeSpeed;

		private static float difficultySpeedModifier;

		private static TimeSince hurtTimer;

		private static Slider meter;

		private static TMP_Text meterPercentage;

		private static Image greenFlash;

		private static TMP_Text meterLabel;

		private static Image screenShatter;

		private static GameObject hurtingSound;

		private static bool gotHp;

		private static int hardDamageHp;

		private static bool resetTimer;

		private static float hardDamageAmount;

		private static GameObject optionsMenu;

		private static GameObject saveSlots;

		private static GameObject leftSide;

		private static GameObject v1MainMenu;

		private static GameObject v1Text;

		private static GameObject borderMainMenu;

		private static ConfigEntry<bool> bloodTankEnabled;

		private static ConfigEntry<KeyCode> bloodTankKeybind;

		private static ConfigEntry<bool> bloodTankGUIsEnabled;

		private static ConfigEntry<Color> bloodTankGUIColor;

		private static ConfigEntry<bool> bloodTankHUDsEnabled;

		private static ConfigEntry<Color> hp100Color;

		private static ConfigEntry<Color> hp200Color;

		private static ConfigEntry<Color> hp300Color;

		private static ConfigEntry<Color> hp400Color;

		private static ConfigEntry<Color> afterHp100Color;

		private static ConfigEntry<Color> afterHp200Color;

		private static ConfigEntry<Color> afterHp300Color;

		private static ConfigEntry<Color> afterHp400Color;

		private void Awake()
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_022b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0263: Unknown result type (might be due to invalid IL or missing references)
			//IL_029b: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_030b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0343: 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)
			((Object)((Component)this).gameObject).hideFlags = (HideFlags)61;
			funnyAssets = AssetBundle.LoadFromFile(Path.Combine(ModPath(), "funnyassets"));
			Logger = ((BaseUnityPlugin)this).Logger;
			Logger.LogInfo((object)"Plugin v2Ultrakill, version 2.4.3, is loaded. You can now play as V2.");
			new Harmony("v2UltrakillSaveFileStuff").PatchAll(typeof(SaveFileStuff));
			IEnumerable<PluginInfo> values = Chainloader.PluginInfos.Values;
			foreach (PluginInfo item in values)
			{
				switch (item.Metadata.Name)
				{
				case "DarkFountains":
					deltakillPlugin = item;
					break;
				case "The Timestopper":
					timestopperPlugin = item;
					break;
				case "UltraSkins":
					ultraskinsPlugin = item;
					break;
				case "VITRUV1":
					vitruv1Plugin = item;
					break;
				}
			}
			modFirstTimeTutorial = ((BaseUnityPlugin)this).Config.Bind<bool>("Miscellaneous", "Mod Tutorial", false, "Whether or not the player has seen the initial tutorial for how to fully use the mod.\r\nIf you've found this config option and this description, you don't need to touch this setting.");
			bloodTankEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("Blood Tank", "Blood Tank Enabled", true, "Toggles whether or not the Blood Tank, a reservoir of blood that can be used to regenerate health between combat encounters, is enabled.");
			bloodTankKeybind = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Blood Tank", "Blood Tank Keybind", (KeyCode)116, "Keybind to start and/or stop health regeneration from the Blood Tank.");
			bloodTankGUIsEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("Blood Tank", "Blood Tank GUIs", true, "Toggles whether or not GUIs indicating how full the Blood Tank is are enabled.\r\nGUIs only appear if Blood Tank is enabled.");
			bloodTankGUIColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Blood Tank", "Blood Tank Meter Color", new Color(0.35f, 0f, 0f, 1f), "Color of the meter used by the Standard GUI to indicate how full the Blood Tank is.");
			bloodTankHUDsEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("Blood Tank", "Blood Tank HUDs", true, "Toggles whether or not HUDs indicating when the Blood Tank is activated or deactivated, voluntarily or otherwise, are enabled.\r\nHUDs only appear if Blood Tank is enabled.");
			hp100Color = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Health 1", new Color(1f, 0f, 0f, 1f), "Sets the color of the first standard and crosshair healthbars (1-100 HP).");
			hp200Color = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Health 2", new Color(1f, 0.5882f, 0f, 1f), "Sets the color of the second standard and crosshair healthbars (101-200 HP).");
			hp300Color = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Health 3", new Color(1f, 1f, 0f, 1f), "Sets the color of the third standard and crosshair healthbars (201-300 HP).");
			hp400Color = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Health 4", new Color(0f, 1f, 0f, 1f), "Sets the color of the fourth standard and crosshair healthbars (301-400 HP).");
			afterHp100Color = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Soft Damage 1", new Color(1f, 0.3922f, 0f, 1f), "Sets the color of the first standard and crosshair soft damage bars (1-100 HP).");
			afterHp200Color = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Soft Damage 2", new Color(1f, 0.3922f, 0f, 1f), "Sets the color of the second standard and crosshair soft damage bars (101-200 HP).");
			afterHp300Color = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Soft Damage 3", new Color(1f, 0.3922f, 0f, 1f), "Sets the color of the third standard and crosshair soft damage bars (201-300 HP).");
			afterHp400Color = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Soft Damage 4", new Color(1f, 0.3922f, 0f, 1f), "Sets the color of the fourth standard and crosshair soft damage bars (301-400 HP).");
		}

		private static string ModPath()
		{
			return Assembly.GetExecutingAssembly().Location.Substring(0, Assembly.GetExecutingAssembly().Location.LastIndexOf(Path.DirectorySeparatorChar));
		}

		private void Start()
		{
			SceneManager.sceneLoaded += OnSceneLoaded;
		}

		private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
		{
			if (((Scene)(ref scene)).name == "b3e7f2f8052488a45b35549efb98d902" && !modFirstTimeTutorial.Value)
			{
				FirstTimePopup();
			}
			if (isPatched)
			{
				tutorialCheck = false;
				s0Check = false;
				s5Check = false;
				p1Check = false;
				e0Check = false;
				switch (((Scene)(ref scene)).name)
				{
				case "4f8ecffaa98c2614f89922daf31fa22d":
					tutorialCheck = true;
					break;
				case "07b47256f0da7f941947e74905ad16b4":
					s0Check = true;
					break;
				case "1567f75bc4488644684d7a25471dbe95":
					s5Check = true;
					break;
				case "005a4f2ce549277458596ee0f0d6e88c":
					p1Check = true;
					break;
				case "36c5b4853d1d63d4686ea9a23ca61f8c":
					e0Check = true;
					break;
				}
			}
		}

		private void FirstTimePopup()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			//IL_002b: 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_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)
			//IL_007e: 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_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Expected O, but got Unknown
			//IL_0131: 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_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0172: Expected O, but got Unknown
			//IL_01c3: 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_0241: Unknown result type (might be due to invalid IL or missing references)
			//IL_0248: Expected O, but got Unknown
			//IL_028c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_02db: Unknown result type (might be due to invalid IL or missing references)
			//IL_032f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0336: Expected O, but got Unknown
			//IL_038c: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0435: Unknown result type (might be due to invalid IL or missing references)
			//IL_0497: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f2: Expected O, but got Unknown
			//IL_0548: Unknown result type (might be due to invalid IL or missing references)
			//IL_055f: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_05be: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0618: Unknown result type (might be due to invalid IL or missing references)
			//IL_0625: Unknown result type (might be due to invalid IL or missing references)
			//IL_063b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0645: Expected O, but got Unknown
			//IL_0690: Unknown result type (might be due to invalid IL or missing references)
			//IL_0708: Unknown result type (might be due to invalid IL or missing references)
			//IL_0732: Unknown result type (might be due to invalid IL or missing references)
			firstTimePopup = new GameObject("V2 First Time Popup");
			firstTimePopup.transform.position = new Vector3(960f, 540f, 0f);
			firstTimePopup.layer = 5;
			Canvas val = firstTimePopup.AddComponent<Canvas>();
			CanvasScaler val2 = firstTimePopup.AddComponent<CanvasScaler>();
			firstTimePopup.AddComponent<GraphicRaycaster>();
			val.additionalShaderChannels = (AdditionalCanvasShaderChannels)(val.additionalShaderChannels | 1);
			val.additionalShaderChannels = (AdditionalCanvasShaderChannels)(val.additionalShaderChannels | 8);
			val.additionalShaderChannels = (AdditionalCanvasShaderChannels)(val.additionalShaderChannels | 0x10);
			val.renderMode = (RenderMode)0;
			val.scaleFactor = 1.5f;
			val.sortingOrder = 41;
			val2.matchWidthOrHeight = 0.5f;
			val2.referenceResolution = new Vector2(1280f, 720f);
			val2.screenMatchMode = (ScreenMatchMode)1;
			val2.uiScaleMode = (ScaleMode)1;
			GameObject val3 = new GameObject("Blocker");
			val3.transform.SetParent(firstTimePopup.transform, false);
			val3.layer = 5;
			RectTransform val4 = val3.AddComponent<RectTransform>();
			CanvasRenderer val5 = val3.AddComponent<CanvasRenderer>();
			Image val6 = val3.AddComponent<Image>();
			val4.sizeDelta = new Vector2(4000f, 2250f);
			val5.cullTransparentMesh = false;
			((Graphic)val6).color = new Color(0f, 0f, 0f, 0.3f);
			GameObject val7 = new GameObject("Popup Contents");
			val7.transform.SetParent(firstTimePopup.transform, false);
			val7.layer = 5;
			RectTransform val8 = val7.AddComponent<RectTransform>();
			CanvasRenderer val9 = val7.AddComponent<CanvasRenderer>();
			Image val10 = val7.AddComponent<Image>();
			val7.AddComponent<HudOpenEffect>();
			val8.sizeDelta = new Vector2(400f, 600f);
			val9.cullTransparentMesh = false;
			((Graphic)val10).color = new Color(0f, 0f, 0f, 0.8f);
			val10.overrideSprite = funnyAssets.LoadAsset<Sprite>("Round_VertHandle_Invert 1");
			val10.pixelsPerUnitMultiplier = 2f;
			val10.sprite = funnyAssets.LoadAsset<Sprite>("Round_VertHandle_Invert 1");
			val10.type = (Type)1;
			GameObject val11 = new GameObject("Image");
			val11.transform.SetParent(val7.transform, false);
			val11.layer = 5;
			RectTransform val12 = val11.AddComponent<RectTransform>();
			val11.AddComponent<CanvasRenderer>();
			Image val13 = val11.AddComponent<Image>();
			val12.anchorMax = new Vector2(1f, 1f);
			val12.anchorMin = new Vector2(0f, 0f);
			val12.sizeDelta = new Vector2(20f, 20f);
			((Graphic)val13).color = new Color(0f, 0f, 0f, 0.8f);
			val13.overrideSprite = funnyAssets.LoadAsset<Sprite>("Round_BorderLarge");
			val13.pixelsPerUnitMultiplier = 2f;
			val13.sprite = funnyAssets.LoadAsset<Sprite>("Round_BorderLarge");
			val13.type = (Type)1;
			GameObject val14 = new GameObject("Text1");
			val14.transform.SetParent(val7.transform, false);
			val14.layer = 5;
			RectTransform val15 = val14.AddComponent<RectTransform>();
			CanvasRenderer val16 = val14.AddComponent<CanvasRenderer>();
			TextMeshProUGUI val17 = val14.AddComponent<TextMeshProUGUI>();
			val14.AddComponent<HudOpenEffect>();
			val16.cullTransparentMesh = false;
			val15.anchorMax = new Vector2(1f, 1f);
			val15.anchorMin = new Vector2(0f, 1f);
			val15.pivot = new Vector2(0.5f, 1f);
			val15.sizeDelta = new Vector2(0f, 80f);
			((TMP_Text)val17).alignment = (TextAlignmentOptions)514;
			((TMP_Text)val17).font = funnyAssets.LoadAsset<TMP_FontAsset>("VCR_OSD_MONO_1");
			((TMP_Text)val17).horizontalAlignment = (HorizontalAlignmentOptions)2;
			((TMP_Text)val17).text = "WELCOME";
			((Graphic)val17).raycastTarget = false;
			((Graphic)val17).color = new Color(1f, 0f, 0f, 1f);
			((TMP_Text)val17).fontSize = 60f;
			GameObject val18 = Object.Instantiate<GameObject>(val14);
			val18.transform.SetParent(val7.transform, false);
			val18.layer = 5;
			((Object)val18).name = "Text2";
			val18.transform.localPosition = new Vector3(0f, 79f, 0f);
			TextMeshProUGUI component = val18.GetComponent<TextMeshProUGUI>();
			((Graphic)component).color = new Color(1f, 1f, 1f, 1f);
			((TMP_Text)component).fontSize = 16f;
			((TMP_Text)component).text = "to the <color=#AF190F>Play as V2</color> mod. This message being here means the mod has been <color=green>successfully installed!</color>\r\n\r\nThis mod runs in a newly created and unique save slot. Navigate to OPTIONS > SAVES, then select the slot titled <color=#AF190F>\"Updated Slot (Ver. 2)\"</color> to begin playing.\r\n\r\nThe mod is compatible with custom level loaders, although full compatibility per individual level is not guaranteed.\r\n\r\nCertain features of the mod can be customized via Configgy or your mod manager's config editor.\r\n\r\nThis mod disables Cybergrind and level score submissions.\r\n\r\nIf you would like to use this mod for content creation, please provide a link to the mod and credit KingOfKretaceous.";
			GameObject val19 = new GameObject("Close Button");
			val19.transform.SetParent(val7.transform, false);
			val19.layer = 5;
			RectTransform val20 = val19.AddComponent<RectTransform>();
			CanvasRenderer val21 = val19.AddComponent<CanvasRenderer>();
			Image val22 = val19.AddComponent<Image>();
			val19.AddComponent<HudOpenEffect>();
			Button val23 = val19.AddComponent<Button>();
			val20.anchoredPosition = new Vector2(0f, -210f);
			val20.sizeDelta = new Vector2(320f, 100f);
			val21.cullTransparentMesh = false;
			val22.overrideSprite = funnyAssets.LoadAsset<Sprite>("Round_BorderLarge");
			val22.pixelsPerUnitMultiplier = 4.05f;
			val22.sprite = funnyAssets.LoadAsset<Sprite>("Round_BorderLarge");
			val22.type = (Type)1;
			ColorBlock colors = ((Selectable)val23).colors;
			((ColorBlock)(ref colors)).highlightedColor = new Color(0.5094f, 0.5094f, 0.5094f, 1f);
			((ColorBlock)(ref colors)).pressedColor = new Color(1f, 0f, 0f, 1f);
			((ColorBlock)(ref colors)).selectedColor = new Color(0.5094f, 0.5094f, 0.5094f, 1f);
			((Selectable)val23).colors = colors;
			((UnityEvent)val23.onClick).AddListener(new UnityAction(CloseFirstTimePopup));
			GameObject val24 = Object.Instantiate<GameObject>(val18);
			val24.transform.SetParent(val19.transform, false);
			val24.layer = 5;
			((Object)val24).name = "ButtonText";
			val24.transform.localPosition = new Vector3(0f, 42f, 0f);
			TextMeshProUGUI component2 = val24.GetComponent<TextMeshProUGUI>();
			((TMP_Text)component2).fontSize = 40f;
			((TMP_Text)component2).text = "CLOSE";
			GameObject val25 = Object.Instantiate<GameObject>(val18);
			val25.transform.SetParent(val7.transform, false);
			val25.layer = 5;
			((Object)val25).name = "Text3";
			val25.transform.localPosition = new Vector3(0f, -239f, 0f);
			TextMeshProUGUI component3 = val25.GetComponent<TextMeshProUGUI>();
			((Graphic)component3).color = new Color(1f, 0f, 0f, 1f);
			((TMP_Text)component3).fontSize = 12f;
			((TMP_Text)component3).text = "This message will not appear again after being closed.";
			modFirstTimeTutorial.Value = true;
		}

		private void CloseFirstTimePopup()
		{
			firstTimePopup.SetActive(false);
		}

		private void Update()
		{
		}

		public static void SaveSlotPatchChecker(bool coolSlot)
		{
			if (isPatched != coolSlot)
			{
				if (coolSlot)
				{
					harmony.PatchAll(typeof(MainStuff));
				}
				else
				{
					harmony.UnpatchSelf();
				}
				isPatched = coolSlot;
			}
		}

		[HarmonyPatch(typeof(MainStuff), "Update")]
		[HarmonyPostfix]
		private static void UpdatePatches()
		{
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: 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_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d1: 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_022b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0247: Unknown result type (might be due to invalid IL or missing references)
			//IL_0263: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: Unknown result type (might be due to invalid IL or missing references)
			//IL_03aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0845: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)hpBars[3] != (Object)null)
			{
				((Graphic)((Component)hpBars[0].transform.Find("Fill Area/Fill")).GetComponent<Image>()).color = hp100Color.Value;
				((Graphic)((Component)hpBars[1].transform.Find("Fill Area/Fill")).GetComponent<Image>()).color = hp200Color.Value;
				((Graphic)((Component)hpBars[2].transform.Find("Fill Area/Fill")).GetComponent<Image>()).color = hp300Color.Value;
				((Graphic)((Component)hpBars[3].transform.Find("Fill Area/Fill")).GetComponent<Image>()).color = hp400Color.Value;
			}
			if ((Object)(object)hpRings[3] != (Object)null)
			{
				((Graphic)hpRings[0].GetComponent<Image>()).color = hp100Color.Value;
				((Graphic)hpRings[1].GetComponent<Image>()).color = hp200Color.Value;
				((Graphic)hpRings[2].GetComponent<Image>()).color = hp300Color.Value;
				((Graphic)hpRings[3].GetComponent<Image>()).color = hp400Color.Value;
			}
			if ((Object)(object)afterImageBars[3] != (Object)null)
			{
				((Graphic)((Component)afterImageBars[0].transform.Find("Fill Area/Fill")).GetComponent<Image>()).color = afterHp100Color.Value;
				((Graphic)((Component)afterImageBars[1].transform.Find("Fill Area/Fill")).GetComponent<Image>()).color = afterHp200Color.Value;
				((Graphic)((Component)afterImageBars[2].transform.Find("Fill Area/Fill")).GetComponent<Image>()).color = afterHp300Color.Value;
				((Graphic)((Component)afterImageBars[3].transform.Find("Fill Area/Fill")).GetComponent<Image>()).color = afterHp400Color.Value;
			}
			if ((Object)(object)afterImageRings[3] != (Object)null)
			{
				((Graphic)afterImageRings[0].GetComponent<Image>()).color = afterHp100Color.Value;
				((Graphic)afterImageRings[1].GetComponent<Image>()).color = afterHp200Color.Value;
				((Graphic)afterImageRings[2].GetComponent<Image>()).color = afterHp300Color.Value;
				((Graphic)afterImageRings[3].GetComponent<Image>()).color = afterHp400Color.Value;
			}
			if (bloodTankEnabled.Value && bloodTankGUIsEnabled.Value)
			{
				int value = Traverse.Create((object)MonoSingleton<PlayerActivatorRelay>.Instance).Field("index").GetValue<int>();
				if (!s5Check)
				{
					if ((Object)(object)bloodTankGUI != (Object)null && !bloodTankGUI.activeSelf && value >= 9)
					{
						bloodTankGUI.SetActive(true);
					}
					if ((Object)(object)bloodTankAltGUI != (Object)null && !bloodTankAltGUI.activeSelf)
					{
						bloodTankAltGUI.SetActive(true);
					}
					if ((Object)(object)bloodTankAlt2GUI != (Object)null && !bloodTankAlt2GUI.activeSelf)
					{
						bloodTankAlt2GUI.SetActive(true);
					}
				}
				if ((Object)(object)bloodTankGUI != (Object)null && bloodTankGUI.activeSelf)
				{
					((Graphic)((Selectable)bloodTankActualSlider).image).color = bloodTankGUIColor.Value;
					if (Time.timeScale != 0f)
					{
						bloodTankActualSlider.value = Mathf.MoveTowards(bloodTankActualSlider.value, bloodTank, Time.deltaTime * (Mathf.Abs(bloodTankActualSlider.value - bloodTank) * 5f + 5f));
						((TMP_Text)bloodTankSliderText.GetComponent<TextMeshProUGUI>()).text = Mathf.RoundToInt(bloodTank) + "%";
					}
				}
				if ((Object)(object)bloodTankAltGUI != (Object)null && bloodTankAltGUI.activeSelf && Time.timeScale != 0f)
				{
					((TMP_Text)bloodTankAltGUIText.GetComponent<TextMeshProUGUI>()).text = Mathf.RoundToInt(bloodTank) + "%";
				}
				if ((Object)(object)bloodTankAlt2GUI != (Object)null && bloodTankAlt2GUI.activeSelf && Time.timeScale != 0f)
				{
					((TMP_Text)bloodTankAlt2GUIText.GetComponent<TextMeshProUGUI>()).text = Mathf.RoundToInt(bloodTank) + "%";
				}
			}
			else if (!bloodTankEnabled.Value || !bloodTankGUIsEnabled.Value)
			{
				if ((Object)(object)bloodTankGUI != (Object)null && bloodTankGUI.activeSelf)
				{
					bloodTankGUI.SetActive(false);
				}
				if ((Object)(object)bloodTankAltGUI != (Object)null && bloodTankAltGUI.activeSelf)
				{
					bloodTankAltGUI.SetActive(false);
				}
				if ((Object)(object)bloodTankAlt2GUI != (Object)null && bloodTankAlt2GUI.activeSelf)
				{
					bloodTankAlt2GUI.SetActive(false);
				}
			}
			if (Time.timeScale == 0f)
			{
				return;
			}
			if (NoWeaponCooldown.NoCooldown)
			{
				revolverShotNumber = 0;
				rocketShotNumber = 0;
			}
			if ((Object)(object)MonoSingleton<GunControl>.Instance != (Object)null)
			{
				dualWieldCount = MonoSingleton<GunControl>.Instance.dualWieldCount + 1;
			}
			revolverTimer += 200f * Time.deltaTime;
			if (!altFireShot)
			{
				if (shootCharge != 100f)
				{
					if (revolverShotNumber < dualWieldCount * 3)
					{
						if (shootCharge + 575f * Time.deltaTime < 100f)
						{
							shootCharge += 575f * Time.deltaTime;
						}
						else
						{
							shootCharge = 100f;
						}
					}
					else if (shootCharge + 75f * Time.deltaTime < 100f)
					{
						shootCharge += 75f * Time.deltaTime;
					}
					else
					{
						shootCharge = 100f;
						revolverShotNumber = 0;
						playedAudio = false;
					}
				}
				if (dualWieldCount != 0 && revolverTimer >= (float)(revolverShotNumber * 100 / dualWieldCount))
				{
					revolverTimer = 0f;
					if (revolverShotNumber < dualWieldCount * 3)
					{
						revolverShotNumber = 0;
					}
				}
			}
			else if (revolverTimer >= 170f)
			{
				revolverTimer = 0f;
				revolverShotNumber = 0;
				altFireShot = false;
			}
			if (dualWieldCount != 0 && !rocketOverheated && rocketTimer > 0f)
			{
				rocketTimer = Mathf.MoveTowards(rocketTimer, 0f, Time.deltaTime * (float)dualWieldCount / (float)rocketShotNumber);
			}
			else if (rocketTimer == 0f && rocketShotNumber > 0)
			{
				rocketShotNumber = 0;
			}
			if ((Object)(object)MonoSingleton<NewMovement>.Instance == (Object)null)
			{
				return;
			}
			MonoSingleton<NewMovement>.Instance.antiHp = 0f;
			if (MonoSingleton<NewMovement>.Instance.rocketRides < 3)
			{
				MonoSingleton<NewMovement>.Instance.rocketRides = 3;
			}
			if (Input.GetKeyDown(bloodTankKeybind.Value) && !MonoSingleton<OptionsManager>.Instance.mainMenu && !MonoSingleton<OptionsManager>.Instance.inIntro && !MonoSingleton<OptionsManager>.Instance.paused && !GameStateManager.Instance.PlayerInputLocked)
			{
				bloodTankTimer = 0f;
				if (bloodTankActivated)
				{
					bloodTankActivated = false;
					MonoSingleton<NewMovement>.Instance.walkSpeed = 750f;
					StyleDrainMultiplier(shouldMultiply: false);
					BloodTankSendHudMessage("endManual");
					return;
				}
				if (MonoSingleton<NewMovement>.Instance.hp == 400)
				{
					BloodTankSendHudMessage("startHp");
					return;
				}
				if (bloodTankEfficiency == 0f)
				{
					BloodTankSendHudMessage("efficiencyZero");
					return;
				}
				if (MonoSingleton<MusicManager>.Instance.requestedThemes != 0f)
				{
					BloodTankSendHudMessage("startEnemies");
					return;
				}
				if (bloodTank == 0f)
				{
					BloodTankSendHudMessage("startEmpty");
					return;
				}
				if (MonoSingleton<NewMovement>.Instance.boost || MonoSingleton<NewMovement>.Instance.jumping || MonoSingleton<NewMovement>.Instance.falling || MonoSingleton<NewMovement>.Instance.sliding)
				{
					BloodTankSendHudMessage("startMoving");
					return;
				}
				bloodTankActivated = true;
				MonoSingleton<NewMovement>.Instance.walkSpeed = 200f;
				StyleDrainMultiplier(shouldMultiply: true);
				BloodTankSendHudMessage("startSuccess");
			}
			if (bloodTankActivated)
			{
				if (bloodTankEfficiency == 0f)
				{
					bloodTankTimer = 0f;
					bloodTankActivated = false;
					MonoSingleton<NewMovement>.Instance.walkSpeed = 750f;
					StyleDrainMultiplier(shouldMultiply: false);
					BloodTankSendHudMessage("efficiencyZero");
					return;
				}
				if (MonoSingleton<MusicManager>.Instance.requestedThemes != 0f)
				{
					bloodTankTimer = 0f;
					bloodTankActivated = false;
					MonoSingleton<NewMovement>.Instance.walkSpeed = 750f;
					StyleDrainMultiplier(shouldMultiply: false);
					BloodTankSendHudMessage("endEnemies");
					return;
				}
				if (MonoSingleton<NewMovement>.Instance.boost || MonoSingleton<NewMovement>.Instance.jumping || MonoSingleton<NewMovement>.Instance.falling || MonoSingleton<NewMovement>.Instance.sliding)
				{
					bloodTankTimer = 0f;
					bloodTankActivated = false;
					MonoSingleton<NewMovement>.Instance.walkSpeed = 750f;
					StyleDrainMultiplier(shouldMultiply: false);
					BloodTankSendHudMessage("endMoving");
					return;
				}
				bloodTankTimer = Mathf.MoveTowards(bloodTankTimer, 100f, Time.deltaTime * 5f);
				bloodTank = Mathf.MoveTowards(bloodTank, 0f, Time.deltaTime * (1000f / bloodTankEfficiency));
				if (bloodTankTimer >= 0.25f)
				{
					bloodTankTimer -= 0.25f;
					NewMovement instance = MonoSingleton<NewMovement>.Instance;
					instance.hp++;
					hpHealed += 1f;
					if (hpHealed >= 1200f)
					{
						bloodTankEfficiency = 0f;
					}
					else if (hpHealed >= 400f)
					{
						if (hpHealed == 400f)
						{
							BloodTankSendHudMessage("efficiencyLoweringLong");
							((MonoBehaviour)MonoSingleton<NewMovement>.Instance).StartCoroutine((IEnumerator)BadCodeForBloodTankEfficiencyHissing());
						}
						bloodTankEfficiency -= 0.1f;
					}
				}
				if (bloodTank == 0f || MonoSingleton<NewMovement>.Instance.hp == 400)
				{
					bloodTankTimer = 0f;
					bloodTankActivated = false;
					MonoSingleton<NewMovement>.Instance.walkSpeed = 750f;
					StyleDrainMultiplier(shouldMultiply: false);
					if (hpHealed >= 400f && hpHealed <= 410f)
					{
						BloodTankSendHudMessage("efficiencyLoweringShort");
					}
					else if (MonoSingleton<NewMovement>.Instance.hp == 400)
					{
						BloodTankSendHudMessage("endHp");
					}
					else if (bloodTank == 0f)
					{
						BloodTankSendHudMessage("endEmpty");
					}
				}
			}
			if (Input.GetKeyDown((KeyCode)269))
			{
				MonoSingleton<NewMovement>.Instance.hp = 200;
				bloodTank = 100f;
			}
		}

		private static void BloodTankSendHudMessage(string hudKey)
		{
			if (bloodTankHUDsEnabled.Value && (!((Object)(object)platformerPlayer != (Object)null) || !platformerPlayer.activeSelf))
			{
				HudMessageReceiver instance = MonoSingleton<HudMessageReceiver>.Instance;
				switch (hudKey)
				{
				case "startSuccess":
					instance.SendHudMessage("<color=orange>ATTEMPTING RECONSTRUCTION</color>\r\nBLOOD TRANSFUSION INITIATION <color=#00DFFF>SUCCESSFUL\r\n<color=yellow>REPAIRING PRIMARY CHASSIS...</color>", "", "", 0, true, false, false);
					break;
				case "startHp":
					instance.SendHudMessage("<color=orange>RUNNING DIAGNOSTIC</color>\r\nPRIMARY CHASSIS: <color=#00DFFF>INTACT</color>\r\nRECONSTRUCTION <color=yellow>UNNECESSARY</color>", "", "", 0, true, false, true);
					break;
				case "startEnemies":
					instance.SendHudMessage("<color=orange>ATTEMPTING RECONSTRUCTION\r\n! HOSTILES DETECTED ! COMBAT SYSTEMS ENGAGED !</color>\r\nBLOOD TRANSFUSION INITIATION <color=red>FAILED</color>", "", "", 0, true, false, true);
					break;
				case "startEmpty":
					instance.SendHudMessage("<color=orange>ATTEMPTING RECONSTRUCTION</color>\r\n<color=red>ERROR:</color> SECONDARY FUEL TANK EMPTY\r\nBLOOD TRANSFUSION INITIATION <color=red>FAILED</color>", "", "", 0, true, false, true);
					break;
				case "startMoving":
					instance.SendHudMessage("<color=orange>ATTEMPTING RECONSTRUCTION\r\nWARNING:</color> RAPID MOVEMENT DETECTED\r\nBLOOD TRANSFUSION INITIATION <color=red>FAILED</color>", "", "", 0, true, false, true);
					break;
				case "endHp":
					instance.SendHudMessage("PRIMARY CHASSIS: <color=#00DFFF>FULLY REPAIRED</color>\r\nRECONSTRUCTION <color=#00DFFF>COMPLETE\r\n<color=green>HAVE A NICE DAY!</color>", "", "", 0, true, false, true);
					break;
				case "endManual":
					instance.SendHudMessage("RECONSTRUCTION <color=#00DFFF>MANUALLY TERMINATED</color>\r\nPRIMARY CHASSIS: <color=yellow>PARTIALLY REPAIRED\r\n<color=green>HAVE A NICE DAY!</color>", "", "", 0, true, false, true);
					break;
				case "endEnemies":
					instance.SendHudMessage("<color=orange>! HOSTILES DETECTED ! COMBAT SYSTEMS DISENGAGED !\r\nRE-ENGAGING COMBAT SYSTEMS...</color>\r\nRECONSTRUCTION <color=red>FORCEFULLY TERMINATED</color>", "", "", 0, true, false, true);
					break;
				case "endEmpty":
					instance.SendHudMessage("<color=orange>WARNING:</color> BLOOD TRANSFUSION INTERRUPTED\r\n<color=red>ERROR:</color> SECONDARY FUEL TANK DEPLETED\r\nRECONSTRUCTION <color=red>FORCEFULLY TERMINATED</color>", "", "", 0, true, false, true);
					break;
				case "endMoving":
					instance.SendHudMessage("<color=orange>WARNING:</color> SUDDEN MOVEMENT DETECTED\r\n<color=orange>WARNING:</color> BLOOD TRANSFUSION INTERRUPTED\r\nRECONSTRUCTION <color=red>FORCEFULLY TERMINATED</color>", "", "", 0, true, false, true);
					break;
				case "efficiencyLoweringShort":
					instance.SendHudMessage("<color=orange>WARNING:</color> ELEVATED INTERNAL TEMPERATURES\r\n<color=orange>WARNING:</color> ELEVATED SELF-REPAIR NEXUS TEMPERATURES\r\n<color=orange>! BLOOD TRANSFUSION EFFICIENCY LOWERING !</color>", "", "", 0, true, false, true);
					break;
				case "efficiencyLoweringLong":
					instance.SendHudMessage("<color=orange>WARNING:</color> ELEVATED INTERNAL TEMPERATURES\r\n<color=orange>WARNING:</color> ELEVATED SELF-REPAIR NEXUS TEMPERATURES\r\n<color=orange>! BLOOD TRANSFUSION EFFICIENCY LOWERING !</color>", "", "", 0, true, false, false);
					break;
				case "efficiencyZero":
					instance.SendHudMessage("<color=orange>WARNING:</color> ELEVATED INTERNAL TEMPERATURES\r\n<color=red>ERROR:</color> SELF-REPAIR NEXUS NOT RESPONDING\r\n<color=red>-!- SELF-REPAIR NEXUS OVERHEATED -!-</color>", "", "", 0, true, false, true);
					break;
				}
			}
		}

		private static void StyleDrainMultiplier(bool shouldMultiply)
		{
			List<StyleRank> ranks = MonoSingleton<StyleHUD>.Instance.ranks;
			if (shouldMultiply)
			{
				ranks[0].drainSpeed = 4f;
				ranks[1].drainSpeed = 5f;
				ranks[2].drainSpeed = 6f;
				ranks[3].drainSpeed = 8f;
				ranks[4].drainSpeed = 12f;
				ranks[5].drainSpeed = 16f;
				ranks[6].drainSpeed = 24f;
				ranks[7].drainSpeed = 32f;
			}
			else
			{
				ranks[0].drainSpeed = 1f;
				ranks[1].drainSpeed = 1.25f;
				ranks[2].drainSpeed = 1.5f;
				ranks[3].drainSpeed = 2f;
				ranks[4].drainSpeed = 3f;
				ranks[5].drainSpeed = 4f;
				ranks[6].drainSpeed = 6f;
				ranks[7].drainSpeed = 8f;
			}
		}

		[IteratorStateMachine(typeof(<BadCodeForBloodTankEfficiencyHissing>d__106))]
		private static IEnumerator<WaitForSeconds> BadCodeForBloodTankEfficiencyHissing()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <BadCodeForBloodTankEfficiencyHissing>d__106(0);
		}

		[HarmonyPatch(typeof(NewMovement), "Start")]
		[HarmonyPostfix]
		private static void SpawnPatches(NewMovement __instance)
		{
			//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)
			__instance.hp = 400;
			if (tutorialCheck && bloodTankEnabled.Value)
			{
				__instance.hp = 390;
			}
			revolverShotNumber = 0;
			rocketShotNumber = 0;
			bloodTank = 0f;
			bloodTankTimer = 0f;
			bloodTankActivated = false;
			if (MonoSingleton<NewMovement>.Instance.walkSpeed != 750f)
			{
				MonoSingleton<NewMovement>.Instance.walkSpeed = 750f;
			}
			StyleDrainMultiplier(shouldMultiply: false);
			bloodTankEfficiency = 100f;
			hpHealed = 0f;
			hurtTimer = TimeSince.op_Implicit(0f);
			gotHp = false;
			hardDamageHp = 0;
			resetTimer = false;
			hardDamageAmount = 0f;
		}

		[HarmonyPatch(typeof(NewMovement), "Respawn")]
		[HarmonyPostfix]
		private static void RespawnPatches(NewMovement __instance)
		{
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			__instance.hp = 400;
			revolverShotNumber = 0;
			rocketShotNumber = 0;
			bloodTank = 0f;
			bloodTankTimer = 0f;
			bloodTankActivated = false;
			if (MonoSingleton<NewMovement>.Instance.walkSpeed != 750f)
			{
				MonoSingleton<NewMovement>.Instance.walkSpeed = 750f;
			}
			StyleDrainMultiplier(shouldMultiply: false);
			bloodTankEfficiency = 100f;
			hpHealed = 0f;
			hurtTimer = TimeSince.op_Implicit(0f);
			gotHp = false;
			hardDamageHp = 0;
			resetTimer = false;
			hardDamageAmount = 0f;
		}

		[HarmonyPatch(typeof(NewMovement), "GetHealth")]
		[HarmonyPrefix]
		private static void GetHealthPrefix(NewMovement __instance, int health, ref int __state)
		{
			__state = __instance.hp;
			if (!bloodTankEnabled.Value)
			{
				return;
			}
			switch (health)
			{
			case 0:
			case 100:
				break;
			case 999:
				if (bloodTank + 5f <= 100f)
				{
					bloodTank += 5f;
				}
				else
				{
					bloodTank = 100f;
				}
				break;
			default:
				if (bloodTank + (float)health / 50f <= 100f)
				{
					bloodTank += (float)health / 50f;
				}
				else
				{
					bloodTank = 100f;
				}
				break;
			}
		}

		[HarmonyPatch(typeof(NewMovement), "GetHealth")]
		[HarmonyPostfix]
		private static void DisableHealingPostfix(NewMovement __instance, int __state)
		{
			if (__instance.hp != __state)
			{
				__instance.hp = __state;
			}
		}

		[HarmonyPatch(typeof(NewMovement), "SuperCharge")]
		[HarmonyPrefix]
		private static void BloodOrbPrefix(NewMovement __instance, ref int __state)
		{
			__state = __instance.hp;
		}

		[HarmonyPatch(typeof(NewMovement), "SuperCharge")]
		[HarmonyPostfix]
		private static void BloodOrbPostfix(NewMovement __instance, int __state)
		{
			if (bloodTankEnabled.Value)
			{
				float num = 100f - bloodTank;
				int num2 = Mathf.RoundToInt(100f - num) * 2;
				bloodTank += num;
				if (__state + num2 <= 400)
				{
					__instance.hp = __state + num2;
				}
				else
				{
					__instance.hp = 400;
				}
			}
			else if (__state + 200 <= 400)
			{
				__instance.hp = __state + 200;
			}
			else
			{
				__instance.hp = 400;
			}
		}

		[HarmonyPatch(typeof(NewMovement), "GetHurt")]
		[HarmonyPrefix]
		private static void DamageReductionPrefix(NewMovement __instance, int damage, ref int __state)
		{
			__state = __instance.hp;
			int rankIndex = MonoSingleton<StyleHUD>.Instance.rankIndex;
			if (1 == 0)
			{
			}
			float num = rankIndex switch
			{
				7 => 0.35f, 
				6 => 0.5f, 
				5 => 0.65f, 
				4 => 0.8f, 
				3 => 0.9f, 
				_ => 1f, 
			};
			if (1 == 0)
			{
			}
			float num2 = num;
			playerDamage = Mathf.RoundToInt((float)damage * num2);
			if (__state - damage <= 0 && __state - playerDamage > 0)
			{
				shouldaDied = true;
				__instance.hp += damage + 1;
			}
			else
			{
				shouldaDied = false;
			}
		}

		[HarmonyPatch(typeof(NewMovement), "GetHurt")]
		[HarmonyPostfix]
		private static void DamageReductionPostfix(NewMovement __instance, int __state)
		{
			int num = __state - __instance.hp;
			if ((__instance.hp > 0 || shouldaDied) && num != 0)
			{
				__instance.hp = __state - playerDamage;
			}
		}

		[HarmonyPatch(typeof(HealthBar), "Start")]
		[HarmonyPostfix]
		private static void MakeNewHealthbars(HealthBar __instance)
		{
			if (Object.op_Implicit((Object)(object)((Component)__instance).transform.Find("Health Slider")))
			{
				Array.Resize(ref __instance.hpSliders, 4);
				Array.Resize(ref __instance.afterImageSliders, 4);
				hpBars[0] = ((Component)((Component)__instance).transform.Find("Health Slider")).gameObject;
				hpBars[1] = ((Component)((Component)__instance).transform.Find("Supercharge Slider")).gameObject;
				afterImageBars[0] = ((Component)((Component)__instance).transform.Find("AfterHealth Slider")).gameObject;
				afterImageBars[1] = ((Component)((Component)__instance).transform.Find("SuperAfterHealth Slider")).gameObject;
				((Component)hpBars[0].transform.Find("Fill Area/Fill/GreenHPFlash")).gameObject.SetActive(false);
				((Component)((Component)__instance).transform.Find("AntiHealth Slider")).gameObject.SetActive(false);
				for (int i = 2; i < 4; i++)
				{
					hpBars[i] = Object.Instantiate<GameObject>(hpBars[1]);
					((Object)hpBars[i]).name = i * 100 + 100 + " Health Slider";
					hpBars[i].transform.SetParent(((Component)__instance).transform, false);
					hpBars[i].GetComponent<Slider>().minValue = i * 100;
					hpBars[i].GetComponent<Slider>().maxValue = i * 100 + 100;
					__instance.hpSliders[i] = hpBars[i].GetComponent<Slider>();
					afterImageBars[i] = Object.Instantiate<GameObject>(afterImageBars[1]);
					((Object)afterImageBars[i]).name = i * 100 + 100 + " AfterHealth Slider";
					afterImageBars[i].transform.SetParent(((Component)__instance).transform, false);
					afterImageBars[i].GetComponent<Slider>().minValue = i * 100;
					afterImageBars[i].GetComponent<Slider>().maxValue = i * 100 + 100;
					__instance.afterImageSliders[i] = afterImageBars[i].GetComponent<Slider>();
					afterImageBars[i].transform.SetSiblingIndex(2 * i + 1);
					hpBars[i].transform.SetSiblingIndex(2 * i + 2);
				}
			}
		}

		[HarmonyPatch(typeof(HealthBar), "Update")]
		[HarmonyPostfix]
		private static void UpdateClassicHealthGUIs(HealthBar __instance)
		{
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: 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_0088: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)__instance.hpText != (Object)null))
			{
				return;
			}
			TextMeshProUGUI component = ((Component)__instance.hpText).GetComponent<TextMeshProUGUI>();
			if (!__instance.antiHpText)
			{
				if (__instance.changeTextColor)
				{
					if (MonoSingleton<NewMovement>.Instance.hp <= 100)
					{
						((Graphic)component).color = Color.red;
					}
					else if (MonoSingleton<NewMovement>.Instance.hp <= 200 && __instance.yellowColor)
					{
						((Graphic)component).color = Color.yellow;
					}
					else
					{
						((Graphic)component).color = __instance.normalTextColor;
					}
				}
				else if (__instance.normalTextColor == Color.white)
				{
					if (MonoSingleton<NewMovement>.Instance.hp <= 100)
					{
						((Graphic)component).color = Color.red;
						return;
					}
					ColorBlindSettings value = Traverse.Create((object)__instance).Field("colorBlindSettings").GetValue<ColorBlindSettings>();
					((Graphic)component).color = value.GetHudColor((HudColorType)4);
				}
			}
			else
			{
				((TMP_Text)component).text = "/400";
			}
		}

		[HarmonyPatch(typeof(Crosshair), "Start")]
		[HarmonyPostfix]
		private static void MakeNewCrosshairBars(Crosshair __instance)
		{
			if (Object.op_Implicit((Object)(object)((Component)__instance).transform.Find("HealthBars")))
			{
				Array.Resize(ref __instance.chuds, 12);
				GameObject gameObject = ((Component)((Component)__instance).transform.Find("HealthBars")).gameObject;
				SliderToFillAmount[] array = Traverse.Create((object)gameObject.GetComponent<FadeOutBars>()).Field("slids").GetValue<SliderToFillAmount[]>();
				Array.Resize(ref array, 9);
				hpRings[0] = ((Component)gameObject.transform.Find("HealthSlider")).gameObject;
				hpRings[1] = ((Component)gameObject.transform.Find("SuperchargeSlider")).gameObject;
				afterImageRings[0] = ((Component)gameObject.transform.Find("HealthSliderAfterImage")).gameObject;
				afterImageRings[1] = ((Component)gameObject.transform.Find("HealthSliderAfterImage (1)")).gameObject;
				for (int i = 2; i < 4; i++)
				{
					hpRings[i] = Object.Instantiate<GameObject>(hpRings[1]);
					((Object)hpRings[i]).name = i * 100 + 100 + "HealthSlider";
					hpRings[i].transform.SetParent(gameObject.transform, false);
					hpRings[i].GetComponent<SliderToFillAmount>().targetSlider = hpBars[i].GetComponent<Slider>();
					array[2 * i + 2] = hpRings[i].GetComponent<SliderToFillAmount>();
					__instance.chuds[2 * i + 5] = hpBars[i].GetComponent<Image>();
					afterImageRings[i] = Object.Instantiate<GameObject>(afterImageRings[1]);
					((Object)afterImageRings[i]).name = i * 100 + 100 + "HealthSliderAfterImage";
					afterImageRings[i].transform.SetParent(gameObject.transform, false);
					afterImageRings[i].GetComponent<SliderToFillAmount>().targetSlider = afterImageBars[i].GetComponent<Slider>();
					array[2 * i + 1] = afterImageRings[i].GetComponent<SliderToFillAmount>();
					__instance.chuds[2 * i + 4] = afterImageRings[i].GetComponent<Image>();
					afterImageRings[i].transform.SetSiblingIndex(2 * i + 1);
					hpRings[i].transform.SetSiblingIndex(2 * i + 2);
				}
				Traverse.Create((object)gameObject.GetComponent<FadeOutBars>()).Field("slids").SetValue((object)array);
			}
		}

		[HarmonyPatch(typeof(HudController), "Awake")]
		[HarmonyPrefix]
		private static void MakeBloodTankGUIs(HudController __instance)
		{
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Expected O, but got Unknown
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_030a: Unknown result type (might be due to invalid IL or missing references)
			//IL_036f: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c3: Expected O, but got Unknown
			//IL_03fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0411: Unknown result type (might be due to invalid IL or missing references)
			//IL_0428: Unknown result type (might be due to invalid IL or missing references)
			//IL_0438: Unknown result type (might be due to invalid IL or missing references)
			//IL_043f: Expected O, but got Unknown
			//IL_0484: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0561: Unknown result type (might be due to invalid IL or missing references)
			//IL_0583: Unknown result type (might be due to invalid IL or missing references)
			//IL_058a: Expected O, but got Unknown
			//IL_05be: Unknown result type (might be due to invalid IL or missing references)
			//IL_05da: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0608: Unknown result type (might be due to invalid IL or missing references)
			//IL_061f: Unknown result type (might be due to invalid IL or missing references)
			//IL_062f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0636: Expected O, but got Unknown
			//IL_0676: Unknown result type (might be due to invalid IL or missing references)
			//IL_0692: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0703: Unknown result type (might be due to invalid IL or missing references)
			//IL_0708: Unknown result type (might be due to invalid IL or missing references)
			//IL_071c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0729: Unknown result type (might be due to invalid IL or missing references)
			//IL_0730: Expected O, but got Unknown
			//IL_0764: Unknown result type (might be due to invalid IL or missing references)
			//IL_0780: Unknown result type (might be due to invalid IL or missing references)
			//IL_0797: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_07d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_07dc: Expected O, but got Unknown
			//IL_0821: Unknown result type (might be due to invalid IL or missing references)
			//IL_0838: Unknown result type (might be due to invalid IL or missing references)
			//IL_084f: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_08f8: Expected O, but got Unknown
			//IL_0958: Unknown result type (might be due to invalid IL or missing references)
			//IL_0974: Unknown result type (might be due to invalid IL or missing references)
			//IL_098b: Unknown result type (might be due to invalid IL or missing references)
			//IL_09a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_09d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a60: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aed: Unknown result type (might be due to invalid IL or missing references)
			//IL_0af7: Expected O, but got Unknown
			//IL_026a: 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_028d: 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_023b: Unknown result type (might be due to invalid IL or missing references)
			//IL_024f: 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_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: 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_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b99: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bb5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b62: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b7e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bcd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0be4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bfb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c12: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c77: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c9a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ca1: Expected O, but got Unknown
			//IL_0ce8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d04: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d1b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d32: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d49: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d60: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d7c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e2c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e36: Expected O, but got Unknown
			//IL_0e8c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ea8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ebf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ed6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0eed: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f09: Unknown result type (might be due to invalid IL or missing references)
			//IL_101e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1028: Expected O, but got Unknown
			//IL_10ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_10e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_1093: Unknown result type (might be due to invalid IL or missing references)
			//IL_10af: Unknown result type (might be due to invalid IL or missing references)
			//IL_10fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_1115: Unknown result type (might be due to invalid IL or missing references)
			//IL_112c: Unknown result type (might be due to invalid IL or missing references)
			//IL_1143: Unknown result type (might be due to invalid IL or missing references)
			//IL_11a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_11cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_11d2: Expected O, but got Unknown
			//IL_1219: Unknown result type (might be due to invalid IL or missing references)
			//IL_1235: Unknown result type (might be due to invalid IL or missing references)
			//IL_124c: Unknown result type (might be due to invalid IL or missing references)
			//IL_1263: Unknown result type (might be due to invalid IL or missing references)
			//IL_127a: Unknown result type (might be due to invalid IL or missing references)
			//IL_1291: Unknown result type (might be due to invalid IL or missing references)
			//IL_12ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_135d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1367: Expected O, but got Unknown
			//IL_13bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_13d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_13f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_1407: Unknown result type (might be due to invalid IL or missing references)
			//IL_141e: Unknown result type (might be due to invalid IL or missing references)
			//IL_143a: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)__instance == (Object)null)
			{
				return;
			}
			if ((Object)(object)bloodTankGUI == (Object)null && ((Object)__instance).name == "HUD")
			{
				Material material = ((Graphic)((Component)((Component)__instance).transform.Find("GunCanvas/StatsPanel")).GetComponent<Image>()).material;
				bloodTankGUI = new GameObject("BloodTankPanel");
				bloodTankGUI.transform.SetParent(((Component)__instance).transform.Find("GunCanvas"), false);
				bloodTankGUI.transform.localScale = new Vector3(4f, 4f, 4f);
				bloodTankGUI.layer = 13;
				GameObject[] array = Traverse.Create((object)MonoSingleton<PlayerActivatorRelay>.Instance).Field("toActivate").GetValue<GameObject[]>();
				Array.Resize(ref array, 9);
				array[8] = bloodTankGUI;
				Traverse.Create((object)MonoSingleton<PlayerActivatorRelay>.Instance).Field("toActivate").SetValue((object)array);
				RectTransform val = bloodTankGUI.AddComponent<RectTransform>();
				bloodTankGUI.AddComponent<CanvasRenderer>();
				Image val2 = bloodTankGUI.AddComponent<Image>();
				HudOpenEffect val3 = bloodTankGUI.AddComponent<HudOpenEffect>();
				bloodTankGUI.GetComponent<CanvasRenderer>().cullTransparentMesh = false;
				if (timestopperPlugin == null)
				{
					if (!MonoSingleton<PrefsManager>.Instance.GetBool("weaponIcons", false))
					{
						if (MonoSingleton<PrefsManager>.Instance.GetInt("speedometer", 0) == 0)
						{
							val.anchoredPosition = new Vector2(-79f, 187f);
							val.anchoredPosition3D = new Vector3(val.anchoredPosition.x, 187f, 45f);
						}
						else
						{
							val.anchoredPosition = new Vector2(-79f, 293f);
							val.anchoredPosition3D = new Vector3(val.anchoredPosition.x, 293f, 45f);
						}
					}
					else if (MonoSingleton<PrefsManager>.Instance.GetInt("speedometer", 0) == 0)
					{
						val.anchoredPosition = new Vector2(-79f, 590f);
						val.anchoredPosition3D = new Vector3(val.anchoredPosition.x, 590f, 45f);
					}
					else
					{
						val.anchoredPosition = new Vector2(-79f, 693f);
						val.anchoredPosition3D = new Vector3(val.anchoredPosition.x, 693f, 45f);
					}
				}
				if (timestopperPlugin != null)
				{
					((MonoBehaviour)__instance).StartCoroutine((IEnumerator)BadCodeForPositioningStandardBloodTankGUIWithTimestopper(val));
				}
				val.anchorMax = new Vector2(0f, 0f);
				val.anchorMin = new Vector2(0f, 0f);
				val.pivot = new Vector2(0f, 0f);
				val.sizeDelta = new Vector2(200f, 30f);
				val2.sprite = funnyAssets.LoadAsset<Sprite>("Round_FillLarge");
				val2.overrideSprite = funnyAssets.LoadAsset<Sprite>("Round_FillLarge");
				val2.pixelsPerUnitMultiplier = 5.4f;
				val2.type = (Type)1;
				((Graphic)val2).color = new Color(0f, 0f, 0f, 0.5f);
				((Graphic)val2).material = material;
				((Graphic)val2).raycastTarget = false;
				Traverse.Create((object)val3).Field("originalDimensions").SetValue((object)new Vector2(4f, 4f));
				GameObject val4 = new GameObject("Filler");
				val4.transform.SetParent(bloodTankGUI.transform, false);
				val4.layer = 13;
				RectTransform val5 = val4.AddComponent<RectTransform>();
				val5.anchorMax = new Vector2(1f, 1f);
				val5.anchorMin = new Vector2(0f, 0f);
				val5.sizeDelta = new Vector2(-10f, -10f);
				GameObject val6 = new GameObject("Panel");
				val6.transform.SetParent(val4.transform, false);
				val6.layer = 13;
				RectTransform val7 = val6.AddComponent<RectTransform>();
				val6.AddComponent<CanvasRenderer>();
				Image val8 = val6.AddComponent<Image>();
				val7.anchoredPosition = new Vector2(0f, -1f);
				val7.anchoredPosition3D = new Vector3(0f, -1f, 0f);
				val7.anchorMax = new Vector2(1f, 0f);
				val7.anchorMin = new Vector2(0f, 0f);
				val7.pivot = new Vector2(0.5f, 0f);
				val7.sizeDelta = new Vector2(0f, 22f);
				val8.sprite = funnyAssets.LoadAsset<Sprite>("Round_FillSmall");
				val8.overrideSprite = funnyAssets.LoadAsset<Sprite>("Round_FillSmall");
				val8.pixelsPerUnitMultiplier = 5.4f;
				val8.type = (Type)1;
				((Graphic)val8).color = new Color(0f, 0f, 0f, 0.5f);
				((Graphic)val8).material = material;
				((Graphic)val8).raycastTarget = false;
				GameObject val9 = new GameObject("Filler");
				val9.transform.SetParent(val6.transform, false);
				val9.layer = 13;
				RectTransform val10 = val9.AddComponent<RectTransform>();
				val10.anchoredPosition = new Vector2(-0.0001f, 0f);
				val10.anchoredPosition3D = new Vector3(-0.0001f, 0f, 0.0001f);
				val10.anchorMax = new Vector2(1f, 0.5f);
				val10.anchorMin = new Vector2(0f, 0.5f);
				val10.sizeDelta = new Vector2(0f, 100f);
				GameObject val11 = new GameObject("Blood Tank Slider");
				val11.transform.SetParent(val9.transform, false);
				val11.layer = 13;
				RectTransform val12 = val11.AddComponent<RectTransform>();
				bloodTankActualSlider = val11.AddComponent<Slider>();
				val12.anchoredPosition = new Vector2(0f, 0f);
				val12.anchoredPosition3D = new Vector3(0f, 0f, 0f);
				val12.anchorMax = new Vector2(1f, 0.5f);
				val12.anchorMin = new Vector2(0f, 0.5f);
				val12.sizeDelta = new Vector2(0f, 22f);
				bloodTankActualSlider.maxValue = 100f;
				((Selectable)bloodTankActualSlider).interactable = false;
				ColorBlock colors = ((Selectable)bloodTankActualSlider).colors;
				((ColorBlock)(ref colors)).colorMultiplier = 2f;
				((Selectable)bloodTankActualSlider).colors = colors;
				GameObject val13 = new GameObject("Fill Area");
				val13.transform.SetParent(val11.transform, false);
				val13.layer = 13;
				RectTransform val14 = val13.AddComponent<RectTransform>();
				val14.anchoredPosition = new Vector2(0f, 0f);
				val14.anchoredPosition3D = new Vector3(0f, 0f, 0f);
				val14.anchorMax = new Vector2(1f, 0.75f);
				val14.anchorMin = new Vector2(0f, 0.25f);
				val14.sizeDelta = new Vector2(0f, 11f);
				GameObject val15 = new GameObject("Fill");
				val15.transform.SetParent(val13.transform, false);
				val15.layer = 13;
				RectTransform val16 = val15.AddComponent<RectTransform>();
				val15.AddComponent<CanvasRenderer>();
				Image val17 = val15.AddComponent<Image>();
				val16.anchorMax = new Vector2(1f, 1f);
				val16.anchorMin = new Vector2(0f, 0f);
				val16.sizeDelta = new Vector2(0f, 0f);
				val17.sprite = funnyAssets.LoadAsset<Sprite>("Round_FillSmall");
				val17.overrideSprite = funnyAssets.LoadAsset<Sprite>("Round_FillSmall");
				val17.pixelsPerUnitMultiplier = 5.4f;
				val17.type = (Type)1;
				((Graphic)val17).color = bloodTankGUIColor.Value;
				((Graphic)val17).material = material;
				((Graphic)val17).raycastTarget = false;
				bloodTankActualSlider.fillRect = val16;
				((Selectable)bloodTankActualSlider).image = val17;
				((Selectable)bloodTankActualSlider).targetGraphic = (Graphic)(object)val17;
				bloodTankSliderText = new GameObject("Slider Text");
				bloodTankSliderText.transform.SetParent(val9.transform, false);
				bloodTankSliderText.layer = 13;
				RectTransform val18 = bloodTankSliderText.AddComponent<RectTransform>();
				bloodTankSliderText.AddComponent<CanvasRenderer>();
				ColorBlindGet val19 = bloodTankSliderText.AddComponent<ColorBlindGet>();
				TextMeshProUGUI val20 = bloodTankSliderText.AddComponent<TextMeshProUGUI>();
				val18.anchoredPosition = new Vector2(15.0002f, 0f);
				val18.anchoredPosition3D = new Vector3(15.0002f, 0f, 0.0004f);
				val18.anchorMax = new Vector2(0f, 0.5f);
				val18.anchorMin = new Vector2(0f, 0.5f);
				val18.pivot = new Vector2(0f, 0.5f);
				val18.sizeDelta = new Vector2(154.5f, 15f);
				((TMP_Text)val20).alignment = (TextAlignmentOptions)4097;
				((TMP_Text)val20).characterSpacing = -5f;
				((TMP_Text)val20).enableAutoSizing = true;
				((TMP_Text)val20).font = funnyAssets.LoadAsset<TMP_FontAsset>("VCR_OSD_MONO_1");
				((TMP_Text)val20).fontSizeMax = 200f;
				((TMP_Text)val20).fontSizeMin = 5f;
				((TMP_Text)val20).text = Mathf.RoundToInt(bloodTank) + "%";
				((Graphic)val20).raycastTarget = false;
				val19.hct = (HudColorType)4;
				Array.Resize(ref __instance.hudBackgrounds, 13);
				__instance.hudBackgrounds[12] = val2;
				Array.Resize(ref __instance.textElements, 4);
				__instance.textElements[3] = (TMP_Text)(object)val20;
				bloodTankGUI.SetActive(false);
			}
			if ((Object)(object)bloodTankAltGUI == (Object)null && ((Object)__instance).name == "AltHud")
			{
				Material material2 = ((Graphic)((Component)((Component)__instance).transform.Find("Filler/Health")).GetComponent<Image>()).material;
				bloodTankAltGUI = new GameObject("BloodTank");
				bloodTankAltGUI.transform.SetParent(((Component)__instance).transform.Find("Filler"), false);
				bloodTankAltGUI.layer = 5;
				RectTransform val21 = bloodTankAltGUI.AddComponent<RectTransform>();
				bloodTankAltGUI.AddComponent<CanvasRenderer>();
				Image val22 = bloodTankAltGUI.AddComponent<Image>();
				if (timestopperPlugin != null)
				{
					val21.anchoredPosition = new Vector2(440f, 0f);
					val21.anchoredPosition3D = new Vector3(440f, 0f, 0f);
				}
				else
				{
					val21.anchoredPosition = new Vector2(360f, 0f);
					val21.anchoredPosition3D = new Vector3(360f, 0f, 0f);
				}
				val21.anchorMax = new Vector2(0.5f, 0f);
				val21.anchorMin = new Vector2(0.5f, 0f);
				val21.pivot = new Vector2(0.5f, 0f);
				val21.sizeDelta = new Vector2(77.5f, 80f);
				val22.sprite = funnyAssets.LoadAsset<Sprite>("Round_FillLarge");
				val22.overrideSprite = funnyAssets.LoadAsset<Sprite>("Round_FillLarge");
				val22.pixelsPerUnitMultiplier = 5.4f;
				val22.type = (Type)1;
				((Graphic)val22).color = new Color(0f, 0f, 0f, 0.5f);
				((Graphic)val22).material = material2;
				((Graphic)val22).raycastTarget = false;
				GameObject val23 = new GameObject("Title");
				val23.transform.SetParent(bloodTankAltGUI.transform, false);
				val23.layer = 5;
				RectTransform val24 = val23.AddComponent<RectTransform>();
				val23.AddComponent<CanvasRenderer>();
				TextMeshProUGUI val25 = val23.AddComponent<TextMeshProUGUI>();
				val24.anchoredPosition = new Vector2(0f, -2.8571f);
				val24.anchoredPosition3D = new Vector3(0f, -2.8571f, 0f);
				val24.anchorMax = new Vector2(0.5f, 1f);
				val24.anchorMin = new Vector2(0.5f, 1f);
				val24.pivot = new Vector2(0.5f, 1f);
				val24.sizeDelta = new Vector2(70f, 24f);
				((Transform)val24).localPosition = new Vector3(0f, 77.1429f, 0f);
				((TMP_Text)val25).alignment = (TextAlignmentOptions)258;
				((TMP_Text)val25).characterWidthAdjustment = 50f;
				((TMP_Text)val25).enableAutoSizing = true;
				((TMP_Text)val25).enableKerning = true;
				((TMP_Text)val25).enableWordWrapping = true;
				((TMP_Text)val25).font = funnyAssets.LoadAsset<TMP_FontAsset>("VCR_OSD_MONO_1");
				((TMP_Text)val25).fontMaterial = funnyAssets.LoadAsset<Material>("VCR_OSD_MONO Outline");
				((TMP_Text)val25).fontSize = 24f;
				((TMP_Text)val25).fontSizeMax = 24f;
				((TMP_Text)val25).fontSizeMin = 24f;
				((TMP_Text)val25).horizontalAlignment = (HorizontalAlignmentOptions)2;
				((TMP_Text)val25).text = "BLOOD";
				bloodTankAltGUIText = new GameObject("Text (TMP)");
				bloodTankAltGUIText.transform.SetParent(bloodTankAltGUI.transform, false);
				bloodTankAltGUIText.layer = 5;
				RectTransform val26 = bloodTankAltGUIText.AddComponent<RectTransform>();
				bloodTankAltGUIText.AddComponent<CanvasRenderer>();
				TextMeshProUGUI val27 = bloodTankAltGUIText.AddComponent<TextMeshProUGUI>();
				val26.anchoredPosition = new Vector2(0f, -17.5002f);
				val26.anchoredPosition3D = new Vector3(0f, -17.5002f, 0f);
				val26.anchorMax = new Vector2(1f, 1f);
				val26.anchorMin = new Vector2(0f, 0f);
				val26.sizeDelta = new Vector2(0f, -34.9996f);
				((Transform)val26).localPosition = new Vector3(0f, 22.4998f, 0f);
				((TMP_Text)val27).alignment = (TextAlignmentOptions)258;
				((TMP_Text)val27).enableAutoSizing = true;
				((TMP_Text)val27).font = funnyAssets.LoadAsset<TMP_FontAsset>("VCR_OSD_MONO_1");
				((TMP_Text)val27).fontMaterial = funnyAssets.LoadAsset<Material>("VCR_OSD_MONO Outline");
				((TMP_Text)val27).fontSize = 36f;
				((TMP_Text)val27).fontSizeMax = 36f;
				((TMP_Text)val27).fontSizeMin = 18f;
				((TMP_Text)val27).horizontalAlignment = (HorizontalAlignmentOptions)2;
				((TMP_Text)val27).text = Mathf.RoundToInt(bloodTank) + "%";
				Array.Resize(ref __instance.hudBackgrounds, 10);
				__instance.hudBackgrounds[9] = val22;
				bloodTankAltGUI.SetActive(false);
			}
			if ((Object)(object)bloodTankAlt2GUI == (Object)null && ((Object)__instance).name == "AltHud (2)")
			{
				Material material3 = ((Graphic)((Component)((Component)__instance).transform.Find("Filler/Health (1)")).GetComponent<Image>()).material;
				bloodTankAlt2GUI = new GameObject("BloodTank");
				bloodTankAlt2GUI.transform.SetParent(((Component)__instance).transform.Find("Filler"), false);
				bloodTankAlt2GUI.layer = 5;
				RectTransform val28 = bloodTankAlt2GUI.AddComponent<RectTransform>();
				bloodTankAlt2GUI.AddComponent<CanvasRenderer>();
				Image val29 = bloodTankAlt2GUI.AddComponent<Image>();
				if (timestopperPlugin != null)
				{
					val28.anchoredPosition = new Vector2(440f, 0f);
					val28.anchoredPosition3D = new Vector3(440f, 0f, 0f);
				}
				else
				{
					val28.anchoredPosition = new Vector2(360f, 0f);
					val28.anchoredPosition3D = new Vector3(360f, 0f, 0f);
				}
				val28.anchorMax = new Vector2(0.5f, 0f);
				val28.anchorMin = new Vector2(0.5f, 0f);
				val28.pivot = new Vector2(0.5f, 0f);
				val28.sizeDelta = new Vector2(77.5f, 80f);
				val29.sprite = funnyAssets.LoadAsset<Sprite>("Round_FillLarge");
				val29.overrideSprite = funnyAssets.LoadAsset<Sprite>("Round_FillLarge");
				val29.pixelsPerUnitMultiplier = 5.4f;
				val29.type = (Type)1;
				((Graphic)val29).color = new Color(0f, 0f, 0f, 0.5f);
				((Graphic)val29).material = material3;
				((Graphic)val29).raycastTarget = false;
				GameObject val30 = new GameObject("Title");
				val30.transform.SetParent(bloodTankAlt2GUI.transform, false);
				val30.layer = 5;
				RectTransform val31 = val30.AddComponent<RectTransform>();
				val30.AddComponent<CanvasRenderer>();
				TextMeshProUGUI val32 = val30.AddComponent<TextMeshProUGUI>();
				val31.anchoredPosition = new Vector2(0f, -2.8571f);
				val31.anchoredPosition3D = new Vector3(0f, -2.8571f, 0f);
				val31.anchorMax = new Vector2(0.5f, 1f);
				val31.anchorMin = new Vector2(0.5f, 1f);
				val31.pivot = new Vector2(0.5f, 1f);
				val31.sizeDelta = new Vector2(70f, 24f);
				((Transform)val31)