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.Networking; 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; public void StopTheCarou() { ControllerAssistant.carouseling = false; } public void GoCringeWithGravity() { //IL_0016: 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_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) List list = new List { new Vector3(1f, 0f, 0f), new Vector3(0f, 1f, 0f), new Vector3(0f, 0f, 1f), new Vector3(0.5f, 0.5f, 0f), new Vector3(0f, 0.5f, 0.5f), new Vector3(0.33f, 0.33f, 0.33f), new Vector3(-1f, 0f, 0f), new Vector3(0f, -1f, 0f), new Vector3(0f, 0f, -1f), new Vector3(-0.5f, -0.5f, 0f), new Vector3(0f, -0.5f, -0.5f), new Vector3(-0.33f, -0.33f, -0.33f), new Vector3(0.33f, 0.33f, -0.33f), new Vector3(-0.33f, 0.33f, -0.33f), new Vector3(-0.33f, 0.33f, 0.33f) }; Vector3 val = list[Random.Range(0, list.Count)]; val *= Mathf.Abs(ControllerAssistant.nonCringeGravity.y); Physics.gravity = val; ((MonoBehaviour)this).Invoke("GoCringeWithGravity", 3f); } } [BepInPlugin("ultrakill.exmagikguy.absurdThingMod", "ABSURDKILL", "1.7.6")] 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 audioStore = new Dictionary(); [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 be 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/Nextbot Summon/Possible Nextbots", "Obunga", 0, null)] public static bool Nextbots_Obunga = true; [Configgable("Random Events/Nextbot Summon/Possible Nextbots", "Bear5", 1, null)] public static bool Nextbots_BearFive = 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 displayPersonalCode = new ConfigInputField(100000000, (Func)null, (Func>)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 EE1_info = new ConfigInputField("LOCKED", (Func)null, (Func>)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 possibleEvents = new List(); public static NewMovement nmov; private GunControl gc; public static 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 ownedProducts = new List(); private int weaponSwitches = 0; private Harmony harmony; private Dictionary enemyGrades = new Dictionary { { (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 enemyGradeNums = new Dictionary { { 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 prefabDict = new Dictionary { { "Cannonball", null }, { "Diddy Droplet", null }, { "Revolver Beam", null }, { "Revolver Beam Alt", null }, { "Nail", null }, { "Railcannon Beam", null }, { "Blastwave", null }, { "GuttermanAirdrop", null }, { "BloodSplat", 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 currentEffects = new List(); 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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown ConfigMenu = new ConfigBuilder("ultrakill.exmagikguy.absurdThingMod", "ABSURDKILL"); ConfigMenu.BuildType(typeof(AK_Controller)); ConfigMenu.BuildType(typeof(ControllerAssistant)); 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); } ControllerAssistant.NewSceneAssist(); } private void Start() { //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) 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("goofy_slip")); audioStore.Add("Splat", val.LoadAsset("goofy_fall")); audioStore.Add("WarMusic", val.LoadAsset("music_war")); audioStore.Add("NukeFly", val.LoadAsset("nuke_fly")); audioStore.Add("NukeExplode", val.LoadAsset("nuke_explode")); audioStore.Add("CoinSfx", val.LoadAsset("coin_collect")); audioStore.Add("EE_Unlock", val.LoadAsset("mysteryBells")); AudioSource val2 = ((Component)this).gameObject.AddComponent(); 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(); dotABSF.readWarning = false; byte[] bytes = AbsurdByteConverter.ToBytes(dotABSF); AbsurdSaveFileManager.NewSaveFromBytes(bytes); } ((MonoBehaviour)this).Invoke("UpdatePersonalizationDisplay", 0.1f); PersEaster_Controller.activeEasterEggName = "None"; PersEaster_Controller.Init(); ControllerAssistant.nonCringeGravity = Physics.gravity; } private void OnCheckpointRestart() { bombingTime = 0f; ((MonoBehaviour)this).CancelInvoke("SendNuke"); if (((MonoBehaviour)this).IsInvoking("LandNuke")) { ((Component)this).GetComponent().Stop(); ((MonoBehaviour)this).CancelInvoke("LandNuke"); } postBanana = false; if (Random.Range(0, 100) <= 50) { if (MonoSingleton.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().PlayOneShot(findSoundFromStore("EE_Unlock")); if (loop_musicActi) { loop_musicSec = 0f; loop_musicActi = false; ((Component)this).GetComponent().Stop(); if (sceneHasMusic) { MonoSingleton.Instance.ForceStartMusic(); } } if (!MonoSingleton.Instance.off) { sceneHasMusic = true; } MonoSingleton.Instance.off = true; MonoSingleton.Instance.forcedOff = true; } else if (EE_unlockSceneVars[1] == 10f) { MonoSingleton.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.Instance.SendHudMessage("Go to Extras in Configgy\nfor more info!", "", "", 0, false, false, true); } else if (EE_unlockSceneVars[1] == 0f && sceneHasMusic) { MonoSingleton.Instance.ForceStartMusic(); } } if (currentEffects.Contains("DrunkV1")) { drunkSteps = 2; } gc = MonoSingleton.Instance; nmov = MonoSingleton.Instance; List list = new List(); collectedCoinThisFrame = false; if ((Object)(object)nmov != (Object)null) { list = MonoSingleton.Instance.GetCurrentEnemies(); } if (bombingTime > 0f && (Object)(object)nmov != (Object)null) { MonoSingleton.Instance.CameraShake(1f); if (dice1000 < 400) { GameObject val = Object.Instantiate(prefab_grenade, ((Component)nmov).transform.position + new Vector3(Random.Range(0f, 500f), 100f, Random.Range(0f, 500f)), Quaternion.identity); val.GetComponent().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(prefab_grenade, ((Component)val2).transform.position + new Vector3(0f, 100f, 0f), Quaternion.identity); val3.GetComponent().GrenadeBeam(val3.transform.position + new Vector3(0f, -1f, 0f), (GameObject)null); } if (dice1000 < 20) { GameObject val4 = Object.Instantiate(prefab_grenade, ((Component)nmov).transform.position + new Vector3(0f, 100f, 0f), Quaternion.identity); val4.GetComponent().GrenadeBeam(val4.transform.position + new Vector3(0f, -1f, 0f), (GameObject)null); } bombingTime = Mathf.Clamp(bombingTime - Time.deltaTime, 0f, 7f); } if (((ConfigValueElement)(object)Extra_rerollPersonaliz).Value) { RerollPersonalization(); ((ConfigValueElement)(object)Extra_rerollPersonaliz).SetValue(false); } if (loop_musicActi) { loop_musicSec += Time.deltaTime; if (loop_musicSec >= loop_musicLen) { ((Component)this).GetComponent().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.Instance.SendHudMessage("" + LisenceName[i] + " LISENCE EXPIRING SOON!", "", "", 0, false, false, true); LisenceWarned[i] = true; } if (LisenceTimes[i] <= 0f) { num++; if (!LisenceExpire[i]) { HudMessageReceiver instance = MonoSingleton.Instance; string[] obj = new string[5] { "", LisenceName[i], " LISENCE EXPIRED!\nPress [", null, null }; KeyCode value = ((ConfigValueElement)(object)Extra_shopKey).Value; obj[3] = ((object)(KeyCode)(ref value)).ToString(); obj[4] = "] to buy new one\nfor 100000P!"; 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)(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.Instance.SendHudMessage("You won!\nYour money doubled.", "", "", 0, false, false, true); } else { GameProgressSaver.AddMoney(-Mathf.RoundToInt((float)(GameProgressSaver.GetMoney() / 2))); MonoSingleton.Instance.SendHudMessage("You lost!\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.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().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().Stop(); if (sceneHasMusic) { MonoSingleton.Instance.ForceStartMusic(); } if ((Object)(object)MonoSingleton.Instance != (Object)null) { MonoSingleton.Instance.SlowDown(0.01f); } nmov.FullHeal(true); nmov.FullStamina(); MonoSingleton.Instance.MaxCharges(); twistVillanGone[1] = true; twistVillanGone[0] = false; } InputManager instance2 = MonoSingleton.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())) { ((Component)nmov).GetComponent().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; ControllerAssistant.UpdateAssist(); } 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_007c: 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_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_0690: Unknown result type (might be due to invalid IL or missing references) //IL_0695: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_0820: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_0839: Unknown result type (might be due to invalid IL or missing references) //IL_083e: Unknown result type (might be due to invalid IL or missing references) //IL_0845: Unknown result type (might be due to invalid IL or missing references) //IL_0847: Unknown result type (might be due to invalid IL or missing references) //IL_0849: Unknown result type (might be due to invalid IL or missing references) //IL_085a: Unknown result type (might be due to invalid IL or missing references) //IL_085f: Unknown result type (might be due to invalid IL or missing references) //IL_0864: Unknown result type (might be due to invalid IL or missing references) //IL_0869: Unknown result type (might be due to invalid IL or missing references) //IL_0abf: Unknown result type (might be due to invalid IL or missing references) //IL_0ad3: Unknown result type (might be due to invalid IL or missing references) //IL_0ad8: Unknown result type (might be due to invalid IL or missing references) //IL_0add: Unknown result type (might be due to invalid IL or missing references) //IL_0b06: Unknown result type (might be due to invalid IL or missing references) //IL_0b10: Expected O, but got Unknown //IL_0899: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08b2: Unknown result type (might be due to invalid IL or missing references) //IL_08b7: Unknown result type (might be due to invalid IL or missing references) //IL_08be: Unknown result type (might be due to invalid IL or missing references) //IL_08c0: Unknown result type (might be due to invalid IL or missing references) //IL_08c2: Unknown result type (might be due to invalid IL or missing references) //IL_08d3: Unknown result type (might be due to invalid IL or missing references) //IL_08d8: Unknown result type (might be due to invalid IL or missing references) //IL_08dd: Unknown result type (might be due to invalid IL or missing references) //IL_08e2: Unknown result type (might be due to invalid IL or missing references) //IL_09ca: Unknown result type (might be due to invalid IL or missing references) //IL_09cf: Unknown result type (might be due to invalid IL or missing references) //IL_0532: Unknown result type (might be due to invalid IL or missing references) //IL_0537: Unknown result type (might be due to invalid IL or missing references) //IL_0540: Unknown result type (might be due to invalid IL or missing references) //IL_0545: Unknown result type (might be due to invalid IL or missing references) //IL_0549: Unknown result type (might be due to invalid IL or missing references) //IL_054b: Unknown result type (might be due to invalid IL or missing references) //IL_05a0: Unknown result type (might be due to invalid IL or missing references) //IL_05aa: Unknown result type (might be due to invalid IL or missing references) //IL_0bab: Unknown result type (might be due to invalid IL or missing references) //IL_0bb9: Unknown result type (might be due to invalid IL or missing references) //IL_0d41: Unknown result type (might be due to invalid IL or missing references) //IL_0d4f: Unknown result type (might be due to invalid IL or missing references) //IL_0bed: Unknown result type (might be due to invalid IL or missing references) //IL_0bf2: 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_0d89: Unknown result type (might be due to invalid IL or missing references) //IL_0c1d: Unknown result type (might be due to invalid IL or missing references) //IL_0c22: Unknown result type (might be due to invalid IL or missing references) //IL_0c2b: Unknown result type (might be due to invalid IL or missing references) //IL_0c30: Unknown result type (might be due to invalid IL or missing references) //IL_0c38: Unknown result type (might be due to invalid IL or missing references) //IL_0c3f: 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_0c64: Unknown result type (might be due to invalid IL or missing references) //IL_0c78: Unknown result type (might be due to invalid IL or missing references) //IL_0c7d: Unknown result type (might be due to invalid IL or missing references) //IL_0da2: Unknown result type (might be due to invalid IL or missing references) //IL_0da7: Unknown result type (might be due to invalid IL or missing references) //IL_0db0: Unknown result type (might be due to invalid IL or missing references) //IL_0db5: Unknown result type (might be due to invalid IL or missing references) //IL_0dbd: Unknown result type (might be due to invalid IL or missing references) //IL_0dc4: Unknown result type (might be due to invalid IL or missing references) //IL_0dc6: Unknown result type (might be due to invalid IL or missing references) //IL_0dd7: Unknown result type (might be due to invalid IL or missing references) //IL_0deb: Unknown result type (might be due to invalid IL or missing references) //IL_0df0: Unknown result type (might be due to invalid IL or missing references) int num = UpdatePossibleEvents(); if (num < 1 || !chaos || EE_unlockSceneVars[0] > 0f || ControllerAssistant.disableChaos) { return; } int index2 = index % num; string text = possibleEvents[index2]; switch (text) { case "BananaPeel": { ((Component)nmov).GetComponent().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.Instance.ScrollArm(); MonoSingleton.Instance.currentPunch.PunchStart(); ((Component)nmov).GetComponent().recoilLeft = 10f; postBanana = true; break; } case "PlotTwist": { List currentEnemies6 = MonoSingleton.Instance.GetCurrentEnemies(); if (currentEnemies6.Count < 1 || twistVillanGone[0]) { return; } EnemyIdentifier val7 = currentEnemies6[Random.Range(0, currentEnemies6.Count)]; foreach (EnemyIdentifier item2 in currentEnemies6) { if ((Object)(object)item2 != (Object)(object)val7) { item2.puppet = true; item2.Explode(false); } } MonoSingleton.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(); component4.bossName += ", The King of Hell."; if (Object.op_Implicit((Object)(object)((Component)val7).gameObject.GetComponent())) { AudioSource component5 = ((Component)val7).GetComponent(); component5.pitch /= 2f; } nmov.FullHeal(true); nmov.FullStamina(); MonoSingleton.Instance.MaxCharges(); Grenade[] array = Object.FindObjectsOfType(); foreach (Grenade val8 in array) { val8.Explode(false, false, false, 1f, false, (GameObject)null, false); } Magnet[] array2 = Object.FindObjectsOfType(); foreach (Magnet val9 in array2) { val9.health = 0f; } if (!MonoSingleton.Instance.off) { sceneHasMusic = true; MonoSingleton.Instance.ForceStopMusic(); } else { sceneHasMusic = false; } ((Component)this).GetComponent().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.Instance.rankIndex + 1, 1, 8); List currentEnemies4 = MonoSingleton.Instance.GetCurrentEnemies(); foreach (EnemyIdentifier item3 in currentEnemies4) { if (item3.healthBuffModifier > 60f) { currentEnemies4.Remove(item3); } } if (currentEnemies4.Count < 1) { return; } if (currentEnemies4.Count < num4) { num4 = currentEnemies4.Count; } List list = new List(); for (int i = 0; i < num4; i++) { EnemyIdentifier item = currentEnemies4[Random.Range(0, currentEnemies4.Count)]; 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, position3, rotation3); EnemyIdentifier component2 = val4.GetComponent(); component2.attackEnemies = true; component2.ignorePlayer = true; component2.HealthBuff(999f); AbsurdKill_ObjectPlugin absurdKill_ObjectPlugin = ((Component)component2).gameObject.AddComponent(); 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 component3 = ((Component)component2).GetComponent(); component3.pitch *= 2f; } item4.puppet = true; item4.Explode(false); } MonoSingleton.Instance.SendHudMessage($"{num4} enemies have diecided\nto fight on your\nside.", "", "", 0, false, false, true); break; } case "Nuke": MonoSingleton.Instance.SendHudMessage("NUKE IS NEARBY\n5 SECONDS TO RUN!", "", "", 0, false, false, true); ((MonoBehaviour)this).Invoke("SendNuke", 5f); nukePosition = ((Component)nmov).transform.position; break; case "Bombing": MonoSingleton.Instance.SendHudMessage("IT'S RAINING GRENADES!", "", "", 0, false, false, true); bombingTime = 7f; break; case "MoneyUp": MonoSingleton.Instance.SendHudMessage("MrBeast gave you \n3000000 Points!", "", "", 0, false, false, true); GameProgressSaver.AddMoney(3000000); break; case "OilUp": { MonoSingleton.Instance.SendHudMessage("Everyone oiled up!", "", "", 0, false, false, true); GameProgressSaver.AddMoney(100000); List currentEnemies7 = MonoSingleton.Instance.GetCurrentEnemies(); foreach (EnemyIdentifier item5 in currentEnemies7) { item5.AddFlammable(9999f); } nmov.ForceAddAntiHP(9999f, true, true, true, false); break; } case "Airstrike": { MonoSingleton.Instance.SendHudMessage("AIRSTRIKE INCOMING!", "", "", 0, false, false, true); List currentEnemies5 = MonoSingleton.Instance.GetCurrentEnemies(); foreach (EnemyIdentifier item6 in currentEnemies5) { Vector3 val5 = ((Component)item6).transform.position + new Vector3(0f, 100f, 0f); Object.Instantiate(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(prefab_rocket, val6, Quaternion.LookRotation(val6 - (val6 + new Vector3(0f, 1f, 0f)))); break; } case "WeaponRoulette": MonoSingleton.Instance.SendHudMessage("Weapon Roulette!", "", "", 0, false, false, true); if (((MonoBehaviour)this).IsInvoking("WRoulettePoint")) { ((MonoBehaviour)this).CancelInvoke("WRoulettePoint"); } weaponSwitches = 10; WRoulettePoint(); break; case "LemmeKillEm": { List currentEnemies3 = MonoSingleton.Instance.GetCurrentEnemies(); if (currentEnemies3.Count <= 0) { break; } MonoSingleton.Instance.SendHudMessage("Lemme kill those guys.", "", "", 0, false, false, true); foreach (EnemyIdentifier item7 in currentEnemies3) { Object.Instantiate(prefab_explosion, ((Component)item7).transform.position, Quaternion.identity); if (Object.op_Implicit((Object)(object)item7.idol)) { item7.idol.Death(); } item7.puppet = true; item7.Explode(false); } break; } case "MoreBlood": MonoSingleton.Instance.SendHudMessage("ULTRAHEAL!!!!!", "", "", 0, false, false, true); nmov.FullHeal(true); nmov.hp = 2000001; break; case "BlackholeHere": { MonoSingleton.Instance.SendHudMessage("Here's a blackhole.", "", "", 0, false, false, true); GameObject val3 = Object.Instantiate(prefab_blackhole, ((Component)nmov).transform.position + new Vector3(5f, 0f, 0f), Quaternion.identity); BlackHoleProjectile component = val3.GetComponent(); component.enemy = true; component.target = new EnemyTarget(((Component)nmov).transform); component.speed = 3f; component.Activate(); break; } case "D10": { List currentEnemies2 = MonoSingleton.Instance.GetCurrentEnemies(); if (currentEnemies2.Count <= 0) { break; } MonoSingleton.Instance.SendHudMessage("Enemies downgraded!", "", "", 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(enemyGrades[key2], position2, rotation2); ((Component)item8).gameObject.AddComponent().dontSpawnSurprise = true; Transform transform3 = ((Component)item8).transform; transform3.position += new Vector3(0f, -100f, 0f); item8.puppet = true; item8.Explode(false); } } break; } case "RD10": { List currentEnemies = MonoSingleton.Instance.GetCurrentEnemies(); if (currentEnemies.Count <= 0) { break; } MonoSingleton.Instance.SendHudMessage("Enemies Evolved!", "", "", 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) { return; } Vector3 position = ((Component)item9).transform.position; Quaternion rotation = ((Component)item9).transform.rotation; GameObject val = Object.Instantiate(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; } ControllerAssistant.ChaosAssist(text); } 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"); } ControllerAssistant.PossibleEventsAssist(); return possibleEvents.Count; } private void SendNuke() { ((Component)this).GetComponent().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().PlayOneShot(findSoundFromStore("NukeExplode")); Explosion[] componentsInChildren = Object.Instantiate(prefab_nuke, nukePosition, Quaternion.identity).GetComponentsInChildren(); foreach (Explosion val in componentsInChildren) { val.maxSize *= 10f; val.speed *= 10f; val.damage = 2000000; } MonoSingleton.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 val = Addressables.LoadAssetAsync((object)key); val.Completed += delegate(AsyncOperationHandle 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 val = Addressables.LoadAssetAsync((object)key); val.Completed += delegate(AsyncOperationHandle 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 val = Addressables.LoadAssetAsync((object)key); val.Completed += delegate(AsyncOperationHandle 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"); StorePrefabFromAddressables("Assets/Particles/Blood/BS Head.prefab", "BloodSplat"); } 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(); Shotgun component2 = allWeapon.GetComponent(); Nailgun component3 = allWeapon.GetComponent(); Railcannon component4 = allWeapon.GetComponent(); RocketLauncher component5 = allWeapon.GetComponent(); ShotgunHammer component6 = allWeapon.GetComponent(); 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(); Shotgun component8 = allWeapon2.GetComponent(); Nailgun component9 = allWeapon2.GetComponent(); Railcannon component10 = allWeapon2.GetComponent(); RocketLauncher component11 = allWeapon2.GetComponent(); ShotgunHammer component12 = allWeapon2.GetComponent(); 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.Instance.SendHudMessage(LisenceName[index] + " has been restored!", "", "", 0, false, false, true); } else { MonoSingleton.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.Instance.SendHudMessage("Lisence Bought!", "", "", 0, false, false, true); } else { MonoSingleton.Instance.SendHudMessage("Insufficent points!", "", "", 0, false, false, true); } } } } else if (currentProductName != "" && !ownedProducts.Contains(currentProductName)) { if (GameProgressSaver.GetMoney() >= currentProductPrice) { GameProgressSaver.AddMoney(-currentProductPrice); ownedProducts.Add(currentProductName); MonoSingleton.Instance.SendHudMessage("" + currentProductName + " Bought!", "", "", 0, false, false, true); } else { MonoSingleton.Instance.SendHudMessage("Insufficent points!", "", "", 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.Instance; string[] obj = new string[8] { advertismentScript, "\nUse [", null, null, null, null, null, null }; KeyCode value = ((ConfigValueElement)(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] = "P!"; 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 text = "Yo bro, no tips today, \nsurvive yourself, brother."; List list = new List { "Yo, ", "Yo bro, ", "Heya, ", "Hey Bozo, ", "" }; List list2 = new List { "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", "[ThisShouldBeAHerobrineTip]", "" }; List list3 = new List { ", duh.", ", brother.", ", bozo.", ", swag.", "" }; int num = Random.Range(0, 100); if (num > 20) { text = ""; text += list[Random.Range(0, list.Count - 1)]; text += list2[Random.Range(0, list2.Count - 1)]; text += list3[Random.Range(0, list3.Count - 1)]; if (text.Contains("[ThisShouldBeAHerobrineTip]")) { text = "You should NOT \nanger the one with\n no pupils..."; } } return text; } public static string CurseText_RewriteAsKitten(string text) { staticLog((LogLevel)16, "Utilizing Discord Kittens..."); string text2 = text; List list = new List { "OwO", "UwU", ">w<", "IwI", "" }; Dictionary dictionary = new Dictionary { { "l", "w" }, { "i", "e" }, { "r", "w" }, { "L", "W" }, { "I", "E" }, { "R", "W" } }; int num = 20; foreach (KeyValuePair item in dictionary) { text2 = text2.Replace(item.Key, item.Value); } List list2 = text2.ToCharArray().ToList(); for (int i = 0; i < list2.Count; i++) { if (list2[i].ToString() == " " && Random.Range(0, 100) <= num) { List 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..."); List list = new List { "skibidi", "sigma", "icespice", "rizz", "rizzler", "gyatt", "fanum", "cook", "cap", "yap", "yapper", "capping", "lil'", "bro", "hawk", "tuah", "aura", "edging", "edge", "auramaxxing", "looksmaxxing", "weightmaxxing", "mew", "mewing", "bussin", "gronk", "sussy", "sus", "baka", "tiktok", "fortnite", "forgis", "quandale", "dingle", "grimace", "ohio" }; List list2 = text.ToCharArray().ToList(); List list3 = new List(); for (int i = 0; i < list2.Count; i++) { char c = list2[i]; if (c == ' ') { char[] collection = (list[Random.Range(0, list.Count)] + " ").ToCharArray(); list3.AddRange(collection); } } string text2 = ""; foreach (char item in list3) { text2 += item; } return text2 + list[Random.Range(0, list.Count)]; } 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)(object)displayPersonalCode).SetValue(AbsurdSaveFileManager.GetPersonalCode()); } private void UpdatePersonalizationDisplay() { ((ConfigValueElement)(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.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.Instance; instance.rotationX += Random.Range(-6f * num, 6f * num); CameraController instance2 = MonoSingleton.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(); ((Component)nmov).gameObject.AddComponent(); ((Component)nmov).gameObject.AddComponent(); ((Component)nmov).GetComponent().Stop(); if (currentEffects.Contains("ULTRACHAT")) { ((Component)nmov).GetComponent().TwitchMessageChain(); } if (Patch_PartyLights) { Light[] array = Object.FindObjectsOfType(); foreach (Light val in array) { val.color = Color.HSVToRGB(Random.Range(0f, 255f) / 255f, 1f, 1f); } } ControllerAssistant.RecoilerAdditionsAssist(); } } public class ControllerAssistant { [Configgable("Personalized Effects/Herobrine Curse", "Enabled", 0, "This Level is haunted by Herobrine...")] public static bool Peronl_Herobrine = true; [Configgable("Personalized Effects/Herobrine Curse", "Haunting Percentage", 1, "The percentage at which a haunting event can happen.")] [Range(1f, 100f)] public static int PeronlS_HauntPercent = 25; [Configgable("Personalized Effects/Herobrine Curse", "Join Delay", 2, "The amount of haunting events requried for Herobrine to join.")] [Range(0f, 10f)] public static int PeronlS_JoinDelay = 3; [Configgable("Personalized Effects", "Bad Gravity", 10, "Isaac Newton is probably rotating in his coffin so hard.")] public static bool Peronl_CringeGravity = true; [Configgable("Personalized Effects", "Lore Accurate Vision", 11, "This is how you should see thing according to lore.")] public static bool Peronl_LoreAccuracy = true; [Configgable("Random Events/Surprise Carousel", "Enabled", 0, "Weeeeeeeeeee!!!")] public static bool Event_Carousel = true; [Configgable("Random Events/Surprise Carousel", "Speed", 1, "Everybody wants a fast carousel, don't they?")] [Range(1f, 30f)] public static int Carousel_Speed = 8; [Configgable("Random Events/Surprise Carousel", "Duration", 2, "Everybody wants a long carousel ride, don't they?")] [Range(1f, 15f)] public static float Carousel_Duration = 5f; public static float noGenAlphaSubsTime = 0f; public static bool disableChaos = false; public static bool carouseling = false; public static Vector3 nonCringeGravity = Vector3.zero; public static void RecoilerAdditionsAssist() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) HerobrineEngine herobrineEngine = ((Component)AK_Controller.nmov).gameObject.AddComponent(); HerobrineEngine.LeaveTheWorld(messageAboutIt: false); HerobrineEngine.ResetMystics(); if (AK_Controller.currentEffects.Contains("Herobrining")) { herobrineEngine.UpdateExistance(); } AbsurdKill_ObjectPlugin component = ((Component)AK_Controller.nmov).gameObject.GetComponent(); if (((MonoBehaviour)component).IsInvoking("GoCringeWithGravity")) { ((MonoBehaviour)component).CancelInvoke("GoCringeWithGravity"); } Physics.gravity = nonCringeGravity; if (AK_Controller.currentEffects.Contains("CringeGravitation")) { ((MonoBehaviour)component).Invoke("GoCringeWithGravity", 5f); } carouseling = false; if (Object.op_Implicit((Object)(object)MonoSingleton.Instance) && !AbsurdSaveFileManager.ReadMainSave().readWarning) { AbsurdUIManager.CreateUIElement("Panel", $"Warning Background{Random.Range(0, 111)}", Vector2.zero, new Vector2(2999f, 2999f), bePersistent: false, (Color?)new Color(0f, 0f, 0f, 0.5f)); GameObject val = AbsurdUIManager.CreateUIElement("Text", $"Warning{Random.Range(0, 111)}", new Vector2(-500f, 0f), new Vector2(100f, 100f), bePersistent: false, Color.red, Resources.GetBuiltinResource("Arial.ttf"), 20, (TextAnchor)0, "=======================!!!WARNING ! WARNING!!!=======================\nPLEASE, DON'T FORGOT ABOUT THE CONFIGGY MENU, PLEASE CONFIGURE YOUR ABSURDKILL MOD, \nAlso, FLASHING LIGHTS and LOUD sounds.\nPress K to close this message."); KeyboardInteractiveMenu keyboardInteractiveMenu = val.AddComponent(); keyboardInteractiveMenu.KeyboardInteractions = new Dictionary(); keyboardInteractiveMenu.KeyboardInteractions.Add((KeyCode)107, delegate { KeyboardInteractiveMenu.EscapeWarning(); }); } } public static void NewSceneAssist() { AbsurdUIManager.CompleteDeathList(); } public static void PossibleEventsAssist() { if (Event_Carousel) { AK_Controller.possibleEvents.Add("Carousel"); } } public static void ChaosAssist(string chaosName) { NewMovement instance = MonoSingleton.Instance; HudMessageReceiver instance2 = MonoSingleton.Instance; if (chaosName == "Carousel" && !carouseling) { instance2.SendHudMessage("Carousel!!!!!!", "", "", 0, false, false, true); carouseling = true; ((MonoBehaviour)((Component)instance).GetComponent()).Invoke("StopTheCarou", Carousel_Duration); } int num = Random.Range(0, 101); if (num <= PeronlS_HauntPercent && AK_Controller.currentEffects.Contains("Herobrining") && !HerobrineEngine.herobrineEngining) { HerobrineEngine.HauntSoon(); } } public static void UpdateAssist() { CameraController instance = MonoSingleton.Instance; noGenAlphaSubsTime = Mathf.Clamp(noGenAlphaSubsTime - Time.deltaTime, 0f, 100f); if (carouseling) { instance.rotationY += 360f * ((float)Carousel_Speed / 10f) * Time.deltaTime; instance.rotationX = Mathf.Sin(Time.time % 1000f / 20f) * 15f; } } public static void DisplaySpecialSubtitle(string text, AudioSource source = null, bool inevitible = true, bool serious = true) { if (serious) { if (noGenAlphaSubsTime < 0.1f) { noGenAlphaSubsTime = 0.1f; } string text2 = text; text = "" + text2 + ""; } MonoSingleton.Instance.DisplaySubtitle(text, source, inevitible); } public static bool BeingLookedAt(Vector3 position, float sensivity = 0.15f) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) Transform transform = ((Component)MonoSingleton.Instance).transform; Vector3 val = position - transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; float num = Vector3.Dot(transform.forward, normalized); if (num > 1f - sensivity) { return true; } return false; } public static void CloseULTRAKILL() { Application.Quit(); } public static void DoDualWield(bool shakeCamera = false, bool bandicootCompatible = true, float juice = 30f) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Invalid comparison between Unknown and I4 //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_0079: 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_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)MonoSingleton.Instance)) { return; } if (shakeCamera) { MonoSingleton.Instance.CameraShake(0.35f); } if ((int)MonoSingleton.Instance.playerType == 1) { if (bandicootCompatible) { MonoSingleton.Instance.AddExtraHit(3); } return; } GameObject val = new GameObject(); val.transform.SetParent(((Component)MonoSingleton.Instance).transform, true); val.transform.localRotation = Quaternion.identity; DualWield[] componentsInChildren = ((Component)MonoSingleton.Instance).GetComponentsInChildren(); if (componentsInChildren != null && componentsInChildren.Length % 2 == 0) { val.transform.localScale = new Vector3(-1f, 1f, 1f); } else { val.transform.localScale = Vector3.one; } if (componentsInChildren == null || componentsInChildren.Length == 0) { val.transform.localPosition = Vector3.zero; } else if (componentsInChildren.Length % 2 == 0) { val.transform.localPosition = new Vector3((float)(componentsInChildren.Length / 2) * -1.5f, 0f, 0f); } else { val.transform.localPosition = new Vector3((float)((componentsInChildren.Length + 1) / 2) * 1.5f, 0f, 0f); } DualWield val2 = val.AddComponent(); val2.delay = 0.05f; val2.juiceAmount = juice; if (componentsInChildren != null && componentsInChildren.Length != 0) { val2.delay += (float)componentsInChildren.Length / 20f; } } public static void KillPlayer(bool instablack = false) { //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) NewMovement instance = MonoSingleton.Instance; GunControl val = MonoSingleton.Instance; FistControl val2 = MonoSingleton.Instance; instance.hp = 0; instance.ResetHardDamage(); if (!instance.endlessMode) { ((Component)instance.deathSequence).gameObject.SetActive(true); MonoSingleton.Instance.controlPitch = false; instance.screenHud.SetActive(false); if (instablack) { ((Component)instance.deathSequence).GetComponent().EndSequence(); } } else { ((Component)instance).GetComponentInChildren().GameOver(); CrowdReactions instance2 = MonoSingleton.Instance; if ((Object)(object)instance2 != (Object)null) { instance2.React(instance2.aww); } } instance.rb.constraints = (RigidbodyConstraints)0; instance.rb.AddTorque(Vector3.right * -1f, (ForceMode)2); if (Object.op_Implicit((Object)(object)MonoSingleton.Instance)) { MonoSingleton.Instance.juice = 0f; } ((Behaviour)instance.cc).enabled = false; if ((Object)(object)val == (Object)null) { val = ((Component)instance).GetComponentInChildren(); } val.NoWeapon(); instance.rb.constraints = (RigidbodyConstraints)0; instance.dead = true; instance.activated = false; if ((Object)(object)val2 == (Object)null) { val2 = ((Component)instance).GetComponentInChildren(); } val2.NoFist(); } public static GameObject CreateFoodImagination(Transform forTrans) { //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Expected O, but got Unknown //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) List list = new List { "CupOfBlood", "Burger", "Donut", "Hotdog", "McFriesIsFun" }; List list2 = new List { "bloodCupColor", "burgerColor", "donutColor", "hotdogColor", "McFriesColor" }; int index = new Random().Next(list.Count); string modelName = list[index]; string textureName = list2[index]; ThreeDModelData threeDModelData = AbsurdAssetLoader.LoadEmbbededModelData(modelName, textureName); Material val = new Material(Shader.Find("Unlit/Texture")); Texture mainTexture = threeDModelData.mat.mainTexture; mainTexture.filterMode = (FilterMode)0; mainTexture.mipMapBias = 0f; mainTexture.anisoLevel = 0; val.mainTexture = mainTexture; threeDModelData.mat = val; GameObject val2 = Object.Instantiate(threeDModelData.model, forTrans.position, threeDModelData.model.transform.rotation); val2.transform.SetParent(forTrans); val2.transform.localPosition = Vector3.zero; MeshRenderer[] componentsInChildren = val2.GetComponentsInChildren(); foreach (MeshRenderer val3 in componentsInChildren) { ((Renderer)val3).material = threeDModelData.mat; } Transform transform = val2.transform; transform.localScale *= 2f; val2.AddComponent(); return val2; } } 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_0395: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_0415: Expected O, but got Unknown switch (name) { case "airdrop": { NewMovement nmov2 = AK_Controller.nmov; Object.Instantiate(AK_Controller.prefabDict["GuttermanAirdrop"], ((Component)nmov2).transform.position + new Vector3(2f, 0f, 0f), Quaternion.identity); MonoSingleton.Instance.SendHudMessage("I mailed you a Guttterman", "", "", 0, false, false, true); break; } case "talk": { List list2 = new List { "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.Instance.SendHudMessage(list2[Random.Range(0, list2.Count - 1)], "", "", 0, false, false, true); break; } case "spawn_nextbot": { List list = new List(); if (AK_Controller.Nextbots_Obunga) { list.Add("Obunga"); } if (AK_Controller.Nextbots_BearFive) { list.Add("Bear5"); } if (list.Count > 0) { Dictionary dictionary = new Dictionary { { "Obunga", "*Intense Beatboxing*" }, { "Bear5", "GET OUT! GET OUT! GET OUT! GET OUT!" } }; string text = list[Random.Range(0, list.Count)]; NewMovement nmov = AK_Controller.nmov; GameObject val = 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); val.GetComponent().themeLyrics = dictionary[text]; MonoSingleton.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 assetChace = new Dictionary(); 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 AudioClip LoadSoundAssetFromFile(string path) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown if (assetChace.TryGetValue("Files/" + path, out var value)) { return (AudioClip)value; } AudioClip val = AbsurdByteConverter.UWR_GetClipFromAudioFile(Path.Combine(AK_Controller.modPath, "FileAssets", "SFX", path)); if (!assetChace.ContainsKey("Files/" + path)) { assetChace.Add("Files/" + path, val); } return val; } public static Texture2D LoadTextureAssetFromFile(string path, TextureFormat format = 4, FilterMode filter = 0) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown if (assetChace.TryGetValue("Files/" + path, out var value)) { return (Texture2D)value; } byte[] array = File.ReadAllBytes(Path.Combine(AK_Controller.modPath, "FileAssets", "Imagery", path)); Texture2D val = new Texture2D(2, 2, format, false); ImageConversion.LoadImage(val, array); ((Texture)val).filterMode = filter; ((Object)val).name = Path.GetFileNameWithoutExtension(path); if (!assetChace.ContainsKey("Files/" + path)) { assetChace.Add("Files/" + path, val); } return val; } public static Sprite LoadTextureAssetFromFileAsSprite(string path, Vector2? pivot = null, float PPU = 100f) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) Texture2D val = null; if (assetChace.TryGetValue("Files/" + path, out var value)) { val = (Texture2D)value; } if (!pivot.HasValue) { pivot = new Vector2(0.5f, 0.5f); } if ((Object)(object)val != (Object)null) { byte[] array = File.ReadAllBytes(Path.Combine(AK_Controller.modPath, "FileAssets", "Imagery", path)); val = new Texture2D(2, 2, (TextureFormat)4, false); ImageConversion.LoadImage(val, array); ((Texture)val).filterMode = (FilterMode)0; ((Object)val).name = Path.GetFileNameWithoutExtension(path); } if (!assetChace.ContainsKey("Files/" + path)) { assetChace.Add("Files/" + path, val); } return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), pivot.Value, PPU); } 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); AK_Controller.staticLog((LogLevel)16, "Check if ClassPath matches one of these strings:"); string[] manifestResourceNames = executingAssembly.GetManifestResourceNames(); foreach (string log in manifestResourceNames) { AK_Controller.staticLog((LogLevel)16, log); } return null; } AssetBundle val = AssetBundle.LoadFromStream(stream); if (!assetChace.ContainsKey(ClassPath)) { assetChace.Add(ClassPath, val); } return val; } public static ThreeDModelData LoadEmbbededModelData(string modelName, string textureName, string animContName = "") { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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 model = val.LoadAsset(modelName); threeDModelData.model = model; threeDModelData.mat = new Material(Shader.Find("Standard")); Texture2D mainTexture = val.LoadAsset(textureName); threeDModelData.mat.mainTexture = (Texture)(object)mainTexture; if (animContName != "") { threeDModelData.animatorController = val.LoadAsset(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 static AudioClip UWR_GetClipFromAudioFile(string path) { //IL_00a5: 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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) string text = Path.GetExtension(path).ToLower().Remove(0, 1) .Trim(); AudioType val = (AudioType)((text == "mp2" || text == "mp3") ? ((AudioType)13) : (text switch { "aiff" => 2, "ogg" => 14, "wav" => 20, _ => throw new NotImplementedException("Unknown audio file type:" + text + "!"), })); UnityWebRequest audioClip = UnityWebRequestMultimedia.GetAudioClip(Path.Combine("File:///", path), val); audioClip.SendWebRequest(); while (!audioClip.isDone) { } AudioClip content = DownloadHandlerAudioClip.GetContent(audioClip); ((Object)content).name = Path.GetFileNameWithoutExtension(path); return content; } } public class AbsurdEffectListGen { public static List GenerateEffectList(Scene targetScene) { List list = new List(); List list2 = new List(); 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"); } if (ControllerAssistant.Peronl_Herobrine) { list2.Add("Herobrining"); } if (ControllerAssistant.Peronl_CringeGravity) { list2.Add("CringeGravitation"); } if (ControllerAssistant.Peronl_LoreAccuracy) { list2.Add("CaseohVision"); } for (int i = 0; i < AK_Controller.PeronlAmount; i++) { string item = list2[AK_Controller.PersonalizedRandom(0, list2.Count - 1, ((Scene)(ref targetScene)).name)]; list.Add(item); list2.Remove(item); if (list2.Count < 1) { i = AK_Controller.PeronlAmount; } } string text = ""; foreach (string item2 in list) { text = text + item2 + ", "; } if (text == "") { text = "none."; } else { text = text.Remove(text.Length - 2, 2); text += "."; } AK_Controller.staticLog((LogLevel)16, "The counsil of stupitidy has decided, that you will have these effects in your level: [" + text + "]"); 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(); switch (valueID) { case "personalCode": dotABSF.personalCode = (int)value; break; case "EEunlocks": dotABSF.unlockedEasterEggs = (List)value; break; case "listened": dotABSF.readWarning = (bool)value; break; } byte[] bytes = AbsurdByteConverter.ToBytes(dotABSF); NewSaveFromBytes(bytes); } } public class AbsurdUIManager { public static Dictionary managedUIElements = new Dictionary(); public static List deathList = new List(); public static GameObject AbsurdCanvas = null; public static void CompleteDeathList() { List list = new List(); foreach (string death in deathList) { list.Add(death); } foreach (string item in list) { DeleteUIElement(item); } deathList.Clear(); } public static void DeleteAllUIElements() { Dictionary dictionary = managedUIElements; foreach (KeyValuePair item in dictionary) { DeleteUIElement(item.Key); } } public static void DeleteUIElement(string elementName) { if (!managedUIElements.ContainsKey(elementName)) { AK_Controller.staticLog((LogLevel)4, "AbsurdUIManager.DeleteUIElement: [ElementNotFoundException] Could not delete UI Element \"" + elementName + "\", an element with this name is not managed."); } for (int i = 0; i < managedUIElements[elementName].transform.childCount; i++) { GameObject gameObject = ((Component)managedUIElements[elementName].transform.GetChild(i)).gameObject; Object.DestroyImmediate((Object)(object)gameObject); } Object.DestroyImmediate((Object)(object)managedUIElements[elementName]); managedUIElements.Remove(elementName); if (deathList.Contains(elementName)) { deathList.Remove(elementName); } } public static GameObject CreateUIElement(string elementType, string elementName, Vector2 position, Vector2 anchorSize, bool bePersistent = false, Color? UIcolor = null) { //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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Expected O, but got Unknown //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) if (managedUIElements.ContainsKey(elementName)) { AK_Controller.staticLog((LogLevel)2, "AbsurdUIManager.CreateUIElement: [SameNameException] Could not create UI " + elementType + " \"" + elementName + "\", an element with the same name is already managed."); } Color color = Color.white; if (UIcolor.HasValue) { color = UIcolor.Value; } GameObject val = null; if (!Object.op_Implicit((Object)(object)AbsurdCanvas)) { AbsurdCanvas = new GameObject("AbsurdUI_Canvas"); Canvas val2 = AbsurdCanvas.AddComponent(); val2.renderMode = (RenderMode)0; AbsurdCanvas.AddComponent(); AbsurdCanvas.AddComponent(); Object.DontDestroyOnLoad((Object)(object)AbsurdCanvas); } switch (elementType) { case "Panel": { GameObject val3 = new GameObject("AbsurdPanel_" + elementName); val3.transform.SetParent(AbsurdCanvas.transform); Image val4 = val3.AddComponent(); ((Graphic)val4).color = color; RectTransform val5 = val3.GetComponent(); if (!Object.op_Implicit((Object)(object)val5)) { val5 = val3.AddComponent(); } val5.sizeDelta = anchorSize; val5.anchoredPosition = position; val = val3; break; } case "Text": AK_Controller.staticLog((LogLevel)2, "AbsurdUIManager.CreateUIElement: [WrongOverloadException] Could not create UI " + elementType + " \"" + elementName + "\", used overload of CreateUIElement method does not contain neccesarry parameters."); break; case "Image": AK_Controller.staticLog((LogLevel)2, "AbsurdUIManager.CreateUIElement: [WrongOverloadException] Could not create UI " + elementType + " \"" + elementName + "\", used overload of CreateUIElement method does not contain neccesarry parameters."); break; } managedUIElements.Add(elementName, val); if (!bePersistent) { deathList.Add(elementName); } Object.DontDestroyOnLoad((Object)(object)val); return val; } public static GameObject CreateUIElement(string elementType, string elementName, Vector2 position, Vector2 anchorSize, bool bePersistent = false, Color? UIcolor = null, Font font = null, int fontSize = 16, TextAnchor fontAnchor = 0, string fontString = "default") { //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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Expected O, but got Unknown //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Expected O, but got Unknown //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) if (managedUIElements.ContainsKey(elementName)) { AK_Controller.staticLog((LogLevel)2, "AbsurdUIManager.CreateUIElement: [SameNameException] Could not create UI " + elementType + " \"" + elementName + "\", an element with the same name is already managed."); } Color color = Color.white; if (UIcolor.HasValue) { color = UIcolor.Value; } GameObject val = null; if (!Object.op_Implicit((Object)(object)AbsurdCanvas)) { AbsurdCanvas = new GameObject("AbsurdUI_Canvas"); Canvas val2 = AbsurdCanvas.AddComponent(); val2.renderMode = (RenderMode)0; AbsurdCanvas.AddComponent(); AbsurdCanvas.AddComponent(); Object.DontDestroyOnLoad((Object)(object)AbsurdCanvas); } switch (elementType) { case "Panel": { GameObject val6 = new GameObject("AbsurdPanel_" + elementName); val6.transform.SetParent(AbsurdCanvas.transform); Image val7 = val6.AddComponent(); ((Graphic)val7).color = color; RectTransform val8 = val6.GetComponent(); if (!Object.op_Implicit((Object)(object)val8)) { val8 = val6.AddComponent(); } val8.sizeDelta = anchorSize; val8.anchoredPosition = position; val = val6; break; } case "Text": { GameObject val3 = new GameObject("AbsurdText_" + elementName); val3.transform.SetParent(AbsurdCanvas.transform); Text val4 = val3.AddComponent(); val4.font = font; val4.fontSize = fontSize; ((Graphic)val4).color = color; val4.alignment = fontAnchor; val4.horizontalOverflow = (HorizontalWrapMode)1; val4.verticalOverflow = (VerticalWrapMode)1; val4.text = fontString; RectTransform val5 = val3.GetComponent(); if (!Object.op_Implicit((Object)(object)val5)) { val5 = val3.AddComponent(); } val5.sizeDelta = anchorSize; val5.anchoredPosition = position; val = val3; break; } case "Image": AK_Controller.staticLog((LogLevel)2, "AbsurdUIManager.CreateUIElement: [WrongOverloadException] Could not create UI " + elementType + " \"" + elementName + "\", used overload of CreateUIElement method does not contain neccesarry parameters."); break; } managedUIElements.Add(elementName, val); if (!bePersistent) { deathList.Add(elementName); } Object.DontDestroyOnLoad((Object)(object)val); return val; } public static GameObject CreateUIElement(string elementType, string elementName, Vector2 position, Vector2 anchorSize, Sprite imageToDisplay, bool keepProportions = true, bool bePersistent = false, Color? UIcolor = null) { //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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Expected O, but got Unknown //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Expected O, but got Unknown //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) if (managedUIElements.ContainsKey(elementName)) { AK_Controller.staticLog((LogLevel)2, "AbsurdUIManager.CreateUIElement: [SameNameException] Could not create UI " + elementType + " \"" + elementName + "\", an element with the same name is already managed."); } Color color = Color.white; if (UIcolor.HasValue) { color = UIcolor.Value; } GameObject val = null; if (!Object.op_Implicit((Object)(object)AbsurdCanvas)) { AbsurdCanvas = new GameObject("AbsurdUI_Canvas"); Canvas val2 = AbsurdCanvas.AddComponent(); val2.renderMode = (RenderMode)0; AbsurdCanvas.AddComponent(); AbsurdCanvas.AddComponent(); Object.DontDestroyOnLoad((Object)(object)AbsurdCanvas); } switch (elementType) { case "Panel": { GameObject val6 = new GameObject("AbsurdPanel_" + elementName); val6.transform.SetParent(AbsurdCanvas.transform); Image val7 = val6.AddComponent(); ((Graphic)val7).color = color; RectTransform val8 = val6.GetComponent(); if (!Object.op_Implicit((Object)(object)val8)) { val8 = val6.AddComponent(); } val8.sizeDelta = anchorSize; val8.anchoredPosition = position; break; } case "Text": AK_Controller.staticLog((LogLevel)2, "AbsurdUIManager.CreateUIElement: [WrongOverloadException] Could not create UI " + elementType + " \"" + elementName + "\", used overload of CreateUIElement method does not contain neccesarry parameters."); break; case "Image": { GameObject val3 = new GameObject("AbsurdImage_" + elementName); val3.transform.SetParent(AbsurdCanvas.transform); Image val4 = val3.AddComponent(); val4.sprite = imageToDisplay; val4.preserveAspect = keepProportions; ((Graphic)val4).color = color; RectTransform val5 = val3.GetComponent(); if (!Object.op_Implicit((Object)(object)val5)) { val5 = val3.AddComponent(); } val5.sizeDelta = anchorSize; val5.anchoredPosition = position; break; } } managedUIElements.Add(elementName, val); if (!bePersistent) { deathList.Add(elementName); } Object.DontDestroyOnLoad((Object)(object)val); return val; } } public class ForcerFunctions { public static bool ApplyForceKill() { AbsurdKill_ObjectPlugin component = ((Component)MonoSingleton.Instance).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return false; } bool forceKill = component.forceKill; component.forceKill = false; return forceKill; } } public class HerobrineEngine : MonoBehaviour { public static bool herobrineEngining = false; public static int appearanceCuesDone = 0; public static float angerMeter = 0f; public static float temporaryIrratation = 0f; public static float spawnTimer = 30f; public static HerobrineEngine mevar; public static string currentState = "In The Rift"; public static float stateTime = 0f; public static Dictionary wish = new Dictionary(); public static List can = new List(); public static List doing = new List(); public static bool canDoActivities = false; public static float spawnTimerDrain = 0f; private static List memories = new List(); private static float noTickTime = 0f; private static AbsurdHerobrine herobrine = null; public static bool demonicallyAngry = false; public static float beingSeenTime = 0f; private static Vector3 playerHoldPos = Vector3.zero; private void Start() { mevar = this; } public static void Memorize(string memoryName) { if (!memories.Contains(memoryName)) { memories.Add(memoryName); } } public static bool Remembers(string memoryName) { return memories.Contains(memoryName); } public static void PlayCaveSound(bool isKillSound = false) { string text = Mathf.Clamp(Random.Range(1, 20), 0, 19).ToString(); if (isKillSound) { text = "Kill"; } ((Component)MonoSingleton.Instance).GetComponent().PlayOneShot(AbsurdAssetLoader.LoadSoundAsset("AbsurdKillMod.Assets.SFX.Cave.Cave" + text + ".wav")); } public static void HauntSoon() { ((MonoBehaviour)mevar).Invoke("DoAppearanceCue", 4f); } public static void ResetMystics() { appearanceCuesDone = 0; GetAngry(-100f); } public static void ResetWill() { wish.Clear(); can.Clear(); doing.Clear(); } public static string WishesTheMost() { string result = ""; int num = -1; foreach (KeyValuePair item in wish) { if (item.Value > num) { result = item.Key; num = item.Value; } } return result; } public static void LeaveTheWorld(bool messageAboutIt = true) { herobrineEngining = false; GetAngry(-100f); demonicallyAngry = false; ChangeState("In The Rift"); canDoActivities = false; spawnTimerDrain = 0f; ResetWill(); GameObject[] array = Object.FindObjectsOfType(); foreach (GameObject val in array) { if (Object.op_Implicit((Object)(object)val.GetComponent())) { val.GetComponent().Despawn(); } } herobrine = null; spawnTimer = 30f; if (messageAboutIt) { ControllerAssistant.DisplaySpecialSubtitle("$t3v3 left the game."); } } public static void JoinTheWorld(bool messageAboutIt = true, bool supposedToScare = true) { appearanceCuesDone = -1; herobrineEngining = true; canDoActivities = false; spawnTimerDrain = 0f; GetAngry(-100f); demonicallyAngry = false; ChangeState("Looking Around..."); if (messageAboutIt) { ControllerAssistant.DisplaySpecialSubtitle("$t3v3 joined the game."); } if (supposedToScare) { PlayCaveSound(); } } public void DoAppearanceCue() { int num = Mathf.Clamp(Random.Range(1, 3), 1, 2); if (num == 1) { int num2 = Mathf.Clamp(Random.Range(1, 6), 1, 5); List currentEnemies = MonoSingleton.Instance.GetCurrentEnemies(); foreach (EnemyIdentifier item2 in currentEnemies) { if (item2.puppet) { currentEnemies.Remove(item2); } } if (currentEnemies.Count < 1) { num = 2; } else { if (currentEnemies.Count < num2) { num2 = currentEnemies.Count; } List list = new List(); for (int i = 0; i < num2; i++) { EnemyIdentifier item = currentEnemies[Random.Range(0, currentEnemies.Count)]; list.Add(item); currentEnemies.Remove(item); } foreach (EnemyIdentifier item3 in list) { item3.Desandify(false); item3.PuppetSpawn(); if (Object.op_Implicit((Object)(object)item3.idol)) { item3.idol.Death(); } item3.nails.Clear(); item3.nailsAmount = 0; item3.ignoredByEnemies = true; item3.ignorePlayer = false; item3.immuneToFriendlyFire = true; item3.attackEnemies = false; foreach (Harpoon driller in item3.drillers) { driller.drillHits = 9999; } item3.prioritizeEnemiesUnlessAttacked = false; foreach (Magnet stuckMagnet in item3.stuckMagnets) { stuckMagnet.DamageMagnet(float.PositiveInfinity); } } } } if (num == 2) { ControllerAssistant.DisplaySpecialSubtitle("null"); } PlayCaveSound(); appearanceCuesDone++; ((MonoBehaviour)this).Invoke("UpdateExistance", 1f); } public void UpdateExistance() { if (appearanceCuesDone >= ControllerAssistant.PeronlS_JoinDelay && !herobrineEngining) { JoinTheWorld(); PlayCaveSound(); PlayCaveSound(); ControllerAssistant.DisplaySpecialSubtitle("OpenGL Error: 6666 (Unexpected Entity)"); } else { canDoActivities = false; spawnTimerDrain = 0f; } } public static void ForceTurnCameraTowards(Vector3 position) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) CameraController instance = MonoSingleton.Instance; Quaternion val = Quaternion.LookRotation(((Component)instance).transform.position - position); Vector3 eulerAngles = ((Quaternion)(ref val)).eulerAngles; instance.rotationX = eulerAngles.x; instance.rotationY = eulerAngles.y; } public static void CrashGame() { List currentEnemies = MonoSingleton.Instance.GetCurrentEnemies(); if (currentEnemies.Count > 0) { foreach (EnemyIdentifier item in currentEnemies) { if (Object.op_Implicit((Object)(object)item.idol)) { item.idol.Death(); } item.puppet = true; item.Explode(false); } } Time.timeScale = 0f; MonoSingleton.Instance.controlPitch = false; MonoSingleton.Instance.SetAllPitch(0f); GameObject[] array = Object.FindObjectsOfType(); foreach (GameObject val in array) { Text component = val.GetComponent(); TMP_Text component2 = val.GetComponent(); TMP_Text component3 = (TMP_Text)(object)val.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.text = "FATAL ERROR!"; } if (Object.op_Implicit((Object)(object)component2)) { component2.text = "FATAL ERROR!"; } if (Object.op_Implicit((Object)(object)component3)) { component3.text = "FATAL ERROR!"; } } AK_Controller.staticLog((LogLevel)1, "GAMEOBJECT \"ENTITY6666\" HAS CAUSED A FATAL ERROR!"); ((MonoBehaviour)mevar).Invoke("CloseApp", 2f); } public void CloseApp() { ControllerAssistant.CloseULTRAKILL(); } public static void GetAngry(float amount) { temporaryIrratation += amount; if (amount > 0f) { UpdateIrratationEffects(); } if (amount > 0f) { angerMeter += amount * (float)((!(temporaryIrratation > 50f)) ? 1 : 2); } else { angerMeter += amount; } temporaryIrratation = Mathf.Clamp(temporaryIrratation, 0f, 100f); angerMeter = Mathf.Clamp(angerMeter, 0f, 100f); if (amount > 0f) { spawnTimer -= amount / 2f; } } public static void UpdateIrratationEffects() { if ((float)Random.Range(0, 101) < temporaryIrratation) { spawnTimer = 0f; } } public static void ChangeState(string newState) { stateTime = 0f; currentState = newState; } private void Update() { //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_0484: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Unknown result type (might be due to invalid IL or missing references) //IL_049d: Unknown result type (might be due to invalid IL or missing references) //IL_0526: Unknown result type (might be due to invalid IL or missing references) //IL_04fe: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: 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_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0282: 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_0297: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_0370: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03ce: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: 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_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_0401: Unknown result type (might be due to invalid IL or missing references) //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Unknown result type (might be due to invalid IL or missing references) if (!herobrineEngining) { canDoActivities = false; spawnTimerDrain = 0f; } if (temporaryIrratation <= 50f) { temporaryIrratation = Mathf.Clamp(temporaryIrratation - Time.deltaTime / 3f, 0f, float.PositiveInfinity); } else { temporaryIrratation = Mathf.Clamp(temporaryIrratation - Time.deltaTime / 1.5f, 0f, float.PositiveInfinity); } spawnTimer = Mathf.Clamp(spawnTimer - Time.deltaTime * spawnTimerDrain, 0f, float.PositiveInfinity); stateTime += Time.deltaTime; noTickTime += Time.deltaTime; if (noTickTime >= 0.1f) { Tick(); } if (spawnTimer <= 0f && canDoActivities) { if (!doing.Contains("Activity")) { doing.Add("Activity"); } canDoActivities = false; spawnTimer = (float)Random.Range(100, 500) / 10f; spawnTimerDrain = 0f; } if (!(currentState == "Throwing V1 Around")) { return; } if (Object.op_Implicit((Object)(object)herobrine)) { if (stateTime < 1f) { playerHoldPos += new Vector3(0f, 1.5f, 0f) * Time.deltaTime; } else if (stateTime >= 2f && stateTime < 2.1f) { playerHoldPos += (((Component)herobrine).transform.right * -1.5f + new Vector3(0f, -1.5f, 0f)) * (Time.deltaTime * 10f); } else if (stateTime >= 2.1f && stateTime < 2.2f) { playerHoldPos += (((Component)herobrine).transform.right * 1.5f + new Vector3(0f, 1.5f, 0f)) * (Time.deltaTime * 10f); } else if (stateTime >= 2.2f && stateTime < 2.3f) { playerHoldPos += (((Component)herobrine).transform.right * 1.5f + new Vector3(0f, -1.5f, 0f)) * (Time.deltaTime * 10f); } else if (stateTime >= 2.3f && stateTime < 2.4f) { playerHoldPos += (((Component)herobrine).transform.right * -1.5f + new Vector3(0f, 1.5f, 0f)) * (Time.deltaTime * 10f); } else if (stateTime >= 2.4f && stateTime < 2.5f) { playerHoldPos += (((Component)herobrine).transform.right * -1.5f + new Vector3(0f, -1.5f, 0f)) * (Time.deltaTime * 10f); } else if (stateTime >= 2.5f && stateTime < 2.6f) { playerHoldPos += (((Component)herobrine).transform.right * 1.5f + new Vector3(0f, 1.5f, 0f)) * (Time.deltaTime * 10f); } ForceTurnCameraTowards(((Component)herobrine).transform.position + new Vector3(0f, 2f, 0f)); } if (stateTime >= 4.6f || MonoSingleton.Instance.dead) { if (Object.op_Implicit((Object)(object)herobrine)) { herobrine.Despawn(); } MonoSingleton.Instance.rb.AddForce(new Vector3(0f, 30f, 0f), (ForceMode)2); canDoActivities = true; ChangeState("Waiting"); } ((Component)MonoSingleton.Instance).transform.position = playerHoldPos; } private void Tick() { //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_0889: Unknown result type (might be due to invalid IL or missing references) //IL_0898: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_094e: Unknown result type (might be due to invalid IL or missing references) //IL_095d: Unknown result type (might be due to invalid IL or missing references) //IL_0967: Unknown result type (might be due to invalid IL or missing references) //IL_096c: Unknown result type (might be due to invalid IL or missing references) //IL_0a82: Unknown result type (might be due to invalid IL or missing references) //IL_0a91: Unknown result type (might be due to invalid IL or missing references) //IL_0a9b: Unknown result type (might be due to invalid IL or missing references) //IL_0aa0: Unknown result type (might be due to invalid IL or missing references) //IL_0ad8: Unknown result type (might be due to invalid IL or missing references) //IL_0add: Unknown result type (might be due to invalid IL or missing references) if (currentState == "Looking Around...") { float num = 5f; if (Remembers("Surroundings")) { num = 1f; } if (stateTime >= num) { Memorize("Surroundings"); spawnTimerDrain = 1f; ChangeState("Observing Player"); } } else if (currentState == "Observing Player") { float num2 = 12f; if (Remembers("Player")) { num2 = 0.5f; } if (stateTime >= num2) { if (!Remembers("Player")) { wish.Add("Stalking", 50); } else { wish.Add("Nice_Greeting", 50); } Memorize("Player"); canDoActivities = true; ChangeState("Waiting"); } } else if (currentState == "Waiting") { canDoActivities = true; spawnTimerDrain = 1f; if (doing.Contains("Activity")) { doing.Remove("Activity"); ChangeState("Thinking"); } } else if (currentState == "Thinking") { if (AngryFor(50f)) { for (int i = 0; i < wish.Count; i++) { string text = wish.Keys.ToList()[i]; if (text.Contains("Nice_")) { wish.Remove(text); } } if (wish.Count < 2) { RandomWishes(addToTheWishDict: true, Random.Range(0, 20)); } } if (wish.Count <= 0) { wish.Add("Stalking", 50); } string text2 = WishesTheMost(); wish.Remove(text2); switch (text2) { case "Stalking": if (Object.op_Implicit((Object)(object)herobrine)) { herobrine.Despawn(); } herobrine = AbsurdHerobrine.SpawnHerobrine(((Component)MonoSingleton.Instance).transform.position + new Vector3(0f, 2.9f, 0f)).GetComponent(); herobrine.stalkerMode = true; beingSeenTime = 0f; canDoActivities = false; spawnTimer = Random.Range(11, 30); spawnTimerDrain = 1f; ChangeState("Stalk"); break; case "Nice_Greeting": ControllerAssistant.DisplaySpecialSubtitle("OpenGL Error: 0000 ( Hi :) )"); PlayCaveSound(); canDoActivities = false; spawnTimer = 5f; spawnTimerDrain = 1f; wish.Add("Stalking", 50); canDoActivities = true; ChangeState("Waiting"); break; case "Nice_Heal Player": ControllerAssistant.DisplaySpecialSubtitle("G I F T"); PlayCaveSound(); canDoActivities = false; spawnTimer = Random.Range(11, 30); spawnTimerDrain = 1f; ((MonoBehaviour)this).Invoke("SpillBloodOntoV1", 0.3f); ChangeState("Spilling Blood For Player"); break; case "Nice_Give Dual-Wield": ControllerAssistant.DisplaySpecialSubtitle("G I F T"); PlayCaveSound(); ControllerAssistant.DoDualWield(); canDoActivities = false; spawnTimer = Random.Range(11, 30); spawnTimerDrain = 1f; canDoActivities = true; ChangeState("Waiting"); break; case "Nice_Give Style": ControllerAssistant.DisplaySpecialSubtitle("G I F T"); PlayCaveSound(); MonoSingleton.Instance.AddPoints(6666, "?????????????????????", (GameObject)null, (EnemyIdentifier)null, -1, "", ""); canDoActivities = false; spawnTimer = Random.Range(11, 30); spawnTimerDrain = 1f; canDoActivities = true; ChangeState("Waiting"); break; case "Bad_Snap Player's Neck": { ControllerAssistant.DisplaySpecialSubtitle("it's me."); PlayCaveSound(); MonoSingleton.Instance.AddPoints(0, "it's him.", (GameObject)null, (EnemyIdentifier)null, -1, "", ""); CameraController instance2 = MonoSingleton.Instance; instance2.rotationY += 180f; instance2.rotationX = 0f; MonoSingleton.Instance.GetHurt(30, false, 1f, false, true, 1f, true); ((Component)AK_Controller.mevar).GetComponent().PlayOneShot(AbsurdAssetLoader.LoadSoundAsset("AbsurdKillMod.Assets.SFX.NeckSnap.wav")); canDoActivities = false; spawnTimer = Random.Range(11, 30); spawnTimerDrain = 1f; canDoActivities = true; ChangeState("Waiting"); break; } case "Nice_Kill Some Enemies": { ControllerAssistant.DisplaySpecialSubtitle("null."); PlayCaveSound(); int num3 = Mathf.Clamp(Random.Range(1, 6), 1, 5); List currentEnemies = MonoSingleton.Instance.GetCurrentEnemies(); if (currentEnemies.Count > 0) { if (currentEnemies.Count < num3) { num3 = currentEnemies.Count; } List list = new List(); for (int k = 0; k < num3; k++) { EnemyIdentifier item = currentEnemies[Random.Range(0, currentEnemies.Count)]; list.Add(item); currentEnemies.Remove(item); } foreach (EnemyIdentifier item2 in list) { if (Object.op_Implicit((Object)(object)item2.idol)) { item2.idol.Death(); } item2.puppet = true; item2.Explode(false); } } canDoActivities = false; spawnTimer = Random.Range(11, 30); spawnTimerDrain = 1f; canDoActivities = true; ChangeState("Waiting"); break; } case "Bad_Kill Player": { for (int j = 0; j < 10; j++) { ControllerAssistant.DisplaySpecialSubtitle("Death is near."); } PlayCaveSound(isKillSound: true); MonoSingleton.Instance.AddPoints(0, "RUN!", (GameObject)null, (EnemyIdentifier)null, -1, "", ""); canDoActivities = false; spawnTimer = Random.Range(11, 30); spawnTimerDrain = 1f; ((MonoBehaviour)this).Invoke("SlapPlayerRealHard", 2f); canDoActivities = true; ChangeState("Waiting"); break; } case "Bad_Puppet Enemy": { ControllerAssistant.DisplaySpecialSubtitle("null."); PlayCaveSound(); canDoActivities = false; spawnTimer = Random.Range(11, 30); spawnTimerDrain = 1f; List currentEnemies2 = MonoSingleton.Instance.GetCurrentEnemies(); EnemyIdentifier val = currentEnemies2[Random.Range(0, currentEnemies2.Count)]; val.PuppetSpawn(); canDoActivities = true; ChangeState("Waiting"); break; } case "Bad_Punch Player": PlayCaveSound(); canDoActivities = false; spawnTimer = Random.Range(11, 30); spawnTimerDrain = 1f; if (Object.op_Implicit((Object)(object)herobrine)) { herobrine.Despawn(); } herobrine = AbsurdHerobrine.SpawnHerobrine(((Component)MonoSingleton.Instance).transform.position + ((Component)MonoSingleton.Instance).transform.forward * 10f, willStare: false, autoAnimationControl: true, 10f, agressive: true).GetComponent(); MonoSingleton.Instance.rotationX = 0f; canDoActivities = true; ChangeState("Waiting"); break; case "Bad_Kill Player In Person": PlayCaveSound(); canDoActivities = false; spawnTimer = Random.Range(11, 30); spawnTimerDrain = 1f; if (Object.op_Implicit((Object)(object)herobrine)) { herobrine.Despawn(); } herobrine = AbsurdHerobrine.SpawnHerobrine(((Component)MonoSingleton.Instance).transform.position + ((Component)MonoSingleton.Instance).transform.forward * 10f, willStare: false, autoAnimationControl: true, 10f, agressive: true, 1u, despawnAfterPunching: true, strongerPunch: true).GetComponent(); MonoSingleton.Instance.rotationX = 0f; canDoActivities = true; ChangeState("Waiting"); break; case "Nice_Give Overheal": { ControllerAssistant.DisplaySpecialSubtitle("G I F T"); PlayCaveSound(); canDoActivities = false; spawnTimer = Random.Range(11, 30); spawnTimerDrain = 1f; NewMovement instance = MonoSingleton.Instance; instance.GetHealth(100, true, false, true); if (instance.hp < 200) { instance.hp = 200; } canDoActivities = true; ChangeState("Waiting"); break; } case "Bad_Throw Player Around": if (Object.op_Implicit((Object)(object)herobrine)) { herobrine.Despawn(); } herobrine = AbsurdHerobrine.SpawnHerobrine(((Component)MonoSingleton.Instance).transform.position + ((Component)MonoSingleton.Instance).transform.forward * 10f).GetComponent(); MonoSingleton.Instance.rotationY = 0f; playerHoldPos = ((Component)MonoSingleton.Instance).transform.position; canDoActivities = false; spawnTimer = Random.Range(11, 30); spawnTimerDrain = 1f; ((MonoBehaviour)this).Invoke("SlamHurtPlayer", 2.1f); ((MonoBehaviour)this).Invoke("SlamHurtPlayer", 2.3f); ((MonoBehaviour)this).Invoke("SlamHurtPlayer", 2.5f); ChangeState("Throwing V1 Around"); break; } } else if (currentState == "Stalk") { GetAngry(0f - noTickTime / 1.5f); if (herobrine.CheckSighted()) { beingSeenTime += noTickTime; if (beingSeenTime >= 3f) { herobrine.Despawn(causeAnger: true); herobrine = null; ControllerAssistant.DisplaySpecialSubtitle("666_null._666"); PlayCaveSound(); if (GetRealAnger() < 50f) { RandomWishes(addToTheWishDict: true, Random.Range(0, 49)); } else { RandomWishes(addToTheWishDict: true, Random.Range(0, 20)); } canDoActivities = true; ChangeState("Waiting"); } if (herobrine.CheckSighted(checkAttacked: true)) { herobrine.Despawn(causeAnger: true); herobrine = null; ControllerAssistant.DisplaySpecialSubtitle("YOU BETTER BE ON YOUR KNEES."); ControllerAssistant.DisplaySpecialSubtitle("WORSHIP ME."); ControllerAssistant.DisplaySpecialSubtitle("SHOULDN'T HAVE DONE THAT."); ControllerAssistant.DisplaySpecialSubtitle("OpenGL Error: 9003 (Failed to pervent interruption.)"); PlayCaveSound(isKillSound: true); RandomWishes(addToTheWishDict: true, Random.Range(0, 20)); GetAngry(14f); canDoActivities = true; ChangeState("Waiting"); } if (stateTime >= 9f) { herobrine.Despawn(); herobrine = null; RandomWishes(addToTheWishDict: true); canDoActivities = true; ChangeState("Waiting"); } } else { beingSeenTime = 0f; } } else if (currentState == "Spilling Blood For Player" && stateTime >= 5f) { canDoActivities = true; ChangeState("Waiting"); } noTickTime = 0f; } private void SpillBloodOntoV1() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate(AK_Controller.prefabDict["BloodSplat"], ((Component)MonoSingleton.Instance).transform.position, Quaternion.identity); val.GetComponent().hpAmount = 20; if (currentState == "Spilling Blood For Player") { ((MonoBehaviour)this).Invoke("SpillBloodOntoV1", 0.3f); } } private bool AngryFor(float amount) { return angerMeter + temporaryIrratation / 2f >= amount; } private float GetRealAnger() { return angerMeter + temporaryIrratation / 2f; } private Dictionary RandomWishes(bool addToTheWishDict = false, int mood = -1) { bool flag = Random.Range(0, 21) <= 10; if (AngryFor(35f) || !Remembers("Player")) { flag = false; } if (mood < 0) { mood = Random.Range(0, 101); } Dictionary dictionary = new Dictionary(); if (flag && mood > 49) { dictionary.Add("Nice_Heal Player", mood - 2); dictionary.Add("Nice_Give Dual-Wield", mood - 5); dictionary.Add("Nice_Give Style", mood - 6); } if (mood < 30) { dictionary.Add("Bad_Snap Player's Neck", 75); if (flag) { dictionary.Add("Nice_Heal Player", 40); } else { dictionary.Add("Nice_Kill Some Enemies", 40); } dictionary.Add("Bad_Puppet Enemy", 30); } if (mood >= 10 && mood < 20) { dictionary.Add("Bad_Kill Player", 50); dictionary.Add("Bad_Puppet Enemy", 30); dictionary.Add("Bad_Punch Player", 65); } if (mood < 10) { dictionary.Add("Bad_Kill Player In Person", 70); dictionary.Add("Bad_Throw Player Around", 67); dictionary.Add("Bad_Punch Player", 65); } if (mood >= 30 && mood <= 49) { dictionary.Add("Stalking", 40); dictionary.Add("Bad_Puppet Enemy", 60); if (flag) { dictionary.Add("Nice_Heal Player", 50); } else { dictionary.Add("Nice_Kill Some Enemies", 50); } } if (!flag && mood > 49) { dictionary.Add("Nice_Kill All Enemies", mood - 3); dictionary.Add("Nice_Give Overheal", mood - 5); dictionary.Add("Nice_Kill Some Enemies", mood - 2); } if (addToTheWishDict) { for (int i = 0; i < dictionary.Count; i++) { wish.Add(dictionary.Keys.ToList()[i], dictionary.Values.ToList()[i]); } } return dictionary; } public void SlapPlayerRealHard() { ControllerAssistant.KillPlayer(instablack: true); } public void SlamHurtPlayer() { MonoSingleton.Instance.GetHurt(10, false, 1.5f, false, false, 0f, true); } } 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 easterEggs; public static string activeEasterEggName; public static string recentlyUnlockedEEName; public static void Init() { easterEggs = new List(); easterEggs.Add(NewEasterEgg("Beginner's Luck", 100000000, 130000000)); LoadUnlocks(AbsurdSaveFileManager.ReadMainSave().unlockedEasterEggs); } public static void LoadUnlocks(List 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)(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 unlockedEasterEggs = AbsurdSaveFileManager.ReadMainSave().unlockedEasterEggs; unlockedEasterEggs.Add(easterEggName); AbsurdSaveFileManager.Main_WriteValue("EEunlocks", unlockedEasterEggs); } } public class TwichChatSystem : MonoBehaviour { public void TwitchMessageChain() { List list = new List { "", "", "" }; string text = ""; List list2 = new List { "_xX_", "ULTRA", "V", "", "", "", "", "" }; List list3 = new List { "Gamer", "Rick", "Sysiphus", "Minos", "NFT", "Crypto", "Rich", "_One", "Maurice", "Mindflayer", "Best" }; List list4 = new List { "Pro", "Shooter", "Prime", "King", "Lover", "Investor", "Mannequin", "Fan", "Enjoyer", "", "", "" }; List list5 = new List { "_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 list6 = new List { "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 || HerobrineEngine.demonicallyAngry) { flag = false; } if (HerobrineEngine.demonicallyAngry) { text2 = "ENTITY_666"; list6 = new List { "WORSHIP HIM.", "STAY ON YOUR KNEES, MORTAL.", "SHOULD HAVE BEEN SILENT.", "SHAME ON YOU.", "YOU CAN'T RUN.", "YOU CAN'T HIDE.", "HE WILL ALWAYS FIND YOU.", "HE IS ALL.", "YOU ARE NOTHING.", "BOW TO THE KING.", "MEET YOUR DEMISE.", "YOU CAN'T STEP BACK.", "THERE IS NO ESCAPE." }; flag = false; num = -666; } if (text2 == "") { text2 = list3[Random.Range(0, list3.Count)]; } text3 += text2; if (flag) { text3 += $" donated {num}P"; } text3 += ": "; if (flag) { text3 += ""; } text3 += list6[Random.Range(0, list6.Count)]; if (flag) { text3 += ""; GameProgressSaver.AddMoney(num); if (Object.op_Implicit((Object)(object)MonoSingleton.Instance)) { MonoSingleton.Instance.AddPoints(1000, "", (GameObject)null, (EnemyIdentifier)null, -1, "", ""); } } StyleHUD instance = MonoSingleton.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; public bool autoAnimationControl; public float punchTime; private string currentAnimation; private bool animatingPunch; private bool navigating; public float runSpeed; private float targetKillCountdown; private bool aboutToTargetKill; private GameObject targetKillTarget; private bool nextTKPlayerOneShot; private float behindYouCooldown; private int punchesToDo; private bool crashGameNextPunch; private bool despawnAfterPunching; private bool despawnNextPunch; private float idleDurNavTime; public bool stalkerMode; private void Start() { //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)MonoSingleton.Instance)) { Object.DestroyImmediate((Object)(object)((Component)this).gameObject); return; } AudioSource val = ((Component)this).gameObject.AddComponent(); val.spatialBlend = 1f; val.playOnAwake = false; val.loop = false; val.minDistance = 5f; val.maxDistance = 50f; rb = ((Component)this).gameObject.AddComponent(); rb.useGravity = true; rb.isKinematic = false; rb.constraints = (RigidbodyConstraints)122; rb.interpolation = (RigidbodyInterpolation)0; BoxCollider val2 = ((Component)this).gameObject.AddComponent(); val2.size = new Vector3(0.2f, 3f, 0.2f); val2.center = new Vector3(0f, 1.27f, 0f); ((Collider)val2).isTrigger = false; float num = 20f; agent = ((Component)this).gameObject.AddComponent(); agent.speed = num; agent.angularSpeed = num * 8f; agent.acceleration = num * 3f - 5f; agent.updateRotation = false; agent.updatePosition = false; Transform transform = ((Component)this).transform; transform.localScale *= 2f; NavMeshHit val3 = default(NavMeshHit); if (NavMesh.SamplePosition(((Component)this).transform.position, ref val3, float.PositiveInfinity, -1)) { ((Component)this).transform.position = ((NavMeshHit)(ref val3)).position; } FollowNavMesh val4 = ((Component)this).gameObject.AddComponent(); if (!agent.isOnNavMesh) { val4.target = null; } else { val4.target = ((Component)MonoSingleton.Instance).transform; } val4.trackFrequency = 0.1f; anim.Play("Idle", 0, 0f); currentAnimation = "Idle"; animatingPunch = false; targetKillCountdown = 0f; aboutToTargetKill = false; targetKillTarget = null; behindYouCooldown = 0f; punchesToDo = 0; crashGameNextPunch = false; despawnNextPunch = false; idleDurNavTime = 0f; } private void Update() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_05df: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_0606: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Unknown result type (might be due to invalid IL or missing references) //IL_04e7: Unknown result type (might be due to invalid IL or missing references) //IL_04f2: Unknown result type (might be due to invalid IL or missing references) //IL_04fc: Unknown result type (might be due to invalid IL or missing references) //IL_0501: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_06e3: Unknown result type (might be due to invalid IL or missing references) //IL_06e8: Unknown result type (might be due to invalid IL or missing references) NewMovement instance = MonoSingleton.Instance; Quaternion val; if (stare && !navigating) { val = Quaternion.LookRotation(((Component)instance).transform.position - ((Component)this).transform.position); Vector3 eulerAngles = ((Quaternion)(ref val)).eulerAngles; eulerAngles.x = 0f; eulerAngles.y += 180f; eulerAngles.z = 0f; ((Component)this).transform.rotation = Quaternion.Euler(eulerAngles); } if (navigating) { if (!agent.isOnNavMesh) { Despawn(causeAnger: true); return; } val = Quaternion.LookRotation(agent.steeringTarget - ((Component)this).transform.position); Vector3 eulerAngles2 = ((Quaternion)(ref val)).eulerAngles; eulerAngles2.x = 0f; eulerAngles2.y += 180f; eulerAngles2.z = 0f; ((Component)this).transform.rotation = Quaternion.Euler(eulerAngles2); if (punchTime <= 0f && currentAnimation != "Punch") { agent.updatePosition = true; } else { agent.updatePosition = false; } if (currentAnimation == "Idle") { idleDurNavTime += Time.deltaTime; } else { idleDurNavTime = 0f; } if (idleDurNavTime >= 1f && behindYouCooldown <= 0f) { Vector3 val2 = ((Component)instance).transform.position - ((Component)instance).transform.forward * 8f; ((Component)this).transform.position = val2; agent.Warp(val2); HerobrineEngine.PlayCaveSound(); CameraController instance2 = MonoSingleton.Instance; instance2.rotationY += 180f; behindYouCooldown = 5f; } if (punchesToDo > 0 && Vector3.Distance(((Component)this).transform.position, ((Component)instance).transform.position) <= 3f && punchTime <= 0f) { punchesToDo--; if (punchesToDo < 1 && despawnAfterPunching) { despawnNextPunch = true; } Punch(((Component)instance).gameObject); } } else { agent.updatePosition = false; } if (stalkerMode) { float num = Vector3.Distance(((Component)this).transform.position, ((Component)instance).transform.position); if (num > 50f || num < 3f) { Vector3 val3 = ((Component)instance).transform.position - ((Component)instance).transform.forward * 9f; ((Component)this).transform.position = val3; agent.Warp(val3); } if (num > 15f) { stare = false; navigating = true; if (num > 30f) { runSpeed = 20f; } else { runSpeed = 10f; } } if (num <= 9f) { navigating = false; stare = true; } } punchTime = Mathf.Clamp(punchTime - Time.deltaTime, 0f, 100f); targetKillCountdown = Mathf.Clamp(targetKillCountdown - Time.deltaTime, 0f, 0.15f); behindYouCooldown = Mathf.Clamp(behindYouCooldown - Time.deltaTime, 0f, 1.5f); if (aboutToTargetKill && targetKillCountdown <= 0f) { if ((Object)(object)targetKillTarget != (Object)null) { NewMovement component = targetKillTarget.GetComponent(); EnemyIdentifier component2 = targetKillTarget.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { if (nextTKPlayerOneShot) { ControllerAssistant.KillPlayer(); } else { component.hp = 1; component.FakeHurt(false); component.ForceAntiHP(99f, true, true, true, false); component.EmptyStamina(); MonoSingleton.Instance.Charge(-9999f); component.Jump(); Rigidbody obj = component.rb; obj.velocity += ((Component)instance).transform.forward * -50f; HerobrineEngine.GetAngry(-9f); } if (crashGameNextPunch) { HerobrineEngine.CrashGame(); crashGameNextPunch = false; } } else if (Object.op_Implicit((Object)(object)component2)) { if (Object.op_Implicit((Object)(object)component2.idol)) { component2.idol.Death(); return; } component2.puppet = true; component2.Explode(false); HerobrineEngine.GetAngry(-1f); } else if (!Object.op_Implicit((Object)(object)component) && !Object.op_Implicit((Object)(object)component2)) { Object.DestroyImmediate((Object)(object)targetKillTarget); } targetKillTarget = null; } aboutToTargetKill = false; nextTKPlayerOneShot = false; } if (!autoAnimationControl) { return; } Vector3 velocity = rb.velocity; float magnitude = ((Vector3)(ref velocity)).magnitude; if (agent.updatePosition) { velocity = agent.velocity; magnitude = ((Vector3)(ref velocity)).magnitude; } if (!animatingPunch) { if (magnitude < 1.5f && currentAnimation != "Idle") { anim.Play("Idle", 0, 0f); anim.speed = 1f; currentAnimation = "Idle"; } else if (magnitude >= 1.5f && currentAnimation != "Walk") { anim.Play("Walk", 0, 0f); anim.speed = magnitude / 10f; currentAnimation = "Walk"; } AnimatorStateInfo currentAnimatorStateInfo = anim.GetCurrentAnimatorStateInfo(0); if ((currentAnimation == "Idle" || currentAnimation == "Walk") && ((AnimatorStateInfo)(ref currentAnimatorStateInfo)).normalizedTime >= 1f && !anim.IsInTransition(0)) { anim.Play(currentAnimation, 0, 0f); if (currentAnimation == "Walk") { anim.speed = magnitude / 10f; } else { anim.speed = 1f; } } } else { if (currentAnimation != "Punch") { anim.Play("Punch", 0, 0f); anim.speed = 1f; currentAnimation = "Punch"; } if (punchTime <= 0f) { anim.Play("Idle", 0, 0f); anim.speed = 1f; currentAnimation = "Idle"; if (despawnNextPunch) { Despawn(); } animatingPunch = false; } } if (currentAnimation == "Walk") { anim.speed = magnitude / 10f; } } public void Punch(GameObject objectToPunch, bool doDamage = true, bool oneShotPlayer = false, bool gameFatal = false, bool despawnAfter = true) { punchTime = 0.3f; animatingPunch = true; if (doDamage) { targetKillCountdown = 0.15f; targetKillTarget = objectToPunch; aboutToTargetKill = true; if (oneShotPlayer) { nextTKPlayerOneShot = true; } if (gameFatal) { crashGameNextPunch = true; } } } public void Despawn(bool causeAnger = false) { if (causeAnger) { HerobrineEngine.GetAngry(6f); HerobrineEngine.PlayCaveSound(); } Object.DestroyImmediate((Object)(object)((Component)this).gameObject); } public void StartNavigating(float withSpeed = -1f) { stare = false; navigating = true; if (withSpeed < 0f) { withSpeed = runSpeed; } runSpeed = withSpeed; } public void StopRunning(bool startStaring = true) { navigating = false; if (startStaring) { stare = true; } } public static GameObject SpawnHerobrine(Vector3 position, bool willStare = true, bool autoAnimationControl = true, float runSpeed = 10f, bool agressive = false, uint numberOfPunches = 1u, bool despawnAfterPunching = true, bool strongerPunch = false) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) ThreeDModelData threeDModelData = AbsurdAssetLoader.LoadEmbbededModelData("HerobrineFr", "HerobrinesTextureFr", "HerobrineAnimationControl"); Material val = new Material(Shader.Find("Unlit/Texture")); Texture mainTexture = threeDModelData.mat.mainTexture; mainTexture.filterMode = (FilterMode)0; mainTexture.mipMapBias = 0f; mainTexture.anisoLevel = 0; val.mainTexture = mainTexture; threeDModelData.mat = val; GameObject val2 = Object.Instantiate(threeDModelData.model, position, threeDModelData.model.transform.rotation); MeshRenderer[] componentsInChildren = val2.GetComponentsInChildren(); foreach (MeshRenderer val3 in componentsInChildren) { ((Renderer)val3).material = threeDModelData.mat; } AbsurdHerobrine absurdHerobrine = val2.AddComponent(); absurdHerobrine.anim = val2.AddComponent(); absurdHerobrine.anim.runtimeAnimatorController = threeDModelData.animatorController; absurdHerobrine.stare = willStare; absurdHerobrine.autoAnimationControl = autoAnimationControl; absurdHerobrine.punchTime = 0f; absurdHerobrine.runSpeed = 10f; if (agressive) { absurdHerobrine.StartNavigating(); } else { absurdHerobrine.navigating = false; } if (agressive) { absurdHerobrine.punchesToDo = Mathf.Clamp((int)numberOfPunches, 1, int.MaxValue); absurdHerobrine.despawnAfterPunching = despawnAfterPunching; absurdHerobrine.nextTKPlayerOneShot = strongerPunch; } else { absurdHerobrine.punchesToDo = 0; absurdHerobrine.despawnAfterPunching = false; absurdHerobrine.nextTKPlayerOneShot = false; } absurdHerobrine.stalkerMode = false; return val2; } public bool CheckSighted(bool checkAttacked = false, bool checkAttackHold = false) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) InputManager instance = MonoSingleton.Instance; int num = 1; if (checkAttacked) { num++; } if (checkAttackHold) { num++; } int num2 = 0; if (ControllerAssistant.BeingLookedAt(((Component)this).transform.position)) { num2++; if (checkAttacked) { if (instance.InputSource.Fire1.WasPerformedThisFrame || instance.InputSource.Fire2.WasPerformedThisFrame) { num2++; } if (instance.InputSource.Fire1.IsPressed || instance.InputSource.Fire2.IsPressed) { num2++; } } if (num2 >= num) { return true; } return false; } return false; } } 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 cooldowns; private Vector3 lastTrackPos; private Vector3 lastDir; private float lostTime; public string themeLyrics; private void Start() { //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Expected O, but got Unknown //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Expected O, but got Unknown //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) cooldowns = new Dictionary { { "jumpCheck", 0f }, { "subtitles", 0f } }; agent = ((Component)this).gameObject.AddComponent(); 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(); if (!agent.isOnNavMesh) { val2.target = null; } else { val2.target = target.targetTransform; } val2.trackFrequency = 0.1f; rb = ((Component)this).gameObject.AddComponent(); rb.useGravity = true; rb.isKinematic = false; rb.interpolation = (RigidbodyInterpolation)1; rb.collisionDetectionMode = (CollisionDetectionMode)1; rb.constraints = (RigidbodyConstraints)112; BoxCollider val3 = ((Component)this).gameObject.AddComponent(); 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(); val5.size = new Vector3(0.5f, 5f, 5f); val5.center = new Vector3(0f, 2.5f, 0f); ((Collider)val5).isTrigger = true; val4.AddComponent(); 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(); val7.sprite = nextbotPNG; AudioSource val8 = ((Component)this).gameObject.AddComponent(); val8.spatialBlend = 1f; val8.playOnAwake = false; val8.loop = true; val8.minDistance = 5f; val8.maxDistance = 50f; val8.clip = nextbotTheme; val8.Play(); ((Component)this).gameObject.AddComponent(); 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_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.LookAt(((Component)MonoSingleton.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); cooldowns["subtitles"] = Mathf.Clamp(cooldowns["subtitles"] - Time.deltaTime, 0f, 999f); if (cooldowns["subtitles"] <= 0f) { ControllerAssistant.DisplaySpecialSubtitle(themeLyrics, ((Component)this).gameObject.GetComponent(), inevitible: false); cooldowns["subtitles"] = 6f; } 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.25f; } } 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_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) force = Mathf.Clamp(force, 0f, maxJumpForce); if (Mathf.Abs(rb.velocity.y) < 1f) { Transform transform = ((Component)this).transform; transform.position += new Vector3(0f, force * 10f, 0f); rb.velocity = new Vector3(rb.velocity.x, 0f, rb.velocity.z); Transform transform2 = ((Component)this).transform; transform2.position += rb.velocity; agent.Warp(((Component)this).transform.position); } } public static GameObject SpawnNextbot(Vector3 position, EnemyTarget target, float speed, Sprite PNG, AudioClip theme, string name = "Nextbot", float maxJumpForce = 50f) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Nextbot(" + name + ")"); val.transform.position = position; AbsurdNextbot absurdNextbot = val.AddComponent(); absurdNextbot.target = target; absurdNextbot.speed = speed; absurdNextbot.nextbotPNG = PNG; absurdNextbot.nextbotTheme = theme; absurdNextbot.stunTime = 1f; absurdNextbot.personalName = name; absurdNextbot.maxJumpForce = maxJumpForce; return val; } } public class DestroyOnParentDeath : MonoBehaviour { private void Update() { if ((Object)(object)((Component)this).gameObject.transform.parent == (Object)null || (Object.op_Implicit((Object)(object)((Component)((Component)this).gameObject.transform.parent).gameObject.GetComponent()) && ((Component)((Component)this).gameObject.transform.parent).gameObject.GetComponent().dead)) { Object.DestroyImmediate((Object)(object)((Component)this).gameObject); } } } public class ForceKillCollider : MonoBehaviour { private void OnTriggerEnter(Collider other) { //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Expected O, but got Unknown //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Expected O, but got Unknown //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Expected O, but got Unknown AbsurdNextbot component = ((Component)((Component)this).transform.parent).gameObject.GetComponent(); if (BlindEnemies.Blind || component.stunTime > 0f) { return; } if (Object.op_Implicit((Object)(object)((Component)other).gameObject.GetComponent()) && !((Component)other).gameObject.GetComponent().dead) { CheatsManager instance = MonoSingleton.Instance; FieldInfo field = ((object)instance).GetType().GetField("idToCheat", BindingFlags.Instance | BindingFlags.NonPublic); Dictionary dictionary = (Dictionary)field.GetValue(instance); foreach (string key in dictionary.Keys) { instance.DisableCheat(key); } NewMovement component2 = ((Component)other).gameObject.GetComponent(); component2.hp = 0; component2.ForceAntiHP(9999f, true, true, false, true); if (Object.op_Implicit((Object)(object)((Component)other).gameObject.GetComponent())) { ((Component)other).gameObject.GetComponent().forceKill = true; } component2.GetHurt(9999999, true, 0f, false, true, 0f, false); component.target = new EnemyTarget(((Component)component2).transform); ((Component)component).gameObject.GetComponent().target = component.target.targetTransform; } else if (Object.op_Implicit((Object)(object)((Component)other).gameObject.GetComponent())) { EnemyIdentifier component3 = ((Component)other).gameObject.GetComponent(); component3.puppet = true; component3.Explode(false); component.target = new EnemyTarget(((Component)MonoSingleton.Instance).transform); ((Component)component).gameObject.GetComponent().target = component.target.targetTransform; } else if (!Object.op_Implicit((Object)(object)((Component)other).gameObject.GetComponent()) && !Object.op_Implicit((Object)(object)((Component)other).gameObject.GetComponent())) { Object.DestroyImmediate((Object)(object)((Component)other).gameObject); component.target = new EnemyTarget(((Component)MonoSingleton.Instance).transform); ((Component)component).gameObject.GetComponent().target = component.target.targetTransform; } } } public class KeyboardInteractiveMenu : MonoBehaviour { public Dictionary KeyboardInteractions; private void Update() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) foreach (KeyValuePair keyboardInteraction in KeyboardInteractions) { if (Input.GetKeyDown(keyboardInteraction.Key)) { keyboardInteraction.Value?.Invoke(); } } } public static void EscapeWarning() { AbsurdSaveFileManager.Main_WriteValue("listened", true); AbsurdUIManager.CompleteDeathList(); } } public class RecoilManager : MonoBehaviour { public float recoilLeft; private void Start() { recoilLeft = 0f; } public void Recoil(float strength) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) MonoSingleton.Instance.rb.AddForce(strength * -((Component)MonoSingleton.Instance).transform.forward, (ForceMode)2); recoilLeft += strength; } private void Update() { CameraController instance = MonoSingleton.Instance; instance.rotationX += recoilLeft * Time.deltaTime * 10f; recoilLeft = Mathf.MoveTowards(recoilLeft, 0f, Time.deltaTime * 50f); } } public class ScienceBlackhole : MonoBehaviour { public float mass = 1000f; public static ScienceBlackhole Create(Vector3 pos) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) ThreeDModelData threeDModelData = AbsurdAssetLoader.LoadEmbbededModelData("RealBlackHole", "blackholeMat", "BlackholeAnimator"); Material val = new Material(Shader.Find("Unlit/Texture")); Texture mainTexture = threeDModelData.mat.mainTexture; mainTexture.filterMode = (FilterMode)0; mainTexture.mipMapBias = 0f; mainTexture.anisoLevel = 0; val.mainTexture = mainTexture; threeDModelData.mat = val; GameObject val2 = Object.Instantiate(threeDModelData.model, pos, threeDModelData.model.transform.rotation); MeshRenderer[] componentsInChildren = val2.GetComponentsInChildren(); foreach (MeshRenderer val3 in componentsInChildren) { ((Renderer)val3).material = threeDModelData.mat; } return val2.AddComponent(); } } } namespace AbsurdKillMod.HarmonyPatches { [HarmonyPatch(typeof(Bloodsplatter), "Awake")] public class HarmoPatch_BloodParticlesStart { private static void Postfix(Bloodsplatter __instance) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) if (AK_Controller.currentEffects.Contains("RainbowBlood")) { MainModule main = __instance.part.main; ((MainModule)(ref main)).startColor = new MinMaxGradient(Color.HSVToRGB(Random.Range(0f, 255f) / 255f, 1f, 1f), Color.HSVToRGB(Random.Range(0f, 255f) / 255f, 1f, 1f)); } if (AK_Controller.Patch_Money) { int hitTimes = 2; if (__instance.fromExplosion) { hitTimes = 5; } for (int i = 0; i < 8; i++) { GameObject val = Object.Instantiate(AK_Controller.prefab_coin, ((Component)__instance).transform.position, ((Component)__instance).transform.rotation); val.GetComponent().AddForce(new Vector3((float)(Random.Range(-75, 75) / 10), (float)(Random.Range(-75, 75) / 10), (float)(Random.Range(-75, 75) / 10)), (ForceMode)2); val.GetComponent().hitTimes = hitTimes; val.GetComponent().doubled = true; } __instance.hpAmount = 0; Object.DestroyImmediate((Object)(object)((Component)__instance).gameObject); } } } [HarmonyPatch(typeof(Coin), "Update")] public class HarmoPatch_CoinUpdate { private static void Postfix(Coin __instance) { //IL_0017: 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) if (AK_Controller.collectedCoinThisFrame) { NewMovement instance = MonoSingleton.Instance; if (Vector3.Distance(((Component)__instance).transform.position, ((Component)instance).transform.position) < 3.5f) { ((Component)Object.FindObjectOfType()).GetComponent().PlayOneShot(AK_Controller.findSoundFromStore("CoinSfx")); instance.GetHealth(5 * __instance.hitTimes, false, false, true); GameProgressSaver.AddMoney(AK_Controller.coinsWorth); AK_Controller.collectedCoinThisFrame = true; Object.Destroy((Object)(object)((Component)__instance).gameObject); } } } } [HarmonyPatch(typeof(BossHealthBar), "Start")] public class HarmoPatch_BossBarName { private static void Postfix(BossHealthBar __instance) { if (AK_Controller.Patch_BossBarKittens) { __instance.bossName = AK_Controller.CurseText_RewriteAsKitten(__instance.bossName); } } } [HarmonyPatch(typeof(ShopZone), "Start")] public class HarmoPatch_DailyTipSetup { private static void Postfix(ShopZone __instance) { if (AK_Controller.Patch_TerminalBasity) { __instance.tipOfTheDay.text = AK_Controller.CurseText_GenerateDailyTip(); } } } [HarmonyPatch(typeof(EnemyIdentifier), "Death", new Type[] { typeof(bool) })] public class HarmoPatch_EnemyDeath { private static void Prefix(EnemyIdentifier __instance, bool fromExplosion) { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) if (AK_Controller.currentEffects.Contains("EnemyMinosGift")) { AbsurdKill_ObjectPlugin component = ((Component)__instance).gameObject.GetComponent(); if (((Object)(object)component == (Object)null || ((Object)(object)component != (Object)null && !component.dontSpawnSurprise)) && !__instance.dead && Random.Range(0, 100) <= 5) { GameObject val = Object.Instantiate(AK_Controller.prefab_minosPrime, ((Component)__instance).transform.position, Quaternion.identity); val.AddComponent().dontApplySpawnPatches = true; EnemyIdentifier component2 = val.GetComponent(); component2.BossBar(true); ((Component)component2).gameObject.GetComponent().bossName = "Surprise Prime"; } } } } [HarmonyPatch(typeof(EnemyIdentifier), "IsTypeFriendly")] public class HarmoPatch_EnemyRelationship { private static bool Prefix(EnemyIdentifier __instance, EnemyIdentifier owner, ref bool __result) { AbsurdKill_ObjectPlugin component = ((Component)__instance).GetComponent(); if ((Object)(object)component != (Object)null && component.My_modEnemyRs != 0) { if (component.My_modEnemyRs == AbsurdKill_ObjectPlugin.ModEnemyRelationship.HostileToAllEmemies) { __result = false; } else { __result = true; } return false; } return true; } } [HarmonyPatch(typeof(EnemyIdentifier), "Start")] public class HarmoPatch_EnemySpawn { private static void Postfix(EnemyIdentifier __instance) { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Invalid comparison between Unknown and I4 //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_017c: 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) AbsurdKill_ObjectPlugin component = ((Component)__instance).gameObject.GetComponent(); if ((Object)(object)component == (Object)null || ((Object)(object)component != (Object)null && !component.dontApplySpawnPatches)) { if (AK_Controller.currentEffects.Contains("RandomEnemySize")) { float num = Random.Range(5f, 20f) / 10f; Transform transform = ((Component)__instance).transform; transform.localScale *= num; } if (AK_Controller.currentEffects.Contains("HuskRandomPower")) { float num2 = Random.Range(5f, 20f) / 10f; if (num2 > 1f) { __instance.HealthBuff(num2); } else { __instance.SimpleDamage(__instance.health * (1f - num2)); } } if (AK_Controller.currentEffects.Contains("HuskBallonHeads") && (int)__instance.enemyClass == 0) { EnemyIdentifierIdentifier[] componentsInChildren = ((Component)__instance.zombie).GetComponentsInChildren(true); EnemyIdentifierIdentifier[] array = componentsInChildren; foreach (EnemyIdentifierIdentifier val in array) { if (((Component)val).gameObject.CompareTag("Head")) { Transform transform2 = ((Component)val).gameObject.transform; transform2.localScale *= 2f; if (Random.Range(0, 100) <= 5) { Transform transform3 = ((Component)val).gameObject.transform; transform3.localScale *= 5f; } } } } } if (AK_Controller.currentEffects.Contains("CaseohVision")) { Renderer[] componentsInChildren2 = ((Component)__instance).GetComponentsInChildren(); foreach (Renderer val2 in componentsInChildren2) { val2.enabled = false; } Renderer[] components = ((Component)__instance).GetComponents(); foreach (Renderer val3 in components) { val3.enabled = false; } ControllerAssistant.CreateFoodImagination(((Component)__instance).transform); } } } [HarmonyPatch(typeof(EnemyIdentifier), "Update")] public class HarmoPatch_EnemyUpdate { private static void Postfix(EnemyIdentifier __instance) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Invalid comparison between Unknown and I4 //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) if (!__instance.dead) { if (AK_Controller.currentEffects.Contains("EnemyGrowth")) { Transform transform = ((Component)__instance).transform; transform.localScale += Vector3.one * (float)AK_Controller.PeronlS_EGrowthSpeed / 6.5f * Time.deltaTime; } if ((int)__instance.enemyType == 9 && AK_Controller.currentEffects.Contains("SmartVirtues")) { Transform transform2 = ((Component)__instance).transform; transform2.position += Vector3.up * ((float)AK_Controller.PeronlS_VirtueIQ / 15f) / 3f * Time.deltaTime; } if (AK_Controller.currentEffects.Contains("Spinny")) { Quaternion val = ((Component)__instance).transform.rotation; Vector3 eulerAngles = ((Quaternion)(ref val)).eulerAngles; Vector3 val2 = eulerAngles; val = Quaternion.Euler(1080f * Time.deltaTime, 0f, 0f); eulerAngles = val2 + ((Quaternion)(ref val)).eulerAngles; ((Component)__instance).transform.rotation = Quaternion.Euler(eulerAngles); } } } } [HarmonyPatch] public class HarmoPatch_PartyColors { [HarmonyPatch(typeof(TMP_Text), "PopulateTextProcessingArray")] [HarmonyPostfix] private static void ColorText(TMP_Text __instance) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) if (AK_Controller.Patch_PartyText) { ((Graphic)__instance).color = Color.HSVToRGB(Random.Range(0f, 255f) / 255f, 1f, 1f); } } [HarmonyPatch(typeof(Image), "OnEnable")] [HarmonyPostfix] private static void ColorUI(Image __instance) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) if (AK_Controller.Patch_PartyUI) { ((Graphic)__instance).color = Color.HSVToRGB(Random.Range(0f, 255f) / 255f, 1f, 1f); } } [HarmonyPatch(typeof(Renderer), "SetMaterial")] [HarmonyPostfix] private static void ColorRender(Renderer __instance, Material m) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) if (AK_Controller.Patch_PartyRenderers) { __instance.material.color = Color.HSVToRGB(Random.Range(0f, 255f) / 255f, 1f, 1f); } } } [HarmonyPatch(typeof(NewMovement), "GetHurt")] public class HarmoPatch_PlayerHurt { private static bool Prefix(NewMovement __instance, int damage, bool invincible, float scoreLossMultiplier = 1f, bool explosion = false, bool instablack = false, float hardDamageMultiplier = 0.35f, bool ignoreInvincibility = false) { if (PersEaster_Controller.activeEasterEggName == "Beginner's Luck" && __instance.hp - damage < 1) { __instance.FakeHurt(false); __instance.hp = 1; return ForcerFunctions.ApplyForceKill(); } ForcerFunctions.ApplyForceKill(); return true; } } [HarmonyPatch(typeof(Shotgun), "Shoot")] public class HarmoPatch_ShotgunShoot { private static void Postfix(Shotgun __instance) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) NewMovement instance = MonoSingleton.Instance; if (!((Object)(object)instance == (Object)null) && AK_Controller.Patch_ShotgunAcc) { Object.Instantiate(AK_Controller.prefabDict["Blastwave"], ((Component)instance).transform.position + new Vector3(0f, 1f, 0f), Quaternion.identity); ((Component)instance).GetComponent().Recoil(20f); } } } [HarmonyPatch(typeof(Subtitle), "Awake")] public class HarmoPatch_Subtitles { private static void Prefix(Subtitle __instance) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown if (AK_Controller.Patch_BrainrotSubtitles && ControllerAssistant.noGenAlphaSubsTime <= 0f) { FieldInfo field = ((object)__instance).GetType().GetField("uiText", BindingFlags.Instance | BindingFlags.NonPublic); TMP_Text val = (TMP_Text)field.GetValue(__instance); val.text = AK_Controller.CurseText_RewriteAsGenAlpha(val.text); if (HerobrineEngine.demonicallyAngry) { val.text = "SHOULD HAVE STAYED ON YOUR KNEES ALL ALONG!"; } field.SetValue(__instance, val); } } } } namespace AbsurdKillMod.Classes { [Serializable] public class DotABSF { [SerializeField] public int personalCode; [SerializeField] public List unlockedEasterEggs; [SerializeField] public bool readWarning; } public class PersEasterEgg { public bool unlocked; public string easterEggName; public int[] homePersonalizRange; public string statusString { get { string text = "Null"; if (!unlocked) { return "LOCKED"; } return $"Name: {easterEggName}; Personalization Range: {homePersonalizRange[0]} - {homePersonalizRange[1]}"; } } public void Init(string nameToSet, int persMin, int persMax) { easterEggName = nameToSet; homePersonalizRange = new int[2]; homePersonalizRange[0] = persMin; homePersonalizRange[1] = persMax; } } public class PersonalEffects { public Scene targetScene; public List effects = new List(); } public class ThreeDModelData { public GameObject model; public Material mat; public RuntimeAnimatorController animatorController; } }