Decompiled source of Capri CyberHack Fusion v1.9.0

Mods/CyberHackFusion.dll

Decompiled 2 hours ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BoneLib;
using BoneLib.BoneMenu;
using CyberHackFusion;
using Il2CppInterop.Runtime;
using Il2CppInterop.Runtime.InteropTypes;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppSLZ.Marrow;
using Il2CppSLZ.Marrow.AI;
using Il2CppSLZ.Marrow.Combat;
using Il2CppSLZ.Marrow.Data;
using Il2CppSLZ.Marrow.PuppetMasta;
using LabFusion.Entities;
using LabFusion.Network;
using LabFusion.Network.Serialization;
using LabFusion.Player;
using LabFusion.SDK.Modules;
using MelonLoader;
using Microsoft.CodeAnalysis;
using UnityEngine;
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: MelonInfo(typeof(CyberMod), "Capri CyberHack Fusion", "1.9.0", "JARED_3D", null)]
[assembly: MelonGame("Stress Level Zero", "BONELAB")]
[assembly: MelonPriority(100)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("CyberHackFusion")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("CyberHackFusion")]
[assembly: AssemblyTitle("CyberHackFusion")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[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 CyberHackFusion
{
	public class CyberMod : MelonMod
	{
		public static bool ModEnabled = true;

		public static bool OneButtonMode = false;

		public static bool MiniHudEnabled = false;

		public static bool SoundEnabled = true;

		public static bool EmpVortexEnabled = true;

		public static bool ShowTextArtInHud = true;

		public static bool PhysicalGlitchEnabled = true;

		public static readonly Color CapriGreen = new Color(0f, 1f, 0.23f, 1f);

		public static readonly Color CapriPink = new Color(1f, 0f, 0.33f, 1f);

		public static readonly Color CapriBlue = new Color(0f, 0.85f, 1f, 1f);

		public static readonly Color CapriRed = new Color(1f, 0.12f, 0.15f, 1f);

		private const string CapriBrailleArt = "⣿⣿⠛⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣾⣿⣿⢽⣾⣿⣿⣷⣷⣿⣥⣿⣿⣧⣹⡕⣰⣿⣧⣮⣬⣔⣃⣀⣀⠀⡀⠀⠁⠃⠀⠀⠀⠀⠘⠎⠀⠠⠀⠀⠀⠀⠀⡄⠈⡄⢀⡀⠀⠀⠀⠀⠀\n⣿⣿⣿⣿⣿⣿⣯⣽⣿⡿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿⣿⣷⣯⣿⣿⣾⢻⣵⢆⣮⠊⢜⡈⠀⣢⠈⣀⡀⠄⡀⠀⠀⢿⢻⣦⡨⠨⢍⠡⢈⣁⠡⠀⠡\n⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⢿⣿⣯⣇⣠⣿⣿⣿⣿⣿⣿⣿⣿⣿⢯⣿⣿⣯⣿⣿⣿⣿⣽⣿⣿⣿⣿⡿⣛⢻⡏⣟⣷⢧⣤⣜⣾⣿⣷⠺⡖⡀⠀⢨⣿⠛⢶⢦⣠⣆⢙⣿⢟⣴⠄\n⣿⣿⣿⣿⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⢿⡿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣿⣷⣽⣷⣿⣿⣿⣧⣿⣯⣷⣿⣿⣿⣟⣯⡬⠋⠉⣷⣴⣞⣿⣲⣟⣾⢿⣤⡴⣴⣆⢣\n⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣿⣿⣿⣯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣾⣿⣿⣿⣿⣯⣿⣿⡿⣿⣿⣟⣋⣿⣷⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣽⠷⣿⣿⡢\n⣿⣯⣿⣿⣿⣿⣿⣿⣿⣿⣾⣿⣿⣿⣿⣽⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣽⣿⣿⣿⣿⣿⣿⢿⣿⣿⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⡉⣻⣿⣿⣿⣿⣿⣿⣿⣿⣾\n⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣗⣿⣿⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣻⣽⣿⣿⣿⣿⣿⣾⣿⣿⢿⣿⣽⣿⣽⣿⣿⣿⣿⣿⡿⠟\n⣿⣿⣿⣿⣿⣿⣿⣿⣽⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠛⠋⠁⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⡟⢟⣋⣠⣤⣶⣾⠀⢸⣿⣿⣿⣿⣿⣻⣿⣝⣾⣯⣿⣿⣿⣿⣻⣿⣿⣿⣿⣿⣿⣿\n⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣻⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⢿⠿⠿⠿⣿⣿⣿⠿⠿⠟⠋⠉⢀⣀⣀⠶⠿⠿⣿⣿⣿⡇⠀⢸⣿⣿⣿⣿⣿⣿⣿⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣿⡭⣶⣶⣦⣿⣿⣤⠀⠀⠀⠀⠀⠀⢔⣵⣿⣿⣿⣆⢹⣿⣇⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⢹⡏⢰⣿⣾⣝⣆⠀⠀⠀⠀⢰⣿⡿⠉⢻⣿⢇⠿⠏⠉⠁⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡻⣾⣿⣉⢛⣿⡆⠀⠀⠀⠸⠮⠛⢛⣋⣬⣥⣴⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⣿⣿⣿⣷⣥⣬⣭⣭⣁⣈⣀⣀⣠⣴⣶⣿⣿⡿⣿⣿⣿⣿⡿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣽⣿⣿⣿⣿⣿⣿⣿⣿\n⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⣿⣿⣿⣿⣿⣿⣿⣿⠟⠛⠛⠹⢁⣾⣿⣿⣿⣿⣿⣿⠟⠛⠁⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n⠀⠀⠹⣿⣿⣿⣿⣿⣿⣿⣯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣏⣿⡿⠹⣿⣿⣿⣿⠀⠹⢿⣿⣿⣿⣿⣿⣆⠀⠀⠀⢀⣾⣿⣿⣿⣿⡟⠉⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⢻⣿⣿⣿⣿⣿⠉⠻\n⠀⠀⠀⠈⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠈⢿⣿⡿⠋⢸⣿⡿⠁⢀⣾⣿⠟⠋⠀⠀⠀⠈⠛⠻⠿⣿⣿⣷⣄⣤⣾⣿⣿⣿⣿⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠛⠻⣿⣿⣿⣿⣿⣿⠿⠛⠀⠀\n⠀⠀⠀⣾⣿⣿⣿⣿⣿⣿⣿⣷⠁⠀⠀⠈⣿⡇⠀⢸⡟⠀⢠⣿⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⢟⣿⣿⣿⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣻⣿⣿⡄⠀⠀⠀\n⠀⢠⣾⣿⣿⡿⣿⣿⣿⣿⣿⡟⠀⠀⠀⠀⠘⡇⠀⠸⠁⠀⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⣀⣤⣶⡿⣻⡆⠀⠀⠀⠀⠀⠀⠀⡿⠙⣿⣿⣿⣿⣷⠀⠀⠀\n⢀⣿⡿⠛⠁⠀⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡼⢿⣿⣿⣯⣿⣿⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⡅⠀⠀⠀⠀⠀⡾⠀⠀⠘⠿⢿⣿⣿⡆⠀⠀\n⣿⠋⠀⠀⠀⢰⣿⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣀⣼⡟⣽⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣏⡀⠀⠀⠀⠀⠀⡆⠀⠀⠀⠩⣿⣿⣷⠀⠀\n⡿⠀⠀⠀⠀⣿⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢅⠀⠀⠀⠀⠀⠃⠀⠀⠀⠀⠘⢿⣿⡄⠀\n⠀⠀⠀⠀⠈⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣾⠀⠀⠀⠀⠀⠂⠀⠀⠀⠀⠀⠀⠹⣇⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀";

		private static float glitchTimer = 0f;

		private static GameObject glitchCanvas;

		private static Canvas glitchCanvasComp;

		private static RectTransform glitchBarsContainer;

		private static RectTransform glitchPortraitRoot;

		private static GameObject glitchTextArtObj;

		private static GameObject miniHudObj;

		private static Text hudStatusText;

		private static RectTransform capriAvatarRoot;

		private static float capriSpeakTimer = 0f;

		private static bool moduleRegistered = false;

		private static bool menuCreated = false;

		private static Material sharedLineMaterial;

		private static Font cachedUiFont;

		public static AudioClip hackZapClip;

		public static AudioClip glitchNoiseClip;

		public static AudioClip vortexHumClip;

		public static AudioClip empBlastClip;

		public static AudioClip vanillaExplosionClip;

		public static AudioClip vanillaShockClip;

		private static Dictionary<Transform, float> sparkingHeads = new Dictionary<Transform, float>();

		private static float vortexHoldTimer = 0f;

		private static bool isVortexActive = false;

		private static float vortexZapCooldown = 0f;

		private static GameObject vortexAudioObj;

		private static HashSet<Rigidbody> capturedBodies = new HashSet<Rigidbody>();

		private static List<LineRenderer> vortexRings = new List<LineRenderer>();

		private const float VortexHoldThreshold = 0.45f;

		private const float VortexRadius = 6.5f;

		private const float EmpBlastForce = 28f;

		private const float VortexPlayerPullForce = 32f;

		private const float GlitchDistance = 0.65f;

		private const float GlitchDuration = 3.5f;

		public override void OnInitializeMelon()
		{
			EnsureSharedResources();
			GenerateSynthAudioClips();
			TryCacheVanillaBonelabAudio();
			TrySetupBoneMenu();
			TryRegisterFusionModule();
			Hooking.OnLevelLoaded += delegate
			{
				CleanupVortex();
				sparkingHeads.Clear();
				TryCacheVanillaBonelabAudio();
				TrySetupBoneMenu();
				TryRegisterFusionModule();
			};
			MelonLogger.Msg("[Capri CyberHack JARED_3D] V1.9.0 (Corpse Vortex + Fusion Damage + Capri Art) Ready!");
		}

		public override void OnLateInitializeMelon()
		{
			EnsureSharedResources();
			TryCacheVanillaBonelabAudio();
			TrySetupBoneMenu();
			TryRegisterFusionModule();
		}

		private static void EnsureSharedResources()
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			if ((Object)(object)sharedLineMaterial == (Object)null)
			{
				Shader val = Shader.Find("Sprites/Default");
				if ((Object)(object)val != (Object)null)
				{
					sharedLineMaterial = new Material(val);
					Object.DontDestroyOnLoad((Object)(object)sharedLineMaterial);
				}
			}
			if (!((Object)(object)cachedUiFont == (Object)null))
			{
				return;
			}
			try
			{
				cachedUiFont = Resources.GetBuiltinResource<Font>("Arial.ttf");
			}
			catch
			{
			}
			if (!((Object)(object)cachedUiFont == (Object)null))
			{
				return;
			}
			try
			{
				Il2CppReferenceArray<Object> val2 = Resources.FindObjectsOfTypeAll(Il2CppType.From(typeof(Font)));
				if (val2 != null && ((Il2CppArrayBase<Object>)(object)val2).Length > 0)
				{
					cachedUiFont = ((Il2CppObjectBase)((Il2CppArrayBase<Object>)(object)val2)[0]).Cast<Font>();
				}
			}
			catch
			{
			}
		}

		private static Material GetLineMaterial()
		{
			if ((Object)(object)sharedLineMaterial == (Object)null)
			{
				EnsureSharedResources();
			}
			return sharedLineMaterial;
		}

		private static void TryCacheVanillaBonelabAudio()
		{
			try
			{
				Il2CppReferenceArray<Object> val = Resources.FindObjectsOfTypeAll(Il2CppType.From(typeof(AudioClip)));
				if (val == null)
				{
					return;
				}
				foreach (Object item in (Il2CppArrayBase<Object>)(object)val)
				{
					if (item == (Object)null)
					{
						continue;
					}
					AudioClip val2 = ((Il2CppObjectBase)item).Cast<AudioClip>();
					if (!((Object)(object)val2 == (Object)null) && !string.IsNullOrEmpty(((Object)val2).name))
					{
						string text = ((Object)val2).name.ToLowerInvariant();
						if ((Object)(object)vanillaExplosionClip == (Object)null && (text.Contains("explosion") || text.Contains("explode") || text.Contains("boom") || text.Contains("grenade")))
						{
							vanillaExplosionClip = val2;
						}
						else if ((Object)(object)vanillaShockClip == (Object)null && (text.Contains("zap") || text.Contains("shock") || text.Contains("electric") || text.Contains("taser") || text.Contains("spark")))
						{
							vanillaShockClip = val2;
						}
						if ((Object)(object)vanillaExplosionClip != (Object)null && (Object)(object)vanillaShockClip != (Object)null)
						{
							break;
						}
					}
				}
			}
			catch
			{
			}
		}

		private void TryRegisterFusionModule()
		{
			if (moduleRegistered)
			{
				return;
			}
			try
			{
				ModuleManager.RegisterModule<CyberHackModule>();
				moduleRegistered = true;
			}
			catch
			{
			}
		}

		private void TrySetupBoneMenu()
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			if (menuCreated)
			{
				return;
			}
			try
			{
				if (Page.Root == null)
				{
					return;
				}
				Page val = Page.Root.CreatePage("<color=#FF0055>Capri</color> <color=#00FF3B>Hack</color> <color=#FF1E26>[JARED_3D]</color>", CapriRed, 0, true);
				val.CreateBool("<color=#00FF3B>Enable Capri Hack</color>", CapriGreen, ModEnabled, (Action<bool>)delegate(bool flag)
				{
					ModEnabled = flag;
					if (!flag)
					{
						CleanupVortex();
					}
					UpdateHudText(flag ? "SYS: ARMED" : "SYS: OFFLINE");
				});
				val.CreateBool("<color=#FF0055>Capri Mini-HUD (Wrist)</color>", CapriPink, MiniHudEnabled, (Action<bool>)delegate(bool flag)
				{
					MiniHudEnabled = flag;
					ToggleMiniHud(flag);
				});
				val.CreateBool("<color=#FF0055>Capri Braille Art Panel</color>", CapriPink, ShowTextArtInHud, (Action<bool>)delegate(bool flag)
				{
					ShowTextArtInHud = flag;
					if ((Object)(object)glitchTextArtObj != (Object)null)
					{
						glitchTextArtObj.SetActive(flag);
					}
				});
				val.CreateBool("<color=#FF1E26>Physical Glitch (No-Mod Feel)</color>", CapriRed, PhysicalGlitchEnabled, (Action<bool>)delegate(bool physicalGlitchEnabled)
				{
					PhysicalGlitchEnabled = physicalGlitchEnabled;
				});
				val.CreateBool("<color=#00D9FF>EMP Vortex (Hold Trig+Grip)</color>", CapriBlue, EmpVortexEnabled, (Action<bool>)delegate(bool flag)
				{
					EmpVortexEnabled = flag;
					if (!flag)
					{
						CleanupVortex();
					}
				});
				val.CreateBool("<color=#00D9FF>Trigger Only Mode</color>", CapriBlue, OneButtonMode, (Action<bool>)delegate(bool oneButtonMode)
				{
					OneButtonMode = oneButtonMode;
				});
				val.CreateBool("<color=#FFFF00>Cyber SFX Audio</color>", Color.yellow, SoundEnabled, (Action<bool>)delegate(bool soundEnabled)
				{
					SoundEnabled = soundEnabled;
				});
				val.CreateFunction("<color=#FF1E26>Test Capri Glitch + SFX</color>", CapriRed, (Action)delegate
				{
					//IL_0055: Unknown result type (might be due to invalid IL or missing references)
					TriggerGlitchEffect();
					if ((Object)(object)Player.PhysicsRig != (Object)null && (Object)(object)((Rig)Player.PhysicsRig).m_head != (Object)null)
					{
						StartHeadSparks(((Rig)Player.PhysicsRig).m_head, 3.5f);
						PlayCyberSound(glitchNoiseClip, ((Rig)Player.PhysicsRig).m_head.position, 0.85f);
					}
				});
				menuCreated = true;
			}
			catch
			{
			}
		}

		public override void OnUpdate()
		{
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			if (!menuCreated && Page.Root != null)
			{
				TrySetupBoneMenu();
			}
			if (MiniHudEnabled)
			{
				UpdateMiniHudTransform();
			}
			if (!ModEnabled || (Object)(object)Player.RigManager == (Object)null)
			{
				if (isVortexActive)
				{
					CleanupVortex();
				}
				if (glitchTimer > 0f)
				{
					glitchTimer = 0f;
					if ((Object)(object)glitchCanvas != (Object)null)
					{
						glitchCanvas.SetActive(false);
					}
				}
				return;
			}
			UpdateGlitchScreen();
			UpdateHeadSparks();
			HandleEmpVortexInput();
			Hand rightHand = Player.RightHand;
			if ((Object)(object)rightHand == (Object)null || (Object)(object)rightHand.AttachedReceiver != (Object)null || (Object)(object)rightHand.Controller == (Object)null || isVortexActive)
			{
				return;
			}
			bool num;
			if (!OneButtonMode)
			{
				if (!rightHand.Controller.GetPrimaryInteractionButton())
				{
					return;
				}
				num = rightHand.Controller.GetAButtonDown();
			}
			else
			{
				num = rightHand.Controller.GetPrimaryInteractionButtonDown();
			}
			if (num)
			{
				TryHackTarget(((Component)rightHand).transform.position, ((Component)rightHand).transform.forward);
			}
		}

		public override void OnFixedUpdate()
		{
			if (isVortexActive && ModEnabled && (Object)(object)Player.PhysicsRig != (Object)null)
			{
				ProcessVortexPhysics();
			}
		}

		private void HandleEmpVortexInput()
		{
			if (!EmpVortexEnabled)
			{
				if (isVortexActive)
				{
					CleanupVortex();
				}
			}
			else if (IsHandHoldingVortexCombo(Player.LeftHand) || IsHandHoldingVortexCombo(Player.RightHand))
			{
				vortexHoldTimer += Time.deltaTime;
				if (vortexHoldTimer >= 0.45f)
				{
					if (!isVortexActive)
					{
						StartEmpVortex();
					}
					UpdateVortexVisualsAndTargets();
				}
			}
			else
			{
				if (isVortexActive)
				{
					ReleaseEmpBlast();
				}
				vortexHoldTimer = 0f;
			}
		}

		private bool IsHandHoldingVortexCombo(Hand hand)
		{
			if ((Object)(object)hand == (Object)null || (Object)(object)hand.Controller == (Object)null)
			{
				return false;
			}
			if ((Object)(object)hand.AttachedReceiver != (Object)null)
			{
				return false;
			}
			return hand.Controller.GetPrimaryInteractionButton() && hand.Controller.GetSecondaryInteractionButton();
		}

		private void StartEmpVortex()
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: 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_008d: Expected O, but got Unknown
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Expected O, but got Unknown
			isVortexActive = true;
			vortexZapCooldown = 0f;
			capturedBodies.Clear();
			TriggerCapriReaction("EMP VORTEX // ACTIVE");
			Color[] array = (Color[])(object)new Color[3] { CapriPink, CapriGreen, CapriBlue };
			Material lineMaterial = GetLineMaterial();
			for (int i = 0; i < 3; i++)
			{
				GameObject val = new GameObject($"CapriVortexRing_{i}");
				LineRenderer val2 = ((Il2CppObjectBase)val.AddComponent(Il2CppType.From(typeof(LineRenderer)))).Cast<LineRenderer>();
				val2.positionCount = 36;
				val2.loop = true;
				val2.startWidth = 0.055f;
				val2.endWidth = 0.055f;
				if ((Object)(object)lineMaterial != (Object)null)
				{
					((Renderer)val2).material = lineMaterial;
				}
				val2.startColor = array[i] * 1.45f;
				val2.endColor = array[(i + 1) % 3] * 1.45f;
				vortexRings.Add(val2);
			}
			if (SoundEnabled && (Object)(object)vortexHumClip != (Object)null && (Object)(object)Player.PhysicsRig != (Object)null && (Object)(object)((Rig)Player.PhysicsRig).m_head != (Object)null)
			{
				vortexAudioObj = new GameObject("CapriVortexHumSFX");
				vortexAudioObj.transform.SetParent(((Rig)Player.PhysicsRig).m_head, false);
				AudioSource val3 = ((Il2CppObjectBase)vortexAudioObj.AddComponent(Il2CppType.From(typeof(AudioSource)))).Cast<AudioSource>();
				val3.clip = vortexHumClip;
				val3.loop = true;
				val3.volume = 0.8f;
				val3.spatialBlend = 0.35f;
				val3.Play();
			}
		}

		private void UpdateVortexVisualsAndTargets()
		{
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: 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_0182: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)Player.PhysicsRig == (Object)null || (Object)(object)((Rig)Player.PhysicsRig).m_head == (Object)null)
			{
				return;
			}
			Vector3 val = (((Object)(object)((Rig)Player.PhysicsRig).m_chest != (Object)null) ? ((Rig)Player.PhysicsRig).m_chest.position : (((Rig)Player.PhysicsRig).m_head.position - Vector3.up * 0.4f));
			Vector3 val4 = default(Vector3);
			for (int i = 0; i < vortexRings.Count; i++)
			{
				LineRenderer val2 = vortexRings[i];
				if (!((Object)(object)val2 == (Object)null))
				{
					float num = 1.35f + (float)i * 0.45f + Mathf.Sin(Time.time * 8f + (float)i) * 0.12f;
					float num2 = ((i % 2 == 0) ? 1f : (-1f)) * (3.5f + (float)i * 1.2f);
					float num3 = (float)(i - 1) * 28f;
					Quaternion val3 = Quaternion.Euler(num3, Time.time * 45f * (float)(i + 1), (0f - num3) * 0.5f);
					for (int j = 0; j < 36; j++)
					{
						float num4 = (float)j / 36f * (float)Math.PI * 2f + Time.time * num2;
						float num5 = Mathf.Sin(num4 * 6f + Time.time * 18f) * 0.08f;
						((Vector3)(ref val4))..ctor(Mathf.Cos(num4) * num, num5, Mathf.Sin(num4) * num);
						val2.SetPosition(j, val + val3 * val4);
					}
				}
			}
			vortexZapCooldown -= Time.deltaTime;
			if (vortexZapCooldown <= 0f)
			{
				vortexZapCooldown = 0.45f;
				ZapTargetsInVortex(val);
			}
		}

		private void ZapTargetsInVortex(Vector3 center)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a3: 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_02ae: 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_02ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e0: Unknown result type (might be due to invalid IL or missing references)
			Collider[] array = Il2CppArrayBase<Collider>.op_Implicit((Il2CppArrayBase<Collider>)(object)Physics.OverlapSphere(center, 6.5f));
			HashSet<int> hashSet = new HashSet<int>();
			Collider[] array2 = array;
			NetworkPlayer val4 = default(NetworkPlayer);
			foreach (Collider val in array2)
			{
				if ((Object)(object)val == (Object)null)
				{
					continue;
				}
				RigManager componentInParent = ((Component)val).GetComponentInParent<RigManager>();
				if ((Object)(object)componentInParent != (Object)null && (Object)(object)componentInParent != (Object)(object)Player.RigManager && hashSet.Add(((Object)componentInParent).GetInstanceID()))
				{
					Transform val2 = (((Object)(object)componentInParent.physicsRig != (Object)null && (Object)(object)((Rig)componentInParent.physicsRig).m_head != (Object)null) ? ((Rig)componentInParent.physicsRig).m_head : ((Component)componentInParent).transform);
					Vector3 val3 = center - val2.position;
					Vector3 normalized = ((Vector3)(ref val3)).normalized;
					SpawnLightningBulletStormAndMiniBlast(center + Vector3.up * 0.3f, val2, normalized * 16f + Vector3.up * 5f);
					StartHeadSparks(val2, 2.5f);
					ApplyFusionSyncedDamageAndLaunch(componentInParent, val2.position, normalized * 16f + Vector3.up * 5f, 35f, ragdoll: false);
					if (NetworkPlayerManager.TryGetPlayer(componentInParent, ref val4) && val4 != null && val4.PlayerID != null)
					{
						CyberHackData cyberHackData = new CyberHackData
						{
							HackerId = PlayerIDManager.LocalSmallID,
							TargetId = val4.PlayerID.SmallID
						};
						MessageRelay.RelayModule<CyberHackMessage, CyberHackData>(cyberHackData, CommonMessageRoutes.ReliableToOtherClients);
					}
					continue;
				}
				PuppetMaster componentInParent2 = ((Component)val).GetComponentInParent<PuppetMaster>();
				AIBrain componentInParent3 = ((Component)val).GetComponentInParent<AIBrain>();
				if (!((Object)(object)componentInParent2 != (Object)null) && !((Object)(object)componentInParent3 != (Object)null))
				{
					continue;
				}
				int item = (((Object)(object)componentInParent2 != (Object)null) ? ((Object)componentInParent2).GetInstanceID() : ((Object)componentInParent3).GetInstanceID());
				if (!hashSet.Add(item))
				{
					continue;
				}
				Transform transform = ((Component)val).transform;
				if ((Object)(object)componentInParent2 != (Object)null && componentInParent2.muscles != null)
				{
					foreach (Muscle item2 in (Il2CppArrayBase<Muscle>)(object)componentInParent2.muscles)
					{
						if (item2 != null && (Object)(object)item2.transform != (Object)null && ((Object)item2.transform).name.ToLower().Contains("head"))
						{
							transform = item2.transform;
							break;
						}
					}
				}
				SpawnCapriLightning(center + Vector3.up * 0.3f, transform.position);
				PlayCyberSound(((Object)(object)vanillaShockClip != (Object)null) ? vanillaShockClip : hackZapClip, transform.position, 0.8f);
				StartHeadSparks(transform, 2.5f);
				KillAndRagdollNPC(componentInParent2, componentInParent3);
			}
		}

		private void ProcessVortexPhysics()
		{
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_0276: Unknown result type (might be due to invalid IL or missing references)
			//IL_027b: Unknown result type (might be due to invalid IL or missing references)
			//IL_027c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0281: Unknown result type (might be due to invalid IL or missing references)
			//IL_0285: Unknown result type (might be due to invalid IL or missing references)
			//IL_0291: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02db: Unknown result type (might be due to invalid IL or missing references)
			//IL_02df: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e4: 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_032d: Unknown result type (might be due to invalid IL or missing references)
			//IL_032e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0332: Unknown result type (might be due to invalid IL or missing references)
			//IL_0337: Unknown result type (might be due to invalid IL or missing references)
			//IL_033c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0347: Unknown result type (might be due to invalid IL or missing references)
			//IL_034b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0350: Unknown result type (might be due to invalid IL or missing references)
			//IL_035a: Unknown result type (might be due to invalid IL or missing references)
			//IL_035f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0361: Unknown result type (might be due to invalid IL or missing references)
			//IL_0368: Unknown result type (might be due to invalid IL or missing references)
			//IL_036d: 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_0374: Unknown result type (might be due to invalid IL or missing references)
			//IL_037a: Unknown result type (might be due to invalid IL or missing references)
			//IL_037f: Unknown result type (might be due to invalid IL or missing references)
			//IL_038c: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c4: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)Player.PhysicsRig == (Object)null || (Object)(object)((Rig)Player.PhysicsRig).m_head == (Object)null)
			{
				return;
			}
			Vector3 val = (((Object)(object)((Rig)Player.PhysicsRig).m_chest != (Object)null) ? ((Rig)Player.PhysicsRig).m_chest.position : (((Rig)Player.PhysicsRig).m_head.position - Vector3.up * 0.3f));
			Collider[] array = Il2CppArrayBase<Collider>.op_Implicit((Il2CppArrayBase<Collider>)(object)Physics.OverlapSphere(val, 6.5f));
			HashSet<int> hashSet = new HashSet<int>();
			Collider[] array2 = array;
			foreach (Collider val2 in array2)
			{
				if ((Object)(object)val2 == (Object)null)
				{
					continue;
				}
				RigManager componentInParent = ((Component)val2).GetComponentInParent<RigManager>();
				if ((Object)(object)componentInParent != (Object)null && (Object)(object)componentInParent != (Object)(object)Player.RigManager && hashSet.Add(((Object)componentInParent).GetInstanceID()))
				{
					PullRigIntoVortex(componentInParent, val);
				}
				else
				{
					if ((Object)(object)val2.attachedRigidbody == (Object)null)
					{
						continue;
					}
					Rigidbody attachedRigidbody = val2.attachedRigidbody;
					if (attachedRigidbody.isKinematic || (Object)(object)((Component)attachedRigidbody).GetComponentInParent<RigManager>() == (Object)(object)Player.RigManager)
					{
						continue;
					}
					PuppetMaster componentInParent2 = ((Component)attachedRigidbody).GetComponentInParent<PuppetMaster>();
					if ((Object)(object)componentInParent2 != (Object)null)
					{
						AIBrain componentInParent3 = ((Component)componentInParent2).GetComponentInParent<AIBrain>();
						KillAndRagdollNPC(componentInParent2, componentInParent3);
						if (capturedBodies.Add(attachedRigidbody))
						{
							attachedRigidbody.useGravity = false;
						}
					}
					else
					{
						InteractableHost componentInParent4 = ((Component)attachedRigidbody).GetComponentInParent<InteractableHost>();
						if ((!((Object)(object)componentInParent4 != (Object)null) || componentInParent4.HandCount() <= 0) && capturedBodies.Add(attachedRigidbody))
						{
							attachedRigidbody.useGravity = false;
						}
					}
				}
			}
			List<Rigidbody> list = null;
			Vector3 val4 = default(Vector3);
			foreach (Rigidbody capturedBody in capturedBodies)
			{
				if ((Object)(object)capturedBody == (Object)null)
				{
					if (list == null)
					{
						list = new List<Rigidbody>();
					}
					list.Add(capturedBody);
					continue;
				}
				InteractableHost componentInParent5 = ((Component)capturedBody).GetComponentInParent<InteractableHost>();
				if ((Object)(object)componentInParent5 != (Object)null && componentInParent5.HandCount() > 0)
				{
					capturedBody.useGravity = true;
					if (list == null)
					{
						list = new List<Rigidbody>();
					}
					list.Add(capturedBody);
					continue;
				}
				Vector3 val3 = capturedBody.position - val;
				((Vector3)(ref val4))..ctor(val3.x, 0f, val3.z);
				float magnitude = ((Vector3)(ref val4)).magnitude;
				if (magnitude < 0.05f)
				{
					val4 = Vector3.forward * 1.5f;
				}
				Vector3 normalized = ((Vector3)(ref val4)).normalized;
				Vector3 val5 = Vector3.Cross(Vector3.up, normalized);
				Vector3 normalized2 = ((Vector3)(ref val5)).normalized;
				float num = Mathf.Clamp(magnitude, 2f, 4.5f);
				float y = val.y + 0.35f + Mathf.Sin(Time.time * 2.5f + (float)((Object)capturedBody).GetInstanceID() * 0.1f) * 0.55f;
				Vector3 val6 = val + normalized * num;
				val6.y = y;
				Vector3 val7 = (val6 - capturedBody.position) * 14f;
				Vector3 val8 = normalized2 * 5.6f + val7;
				capturedBody.velocity = Vector3.Lerp(capturedBody.velocity, val8, Time.fixedDeltaTime * 7.5f);
				capturedBody.angularVelocity = new Vector3(1.8f, 3.4f, 1.8f);
			}
			if (list == null)
			{
				return;
			}
			foreach (Rigidbody item in list)
			{
				capturedBodies.Remove(item);
			}
		}

		private void PullRigIntoVortex(RigManager rig, Vector3 center)
		{
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: 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_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: 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_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: 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)
			if ((Object)(object)rig == (Object)null || (Object)(object)rig.physicsRig == (Object)null)
			{
				return;
			}
			try
			{
				Vector3 val = (((Object)(object)((Rig)rig.physicsRig).m_chest != (Object)null) ? ((Rig)rig.physicsRig).m_chest.position : ((Component)rig).transform.position);
				Vector3 val2 = center - val;
				float magnitude = ((Vector3)(ref val2)).magnitude;
				if (magnitude < 1.1f)
				{
					return;
				}
				Vector3 normalized = ((Vector3)(ref val2)).normalized;
				Vector3 val3 = Vector3.Cross(Vector3.up, normalized);
				Vector3 normalized2 = ((Vector3)(ref val3)).normalized;
				Vector3 val4 = normalized * 32f + normalized2 * 14f + Vector3.up * 6f;
				Rigidbody[] array = Il2CppArrayBase<Rigidbody>.op_Implicit(((Component)rig.physicsRig).GetComponentsInChildren<Rigidbody>());
				Rigidbody[] array2 = array;
				foreach (Rigidbody val5 in array2)
				{
					if ((Object)(object)val5 != (Object)null && !val5.isKinematic)
					{
						val5.AddForce(val4, (ForceMode)5);
					}
				}
			}
			catch
			{
			}
		}

		private void ReleaseEmpBlast()
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: 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_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ac: 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_02dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0301: Unknown result type (might be due to invalid IL or missing references)
			//IL_030c: Unknown result type (might be due to invalid IL or missing references)
			//IL_030d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0317: Unknown result type (might be due to invalid IL or missing references)
			//IL_031c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0321: Unknown result type (might be due to invalid IL or missing references)
			//IL_0322: Unknown result type (might be due to invalid IL or missing references)
			//IL_032c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0331: Unknown result type (might be due to invalid IL or missing references)
			//IL_033c: Unknown result type (might be due to invalid IL or missing references)
			//IL_033d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0347: Unknown result type (might be due to invalid IL or missing references)
			//IL_034c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0351: Unknown result type (might be due to invalid IL or missing references)
			//IL_0352: Unknown result type (might be due to invalid IL or missing references)
			//IL_035c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0361: 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_036d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0377: Unknown result type (might be due to invalid IL or missing references)
			//IL_037c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0381: Unknown result type (might be due to invalid IL or missing references)
			//IL_0382: Unknown result type (might be due to invalid IL or missing references)
			//IL_038c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0391: 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_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0215: Unknown result type (might be due to invalid IL or missing references)
			//IL_0217: Unknown result type (might be due to invalid IL or missing references)
			//IL_0221: Unknown result type (might be due to invalid IL or missing references)
			//IL_0226: 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_022f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0234: Unknown result type (might be due to invalid IL or missing references)
			//IL_0236: Unknown result type (might be due to invalid IL or missing references)
			//IL_0237: Unknown result type (might be due to invalid IL or missing references)
			//IL_0241: Unknown result type (might be due to invalid IL or missing references)
			//IL_0246: Unknown result type (might be due to invalid IL or missing references)
			//IL_024d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0254: Unknown result type (might be due to invalid IL or missing references)
			//IL_025e: Unknown result type (might be due to invalid IL or missing references)
			//IL_026d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0272: 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_0283: Unknown result type (might be due to invalid IL or missing references)
			//IL_020e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0213: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = (((Object)(object)Player.PhysicsRig != (Object)null && (Object)(object)((Rig)Player.PhysicsRig).m_head != (Object)null) ? (((Rig)Player.PhysicsRig).m_head.position - Vector3.up * 0.3f) : Vector3.zero);
			Vector3 val2;
			foreach (Rigidbody capturedBody in capturedBodies)
			{
				if (!((Object)(object)capturedBody == (Object)null))
				{
					capturedBody.useGravity = true;
					val2 = capturedBody.position - val;
					Vector3 val3 = ((Vector3)(ref val2)).normalized;
					if (((Vector3)(ref val3)).sqrMagnitude < 0.01f)
					{
						val3 = Random.onUnitSphere;
					}
					val2 = val3 + Vector3.up * 0.42f;
					val3 = ((Vector3)(ref val2)).normalized;
					capturedBody.AddForce(val3 * 28f, (ForceMode)2);
					capturedBody.AddTorque(Random.insideUnitSphere * 14f, (ForceMode)2);
				}
			}
			if (val != Vector3.zero)
			{
				Collider[] array = Il2CppArrayBase<Collider>.op_Implicit((Il2CppArrayBase<Collider>)(object)Physics.OverlapSphere(val, 6.5f));
				HashSet<int> hashSet = new HashSet<int>();
				Collider[] array2 = array;
				foreach (Collider val4 in array2)
				{
					if ((Object)(object)val4 == (Object)null)
					{
						continue;
					}
					RigManager componentInParent = ((Component)val4).GetComponentInParent<RigManager>();
					if ((Object)(object)componentInParent != (Object)null && (Object)(object)componentInParent != (Object)(object)Player.RigManager && hashSet.Add(((Object)componentInParent).GetInstanceID()))
					{
						Transform val5 = (((Object)(object)componentInParent.physicsRig != (Object)null && (Object)(object)((Rig)componentInParent.physicsRig).m_head != (Object)null) ? ((Rig)componentInParent.physicsRig).m_head : ((Component)componentInParent).transform);
						val2 = val5.position - val;
						Vector3 val6 = ((Vector3)(ref val2)).normalized;
						if (((Vector3)(ref val6)).sqrMagnitude < 0.01f)
						{
							val6 = Vector3.forward;
						}
						val2 = val6 + Vector3.up * 0.55f;
						val6 = ((Vector3)(ref val2)).normalized;
						SpawnLightningBulletStormAndMiniBlast(val + Vector3.up * 0.2f, val5, val6 * 28f * 1.6f);
						ApplyFusionSyncedDamageAndLaunch(componentInParent, val5.position, val6 * 28f * 1.6f, 99999f, ragdoll: true);
					}
				}
				PlayCyberSound(empBlastClip, val, 1f);
				if ((Object)(object)vanillaExplosionClip != (Object)null)
				{
					PlayCyberSound(vanillaExplosionClip, val, 0.95f);
				}
				SpawnCapriLightning(val + Vector3.up * 0.2f, val + Vector3.forward * 4f);
				SpawnCapriLightning(val + Vector3.up * 0.2f, val - Vector3.forward * 4f);
				SpawnCapriLightning(val + Vector3.up * 0.2f, val + Vector3.right * 4f);
				SpawnCapriLightning(val + Vector3.up * 0.2f, val - Vector3.right * 4f);
			}
			TriggerCapriReaction("EMP DISCHARGE // BLAST!");
			CleanupVortex();
		}

		private static void CleanupVortex()
		{
			isVortexActive = false;
			vortexHoldTimer = 0f;
			foreach (Rigidbody capturedBody in capturedBodies)
			{
				if ((Object)(object)capturedBody != (Object)null)
				{
					capturedBody.useGravity = true;
				}
			}
			capturedBodies.Clear();
			foreach (LineRenderer vortexRing in vortexRings)
			{
				if ((Object)(object)vortexRing != (Object)null && (Object)(object)((Component)vortexRing).gameObject != (Object)null)
				{
					Object.Destroy((Object)(object)((Component)vortexRing).gameObject);
				}
			}
			vortexRings.Clear();
			if ((Object)(object)vortexAudioObj != (Object)null)
			{
				Object.Destroy((Object)(object)vortexAudioObj);
				vortexAudioObj = null;
			}
		}

		private void TryHackTarget(Vector3 origin, Vector3 direction)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: 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_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0224: Unknown result type (might be due to invalid IL or missing references)
			//IL_0227: Unknown result type (might be due to invalid IL or missing references)
			//IL_024b: Unknown result type (might be due to invalid IL or missing references)
			//IL_025e: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02df: Unknown result type (might be due to invalid IL or missing references)
			RaycastHit val = default(RaycastHit);
			if (!Physics.SphereCast(origin, 0.35f, direction, ref val, 20f))
			{
				return;
			}
			RigManager componentInParent = ((Component)((RaycastHit)(ref val)).collider).GetComponentInParent<RigManager>();
			if ((Object)(object)componentInParent != (Object)null && (Object)(object)componentInParent != (Object)(object)Player.RigManager)
			{
				Transform val2 = (((Object)(object)componentInParent.physicsRig != (Object)null && (Object)(object)((Rig)componentInParent.physicsRig).m_head != (Object)null) ? ((Rig)componentInParent.physicsRig).m_head : ((Component)componentInParent).transform);
				Vector3 val3 = ((Vector3)(ref direction)).normalized + Vector3.up * 0.55f;
				Vector3 val4 = ((Vector3)(ref val3)).normalized * 34f;
				SpawnLightningBulletStormAndMiniBlast(origin, val2, val4);
				TriggerCapriReaction("HEAD STORM // MINI-BLAST!");
				StartHeadSparks(val2, 3.5f);
				ApplyFusionSyncedDamageAndLaunch(componentInParent, ((RaycastHit)(ref val)).point, val4, 99999f, ragdoll: true);
				NetworkPlayer val5 = default(NetworkPlayer);
				if (NetworkPlayerManager.TryGetPlayer(componentInParent, ref val5) && val5 != null && val5.PlayerID != null)
				{
					CyberHackData cyberHackData = new CyberHackData
					{
						HackerId = PlayerIDManager.LocalSmallID,
						TargetId = val5.PlayerID.SmallID
					};
					MessageRelay.RelayModule<CyberHackMessage, CyberHackData>(cyberHackData, CommonMessageRoutes.ReliableToOtherClients);
				}
				return;
			}
			PuppetMaster componentInParent2 = ((Component)((RaycastHit)(ref val)).collider).GetComponentInParent<PuppetMaster>();
			AIBrain componentInParent3 = ((Component)((RaycastHit)(ref val)).collider).GetComponentInParent<AIBrain>();
			if (!((Object)(object)componentInParent2 != (Object)null) && !((Object)(object)componentInParent3 != (Object)null))
			{
				return;
			}
			Transform transform = ((RaycastHit)(ref val)).transform;
			if ((Object)(object)componentInParent2 != (Object)null && componentInParent2.muscles != null && ((Il2CppArrayBase<Muscle>)(object)componentInParent2.muscles).Length > 0)
			{
				foreach (Muscle item in (Il2CppArrayBase<Muscle>)(object)componentInParent2.muscles)
				{
					if (item != null && (Object)(object)item.transform != (Object)null && ((Object)item.transform).name.ToLower().Contains("head"))
					{
						transform = item.transform;
						break;
					}
				}
			}
			SpawnCapriLightning(origin, transform.position);
			PlayCyberSound(((Object)(object)vanillaShockClip != (Object)null) ? vanillaShockClip : hackZapClip, origin, 0.9f);
			PlayCyberSound(glitchNoiseClip, transform.position, 1f);
			TriggerCapriReaction("NPC FRIED // 99999 DMG");
			StartHeadSparks(transform, 3.5f);
			KillAndRagdollNPC(componentInParent2, componentInParent3);
			if ((Object)(object)((RaycastHit)(ref val)).rigidbody != (Object)null && !((RaycastHit)(ref val)).rigidbody.isKinematic)
			{
				((RaycastHit)(ref val)).rigidbody.AddForce((((Vector3)(ref direction)).normalized + Vector3.up * 0.45f) * 26f, (ForceMode)2);
			}
		}

		private void KillAndRagdollNPC(PuppetMaster puppet, AIBrain brain)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Invalid comparison between Unknown and I4
			try
			{
				if ((Object)(object)puppet != (Object)null && (int)puppet.state != 1)
				{
					puppet.Kill();
				}
				if ((Object)(object)brain != (Object)null && (Object)(object)brain.behaviour != (Object)null)
				{
					((BehaviourBase)brain.behaviour).Deactivate();
				}
			}
			catch
			{
			}
		}

		private static void TriggerNoModPhysicalGlitchAndWorldFeedback(RigManager targetRig, Vector3 impactPoint, Vector3 baseImpulse)
		{
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: 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_01fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_0223: Unknown result type (might be due to invalid IL or missing references)
			//IL_0228: Unknown result type (might be due to invalid IL or missing references)
			//IL_0232: Unknown result type (might be due to invalid IL or missing references)
			//IL_0237: Unknown result type (might be due to invalid IL or missing references)
			//IL_0241: Unknown result type (might be due to invalid IL or missing references)
			//IL_0218: Unknown result type (might be due to invalid IL or missing references)
			//IL_021d: 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_02ef: 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_02f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_030d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0310: Unknown result type (might be due to invalid IL or missing references)
			//IL_0315: Unknown result type (might be due to invalid IL or missing references)
			//IL_031c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0321: Unknown result type (might be due to invalid IL or missing references)
			//IL_0326: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_035a: 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_036f: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)targetRig == (Object)null)
			{
				return;
			}
			try
			{
				if ((Object)(object)vanillaExplosionClip != (Object)null)
				{
					PlayCyberSound(vanillaExplosionClip, impactPoint, 0.95f);
				}
				if ((Object)(object)vanillaShockClip != (Object)null)
				{
					PlayCyberSound(vanillaShockClip, impactPoint, 1f);
				}
				Il2CppReferenceArray<Object> val = Resources.FindObjectsOfTypeAll(Il2CppType.From(typeof(GameObject)));
				if (val != null)
				{
					int num = 0;
					for (int i = 0; i < ((Il2CppArrayBase<Object>)(object)val).Length; i++)
					{
						if (num >= 2)
						{
							break;
						}
						GameObject val2 = ((Il2CppObjectBase)((Il2CppArrayBase<Object>)(object)val)[i]).Cast<GameObject>();
						if ((Object)(object)val2 == (Object)null || string.IsNullOrEmpty(((Object)val2).name))
						{
							continue;
						}
						string text = ((Object)val2).name.ToLowerInvariant();
						if (text.Contains("explosion") || text.Contains("spark") || text.Contains("shock") || text.Contains("flash"))
						{
							Scene scene = val2.scene;
							if (((Scene)(ref scene)).IsValid())
							{
								GameObject val3 = Object.Instantiate<GameObject>(val2, impactPoint, Quaternion.identity);
								val3.SetActive(true);
								Object.Destroy((Object)(object)val3, 1.5f);
								num++;
							}
						}
					}
				}
			}
			catch
			{
			}
			try
			{
				Collider[] array = Il2CppArrayBase<Collider>.op_Implicit((Il2CppArrayBase<Collider>)(object)Physics.OverlapSphere(impactPoint, 2.2f));
				Collider[] array2 = array;
				foreach (Collider val4 in array2)
				{
					if ((Object)(object)val4 == (Object)null || (Object)(object)val4.attachedRigidbody == (Object)null)
					{
						continue;
					}
					Rigidbody attachedRigidbody = val4.attachedRigidbody;
					if (!attachedRigidbody.isKinematic && !((Object)(object)((Component)attachedRigidbody).GetComponentInParent<RigManager>() == (Object)(object)Player.RigManager))
					{
						Vector3 val5 = attachedRigidbody.position - impactPoint;
						if (((Vector3)(ref val5)).sqrMagnitude < 0.01f)
						{
							val5 = Random.onUnitSphere;
						}
						attachedRigidbody.AddForce((((Vector3)(ref val5)).normalized + Vector3.up * 0.45f) * 14f, (ForceMode)2);
					}
				}
			}
			catch
			{
			}
			if (!PhysicalGlitchEnabled || (Object)(object)targetRig.physicsRig == (Object)null)
			{
				return;
			}
			try
			{
				Rigidbody[] array3 = Il2CppArrayBase<Rigidbody>.op_Implicit(((Component)targetRig.physicsRig).GetComponentsInChildren<Rigidbody>());
				if (array3 == null || array3.Length == 0)
				{
					return;
				}
				for (int k = 0; k < 4; k++)
				{
					Vector3 val6 = new Vector3(Random.Range(-1f, 1f), Random.Range(0.15f, 0.85f), Random.Range(-1f, 1f));
					Vector3 normalized = ((Vector3)(ref val6)).normalized;
					float num2 = ((k == 3) ? 1f : 0.45f);
					Vector3 val7 = baseImpulse * num2 + normalized * 11f;
					Rigidbody[] array4 = array3;
					foreach (Rigidbody val8 in array4)
					{
						if ((Object)(object)val8 != (Object)null && !val8.isKinematic)
						{
							val8.AddForce(val7, (ForceMode)2);
							val8.AddTorque(Random.insideUnitSphere * 16f, (ForceMode)2);
						}
					}
				}
			}
			catch
			{
			}
		}

		public static void ApplyFusionSyncedDamageAndLaunch(RigManager rig, Vector3 hitPos, Vector3 impulse, float damage, bool ragdoll)
		{
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: 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)
			//IL_008b: 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_0093: 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_00a8: Expected O, but got Unknown
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)rig == (Object)null)
			{
				return;
			}
			try
			{
				NetworkPlayer val = default(NetworkPlayer);
				if (NetworkInfo.HasServer && NetworkPlayerManager.TryGetPlayer(rig, ref val) && val != null && val.PlayerID != null)
				{
					TrySendLabFusionPlayerDamage(val.PlayerID.SmallID, damage, hitPos, impulse);
				}
			}
			catch
			{
			}
			try
			{
				if ((Object)(object)rig.health != (Object)null)
				{
					Attack val2 = new Attack
					{
						damage = damage,
						origin = hitPos,
						direction = ((Vector3)(ref impulse)).normalized,
						normal = -((Vector3)(ref impulse)).normalized,
						attackType = (AttackType)1
					};
					rig.health.OnReceivedDamage(val2, (BodyPart)0);
					rig.health.TAKEDAMAGE(damage);
				}
			}
			catch
			{
			}
			TriggerNoModPhysicalGlitchAndWorldFeedback(rig, hitPos, impulse);
			try
			{
				if (!((Object)(object)rig.physicsRig != (Object)null))
				{
					return;
				}
				if (ragdoll)
				{
					rig.physicsRig.RagdollRig();
				}
				Rigidbody[] array = Il2CppArrayBase<Rigidbody>.op_Implicit(((Component)rig.physicsRig).GetComponentsInChildren<Rigidbody>());
				Rigidbody[] array2 = array;
				foreach (Rigidbody val3 in array2)
				{
					if ((Object)(object)val3 != (Object)null && !val3.isKinematic)
					{
						val3.velocity = impulse;
						val3.AddForce(impulse, (ForceMode)2);
					}
				}
			}
			catch
			{
			}
		}

		private static void TrySendLabFusionPlayerDamage(byte targetSmallId, float damage, Vector3 hitPos, Vector3 impulse)
		{
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Expected O, but got Unknown
			try
			{
				Assembly assembly = typeof(NetworkPlayerManager).Assembly;
				Type type = assembly.GetType("LabFusion.Network.PlayerDamageSender") ?? assembly.GetType("LabFusion.Senders.PlayerDamageSender");
				if (type == null)
				{
					return;
				}
				MethodInfo[] methods = type.GetMethods(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
				foreach (MethodInfo methodInfo in methods)
				{
					if (methodInfo.Name.Contains("Damage"))
					{
						ParameterInfo[] parameters = methodInfo.GetParameters();
						if (parameters.Length == 2 && parameters[0].ParameterType == typeof(byte) && parameters[1].ParameterType == typeof(float))
						{
							methodInfo.Invoke(null, new object[2] { targetSmallId, damage });
							break;
						}
						if (parameters.Length == 3 && parameters[0].ParameterType == typeof(byte) && parameters[1].ParameterType == typeof(float))
						{
							object obj = (object)new Attack
							{
								damage = damage,
								origin = hitPos,
								direction = ((Vector3)(ref impulse)).normalized,
								normal = -((Vector3)(ref impulse)).normalized,
								attackType = (AttackType)1
							};
							methodInfo.Invoke(null, new object[3] { targetSmallId, damage, obj });
							break;
						}
					}
				}
			}
			catch
			{
			}
		}

		public static void ApplyMaxDamageAndFall(RigManager rig)
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			Vector3 hitPos = (((Object)(object)rig != (Object)null && (Object)(object)rig.physicsRig != (Object)null && (Object)(object)((Rig)rig.physicsRig).m_head != (Object)null) ? ((Rig)rig.physicsRig).m_head.position : Vector3.zero);
			ApplyFusionSyncedDamageAndLaunch(rig, hitPos, Vector3.up * 10f, 99999f, ragdoll: true);
		}

		private static void GenerateSynthAudioClips()
		{
			int num = 22050;
			int num2 = (int)((float)num * 0.35f);
			float[] array = new float[num2];
			for (int i = 0; i < num2; i++)
			{
				float num3 = (float)i / (float)num;
				float num4 = 1f - num3 / 0.35f;
				float num5 = Mathf.Lerp(1400f, 180f, num3 / 0.35f);
				float num6 = Mathf.Sin((float)Math.PI * 2f * num5 * num3) * 0.5f;
				float num7 = (Random.value * 2f - 1f) * 0.45f * ((i % 40 < 10) ? 1f : 0.2f);
				array[i] = (num6 + num7) * num4;
			}
			hackZapClip = AudioClip.Create("CapriZapSFX", num2, 1, num, false);
			hackZapClip.SetData(Il2CppStructArray<float>.op_Implicit(array), 0);
			int num8 = (int)((float)num * 1.1f);
			float[] array2 = new float[num8];
			float num9 = 0f;
			for (int j = 0; j < num8; j++)
			{
				float num10 = (float)j / (float)num;
				float num11 = Mathf.Clamp01(1f - num10 / 1.1f);
				if (j % 65 == 0)
				{
					num9 = ((Random.value > 0.5f) ? 0.6f : (-0.6f)) * Mathf.Sin(num10 * 950f);
				}
				float num12 = (Random.value * 2f - 1f) * 0.35f;
				array2[j] = (num9 + num12) * num11 * 0.8f;
			}
			glitchNoiseClip = AudioClip.Create("CapriGlitchSFX", num8, 1, num, false);
			glitchNoiseClip.SetData(Il2CppStructArray<float>.op_Implicit(array2), 0);
			int num13 = num;
			float[] array3 = new float[num13];
			for (int k = 0; k < num13; k++)
			{
				float num14 = (float)k / (float)num;
				float num15 = Mathf.Sin((float)Math.PI * 110f * num14) * 0.55f;
				float num16 = Mathf.Sin((float)Math.PI * 220f * num14) * 0.25f;
				float num17 = 0.75f + 0.25f * Mathf.Sin((float)Math.PI * 12f * num14);
				float num18 = (Random.value * 2f - 1f) * 0.08f;
				array3[k] = (num15 + num16 + num18) * num17;
			}
			vortexHumClip = AudioClip.Create("CapriVortexHum", num13, 1, num, false);
			vortexHumClip.SetData(Il2CppStructArray<float>.op_Implicit(array3), 0);
			int num19 = (int)((float)num * 0.55f);
			float[] array4 = new float[num19];
			for (int l = 0; l < num19; l++)
			{
				float num20 = (float)l / (float)num;
				float num21 = Mathf.Pow(1f - num20 / 0.55f, 1.5f);
				float num22 = Mathf.Lerp(420f, 38f, Mathf.Pow(num20 / 0.55f, 0.5f));
				float num23 = Mathf.Sin((float)Math.PI * 2f * num22 * num20) * 0.7f;
				float num24 = (Random.value * 2f - 1f) * 0.45f * Mathf.Clamp01(1f - num20 * 4f);
				array4[l] = (num23 + num24) * num21;
			}
			empBlastClip = AudioClip.Create("CapriEmpBlast", num19, 1, num, false);
			empBlastClip.SetData(Il2CppStructArray<float>.op_Implicit(array4), 0);
		}

		public static void PlayCyberSound(AudioClip clip, Vector3 position, float volume)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Expected O, but got Unknown
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			if (!SoundEnabled || (Object)(object)clip == (Object)null)
			{
				return;
			}
			try
			{
				GameObject val = new GameObject("CapriAudioSFX");
				val.transform.position = position;
				AudioSource val2 = ((Il2CppObjectBase)val.AddComponent(Il2CppType.From(typeof(AudioSource)))).Cast<AudioSource>();
				val2.clip = clip;
				val2.volume = volume;
				val2.spatialBlend = 0.75f;
				val2.Play();
				Object.Destroy((Object)(object)val, clip.length + 0.1f);
			}
			catch
			{
			}
		}

		private static void ToggleMiniHud(bool show)
		{
			if (show)
			{
				if ((Object)(object)miniHudObj == (Object)null)
				{
					CreatePixelCapriHud();
				}
				miniHudObj.SetActive(true);
			}
			else if ((Object)(object)miniHudObj != (Object)null)
			{
				miniHudObj.SetActive(false);
			}
		}

		private static void UpdateMiniHudTransform()
		{
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)miniHudObj == (Object)null || !miniHudObj.activeSelf || (Object)(object)Player.LeftHand == (Object)null)
			{
				return;
			}
			Transform transform = ((Component)Player.LeftHand).transform;
			miniHudObj.transform.position = transform.position + transform.up * 0.11f + transform.right * -0.04f;
			miniHudObj.transform.rotation = transform.rotation * Quaternion.Euler(45f, 180f, 0f);
			if ((Object)(object)capriAvatarRoot != (Object)null)
			{
				float num = Mathf.Sin(Time.time * ((capriSpeakTimer > 0f) ? 28f : 4f)) * ((capriSpeakTimer > 0f) ? 3.5f : 1.2f);
				capriAvatarRoot.anchoredPosition = new Vector2(-58f, num);
				if (capriSpeakTimer > 0f)
				{
					capriSpeakTimer -= Time.deltaTime;
				}
			}
		}

		private static void TriggerCapriReaction(string msg)
		{
			capriSpeakTimer = 1.5f;
			UpdateHudText(msg);
		}

		private static void UpdateHudText(string text)
		{
			if ((Object)(object)hudStatusText != (Object)null)
			{
				hudStatusText.text = "CAPRI // ENGRAM v1.9.0\n> " + text;
			}
		}

		private static void CreatePixelCapriHud()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Expected O, but got Unknown
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Expected O, but got Unknown
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Expected O, but got Unknown
			//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0206: 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_0252: Unknown result type (might be due to invalid IL or missing references)
			//IL_0278: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fe: 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_035e: 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_03a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03af: Expected O, but got Unknown
			//IL_0416: Unknown result type (might be due to invalid IL or missing references)
			//IL_0466: Unknown result type (might be due to invalid IL or missing references)
			//IL_047d: Unknown result type (might be due to invalid IL or missing references)
			EnsureSharedResources();
			miniHudObj = new GameObject("CapriPixelWristHUD");
			Canvas val = ((Il2CppObjectBase)miniHudObj.AddComponent(Il2CppType.From(typeof(Canvas)))).Cast<Canvas>();
			val.renderMode = (RenderMode)2;
			RectTransform val2 = ((Il2CppObjectBase)miniHudObj.GetComponent(Il2CppType.From(typeof(RectTransform)))).Cast<RectTransform>();
			val2.sizeDelta = new Vector2(220f, 95f);
			miniHudObj.transform.localScale = Vector3.one * 0.0011f;
			GameObject val3 = new GameObject("HudBackground");
			val3.transform.SetParent(miniHudObj.transform, false);
			Image val4 = ((Il2CppObjectBase)val3.AddComponent(Il2CppType.From(typeof(Image)))).Cast<Image>();
			((Graphic)val4).color = new Color(0.03f, 0.03f, 0.05f, 0.88f);
			RectTransform val5 = ((Il2CppObjectBase)val3.GetComponent(Il2CppType.From(typeof(RectTransform)))).Cast<RectTransform>();
			val5.sizeDelta = new Vector2(220f, 95f);
			AddPixelBlock(val3.transform, 0f, 45f, 220f, 3f, CapriPink);
			AddPixelBlock(val3.transform, 0f, -45f, 220f, 3f, CapriGreen);
			GameObject val6 = new GameObject("PixelCapriPortrait");
			val6.transform.SetParent(val3.transform, false);
			capriAvatarRoot = ((Il2CppObjectBase)val6.AddComponent(Il2CppType.From(typeof(RectTransform)))).Cast<RectTransform>();
			capriAvatarRoot.anchoredPosition = new Vector2(-58f, 0f);
			AddPixelBlock(val6.transform, 0f, 20f, 52f, 16f, CapriPink);
			AddPixelBlock(val6.transform, -22f, -2f, 12f, 38f, CapriPink);
			AddPixelBlock(val6.transform, 22f, -2f, 12f, 38f, CapriPink);
			AddPixelBlock(val6.transform, -14f, 22f, 4f, 4f, Color.white);
			AddPixelBlock(val6.transform, 16f, 18f, 4f, 4f, Color.white);
			AddPixelBlock(val6.transform, 0f, 4f, 34f, 24f, new Color(1f, 0.88f, 0.85f, 1f));
			AddPixelBlock(val6.transform, -8f, 7f, 6f, 6f, CapriBlue);
			AddPixelBlock(val6.transform, 8f, 7f, 6f, 6f, CapriBlue);
			AddPixelBlock(val6.transform, 0f, -8f, 36f, 16f, CapriGreen);
			AddPixelBlock(val6.transform, -10f, -8f, 5f, 5f, new Color(0.05f, 0.1f, 0.05f, 1f));
			AddPixelBlock(val6.transform, 10f, -8f, 5f, 5f, new Color(0.05f, 0.1f, 0.05f, 1f));
			GameObject val7 = new GameObject("HudStatusText");
			val7.transform.SetParent(val3.transform, false);
			hudStatusText = ((Il2CppObjectBase)val7.AddComponent(Il2CppType.From(typeof(Text)))).Cast<Text>();
			if ((Object)(object)cachedUiFont != (Object)null)
			{
				hudStatusText.font = cachedUiFont;
			}
			hudStatusText.fontSize = 14;
			((Graphic)hudStatusText).color = CapriGreen;
			hudStatusText.alignment = (TextAnchor)3;
			hudStatusText.text = "CAPRI // ENGRAM v1.9.0\n> SYS: ARMED";
			RectTransform val8 = ((Il2CppObjectBase)val7.GetComponent(Il2CppType.From(typeof(RectTransform)))).Cast<RectTransform>();
			val8.anchoredPosition = new Vector2(36f, 0f);
			val8.sizeDelta = new Vector2(130f, 70f);
			Object.DontDestroyOnLoad((Object)(object)miniHudObj);
		}

		private static void AddPixelBlock(Transform parent, float x, float y, float w, float h, Color color)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject("Px");
			val.transform.SetParent(parent, false);
			Image val2 = ((Il2CppObjectBase)val.AddComponent(Il2CppType.From(typeof(Image)))).Cast<Image>();
			((Graphic)val2).color = color;
			RectTransform val3 = ((Il2CppObjectBase)val.GetComponent(Il2CppType.From(typeof(RectTransform)))).Cast<RectTransform>();
			val3.anchoredPosition = new Vector2(x, y);
			val3.sizeDelta = new Vector2(w, h);
		}

		public static void TriggerGlitchEffect(float duration = 3.5f)
		{
			glitchTimer = duration;
			if ((Object)(object)glitchCanvas == (Object)null)
			{
				CreateGlitchOverlay();
			}
			if ((Object)(object)glitchTextArtObj != (Object)null)
			{
				glitchTextArtObj.SetActive(ShowTextArtInHud);
			}
			glitchCanvas.SetActive(true);
			UpdateGlitchPose();
		}

		private static void UpdateGlitchPose()
		{
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)glitchCanvas == (Object)null) && !((Object)(object)Player.PhysicsRig == (Object)null) && !((Object)(object)((Rig)Player.PhysicsRig).m_head == (Object)null))
			{
				Transform head = ((Rig)Player.PhysicsRig).m_head;
				glitchCanvas.transform.position = head.position + head.forward * 0.65f;
				glitchCanvas.transform.rotation = head.rotation;
				if ((Object)(object)glitchCanvasComp != (Object)null && (Object)(object)glitchCanvasComp.worldCamera == (Object)null && (Object)(object)Camera.main != (Object)null)
				{
					glitchCanvasComp.worldCamera = Camera.main;
				}
			}
		}

		private void UpdateGlitchScreen()
		{
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			if (glitchTimer <= 0f)
			{
				return;
			}
			glitchTimer -= Time.deltaTime;
			UpdateGlitchPose();
			if ((Object)(object)glitchPortraitRoot != (Object)null)
			{
				float num = Random.Range(-7f, 7f);
				float num2 = 18f + Random.Range(-5f, 5f);
				glitchPortraitRoot.anchoredPosition = new Vector2(num, num2);
			}
			if ((Object)(object)glitchBarsContainer != (Object)null)
			{
				for (int i = 0; i < ((Transform)glitchBarsContainer).childCount; i++)
				{
					RectTransform val = ((Il2CppObjectBase)((Component)((Transform)glitchBarsContainer).GetChild(i)).GetComponent(Il2CppType.From(typeof(RectTransform)))).Cast<RectTransform>();
					float num3 = Random.Range(-155f, 155f);
					float num4 = Random.Range(-35f, 35f);
					float num5 = Random.Range(240f, 410f);
					float num6 = Random.Range(4f, 18f);
					val.anchoredPosition = new Vector2(num4, num3);
					val.sizeDelta = new Vector2(num5, num6);
				}
			}
			if (glitchTimer <= 0f && (Object)(object)glitchCanvas != (Object)null)
			{
				glitchCanvas.SetActive(false);
			}
		}

		private static void CreateGlitchOverlay()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Expected O, but got Unknown
			//IL_00a0: 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_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Expected O, but got Unknown
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Expected O, but got Unknown
			//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0216: Unknown result type (might be due to invalid IL or missing references)
			//IL_021d: Expected O, but got Unknown
			//IL_0307: Unknown result type (might be due to invalid IL or missing references)
			//IL_0311: Expected O, but got Unknown
			//IL_027f: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0437: Unknown result type (might be due to invalid IL or missing references)
			//IL_043e: Expected O, but got Unknown
			//IL_0481: Unknown result type (might be due to invalid IL or missing references)
			//IL_04dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0500: Unknown result type (might be due to invalid IL or missing references)
			//IL_0523: Unknown result type (might be due to invalid IL or missing references)
			//IL_0549: Unknown result type (might be due to invalid IL or missing references)
			//IL_056c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0592: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05de: Unknown result type (might be due to invalid IL or missing references)
			//IL_0604: Unknown result type (might be due to invalid IL or missing references)
			//IL_062a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0650: Unknown result type (might be due to invalid IL or missing references)
			//IL_0676: Unknown result type (might be due to invalid IL or missing references)
			//IL_069c: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_070e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0734: Unknown result type (might be due to invalid IL or missing references)
			//IL_075a: 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_07a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0815: Unknown result type (might be due to invalid IL or missing references)
			//IL_083b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0861: Unknown result type (might be due to invalid IL or missing references)
			//IL_0887: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_08e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_090d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0930: Unknown result type (might be due to invalid IL or missing references)
			//IL_0956: Unknown result type (might be due to invalid IL or missing references)
			//IL_0979: Unknown result type (might be due to invalid IL or missing references)
			//IL_0989: Unknown result type (might be due to invalid IL or missing references)
			//IL_0990: Expected O, but got Unknown
			//IL_09d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a0b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a22: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a32: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a39: Expected O, but got Unknown
			//IL_02e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02be: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a9e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ae8: Unknown result type (might be due to invalid IL or missing references)
			EnsureSharedResources();
			glitchCanvas = new GameObject("CapriVRGlitchOverlay");
			glitchCanvasComp = ((Il2CppObjectBase)glitchCanvas.AddComponent(Il2CppType.From(typeof(Canvas)))).Cast<Canvas>();
			glitchCanvasComp.renderMode = (RenderMode)2;
			glitchCanvasComp.sortingOrder = 999;
			if ((Object)(object)Camera.main != (Object)null)
			{
				glitchCanvasComp.worldCamera = Camera.main;
			}
			RectTransform val = ((Il2CppObjectBase)glitchCanvas.GetComponent(Il2CppType.From(typeof(RectTransform)))).Cast<RectTransform>();
			val.sizeDelta = new Vector2(420f, 340f);
			glitchCanvas.transform.localScale = Vector3.one * 0.00145f;
			GameObject val2 = new GameObject("GlitchBackdrop");
			val2.transform.SetParent(glitchCanvas.transform, false);
			Image val3 = ((Il2CppObjectBase)val2.AddComponent(Il2CppType.From(typeof(Image)))).Cast<Image>();
			((Graphic)val3).color = new Color(0.02f, 0.01f, 0.03f, 0.56f);
			RectTransform val4 = ((Il2CppObjectBase)val2.GetComponent(Il2CppType.From(typeof(RectTransform)))).Cast<RectTransform>();
			val4.sizeDelta = new Vector2(420f, 340f);
			AddPixelBlock(val2.transform, 0f, 166f, 420f, 6f, CapriPink);
			AddPixelBlock(val2.transform, 0f, -166f, 420f, 6f, CapriGreen);
			GameObject val5 = new GameObject("GlitchBarsContainer");
			val5.transform.SetParent(val2.transform, false);
			glitchBarsContainer = ((Il2CppObjectBase)val5.AddComponent(Il2CppType.From(typeof(RectTransform)))).Cast<RectTransform>();
			glitchBarsContainer.sizeDelta = new Vector2(420f, 340f);
			for (int i = 0; i < 14; i++)
			{
				GameObject val6 = new GameObject("CapriBar_" + i);
				val6.transform.SetParent((Transform)(object)glitchBarsContainer, false);
				Image val7 = ((Il2CppObjectBase)val6.AddComponent(Il2CppType.From(typeof(Image)))).Cast<Image>();
				if (i % 3 == 0)
				{
					((Graphic)val7).color = new Color(CapriPink.r, CapriPink.g, CapriPink.b, 0.55f);
				}
				else if (i % 3 == 1)
				{
					((Graphic)val7).color = new Color(CapriGreen.r, CapriGreen.g, CapriGreen.b, 0.5f);
				}
				else
				{
					((Graphic)val7).color = new Color(0.01f, 0.01f, 0.02f, 0.78f);
				}
			}
			glitchTextArtObj = new GameObject("CapriBrailleTextArt");
			glitchTextArtObj.transform.SetParent(val2.transform, false);
			Text val8 = ((Il2CppObjectBase)glitchTextArtObj.AddComponent(Il2CppType.From(typeof(Text)))).Cast<Text>();
			if ((Object)(object)cachedUiFont != (Object)null)
			{
				val8.font = cachedUiFont;
			}
			val8.fontSize = 6;
			val8.lineSpacing = 0.75f;
			((Graphic)val8).color = new Color(CapriPink.r, CapriPink.g, CapriPink.b, 0.42f);
			val8.alignment = (TextAnchor)4;
			val8.horizontalOverflow = (HorizontalWrapMode)1;
			val8.verticalOverflow = (VerticalWrapMode)1;
			val8.text = "⣿⣿⠛⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣾⣿⣿⢽⣾⣿⣿⣷⣷⣿⣥⣿⣿⣧⣹⡕⣰⣿⣧⣮⣬⣔⣃⣀⣀⠀⡀⠀⠁⠃⠀⠀⠀⠀⠘⠎⠀⠠⠀⠀⠀⠀⠀⡄⠈⡄⢀⡀⠀⠀⠀⠀⠀\n⣿⣿⣿⣿⣿⣿⣯⣽⣿⡿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿⣿⣷⣯⣿⣿⣾⢻⣵⢆⣮⠊⢜⡈⠀⣢⠈⣀⡀⠄⡀⠀⠀⢿⢻⣦⡨⠨⢍⠡⢈⣁⠡⠀⠡\n⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⢿⣿⣯⣇⣠⣿⣿⣿⣿⣿⣿⣿⣿⣿⢯⣿⣿⣯⣿⣿⣿⣿⣽⣿⣿⣿⣿⡿⣛⢻⡏⣟⣷⢧⣤⣜⣾⣿⣷⠺⡖⡀⠀⢨⣿⠛⢶⢦⣠⣆⢙⣿⢟⣴⠄\n⣿⣿⣿⣿⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⢿⡿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣿⣷⣽⣷⣿⣿⣿⣧⣿⣯⣷⣿⣿⣿⣟⣯⡬⠋⠉⣷⣴⣞⣿⣲⣟⣾⢿⣤⡴⣴⣆⢣\n⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣿⣿⣿⣯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣾⣿⣿⣿⣿⣯⣿⣿⡿⣿⣿⣟⣋⣿⣷⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣽⠷⣿⣿⡢\n⣿⣯⣿⣿⣿⣿⣿⣿⣿⣿⣾⣿⣿⣿⣿⣽⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣽⣿⣿⣿⣿⣿⣿⢿⣿⣿⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⡉⣻⣿⣿⣿⣿⣿⣿⣿⣿⣾\n⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣗⣿⣿⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣻⣽⣿⣿⣿⣿⣿⣾⣿⣿⢿⣿⣽⣿⣽⣿⣿⣿⣿⣿⡿⠟\n⣿⣿⣿⣿⣿⣿⣿⣿⣽⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠛⠋⠁⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⡟⢟⣋⣠⣤⣶⣾⠀⢸⣿⣿⣿⣿⣿⣻⣿⣝⣾⣯⣿⣿⣿⣿⣻⣿⣿⣿⣿⣿⣿⣿\n⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣻⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⢿⠿⠿⠿⣿⣿⣿⠿⠿⠟⠋⠉⢀⣀⣀⠶⠿⠿⣿⣿⣿⡇⠀⢸⣿⣿⣿⣿⣿⣿⣿⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣿⡭⣶⣶⣦⣿⣿⣤⠀⠀⠀⠀⠀⠀⢔⣵⣿⣿⣿⣆⢹⣿⣇⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⢹⡏⢰⣿⣾⣝⣆⠀⠀⠀⠀⢰⣿⡿⠉⢻⣿⢇⠿⠏⠉⠁⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡻⣾⣿⣉⢛⣿⡆⠀⠀⠀⠸⠮⠛⢛⣋⣬⣥⣴⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⣿⣿⣿⣷⣥⣬⣭⣭⣁⣈⣀⣀⣠⣴⣶⣿⣿⡿⣿⣿⣿⣿⡿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣽⣿⣿⣿⣿⣿⣿⣿⣿\n⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⣿⣿⣿⣿⣿⣿⣿⣿⠟⠛⠛⠹⢁⣾⣿⣿⣿⣿⣿⣿⠟⠛⠁⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n⠀⠀⠹⣿⣿⣿⣿⣿⣿⣿⣯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣏⣿⡿⠹⣿⣿⣿⣿⠀⠹⢿⣿⣿⣿⣿⣿⣆⠀⠀⠀⢀⣾⣿⣿⣿⣿⡟⠉⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⢻⣿⣿⣿⣿⣿⠉⠻\n⠀⠀⠀⠈⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠈⢿⣿⡿⠋⢸⣿⡿⠁⢀⣾⣿⠟⠋⠀⠀⠀⠈⠛⠻⠿⣿⣿⣷⣄⣤⣾⣿⣿⣿⣿⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠛⠻⣿⣿⣿⣿⣿⣿⠿⠛⠀⠀\n⠀⠀⠀⣾⣿⣿⣿⣿⣿⣿⣿⣷⠁⠀⠀⠈⣿⡇⠀⢸⡟⠀⢠⣿⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⢟⣿⣿⣿⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣻⣿⣿⡄⠀⠀⠀\n⠀⢠⣾⣿⣿⡿⣿⣿⣿⣿⣿⡟⠀⠀⠀⠀⠘⡇⠀⠸⠁⠀⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⣀⣤⣶⡿⣻⡆⠀⠀⠀⠀⠀⠀⠀⡿⠙⣿⣿⣿⣿⣷⠀⠀⠀\n⢀⣿⡿⠛⠁⠀⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡼⢿⣿⣿⣯⣿⣿⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⡅⠀⠀⠀⠀⠀⡾⠀⠀⠘⠿⢿⣿⣿⡆⠀⠀\n⣿⠋⠀⠀⠀⢰⣿⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣀⣼⡟⣽⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣏⡀⠀⠀⠀⠀⠀⡆⠀⠀⠀⠩⣿⣿⣷⠀⠀\n⡿⠀⠀⠀⠀⣿⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢅⠀⠀⠀⠀⠀⠃⠀⠀⠀⠀⠘⢿⣿⡄⠀\n⠀⠀⠀⠀⠈⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣾⠀⠀⠀⠀⠀⠂⠀⠀⠀⠀⠀⠀⠹⣇⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀";
			RectTransform val9 = ((Il2CppObjectBase)glitchTextArtObj.GetComponent(Il2CppType.From(typeof(RectTransform)))).Cast<RectTransform>();
			val9.anchoredPosition = new Vector2(0f, 16f);
			val9.sizeDelta = new Vector2(410f, 260f);
			glitchTextArtObj.SetActive(ShowTextArtInHud);
			GameObject val10 = new GameObject("CapriLargePixelPortrait");
			val10.transform.SetParent(val2.transform, false);
			glitchPortraitRoot = ((Il2CppObjectBase)val10.AddComponent(Il2CppType.From(typeof(RectTransform)))).Cast<RectTransform>();
			glitchPortraitRoot.anchoredPosition = new Vector2(0f, 18f);
			Color color = default(Color);
			((Color)(ref color))..ctor(0.04f, 0.04f, 0.06f, 0.98f);
			Color color2 = default(Color);
			((Color)(ref color2))..ctor(1f, 0.88f, 0.85f, 1f);
			AddPixelBlock(val10.transform, 0f, 10f, 148f, 148f, color);
			AddPixelBlock(val10.transform, -54f, 94f, 26f, 32f, color);
			AddPixelBlock(val10.transform, -54f, 114f, 14f, 16f, CapriPink);
			AddPixelBlock(val10.transform, 54f, 94f, 26f, 32f, color);
			AddPixelBlock(val10.transform, 54f, 114f, 14f, 16f, CapriPink);
			AddPixelBlock(val10.transform, 0f, 58f, 136f, 44f, CapriPink);
			AddPixelBlock(val10.transform, -30f, 34f, 32f, 22f, CapriPink);
			AddPixelBlock(val10.transform, 26f, 36f, 36f, 20f, CapriPink);
			AddPixelBlock(val10.transform, -58f, -6f, 30f, 108f, CapriPink);
			AddPixelBlock(val10.transform, 58f, -6f, 30f, 108f, CapriPink);
			AddPixelBlock(val10.transform, -36f, 64f, 10f, 10f, Color.white);
			AddPixelBlock(val10.transform, -36f, 64f, 18f, 4f, Color.white);
			AddPixelBlock(val10.transform, -36f, 64f, 4f, 18f, Color.white);
			AddPixelBlock(val10.transform, 38f, 54f, 8f, 8f, Color.white);
			AddPixelBlock(val10.transform, 38f, 54f, 14f, 3f, Color.white);
			AddPixelBlock(val10.transform, 38f, 54f, 3f, 14f, Color.white);
			AddPixelBlock(val10.transform, -60f, 18f, 7f, 7f, Color.white);
			AddPixelBlock(val10.transform, 60f, 8f, 7f, 7f, Color.white);
			AddPixelBlock(val10.transform, 0f, 8f, 88f, 68f, color2);
			AddPixelBlock(val10.transform, -22f, 20f, 20f, 16f, CapriBlue);
			AddPixelBlock(val10.transform, -25f, 23f, 6f, 6f, Color.white);
			AddPixelBlock(val10.transform, 22f, 20f, 20f, 16f, CapriBlue);
			AddPixelBlock(val10.transform, 19f, 23f, 6f, 6f, Color.white);
			AddPixelBlock(val10.transform, 0f, -2f, 42f, 8f, Color.white);
			AddPixelBlock(val10.transform, -22f, 3f, 8f, 8f, Color.white);
			AddPixelBlock(val10.transform, 22f, 3f, 8f, 8f, Color.white);
			AddPixelBlock(val10.transform, 0f, -24f, 94f, 36f, CapriGreen);
			AddPixelBlock(val10.transform, 0f, -14f, 68f, 6f, new Color(0.02f, 0.25f, 0.08f, 1f));
			AddPixelBlock(val10.transform, -30f, -25f, 18f, 18f, color);
			AddPixelBlock(val10.transform, -30f, -25f, 8f, 8f, CapriPink);
			AddPixelBlock(val10.transform, 30f, -25f, 18f, 18f, color);
			AddPixelBlock(val10.transform, 30f, -25f, 8f, 8f, CapriPink);
			GameObject val11 = new GameObject("SystemOverloadBg");
			val11.transform.SetParent(val2.transform, false);
			Image val12 = ((Il2CppObjectBase)val11.AddComponent(Il2CppType.From(typeof(Image)))).Cast<Image>();
			((Graphic)val12).color = new Color(0.02f, 0.02f, 0.03f, 0.92f);
			RectTransform val13 = ((Il2CppObjectBase)val11.GetComponent(Il2CppType.From(typeof(RectTransform)))).Cast<RectTransform>();
			val13.anchoredPosition = new Vector2(0f, -124f);
			val13.sizeDelta = new Vector2(390f, 42f);
			GameObject val14 = new GameObject("SystemOverloadText");
			val14.transform.SetParent(val11.transform, false);
			Text val15 = ((Il2CppObjectBase)val14.AddComponent(Il2CppType.From(typeof(Text)))).Cast<Text>();
			if ((Object)(object)cachedUiFont != (Object)null)
			{
				val15.font = cachedUiFont;
			}
			val15.fontSize = 22;
			val15.fontStyle = (FontStyle)1;
			((Graphic)val15).color = CapriGreen;
			val15.alignment = (TextAnchor)4;
			val15.text = "SYSTEM OVERLOAD // CAPRI";
			RectTransform val16 = ((Il2CppObjectBase)val14.GetComponent(Il2CppType.From(typeof(RectTransform)))).Cast<RectTransform>();
			val16.sizeDelta = new Vector2(385f, 40f);
			Object.DontDestroyOnLoad((Object)(object)glitchCanvas);
		}

		public static void SpawnLightningBulletStormAndMiniBlast(Vector3 origin, Transform targetHead, Vector3 blastDir)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or