Decompiled source of AbsurdKillMod v1.7.6
AbsurdKillMod/AbsurdKillMod.dll
Decompiled a day ago
The result has been truncated due to the large size, download it to view full contents!
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<Vector3> list = new List<Vector3> { 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<string, AudioClip> audioStore = new Dictionary<string, AudioClip>(); [Configgable("", "Enable Random Events", 0, "The best part of the mod, enable it or i will eat you.")] public static bool chaos = true; [Configgable("", "Event Chance", 1, "Chance of an event occuring, you can't put it on zero, lil' bro.")] [Range(1f, 100f)] public static int chaosChance = 10; [Configgable("", "Coin Price", 2, "The price of a marksman coin.")] [Range(100f, 10000f)] public static int coinsWorth = 500; [Configgable("", "Leak Personal Data", 3, "Turning this off will pervent the mod from leaking your personal data. Disable it if you're a streamer!")] public static bool allowLeakingData = true; [Configgable("Random Events", "Banana Peel", 0, "V1 can slip on a banana peel.")] public static bool Event_BananaPeel = true; [Configgable("Random Events", "Twist Villan", 1, "Shows, that this one filth was hell itself this whole time.")] public static bool Event_PlotTwist = true; [Configgable("Random Events", "Pokemonization", 2, "Some enemies might want to fight on the side of a stylish robot.")] public static bool Event_EnemyCharm = true; [Configgable("Random Events", "Neculear War", 3, "Humans didn't end the war, they continued fighting in hell, as husks.")] public static bool Event_NeculearWar = true; [Configgable("Random Events", "Generous Donation", 4, "I'm MrBeast and i will 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<int> displayPersonalCode = new ConfigInputField<int>(100000000, (Func<int, bool>)null, (Func<string, ValueTuple<bool, int>>)null); [Configgable("Extras", "Reroll Personalization", 1, "Personalization is a 9-digit number, that decides which unique effects you will have in levels. Press the button to reroll your personalization")] public static ConfigToggle Extra_rerollPersonaliz = new ConfigToggle(false); [Configgable("Extras/Personalization Easter Eggs", "READ INFO", 0, "Personalization Easter Eggs are special effects, that activate when your personalization value is withn a specific range. You can get hints on what personalization values you need through Random Events. Once you activate one, the info will show up here.")] public static bool Extra_EEinstructions = false; [Configgable("Extras/Personalization Easter Eggs", "Easter Egg 1", 1, null)] public static ConfigInputField<string> EE1_info = new ConfigInputField<string>("LOCKED", (Func<string, bool>)null, (Func<string, ValueTuple<bool, string>>)null); [Configgable("Patches & Mech", "Economics", 0, "Sparechange%.")] public static bool Patch_Money = false; [Configgable("Patches & Mech", "UltraScam", 1, "If ultrakill was made by EA.")] public static bool Patch_Capitalism = true; [Configgable("Patches & Mech", "[RELOAD] Railrevolvers", 2, "Revolvers shoot railcannon beams.")] public static bool Patch_Railrev = true; [Configgable("Patches & Mech", "Shotgun blasts", 3, "Shotguns create blastwaves.")] public static bool Patch_ShotgunAcc = true; [Configgable("Patches & Mech", "[RELOAD] Diddy nailguns", 4, "Nails are replaced with oil.")] public static bool Patch_Diddlernails = true; [Configgable("Patches & Mech", "[RELOAD] Wrong circles", 5, "Marksman throws cannonballs instead of coins.")] public static bool Patch_HeavyCoins = true; [Configgable("Patches & Mech", "Based Terminals", 6, "Terminals become based.")] public static bool Patch_TerminalBasity = true; [Configgable("Patches & Mech", "Kitten Boss Bars", 7, "The boss bar titles become written by discord kittens.")] public static bool Patch_BossBarKittens = true; [Configgable("Patches & Mech", "Gen Alpha Subtitles", 8, "Subtitles' language changes to Gen Alpha Slang.")] public static bool Patch_BrainrotSubtitles = true; [Configgable("Patches & Mech/Party Colors", "Party Text", 0, null)] public static bool Patch_PartyText = true; [Configgable("Patches & Mech/Party Colors", "Party UI", 1, null)] public static bool Patch_PartyUI = false; [Configgable("Patches & Mech/Party Colors", "Party Lighting", 2, null)] public static bool Patch_PartyLights = true; [Configgable("Patches & Mech/Party Colors", "Party Render", 3, null)] public static bool Patch_PartyRenderers = false; [Configgable("Personalized Effects", "Amount", 0, "Amount of personalized effects you will have in each level.")] [Range(1f, 100f)] public static int PeronlAmount = 5; [Configgable("Personalized Effects", "Enemy scales", 1, "Enemies spawn randomly scaled.")] public static bool Peronl_EnemySizes = true; [Configgable("Personalized Effects", "Random Enemy Strength", 2, "Enemies spawn with randomly scaled health.")] public static bool Peronl_EnemyWeakness = true; [Configgable("Personalized Effects", "Ballon Heads", 3, "Enemies spawn with big heads.")] public static bool Peronl_BallonHeads = true; [Configgable("Personalized Effects", "Surprise Prime", 4, "Enemies have a 5% to spawn Minos Prime on death.")] public static bool Peronl_EnemyMentos = true; [Configgable("Personalized Effects", "Natural Regeneration", 5, "V1 regenerates with time.")] public static bool Peronl_NaturalRegen = true; [Configgable("Personalized Effects/Growing Enemies", "Enabled", 0, "Enemies grow with time.")] public static bool Peronl_EnemyGrowth = true; [Configgable("Personalized Effects/Growing Enemies", "Growth Speed", 1, null)] [Range(1f, 5f)] public static int PeronlS_EGrowthSpeed = 1; [Configgable("Personalized Effects", "Rainbow Blood", 6, "No white color, freak.")] public static bool Peronl_RainbowBlood = true; [Configgable("Personalized Effects/Smart Virtues", "Enabled", 0, "Virtues become actually smart.")] public static bool Peronl_VirtueBrain = true; [Configgable("Personalized Effects/Smart Virtues", "IQ", 1, null)] [Range(100f, 400f)] public static int PeronlS_VirtueIQ = 100; [Configgable("Personalized Effects", "Drunkness", 7, "V1 shouldn't have drunk this much blood.")] public static bool Peronl_DrunkV1 = true; [Configgable("Personalized Effects", "Spain without A", 8, "Spin.")] public static bool Peronl_Spinny = true; [Configgable("Personalized Effects", "Wet floor", 9, "Should have played this level other time.")] public static bool Peronl_WetLevel = true; [Configgable("Personalized Effects/Twich Chat", "Enabled", 0, "V1 went live for the Terminals.")] public static bool Peronl_UltraTwichChat = true; [Configgable("Personalized Effects/Twich Chat", "Style per message", 1, null)] [Range(5f, 100f)] public static int PeronlS_ChatStyle = 5; [Configgable("Personalized Effects/Twich Chat", "Colored Names", 2, null)] public static bool PeronlS_ChatNameColors = true; [Configgable("Personalized Effects/Twich Chat", "Donations", 3, null)] public static bool PeronlS_ChatDonations = true; public static int dice1000 = 0; public static float allTimeInSec = 0f; public static float sceneTimeInSec = 0f; public static int[] lastSecLogs = new int[2]; public static List<string> possibleEvents = new List<string>(); public static NewMovement nmov; private GunControl gc; 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<string> ownedProducts = new List<string>(); private int weaponSwitches = 0; private Harmony harmony; private Dictionary<EnemyType, GameObject> enemyGrades = new Dictionary<EnemyType, GameObject> { { (EnemyType)23, null }, { (EnemyType)21, null }, { (EnemyType)12, null }, { (EnemyType)36, null }, { (EnemyType)3, null }, { (EnemyType)13, null }, { (EnemyType)14, null }, { (EnemyType)1, null }, { (EnemyType)15, null }, { (EnemyType)31, null }, { (EnemyType)6, null }, { (EnemyType)20, null }, { (EnemyType)24, null }, { (EnemyType)4, null }, { (EnemyType)9, null }, { (EnemyType)0, null }, { (EnemyType)33, null }, { (EnemyType)34, null }, { (EnemyType)5, null }, { (EnemyType)2, null }, { (EnemyType)8, null }, { (EnemyType)25, null }, { (EnemyType)37, null } }; private Dictionary<int, EnemyType> enemyGradeNums = new Dictionary<int, EnemyType> { { 0, (EnemyType)23 }, { 1, (EnemyType)21 }, { 2, (EnemyType)12 }, { 3, (EnemyType)36 }, { 4, (EnemyType)3 }, { 5, (EnemyType)13 }, { 6, (EnemyType)14 }, { 7, (EnemyType)1 }, { 8, (EnemyType)15 }, { 9, (EnemyType)31 }, { 10, (EnemyType)6 }, { 11, (EnemyType)20 }, { 12, (EnemyType)24 }, { 13, (EnemyType)4 }, { 14, (EnemyType)9 }, { 15, (EnemyType)0 }, { 16, (EnemyType)33 }, { 17, (EnemyType)34 }, { 18, (EnemyType)5 }, { 19, (EnemyType)2 }, { 20, (EnemyType)8 }, { 21, (EnemyType)25 }, { 22, (EnemyType)37 } }; public static Dictionary<string, GameObject> prefabDict = new Dictionary<string, GameObject> { { "Cannonball", null }, { "Diddy Droplet", null }, { "Revolver Beam", null }, { "Revolver Beam Alt", null }, { "Nail", null }, { "Railcannon Beam", null }, { "Blastwave", null }, { "GuttermanAirdrop", null }, { "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<string> currentEffects = new List<string>(); public static float[] EE_unlockSceneVars = new float[2]; public static AK_Controller mevar; private int drunkSteps = 0; private void Awake() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Expected O, but got Unknown //IL_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<AudioClip>("goofy_slip")); audioStore.Add("Splat", val.LoadAsset<AudioClip>("goofy_fall")); audioStore.Add("WarMusic", val.LoadAsset<AudioClip>("music_war")); audioStore.Add("NukeFly", val.LoadAsset<AudioClip>("nuke_fly")); audioStore.Add("NukeExplode", val.LoadAsset<AudioClip>("nuke_explode")); audioStore.Add("CoinSfx", val.LoadAsset<AudioClip>("coin_collect")); audioStore.Add("EE_Unlock", val.LoadAsset<AudioClip>("mysteryBells")); AudioSource val2 = ((Component)this).gameObject.AddComponent<AudioSource>(); val2.spatialBlend = 1f; val2.playOnAwake = false; val2.loop = false; UpdatePossibleEvents(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"IT'SSSSS ABSURDKILL TIME!!!!- GET OUT!"); TryLoadStorages(); bool flag = false; if (!Directory.Exists(SaveFilePath)) { Directory.CreateDirectory(SaveFilePath); } SaveFileFile = Path.Combine(SaveFilePath, "AbsurdSaveFile.absf"); if (File.Exists(SaveFileFile)) { flag = true; } if (!flag) { DotABSF dotABSF = new DotABSF(); dotABSF.personalCode = Random.Range(100000000, 999999999); dotABSF.unlockedEasterEggs = new List<string>(); 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<AudioSource>().Stop(); ((MonoBehaviour)this).CancelInvoke("LandNuke"); } postBanana = false; if (Random.Range(0, 100) <= 50) { if (MonoSingleton<StatsManager>.Instance.restarts < 5) { Advertise("Struggling to beat this?", "Extra Health", 50000); } else { Advertise("You suck at the game?", "Invincibility", 1000000); } } else if (!ownedProducts.Contains("No cooldowns")) { Advertise("Want less cooldowns?", "No cooldowns", 500000); } else { Advertise("Want better weapons?", "Monster Gun", 750000); } } private void Update() { //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_037a: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_0751: Unknown result type (might be due to invalid IL or missing references) //IL_06b7: Unknown result type (might be due to invalid IL or missing references) //IL_06bc: Unknown result type (might be due to invalid IL or missing references) //IL_0c28: Unknown result type (might be due to invalid IL or missing references) //IL_0bdf: Unknown result type (might be due to invalid IL or missing references) //IL_0c07: Unknown result type (might be due to invalid IL or missing references) //IL_0c0c: Unknown result type (might be due to invalid IL or missing references) dice1000 = Random.Range(0, 1000); allTimeInSec += Time.deltaTime; sceneTimeInSec += Time.deltaTime; EE_unlockSceneVars[0] = Mathf.Clamp(EE_unlockSceneVars[0] - Time.deltaTime, 0f, 15f); if (Mathf.Ceil(EE_unlockSceneVars[0]) != EE_unlockSceneVars[1]) { EE_unlockSceneVars[1] = Mathf.Ceil(EE_unlockSceneVars[0]); if (EE_unlockSceneVars[1] == 15f) { ((Component)nmov).GetComponent<AudioSource>().PlayOneShot(findSoundFromStore("EE_Unlock")); if (loop_musicActi) { loop_musicSec = 0f; loop_musicActi = false; ((Component)this).GetComponent<AudioSource>().Stop(); if (sceneHasMusic) { MonoSingleton<MusicManager>.Instance.ForceStartMusic(); } } if (!MonoSingleton<MusicManager>.Instance.off) { sceneHasMusic = true; } MonoSingleton<MusicManager>.Instance.off = true; MonoSingleton<MusicManager>.Instance.forcedOff = true; } else if (EE_unlockSceneVars[1] == 10f) { MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("You have unlocked a new\npersonalization easter egg:\n" + PersEaster_Controller.recentlyUnlockedEEName + "!", "", "", 0, false, false, true); } else if (EE_unlockSceneVars[1] == 5f) { MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("Go to Extras in Configgy\nfor more info!", "", "", 0, false, false, true); } else if (EE_unlockSceneVars[1] == 0f && sceneHasMusic) { MonoSingleton<MusicManager>.Instance.ForceStartMusic(); } } if (currentEffects.Contains("DrunkV1")) { drunkSteps = 2; } gc = MonoSingleton<GunControl>.Instance; nmov = MonoSingleton<NewMovement>.Instance; List<EnemyIdentifier> list = new List<EnemyIdentifier>(); collectedCoinThisFrame = false; if ((Object)(object)nmov != (Object)null) { list = MonoSingleton<EnemyTracker>.Instance.GetCurrentEnemies(); } if (bombingTime > 0f && (Object)(object)nmov != (Object)null) { MonoSingleton<CameraController>.Instance.CameraShake(1f); if (dice1000 < 400) { GameObject val = Object.Instantiate<GameObject>(prefab_grenade, ((Component)nmov).transform.position + new Vector3(Random.Range(0f, 500f), 100f, Random.Range(0f, 500f)), Quaternion.identity); val.GetComponent<Grenade>().GrenadeBeam(val.transform.position + new Vector3(0f, -1f, 0f), (GameObject)null); } if (dice1000 < 200 && list.Count > 0) { EnemyIdentifier val2 = list[Random.Range(0, list.Count - 1)]; GameObject val3 = Object.Instantiate<GameObject>(prefab_grenade, ((Component)val2).transform.position + new Vector3(0f, 100f, 0f), Quaternion.identity); val3.GetComponent<Grenade>().GrenadeBeam(val3.transform.position + new Vector3(0f, -1f, 0f), (GameObject)null); } if (dice1000 < 20) { GameObject val4 = Object.Instantiate<GameObject>(prefab_grenade, ((Component)nmov).transform.position + new Vector3(0f, 100f, 0f), Quaternion.identity); val4.GetComponent<Grenade>().GrenadeBeam(val4.transform.position + new Vector3(0f, -1f, 0f), (GameObject)null); } bombingTime = Mathf.Clamp(bombingTime - Time.deltaTime, 0f, 7f); } if (((ConfigValueElement<bool>)(object)Extra_rerollPersonaliz).Value) { RerollPersonalization(); ((ConfigValueElement<bool>)(object)Extra_rerollPersonaliz).SetValue(false); } if (loop_musicActi) { loop_musicSec += Time.deltaTime; if (loop_musicSec >= loop_musicLen) { ((Component)this).GetComponent<AudioSource>().PlayOneShot(loop_clip); loop_musicSec = 0f; } } if (lastSecLogs[0] != Mathf.RoundToInt(allTimeInSec)) { lastSecLogs[0] = Mathf.RoundToInt(allTimeInSec); OnSecondPassed("total"); } if (lastSecLogs[1] != Mathf.RoundToInt(sceneTimeInSec)) { lastSecLogs[1] = Mathf.RoundToInt(sceneTimeInSec); OnSecondPassed("scene"); } if ((Object)(object)nmov == (Object)null) { return; } if (currentEffects.Contains("NaturalRegen")) { regenTime = Mathf.Clamp(regenTime - Time.deltaTime, 0f, 0.5f); if (regenTime <= 0f) { nmov.GetHealth(1, true, false, false); regenTime = 0.5f; } } if (Patch_Capitalism) { int num = 0; for (int i = 0; i < 3; i++) { LisenceTimes[i] = Mathf.Clamp(LisenceTimes[i] - Time.deltaTime, 0f, 300f); if (LisenceTimes[i] <= 20f && !LisenceWarned[i]) { MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=red>" + LisenceName[i] + " LISENCE EXPIRING SOON!</color>", "", "", 0, false, false, true); LisenceWarned[i] = true; } if (LisenceTimes[i] <= 0f) { num++; if (!LisenceExpire[i]) { HudMessageReceiver instance = MonoSingleton<HudMessageReceiver>.Instance; string[] obj = new string[5] { "<color=red>", LisenceName[i], " LISENCE EXPIRED!</color>\nPress [", null, null }; KeyCode value = ((ConfigValueElement<KeyCode>)(object)Extra_shopKey).Value; obj[3] = ((object)(KeyCode)(ref value)).ToString(); obj[4] = "] to buy new one\nfor 100000<color=orange>P</color>!"; instance.SendHudMessage(string.Concat(obj), "", "", 0, false, false, true); LisenceExpire[i] = true; } } if (LisenceExpire[i] && LisenceBackups[i] > 0) { ResetLisence(i); LisenceBackups[i]--; } } if (Input.GetKeyDown(((ConfigValueElement<KeyCode>)(object)Extra_shopKey).Value)) { Purchase(); } } else { LisenceExpire[0] = false; LisenceExpire[1] = false; LisenceExpire[2] = false; } if (LisenceExpire[0]) { nmov.boostCharge = 0f; } if (LisenceExpire[1]) { if (nmov.jumpPower > 0f) { PreviousMovement[1] = nmov.jumpPower; } nmov.jumpPower = 0f; } else if (nmov.jumpPower <= 0f) { nmov.jumpPower = PreviousMovement[1]; } if (LisenceExpire[2]) { if (nmov.walkSpeed > 0f) { PreviousMovement[0] = nmov.walkSpeed; } nmov.walkSpeed = 0f; } else if (nmov.walkSpeed <= 0f) { nmov.walkSpeed = PreviousMovement[0]; } if (ownedProducts.Contains("Lottery Ticket")) { if (Random.Range(0, 100) >= 50) { GameProgressSaver.AddMoney(GameProgressSaver.GetMoney()); MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=green>You won!</color>\nYour money doubled.", "", "", 0, false, false, true); } else { GameProgressSaver.AddMoney(-Mathf.RoundToInt((float)(GameProgressSaver.GetMoney() / 2))); MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=red>You lost!</color>\nYour money was halfed.", "", "", 0, false, false, true); } ownedProducts.Remove("Lottery Ticket"); } if (ownedProducts.Contains("Extra Health")) { nmov.SuperCharge(); ownedProducts.Remove("Extra Health"); } if (ownedProducts.Contains("Invincibility")) { nmov.ResetHardDamage(); nmov.FullHeal(true); } if (ownedProducts.Contains("No cooldowns")) { MonoSingleton<WeaponCharges>.Instance.MaxCharges(); } if (ownedProducts.Contains("Monster Gun")) { foreach (GameObject allWeapon in gc.allWeapons) { allWeapon.SetActive(true); } ownedProducts.Remove("Monster Gun"); } if (postBanana && nmov.gc.onGround) { ((Component)nmov).GetComponent<AudioSource>().PlayOneShot(findSoundFromStore("Splat")); nmov.GetHurt(5, false, 2f, false, false, 0.35f, false); postBanana = false; } if (twistVillanGone[0] && list.Count < 1) { loop_musicSec = 0f; loop_musicActi = false; ((Component)this).GetComponent<AudioSource>().Stop(); if (sceneHasMusic) { MonoSingleton<MusicManager>.Instance.ForceStartMusic(); } if ((Object)(object)MonoSingleton<TimeController>.Instance != (Object)null) { MonoSingleton<TimeController>.Instance.SlowDown(0.01f); } nmov.FullHeal(true); nmov.FullStamina(); MonoSingleton<WeaponCharges>.Instance.MaxCharges(); twistVillanGone[1] = true; twistVillanGone[0] = false; } InputManager instance2 = MonoSingleton<InputManager>.Instance; if (currentEffects.Contains("Slippery") && (Object)(object)instance2 != (Object)null && instance2.InputSource.Move.WasPerformedThisFrame && (Object)(object)nmov != (Object)null && nmov.gc.onGround) { if (Object.op_Implicit((Object)(object)((Component)nmov).GetComponent<AudioSource>())) { ((Component)nmov).GetComponent<AudioSource>().PlayOneShot(findSoundFromStore("Slip")); } if (Object.op_Implicit((Object)(object)nmov.rb)) { Rigidbody rb = nmov.rb; rb.velocity += new Vector3(Random.Range(-350f, 350f), 0f, Random.Range(-350f, 350f)); } } ((Component)this).transform.position = ((Component)nmov).transform.position; 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<AudioSource>().PlayOneShot(findSoundFromStore("Slip")); Transform transform2 = ((Component)nmov).transform; transform2.position += new Vector3(0f, 0.2f, 0f); nmov.Jump(); Rigidbody rb = nmov.rb; rb.velocity += ((Component)nmov).transform.forward * -50f; nmov.gc.onGround = false; nmov.gc.touchingGround = false; gc.ForceWeapon(gc.allWeapons[Random.Range(0, gc.allWeapons.Count - 1)], true); MonoSingleton<FistControl>.Instance.ScrollArm(); MonoSingleton<FistControl>.Instance.currentPunch.PunchStart(); ((Component)nmov).GetComponent<RecoilManager>().recoilLeft = 10f; postBanana = true; break; } case "PlotTwist": { List<EnemyIdentifier> currentEnemies6 = MonoSingleton<EnemyTracker>.Instance.GetCurrentEnemies(); if (currentEnemies6.Count < 1 || twistVillanGone[0]) { 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<HudMessageReceiver>.Instance.SendHudMessage(val7.FullName + " is actually the main\nantagonist.", "", "", 0, false, false, true); ((Object)val7).name = ((Object)val7).name + ", The King of Hell."; val7.HealthBuff(20f); val7.DamageBuff(20f); val7.SpeedBuff(4f); Transform transform5 = ((Component)val7).transform; transform5.localScale *= 2f; val7.BossBar(true); BossHealthBar component4 = ((Component)val7).GetComponent<BossHealthBar>(); component4.bossName += ", The King of Hell."; if (Object.op_Implicit((Object)(object)((Component)val7).gameObject.GetComponent<AudioSource>())) { AudioSource component5 = ((Component)val7).GetComponent<AudioSource>(); component5.pitch /= 2f; } nmov.FullHeal(true); nmov.FullStamina(); MonoSingleton<WeaponCharges>.Instance.MaxCharges(); Grenade[] array = Object.FindObjectsOfType<Grenade>(); foreach (Grenade val8 in array) { val8.Explode(false, false, false, 1f, false, (GameObject)null, false); } Magnet[] array2 = Object.FindObjectsOfType<Magnet>(); foreach (Magnet val9 in array2) { val9.health = 0f; } if (!MonoSingleton<MusicManager>.Instance.off) { sceneHasMusic = true; MonoSingleton<MusicManager>.Instance.ForceStopMusic(); } else { sceneHasMusic = false; } ((Component)this).GetComponent<AudioSource>().PlayOneShot(findSoundFromStore("WarMusic")); loop_musicSec = 0f; loop_musicLen = 330f; loop_clip = findSoundFromStore("WarMusic"); loop_musicActi = true; twistVillanGone[1] = false; twistVillanGone[0] = true; break; } case "EnemyCharm": { int num4 = Mathf.Clamp(MonoSingleton<StyleHUD>.Instance.rankIndex + 1, 1, 8); List<EnemyIdentifier> currentEnemies4 = MonoSingleton<EnemyTracker>.Instance.GetCurrentEnemies(); foreach (EnemyIdentifier item3 in currentEnemies4) { if (item3.healthBuffModifier > 60f) { currentEnemies4.Remove(item3); } } if (currentEnemies4.Count < 1) { return; } if (currentEnemies4.Count < num4) { num4 = currentEnemies4.Count; } List<EnemyIdentifier> list = new List<EnemyIdentifier>(); for (int i = 0; i < num4; i++) { EnemyIdentifier item = currentEnemies4[Random.Range(0, currentEnemies4.Count)]; list.Add(item); currentEnemies4.Remove(item); } foreach (EnemyIdentifier item4 in list) { GameObject gameObject = ((Component)item4).gameObject; Vector3 position3 = ((Component)item4).transform.position; Quaternion rotation3 = ((Component)item4).transform.rotation; GameObject val4 = Object.Instantiate<GameObject>(gameObject, position3, rotation3); EnemyIdentifier component2 = val4.GetComponent<EnemyIdentifier>(); component2.attackEnemies = true; component2.ignorePlayer = true; component2.HealthBuff(999f); AbsurdKill_ObjectPlugin absurdKill_ObjectPlugin = ((Component)component2).gameObject.AddComponent<AbsurdKill_ObjectPlugin>(); absurdKill_ObjectPlugin.My_modEnemyRs = AbsurdKill_ObjectPlugin.ModEnemyRelationship.HostileToAllEmemies; component2.prioritizeEnemiesUnlessAttacked = true; Transform transform4 = ((Component)component2).transform; transform4.localScale /= 2f; if (Object.op_Implicit((Object)(object)((Component)component2).gameObject.GetComponent<AudioSource>())) { AudioSource component3 = ((Component)component2).GetComponent<AudioSource>(); component3.pitch *= 2f; } item4.puppet = true; item4.Explode(false); } MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage($"{num4} enemies have diecided\nto fight on your\nside.", "", "", 0, false, false, true); break; } case "Nuke": MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=red>NUKE IS NEARBY\n5 SECONDS TO RUN!</color>", "", "", 0, false, false, true); ((MonoBehaviour)this).Invoke("SendNuke", 5f); nukePosition = ((Component)nmov).transform.position; break; case "Bombing": MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=red>IT'S RAINING GRENADES!</color>", "", "", 0, false, false, true); bombingTime = 7f; break; case "MoneyUp": MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=yellow>MrBeast gave you \n3000000 Points!</color>", "", "", 0, false, false, true); GameProgressSaver.AddMoney(3000000); break; case "OilUp": { MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=#480963>Everyone oiled up!</color>", "", "", 0, false, false, true); GameProgressSaver.AddMoney(100000); List<EnemyIdentifier> currentEnemies7 = MonoSingleton<EnemyTracker>.Instance.GetCurrentEnemies(); foreach (EnemyIdentifier item5 in currentEnemies7) { item5.AddFlammable(9999f); } nmov.ForceAddAntiHP(9999f, true, true, true, false); break; } case "Airstrike": { MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=yellow>AIRSTRIKE INCOMING!</color>", "", "", 0, false, false, true); List<EnemyIdentifier> currentEnemies5 = MonoSingleton<EnemyTracker>.Instance.GetCurrentEnemies(); foreach (EnemyIdentifier item6 in currentEnemies5) { Vector3 val5 = ((Component)item6).transform.position + new Vector3(0f, 100f, 0f); Object.Instantiate<GameObject>(prefab_rocket, val5, Quaternion.LookRotation(val5 - (val5 + new Vector3(0f, 1f, 0f)))); } Vector3 val6 = ((Component)nmov).transform.position + new Vector3(0f, 100f, 0f); Object.Instantiate<GameObject>(prefab_rocket, val6, Quaternion.LookRotation(val6 - (val6 + new Vector3(0f, 1f, 0f)))); break; } case "WeaponRoulette": MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=green>Weapon Roulette!</color>", "", "", 0, false, false, true); if (((MonoBehaviour)this).IsInvoking("WRoulettePoint")) { ((MonoBehaviour)this).CancelInvoke("WRoulettePoint"); } weaponSwitches = 10; WRoulettePoint(); break; case "LemmeKillEm": { List<EnemyIdentifier> currentEnemies3 = MonoSingleton<EnemyTracker>.Instance.GetCurrentEnemies(); if (currentEnemies3.Count <= 0) { break; } MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=green>Lemme kill those guys.</color>", "", "", 0, false, false, true); foreach (EnemyIdentifier item7 in currentEnemies3) { Object.Instantiate<GameObject>(prefab_explosion, ((Component)item7).transform.position, Quaternion.identity); if (Object.op_Implicit((Object)(object)item7.idol)) { item7.idol.Death(); } item7.puppet = true; item7.Explode(false); } break; } case "MoreBlood": MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=green>ULTRAHEAL!!!!!</color>", "", "", 0, false, false, true); nmov.FullHeal(true); nmov.hp = 2000001; break; case "BlackholeHere": { MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("Here's a blackhole.", "", "", 0, false, false, true); GameObject val3 = Object.Instantiate<GameObject>(prefab_blackhole, ((Component)nmov).transform.position + new Vector3(5f, 0f, 0f), Quaternion.identity); BlackHoleProjectile component = val3.GetComponent<BlackHoleProjectile>(); component.enemy = true; component.target = new EnemyTarget(((Component)nmov).transform); component.speed = 3f; component.Activate(); break; } case "D10": { List<EnemyIdentifier> currentEnemies2 = MonoSingleton<EnemyTracker>.Instance.GetCurrentEnemies(); if (currentEnemies2.Count <= 0) { break; } MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=green>Enemies downgraded!</color>", "", "", 0, false, false, true); foreach (EnemyIdentifier item8 in currentEnemies2) { bool flag2 = false; int num3 = enemyGrades.Keys.ToList().IndexOf(item8.enemyType); EnemyType key2 = (EnemyType)23; if (num3 != -1) { if (num3 - 1 <= -1) { flag2 = true; } else { key2 = enemyGradeNums[num3 - 1]; } if (flag2) { item8.puppet = true; item8.Explode(false); continue; } Vector3 position2 = ((Component)item8).transform.position; Quaternion rotation2 = ((Component)item8).transform.rotation; GameObject val2 = Object.Instantiate<GameObject>(enemyGrades[key2], position2, rotation2); ((Component)item8).gameObject.AddComponent<AbsurdKill_ObjectPlugin>().dontSpawnSurprise = true; Transform transform3 = ((Component)item8).transform; transform3.position += new Vector3(0f, -100f, 0f); item8.puppet = true; item8.Explode(false); } } break; } case "RD10": { List<EnemyIdentifier> currentEnemies = MonoSingleton<EnemyTracker>.Instance.GetCurrentEnemies(); if (currentEnemies.Count <= 0) { break; } MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=red>Enemies Evolved!</color>", "", "", 0, false, false, true); foreach (EnemyIdentifier item9 in currentEnemies) { bool flag = false; int num2 = enemyGrades.Keys.ToList().IndexOf(item9.enemyType); EnemyType key = (EnemyType)23; if (num2 != -1) { if (num2 + 1 >= 23) { flag = true; } else { key = enemyGradeNums[num2 + 1]; } if (flag) { return; } Vector3 position = ((Component)item9).transform.position; Quaternion rotation = ((Component)item9).transform.rotation; GameObject val = Object.Instantiate<GameObject>(enemyGrades[key], position, rotation); Transform transform = ((Component)item9).transform; transform.position += new Vector3(0f, -100f, 0f); item9.puppet = true; item9.Explode(false); } } break; } case "GutterMail": NewEventsManager.CastEvent("airdrop"); break; case "Talk": NewEventsManager.CastEvent("talk"); break; case "NextbotSpawn": NewEventsManager.CastEvent("spawn_nextbot"); break; case "CaveSFX": NewEventsManager.CastEvent("cave_sfx"); break; } 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<AudioSource>().PlayOneShot(findSoundFromStore("NukeFly")); ((MonoBehaviour)this).Invoke("LandNuke", 1.252f); } private void LandNuke() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) ((Component)this).GetComponent<AudioSource>().PlayOneShot(findSoundFromStore("NukeExplode")); Explosion[] componentsInChildren = Object.Instantiate<GameObject>(prefab_nuke, nukePosition, Quaternion.identity).GetComponentsInChildren<Explosion>(); foreach (Explosion val in componentsInChildren) { val.maxSize *= 10f; val.speed *= 10f; val.damage = 2000000; } MonoSingleton<CameraController>.Instance.CameraShake(10f); } public static AudioClip findSoundFromStore(string name) { AudioClip value = null; audioStore.TryGetValue(name, out value); return value; } private void LoadPrefabFromAddressables(string key, string outVarName) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) ((BaseUnityPlugin)this).Logger.LogInfo((object)("Loading Asset: " + key)); AsyncOperationHandle<GameObject> val = Addressables.LoadAssetAsync<GameObject>((object)key); val.Completed += delegate(AsyncOperationHandle<GameObject> handle) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) SetPrefabVarTo(outVarName, handle.Result); ManualLogSource logger = ((BaseUnityPlugin)this).Logger; AsyncOperationStatus status = handle.Status; logger.LogInfo((object)("Status: " + ((object)(AsyncOperationStatus)(ref status)).ToString())); }; } private void StorePrefabFromAddressables(string key, string outPrefName) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) ((BaseUnityPlugin)this).Logger.LogInfo((object)("Loading Asset: " + key)); AsyncOperationHandle<GameObject> val = Addressables.LoadAssetAsync<GameObject>((object)key); val.Completed += delegate(AsyncOperationHandle<GameObject> handle) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) prefabDict[outPrefName] = handle.Result; ManualLogSource logger = ((BaseUnityPlugin)this).Logger; AsyncOperationStatus status = handle.Status; logger.LogInfo((object)("Status: " + ((object)(AsyncOperationStatus)(ref status)).ToString())); }; } private void LoadEnemyFromAddressables(string key, EnemyType enemyId) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) ((BaseUnityPlugin)this).Logger.LogInfo((object)("Loading Asset: " + key)); AsyncOperationHandle<GameObject> val = Addressables.LoadAssetAsync<GameObject>((object)key); val.Completed += delegate(AsyncOperationHandle<GameObject> handle) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) enemyGrades[enemyId] = handle.Result; ManualLogSource logger = ((BaseUnityPlugin)this).Logger; AsyncOperationStatus status = handle.Status; logger.LogInfo((object)("Status: " + ((object)(AsyncOperationStatus)(ref status)).ToString())); }; } private void TryLoadStorages() { staticLog((LogLevel)16, "Loading Prefabs..."); LoadPrefabFromAddressables("Assets/Prefabs/Attacks and Projectiles/Explosions/Explosion.prefab", "explosion"); LoadPrefabFromAddressables("Assets/Prefabs/Attacks and Projectiles/Explosions/Explosion Super.prefab", "nuke"); LoadPrefabFromAddressables("Assets/Prefabs/Attacks and Projectiles/Grenade.prefab", "grenade"); LoadPrefabFromAddressables("Assets/Prefabs/Attacks and Projectiles/Coin.prefab", "coin"); LoadPrefabFromAddressables("Assets/Prefabs/Attacks and Projectiles/Rocket.prefab", "rocket"); LoadPrefabFromAddressables("Assets/Prefabs/Enemies/MinosPrime.prefab", "minosPrime"); LoadPrefabFromAddressables("Assets/Prefabs/Attacks and Projectiles/Black Hole Enemy.prefab", "blackhole"); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Cancerous Rodent.prefab", (EnemyType)23); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Idol.prefab", (EnemyType)21); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Stalker.prefab", (EnemyType)12); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Puppet.prefab", (EnemyType)36); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Zombie.prefab", (EnemyType)3); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Projectile Zombie.prefab", (EnemyType)13); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Super Projectile Zombie.prefab", (EnemyType)14); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Drone.prefab", (EnemyType)1); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/ShotgunHusk.prefab", (EnemyType)15); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Mannequin.prefab", (EnemyType)31); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Streetcleaner.prefab", (EnemyType)6); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Turret.prefab", (EnemyType)20); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Very Cancerous Rodent.prefab", (EnemyType)24); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Spider.prefab", (EnemyType)4); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Virtue.prefab", (EnemyType)9); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Cerberus.prefab", (EnemyType)0); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Gutterman.prefab", (EnemyType)33); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Guttertank.prefab", (EnemyType)34); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Mindflayer.prefab", (EnemyType)5); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Mass.prefab", (EnemyType)2); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/V2.prefab", (EnemyType)8); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Mandalore.prefab", (EnemyType)25); LoadEnemyFromAddressables("Assets/Prefabs/Enemies/Big Johninator.prefab", (EnemyType)37); StorePrefabFromAddressables("Assets/Prefabs/Attacks and Projectiles/Cannonball.prefab", "Cannonball"); StorePrefabFromAddressables("Assets/Prefabs/Attacks and Projectiles/GasolineProjectile.prefab", "Diddy Droplet"); StorePrefabFromAddressables("Assets/Prefabs/Attacks and Projectiles/Hitscan Beams/Railcannon Beam.prefab", "Railcannon Beam"); StorePrefabFromAddressables("Assets/Prefabs/Attacks and Projectiles/Explosions/Explosion Wave.prefab", "Blastwave"); StorePrefabFromAddressables("Assets/Prefabs/Enemies/Spawners/BombEnemySpawnerGutterman Variant.prefab", "GuttermanAirdrop"); 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<Revolver>(); Shotgun component2 = allWeapon.GetComponent<Shotgun>(); Nailgun component3 = allWeapon.GetComponent<Nailgun>(); Railcannon component4 = allWeapon.GetComponent<Railcannon>(); RocketLauncher component5 = allWeapon.GetComponent<RocketLauncher>(); ShotgunHammer component6 = allWeapon.GetComponent<ShotgunHammer>(); if ((Object)(object)component != (Object)null) { string text = ""; if (component.altVersion) { text = " Alt"; } prefabDict["Revolver Beam" + text] = component.revolverBeam; } if ((Object)(object)component3 != (Object)null && !component3.altVersion) { prefabDict["Nail"] = component3.nail; } } gotOriginalWeaponProjes = true; } foreach (GameObject allWeapon2 in gc.allWeapons) { Revolver component7 = allWeapon2.GetComponent<Revolver>(); Shotgun component8 = allWeapon2.GetComponent<Shotgun>(); Nailgun component9 = allWeapon2.GetComponent<Nailgun>(); Railcannon component10 = allWeapon2.GetComponent<Railcannon>(); RocketLauncher component11 = allWeapon2.GetComponent<RocketLauncher>(); ShotgunHammer component12 = allWeapon2.GetComponent<ShotgunHammer>(); if ((Object)(object)component7 != (Object)null) { if (Patch_Railrev) { component7.revolverBeam = prefabDict["Railcannon Beam"]; } if (Patch_HeavyCoins) { component7.coin = prefabDict["Cannonball"]; } } if (Patch_Diddlernails && (Object)(object)component9 != (Object)null && !component9.altVersion) { component9.nail = prefabDict["Diddy Droplet"]; } } } private void SetPrefabVarTo(string prefabName, GameObject value) { switch (prefabName) { case "explosion": prefab_explosion = value; break; case "nuke": prefab_nuke = value; break; case "grenade": prefab_grenade = value; break; case "coin": prefab_coin = value; break; case "rocket": prefab_rocket = value; break; case "minosPrime": prefab_minosPrime = value; break; case "blackhole": prefab_blackhole = value; break; } } private void ResetLisence(int index, bool silent = false) { switch (index) { case 0: LisenceTimes[0] = 240f; break; case 1: LisenceTimes[1] = 270f; break; case 2: LisenceTimes[2] = 300f; break; } LisenceWarned[index] = false; LisenceExpire[index] = false; if (!silent) { if (LisenceBackups[index] > 1) { MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage(LisenceName[index] + " has been restored!", "", "", 0, false, false, true); } else { MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage(LisenceName[index] + " has been restored!\nIt was the last backup!", "", "", 0, false, false, true); } } } private void Purchase() { if (LisenceExpire[0] || LisenceExpire[1] || LisenceExpire[2]) { for (int i = 0; i < 3; i++) { if (LisenceExpire[i]) { if (GameProgressSaver.GetMoney() >= 100000) { GameProgressSaver.AddMoney(-100000); LisenceBackups[i]++; MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=green>Lisence Bought!</color>", "", "", 0, false, false, true); } else { MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=red>Insufficent points!</color>", "", "", 0, false, false, true); } } } } else if (currentProductName != "" && !ownedProducts.Contains(currentProductName)) { if (GameProgressSaver.GetMoney() >= currentProductPrice) { GameProgressSaver.AddMoney(-currentProductPrice); ownedProducts.Add(currentProductName); MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=green>" + currentProductName + " Bought!</color>", "", "", 0, false, false, true); } else { MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=red>Insufficent points!</color>", "", "", 0, false, false, true); ((MonoBehaviour)this).Invoke("AdvertiseGambling", 1f); } } } private void Advertise(string advertismentScript, string productName, int productPrice) { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) if (!ownedProducts.Contains(productName) && Patch_Capitalism && !(EE_unlockSceneVars[0] > 0f)) { HudMessageReceiver instance = MonoSingleton<HudMessageReceiver>.Instance; string[] obj = new string[8] { advertismentScript, "\nUse [", null, null, null, null, null, null }; KeyCode value = ((ConfigValueElement<KeyCode>)(object)Extra_shopKey).Value; obj[2] = ((object)(KeyCode)(ref value)).ToString(); obj[3] = "] to buy "; obj[4] = productName; obj[5] = "\nFor "; obj[6] = productPrice.ToString(); obj[7] = "<color=orange>P</color>!"; instance.SendHudMessage(string.Concat(obj), "", "", 0, false, false, true); currentProductName = productName; currentProductPrice = productPrice; } } private void AdvertiseGambling() { Advertise("You're poor?", "Lottery Ticket", Mathf.RoundToInt(Mathf.Clamp(Mathf.Round((float)(GameProgressSaver.GetMoney() / 10)), 1000f, 1000000f))); } private void WRoulettePoint() { gc.ForceWeapon(gc.allWeapons[Random.Range(0, gc.allWeapons.Count - 1)], true); if (weaponSwitches > 0) { ((MonoBehaviour)this).Invoke("WRoulettePoint", 0.2f); } weaponSwitches--; } public static string CurseText_GenerateDailyTip() { staticLog((LogLevel)16, "Utilizing Gen Z Slang..."); string text = "Yo bro, no tips today, \nsurvive yourself, brother."; List<string> list = new List<string> { "Yo, ", "Yo bro, ", "Heya, ", "Hey Bozo, ", "" }; List<string> list2 = new List<string> { "You see a nuke,\ncook some i-frames", "MrBreast ain't gonna\nleave you broke,\nbuy shit", "watch ur step,\nbanana peels are\neverywhere", "see a minos prime?\njump off of a brigde\nhe will follow", "[ThisShouldBeAHerobrineTip]", "" }; List<string> list3 = new List<string> { ", 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 <i><size=40><color=red>NOT</color></size></i> \nanger the one with\n <i>no pupils</i>..."; } } return text; } public static string CurseText_RewriteAsKitten(string text) { staticLog((LogLevel)16, "Utilizing Discord Kittens..."); string text2 = text; List<string> list = new List<string> { "OwO", "UwU", ">w<", "IwI", "" }; Dictionary<string, string> dictionary = new Dictionary<string, string> { { "l", "w" }, { "i", "e" }, { "r", "w" }, { "L", "W" }, { "I", "E" }, { "R", "W" } }; int num = 20; foreach (KeyValuePair<string, string> item in dictionary) { text2 = text2.Replace(item.Key, item.Value); } List<char> list2 = text2.ToCharArray().ToList(); for (int i = 0; i < list2.Count; i++) { if (list2[i].ToString() == " " && Random.Range(0, 100) <= num) { List<char> collection = (" " + list[Random.Range(0, list.Count - 1)]).ToCharArray().ToList(); list2.InsertRange(i, collection); } } text2 = ""; foreach (char item2 in list2) { text2 += item2; } string text3 = list[Random.Range(0, list.Count - 1)]; return text3 + " " + text2; } public static string CurseText_RewriteAsGenAlpha(string text) { staticLog((LogLevel)16, "Utilizing Brainrot Slang..."); List<string> list = new List<string> { "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<char> list2 = text.ToCharArray().ToList(); List<char> list3 = new List<char>(); 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<int>)(object)displayPersonalCode).SetValue(AbsurdSaveFileManager.GetPersonalCode()); } private void UpdatePersonalizationDisplay() { ((ConfigValueElement<int>)(object)displayPersonalCode).SetValue(AbsurdSaveFileManager.GetPersonalCode()); } public static void StartEEUnlockScene() { staticLog((LogLevel)16, "New Easter Egg Unlocked!"); mevar.ResetLisence(0, silent: true); mevar.ResetLisence(1, silent: true); mevar.ResetLisence(2, silent: true); MonoSingleton<HudMessageReceiver>.Instance.ClearMessage(); EE_unlockSceneVars[0] = 15f; } public static void staticLog(LogLevel level, object log) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) ((BaseUnityPlugin)mevar).Logger.Log(level, log); } private void DrunkStep() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Clamp((float)nmov.hp / 50f, 0f, 10f); Rigidbody rb = nmov.rb; rb.velocity += new Vector3(Random.Range(-9f * num, 9f * num), 0f, Random.Range(-9f * num, 9f * num)); CameraController instance = MonoSingleton<CameraController>.Instance; instance.rotationX += Random.Range(-6f * num, 6f * num); CameraController instance2 = MonoSingleton<CameraController>.Instance; instance2.rotationY += Random.Range(-6f * num, 6f * num); if (drunkSteps > 0) { ((MonoBehaviour)this).Invoke("DrunkStep", 0.5f); drunkSteps--; } } private void AddRecoiler() { //IL_00a2: Unknown result type (might be due to invalid IL or missing references) ((Component)nmov).gameObject.AddComponent<RecoilManager>(); ((Component)nmov).gameObject.AddComponent<TwichChatSystem>(); ((Component)nmov).gameObject.AddComponent<AbsurdKill_ObjectPlugin>(); ((Component)nmov).GetComponent<TwichChatSystem>().Stop(); if (currentEffects.Contains("ULTRACHAT")) { ((Component)nmov).GetComponent<TwichChatSystem>().TwitchMessageChain(); } if (Patch_PartyLights) { Light[] array = Object.FindObjectsOfType<Light>(); foreach (Light val in array) { val.color = Color.HSVToRGB(Random.Range(0f, 255f) / 255f, 1f, 1f); } } 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>(); HerobrineEngine.LeaveTheWorld(messageAboutIt: false); HerobrineEngine.ResetMystics(); if (AK_Controller.currentEffects.Contains("Herobrining")) { herobrineEngine.UpdateExistance(); } AbsurdKill_ObjectPlugin component = ((Component)AK_Controller.nmov).gameObject.GetComponent<AbsurdKill_ObjectPlugin>(); 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<NewMovement>.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<Font>("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>(); keyboardInteractiveMenu.KeyboardInteractions = new Dictionary<KeyCode, Action>(); 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<NewMovement>.Instance; HudMessageReceiver instance2 = MonoSingleton<HudMessageReceiver>.Instance; if (chaosName == "Carousel" && !carouseling) { instance2.SendHudMessage("<color=red>C<color=orange>a<color=yellow>r<color=green>o<color=blue>u<color=blue>s<color=red>e<color=orange>l</color>!!!!!!", "", "", 0, false, false, true); carouseling = true; ((MonoBehaviour)((Component)instance).GetComponent<AbsurdKill_ObjectPlugin>()).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<CameraController>.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 = "<color=white>" + text2 + "</color>"; } MonoSingleton<SubtitleController>.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<CameraController>.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<GunControl>.Instance)) { return; } if (shakeCamera) { MonoSingleton<CameraController>.Instance.CameraShake(0.35f); } if ((int)MonoSingleton<PlayerTracker>.Instance.playerType == 1) { if (bandicootCompatible) { MonoSingleton<PlatformerMovement>.Instance.AddExtraHit(3); } return; } GameObject val = new GameObject(); val.transform.SetParent(((Component)MonoSingleton<GunControl>.Instance).transform, true); val.transform.localRotation = Quaternion.identity; DualWield[] componentsInChildren = ((Component)MonoSingleton<GunControl>.Instance).GetComponentsInChildren<DualWield>(); 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<DualWield>(); 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<NewMovement>.Instance; GunControl val = MonoSingleton<GunControl>.Instance; FistControl val2 = MonoSingleton<FistControl>.Instance; instance.hp = 0; instance.ResetHardDamage(); if (!instance.endlessMode) { ((Component)instance.deathSequence).gameObject.SetActive(true); MonoSingleton<TimeController>.Instance.controlPitch = false; instance.screenHud.SetActive(false); if (instablack) { ((Component)instance.deathSequence).GetComponent<DeathSequence>().EndSequence(); } } else { ((Component)instance).GetComponentInChildren<FinalCyberRank>().GameOver(); CrowdReactions instance2 = MonoSingleton<CrowdReactions>.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<PowerUpMeter>.Instance)) { MonoSingleton<PowerUpMeter>.Instance.juice = 0f; } ((Behaviour)instance.cc).enabled = false; if ((Object)(object)val == (Object)null) { val = ((Component)instance).GetComponentInChildren<GunControl>(); } val.NoWeapon(); instance.rb.constraints = (RigidbodyConstraints)0; instance.dead = true; instance.activated = false; if ((Object)(object)val2 == (Object)null) { val2 = ((Component)instance).GetComponentInChildren<FistControl>(); } 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<string> list = new List<string> { "CupOfBlood", "Burger", "Donut", "Hotdog", "McFriesIsFun" }; List<string> list2 = new List<string> { "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<GameObject>(threeDModelData.model, forTrans.position, threeDModelData.model.transform.rotation); val2.transform.SetParent(forTrans); val2.transform.localPosition = Vector3.zero; MeshRenderer[] componentsInChildren = val2.GetComponentsInChildren<MeshRenderer>(); foreach (MeshRenderer val3 in componentsInChildren) { ((Renderer)val3).material = threeDModelData.mat; } Transform transform = val2.transform; transform.localScale *= 2f; val2.AddComponent<DestroyOnParentDeath>(); 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<GameObject>(AK_Controller.prefabDict["GuttermanAirdrop"], ((Component)nmov2).transform.position + new Vector3(2f, 0f, 0f), Quaternion.identity); MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("I mailed you a Guttterman", "", "", 0, false, false, true); break; } case "talk": { List<string> list2 = new List<string> { "Whatch out for that \npolice officer!", "Why can't you heal \nfrom corpses?", "Remember Bear 5?", "Yoo, is that V1\nfrom hit game\nULTRAKILL?!", "You failed the \npacifist route.", "Throw a coin.", "LUCKY \nPERSONALIZATIONS:\n10... - 13...", "Hello, my username is\n[NO LEAKING DATA!]", "What a beatiful day!", "" }; if (AK_Controller.allowLeakingData) { list2[list2.IndexOf("Hello, my username is\n[NO LEAKING DATA!]")] = "Hello, my username is\n" + Environment.UserName; } if (Holidays.isAprilFools) { string text2 = ""; if (AK_Controller.allowLeakingData) { text2 = ", " + Environment.UserName; } list2[list2.IndexOf("What a beatiful day!")] = "Happy April Fools" + text2 + "!"; } else if (Holidays.isNewYear) { list2[list2.IndexOf("What a beatiful day!")] = $"Goodbye {DateTime.Today.Year - 1}, \nWelcome {DateTime.Today.Year}"; } else if (Holidays.isNight) { list2[list2.IndexOf("What a beatiful day!")] = $"WHY ARE YOU PLAYING AT\n{DateTime.Now.Hour}:{DateTime.Now.Minute} AM?!"; } else if (Holidays.isLate) { if (22 - DateTime.Now.Hour > 0) { list2[list2.IndexOf("What a beatiful day!")] = $"You will need to go to sleep in\n{22 - DateTime.Now.Hour} hours."; } else { list2[list2.IndexOf("What a beatiful day!")] = "You need to go to sleep!"; } } MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage(list2[Random.Range(0, list2.Count - 1)], "", "", 0, false, false, true); break; } case "spawn_nextbot": { List<string> list = new List<string>(); if (AK_Controller.Nextbots_Obunga) { list.Add("Obunga"); } if (AK_Controller.Nextbots_BearFive) { list.Add("Bear5"); } if (list.Count > 0) { Dictionary<string, string> dictionary = new Dictionary<string, string> { { "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<AbsurdNextbot>().themeLyrics = dictionary[text]; MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage(text + " Nextbot has spawned.", "", "", 0, false, false, true); } break; } case "cave_sfx": HerobrineEngine.PlayCaveSound(); break; } } } } namespace AbsurdKillMod.Systems { public class AbsurdAssetLoader { public static Dictionary<string, object> assetChace = new Dictionary<string, object>(); public static Texture2D LoadTextureAsset(string ClassPath) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown if (assetChace.TryGetValue(ClassPath, out var value)) { return (Texture2D)value; } Assembly executingAssembly = Assembly.GetExecutingAssembly(); using Stream stream = executingAssembly.GetManifestResourceStream(ClassPath); if (stream == null) { AK_Controller.staticLog((LogLevel)2, "Failed to load Texture2D: " + ClassPath); return null; } byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); Texture2D val = new Texture2D(2, 2); ImageConversion.LoadImage(val, array); if (!assetChace.ContainsKey(ClassPath)) { assetChace.Add(ClassPath, val); } return val; } public static Sprite LoadTextureAssetAsSprite(string ClassPath, Vector2? pivot = null, float PPU = 100f) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected O, but got Unknown //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) if (!pivot.HasValue) { pivot = new Vector2(0.5f, 0.5f); } if (assetChace.TryGetValue(ClassPath, out var value)) { Texture2D val = (Texture2D)value; return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), pivot.Value, PPU); } Assembly executingAssembly = Assembly.GetExecutingAssembly(); using Stream stream = executingAssembly.GetManifestResourceStream(ClassPath); if (stream == null) { AK_Controller.staticLog((LogLevel)2, "Failed to load Image: " + ClassPath); return null; } byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); Texture2D val2 = new Texture2D(2, 2); ImageConversion.LoadImage(val2, array); if (!assetChace.ContainsKey(ClassPath)) { assetChace.Add(ClassPath, val2); } return Sprite.Create(val2, new Rect(0f, 0f, (float)((Texture)val2).width, (float)((Texture)val2).height), pivot.Value, PPU); } public static AudioClip LoadSoundAsset(string ClassPath) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown if (assetChace.TryGetValue(ClassPath, out var value)) { return (AudioClip)value; } Assembly executingAssembly = Assembly.GetExecutingAssembly(); using Stream stream = executingAssembly.GetManifestResourceStream(ClassPath); if (stream == null) { AK_Controller.staticLog((LogLevel)2, "Failed to load Wav Sound: " + ClassPath); return null; } byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); AudioClip val = AbsurdByteConverter.AudioClipFromWAVBytes(array); if (!assetChace.ContainsKey(ClassPath)) { assetChace.Add(ClassPath, val); } return val; } public static 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<GameObject>(modelName); threeDModelData.model = model; threeDModelData.mat = new Material(Shader.Find("Standard")); Texture2D mainTexture = val.LoadAsset<Texture2D>(textureName); threeDModelData.mat.mainTexture = (Texture)(object)mainTexture; if (animContName != "") { threeDModelData.animatorController = val.LoadAsset<RuntimeAnimatorController>(animContName); } else { threeDModelData.animatorController = null; } if (!assetChace.ContainsKey("[EMBBEDED_MODELS]." + modelName)) { assetChace.Add("[EMBBEDED_MODELS]." + modelName, threeDModelData); } return threeDModelData; } } public class AbsurdByteConverter { public static byte[] ToBytes(object variable) { byte[] result = null; using (MemoryStream memoryStream = new MemoryStream()) { BinaryFormatter binaryFormatter = new BinaryFormatter(); binaryFormatter.Serialize(memoryStream, variable); result = memoryStream.ToArray(); } return result; } public static object FromBytes(byte[] bytes) { object result = null; using (MemoryStream serializationStream = new MemoryStream(bytes)) { BinaryFormatter binaryFormatter = new BinaryFormatter(); result = binaryFormatter.Deserialize(serializationStream); } return result; } public static AudioClip AudioClipFromWAVBytes(byte[] wavFile, string clipName = "loadedClip(copy)") { int num = BitConverter.ToInt16(wavFile, 22); int num2 = BitConverter.ToInt32(wavFile, 24); int num3 = BitConverter.ToInt32(wavFile, 28); int num4 = FindAudioDataChunkOffset(wavFile); int num5 = (wavFile.Length - num4) / 2; float[] array = new float[num5]; int num6 = 0; for (int i = num4; i < wavFile.Length; i += 2) { short num7 = BitConverter.ToInt16(wavFile, i); array[num6++] = (float)num7 / 32768f; } AudioClip val = AudioClip.Create(clipName, num5 / num, num, num2, false); val.SetData(array, 0); return val; } public static int FindAudioDataChunkOffset(byte[] wavFile) { for (int i = 0; i < wavFile.Length - 4; i++) { if (wavFile[i] == 100 && wavFile[i + 1] == 97 && wavFile[i + 2] == 116 && wavFile[i + 3] == 97) { return i + 8; } } throw new Exception("WAV data chunk not found."); } public static AudioClip UWR_GetClipFromAudioFile(string path) { //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result