Decompiled source of AbsurdKillMod v1.5.1

AbsurdKillMod/AbsurdKillMod.dll

Decompiled a month ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization.Formatters.Binary;
using System.Runtime.Versioning;
using AbsurdKillMod.Classes;
using AbsurdKillMod.Systems;
using AbsurdKillMod.Systems.Behaviours;
using BepInEx;
using BepInEx.Logging;
using Configgy;
using HarmonyLib;
using TMPro;
using ULTRAKILL.Cheats;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement.AsyncOperations;
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: AssemblyTitle("AbsurdKillMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AbsurdKillMod")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("421c563f-c83f-4906-a1d2-50145829448d")]
[assembly: AssemblyFileVersion("1.5.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.5.0.0")]
namespace AbsurdKillMod
{
	public class AbsurdKill_ObjectPlugin : MonoBehaviour
	{
		public enum ModEnemyRelationship
		{
			Unknown,
			HostileToAllEmemies,
			FriendlyToAllEnemies
		}

		public ModEnemyRelationship My_modEnemyRs = ModEnemyRelationship.Unknown;

		public bool dontApplySpawnPatches = false;

		public bool dontSpawnSurprise = false;

		public bool forceKill = false;
	}
	[BepInPlugin("ultrakill.exmagikguy.absurdThingMod", "ABSURDKILL", "1.5.0")]
	public class AK_Controller : BaseUnityPlugin
	{
		public static ConfigBuilder ConfigMenu;

		public static GameObject prefab_explosion = null;

		public static GameObject prefab_nuke = null;

		public static GameObject prefab_grenade = null;

		public static GameObject prefab_coin = null;

		public static GameObject prefab_rocket = null;

		public static GameObject prefab_minosPrime = null;

		public static GameObject prefab_blackhole = null;

		public static Dictionary<string, AudioClip> audioStore = new Dictionary<string, AudioClip>();

		[Configgable("", "Enable Random Events", 0, "The best part of the mod, enable it or i will eat you.")]
		public static bool chaos = true;

		[Configgable("", "Event Chance", 1, "Chance of an event occuring, you can't put it on zero, lil' bro.")]
		[Range(1f, 100f)]
		public static int chaosChance = 10;

		[Configgable("", "Coin Price", 2, "The price of a marksman coin.")]
		[Range(100f, 10000f)]
		public static int coinsWorth = 500;

		[Configgable("", "Leak Personal Data", 3, "Turning this off will pervent the mod from leaking your personal data. Disable it if you're a streamer!")]
		public static bool allowLeakingData = true;

		[Configgable("Random Events", "Banana Peel", 0, "V1 can slip on a banana peel.")]
		public static bool Event_BananaPeel = true;

		[Configgable("Random Events", "Twist Villan", 1, "Shows, that this one filth was hell itself this whole time.")]
		public static bool Event_PlotTwist = true;

		[Configgable("Random Events", "Pokemonization", 2, "Some enemies might want to fight on the side of a stylish robot.")]
		public static bool Event_EnemyCharm = true;

		[Configgable("Random Events", "Neculear War", 3, "Humans didn't end the war, they continued fighting in hell, as husks.")]
		public static bool Event_NeculearWar = true;

		[Configgable("Random Events", "Generous Donation", 4, "I'm MrBeast and i will going to hell, to donate 3000000 points to every machine!")]
		public static bool Event_HereComesTheMoney = true;

		[Configgable("Random Events", "Diddy Party", 5, "Every enemy gets oiled up without thier approval, don't laugh, you do as well.")]
		public static bool Event_DiddyParty = true;

		[Configgable("Random Events", "Airstrike", 6, "A strike has just aired.")]
		public static bool Event_Airedstrike = true;

		[Configgable("Random Events", "Weapon Roulette", 7, "C'mon it's good :D")]
		public static bool Event_WeaponSwitchSpam = true;

		[Configgable("Random Events", "Clear Assist", 8, "I will kill those guys for you.")]
		public static bool Event_BrothaHelp = true;

		[Configgable("Random Events", "ULTRAHEAL", 9, "2000001 health!!!.")]
		public static bool Event_MoreBlood = true;

		[Configgable("Random Events", "Blackhole", 10, "It's too slow to do anything, right?")]
		public static bool Event_BlackholeFromHole = true;

		[Configgable("Random Events", "D10 Event", 11, "All enemies downgrade.")]
		public static bool Event_DTenLol = true;

		[Configgable("Random Events", "Reverse D10", 12, "All enemies evolve.")]
		public static bool Event_ReverseDTen = true;

		[Configgable("Random Events", "Gutterman Airdrop", 13, "Somebody airdroped you a Gutterman!")]
		public static bool Event_MailMissile = true;

		[Configgable("Random Events", "Talk", 14, null)]
		public static bool Event_Talk = true;

		[Configgable("Random Events/Nextbot Summon", "Enabled", 0, null)]
		public static bool Event_NextbotSpawn = true;

		[Configgable("Random Events", "Cave Sound Effect", 15, null)]
		public static bool Event_ScaryCaveSFX = true;

		[Configgable("Extras", "Shop keybind", 0, "The key, that makes you buy things.")]
		public static ConfigKeybind Extra_shopKey = new ConfigKeybind((KeyCode)112);

		[Configgable("Extras", "Current Personalization (DON'T CHANGE)", 2, "Shows your current personalization value, do not change it, changing it does not affect your actual personalization value, use \"Reroll Personalization\" to change your real value.")]
		public static ConfigInputField<int> displayPersonalCode = new ConfigInputField<int>(100000000, (Func<int, bool>)null, (Func<string, ValueTuple<bool, int>>)null);

		[Configgable("Extras", "Reroll Personalization", 1, "Personalization is a 9-digit number, that decides which unique effects you will have in levels. Press the button to reroll your personalization")]
		public static ConfigToggle Extra_rerollPersonaliz = new ConfigToggle(false);

		[Configgable("Extras/Personalization Easter Eggs", "READ INFO", 0, "Personalization Easter Eggs are special effects, that activate when your personalization value is withn a specific range. You can get hints on what personalization values you need through Random Events. Once you activate one, the info will show up here.")]
		public static bool Extra_EEinstructions = false;

		[Configgable("Extras/Personalization Easter Eggs", "Easter Egg 1", 1, null)]
		public static ConfigInputField<string> EE1_info = new ConfigInputField<string>("LOCKED", (Func<string, bool>)null, (Func<string, ValueTuple<bool, string>>)null);

		[Configgable("Patches & Mech", "Economics", 0, "Sparechange%.")]
		public static bool Patch_Money = false;

		[Configgable("Patches & Mech", "UltraScam", 1, "If ultrakill was made by EA.")]
		public static bool Patch_Capitalism = true;

		[Configgable("Patches & Mech", "[RELOAD] Railrevolvers", 2, "Revolvers shoot railcannon beams.")]
		public static bool Patch_Railrev = true;

		[Configgable("Patches & Mech", "Shotgun blasts", 3, "Shotguns create blastwaves.")]
		public static bool Patch_ShotgunAcc = true;

		[Configgable("Patches & Mech", "[RELOAD] Diddy nailguns", 4, "Nails are replaced with oil.")]
		public static bool Patch_Diddlernails = true;

		[Configgable("Patches & Mech", "[RELOAD] Wrong circles", 5, "Marksman throws cannonballs instead of coins.")]
		public static bool Patch_HeavyCoins = true;

		[Configgable("Patches & Mech", "Based Terminals", 6, "Terminals become based.")]
		public static bool Patch_TerminalBasity = true;

		[Configgable("Patches & Mech", "Kitten Boss Bars", 7, "The boss bar titles become written by discord kittens.")]
		public static bool Patch_BossBarKittens = true;

		[Configgable("Patches & Mech", "Gen Alpha Subtitles", 8, "Subtitles' language changes to Gen Alpha Slang.")]
		public static bool Patch_BrainrotSubtitles = true;

		[Configgable("Patches & Mech/Party Colors", "Party Text", 0, null)]
		public static bool Patch_PartyText = true;

		[Configgable("Patches & Mech/Party Colors", "Party UI", 1, null)]
		public static bool Patch_PartyUI = false;

		[Configgable("Patches & Mech/Party Colors", "Party Lighting", 2, null)]
		public static bool Patch_PartyLights = true;

		[Configgable("Patches & Mech/Party Colors", "Party Render", 3, null)]
		public static bool Patch_PartyRenderers = false;

		[Configgable("Personalized Effects", "Amount", 0, "Amount of personalized effects you will have in each level.")]
		[Range(1f, 100f)]
		public static int PeronlAmount = 5;

		[Configgable("Personalized Effects", "Enemy scales", 1, "Enemies spawn randomly scaled.")]
		public static bool Peronl_EnemySizes = true;

		[Configgable("Personalized Effects", "Random Enemy Strength", 2, "Enemies spawn with randomly scaled health.")]
		public static bool Peronl_EnemyWeakness = true;

		[Configgable("Personalized Effects", "Ballon Heads", 3, "Enemies spawn with big heads.")]
		public static bool Peronl_BallonHeads = true;

		[Configgable("Personalized Effects", "Surprise Prime", 4, "Enemies have a 5% to spawn Minos Prime on death.")]
		public static bool Peronl_EnemyMentos = true;

		[Configgable("Personalized Effects", "Natural Regeneration", 5, "V1 regenerates with time.")]
		public static bool Peronl_NaturalRegen = true;

		[Configgable("Personalized Effects/Growing Enemies", "Enabled", 0, "Enemies grow with time.")]
		public static bool Peronl_EnemyGrowth = true;

		[Configgable("Personalized Effects/Growing Enemies", "Growth Speed", 1, null)]
		[Range(1f, 5f)]
		public static int PeronlS_EGrowthSpeed = 1;

		[Configgable("Personalized Effects", "Rainbow Blood", 6, "No white color, freak.")]
		public static bool Peronl_RainbowBlood = true;

		[Configgable("Personalized Effects/Smart Virtues", "Enabled", 0, "Virtues become actually smart.")]
		public static bool Peronl_VirtueBrain = true;

		[Configgable("Personalized Effects/Smart Virtues", "IQ", 1, null)]
		[Range(100f, 400f)]
		public static int PeronlS_VirtueIQ = 100;

		[Configgable("Personalized Effects", "Drunkness", 7, "V1 shouldn't have drunk this much blood.")]
		public static bool Peronl_DrunkV1 = true;

		[Configgable("Personalized Effects", "Spain without A", 8, "Spin.")]
		public static bool Peronl_Spinny = true;

		[Configgable("Personalized Effects", "Wet floor", 9, "Should have played this level other time.")]
		public static bool Peronl_WetLevel = true;

		[Configgable("Personalized Effects/Twich Chat", "Enabled", 0, "V1 went live for the Terminals.")]
		public static bool Peronl_UltraTwichChat = true;

		[Configgable("Personalized Effects/Twich Chat", "Style per message", 1, null)]
		[Range(5f, 100f)]
		public static int PeronlS_ChatStyle = 5;

		[Configgable("Personalized Effects/Twich Chat", "Colored Names", 2, null)]
		public static bool PeronlS_ChatNameColors = true;

		[Configgable("Personalized Effects/Twich Chat", "Donations", 3, null)]
		public static bool PeronlS_ChatDonations = true;

		public static int dice1000 = 0;

		public static float allTimeInSec = 0f;

		public static float sceneTimeInSec = 0f;

		public static int[] lastSecLogs = new int[2];

		public static List<string> possibleEvents = new List<string>();

		public static NewMovement nmov;

		private GunControl gc;

		private string modPath = Path.Combine(Paths.PluginPath, "AbsurdKillMod");

		private bool postBanana = false;

		private bool[] twistVillanGone = new bool[2] { false, true };

		private bool sceneHasMusic = true;

		private float loop_musicSec = 0f;

		private float loop_musicLen = 0f;

		private bool loop_musicActi = false;

		private AudioClip loop_clip = null;

		private Vector3 nukePosition = Vector3.zero;

		private float bombingTime = 0f;

		public static bool collectedCoinThisFrame = false;

		private float[] PreviousMovement = new float[2];

		private float[] LisenceTimes = new float[3] { 240f, 270f, 300f };

		private bool[] LisenceWarned = new bool[3];

		private bool[] LisenceExpire = new bool[3];

		private string[] LisenceName = new string[3] { "DASHING", "JUMPING", "WALKING" };

		private int[] LisenceBackups = new int[3];

		private string currentProductName = "";

		private int currentProductPrice = 0;

		private List<string> ownedProducts = new List<string>();

		private int weaponSwitches = 0;

		private Harmony harmony;

		private Dictionary<EnemyType, GameObject> enemyGrades = new Dictionary<EnemyType, GameObject>
		{
			{
				(EnemyType)23,
				null
			},
			{
				(EnemyType)21,
				null
			},
			{
				(EnemyType)12,
				null
			},
			{
				(EnemyType)36,
				null
			},
			{
				(EnemyType)3,
				null
			},
			{
				(EnemyType)13,
				null
			},
			{
				(EnemyType)14,
				null
			},
			{
				(EnemyType)1,
				null
			},
			{
				(EnemyType)15,
				null
			},
			{
				(EnemyType)31,
				null
			},
			{
				(EnemyType)6,
				null
			},
			{
				(EnemyType)20,
				null
			},
			{
				(EnemyType)24,
				null
			},
			{
				(EnemyType)4,
				null
			},
			{
				(EnemyType)9,
				null
			},
			{
				(EnemyType)0,
				null
			},
			{
				(EnemyType)33,
				null
			},
			{
				(EnemyType)34,
				null
			},
			{
				(EnemyType)5,
				null
			},
			{
				(EnemyType)2,
				null
			},
			{
				(EnemyType)8,
				null
			},
			{
				(EnemyType)25,
				null
			},
			{
				(EnemyType)37,
				null
			}
		};

		private Dictionary<int, EnemyType> enemyGradeNums = new Dictionary<int, EnemyType>
		{
			{
				0,
				(EnemyType)23
			},
			{
				1,
				(EnemyType)21
			},
			{
				2,
				(EnemyType)12
			},
			{
				3,
				(EnemyType)36
			},
			{
				4,
				(EnemyType)3
			},
			{
				5,
				(EnemyType)13
			},
			{
				6,
				(EnemyType)14
			},
			{
				7,
				(EnemyType)1
			},
			{
				8,
				(EnemyType)15
			},
			{
				9,
				(EnemyType)31
			},
			{
				10,
				(EnemyType)6
			},
			{
				11,
				(EnemyType)20
			},
			{
				12,
				(EnemyType)24
			},
			{
				13,
				(EnemyType)4
			},
			{
				14,
				(EnemyType)9
			},
			{
				15,
				(EnemyType)0
			},
			{
				16,
				(EnemyType)33
			},
			{
				17,
				(EnemyType)34
			},
			{
				18,
				(EnemyType)5
			},
			{
				19,
				(EnemyType)2
			},
			{
				20,
				(EnemyType)8
			},
			{
				21,
				(EnemyType)25
			},
			{
				22,
				(EnemyType)37
			}
		};

		public static Dictionary<string, GameObject> prefabDict = new Dictionary<string, GameObject>
		{
			{ "Cannonball", null },
			{ "Diddy Droplet", null },
			{ "Revolver Beam", null },
			{ "Revolver Beam Alt", null },
			{ "Nail", null },
			{ "Railcannon Beam", null },
			{ "Blastwave", null },
			{ "GuttermanAirdrop", null }
		};

		private bool gotOriginalWeaponProjes = false;

		private float regenTime = 0f;

		public static string SaveFilePath = Path.Combine(Paths.ConfigPath, "AbsurdKillSaves");

		public static string SaveFileFile;

		public static List<string> currentEffects = new List<string>();

		public static float[] EE_unlockSceneVars = new float[2];

		public static AK_Controller mevar;

		private int drunkSteps = 0;

		private void Awake()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Expected O, but got Unknown
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Expected O, but got Unknown
			ConfigMenu = new ConfigBuilder("ultrakill.exmagikguy.absurdThingMod", "ABSURDKILL");
			ConfigMenu.BuildType(typeof(AK_Controller));
			harmony = new Harmony("ultrakill.exmagikguy.absurdThingMod");
			harmony.PatchAll();
			mevar = this;
		}

		private void OnSceneLoad(Scene scene, LoadSceneMode mode)
		{
			//IL_0049: 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_0050: Unknown result type (might be due to invalid IL or missing references)
			sceneTimeInSec = 0f;
			StatsManager.checkpointRestart += OnCheckpointRestart;
			((MonoBehaviour)this).Invoke("UpdateWeaponPatches", 0.1f);
			sceneHasMusic = false;
			staticLog((LogLevel)16, "Generating Personalized Effects...");
			PersonalEffects personalEffects = new PersonalEffects();
			personalEffects.targetScene = scene;
			personalEffects.effects = AbsurdEffectListGen.GenerateEffectList(scene);
			currentEffects = personalEffects.effects;
			staticLog((LogLevel)16, "Done!");
			((MonoBehaviour)this).Invoke("AddRecoiler", 0.1f);
			if (currentEffects.Contains("DrunkV1"))
			{
				drunkSteps = 2;
				((MonoBehaviour)this).Invoke("DrunkStep", 0.5f);
			}
		}

		private void Start()
		{
			SceneManager.sceneLoaded += OnSceneLoad;
			staticLog((LogLevel)16, "Loading Audio...");
			AssetBundle val = AbsurdAssetLoader.LoadEmbbededBundle("AbsurdKillMod.Assets.SFX.ak_audio.bundle");
			if ((Object)(object)val == (Object)null)
			{
				((BaseUnityPlugin)this).Logger.LogWarning((object)"NO AUDIO!");
			}
			audioStore.Add("Slip", val.LoadAsset<AudioClip>("goofy_slip"));
			audioStore.Add("Splat", val.LoadAsset<AudioClip>("goofy_fall"));
			audioStore.Add("WarMusic", val.LoadAsset<AudioClip>("music_war"));
			audioStore.Add("NukeFly", val.LoadAsset<AudioClip>("nuke_fly"));
			audioStore.Add("NukeExplode", val.LoadAsset<AudioClip>("nuke_explode"));
			audioStore.Add("CoinSfx", val.LoadAsset<AudioClip>("coin_collect"));
			audioStore.Add("EE_Unlock", val.LoadAsset<AudioClip>("mysteryBells"));
			AudioSource val2 = ((Component)this).gameObject.AddComponent<AudioSource>();
			val2.spatialBlend = 1f;
			val2.playOnAwake = false;
			val2.loop = false;
			UpdatePossibleEvents();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"IT'SSSSS ABSURDKILL TIME!!!!- GET OUT!");
			TryLoadStorages();
			bool flag = false;
			if (!Directory.Exists(SaveFilePath))
			{
				Directory.CreateDirectory(SaveFilePath);
			}
			SaveFileFile = Path.Combine(SaveFilePath, "AbsurdSaveFile.absf");
			if (File.Exists(SaveFileFile))
			{
				flag = true;
			}
			if (!flag)
			{
				DotABSF dotABSF = new DotABSF();
				dotABSF.personalCode = Random.Range(100000000, 999999999);
				dotABSF.unlockedEasterEggs = new List<string>();
				byte[] bytes = AbsurdByteConverter.ToBytes(dotABSF);
				AbsurdSaveFileManager.NewSaveFromBytes(bytes);
			}
			((MonoBehaviour)this).Invoke("UpdatePersonalizationDisplay", 0.1f);
			PersEaster_Controller.activeEasterEggName = "None";
			PersEaster_Controller.Init();
		}

		private void OnCheckpointRestart()
		{
			bombingTime = 0f;
			((MonoBehaviour)this).CancelInvoke("SendNuke");
			if (((MonoBehaviour)this).IsInvoking("LandNuke"))
			{
				((Component)this).GetComponent<AudioSource>().Stop();
				((MonoBehaviour)this).CancelInvoke("LandNuke");
			}
			postBanana = false;
			if (Random.Range(0, 100) <= 50)
			{
				if (MonoSingleton<StatsManager>.Instance.restarts < 5)
				{
					Advertise("Struggling to beat this?", "Extra Health", 50000);
				}
				else
				{
					Advertise("You suck at the game?", "Invincibility", 1000000);
				}
			}
			else if (!ownedProducts.Contains("No cooldowns"))
			{
				Advertise("Want less cooldowns?", "No cooldowns", 500000);
			}
			else
			{
				Advertise("Want better weapons?", "Monster Gun", 750000);
			}
		}

		private void Update()
		{
			//IL_028c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b9: 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_02d8: 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_0342: Unknown result type (might be due to invalid IL or missing references)
			//IL_0356: Unknown result type (might be due to invalid IL or missing references)
			//IL_035b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0360: 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_038e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0393: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_040b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0410: Unknown result type (might be due to invalid IL or missing references)
			//IL_0751: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_06bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c28: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bdf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c07: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c0c: Unknown result type (might be due to invalid IL or missing references)
			dice1000 = Random.Range(0, 1000);
			allTimeInSec += Time.deltaTime;
			sceneTimeInSec += Time.deltaTime;
			EE_unlockSceneVars[0] = Mathf.Clamp(EE_unlockSceneVars[0] - Time.deltaTime, 0f, 15f);
			if (Mathf.Ceil(EE_unlockSceneVars[0]) != EE_unlockSceneVars[1])
			{
				EE_unlockSceneVars[1] = Mathf.Ceil(EE_unlockSceneVars[0]);
				if (EE_unlockSceneVars[1] == 15f)
				{
					((Component)nmov).GetComponent<AudioSource>().PlayOneShot(findSoundFromStore("EE_Unlock"));
					if (loop_musicActi)
					{
						loop_musicSec = 0f;
						loop_musicActi = false;
						((Component)this).GetComponent<AudioSource>().Stop();
						if (sceneHasMusic)
						{
							MonoSingleton<MusicManager>.Instance.ForceStartMusic();
						}
					}
					if (!MonoSingleton<MusicManager>.Instance.off)
					{
						sceneHasMusic = true;
					}
					MonoSingleton<MusicManager>.Instance.off = true;
					MonoSingleton<MusicManager>.Instance.forcedOff = true;
				}
				else if (EE_unlockSceneVars[1] == 10f)
				{
					MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("You have unlocked a new\npersonalization easter egg:\n" + PersEaster_Controller.recentlyUnlockedEEName + "!", "", "", 0, false, false, true);
				}
				else if (EE_unlockSceneVars[1] == 5f)
				{
					MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("Go to Extras in Configgy\nfor more info!", "", "", 0, false, false, true);
				}
				else if (EE_unlockSceneVars[1] == 0f && sceneHasMusic)
				{
					MonoSingleton<MusicManager>.Instance.ForceStartMusic();
				}
			}
			if (currentEffects.Contains("DrunkV1"))
			{
				drunkSteps = 2;
			}
			gc = MonoSingleton<GunControl>.Instance;
			nmov = MonoSingleton<NewMovement>.Instance;
			List<EnemyIdentifier> list = new List<EnemyIdentifier>();
			collectedCoinThisFrame = false;
			if ((Object)(object)nmov != (Object)null)
			{
				list = MonoSingleton<EnemyTracker>.Instance.GetCurrentEnemies();
			}
			if (bombingTime > 0f && (Object)(object)nmov != (Object)null)
			{
				MonoSingleton<CameraController>.Instance.CameraShake(1f);
				if (dice1000 < 400)
				{
					GameObject val = Object.Instantiate<GameObject>(prefab_grenade, ((Component)nmov).transform.position + new Vector3(Random.Range(0f, 500f), 100f, Random.Range(0f, 500f)), Quaternion.identity);
					val.GetComponent<Grenade>().GrenadeBeam(val.transform.position + new Vector3(0f, -1f, 0f), (GameObject)null);
				}
				if (dice1000 < 200 && list.Count > 0)
				{
					EnemyIdentifier val2 = list[Random.Range(0, list.Count - 1)];
					GameObject val3 = Object.Instantiate<GameObject>(prefab_grenade, ((Component)val2).transform.position + new Vector3(0f, 100f, 0f), Quaternion.identity);
					val3.GetComponent<Grenade>().GrenadeBeam(val3.transform.position + new Vector3(0f, -1f, 0f), (GameObject)null);
				}
				if (dice1000 < 20)
				{
					GameObject val4 = Object.Instantiate<GameObject>(prefab_grenade, ((Component)nmov).transform.position + new Vector3(0f, 100f, 0f), Quaternion.identity);
					val4.GetComponent<Grenade>().GrenadeBeam(val4.transform.position + new Vector3(0f, -1f, 0f), (GameObject)null);
				}
				bombingTime = Mathf.Clamp(bombingTime - Time.deltaTime, 0f, 7f);
			}
			if (((ConfigValueElement<bool>)(object)Extra_rerollPersonaliz).Value)
			{
				RerollPersonalization();
				((ConfigValueElement<bool>)(object)Extra_rerollPersonaliz).SetValue(false);
			}
			if (loop_musicActi)
			{
				loop_musicSec += Time.deltaTime;
				if (loop_musicSec >= loop_musicLen)
				{
					((Component)this).GetComponent<AudioSource>().PlayOneShot(loop_clip);
					loop_musicSec = 0f;
				}
			}
			if (lastSecLogs[0] != Mathf.RoundToInt(allTimeInSec))
			{
				lastSecLogs[0] = Mathf.RoundToInt(allTimeInSec);
				OnSecondPassed("total");
			}
			if (lastSecLogs[1] != Mathf.RoundToInt(sceneTimeInSec))
			{
				lastSecLogs[1] = Mathf.RoundToInt(sceneTimeInSec);
				OnSecondPassed("scene");
			}
			if ((Object)(object)nmov == (Object)null)
			{
				return;
			}
			if (currentEffects.Contains("NaturalRegen"))
			{
				regenTime = Mathf.Clamp(regenTime - Time.deltaTime, 0f, 0.5f);
				if (regenTime <= 0f)
				{
					nmov.GetHealth(1, true, false, false);
					regenTime = 0.5f;
				}
			}
			if (Patch_Capitalism)
			{
				int num = 0;
				for (int i = 0; i < 3; i++)
				{
					LisenceTimes[i] = Mathf.Clamp(LisenceTimes[i] - Time.deltaTime, 0f, 300f);
					if (LisenceTimes[i] <= 20f && !LisenceWarned[i])
					{
						MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=red>" + LisenceName[i] + " LISENCE EXPIRING SOON!</color>", "", "", 0, false, false, true);
						LisenceWarned[i] = true;
					}
					if (LisenceTimes[i] <= 0f)
					{
						num++;
						if (!LisenceExpire[i])
						{
							HudMessageReceiver instance = MonoSingleton<HudMessageReceiver>.Instance;
							string[] obj = new string[5]
							{
								"<color=red>",
								LisenceName[i],
								" LISENCE EXPIRED!</color>\nPress [",
								null,
								null
							};
							KeyCode value = ((ConfigValueElement<KeyCode>)(object)Extra_shopKey).Value;
							obj[3] = ((object)(KeyCode)(ref value)).ToString();
							obj[4] = "] to buy new one\nfor 100000<color=orange>P</color>!";
							instance.SendHudMessage(string.Concat(obj), "", "", 0, false, false, true);
							LisenceExpire[i] = true;
						}
					}
					if (LisenceExpire[i] && LisenceBackups[i] > 0)
					{
						ResetLisence(i);
						LisenceBackups[i]--;
					}
				}
				if (Input.GetKeyDown(((ConfigValueElement<KeyCode>)(object)Extra_shopKey).Value))
				{
					Purchase();
				}
			}
			else
			{
				LisenceExpire[0] = false;
				LisenceExpire[1] = false;
				LisenceExpire[2] = false;
			}
			if (LisenceExpire[0])
			{
				nmov.boostCharge = 0f;
			}
			if (LisenceExpire[1])
			{
				if (nmov.jumpPower > 0f)
				{
					PreviousMovement[1] = nmov.jumpPower;
				}
				nmov.jumpPower = 0f;
			}
			else if (nmov.jumpPower <= 0f)
			{
				nmov.jumpPower = PreviousMovement[1];
			}
			if (LisenceExpire[2])
			{
				if (nmov.walkSpeed > 0f)
				{
					PreviousMovement[0] = nmov.walkSpeed;
				}
				nmov.walkSpeed = 0f;
			}
			else if (nmov.walkSpeed <= 0f)
			{
				nmov.walkSpeed = PreviousMovement[0];
			}
			if (ownedProducts.Contains("Lottery Ticket"))
			{
				if (Random.Range(0, 100) >= 50)
				{
					GameProgressSaver.AddMoney(GameProgressSaver.GetMoney());
					MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=green>You won!</color>\nYour money doubled.", "", "", 0, false, false, true);
				}
				else
				{
					GameProgressSaver.AddMoney(-Mathf.RoundToInt((float)(GameProgressSaver.GetMoney() / 2)));
					MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=red>You lost!</color>\nYour money was halfed.", "", "", 0, false, false, true);
				}
				ownedProducts.Remove("Lottery Ticket");
			}
			if (ownedProducts.Contains("Extra Health"))
			{
				nmov.SuperCharge();
				ownedProducts.Remove("Extra Health");
			}
			if (ownedProducts.Contains("Invincibility"))
			{
				nmov.ResetHardDamage();
				nmov.FullHeal(true);
			}
			if (ownedProducts.Contains("No cooldowns"))
			{
				MonoSingleton<WeaponCharges>.Instance.MaxCharges();
			}
			if (ownedProducts.Contains("Monster Gun"))
			{
				foreach (GameObject allWeapon in gc.allWeapons)
				{
					allWeapon.SetActive(true);
				}
				ownedProducts.Remove("Monster Gun");
			}
			if (postBanana && nmov.gc.onGround)
			{
				((Component)nmov).GetComponent<AudioSource>().PlayOneShot(findSoundFromStore("Splat"));
				nmov.GetHurt(5, false, 2f, false, false, 0.35f, false);
				postBanana = false;
			}
			if (twistVillanGone[0] && list.Count < 1)
			{
				loop_musicSec = 0f;
				loop_musicActi = false;
				((Component)this).GetComponent<AudioSource>().Stop();
				if (sceneHasMusic)
				{
					MonoSingleton<MusicManager>.Instance.ForceStartMusic();
				}
				if ((Object)(object)MonoSingleton<TimeController>.Instance != (Object)null)
				{
					MonoSingleton<TimeController>.Instance.SlowDown(0.01f);
				}
				nmov.FullHeal(true);
				nmov.FullStamina();
				MonoSingleton<WeaponCharges>.Instance.MaxCharges();
				twistVillanGone[1] = true;
				twistVillanGone[0] = false;
			}
			InputManager instance2 = MonoSingleton<InputManager>.Instance;
			if (currentEffects.Contains("Slippery") && (Object)(object)instance2 != (Object)null && instance2.InputSource.Move.WasPerformedThisFrame && (Object)(object)nmov != (Object)null && nmov.gc.onGround)
			{
				if (Object.op_Implicit((Object)(object)((Component)nmov).GetComponent<AudioSource>()))
				{
					((Component)nmov).GetComponent<AudioSource>().PlayOneShot(findSoundFromStore("Slip"));
				}
				if (Object.op_Implicit((Object)(object)nmov.rb))
				{
					Rigidbody rb = nmov.rb;
					rb.velocity += new Vector3(Random.Range(-350f, 350f), 0f, Random.Range(-350f, 350f));
				}
			}
			((Component)this).transform.position = ((Component)nmov).transform.position;
		}

		private void OnSecondPassed(string secondOnWhatTime)
		{
			if (secondOnWhatTime != "scene" && secondOnWhatTime != "total")
			{
				return;
			}
			if (secondOnWhatTime == "scene")
			{
				if ((Object)(object)gc != (Object)null && dice1000 <= chaosChance * 10)
				{
					ApplyChaos(Random.Range(0, 999));
				}
			}
			else
			{
				PersEaster_Controller.UpdatePersEasterEggs();
			}
		}

		private void ApplyChaos(int index)
		{
			//IL_0077: 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_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_068f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0694: Unknown result type (might be due to invalid IL or missing references)
			//IL_0288: Unknown result type (might be due to invalid IL or missing references)
			//IL_0292: Unknown result type (might be due to invalid IL or missing references)
			//IL_081f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0833: Unknown result type (might be due to invalid IL or missing references)
			//IL_0838: Unknown result type (might be due to invalid IL or missing references)
			//IL_083d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0844: Unknown result type (might be due to invalid IL or missing references)
			//IL_0846: Unknown result type (might be due to invalid IL or missing references)
			//IL_0848: Unknown result type (might be due to invalid IL or missing references)
			//IL_0859: Unknown result type (might be due to invalid IL or missing references)
			//IL_085e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0863: Unknown result type (might be due to invalid IL or missing references)
			//IL_0868: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a9c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ab0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ab5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aba: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ae3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aed: Expected O, but got Unknown
			//IL_0898: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_08bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_08bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_08c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_08dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_08e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_09c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_09cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0531: Unknown result type (might be due to invalid IL or missing references)
			//IL_0536: Unknown result type (might be due to invalid IL or missing references)
			//IL_053f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0544: Unknown result type (might be due to invalid IL or missing references)
			//IL_0548: Unknown result type (might be due to invalid IL or missing references)
			//IL_054a: Unknown result type (might be due to invalid IL or missing references)
			//IL_059f: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b88: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b96: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d1e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d2c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bca: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bcf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d61: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d66: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bfa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c08: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c0d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c15: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c1c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c1e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c41: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c55: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c5a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d7f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d84: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d8d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d92: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d9a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0da1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0da3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0db4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dc8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dcd: Unknown result type (might be due to invalid IL or missing references)
			int num = UpdatePossibleEvents();
			if (num < 1 || !chaos || EE_unlockSceneVars[0] > 0f)
			{
				return;
			}
			int index2 = index % num;
			switch (possibleEvents[index2])
			{
			case "BananaPeel":
			{
				((Component)nmov).GetComponent<AudioSource>().PlayOneShot(findSoundFromStore("Slip"));
				Transform transform2 = ((Component)nmov).transform;
				transform2.position += new Vector3(0f, 0.2f, 0f);
				nmov.Jump();
				Rigidbody rb = nmov.rb;
				rb.velocity += ((Component)nmov).transform.forward * -50f;
				nmov.gc.onGround = false;
				nmov.gc.touchingGround = false;
				gc.ForceWeapon(gc.allWeapons[Random.Range(0, gc.allWeapons.Count - 1)], true);
				MonoSingleton<FistControl>.Instance.ScrollArm();
				MonoSingleton<FistControl>.Instance.currentPunch.PunchStart();
				((Component)nmov).GetComponent<RecoilManager>().recoilLeft = 10f;
				postBanana = true;
				break;
			}
			case "PlotTwist":
			{
				List<EnemyIdentifier> currentEnemies6 = MonoSingleton<EnemyTracker>.Instance.GetCurrentEnemies();
				if (currentEnemies6.Count < 1 || twistVillanGone[0])
				{
					break;
				}
				EnemyIdentifier val7 = currentEnemies6[Random.Range(0, currentEnemies6.Count - 1)];
				foreach (EnemyIdentifier item2 in currentEnemies6)
				{
					if ((Object)(object)item2 != (Object)(object)val7)
					{
						item2.puppet = true;
						item2.Explode(false);
					}
				}
				MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage(val7.FullName + " is actually the main\nantagonist.", "", "", 0, false, false, true);
				((Object)val7).name = ((Object)val7).name + ", The King of Hell.";
				val7.HealthBuff(20f);
				val7.DamageBuff(20f);
				val7.SpeedBuff(4f);
				Transform transform5 = ((Component)val7).transform;
				transform5.localScale *= 2f;
				val7.BossBar(true);
				BossHealthBar component4 = ((Component)val7).GetComponent<BossHealthBar>();
				component4.bossName += ", The King of Hell.";
				if (Object.op_Implicit((Object)(object)((Component)val7).gameObject.GetComponent<AudioSource>()))
				{
					AudioSource component5 = ((Component)val7).GetComponent<AudioSource>();
					component5.pitch /= 2f;
				}
				nmov.FullHeal(true);
				nmov.FullStamina();
				MonoSingleton<WeaponCharges>.Instance.MaxCharges();
				Grenade[] array = Object.FindObjectsOfType<Grenade>();
				foreach (Grenade val8 in array)
				{
					val8.Explode(false, false, false, 1f, false, (GameObject)null, false);
				}
				Magnet[] array2 = Object.FindObjectsOfType<Magnet>();
				foreach (Magnet val9 in array2)
				{
					val9.health = 0f;
				}
				if (!MonoSingleton<MusicManager>.Instance.off)
				{
					sceneHasMusic = true;
					MonoSingleton<MusicManager>.Instance.ForceStopMusic();
				}
				else
				{
					sceneHasMusic = false;
				}
				((Component)this).GetComponent<AudioSource>().PlayOneShot(findSoundFromStore("WarMusic"));
				loop_musicSec = 0f;
				loop_musicLen = 330f;
				loop_clip = findSoundFromStore("WarMusic");
				loop_musicActi = true;
				twistVillanGone[1] = false;
				twistVillanGone[0] = true;
				break;
			}
			case "EnemyCharm":
			{
				int num4 = Mathf.Clamp(MonoSingleton<StyleHUD>.Instance.rankIndex + 1, 1, 8);
				List<EnemyIdentifier> currentEnemies4 = MonoSingleton<EnemyTracker>.Instance.GetCurrentEnemies();
				foreach (EnemyIdentifier item3 in currentEnemies4)
				{
					if (item3.healthBuffModifier > 60f)
					{
						currentEnemies4.Remove(item3);
					}
				}
				if (currentEnemies4.Count < 1)
				{
					break;
				}
				if (currentEnemies4.Count < num4)
				{
					num4 = currentEnemies4.Count;
				}
				List<EnemyIdentifier> list = new List<EnemyIdentifier>();
				for (int i = 0; i < num4; i++)
				{
					EnemyIdentifier item = currentEnemies4[Random.Range(0, currentEnemies4.Count - 1)];
					list.Add(item);
					currentEnemies4.Remove(item);
				}
				foreach (EnemyIdentifier item4 in list)
				{
					GameObject gameObject = ((Component)item4).gameObject;
					Vector3 position3 = ((Component)item4).transform.position;
					Quaternion rotation3 = ((Component)item4).transform.rotation;
					GameObject val4 = Object.Instantiate<GameObject>(gameObject, position3, rotation3);
					EnemyIdentifier component2 = val4.GetComponent<EnemyIdentifier>();
					component2.attackEnemies = true;
					component2.ignorePlayer = true;
					component2.HealthBuff(999f);
					AbsurdKill_ObjectPlugin absurdKill_ObjectPlugin = ((Component)component2).gameObject.AddComponent<AbsurdKill_ObjectPlugin>();
					absurdKill_ObjectPlugin.My_modEnemyRs = AbsurdKill_ObjectPlugin.ModEnemyRelationship.HostileToAllEmemies;
					component2.prioritizeEnemiesUnlessAttacked = true;
					Transform transform4 = ((Component)component2).transform;
					transform4.localScale /= 2f;
					if (Object.op_Implicit((Object)(object)((Component)component2).gameObject.GetComponent<AudioSource>()))
					{
						AudioSource component3 = ((Component)component2).GetComponent<AudioSource>();
						component3.pitch *= 2f;
					}
					item4.puppet = true;
					item4.Explode(false);
				}
				MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage($"{num4} enemies have diecided\nto fight on your\nside.", "", "", 0, false, false, true);
				break;
			}
			case "Nuke":
				MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=red>NUKE IS NEARBY\n5 SECONDS TO RUN!</color>", "", "", 0, false, false, true);
				((MonoBehaviour)this).Invoke("SendNuke", 5f);
				nukePosition = ((Component)nmov).transform.position;
				break;
			case "Bombing":
				MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=red>IT'S RAINING GRENADES!</color>", "", "", 0, false, false, true);
				bombingTime = 7f;
				break;
			case "MoneyUp":
				MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=yellow>MrBeast gave you \n3000000 Points!</color>", "", "", 0, false, false, true);
				GameProgressSaver.AddMoney(3000000);
				break;
			case "OilUp":
			{
				MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=#480963>Everyone oiled up!</color>", "", "", 0, false, false, true);
				GameProgressSaver.AddMoney(100000);
				List<EnemyIdentifier> currentEnemies7 = MonoSingleton<EnemyTracker>.Instance.GetCurrentEnemies();
				foreach (EnemyIdentifier item5 in currentEnemies7)
				{
					item5.AddFlammable(9999f);
				}
				nmov.ForceAddAntiHP(9999f, true, true, true, false);
				break;
			}
			case "Airstrike":
			{
				MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=yellow>AIRSTRIKE INCOMING!</color>", "", "", 0, false, false, true);
				List<EnemyIdentifier> currentEnemies5 = MonoSingleton<EnemyTracker>.Instance.GetCurrentEnemies();
				foreach (EnemyIdentifier item6 in currentEnemies5)
				{
					Vector3 val5 = ((Component)item6).transform.position + new Vector3(0f, 100f, 0f);
					Object.Instantiate<GameObject>(prefab_rocket, val5, Quaternion.LookRotation(val5 - (val5 + new Vector3(0f, 1f, 0f))));
				}
				Vector3 val6 = ((Component)nmov).transform.position + new Vector3(0f, 100f, 0f);
				Object.Instantiate<GameObject>(prefab_rocket, val6, Quaternion.LookRotation(val6 - (val6 + new Vector3(0f, 1f, 0f))));
				break;
			}
			case "WeaponRoulette":
				MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=green>Weapon Roulette!</color>", "", "", 0, false, false, true);
				if (((MonoBehaviour)this).IsInvoking("WRoulettePoint"))
				{
					((MonoBehaviour)this).CancelInvoke("WRoulettePoint");
				}
				weaponSwitches = 10;
				WRoulettePoint();
				break;
			case "LemmeKillEm":
			{
				List<EnemyIdentifier> currentEnemies3 = MonoSingleton<EnemyTracker>.Instance.GetCurrentEnemies();
				if (currentEnemies3.Count <= 0)
				{
					break;
				}
				MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=green>Lemme kill those guys.</color>", "", "", 0, false, false, true);
				{
					foreach (EnemyIdentifier item7 in currentEnemies3)
					{
						Object.Instantiate<GameObject>(prefab_explosion, ((Component)item7).transform.position, Quaternion.identity);
						item7.puppet = true;
						item7.Explode(false);
					}
					break;
				}
			}
			case "MoreBlood":
				MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=green>ULTRAHEAL!!!!!</color>", "", "", 0, false, false, true);
				nmov.FullHeal(true);
				nmov.hp = 2000001;
				break;
			case "BlackholeHere":
			{
				MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("Here's a blackhole.", "", "", 0, false, false, true);
				GameObject val3 = Object.Instantiate<GameObject>(prefab_blackhole, ((Component)nmov).transform.position + new Vector3(5f, 0f, 0f), Quaternion.identity);
				BlackHoleProjectile component = val3.GetComponent<BlackHoleProjectile>();
				component.enemy = true;
				component.target = new EnemyTarget(((Component)nmov).transform);
				component.speed = 3f;
				component.Activate();
				break;
			}
			case "D10":
			{
				List<EnemyIdentifier> currentEnemies2 = MonoSingleton<EnemyTracker>.Instance.GetCurrentEnemies();
				if (currentEnemies2.Count <= 0)
				{
					break;
				}
				MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=green>Enemies downgraded!</color>", "", "", 0, false, false, true);
				{
					foreach (EnemyIdentifier item8 in currentEnemies2)
					{
						bool flag2 = false;
						int num3 = enemyGrades.Keys.ToList().IndexOf(item8.enemyType);
						EnemyType key2 = (EnemyType)23;
						if (num3 != -1)
						{
							if (num3 - 1 <= -1)
							{
								flag2 = true;
							}
							else
							{
								key2 = enemyGradeNums[num3 - 1];
							}
							if (flag2)
							{
								item8.puppet = true;
								item8.Explode(false);
								continue;
							}
							Vector3 position2 = ((Component)item8).transform.position;
							Quaternion rotation2 = ((Component)item8).transform.rotation;
							GameObject val2 = Object.Instantiate<GameObject>(enemyGrades[key2], position2, rotation2);
							((Component)item8).gameObject.AddComponent<AbsurdKill_ObjectPlugin>().dontSpawnSurprise = true;
							Transform transform3 = ((Component)item8).transform;
							transform3.position += new Vector3(0f, -100f, 0f);
							item8.puppet = true;
							item8.Explode(false);
						}
					}
					break;
				}
			}
			case "RD10":
			{
				List<EnemyIdentifier> currentEnemies = MonoSingleton<EnemyTracker>.Instance.GetCurrentEnemies();
				if (currentEnemies.Count <= 0)
				{
					break;
				}
				MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=red>Enemies Evolved!</color>", "", "", 0, false, false, true);
				{
					foreach (EnemyIdentifier item9 in currentEnemies)
					{
						bool flag = false;
						int num2 = enemyGrades.Keys.ToList().IndexOf(item9.enemyType);
						EnemyType key = (EnemyType)23;
						if (num2 != -1)
						{
							if (num2 + 1 >= 23)
							{
								flag = true;
							}
							else
							{
								key = enemyGradeNums[num2 + 1];
							}
							if (flag)
							{
								break;
							}
							Vector3 position = ((Component)item9).transform.position;
							Quaternion rotation = ((Component)item9).transform.rotation;
							GameObject val = Object.Instantiate<GameObject>(enemyGrades[key], position, rotation);
							Transform transform = ((Component)item9).transform;
							transform.position += new Vector3(0f, -100f, 0f);
							item9.puppet = true;
							item9.Explode(false);
						}
					}
					break;
				}
			}
			case "GutterMail":
				NewEventsManager.CastEvent("airdrop");
				break;
			case "Talk":
				NewEventsManager.CastEvent("talk");
				break;
			case "NextbotSpawn":
				NewEventsManager.CastEvent("spawn_nextbot");
				break;
			case "CaveSFX":
				NewEventsManager.CastEvent("cave_sfx");
				break;
			}
		}

		private int UpdatePossibleEvents()
		{
			possibleEvents.Clear();
			if (Event_BananaPeel)
			{
				possibleEvents.Add("BananaPeel");
			}
			if (Event_PlotTwist)
			{
				possibleEvents.Add("PlotTwist");
			}
			if (Event_EnemyCharm)
			{
				possibleEvents.Add("EnemyCharm");
			}
			if (Event_NeculearWar)
			{
				possibleEvents.Add("Nuke");
				possibleEvents.Add("Bombing");
			}
			if (Event_HereComesTheMoney)
			{
				possibleEvents.Add("MoneyUp");
			}
			if (Event_DiddyParty)
			{
				possibleEvents.Add("OilUp");
			}
			if (Event_Airedstrike)
			{
				possibleEvents.Add("Airstrike");
			}
			if (Event_WeaponSwitchSpam)
			{
				possibleEvents.Add("WeaponRoulette");
			}
			if (Event_BrothaHelp)
			{
				possibleEvents.Add("LemmeKillEm");
			}
			if (Event_MoreBlood)
			{
				possibleEvents.Add("MoreBlood");
			}
			if (Event_BlackholeFromHole)
			{
				possibleEvents.Add("BlackholeHere");
			}
			if (Event_DTenLol)
			{
				possibleEvents.Add("D10");
			}
			if (Event_ReverseDTen)
			{
				possibleEvents.Add("RD10");
			}
			if (Event_MailMissile)
			{
				possibleEvents.Add("GutterMail");
			}
			if (Event_Talk)
			{
				possibleEvents.Add("Talk");
			}
			if (Event_NextbotSpawn)
			{
				possibleEvents.Add("NextbotSpawn");
			}
			if (Event_ScaryCaveSFX)
			{
				possibleEvents.Add("CaveSFX");
			}
			return possibleEvents.Count;
		}

		private void SendNuke()
		{
			((Component)this).GetComponent<AudioSource>().PlayOneShot(findSoundFromStore("NukeFly"));
			((MonoBehaviour)this).Invoke("LandNuke", 1.252f);
		}

		private void LandNuke()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			((Component)this).GetComponent<AudioSource>().PlayOneShot(findSoundFromStore("NukeExplode"));
			Explosion[] componentsInChildren = Object.Instantiate<GameObject>(prefab_nuke, nukePosition, Quaternion.identity).GetComponentsInChildren<Explosion>();
			foreach (Explosion val in componentsInChildren)
			{
				val.maxSize *= 10f;
				val.speed *= 10f;
				val.damage = 2000000;
			}
			MonoSingleton<CameraController>.Instance.CameraShake(10f);
		}

		public static AudioClip findSoundFromStore(string name)
		{
			AudioClip value = null;
			audioStore.TryGetValue(name, out value);
			return value;
		}

		private void LoadPrefabFromAddressables(string key, string outVarName)
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			((BaseUnityPlugin)this).Logger.LogInfo((object)("Loading Asset: " + key));
			AsyncOperationHandle<GameObject> val = Addressables.LoadAssetAsync<GameObject>((object)key);
			val.Completed += delegate(AsyncOperationHandle<GameObject> handle)
			{
				//IL_002c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0031: Unknown result type (might be due to invalid IL or missing references)
				SetPrefabVarTo(outVarName, handle.Result);
				ManualLogSource logger = ((BaseUnityPlugin)this).Logger;
				AsyncOperationStatus status = handle.Status;
				logger.LogInfo((object)("Status: " + ((object)(AsyncOperationStatus)(ref status)).ToString()));
			};
		}

		private void StorePrefabFromAddressables(string key, string outPrefName)
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			((BaseUnityPlugin)this).Logger.LogInfo((object)("Loading Asset: " + key));
			AsyncOperationHandle<GameObject> val = Addressables.LoadAssetAsync<GameObject>((object)key);
			val.Completed += delegate(AsyncOperationHandle<GameObject> handle)
			{
				//IL_002b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0030: Unknown result type (might be due to invalid IL or missing references)
				prefabDict[outPrefName] = handle.Result;
				ManualLogSource logger = ((BaseUnityPlugin)this).Logger;
				AsyncOperationStatus status = handle.Status;
				logger.LogInfo((object)("Status: " + ((object)(AsyncOperationStatus)(ref status)).ToString()));
			};
		}

		private void LoadEnemyFromAddressables(string key, EnemyType enemyId)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			((BaseUnityPlugin)this).Logger.LogInfo((object)("Loading Asset: " + key));
			AsyncOperationHandle<GameObject> val = Addressables.LoadAssetAsync<GameObject>((object)key);
			val.Completed += delegate(AsyncOperationHandle<GameObject> handle)
			{
				//IL_000d: 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)
				enemyGrades[enemyId] = handle.Result;
				ManualLogSource logger = ((BaseUnityPlugin)this).Logger;
				AsyncOperationStatus status = handle.Status;
				logger.LogInfo((object)("Status: " + ((object)(AsyncOperationStatus)(ref status)).ToString()));
			};
		}

		private void TryLoadStorages()
		{
			staticLog((LogLevel)16, "Loading Prefabs...");
			LoadPrefabFromAddressables("Assets/Prefabs/Attacks and Projectiles/Explosions/Explosion.prefab", "explosion");
			LoadPrefabFromAddressables("Assets/Prefabs/Attacks and Projectiles/Explosions/Explosion Super.prefab", "nuke");
			LoadPrefabFromAddressables("Assets/Prefabs/Attacks and Projectiles/Grenade.prefab", "grenade");
			LoadPrefabFromAddressables("Assets/Prefabs/Attacks and Projectiles/Coin.prefab", "coin");
			LoadPrefabFromAddressables("Assets/Prefabs/Attacks and Projectiles/Rocket.prefab", "rocket");
			LoadPrefabFromAddressables("Assets/Prefabs/Enemies/MinosPrime.prefab", "minosPrime");
			LoadPrefabFromAddressables("Assets/Prefabs/Attacks and Projectiles/Black Hole Enemy.prefab", "blackhole");
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Cancerous Rodent.prefab", (EnemyType)23);
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Idol.prefab", (EnemyType)21);
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Stalker.prefab", (EnemyType)12);
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Puppet.prefab", (EnemyType)36);
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Zombie.prefab", (EnemyType)3);
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Projectile Zombie.prefab", (EnemyType)13);
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Super Projectile Zombie.prefab", (EnemyType)14);
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Drone.prefab", (EnemyType)1);
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/ShotgunHusk.prefab", (EnemyType)15);
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Mannequin.prefab", (EnemyType)31);
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Streetcleaner.prefab", (EnemyType)6);
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Turret.prefab", (EnemyType)20);
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Very Cancerous Rodent.prefab", (EnemyType)24);
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Spider.prefab", (EnemyType)4);
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Virtue.prefab", (EnemyType)9);
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Cerberus.prefab", (EnemyType)0);
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Gutterman.prefab", (EnemyType)33);
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Guttertank.prefab", (EnemyType)34);
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Mindflayer.prefab", (EnemyType)5);
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Mass.prefab", (EnemyType)2);
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/V2.prefab", (EnemyType)8);
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Mandalore.prefab", (EnemyType)25);
			LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Big Johninator.prefab", (EnemyType)37);
			StorePrefabFromAddressables("Assets/Prefabs/Attacks and Projectiles/Cannonball.prefab", "Cannonball");
			StorePrefabFromAddressables("Assets/Prefabs/Attacks and Projectiles/GasolineProjectile.prefab", "Diddy Droplet");
			StorePrefabFromAddressables("Assets/Prefabs/Attacks and Projectiles/Hitscan Beams/Railcannon Beam.prefab", "Railcannon Beam");
			StorePrefabFromAddressables("Assets/Prefabs/Attacks and Projectiles/Explosions/Explosion Wave.prefab", "Blastwave");
			StorePrefabFromAddressables("Assets/Prefabs/Enemies/Spawners/BombEnemySpawnerGutterman Variant.prefab", "GuttermanAirdrop");
		}

		private void UpdateWeaponPatches()
		{
			staticLog((LogLevel)16, "Patching Weapons...");
			if ((Object)(object)gc == (Object)null)
			{
				staticLog((LogLevel)4, "No weapons at all :(");
				return;
			}
			if (gc.allWeapons.Count < 9)
			{
				staticLog((LogLevel)4, "Not enough weapons :(");
			}
			if (!gotOriginalWeaponProjes && gc.allWeapons.Count >= 9)
			{
				foreach (GameObject allWeapon in gc.allWeapons)
				{
					Revolver component = allWeapon.GetComponent<Revolver>();
					Shotgun component2 = allWeapon.GetComponent<Shotgun>();
					Nailgun component3 = allWeapon.GetComponent<Nailgun>();
					Railcannon component4 = allWeapon.GetComponent<Railcannon>();
					RocketLauncher component5 = allWeapon.GetComponent<RocketLauncher>();
					ShotgunHammer component6 = allWeapon.GetComponent<ShotgunHammer>();
					if ((Object)(object)component != (Object)null)
					{
						string text = "";
						if (component.altVersion)
						{
							text = " Alt";
						}
						prefabDict["Revolver Beam" + text] = component.revolverBeam;
					}
					if ((Object)(object)component3 != (Object)null && !component3.altVersion)
					{
						prefabDict["Nail"] = component3.nail;
					}
				}
				gotOriginalWeaponProjes = true;
			}
			foreach (GameObject allWeapon2 in gc.allWeapons)
			{
				Revolver component7 = allWeapon2.GetComponent<Revolver>();
				Shotgun component8 = allWeapon2.GetComponent<Shotgun>();
				Nailgun component9 = allWeapon2.GetComponent<Nailgun>();
				Railcannon component10 = allWeapon2.GetComponent<Railcannon>();
				RocketLauncher component11 = allWeapon2.GetComponent<RocketLauncher>();
				ShotgunHammer component12 = allWeapon2.GetComponent<ShotgunHammer>();
				if ((Object)(object)component7 != (Object)null)
				{
					if (Patch_Railrev)
					{
						component7.revolverBeam = prefabDict["Railcannon Beam"];
					}
					if (Patch_HeavyCoins)
					{
						component7.coin = prefabDict["Cannonball"];
					}
				}
				if (Patch_Diddlernails && (Object)(object)component9 != (Object)null && !component9.altVersion)
				{
					component9.nail = prefabDict["Diddy Droplet"];
				}
			}
		}

		private void SetPrefabVarTo(string prefabName, GameObject value)
		{
			switch (prefabName)
			{
			case "explosion":
				prefab_explosion = value;
				break;
			case "nuke":
				prefab_nuke = value;
				break;
			case "grenade":
				prefab_grenade = value;
				break;
			case "coin":
				prefab_coin = value;
				break;
			case "rocket":
				prefab_rocket = value;
				break;
			case "minosPrime":
				prefab_minosPrime = value;
				break;
			case "blackhole":
				prefab_blackhole = value;
				break;
			}
		}

		private void ResetLisence(int index, bool silent = false)
		{
			switch (index)
			{
			case 0:
				LisenceTimes[0] = 240f;
				break;
			case 1:
				LisenceTimes[1] = 270f;
				break;
			case 2:
				LisenceTimes[2] = 300f;
				break;
			}
			LisenceWarned[index] = false;
			LisenceExpire[index] = false;
			if (!silent)
			{
				if (LisenceBackups[index] > 1)
				{
					MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage(LisenceName[index] + " has been restored!", "", "", 0, false, false, true);
				}
				else
				{
					MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage(LisenceName[index] + " has been restored!\nIt was the last backup!", "", "", 0, false, false, true);
				}
			}
		}

		private void Purchase()
		{
			if (LisenceExpire[0] || LisenceExpire[1] || LisenceExpire[2])
			{
				for (int i = 0; i < 3; i++)
				{
					if (LisenceExpire[i])
					{
						if (GameProgressSaver.GetMoney() >= 100000)
						{
							GameProgressSaver.AddMoney(-100000);
							LisenceBackups[i]++;
							MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=green>Lisence Bought!</color>", "", "", 0, false, false, true);
						}
						else
						{
							MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=red>Insufficent points!</color>", "", "", 0, false, false, true);
						}
					}
				}
			}
			else if (currentProductName != "" && !ownedProducts.Contains(currentProductName))
			{
				if (GameProgressSaver.GetMoney() >= currentProductPrice)
				{
					GameProgressSaver.AddMoney(-currentProductPrice);
					ownedProducts.Add(currentProductName);
					MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=green>" + currentProductName + " Bought!</color>", "", "", 0, false, false, true);
				}
				else
				{
					MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=red>Insufficent points!</color>", "", "", 0, false, false, true);
					((MonoBehaviour)this).Invoke("AdvertiseGambling", 1f);
				}
			}
		}

		private void Advertise(string advertismentScript, string productName, int productPrice)
		{
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			if (!ownedProducts.Contains(productName) && Patch_Capitalism && !(EE_unlockSceneVars[0] > 0f))
			{
				HudMessageReceiver instance = MonoSingleton<HudMessageReceiver>.Instance;
				string[] obj = new string[8] { advertismentScript, "\nUse [", null, null, null, null, null, null };
				KeyCode value = ((ConfigValueElement<KeyCode>)(object)Extra_shopKey).Value;
				obj[2] = ((object)(KeyCode)(ref value)).ToString();
				obj[3] = "] to buy ";
				obj[4] = productName;
				obj[5] = "\nFor ";
				obj[6] = productPrice.ToString();
				obj[7] = "<color=orange>P</color>!";
				instance.SendHudMessage(string.Concat(obj), "", "", 0, false, false, true);
				currentProductName = productName;
				currentProductPrice = productPrice;
			}
		}

		private void AdvertiseGambling()
		{
			Advertise("You're poor?", "Lottery Ticket", Mathf.RoundToInt(Mathf.Clamp(Mathf.Round((float)(GameProgressSaver.GetMoney() / 10)), 1000f, 1000000f)));
		}

		private void WRoulettePoint()
		{
			gc.ForceWeapon(gc.allWeapons[Random.Range(0, gc.allWeapons.Count - 1)], true);
			if (weaponSwitches > 0)
			{
				((MonoBehaviour)this).Invoke("WRoulettePoint", 0.2f);
			}
			weaponSwitches--;
		}

		public static string CurseText_GenerateDailyTip()
		{
			staticLog((LogLevel)16, "Utilizing Gen Z Slang...");
			string result = "Yo bro, no tips today, \nsurvive yourself, brother.";
			List<string> list = new List<string> { "Yo, ", "Yo bro, ", "Heya, ", "Hey Bozo, ", "" };
			List<string> list2 = new List<string> { "You see a nuke,\ncook some i-frames", "MrBreast ain't gonna\nleave you broke,\nbuy shit", "watch ur step,\nbanana peels are\neverywhere", "see a minos prime?\njump off of a brigde\nhe will follow", "" };
			List<string> list3 = new List<string> { ", duh.", ", brother.", ", bozo.", ", swag.", "" };
			int num = Random.Range(0, 100);
			if (num > 20)
			{
				result = "";
				result += list[Random.Range(0, list.Count - 1)];
				result += list2[Random.Range(0, list2.Count - 1)];
				result += list3[Random.Range(0, list3.Count - 1)];
			}
			return result;
		}

		public static string CurseText_RewriteAsKitten(string text)
		{
			staticLog((LogLevel)16, "Utilizing Discord Kittens...");
			string text2 = text;
			List<string> list = new List<string> { "OwO", "UwU", ">w<", "IwI", "" };
			Dictionary<string, string> dictionary = new Dictionary<string, string>
			{
				{ "l", "w" },
				{ "i", "e" },
				{ "r", "w" },
				{ "L", "W" },
				{ "I", "E" },
				{ "R", "W" }
			};
			int num = 20;
			foreach (KeyValuePair<string, string> item in dictionary)
			{
				text2 = text2.Replace(item.Key, item.Value);
			}
			List<char> list2 = text2.ToCharArray().ToList();
			for (int i = 0; i < list2.Count; i++)
			{
				if (list2[i].ToString() == " " && Random.Range(0, 100) <= num)
				{
					List<char> collection = (" " + list[Random.Range(0, list.Count - 1)]).ToCharArray().ToList();
					list2.InsertRange(i, collection);
				}
			}
			text2 = "";
			foreach (char item2 in list2)
			{
				text2 += item2;
			}
			string text3 = list[Random.Range(0, list.Count - 1)];
			return text3 + " " + text2;
		}

		public static string CurseText_RewriteAsGenAlpha(string text)
		{
			staticLog((LogLevel)16, "Utilizing Brainrot Slang...");
			string text2 = text.ToLower();
			Dictionary<string, string> dictionary = new Dictionary<string, string>
			{
				{ "machine", "rizzhine" },
				{ "turn", "cook" },
				{ "layers", "rizzlers" },
				{ "palace", "aura" },
				{ "kind", "rizz" },
				{ "crossing", "rizzing" },
				{ "will", "aura" },
				{ "god", "gyatt" },
				{ "behold", "rizz up" },
				{ "angel", "rizzler" },
				{ "error", "yapper" },
				{ "imperfection", "capper" },
				{ "less", "more cooked" },
				{ "death", "cap" },
				{ "punishement", "aura" },
				{ "free", "rizzed" },
				{ "last", "skibidi" },
				{ "gabriel", "gyattiel" },
				{ "dawns", "rizz" },
				{ "gore", "aura" },
				{ "glisen", "be cooked" },
				{ "temples", "fanum tax" },
				{ "man", "rizzlers" },
				{ "creature", "sigma" },
				{ "steel", "rizz" },
				{ "crimes", "caps" },
				{ "humanity", "rizzlers" },
				{ "visitor", "rizzler" },
				{ "long", "real" },
				{ "kingdom", "aura" },
				{ "heaven", "yappers" },
				{ "forgotten", "capping" },
				{ "name", "rizz" },
				{ "eager", "skibidi" },
				{ "blood", "aura" },
				{ "stains", "rizzes" },
				{ "curious", "edging" },
				{ "skills", "rizz" },
				{ "weapon", "aura" },
				{ "citizens", "yapper" },
				{ "crush", "cap" },
				{ "die", "cap" }
			};
			foreach (KeyValuePair<string, string> item in dictionary)
			{
				text2 = text2.Replace(item.Key, item.Value);
			}
			return text2;
		}

		public static int PersonalizedRandom(int min, int max, string addition = "0")
		{
			int num = Mathf.Abs(addition.GetHashCode() % 1000000);
			Random random = new Random(AbsurdSaveFileManager.GetPersonalCode() + num);
			return random.Next(min, max + 1);
		}

		public static void RerollPersonalization()
		{
			AbsurdSaveFileManager.Main_WriteValue("personalCode", Random.Range(100000000, 999999999));
			((ConfigValueElement<int>)(object)displayPersonalCode).SetValue(AbsurdSaveFileManager.GetPersonalCode());
		}

		private void UpdatePersonalizationDisplay()
		{
			((ConfigValueElement<int>)(object)displayPersonalCode).SetValue(AbsurdSaveFileManager.GetPersonalCode());
		}

		public static void StartEEUnlockScene()
		{
			staticLog((LogLevel)16, "New Easter Egg Unlocked!");
			mevar.ResetLisence(0, silent: true);
			mevar.ResetLisence(1, silent: true);
			mevar.ResetLisence(2, silent: true);
			MonoSingleton<HudMessageReceiver>.Instance.ClearMessage();
			EE_unlockSceneVars[0] = 15f;
		}

		public static void staticLog(LogLevel level, object log)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			((BaseUnityPlugin)mevar).Logger.Log(level, log);
		}

		private void DrunkStep()
		{
			//IL_002d: 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)
			float num = Mathf.Clamp((float)nmov.hp / 50f, 0f, 10f);
			Rigidbody rb = nmov.rb;
			rb.velocity += new Vector3(Random.Range(-9f * num, 9f * num), 0f, Random.Range(-9f * num, 9f * num));
			CameraController instance = MonoSingleton<CameraController>.Instance;
			instance.rotationX += Random.Range(-6f * num, 6f * num);
			CameraController instance2 = MonoSingleton<CameraController>.Instance;
			instance2.rotationY += Random.Range(-6f * num, 6f * num);
			if (drunkSteps > 0)
			{
				((MonoBehaviour)this).Invoke("DrunkStep", 0.5f);
				drunkSteps--;
			}
		}

		private void AddRecoiler()
		{
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			((Component)nmov).gameObject.AddComponent<RecoilManager>();
			((Component)nmov).gameObject.AddComponent<TwichChatSystem>();
			((Component)nmov).gameObject.AddComponent<AbsurdKill_ObjectPlugin>();
			((Component)nmov).GetComponent<TwichChatSystem>().Stop();
			if (currentEffects.Contains("ULTRACHAT"))
			{
				((Component)nmov).GetComponent<TwichChatSystem>().TwitchMessageChain();
			}
			if (Patch_PartyLights)
			{
				Light[] array = Object.FindObjectsOfType<Light>();
				foreach (Light val in array)
				{
					val.color = Color.HSVToRGB(Random.Range(0f, 255f) / 255f, 1f, 1f);
				}
			}
		}
	}
	public class NewEventsManager
	{
		public static void CastEvent(string name)
		{
			//IL_0069: 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_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_0333: 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_0358: 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_03b0: Expected O, but got Unknown
			switch (name)
			{
			case "airdrop":
			{
				NewMovement nmov2 = AK_Controller.nmov;
				Object.Instantiate<GameObject>(AK_Controller.prefabDict["GuttermanAirdrop"], ((Component)nmov2).transform.position + new Vector3(2f, 0f, 0f), Quaternion.identity);
				MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("I mailed you a Guttterman", "", "", 0, false, false, true);
				break;
			}
			case "talk":
			{
				List<string> list2 = new List<string> { "Whatch out for that \npolice officer!", "Why can't you heal \nfrom corpses?", "Remember Bear 5?", "Yoo, is that V1\nfrom hit game\nULTRAKILL?!", "You failed the \npacifist route.", "Throw a coin.", "LUCKY \nPERSONALIZATIONS:\n10... - 13...", "Hello, my username is\n[NO LEAKING DATA!]", "What a beatiful day!", "" };
				if (AK_Controller.allowLeakingData)
				{
					list2[list2.IndexOf("Hello, my username is\n[NO LEAKING DATA!]")] = "Hello, my username is\n" + Environment.UserName;
				}
				if (Holidays.isAprilFools)
				{
					string text2 = "";
					if (AK_Controller.allowLeakingData)
					{
						text2 = ", " + Environment.UserName;
					}
					list2[list2.IndexOf("What a beatiful day!")] = "Happy April Fools" + text2 + "!";
				}
				else if (Holidays.isNewYear)
				{
					list2[list2.IndexOf("What a beatiful day!")] = $"Goodbye {DateTime.Today.Year - 1}, \nWelcome {DateTime.Today.Year}";
				}
				else if (Holidays.isNight)
				{
					list2[list2.IndexOf("What a beatiful day!")] = $"WHY ARE YOU PLAYING AT\n{DateTime.Now.Hour}:{DateTime.Now.Minute} AM?!";
				}
				else if (Holidays.isLate)
				{
					if (22 - DateTime.Now.Hour > 0)
					{
						list2[list2.IndexOf("What a beatiful day!")] = $"You will need to go to sleep in\n{22 - DateTime.Now.Hour} hours.";
					}
					else
					{
						list2[list2.IndexOf("What a beatiful day!")] = "You need to go to sleep!";
					}
				}
				MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage(list2[Random.Range(0, list2.Count - 1)], "", "", 0, false, false, true);
				break;
			}
			case "spawn_nextbot":
			{
				List<string> list = new List<string>();
				list.Add("Obunga");
				string text = list[Random.Range(0, list.Count)];
				NewMovement nmov = AK_Controller.nmov;
				AbsurdNextbot.SpawnNextbot(((Component)nmov).transform.position + new Vector3(2f, 0f, 0f), new EnemyTarget(((Component)nmov).transform), 30f, AbsurdAssetLoader.LoadTextureAssetAsSprite("AbsurdKillMod.Assets.Imagery.Nextbots." + text + ".png", (Vector2?)new Vector2(0.5f, 0.5f), 50f), AbsurdAssetLoader.LoadSoundAsset("AbsurdKillMod.Assets.SFX.Nextbots." + text + "Loop.wav"), text);
				MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage(text + " Nextbot has spawned.", "", "", 0, false, false, true);
				break;
			}
			case "cave_sfx":
				HerobrineEngine.PlayCaveSound();
				break;
			}
		}
	}
}
namespace AbsurdKillMod.Systems
{
	public class AbsurdAssetLoader
	{
		public static Dictionary<string, object> assetChace = new Dictionary<string, object>();

		public static Texture2D LoadTextureAsset(string ClassPath)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Expected O, but got Unknown
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Expected O, but got Unknown
			if (assetChace.TryGetValue(ClassPath, out var value))
			{
				return (Texture2D)value;
			}
			Assembly executingAssembly = Assembly.GetExecutingAssembly();
			using Stream stream = executingAssembly.GetManifestResourceStream(ClassPath);
			if (stream == null)
			{
				AK_Controller.staticLog((LogLevel)2, "Failed to load Texture2D: " + ClassPath);
				return null;
			}
			byte[] array = new byte[stream.Length];
			stream.Read(array, 0, array.Length);
			Texture2D val = new Texture2D(2, 2);
			ImageConversion.LoadImage(val, array);
			if (!assetChace.ContainsKey(ClassPath))
			{
				assetChace.Add(ClassPath, val);
			}
			return val;
		}

		public static Sprite LoadTextureAssetAsSprite(string ClassPath, Vector2? pivot = null, float PPU = 100f)
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Expected O, but got Unknown
			//IL_005b: 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_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Expected O, but got Unknown
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			if (!pivot.HasValue)
			{
				pivot = new Vector2(0.5f, 0.5f);
			}
			if (assetChace.TryGetValue(ClassPath, out var value))
			{
				Texture2D val = (Texture2D)value;
				return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), pivot.Value, PPU);
			}
			Assembly executingAssembly = Assembly.GetExecutingAssembly();
			using Stream stream = executingAssembly.GetManifestResourceStream(ClassPath);
			if (stream == null)
			{
				AK_Controller.staticLog((LogLevel)2, "Failed to load Image: " + ClassPath);
				return null;
			}
			byte[] array = new byte[stream.Length];
			stream.Read(array, 0, array.Length);
			Texture2D val2 = new Texture2D(2, 2);
			ImageConversion.LoadImage(val2, array);
			if (!assetChace.ContainsKey(ClassPath))
			{
				assetChace.Add(ClassPath, val2);
			}
			return Sprite.Create(val2, new Rect(0f, 0f, (float)((Texture)val2).width, (float)((Texture)val2).height), pivot.Value, PPU);
		}

		public static AudioClip LoadSoundAsset(string ClassPath)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Expected O, but got Unknown
			if (assetChace.TryGetValue(ClassPath, out var value))
			{
				return (AudioClip)value;
			}
			Assembly executingAssembly = Assembly.GetExecutingAssembly();
			using Stream stream = executingAssembly.GetManifestResourceStream(ClassPath);
			if (stream == null)
			{
				AK_Controller.staticLog((LogLevel)2, "Failed to load Wav Sound: " + ClassPath);
				return null;
			}
			byte[] array = new byte[stream.Length];
			stream.Read(array, 0, array.Length);
			AudioClip val = AbsurdByteConverter.AudioClipFromWAVBytes(array);
			if (!assetChace.ContainsKey(ClassPath))
			{
				assetChace.Add(ClassPath, val);
			}
			return val;
		}

		public static AssetBundle LoadEmbbededBundle(string ClassPath)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Expected O, but got Unknown
			if (assetChace.TryGetValue(ClassPath, out var value))
			{
				return (AssetBundle)value;
			}
			Assembly executingAssembly = Assembly.GetExecutingAssembly();
			using Stream stream = executingAssembly.GetManifestResourceStream(ClassPath);
			if (stream == null)
			{
				AK_Controller.staticLog((LogLevel)2, "Failed to load Embbeded Bundle: " + ClassPath);
				return null;
			}
			byte[] array = new byte[stream.Length];
			stream.Read(array, 0, array.Length);
			AssetBundle val = AssetBundle.LoadFromMemory(array);
			if (!assetChace.ContainsKey(ClassPath))
			{
				assetChace.Add(ClassPath, val);
			}
			return val;
		}

		public static ThreeDModelData LoadEmbbededModelData(string modelName, string textureName, string animContName = "")
		{
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Expected O, but got Unknown
			ThreeDModelData threeDModelData = new ThreeDModelData();
			if (assetChace.TryGetValue("[EMBBEDED_MODELS]." + modelName, out var value))
			{
				return (ThreeDModelData)value;
			}
			AssetBundle val = LoadEmbbededBundle("AbsurdKillMod.Assets.3D_Models.ak_models.bundle");
			GameObject val2 = val.LoadAsset<GameObject>(modelName);
			threeDModelData.mesh = val2.GetComponentInChildren<MeshFilter>().sharedMesh;
			threeDModelData.mat = new Material(Shader.Find("Standard"));
			Texture2D mainTexture = val.LoadAsset<Texture2D>(textureName);
			threeDModelData.mat.mainTexture = (Texture)(object)mainTexture;
			if (animContName != "")
			{
				threeDModelData.animatorController = val.LoadAsset<RuntimeAnimatorController>(animContName);
			}
			else
			{
				threeDModelData.animatorController = null;
			}
			if (!assetChace.ContainsKey("[EMBBEDED_MODELS]." + modelName))
			{
				assetChace.Add("[EMBBEDED_MODELS]." + modelName, threeDModelData);
			}
			return threeDModelData;
		}
	}
	public class AbsurdByteConverter
	{
		public static byte[] ToBytes(object variable)
		{
			byte[] result = null;
			using (MemoryStream memoryStream = new MemoryStream())
			{
				BinaryFormatter binaryFormatter = new BinaryFormatter();
				binaryFormatter.Serialize(memoryStream, variable);
				result = memoryStream.ToArray();
			}
			return result;
		}

		public static object FromBytes(byte[] bytes)
		{
			object result = null;
			using (MemoryStream serializationStream = new MemoryStream(bytes))
			{
				BinaryFormatter binaryFormatter = new BinaryFormatter();
				result = binaryFormatter.Deserialize(serializationStream);
			}
			return result;
		}

		public static AudioClip AudioClipFromWAVBytes(byte[] wavFile, string clipName = "loadedClip(copy)")
		{
			int num = BitConverter.ToInt16(wavFile, 22);
			int num2 = BitConverter.ToInt32(wavFile, 24);
			int num3 = BitConverter.ToInt32(wavFile, 28);
			int num4 = FindAudioDataChunkOffset(wavFile);
			int num5 = (wavFile.Length - num4) / 2;
			float[] array = new float[num5];
			int num6 = 0;
			for (int i = num4; i < wavFile.Length; i += 2)
			{
				short num7 = BitConverter.ToInt16(wavFile, i);
				array[num6++] = (float)num7 / 32768f;
			}
			AudioClip val = AudioClip.Create(clipName, num5 / num, num, num2, false);
			val.SetData(array, 0);
			return val;
		}

		public static int FindAudioDataChunkOffset(byte[] wavFile)
		{
			for (int i = 0; i < wavFile.Length - 4; i++)
			{
				if (wavFile[i] == 100 && wavFile[i + 1] == 97 && wavFile[i + 2] == 116 && wavFile[i + 3] == 97)
				{
					return i + 8;
				}
			}
			throw new Exception("WAV data chunk not found.");
		}
	}
	public class AbsurdEffectListGen
	{
		public static List<string> GenerateEffectList(Scene targetScene)
		{
			List<string> list = new List<string>();
			List<string> list2 = new List<string>();
			if (AK_Controller.Peronl_BallonHeads)
			{
				list2.Add("HuskBallonHeads");
			}
			if (AK_Controller.Peronl_EnemyMentos)
			{
				list2.Add("EnemyMinosGift");
			}
			if (AK_Controller.Peronl_EnemyWeakness)
			{
				list2.Add("HuskRandomPower");
			}
			if (AK_Controller.Peronl_NaturalRegen)
			{
				list2.Add("NaturalRegen");
			}
			if (AK_Controller.Peronl_EnemySizes)
			{
				list2.Add("RandomEnemySize");
			}
			if (AK_Controller.Peronl_EnemyGrowth)
			{
				list2.Add("EnemyGrowth");
			}
			if (AK_Controller.Peronl_RainbowBlood)
			{
				list2.Add("RainbowBlood");
			}
			if (AK_Controller.Peronl_VirtueBrain)
			{
				list2.Add("SmartVirtues");
			}
			if (AK_Controller.Peronl_DrunkV1)
			{
				list2.Add("DrunkV1");
			}
			if (AK_Controller.Peronl_Spinny)
			{
				list2.Add("Spinny");
			}
			if (AK_Controller.Peronl_WetLevel)
			{
				list2.Add("Slippery");
			}
			if (AK_Controller.Peronl_UltraTwichChat)
			{
				list2.Add("ULTRACHAT");
			}
			for (int i = 0; i < AK_Controller.PeronlAmount; i++)
			{
				if (list2.Count > 0)
				{
					string item = list2[AK_Controller.PersonalizedRandom(0, list2.Count - 1, ((Scene)(ref targetScene)).name)];
					list.Add(item);
					list2.Remove(item);
				}
			}
			return list;
		}
	}
	public class AbsurdSaveFileManager
	{
		public static DotABSF NewSaveFromBytes(byte[] bytes)
		{
			File.WriteAllBytes(AK_Controller.SaveFileFile, bytes);
			return (DotABSF)AbsurdByteConverter.FromBytes(bytes);
		}

		public static DotABSF ReadMainSave()
		{
			return (DotABSF)AbsurdByteConverter.FromBytes(File.ReadAllBytes(AK_Controller.SaveFileFile));
		}

		public static int GetPersonalCode()
		{
			return ReadMainSave().personalCode;
		}

		public static void Main_WriteValue(string valueID, object value)
		{
			DotABSF dotABSF = ReadMainSave();
			if (valueID == "personalCode")
			{
				dotABSF.personalCode = (int)value;
			}
			if (valueID == "EEunlocks")
			{
				dotABSF.unlockedEasterEggs = (List<string>)value;
			}
			byte[] bytes = AbsurdByteConverter.ToBytes(dotABSF);
			NewSaveFromBytes(bytes);
		}
	}
	public class ForcerFunctions
	{
		public static bool ApplyForceKill()
		{
			AbsurdKill_ObjectPlugin component = ((Component)MonoSingleton<NewMovement>.Instance).GetComponent<AbsurdKill_ObjectPlugin>();
			if (!Object.op_Implicit((Object)(object)component))
			{
				return false;
			}
			bool forceKill = component.forceKill;
			component.forceKill = false;
			return forceKill;
		}
	}
	public class HerobrineEngine
	{
		public static void PlayCaveSound(bool isKillSound = false)
		{
			string text = Mathf.Clamp(Random.Range(1, 20), 0, 19).ToString();
			if (isKillSound)
			{
				text = "Kill";
			}
			((Component)MonoSingleton<NewMovement>.Instance).GetComponent<AudioSource>().PlayOneShot(AbsurdAssetLoader.LoadSoundAsset("AbsurdKillMod.Assets.SFX.Cave.Cave" + text + ".wav"));
		}
	}
	public class Holidays
	{
		public static bool isAprilFools
		{
			get
			{
				if (DateTime.Today.Month == 4 && DateTime.Today.Day == 1)
				{
					return true;
				}
				return false;
			}
		}

		public static bool isNewYear
		{
			get
			{
				if (DateTime.Today.Month == 1 && DateTime.Today.Day < 5)
				{
					return true;
				}
				return false;
			}
		}

		public static string timeUntilChristmas
		{
			get
			{
				if (DateTime.Today.Month == 1 && DateTime.Today.Day == 1)
				{
					return "Right Now";
				}
				return $"{365 - (DateTime.Today.DayOfYear - 1)} Days Away";
			}
		}

		public static bool isLate
		{
			get
			{
				if (DateTime.Now.TimeOfDay >= TimeSpan.FromHours(20.0))
				{
					return true;
				}
				return false;
			}
		}

		public static bool isNight
		{
			get
			{
				if (DateTime.Now.TimeOfDay < TimeSpan.FromHours(6.0))
				{
					return true;
				}
				return false;
			}
		}
	}
	public class PersEaster_Controller
	{
		public static List<PersEasterEgg> easterEggs;

		public static string activeEasterEggName;

		public static string recentlyUnlockedEEName;

		public static void Init()
		{
			easterEggs = new List<PersEasterEgg>();
			easterEggs.Add(NewEasterEgg("Beginner's Luck", 100000000, 130000000));
			LoadUnlocks(AbsurdSaveFileManager.ReadMainSave().unlockedEasterEggs);
		}

		public static void LoadUnlocks(List<string> namesOfUnlocked)
		{
			foreach (string item in namesOfUnlocked)
			{
				foreach (PersEasterEgg easterEgg in easterEggs)
				{
					if (easterEgg.easterEggName == item)
					{
						easterEgg.unlocked = true;
						break;
					}
				}
			}
		}

		public static void UpdatePersEasterEggs()
		{
			activeEasterEggName = "None";
			foreach (PersEasterEgg easterEgg in easterEggs)
			{
				if (easterEgg.easterEggName == "Beginner's Luck")
				{
					((ConfigValueElement<string>)(object)AK_Controller.EE1_info).SetValue(easterEgg.statusString);
				}
				if (!(AK_Controller.EE_unlockSceneVars[0] <= 0f))
				{
					continue;
				}
				int personalCode = AbsurdSaveFileManager.GetPersonalCode();
				if (personalCode >= easterEgg.homePersonalizRange[0] && personalCode <= easterEgg.homePersonalizRange[1])
				{
					activeEasterEggName = easterEgg.easterEggName;
					if (!easterEgg.unlocked)
					{
						UnlockEasterEgg(easterEgg.easterEggName);
						AK_Controller.StartEEUnlockScene();
					}
				}
			}
		}

		public static PersEasterEgg NewEasterEgg(string EEname, int EEminRange, int EEmaxRange, bool EEunlocked = false)
		{
			PersEasterEgg persEasterEgg = new PersEasterEgg();
			persEasterEgg.Init(EEname, EEminRange, EEmaxRange);
			persEasterEgg.unlocked = EEunlocked;
			return persEasterEgg;
		}

		public static void UnlockEasterEgg(string easterEggName)
		{
			foreach (PersEasterEgg easterEgg in easterEggs)
			{
				if (easterEgg.easterEggName == easterEggName)
				{
					easterEgg.unlocked = true;
					recentlyUnlockedEEName = easterEggName;
					break;
				}
			}
			List<string> unlockedEasterEggs = AbsurdSaveFileManager.ReadMainSave().unlockedEasterEggs;
			unlockedEasterEggs.Add(easterEggName);
			AbsurdSaveFileManager.Main_WriteValue("EEunlocks", unlockedEasterEggs);
		}
	}
	public class TwichChatSystem : MonoBehaviour
	{
		public void TwitchMessageChain()
		{
			List<string> list = new List<string> { "<color=red>", "<color=blue", "<color=green>" };
			string text = "</color>";
			List<string> list2 = new List<string> { "_xX_", "ULTRA", "V", "", "", "", "", "" };
			List<string> list3 = new List<string>
			{
				"Gamer", "Rick", "Sysiphus", "Minos", "NFT", "Crypto", "Rich", "_One", "Maurice", "Mindflayer",
				"Best"
			};
			List<string> list4 = new List<string>
			{
				"Pro", "Shooter", "Prime", "King", "Lover", "Investor", "Mannequin", "Fan", "Enjoyer", "",
				"", ""
			};
			List<string> list5 = new List<string> { "_Xx_", "_Offical", "_Real", "ULTRAKILL", "", "", "", "" };
			string text2 = text;
			if (AK_Controller.PeronlS_ChatNameColors)
			{
				text2 += list[Random.Range(0, list.Count)];
			}
			text2 += list2[Random.Range(0, list2.Count)];
			text2 += list3[Random.Range(0, list3.Count)];
			text2 += list4[Random.Range(0, list4.Count)];
			text2 += list5[Random.Range(0, list5.Count)];
			text2 += text;
			List<string> list6 = new List<string>
			{
				"Hello Twich!", "V2 collab when?", "How do i pay for Monster Gun?", "That's insane.", "I just saw a Mindflayer", "L", "W", "Maurice is my favorite enemy", "Subscribed", "You have the best style.",
				"I have to donate to this guy.", "I love this.", "You're a loser"
			};
			bool flag = Random.Range(0, 100) < 5;
			int num = Random.Range(50, 1000000);
			string text3 = "";
			if (!AK_Controller.PeronlS_ChatDonations)
			{
				flag = false;
			}
			if (text2 == "")
			{
				text2 = list3[Random.Range(0, list3.Count)];
			}
			text3 += text2;
			if (flag)
			{
				text3 += $" </color>donated {num}<color=orange>P</color>";
			}
			text3 += "</color>: ";
			if (flag)
			{
				text3 += "<color=yellow>";
			}
			text3 += list6[Random.Range(0, list6.Count)];
			if (flag)
			{
				text3 += "</color>";
				GameProgressSaver.AddMoney(num);
				if (Object.op_Implicit((Object)(object)MonoSingleton<StyleHUD>.Instance))
				{
					MonoSingleton<StyleHUD>.Instance.AddPoints(1000, "", (GameObject)null, (EnemyIdentifier)null, -1, "", "");
				}
			}
			StyleHUD instance = MonoSingleton<StyleHUD>.Instance;
			if (Object.op_Implicit((Object)(object)instance))
			{
				instance.AddPoints(AK_Controller.PeronlS_ChatStyle, text3, (GameObject)null, (EnemyIdentifier)null, -1, "", "");
			}
			((MonoBehaviour)this).Invoke("TwitchMessageChain", (float)Random.Range(1, 20) / 10f);
		}

		public void Stop()
		{
			if (((MonoBehaviour)this).IsInvoking("TwitchMessageChain"))
			{
				((MonoBehaviour)this).CancelInvoke("TwitchMessageChain");
			}
		}
	}
}
namespace AbsurdKillMod.Systems.Behaviours
{
	public class AbsurdHerobrine : MonoBehaviour
	{
		public Animator anim;

		public AudioSource sounds;

		public Rigidbody rb;

		public NavMeshAgent agent;

		public bool stare;

		private void Start()
		{
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01de: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)MonoSingleton<NewMovement>.Instance))
			{
				Object.DestroyImmediate((Object)(object)((Component)this).gameObject);
				return;
			}
			ThreeDModelData threeDModelData = AbsurdAssetLoader.LoadEmbbededModelData("HerobrineFr", "HerobrinesTextureFr", "HerobrineAnimationControl");
			MeshFilter val = ((Component)this).gameObject.AddComponent<MeshFilter>();
			val.mesh = threeDModelData.mesh;
			MeshRenderer val2 = ((Component)this).gameObject.AddComponent<MeshRenderer>();
			((Renderer)val2).material = threeDModelData.mat;
			anim = ((Component)this).gameObject.AddComponent<Animator>();
			anim.runtimeAnimatorController = threeDModelData.animatorController;
			AudioSource val3 = ((Component)this).gameObject.AddComponent<AudioSource>();
			val3.spatialBlend = 1f;
			val3.playOnAwake = false;
			val3.loop = false;
			val3.minDistance = 5f;
			val3.maxDistance = 50f;
			rb = ((Component)this).gameObject.AddComponent<Rigidbody>();
			rb.useGravity = true;
			rb.isKinematic = false;
			BoxCollider val4 = ((Component)this).gameObject.AddComponent<BoxCollider>();
			val4.size = new Vector3(0.2f, 3f, 0.2f);
			val4.center = new Vector3(0f, 2f, 0f);
			((Collider)val4).isTrigger = false;
			float num = 20f;
			agent = ((Component)this).gameObject.AddComponent<NavMeshAgent>();
			agent.speed = num;
			agent.angularSpeed = num * 8f;
			agent.acceleration = num * 3f - 5f;
			agent.updateRotation = false;
			agent.updatePosition = false;
			NavMeshHit val5 = default(NavMeshHit);
			if (NavMesh.SamplePosition(((Component)this).transform.position, ref val5, float.PositiveInfinity, -1))
			{
				((Component)this).transform.position = ((NavMeshHit)(ref val5)).position;
			}
			FollowNavMesh val6 = ((Component)this).gameObject.AddComponent<FollowNavMesh>();
			if (!agent.isOnNavMesh)
			{
				val6.target = null;
			}
			else
			{
				val6.target = ((Component)MonoSingleton<NewMovement>.Instance).transform;
			}
			val6.trackFrequency = 0.1f;
		}

		private void Update()
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: 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_004e: Unknown result type (might be due to invalid IL or missing references)
			NewMovement instance = MonoSingleton<NewMovement>.Instance;
			if (stare)
			{
				Quaternion val = Quaternion.LookRotation(((Component)instance).transform.position - ((Component)this).transform.position);
				Vector3 eulerAngles = ((Quaternion)(ref val)).eulerAngles;
				eulerAngles.y = 0f;
				((Component)this).transform.rotation = Quaternion.Euler(eulerAngles);
			}
		}
	}
	public class AbsurdNextbot : MonoBehaviour
	{
		public EnemyTarget target;

		public NavMeshAgent agent;

		public Rigidbody rb;

		public GroundCheckEnemy groundCheck;

		public float speed;

		public Sprite nextbotPNG;

		public AudioClip nextbotTheme;

		private string personalName;

		public float stunTime;

		public float maxJumpForce;

		public Dictionary<string, float> cooldowns;

		private Vector3 lastTrackPos;

		private Vector3 lastDir;

		private float lostTime;

		private void Start()
		{
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_01be: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Expected O, but got Unknown
			//IL_01e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: 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_0251: Unknown result type (might be due to invalid IL or missing references)
			//IL_0258: Expected O, but got Unknown
			//IL_0286: 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_0322: Unknown result type (might be due to invalid IL or missing references)
			//IL_0327: Unknown result type (might be due to invalid IL or missing references)
			cooldowns = new Dictionary<string, float> { { "jumpCheck", 0f } };
			agent = ((Component)this).gameObject.AddComponent<NavMeshAgent>();
			agent.speed = speed;
			agent.angularSpeed = speed * 8f;
			agent.acceleration = speed * 3f - 5f;
			agent.updateRotation = false;
			agent.updatePosition = false;
			NavMeshHit val = default(NavMeshHit);
			if (NavMesh.SamplePosition(((Component)this).transform.position, ref val, float.PositiveInfinity, -1))
			{
				((Component)this).transform.position = ((NavMeshHit)(ref val)).position;
			}
			FollowNavMesh val2 = ((Component)this).gameObject.AddComponent<FollowNavMesh>();
			if (!agent.isOnNavMesh)
			{
				val2.target = null;
			}
			else
			{
				val2.target = target.targetTransform;
			}
			val2.trackFrequency = 0.1f;
			rb = ((Component)this).gameObject.AddComponent<Rigidbody>();
			rb.useGravity = true;
			rb.isKinematic = false;
			rb.interpolation = (RigidbodyInterpolation)1;
			rb.collisionDetectionMode = (CollisionDetectionMode)1;
			rb.constraints = (RigidbodyConstraints)112;
			BoxCollider val3 = ((Component)this).gameObject.AddComponent<BoxCollider>();
			val3.size = new Vector3(0.2f, 3f, 0.2f);
			val3.center = new Vector3(0f, 2f, 0f);
			((Collider)val3).isTrigger = false;
			GameObject val4 = new GameObject(((Object)((Component)this).gameObject).name + " KillZone");
			val4.transform.parent = ((Component)this).gameObject.transform;
			val4.transform.localPosition = Vector3.zero;
			BoxCollider val5 = val4.AddComponent<BoxCollider>();
			val5.size = new Vector3(0.5f, 5f, 5f);
			val5.center = new Vector3(0f, 2.5f, 0f);
			((Collider)val5).isTrigger = true;
			val4.AddComponent<ForceKillCollider>();
			GameObject val6 = new GameObject(((Object)((Component)this).gameObject).name + " Renderer");
			val6.transform.parent = ((Component)this).gameObject.transform;
			val6.transform.localPosition = new Vector3(0f, 3.6f, 0f);
			SpriteRenderer val7 = val6.AddComponent<SpriteRenderer>();
			val7.sprite = nextbotPNG;
			AudioSource val8 = ((Component)this).gameObject.AddComponent<AudioSource>();
			val8.spatialBlend = 1f;
			val8.playOnAwake = false;
			val8.loop = true;
			val8.minDistance = 5f;
			val8.maxDistance = 50f;
			val8.clip = nextbotTheme;
			val8.Play();
			((Component)this).gameObject.AddComponent<DestroyOnCheckpointRestart>();
			lastTrackPos = ((Component)this).transform.position;
			lastDir = Vector3.zero;
			lostTime = 0f;
		}

		private void Update()
		{
			//IL_0037: 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_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: 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_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: 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_017d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
			((Component)this).transform.LookAt(((Component)MonoSingleton<NewMovement>.Instance).transform);
			if (!BlindEnemies.Blind && stunTime <= 0f)
			{
				Vector3 val = lastDir * speed;
				rb.velocity = new Vector3(val.x, rb.velocity.y, val.z);
			}
			if (!agent.isOnNavMesh)
			{
				lostTime += Time.deltaTime;
				if (lostTime >= 10f)
				{
					AK_Controller.staticLog((LogLevel)4, personalName + " has lost.");
					Object.DestroyImmediate((Object)(object)((Component)this).gameObject);
					return;
				}
			}
			else
			{
				lostTime = 0f;
			}
			stunTime = Mathf.Clamp(stunTime - Time.deltaTime, 0f, 999f);
			cooldowns["jumpCheck"] = Mathf.Clamp(cooldowns["jumpCheck"] - Time.deltaTime, 0f, 999f);
			if (BlindEnemies.Blind || stunTime > 0f)
			{
				return;
			}
			Vector3 val2 = agent.steeringTarget - ((Component)this).transform.position;
			lastDir = ((Vector3)(ref val2)).normalized;
			if (cooldowns["jumpCheck"] <= 0f)
			{
				if (Vector3.Distance(lastTrackPos, ((Component)this).transform.position) < 1f)
				{
					TryJumping(ThinkOfJumpPower());
				}
				lastTrackPos = ((Component)this).transform.position;
				cooldowns["jumpCheck"] = 0.2f;
			}
		}

		private float ThinkOfJumpPower(float withElevation = 0.3f)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			float num = 0f;
			float num2 = target.targetTransform.position.y - ((Component)this).transform.position.y;
			return (num2 + withElevation) / 10f;
		}

		private void TryJumping(float force)
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: 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_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//I