Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of PoppyMenu v2.2.3
plugins/PoppyMenu.dll
Decompiled 12 hours ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HG; using HarmonyLib; using KinematicCharacterController; using Microsoft.CodeAnalysis; using Newtonsoft.Json; using R2API.Networking; using R2API.Networking.Interfaces; using RoR2; using RoR2.Networking; using RoR2.Projectile; using RoR2.UI; using UnityEngine; using UnityEngine.Networking; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("PoppyMenu")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("2.2.3.0")] [assembly: AssemblyInformationalVersion("2.2.3+d72084a38932c53427d8cdd8f373efcc3029c5b8")] [assembly: AssemblyProduct("PoppyMenu")] [assembly: AssemblyTitle("PoppyMenu")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("2.2.3.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace PoppyMenu { internal static class ActionRegistry { private static readonly List<PoppyAction> _all; private static readonly Dictionary<string, PoppyAction> _byId; internal static IReadOnlyList<PoppyAction> All => _all; static ActionRegistry() { _all = new List<PoppyAction>(); _byId = new Dictionary<string, PoppyAction>(); Build(); } internal static PoppyAction Get(string id) { if (id == null || !_byId.TryGetValue(id, out var value)) { return null; } return value; } internal static void Run(string id) { PoppyAction poppyAction = Get(id); if (poppyAction == null) { return; } try { poppyAction.Invoke(); } catch (Exception arg) { Log.Error($"action {id} failed: {arg}"); } } internal static void RunId(string id) { if (!string.IsNullOrEmpty(id)) { if (id.StartsWith("macro:")) { MacroStore.Run(id.Substring("macro:".Length)); } else { Run(id); } } } private static void Add(string id, string category, string name, Action fn) { PoppyAction poppyAction = new PoppyAction(id, category, name, fn); _all.Add(poppyAction); _byId[id] = poppyAction; } private static void Build() { Add("menu.disableAll", "Menu", "Disable everything", Cheats.DisableAll); Add("player.god", "Player", "God mode", delegate { PlayerModule.GodMode = !PlayerModule.GodMode; }); Add("player.buddha", "Player", "Buddha", delegate { Safety.Buddha = !Safety.Buddha; }); Add("player.skills", "Player", "Infinite skills", delegate { PlayerModule.InfiniteSkills = !PlayerModule.InfiniteSkills; }); Add("player.healFull", "Player", "Heal to full", delegate { NetUtil.Do(PoppyOp.HealFull); }); Add("player.respawn", "Player", "Respawn", delegate { NetUtil.Do(PoppyOp.Respawn); }); Add("move.flight", "Movement", "Flight", MovementModule.ToggleFlight); Add("move.noclip", "Movement", "No-clip", MovementModule.ToggleNoClip); Add("move.sprint", "Movement", "Always sprint", MovementModule.ToggleSprint); Add("move.jump", "Movement", "Jump pack", delegate { MovementModule.JumpPack = !MovementModule.JumpPack; }); Add("aim.toggle", "Aimbot", "Aimbot", delegate { Aim.Enabled = !Aim.Enabled; }); Add("aim.magic", "Aimbot", "Magic bullet", delegate { Aim.MagicBullet = !Aim.MagicBullet; }); Add("items.giveAll", "Items", "Give all items", delegate { NetUtil.Do(PoppyOp.GiveAllItems, 0, 1); }); Add("items.clear", "Items", "Clear inventory", delegate { NetUtil.Do(PoppyOp.ClearInventory); }); Add("items.stack", "Items", "Stack inventory", delegate { NetUtil.Do(PoppyOp.StackInventory); }); Add("items.reroll", "Items", "Reroll items", delegate { NetUtil.Do(PoppyOp.RollItems); }); Add("items.noEquipCd", "Items", "No equipment cooldown", delegate { ItemsModule.NoEquipmentCooldown = !ItemsModule.NoEquipmentCooldown; }); Add("combat.killAll", "Combat", "Kill all enemies", delegate { NetUtil.Do(PoppyOp.KillAllEnemies); }); Add("combat.noEnemies", "Combat", "No enemies", delegate { Safety.NoEnemies = !Safety.NoEnemies; }); Add("tp.charge", "Teleporter", "Charge teleporter", delegate { NetUtil.Do(PoppyOp.ChargeTeleporter); }); Add("tp.skip", "Teleporter", "Skip stage", delegate { NetUtil.Do(PoppyOp.SkipStage); }); Add("tp.portals", "Teleporter", "Spawn all portals", delegate { NetUtil.Do(PoppyOp.SpawnShopPortal); NetUtil.Do(PoppyOp.SpawnGoldshoresPortal); NetUtil.Do(PoppyOp.SpawnMSPortal); }); Add("world.freeze", "World", "Freeze match", delegate { WorldModule.FreezeMatch = !WorldModule.FreezeMatch; }); Add("world.freezeTimer", "World", "Freeze run timer", delegate { WorldModule.FreezeTimer = !WorldModule.FreezeTimer; }); Add("esp.enemies", "ESP", "Enemy ESP", delegate { RenderModule.EspMobs = !RenderModule.EspMobs; }); Add("esp.interactables", "ESP", "Interactable ESP", delegate { RenderModule.EspInteractables = !RenderModule.EspInteractables; }); Add("esp.teleporter", "ESP", "Teleporter ESP", delegate { RenderModule.EspTeleporter = !RenderModule.EspTeleporter; }); Add("macro.midgame", "Macros", "Mid-game loadout", delegate { PoppyConsole.Submit("midgame"); }); Add("macro.lategame", "Macros", "End-game loadout", delegate { PoppyConsole.Submit("lategame"); }); Add("macro.dtzoom", "Macros", "Zoom items", delegate { PoppyConsole.Submit("dtzoom"); }); Add("tab.player", "Open tab", "Player tab", delegate { MenuRoot.SelectTabByName("Player"); }); Add("tab.items", "Open tab", "Items tab", delegate { MenuRoot.SelectTabByName("Items"); }); Add("tab.players", "Open tab", "Players tab", delegate { MenuRoot.SelectTabByName("Players"); }); Add("tab.console", "Open tab", "Console tab", delegate { MenuRoot.SelectTabByName("Console"); }); Add("tab.keybinds", "Open tab", "Keybinds tab", delegate { MenuRoot.SelectTabByName("Keybinds"); }); } } internal class Bind { public KeyCode Key; public string ActionId; } internal static class BindStore { internal static List<Bind> Binds = new List<Bind>(); private static string FilePath => Path.Combine(Paths.ConfigPath, "PoppyMenu.binds.json"); internal static void Load() { try { if (File.Exists(FilePath)) { Binds = JsonConvert.DeserializeObject<List<Bind>>(File.ReadAllText(FilePath)) ?? new List<Bind>(); } } catch (Exception ex) { Log.Error("Bind load failed: " + ex); Binds = new List<Bind>(); } } internal static void Save() { try { File.WriteAllText(FilePath, JsonConvert.SerializeObject((object)Binds, (Formatting)1)); } catch (Exception ex) { Log.Error("Bind save failed: " + ex); } } internal static void Add(KeyCode key, string actionId) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) Binds.Add(new Bind { Key = key, ActionId = actionId }); Save(); } internal static void Remove(Bind b) { if (Binds.Remove(b)) { Save(); } } internal static void Clear() { Binds.Clear(); Save(); } internal static KeyCode KeyFor(string actionId) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) foreach (Bind bind in Binds) { if (bind != null && (int)bind.Key != 0 && bind.ActionId == actionId) { return bind.Key; } } return (KeyCode)0; } internal static void Poll() { //IL_002a: 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) if (Rebind.IsActive || MenuRoot.Visible || ListPicker.IsOpen) { return; } for (int i = 0; i < Binds.Count; i++) { Bind bind = Binds[i]; if (bind != null && (int)bind.Key != 0 && Input.GetKeyDown(bind.Key)) { ActionRegistry.RunId(bind.ActionId); } } } } internal static class Catalogs { internal readonly struct ItemEntry { internal readonly ItemIndex Index; internal readonly string Name; internal readonly string Quality; internal readonly ItemTier Tier; internal readonly Color Color; internal ItemEntry(ItemIndex index, string name, string quality, ItemTier tier, Color color) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0016: 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_001e: 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) Index = index; Name = name; Quality = quality; Tier = tier; Color = color; } } internal readonly struct EquipEntry { internal readonly EquipmentIndex Index; internal readonly string Name; internal readonly Color Color; internal readonly bool IsLunar; internal readonly bool IsBoss; internal EquipEntry(EquipmentIndex index, string name, Color color, bool isLunar, bool isBoss) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: 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_0010: Unknown result type (might be due to invalid IL or missing references) Index = index; Name = name; Color = color; IsLunar = isLunar; IsBoss = isBoss; } } internal readonly struct BuffEntry { internal readonly BuffIndex Index; internal readonly string Name; internal readonly bool IsDebuff; internal BuffEntry(BuffIndex index, string name, bool isDebuff) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) Index = index; Name = name; IsDebuff = isDebuff; } } internal readonly struct BodyEntry { internal readonly GameObject Prefab; internal readonly string Name; internal BodyEntry(GameObject prefab, string name) { Prefab = prefab; Name = name; } } internal readonly struct SurvivorEntry { internal readonly SurvivorDef Def; internal readonly string Name; internal SurvivorEntry(SurvivorDef def, string name) { Def = def; Name = name; } } internal readonly struct SpawnEntry { internal readonly SpawnCard Card; internal readonly string Name; internal readonly bool IsInteractable; internal SpawnEntry(SpawnCard card, string name, bool isInteractable) { Card = card; Name = name; IsInteractable = isInteractable; } } internal static readonly List<ItemEntry> Items = new List<ItemEntry>(); internal static readonly List<EquipEntry> Equipment = new List<EquipEntry>(); internal static readonly List<BuffEntry> Buffs = new List<BuffEntry>(); internal static readonly List<BodyEntry> Bodies = new List<BodyEntry>(); internal static readonly List<SurvivorEntry> Survivors = new List<SurvivorEntry>(); internal static readonly List<SpawnEntry> SpawnCards = new List<SpawnEntry>(); internal static bool Ready { get; private set; } internal static void Refresh() { BuildItems(); BuildEquipment(); BuildBuffs(); BuildBodies(); BuildSurvivors(); BuildSpawnCards(); Ready = true; Log.Info($"Catalogs: {Items.Count} items, {Equipment.Count} equipment, {Buffs.Count} buffs, " + $"{Bodies.Count} bodies, {Survivors.Count} survivors, {SpawnCards.Count} spawn cards."); } private static string Loc(string token) { if (!string.IsNullOrEmpty(token)) { return Language.GetString(token); } return token; } private static string Sanitize(string s) { if (string.IsNullOrEmpty(s)) { return s; } StringBuilder stringBuilder = new StringBuilder(s.Length); bool flag = false; foreach (char c in s) { switch (c) { case '<': flag = true; continue; case '>': flag = false; continue; } if (!flag) { stringBuilder.Append(c); } } return Regex.Replace(stringBuilder.ToString(), "\\s+", " ").Trim(); } private static string ExtractQuality(string raw) { if (string.IsNullOrEmpty(raw)) { return null; } int num = raw.IndexOf("name=", StringComparison.OrdinalIgnoreCase); if (num < 0) { return null; } num += 5; if (num >= raw.Length) { return null; } char c = ((raw[num] == '"' || raw[num] == '\'') ? raw[num] : '\0'); int num2 = ((c != 0) ? (num + 1) : num); int i; for (i = num2; i < raw.Length; i++) { char c2 = raw[i]; if (c != 0) { if (c2 == c) { break; } } else if (c2 == ' ' || c2 == '>' || c2 == ']' || c2 == '\t') { break; } } if (i <= num2) { return null; } string text = raw.Substring(num2, i - num2); if (text.StartsWith("Quality", StringComparison.OrdinalIgnoreCase)) { text = text.Substring(7); } text = text.Trim(); if (!string.IsNullOrEmpty(text)) { return text; } return null; } private unsafe static void BuildItems() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) Items.Clear(); AllItemsEnumerator enumerator = ItemCatalog.allItems.GetEnumerator(); try { while (((AllItemsEnumerator)(ref enumerator)).MoveNext()) { ItemIndex current = ((AllItemsEnumerator)(ref enumerator)).Current; ItemDef itemDef = ItemCatalog.GetItemDef(current); if (!((Object)(object)itemDef == (Object)null)) { string text = Loc(itemDef.nameToken); if (string.IsNullOrWhiteSpace(text)) { text = ((Object)itemDef).name; } string text2 = Sanitize(text); if (string.IsNullOrEmpty(text2)) { text2 = ((Object)itemDef).name; } Color color = Color32.op_Implicit(ColorCatalog.GetColor(itemDef.darkColorIndex)); Items.Add(new ItemEntry(current, text2, ExtractQuality(text), itemDef.tier, color)); } } } finally { ((IDisposable)(*(AllItemsEnumerator*)(&enumerator))/*cast due to .constrained prefix*/).Dispose(); } Items.Sort(delegate(ItemEntry a, ItemEntry b) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) int num = TierOrder(a.Tier); int num2 = TierOrder(b.Tier); return (num == num2) ? string.Compare(a.Name, b.Name, StringComparison.OrdinalIgnoreCase) : num.CompareTo(num2); }); } private static int TierOrder(ItemTier tier) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected I4, but got Unknown return (int)tier switch { 0 => 0, 1 => 1, 2 => 2, 4 => 3, 3 => 4, 6 => 5, 7 => 6, 8 => 7, 9 => 8, _ => 99, }; } private unsafe static void BuildEquipment() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) Equipment.Clear(); AllEquipmentEnumerator enumerator = EquipmentCatalog.allEquipment.GetEnumerator(); try { while (((AllEquipmentEnumerator)(ref enumerator)).MoveNext()) { EquipmentIndex current = ((AllEquipmentEnumerator)(ref enumerator)).Current; EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(current); if (!((Object)(object)equipmentDef == (Object)null)) { string text = Sanitize(Loc(equipmentDef.nameToken)); if (string.IsNullOrWhiteSpace(text)) { text = ((Object)equipmentDef).name; } Color color = Color32.op_Implicit(ColorCatalog.GetColor(equipmentDef.colorIndex)); Equipment.Add(new EquipEntry(current, text, color, equipmentDef.isLunar, equipmentDef.isBoss)); } } } finally { ((IDisposable)(*(AllEquipmentEnumerator*)(&enumerator))/*cast due to .constrained prefix*/).Dispose(); } Equipment.Sort((EquipEntry a, EquipEntry b) => string.Compare(a.Name, b.Name, StringComparison.OrdinalIgnoreCase)); } private static void BuildBuffs() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) Buffs.Clear(); BuffDef[] buffDefs = BuffCatalog.buffDefs; if (buffDefs == null) { return; } BuffDef[] array = buffDefs; foreach (BuffDef val in array) { if (!((Object)(object)val == (Object)null)) { Buffs.Add(new BuffEntry(val.buffIndex, ((Object)val).name, val.isDebuff)); } } Buffs.Sort((BuffEntry a, BuffEntry b) => string.Compare(a.Name, b.Name, StringComparison.OrdinalIgnoreCase)); } private static void BuildBodies() { Bodies.Clear(); foreach (GameObject allBodyPrefab in BodyCatalog.allBodyPrefabs) { if ((Object)(object)allBodyPrefab == (Object)null) { continue; } string name = ((Object)allBodyPrefab).name; CharacterBody component = allBodyPrefab.GetComponent<CharacterBody>(); if ((Object)(object)component != (Object)null) { string text = Sanitize(Loc(component.baseNameToken)); if (!string.IsNullOrWhiteSpace(text)) { name = text; } } Bodies.Add(new BodyEntry(allBodyPrefab, name)); } Bodies.Sort((BodyEntry a, BodyEntry b) => string.Compare(a.Name, b.Name, StringComparison.OrdinalIgnoreCase)); } private static void BuildSurvivors() { Survivors.Clear(); foreach (SurvivorDef orderedSurvivorDef in SurvivorCatalog.orderedSurvivorDefs) { if (!((Object)(object)orderedSurvivorDef == (Object)null)) { string text = Loc(orderedSurvivorDef.displayNameToken); if (string.IsNullOrWhiteSpace(text)) { text = orderedSurvivorDef.cachedName; } Survivors.Add(new SurvivorEntry(orderedSurvivorDef, text)); } } } internal static void RefreshSpawnCards() { try { BuildSpawnCards(); } catch (Exception arg) { Log.Error($"RefreshSpawnCards: {arg}"); } } private static void BuildSpawnCards() { SpawnCards.Clear(); SpawnCard[] array = Resources.FindObjectsOfTypeAll<SpawnCard>(); foreach (SpawnCard val in array) { if (!((Object)(object)val == (Object)null)) { bool isInteractable = val is InteractableSpawnCard; SpawnCards.Add(new SpawnEntry(val, ((Object)val).name, isInteractable)); } } SpawnCards.Sort((SpawnEntry a, SpawnEntry b) => string.Compare(a.Name, b.Name, StringComparison.OrdinalIgnoreCase)); } } internal enum StepKind { Feature, Item, Equipment, Buff, Money, Xp, Lunar, Spawn, Become, Heal, Command, Macro } internal class CustomStep { public StepKind Kind; public string Id = ""; public int Index = -1; public int Amount = 1; public float Duration; public int Team; public string Label = ""; } internal static class Steps { internal static CustomStep Feature(string id) { PoppyAction poppyAction = ActionRegistry.Get(id); return new CustomStep { Kind = StepKind.Feature, Id = id, Label = ((poppyAction != null) ? poppyAction.Name : id) }; } internal static CustomStep Item(int index, int count) { return new CustomStep { Kind = StepKind.Item, Index = index, Amount = count, Label = $"Give {ItemName(index)} x{count}" }; } internal static CustomStep Equipment(int index) { return new CustomStep { Kind = StepKind.Equipment, Index = index, Label = "Equip " + EquipName(index) }; } internal static CustomStep Buff(int index, float duration) { return new CustomStep { Kind = StepKind.Buff, Index = index, Duration = duration, Label = ((duration > 0f) ? $"Buff {BuffName(index)} ({duration:0}s)" : ("Buff " + BuffName(index))) }; } internal static CustomStep Money(int amount) { return new CustomStep { Kind = StepKind.Money, Amount = amount, Label = "Money +" + amount }; } internal static CustomStep Xp(int amount) { return new CustomStep { Kind = StepKind.Xp, Amount = amount, Label = "XP +" + amount }; } internal static CustomStep Lunar(int amount) { return new CustomStep { Kind = StepKind.Lunar, Amount = amount, Label = "Lunar +" + amount }; } internal static CustomStep Spawn(string card, int count, int team, string display) { return new CustomStep { Kind = StepKind.Spawn, Id = card, Amount = count, Team = team, Label = $"Spawn {display} x{count}" }; } internal static CustomStep Become(string body, string display) { return new CustomStep { Kind = StepKind.Become, Id = body, Label = "Become " + display }; } internal static CustomStep Heal(int amount) { return new CustomStep { Kind = StepKind.Heal, Amount = amount, Label = ((amount > 0) ? ("Heal " + amount) : "Heal to full") }; } internal static CustomStep Command(string cmd) { return new CustomStep { Kind = StepKind.Command, Id = cmd, Label = "> " + cmd }; } internal static CustomStep Macro(string name) { return new CustomStep { Kind = StepKind.Macro, Id = name, Label = "Macro: " + name }; } private static string ItemName(int idx) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Invalid comparison between Unknown and I4 foreach (Catalogs.ItemEntry item in Catalogs.Items) { if ((int)item.Index == idx) { return item.Name; } } return "item"; } private static string BuffName(int idx) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Invalid comparison between Unknown and I4 foreach (Catalogs.BuffEntry buff in Catalogs.Buffs) { if ((int)buff.Index == idx) { return buff.Name; } } return "buff"; } private static string EquipName(int idx) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Invalid comparison between Unknown and I4 foreach (Catalogs.EquipEntry item in Catalogs.Equipment) { if ((int)item.Index == idx) { return item.Name; } } return "equipment"; } } internal static class HomeLayoutStore { internal static List<CustomStep> Shortcuts = new List<CustomStep>(); private static string FilePath => Path.Combine(Paths.ConfigPath, "PoppyMenu.home.json"); internal static void Load() { try { if (File.Exists(FilePath)) { Shortcuts = JsonConvert.DeserializeObject<List<CustomStep>>(File.ReadAllText(FilePath)) ?? new List<CustomStep>(); } } catch (Exception ex) { Log.Error("Home layout load failed: " + ex); Shortcuts = new List<CustomStep>(); } } internal static void Save() { try { File.WriteAllText(FilePath, JsonConvert.SerializeObject((object)Shortcuts, (Formatting)1)); } catch (Exception ex) { Log.Error("Home layout save failed: " + ex); } } internal static void Add(CustomStep s) { if (s != null) { Shortcuts.Add(s); Save(); } } internal static void Remove(CustomStep s) { if (Shortcuts.Remove(s)) { Save(); } } internal static void MoveUp(int i) { if (i > 0 && i < Shortcuts.Count) { CustomStep value = Shortcuts[i]; Shortcuts[i] = Shortcuts[i - 1]; Shortcuts[i - 1] = value; Save(); } } } internal class Macro { public string Name = "Macro"; public List<CustomStep> Steps = new List<CustomStep>(); } internal static class MacroStore { internal static List<Macro> Macros = new List<Macro>(); private static string FilePath => Path.Combine(Paths.ConfigPath, "PoppyMenu.macros.json"); internal static void Load() { try { if (File.Exists(FilePath)) { Macros = JsonConvert.DeserializeObject<List<Macro>>(File.ReadAllText(FilePath)) ?? new List<Macro>(); } } catch (Exception ex) { Log.Error("Macro load failed: " + ex); Macros = new List<Macro>(); } } internal static void Save() { try { File.WriteAllText(FilePath, JsonConvert.SerializeObject((object)Macros, (Formatting)1)); } catch (Exception ex) { Log.Error("Macro save failed: " + ex); } } internal static Macro Get(string name) { foreach (Macro macro in Macros) { if (macro != null && macro.Name == name) { return macro; } } return null; } internal static void Run(string name) { Macro macro = Get(name); if (macro == null) { return; } foreach (CustomStep step in macro.Steps) { StepRunner.Run(step); } } } internal static class ModConfig { internal static ConfigEntry<KeyCode> ToggleMenuKey; internal static ConfigEntry<float> UiScale; internal static ConfigEntry<bool> RequireServerForCheats; internal static ConfigEntry<bool> AllowClientCheats; internal static ConfigEntry<bool> ShowHud; internal static ConfigEntry<float> WindowX; internal static ConfigEntry<float> WindowY; internal static ConfigEntry<float> WindowW; internal static ConfigEntry<float> WindowH; internal static ConfigEntry<KeyCode> SilentAimKey; internal static ConfigEntry<float> AccentR; internal static ConfigEntry<float> AccentG; internal static ConfigEntry<float> AccentB; internal static ConfigEntry<int> GiveMoneyAmount; internal static ConfigEntry<int> GiveXpAmount; internal static ConfigEntry<int> GiveCoinsAmount; internal static ConfigEntry<float> FlightSpeed; internal static void Init(ConfigFile cfg) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown //IL_01ba: Unknown result type (might be due to invalid IL or missing references) ToggleMenuKey = cfg.Bind<KeyCode>("General", "ToggleMenuKey", (KeyCode)277, "Opens/closes the Poppy menu."); UiScale = cfg.Bind<float>("General", "UiScale", 1f, new ConfigDescription("Menu scale.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.6f, 2f), Array.Empty<object>())); RequireServerForCheats = cfg.Bind<bool>("General", "RequireServerForCheats", false, "When true, server-side actions are skipped on non-host clients instead of being requested over the network."); AllowClientCheats = cfg.Bind<bool>("General", "AllowClientCheats", false, "HOST ONLY: when OFF (default), commands from other clients are ignored, so nobody can use this menu in your game without your permission. Turn ON only if you trust everyone in the lobby."); ShowHud = cfg.Bind<bool>("General", "ShowActiveEffectsHud", true, "Show a small active-effects HUD when the menu is closed."); WindowX = cfg.Bind<float>("General", "WindowX", 40f, "Remembered menu window X position."); WindowY = cfg.Bind<float>("General", "WindowY", 60f, "Remembered menu window Y position."); WindowW = cfg.Bind<float>("General", "WindowW", 540f, "Remembered menu window width."); WindowH = cfg.Bind<float>("General", "WindowH", 600f, "Remembered menu window height."); SilentAimKey = cfg.Bind<KeyCode>("Hotkeys", "SilentAimHoldKey", (KeyCode)0, "Hold-to-aim key. If set, Silent Aim only acts while this key is held (rebind in the Aimbot tab)."); AccentR = cfg.Bind<float>("Theme", "AccentR", 0.898f, "Menu accent color, red channel (0-1)."); AccentG = cfg.Bind<float>("Theme", "AccentG", 0.219f, "Menu accent color, green channel (0-1)."); AccentB = cfg.Bind<float>("Theme", "AccentB", 0.29f, "Menu accent color, blue channel (0-1)."); Theme.ApplyAccent(new Color(AccentR.Value, AccentG.Value, AccentB.Value)); GiveMoneyAmount = cfg.Bind<int>("Tunables", "GiveMoneyAmount", 1000, "Gold granted per 'Give Money' click."); GiveXpAmount = cfg.Bind<int>("Tunables", "GiveXpAmount", 100, "Experience granted per 'Give XP' click."); GiveCoinsAmount = cfg.Bind<int>("Tunables", "GiveCoinsAmount", 10, "Lunar coins granted per 'Give Coins' click."); FlightSpeed = cfg.Bind<float>("Tunables", "FlightSpeed", 40f, "Flight movement speed."); } } internal static class PlayerContext { internal static NetworkUser User; internal static CharacterMaster Master; internal static CharacterBody Body; internal static Inventory Inventory; internal static HealthComponent Health; internal static SkillLocator Skills; internal static CharacterMotor Motor; internal static InputBankTest InputBank; internal static bool InGame => (Object)(object)Run.instance != (Object)null; internal static bool HasBody { get { if ((Object)(object)Master != (Object)null) { return (Object)(object)Body != (Object)null; } return false; } } internal static void Refresh() { User = null; Master = null; Body = null; Inventory = null; Health = null; Skills = null; Motor = null; InputBank = null; if (!InGame) { return; } foreach (NetworkUser readOnlyLocalPlayers in NetworkUser.readOnlyLocalPlayersList) { if ((Object)(object)readOnlyLocalPlayers == (Object)null) { continue; } User = readOnlyLocalPlayers; Master = readOnlyLocalPlayers.master; if (!((Object)(object)Master == (Object)null)) { Body = Master.GetBody(); if (!((Object)(object)Body == (Object)null)) { Inventory = Master.inventory; Health = Body.healthComponent; Skills = Body.skillLocator; Motor = ((Component)Body).GetComponent<CharacterMotor>(); InputBank = ((Component)Body).GetComponent<InputBankTest>(); break; } } } } internal static Ray AimRay() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: 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_003e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)InputBank != (Object)null) { return new Ray(InputBank.aimOrigin, InputBank.aimDirection); } Camera main = Camera.main; if (!((Object)(object)main != (Object)null)) { return default(Ray); } return main.ScreenPointToRay(new Vector3((float)Screen.width / 2f, (float)Screen.height / 2f)); } } internal class PoppyAction { internal readonly string Id; internal readonly string Category; internal readonly string Name; internal readonly Action Invoke; internal PoppyAction(string id, string category, string name, Action invoke) { Id = id; Category = category; Name = name; Invoke = invoke; } } internal class PoppyController : MonoBehaviour { private readonly List<PoppyModule> _modules = new List<PoppyModule>(); private readonly List<TabGroup> _groups = new List<TabGroup>(); private bool _catalogsTried; private string _lastScene; private bool _pendingAutoApply; private static string ActiveScene() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); return ((Scene)(ref activeScene)).name; } private void Awake() { _groups.Add(new TabGroup("Home", new HomeModule())); _groups.Add(new TabGroup("Player", new PlayerModule(), new AimbotModule(), new StatsModule(), new MovementModule())); _groups.Add(new TabGroup("Items", new ItemsModule())); _groups.Add(new TabGroup("Character", new CharacterModule())); _groups.Add(new TabGroup("World", new WorldModule(), new SpawnModule(), new RunModule(), new TeleporterModule())); _groups.Add(new TabGroup("Players", new PlayersModule())); _groups.Add(new TabGroup("Visuals", new RenderModule())); _groups.Add(new TabGroup("Console", new ConsoleModule())); _groups.Add(new TabGroup("Settings", new SettingsModule(), new KeybindsModule(), new PresetsModule(), new MacrosModule())); foreach (TabGroup group in _groups) { _modules.AddRange(group.Pages); } CharacterBody.onBodyStartGlobal += OnBodyStart; ((Component)this).gameObject.AddComponent<CursorOverlay>(); } private void OnBodyStart(CharacterBody body) { if (!((Object)(object)body == (Object)null)) { NetworkUser val = Util.LookUpBodyNetworkUser(body); if ((Object)(object)val != (Object)null && NetworkUser.readOnlyLocalPlayersList.Contains(val)) { _pendingAutoApply = true; } } } private void Update() { PlayerContext.Refresh(); if (PlayerContext.InGame) { if (!Catalogs.Ready && !_catalogsTried) { _catalogsTried = true; try { Catalogs.Refresh(); } catch (Exception data) { Log.Error(data); } _lastScene = ActiveScene(); } else if (Catalogs.Ready) { string text = ActiveScene(); if (text != _lastScene) { _lastScene = text; try { Catalogs.RefreshSpawnCards(); } catch (Exception data2) { Log.Error(data2); } } } } NetUtil.TickGuards(); Rebind.Poll(); if (Rebind.IsActive && !MenuRoot.Visible) { Rebind.Cancel(); } if (!PlayerContext.InGame) { WorldModule.RestoreTime(); } if (_pendingAutoApply && PlayerContext.HasBody) { _pendingAutoApply = false; try { PresetStore.ApplyStartupPresets(); PresetStore.ApplyAutoPresets(); } catch (Exception data3) { Log.Error(data3); } } HandleHotkeys(); InputCapture.Sync(MenuRoot.Visible || ListPicker.IsOpen); if (!PlayerContext.InGame) { return; } foreach (PoppyModule module in _modules) { try { module.Tick(); } catch (Exception arg) { Log.Error($"{module.Name}.Tick: {arg}"); } } } private void HandleHotkeys() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) if (Rebind.IsActive) { return; } if (Input.GetKeyDown(ModConfig.ToggleMenuKey.Value)) { MenuRoot.Visible = !MenuRoot.Visible; if (!MenuRoot.Visible) { ListPicker.Close(); MenuRoot.SaveLayout(); } } BindStore.Poll(); } private void OnGUI() { //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) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) Theme.EnsureInit(); if (PlayerContext.InGame) { foreach (PoppyModule module in _modules) { try { module.DrawOverlay(); } catch { } } } Notify.Draw(); GUI.matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, Vector3.one * ModConfig.UiScale.Value); MenuRoot.Draw(_groups); } private void LateUpdate() { if (MenuRoot.Visible || ListPicker.IsOpen) { Cursor.lockState = (CursorLockMode)0; } } private void OnDestroy() { CharacterBody.onBodyStartGlobal -= OnBodyStart; MenuRoot.Visible = false; ListPicker.Close(); try { InputCapture.Shutdown(); } catch { } try { Aim.Shutdown(); } catch { } try { Safety.Shutdown(); } catch { } try { ConsoleCommands.Shutdown(); } catch { } foreach (PoppyModule module in _modules) { try { module.OnUnload(); } catch { } } } } [BepInPlugin("com.poppy.poppymenu", "Poppy Menu", "2.2.3")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class PoppyPlugin : BaseUnityPlugin { internal const string Guid = "com.poppy.poppymenu"; internal const string Version = "2.2.3"; internal static PoppyPlugin Instance { get; private set; } private void Awake() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0078: Unknown result type (might be due to invalid IL or missing references) Instance = this; Log.Init(((BaseUnityPlugin)this).Logger); ModConfig.Init(((BaseUnityPlugin)this).Config); NetUtil.Init(); InputCapture.Init(); Aim.Init(); Safety.Init(); ConsoleCommands.Init(); PresetStore.Load(); BindStore.Load(); MacroStore.Load(); HomeLayoutStore.Load(); GameObject val = new GameObject("PoppyMenu"); Object.DontDestroyOnLoad((Object)(object)val); ((Object)val).hideFlags = (HideFlags)61; val.AddComponent<PoppyController>(); Log.Message(string.Format("Poppy Menu v{0} loaded. Press {1} to open.", "2.2.3", ModConfig.ToggleMenuKey.Value)); } } internal class Preset { public string Name = "New Preset"; public bool AutoApplyOnSpawn; public bool LoadOnStartup; public bool God; public bool Skills; public bool Flight; public bool Sprint; public bool JumpPack; public bool NoEquipCd; public bool SilentAim; public bool EspMobs; public bool EspInteractables; public bool EspTeleporter; public bool DmgOn; public bool AtkOn; public bool MoveOn; public bool ArmorOn; public bool CritOn; public bool HpOn; public float DmgMul = 1f; public float AtkMul = 1f; public float MoveMul = 1f; public float ArmorMul = 1f; public float CritMul = 1f; public float HpMul = 1f; public List<GrantItem> Items = new List<GrantItem>(); public List<string> Equipment = new List<string>(); public bool GiveAllItems; public int Money; public int Xp; public int Coins; } internal class GrantItem { public string Name; public string Display; public int Count = 1; } internal static class PresetStore { internal static List<Preset> Presets = new List<Preset>(); private static bool _startupDone; private static string FilePath => Path.Combine(Paths.ConfigPath, "PoppyMenu.presets.json"); internal static void Load() { try { if (File.Exists(FilePath)) { Presets = JsonConvert.DeserializeObject<List<Preset>>(File.ReadAllText(FilePath)) ?? new List<Preset>(); } } catch (Exception ex) { Log.Error("Preset load failed: " + ex); Presets = new List<Preset>(); } } internal static void Save() { try { File.WriteAllText(FilePath, JsonConvert.SerializeObject((object)Presets, (Formatting)1)); } catch (Exception ex) { Log.Error("Preset save failed: " + ex); } } internal static Preset AddFromCurrent(string name) { Preset preset = Cheats.Capture(string.IsNullOrWhiteSpace(name) ? ("Preset " + (Presets.Count + 1)) : name.Trim()); Presets.Add(preset); Save(); return preset; } internal static void Delete(Preset p) { if (p != null && Presets.Remove(p)) { Save(); } } internal static void ApplyAutoPresets() { foreach (Preset preset in Presets) { if (preset != null && preset.AutoApplyOnSpawn) { Cheats.Apply(preset); } } } internal static void ApplyStartupPresets() { if (_startupDone) { return; } _startupDone = true; foreach (Preset preset in Presets) { if (preset != null && preset.LoadOnStartup) { Cheats.Apply(preset); } } } } internal class TabGroup { internal readonly string Name; internal readonly List<PoppyModule> Pages; internal int Page; internal TabGroup(string name, params PoppyModule[] pages) { Name = name; Pages = new List<PoppyModule>(pages); } } internal class AimbotModule : PoppyModule { private static readonly string[] Priorities = new string[4] { "Closest to Crosshair", "Closest Distance", "Lowest HP", "Highest HP" }; internal override string Name => "Aimbot"; internal override void Tick() { Aim.Tick(); } internal override void DrawOverlay() { Aim.DrawOverlay(); } internal override void DrawMenu() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) Widgets.SectionBegin("Aimbot"); Aim.Enabled = Widgets.Toggle("Enable Aimbot", Aim.Enabled, ModConfig.SilentAimKey.Value); Widgets.KeybindRow("Aim Hold Key", ModConfig.SilentAimKey); Widgets.Hint(((int)ModConfig.SilentAimKey.Value == 0) ? "No hold key, so it's on whenever it's enabled. Click the box and press a key or mouse button." : $"Only active while you hold [{ModConfig.SilentAimKey.Value}]. X clears it."); Widgets.Hint("Silent aim. Your shots go to the target, your camera never moves."); Widgets.SectionEnd(); Widgets.SectionBegin("Targeting"); int num = Mathf.Clamp(Aim.Sorting, 0, Priorities.Length - 1); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Priority: " + Priorities[num], Theme.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); if (GUILayout.Button("<", Theme.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(28f) })) { Aim.Sorting = (num + Priorities.Length - 1) % Priorities.Length; } if (GUILayout.Button(">", Theme.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(28f) })) { Aim.Sorting = (num + 1) % Priorities.Length; } GUILayout.EndHorizontal(); Aim.PrioritizeBosses = Widgets.Toggle("Prioritize Bosses", Aim.PrioritizeBosses); Aim.Sticky = Widgets.Toggle("Sticky Target", Aim.Sticky); Widgets.Hint("Keeps one target until it dies or leaves range."); Aim.RequireLoS = Widgets.Toggle("Require Line of Sight", Aim.RequireLoS); Aim.MaxRange = Widgets.Slider("Max Range", Aim.MaxRange, 20f, 600f); Aim.UseFov = Widgets.Toggle("Limit to FOV cone", Aim.UseFov); if (Aim.UseFov) { Aim.Fov = Widgets.Slider("FOV (deg)", Aim.Fov, 1f, 180f); } Widgets.SectionEnd(); Widgets.SectionBegin("Projectiles"); Widgets.Hint("Your projectiles automatically curve onto the locked target. Host or solo."); Aim.MagicBullet = Widgets.Toggle("Magic Bullet (shoot through walls)", Aim.MagicBullet); Widgets.Hint("Your shots pass through walls. Enemies don't. Host or solo."); Widgets.SectionEnd(); Widgets.SectionBegin("Visuals"); Aim.Highlight = Widgets.Toggle("Highlight Target", Aim.Highlight); Aim.ShowFovCircle = Widgets.Toggle("Show FOV Circle", Aim.ShowFovCircle); Widgets.SectionEnd(); } } internal class CharacterModule : PoppyModule { internal override string Name => "Character"; internal override void DrawMenu() { //IL_0060: Unknown result type (might be due to invalid IL or missing references) Widgets.SectionBegin("Change Character"); Widgets.Hint("Respawns you here as whatever you pick. Survivors and monsters both."); List<ListPicker.Row> list = new List<ListPicker.Row>(Catalogs.Bodies.Count); foreach (Catalogs.BodyEntry body in Catalogs.Bodies) { if (!((Object)(object)body.Prefab == (Object)null)) { Catalogs.BodyEntry e = body; list.Add(new ListPicker.Row(e.Name, Color.white, delegate { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) Vector3 val = (PlayerContext.HasBody ? PlayerContext.Body.footPosition : Vector3.zero); NetUtil.Do(PoppyOp.ChangeBody, 0, 0, val.x, val.y, val.z, b1: false, ((Object)e.Prefab).name); })); } } Widgets.PickerButton("Change Character / Play As...", "Bodies", list); Widgets.SectionEnd(); } } internal class ConsoleModule : PoppyModule { private static string _input = ""; private static string _filter = ""; private static Vector2 _logScroll; internal override string Name => "Console"; internal override void DrawMenu() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Invalid comparison between Unknown and I4 //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Invalid comparison between Unknown and I4 Widgets.SectionBegin("Console"); Widgets.Hint("Type a command and hit Run. Unknown ones fall through to the game console. Type help for the list."); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUI.SetNextControlName("poppyConsoleInput"); _input = GUILayout.TextField(_input ?? "", Theme.Search, Array.Empty<GUILayoutOption>()); if (Widgets.Button("Run")) { Submit(); } GUILayout.EndHorizontal(); if ((int)Event.current.type == 4 && (int)Event.current.keyCode == 13 && GUI.GetNameOfFocusedControl() == "poppyConsoleInput") { Submit(); Event.current.Use(); } _logScroll = GUILayout.BeginScrollView(_logScroll, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(220f) }); foreach (string item in PoppyConsole.History) { GUILayout.Label(item, Theme.Hint, Array.Empty<GUILayoutOption>()); } GUILayout.EndScrollView(); if (Widgets.Button("Clear log")) { PoppyConsole.History.Clear(); } Widgets.SectionEnd(); Widgets.SectionBegin("Command reference"); _filter = GUILayout.TextField(_filter ?? "", Theme.Search, Array.Empty<GUILayoutOption>()); foreach (string item2 in PoppyConsole.CommandList()) { if (string.IsNullOrEmpty(_filter) || item2.IndexOf(_filter, StringComparison.OrdinalIgnoreCase) >= 0) { GUILayout.Label(item2, Theme.Hint, Array.Empty<GUILayoutOption>()); } } Widgets.SectionEnd(); } private static void Submit() { if (!string.IsNullOrWhiteSpace(_input)) { PoppyConsole.Submit(_input); _input = ""; _logScroll.y = float.MaxValue; } } } internal class HomeModule : PoppyModule { private static string _query = ""; private static bool _customizing; private const StringComparison OIC = StringComparison.OrdinalIgnoreCase; internal override string Name => "Home"; internal override void DrawMenu() { DrawSearch(); DrawShortcuts(); Widgets.SectionBegin("Quick Toggles"); PlayerModule.GodMode = Widgets.Toggle("God Mode", PlayerModule.GodMode); MovementModule.Flight = Widgets.Toggle("Flight", MovementModule.Flight); MovementModule.AlwaysSprint = Widgets.Toggle("Always Sprint", MovementModule.AlwaysSprint); PlayerModule.InfiniteSkills = Widgets.Toggle("Infinite Skills", PlayerModule.InfiniteSkills); Aim.Enabled = Widgets.Toggle("Aimbot", Aim.Enabled); ItemsModule.NoEquipmentCooldown = Widgets.Toggle("No Equipment Cooldown", ItemsModule.NoEquipmentCooldown); bool flag = RenderModule.EspMobs || RenderModule.EspInteractables || RenderModule.EspTeleporter; bool flag2 = Widgets.Toggle("ESP (all)", flag); if (flag2 != flag) { RenderModule.EspMobs = (RenderModule.EspInteractables = (RenderModule.EspTeleporter = flag2)); } Widgets.SectionEnd(); Widgets.SectionBegin("Give"); ModConfig.GiveMoneyAmount.Value = Widgets.IntStepper("Money", ModConfig.GiveMoneyAmount.Value, 1000, 0, 1000000000); ModConfig.GiveXpAmount.Value = Widgets.IntStepper("XP", ModConfig.GiveXpAmount.Value, 100, 0, 1000000000); ModConfig.GiveCoinsAmount.Value = Widgets.IntStepper("Coins", ModConfig.GiveCoinsAmount.Value, 5, 0, 100000); Widgets.Button("Give Money", delegate { NetUtil.Do(PoppyOp.GiveMoney, ModConfig.GiveMoneyAmount.Value); }); Widgets.Button("Give XP", delegate { NetUtil.Do(PoppyOp.GiveXp, ModConfig.GiveXpAmount.Value); }); Widgets.Button("Give Lunar Coins", delegate { NetUtil.Do(PoppyOp.GiveLunar, ModConfig.GiveCoinsAmount.Value); }); Widgets.SectionEnd(); Widgets.SectionBegin("Quick Actions"); Widgets.PrimaryButton("Give All Items", delegate { NetUtil.Do(PoppyOp.GiveAllItems, 0, 1); }); Widgets.Button("Heal to Full", delegate { NetUtil.Do(PoppyOp.HealFull); }); Widgets.Button("Respawn", delegate { NetUtil.Do(PoppyOp.Respawn); }); Widgets.Button("Instant Charge Teleporter", delegate { NetUtil.Do(PoppyOp.ChargeTeleporter); }); Widgets.Button("Kill All Enemies", delegate { NetUtil.Do(PoppyOp.KillAllEnemies); }); Widgets.ConfirmButton("home.clearinv", "Clear Inventory", delegate { NetUtil.Do(PoppyOp.ClearInventory); }); Widgets.SectionEnd(); List<string> list = MenuRoot.ActiveEffects(); Widgets.SectionBegin("Status"); Widgets.Hint((list.Count > 0) ? ("Active: " + string.Join(", ", list)) : "No effects active."); if (list.Count > 0) { Widgets.DangerButton("Disable All", Cheats.DisableAll); } Widgets.SectionEnd(); } private unsafe static void DrawSearch() { //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Expected I4, but got Unknown //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Expected I4, but got Unknown Widgets.SectionBegin("Search"); _query = GUILayout.TextField(_query ?? "", Theme.Search, Array.Empty<GUILayoutOption>()); string text = (_query ?? "").Trim(); if (text.Length == 0) { Widgets.Hint("Find any feature or item, run it, or pin it to Home."); Widgets.SectionEnd(); return; } int num = 0; foreach (PoppyAction item in ActionRegistry.All) { if (num >= 10) { break; } if (item.Name.IndexOf(text, StringComparison.OrdinalIgnoreCase) >= 0 || item.Category.IndexOf(text, StringComparison.OrdinalIgnoreCase) >= 0) { string id = item.Id; KeyCode val = BindStore.KeyFor(id); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); if (GUILayout.Button(item.Category + ": " + item.Name + (((int)val != 0) ? (" [" + ((object)(*(KeyCode*)(&val))/*cast due to .constrained prefix*/).ToString() + "]") : ""), Theme.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) })) { ActionRegistry.RunId(id); } if (GUILayout.Button("Pin", Theme.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(52f) })) { HomeLayoutStore.Add(Steps.Feature(id)); } GUILayout.EndHorizontal(); num++; } } int num2 = 0; HashSet<string> hashSet = new HashSet<string>(); foreach (Catalogs.ItemEntry item2 in Catalogs.Items) { if (num2 >= 8) { break; } if (item2.Name.IndexOf(text, StringComparison.OrdinalIgnoreCase) >= 0 && hashSet.Add(item2.Name)) { Catalogs.ItemEntry itemEntry = item2; GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); if (GUILayout.Button("Give: " + itemEntry.Name, Theme.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) })) { NetUtil.Do(PoppyOp.GiveItem, (int)itemEntry.Index, ItemsModule.GiveCount); } if (GUILayout.Button("Pin", Theme.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(52f) })) { HomeLayoutStore.Add(Steps.Item((int)itemEntry.Index, ItemsModule.GiveCount)); } GUILayout.EndHorizontal(); num2++; } } if (num == 0 && num2 == 0) { Widgets.Hint("No matches."); } Widgets.SectionEnd(); } private static void DrawShortcuts() { Widgets.SectionBegin("My Shortcuts"); List<CustomStep> shortcuts = HomeLayoutStore.Shortcuts; if (shortcuts.Count == 0) { Widgets.Hint("Pin things from search above, or turn on Customize to add any item, buff, spawn, macro, and more."); } for (int i = 0; i < shortcuts.Count; i++) { CustomStep customStep = shortcuts[i]; int i2 = i; GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); if (GUILayout.Button(customStep.Label, Theme.Primary, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) })) { StepRunner.Run(customStep); } if (GUILayout.Button("^", Theme.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(26f) })) { HomeLayoutStore.MoveUp(i2); break; } if (GUILayout.Button("X", Theme.Danger_, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(26f) })) { HomeLayoutStore.Remove(customStep); break; } GUILayout.EndHorizontal(); } _customizing = Widgets.Toggle("Customize (add anything)", _customizing); if (_customizing) { StepBuilder.Draw(delegate(CustomStep s) { HomeLayoutStore.Add(s); }); } Widgets.SectionEnd(); } } internal class ItemsModule : PoppyModule { internal static bool NoEquipmentCooldown; internal static int GiveCount = 1; internal override string Name => "Items"; internal override void DrawMenu() { //IL_0092: Unknown result type (might be due to invalid IL or missing references) Widgets.SectionBegin("Give"); GiveCount = Widgets.IntStepper("Count", GiveCount, 1, 1, 1000); Widgets.Button("Give Item...", delegate { ItemPicker.Open("Items", delegate(ItemIndex idx) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected I4, but got Unknown NetUtil.Do(PoppyOp.GiveItem, (int)idx, GiveCount); }); }); List<ListPicker.Row> list = new List<ListPicker.Row>(Catalogs.Equipment.Count); foreach (Catalogs.EquipEntry item in Catalogs.Equipment) { Catalogs.EquipEntry e = item; list.Add(new ListPicker.Row(e.Name, e.Color, delegate { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected I4, but got Unknown NetUtil.Do(PoppyOp.GiveEquipment, (int)e.Index); })); } Widgets.PickerButton("Give Equipment...", "Equipment", list); Widgets.Button($"Give All Items (x{GiveCount})", delegate { NetUtil.Do(PoppyOp.GiveAllItems, 0, GiveCount); }); Widgets.SectionEnd(); Widgets.SectionBegin("Inventory"); Widgets.Button("Stack (Shrine of Order)", delegate { NetUtil.Do(PoppyOp.StackInventory); }); Widgets.Button("Reroll Items", delegate { NetUtil.Do(PoppyOp.RollItems); }); Widgets.Button("Undo Last Item Change", delegate { NetUtil.Do(PoppyOp.UndoInventory); }); NoEquipmentCooldown = Widgets.Toggle("No Equipment Cooldown", NoEquipmentCooldown); Widgets.ConfirmButton("items.clearinv", "Clear Inventory", delegate { NetUtil.Do(PoppyOp.ClearInventory); }); Widgets.SectionEnd(); } internal override void Tick() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Invalid comparison between Unknown and I4 if (!NoEquipmentCooldown || !NetUtil.IsServer || !PlayerContext.HasBody) { return; } EquipmentSlot equipmentSlot = PlayerContext.Body.equipmentSlot; if (!((Object)(object)equipmentSlot == (Object)null) && (int)equipmentSlot.equipmentIndex != -1) { int num = ((equipmentSlot.maxStock <= 0) ? 1 : equipmentSlot.maxStock); if (equipmentSlot.stock < num) { equipmentSlot.stock = num; } } } } internal class KeybindsModule : PoppyModule { internal override string Name => "Keybinds"; internal override void DrawMenu() { //IL_00de: Unknown result type (might be due to invalid IL or missing references) Widgets.SectionBegin("Add a keybind"); Widgets.Hint("Pick any feature, then press the key or mouse button you want. Bindings fire while the menu is closed."); Widgets.PickerButton("Bind a feature...", "Pick a feature", ActionRows()); if (Rebind.IsActive) { Widgets.Hint("Now press a key or button. Esc cancels."); } Widgets.SectionEnd(); Widgets.SectionBegin("Your keybinds"); if (BindStore.Binds.Count == 0) { Widgets.Hint("Nothing bound yet."); } for (int num = BindStore.Binds.Count - 1; num >= 0; num--) { Bind bind = BindStore.Binds[num]; PoppyAction poppyAction = ActionRegistry.Get(bind.ActionId); string text = ((poppyAction != null) ? (poppyAction.Category + ": " + poppyAction.Name) : bind.ActionId); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(text, Theme.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); Bind captured = bind; if (GUILayout.Button(((int)bind.Key == 0) ? "set key" : ((object)Unsafe.As<KeyCode, KeyCode>(ref bind.Key)/*cast due to .constrained prefix*/).ToString(), Theme.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) })) { Rebind.Capture((Action<KeyCode>)delegate(KeyCode kc) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) captured.Key = kc; BindStore.Save(); }); } if (GUILayout.Button("X", Theme.Danger_, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(28f) })) { BindStore.Remove(bind); } GUILayout.EndHorizontal(); } if (BindStore.Binds.Count > 0) { Widgets.ConfirmButton("keybinds.clear", "Clear all keybinds", BindStore.Clear); } Widgets.SectionEnd(); } private static List<ListPicker.Row> ActionRows() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) List<ListPicker.Row> list = new List<ListPicker.Row>(ActionRegistry.All.Count + MacroStore.Macros.Count); foreach (PoppyAction item in ActionRegistry.All) { PoppyAction act = item; list.Add(new ListPicker.Row(act.Category + ": " + act.Name, Color.white, delegate { Rebind.Capture((Action<KeyCode>)delegate(KeyCode kc) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) BindStore.Add(kc, act.Id); }); })); } foreach (Macro macro2 in MacroStore.Macros) { Macro macro = macro2; list.Add(new ListPicker.Row("Macro: " + macro.Name, Color.yellow, delegate { Rebind.Capture((Action<KeyCode>)delegate(KeyCode kc) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) BindStore.Add(kc, "macro:" + macro.Name); }); })); } return list; } } internal class MacrosModule : PoppyModule { private static string _newName = ""; private static int _expanded = -1; private static Macro _pendingDelete; internal override string Name => "Macros"; internal unsafe override void DrawMenu() { //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) Widgets.SectionBegin("Macros"); Widgets.Hint("A macro runs several custom actions at once. Add any items, buffs, currency, spawns, or features, then bind it to a key or pin it on Home."); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); _newName = GUILayout.TextField(_newName ?? "", Theme.Search, Array.Empty<GUILayoutOption>()); if (GUILayout.Button("+ New Macro", Theme.Primary, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(110f) })) { string name = (string.IsNullOrWhiteSpace(_newName) ? ("Macro " + (MacroStore.Macros.Count + 1)) : _newName.Trim()); MacroStore.Macros.Add(new Macro { Name = name }); MacroStore.Save(); _newName = ""; _expanded = MacroStore.Macros.Count - 1; } GUILayout.EndHorizontal(); Widgets.SectionEnd(); if (MacroStore.Macros.Count == 0) { Widgets.Label("No macros yet. Name one above and click + New Macro."); return; } for (int i = 0; i < MacroStore.Macros.Count; i++) { Macro macro = MacroStore.Macros[i]; Widgets.SectionBegin(null); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); string text = GUILayout.TextField(macro.Name ?? "", Theme.Search, Array.Empty<GUILayoutOption>()); if (text != macro.Name) { macro.Name = text; MacroStore.Save(); } if (GUILayout.Button((_expanded == i) ? "v Edit" : "> Edit", Theme.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(64f) })) { _expanded = ((_expanded == i) ? (-1) : i); } GUILayout.EndHorizontal(); KeyCode val = BindStore.KeyFor("macro:" + macro.Name); Widgets.Hint(macro.Steps.Count + ((macro.Steps.Count == 1) ? " step" : " steps") + (((int)val != 0) ? (" bound to [" + ((object)(*(KeyCode*)(&val))/*cast due to .constrained prefix*/).ToString() + "]") : "")); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); if (GUILayout.Button("Run now", Theme.Primary, Array.Empty<GUILayoutOption>())) { MacroStore.Run(macro.Name); } Macro bindTarget = macro; if (GUILayout.Button("Bind key", Theme.Button, Array.Empty<GUILayoutOption>())) { Rebind.Capture((Action<KeyCode>)delegate(KeyCode kc) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) BindStore.Add(kc, "macro:" + bindTarget.Name); }); } GUILayout.EndHorizontal(); if (Rebind.IsActive) { Widgets.Hint("Press a key or button to bind this macro. Esc cancels."); } if (_expanded == i) { DrawEditor(macro); } Widgets.SectionEnd(); } if (_pendingDelete != null) { MacroStore.Macros.Remove(_pendingDelete); MacroStore.Save(); _pendingDelete = null; _expanded = -1; } } private static void DrawEditor(Macro m) { Widgets.Header("Steps (run top to bottom)"); StepBuilder.Draw(delegate(CustomStep s) { m.Steps.Add(s); MacroStore.Save(); }); for (int num = 0; num < m.Steps.Count; num++) { int index = num; GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(num + 1 + ". " + m.Steps[num].Label, Theme.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); if (GUILayout.Button("X", Theme.Danger_, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(28f) })) { m.Steps.RemoveAt(index); MacroStore.Save(); break; } GUILayout.EndHorizontal(); } if (m.Steps.Count == 0) { Widgets.Hint("No steps yet. Use the buttons above to add any item, buff, spawn, feature, and more."); } Widgets.Separator(); Widgets.ConfirmButton("macro.delete." + m.Name, "Delete this macro", delegate { _pendingDelete = m; }); } } internal class MovementModule : PoppyModule { internal static bool Flight; internal static bool NoClip; internal static bool AlwaysSprint; internal static bool JumpPack; private bool _gravityOff; private bool _collisionsDisabled; private KinematicCharacterMotor _kcm; private CharacterBody _lastBody; internal override string Name => "Move"; internal static void ToggleFlight() { Flight = !Flight; } internal static void ToggleSprint() { AlwaysSprint = !AlwaysSprint; } internal static void ToggleNoClip() { NoClip = !NoClip; } internal override void Tick() { //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) if (!PlayerContext.InGame || !PlayerContext.HasBody) { return; } CharacterMotor motor = PlayerContext.Motor; CharacterBody body = PlayerContext.Body; if ((Object)(object)body != (Object)(object)_lastBody) { _lastBody = body; _kcm = ((Component)body).GetComponent<KinematicCharacterMotor>(); _collisionsDisabled = false; _gravityOff = false; } if ((Object)(object)_kcm != (Object)null && NoClip != _collisionsDisabled) { SetCollisions(!NoClip); _collisionsDisabled = NoClip; } bool flag = Flight || NoClip; if (flag && (Object)(object)motor != (Object)null) { motor.useGravity = false; motor.disableAirControlUntilCollision = false; _gravityOff = true; Vector3 val = Vector3.zero; Camera main = Camera.main; if ((Object)(object)main != (Object)null && !InputCapture.Active) { Vector3 forward = ((Component)main).transform.forward; forward.y = 0f; ((Vector3)(ref forward)).Normalize(); Vector3 right = ((Component)main).transform.right; right.y = 0f; ((Vector3)(ref right)).Normalize(); val = forward * Input.GetAxisRaw("Vertical") + right * Input.GetAxisRaw("Horizontal"); if (Input.GetKey((KeyCode)32)) { val.y += 1f; } if (Input.GetKey((KeyCode)306)) { val.y -= 1f; } } if (((Vector3)(ref val)).sqrMagnitude > 0.01f) { if (((Vector3)(ref val)).sqrMagnitude > 1f) { ((Vector3)(ref val)).Normalize(); } motor.velocity = val * ModConfig.FlightSpeed.Value; } else { motor.velocity = Vector3.Lerp(motor.velocity, Vector3.zero, 12f * Time.deltaTime); } } else if ((Object)(object)motor != (Object)null && _gravityOff) { motor.useGravity = true; _gravityOff = false; } if (AlwaysSprint && (Object)(object)body != (Object)null) { body.isSprinting = true; } if (JumpPack && (Object)(object)motor != (Object)null && !InputCapture.Active && Input.GetKeyDown((KeyCode)32) && !flag) { Vector3 velocity = motor.velocity; velocity.y = 40f; motor.velocity = velocity; } } private void SetCollisions(bool on) { if (!((Object)(object)_kcm == (Object)null)) { _kcm.SetCapsuleCollisionsActivation(on); _kcm.SetMovementCollisionsSolvingActivation(on); _kcm.SetGroundSolvingActivation(on); } } internal override void OnUnload() { if ((Object)(object)_kcm != (Object)null && _collisionsDisabled) { SetCollisions(on: true); } if ((Object)(object)PlayerContext.Motor != (Object)null && _gravityOff) { PlayerContext.Motor.useGravity = true; } } internal override void DrawMenu() { Widgets.SectionBegin("Movement"); Flight = Widgets.Toggle("Flight", Flight); NoClip = Widgets.Toggle("No-Clip (fly through walls)", NoClip); AlwaysSprint = Widgets.Toggle("Always Sprint", AlwaysSprint); JumpPack = Widgets.Toggle("Jump Pack", JumpPack); ModConfig.FlightSpeed.Value = Widgets.Slider("Fly Speed", ModConfig.FlightSpeed.Value, 5f, 150f); Widgets.Hint("Fly: WASD move, Space up, Left Ctrl down. You can still aim and fire while flying."); Widgets.SectionEnd(); } } internal class PlayerModule : PoppyModule { internal static bool GodMode; internal static bool InfiniteSkills; private static int _heal = 500; private static int _hurt = 100; private static float _buffDuration; internal override string Name => "Combat"; internal static void ToggleGod() { GodMode = !GodMode; } internal override void Tick() { if (PlayerContext.InGame && PlayerContext.HasBody) { if ((Object)(object)PlayerContext.Health != (Object)null) { PlayerContext.Health.godMode = GodMode; } if ((Object)(object)PlayerContext.Master != (Object)null) { PlayerContext.Master.godMode = GodMode; } if (InfiniteSkills && (Object)(object)PlayerContext.Skills != (Object)null) { PlayerContext.Skills.ApplyAmmoPack(); } } } internal override void DrawMenu() { Widgets.SectionBegin("Combat"); GodMode = Widgets.Toggle("God Mode", GodMode); Safety.Buddha = Widgets.Toggle("Buddha (survive lethal hits)", Safety.Buddha); InfiniteSkills = Widgets.Toggle("Infinite Skills", InfiniteSkills); Widgets.SectionEnd(); Widgets.SectionBegin("Health"); Widgets.Button("Heal to Full", delegate { NetUtil.Do(PoppyOp.HealFull); }); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); Widgets.Button("Heal " + _heal, delegate { NetUtil.Do(PoppyOp.HealAmount, 0, 0, _heal); }); Widgets.Button("Hurt " + _hurt, delegate { NetUtil.Do(PoppyOp.HurtBody, 0, 0, _hurt); }); GUILayout.EndHorizontal(); _heal = Widgets.IntStepper("Heal amount", _heal, 100, 1, 1000000000); _hurt = Widgets.IntStepper("Hurt amount", _hurt, 50, 1, 1000000000); Widgets.Button("Respawn", delegate { NetUtil.Do(PoppyOp.Respawn); }); Widgets.SectionEnd(); Widgets.SectionBegin("Grants"); Widgets.Button("Give Money", delegate { NetUtil.Do(PoppyOp.GiveMoney, ModConfig.GiveMoneyAmount.Value); }); Widgets.Button("Give XP", delegate { NetUtil.Do(PoppyOp.GiveXp, ModConfig.GiveXpAmount.Value); }); Widgets.Button("Give Lunar Coins", delegate { NetUtil.Do(PoppyOp.GiveLunar, ModConfig.GiveCoinsAmount.Value); }); Widgets.SectionEnd(); Widgets.SectionBegin("Buffs & DoTs"); _buffDuration = Widgets.Slider("Buff duration (0 = permanent)", _buffDuration, 0f, 60f); Widgets.PickerButton("Give Buff...", "Buffs", BuffRows()); Widgets.Button("Remove All Buffs", delegate { NetUtil.Do(PoppyOp.RemoveAllBuffs); }); Widgets.PickerButton("Inflict DoT...", "Damage over time", DotRows()); Widgets.SectionEnd(); } private static List<ListPicker.Row> BuffRows() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) List<ListPicker.Row> list = new List<ListPicker.Row>(Catalogs.Buffs.Count); foreach (Catalogs.BuffEntry buff in Catalogs.Buffs) { Catalogs.BuffEntry e = buff; list.Add(new ListPicker.Row(e.Name, e.IsDebuff ? Color.red : Color.cyan, delegate { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected I4, but got Unknown //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected I4, but got Unknown if (_buffDuration > 0.05f) { NetUtil.Do(PoppyOp.GiveTimedBuff, (int)e.Index, 0, _buffDuration); } else { NetUtil.Do(PoppyOp.GiveBuff, (int)e.Index, 1); } })); } return list; } private static List<ListPicker.Row> DotRows() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Invalid comparison between Unknown and I4 //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) List<ListPicker.Row> list = new List<ListPicker.Row>(); foreach (DotIndex value in Enum.GetValues(typeof(DotIndex))) { if ((int)value >= 0) { DotIndex d = value; list.Add(new ListPicker.Row(((object)Unsafe.As<DotIndex, DotIndex>(ref d)/*cast due to .constrained prefix*/).ToString(), Color.red, delegate { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected I4, but got Unknown NetUtil.Do(PoppyOp.InflictDot, (int)d, 0, (_buffDuration > 0.05f) ? _buffDuration : 5f); })); } } return list; } } internal class PlayersModule : PoppyModule { private static int _hurt = 100; private static int _giveCount = 1; internal override string Name => "Players"; internal override void DrawMenu() { if (!PlayerContext.InGame) { Widgets.Label("Start a run first."); return; } ReadOnlyCollection<NetworkUser> readOnlyInstancesList = NetworkUser.readOnlyInstancesList; if (readOnlyInstancesList == null || readOnlyInstancesList.Count == 0) { Widgets.Label("No players in the lobby."); return; } if (!NetUtil.IsServer) { Widgets.Hint("You're a client, so these go to the host and only apply if the host turned on \"Allow Others To Use This\"."); } _hurt = Widgets.IntStepper("Hurt amount", _hurt, 50, 1, 1000000000); _giveCount = Widgets.IntStepper("Give item count", _giveCount, 1, 1, 100); foreach (NetworkUser item in readOnlyInstancesList) { if ((Object)(object)item != (Object)null) { DrawPlayer(item); } } } private static void DrawPlayer(NetworkUser user) { CharacterMaster master = user.master; bool flag = NetworkUser.readOnlyLocalPlayersList.Contains(user); Widgets.SectionBegin(user.userName + (flag ? " (you)" : "")); CharacterBody val = (((Object)(object)master != (Object)null) ? master.GetBody() : null); if ((Object)(object)val != (Object)null && (Object)(object)val.healthComponent != (Object)null) { Widgets.Label($"{val.GetDisplayName()} · {Mathf.CeilToInt(val.healthComponent.health)} / {Mathf.CeilToInt(val.healthComponent.fullCombinedHealth)} HP"); } else { Widgets.Label("No body (dead or not spawned)"); } if (!flag && NetUtil.IsServer) { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); Widgets.Button("Kick", delegate { NetUtil.KickUser(user); }); Widgets.ConfirmButton("players.ban." + user.userName, "Ban", delegate { NetUtil.BanUser(user); }); GUILayout.EndHorizontal(); } if ((Object)(object)master == (Object)null) { Widgets.SectionEnd(); return; } GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); Widgets.Button("Heal", delegate { NetUtil.DoFor(master, PoppyOp.HealFull); }); Widgets.Button("Revive", delegate { NetUtil.DoFor(master, PoppyOp.Respawn); }); Widgets.Button("Hurt " + _hurt, delegate { NetUtil.DoFor(master, PoppyOp.HurtBody, 0, 0, _hurt); }); Widgets.Button("Kill", delegate { NetUtil.DoFor(master, PoppyOp.TrueKillTarget); }); GUILayout.EndHorizontal(); if (!flag) { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); Widgets.Button("Bring to me", delegate { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) Vector3 val2 = MyPos(); NetUtil.DoFor(master, PoppyOp.TeleportBody, 0, 0, val2.x, val2.y, val2.z); }); Widgets.Button("Go to them", delegate { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0015: 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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) CharacterBody body = master.GetBody(); Vector3 val2 = (((Object)(object)body != (Object)null) ? body.footPosition : MyPos()); NetUtil.DoFor(PlayerContext.Master, PoppyOp.TeleportBody, 0, 0, val2.x, val2.y, val2.z); }); GUILayout.EndHorizontal(); } GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); Widgets.Button("Team: Players", delegate { NetUtil.DoFor(master, PoppyOp.SetTeam, 1); }); Widgets.Button("Monsters", delegate { NetUtil.DoFor(master, PoppyOp.SetTeam, 2); }); Widgets.Button("Neutral", delegate { NetUtil.DoFor(master, PoppyOp.SetTeam); }); GUILayout.EndHorizontal(); CharacterMaster target = master; Widgets.Button("Give item", delegate { ItemPicker.Open("Give item to " + user.userName, delegate(ItemIndex idx) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected I4, but got Unknown NetUtil.DoFor(target, PoppyOp.GiveItem, (int)idx, _giveCount); }); }); Widgets.PickerButton("Set body", "Set " + user.userName + "'s body", SetBodyRows(master)); Widgets.SectionEnd(); } private static List<ListPicker.Row> SetBodyRows(CharacterMaster master) { //IL_0064: Unknown result type (might be due to invalid IL or missing references) List<ListPicker.Row> list = new List<ListPicker.Row>(Catalogs.Bodies.Count); foreach (Catalogs.BodyEntry body2 in Catalogs.Bodies) { if (!((Object)(object)body2.Prefab == (Object)null)) { Catalogs.BodyEntry e = body2; list.Add(new ListPicker.Row(e.Name, Color.white, delegate { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) CharacterBody body = master.GetBody(); Vector3 val = (((Object)(object)body != (Object)null) ? body.footPosition : Vector3.zero); NetUtil.DoFor(master, PoppyOp.ChangeBody, 0, 0, val.x, val.y, val.z, b1: false, ((Object)e.Prefab).name); })); } } return list; } private static Vector3 MyPos() { //IL_0016: 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) CharacterBody body = PlayerContext.Body; if (!((Object)(object)body != (Object)null)) { return Vector3.zero; } return body.footPosition; } } internal abstract class PoppyModule { internal abstract string Name { get; } internal virtual void Tick() { } internal virtual void DrawMenu() { } internal virtual void DrawOverlay() { } internal virtual void OnUnload() { } } internal class PresetsModule : PoppyModule { private static string _newName = ""; private static string _importCode = ""; private static int _expanded = -1; private static Preset _pendingDelete; internal override string Name => "Presets"; internal override void DrawMenu() { //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Expected O, but got Unknown Widgets.SectionBegin("Presets"); Widgets.Hint("Save items and toggles, then flip on Auto-grant to apply them on every spawn."); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); _newName = GUILayout.TextField(_newName ?? "", Theme.Search, Array.Empty<GUILayoutOption>()); if (GUILayout.Button("+ New Preset", Theme.Primary, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(110f) })) { Preset item = NewEmpty(_newName); _newName = ""; _expanded = PresetStore.Presets.IndexOf(item); } GUILayout.EndHorizontal(); Widgets.Button("Save current setup as a preset", delegate { Preset preset2 = PresetStore.AddFromCurrent(_newName); _expanded = PresetStore.Presets.IndexOf(preset2); Notify.Push("Saved preset: " + preset2.Name); }); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); _importCode = GUILayout.TextField(_importCode ?? "", Theme.Search, Array.Empty<GUILayoutOption>()); if (GUILayout.Button("Import code", Theme.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) })) { ImportCode(); } GUILayout.EndHorizontal(); Widgets.Hint("Paste a code to import a shared preset, or use Export on one below to copy its code."); Widgets.SectionEnd(); if (PresetStore.Presets.Count == 0) { Widgets.Label("No presets yet, click \"+ New Preset\" above to start."); return; } for (int num = 0; num < PresetStore.Presets.Count; num++) { Preset preset = PresetStore.Presets[num]; Widgets.SectionBegin(null); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); string text = GUILayout.TextField(preset.Name ?? "", Theme.Search, Array.Empty<GUILayoutOption>()); if (text != preset.Name) { preset.Name = text; PresetStore.Save(); } if (GUILayout.Button((_expanded == num) ? "v Edit" : "> Edit", Theme.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(64f) })) { _expanded = ((_expanded == num) ? (-1) : num); } GUILayout.EndHorizontal(); GUILayout.Label((preset.LoadOnStartup ? "<color=#F0C24F>* STARTUP</color> " : "") + (preset.AutoApplyOnSpawn ? "<color=#4FC76B>* AUTO</color> " : "") + Summary(preset), new GUIStyle(Theme.Hint) { richText = true }, Array.Empty<GUILayoutOption>()); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); if (GUILayout.Button("Apply now", Theme.Primary, Array.Empty<GUILayoutOption>())) { Cheats.Apply(preset); } if (GUILayout.Button(preset.AutoApplyOnSpawn ? "Auto-grant: ON" : "Auto-grant: OFF", preset.AutoApplyOnSpawn ? Theme.SwitchOn : Theme.SwitchOff, Array.Empty<GUILayoutOption>())) { preset.AutoApplyOnSpawn = !preset.AutoApplyOnSpawn; PresetStore.Save(); } Preset p = preset; if (GUILayout.Button("Export", Theme.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(72f) })) { ExportCode(p); } GUILayout.EndHorizontal(); if (_expanded == num) { DrawEditor(preset); } Widgets.SectionEnd(); } if (_pendingDelete != null) { PresetStore.Delete(_pendingDelete); _pendingDelete = null; _expanded = -1; } } private static void ExportCode(Preset p) { try { string s = JsonConvert.SerializeObject((object)p); GUIUtility.systemCopyBuffer = Convert.ToBase64String(Encoding.UTF8.GetBytes(s)); Notify.Push("Copied " + p.Name + " code to clipboard"); } catch (Exception ex) { Log.Error("Preset export failed: " + ex); Notify.Push("Export failed"); } } private static void ImportCode() { string text = (_importCode ?? "").Trim(); if (text.Length == 0) { return; } try { byte[] bytes = Convert.FromBase64String(text); Preset preset = JsonConvert.DeserializeObject<Preset>(Encoding.UTF8.GetString(bytes)); if (preset == null) { Notify.Push("Bad preset code"); return; } if (string.IsNullOrWhiteSpace(preset.Name)) { preset.Name = "Imported"; } PresetStore.Presets.Add(preset); PresetStore.Save(); _importCode = ""; Notify.Push("Imported preset: " + preset.Name); } catch (Exception ex) { Log.Error("Preset import failed: " + ex); Notify.Push("Bad preset code"); } } private static Preset NewEmpty(string name) { Preset preset = new Preset { Name = (string.IsNullOrWhiteSpace(name) ? ("Preset " + (PresetStore.Presets.Count + 1)) : name.Trim()) }; PresetStore.Presets.Add(preset); PresetStore.Save(); Notify.Push("Created preset: " + preset.Name); return preset; } private static void DrawEditor(Preset p) { Widgets.Header("Items granted on spawn"); Preset preset = p; Widgets.Button("+ Add item", delegate { ItemPicker.Open("Add item to " + preset.Name, delegate(ItemIndex idx) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) AddItem(preset, idx); }); }); if (p.Items.Count == 0 && p.Equipment.Count == 0 && !p.GiveAllItems) { Widgets.Hint("No items yet, click \"+ Add item\"."); } for (int num = p.Items.Count - 1; num >= 0; num--) { GrantItem grantItem = p.Items[num]; GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(string.IsNullOrEmpty(grantItem.Display) ? grantItem.Name : grantItem.Display, Theme.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); if (GUILayout.Button("-", Theme.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(24f) })) { grantItem.Count = Mathf.Max(1, grantItem.Count - 1); PresetStore.Save(); } GUILayout.Label("x" + grantItem.Count, Theme.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(38f) }); if (GUILayout.Button("+", Theme.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(24f) })) { grantItem.Count++; PresetStore.Save(); } if (GUILayout.Button("X", Theme.Danger_, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(24f) })) { p.Items.RemoveAt(num); PresetStore.Save(); } GUILayout.EndHorizontal(); } Widgets.PickerButton("+ Add equipment", "Add equipment to preset", BuildEquipRows(p)); for (int num2 = p.Equipment.Count - 1; num2 >= 0; num2--) { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(p.Equipment[num2], Theme.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); if (GUILayout.Button("X", Theme.Danger_, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(24f) })) { p.Equipment.RemoveAt(num2); PresetStore.Save(); } GUILayout.EndHorizontal(); } Tog("Give ALL items", ref p.GiveAllItems); Step("Gold", ref p.Money, 1000, 0, 1000000000); Step("XP", ref p.Xp, 100, 0, 1000000000); Step("Lunar coins", ref p.Coins, 5, 0, 100000); Widgets.Header("Features enabled on spawn"); Tog("God Mode", ref p.God); Tog("Infinite Skills", ref p.Skills); Tog("Silent Aim", ref p.SilentAim); Tog("Flight", ref p.Flight); Tog("Always Sprint", ref p.Sprint); Tog("Jump Pack", ref p.JumpPack); Tog("No Equipment Cooldown", ref p.NoEquipCd); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); if (GUILayout.Button("Copy current stat mults", Theme.Button, Array.Empty<GUILayoutOption>())) { CopyStats(p); PresetStore.Save(); } if (GUILayout.Button("Clear", Theme.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(56f) })) { ClearStats(p); PresetStore.Save(); } GUILayout.EndHorizontal(); Widgets.Hint(StatSummary(p)); Widgets.Header("Automation"); Tog("Auto-grant on spawn", ref p.AutoApplyOnSpawn); Widgets.Hint(p.AutoApplyOnSpawn ? "This preset runs automatically every time your character spawns." : "Off, use \"Apply now\" to run it manually."); Tog("Load on startup (your default)", ref p.LoadOnStartup); Widgets.Hint(p.LoadOnStartup ? "Applied once when you first load into a game each session, so this setup is always there when you reopen the game." : "Off. Turn on to make this your default setup that loads every time."); Widgets.Separator(); Widgets.ConfirmButton("preset.delete." + p.Name, "Delete this preset", delegate { _pendingDelete = p; }); } private static void Tog(string label, ref bool field) { bool flag = Widgets.Toggle(label, field); if (flag != field) { field = flag; PresetStore.Save(); } } private static void Step(string label, ref int field, int step, int min, int max) { int num = Widgets.IntStepper(label, field, step, min, max); if (num != field) { field = num; PresetStore.Save(); } } private static void AddItem(Preset p, ItemIndex idx) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) ItemDef def = ItemCatalog.GetItemDef(idx); if ((Object)(object)def == (Object)null) { return; } string name = ((Object)def).name; foreach (Catalogs.ItemEntry item in Catalogs.Items) { if (item.Index == idx) { name = item.Name; break; } } GrantItem grantItem = p.Items.Find((GrantItem g) => g.Name == ((Object)def).name); if (grantItem != null) { grantItem.Count++; } else { p.Items.Add(new GrantItem { Name = ((Object)def).name, Display = name, Count = 1 }); } PresetStore.Save(); Notify.Push("Added " + name); } private static List<ListPicker.Row> BuildEquipRows(Preset p) { //IL_005d: Unknown result type (might be due to invalid IL or missing references) List<ListPicker.Row> list = new List<ListPicker.Row>(Catalogs.Equipment.Count); foreach (Catalogs.EquipEntry item in Catalogs.Equipment) { Catalogs.EquipEntry e = item; list.Add(new ListPicker.Row(e.Name, e.Color, delegate { //IL_0006: Unknown result type (might be due to invalid IL or missing references) EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(e.Index); if ((Object)(object)equipmentDef != (Object)null && !p.Equipment.Contains(((Object)equipmentDef).name)) { p.Equipment.Add(((Object)equipmentDef).name); PresetStore.Save(); Notify.Push("Added " + e.Name); } })); } return list; } private static void CopyStats(Preset p) { p.DmgOn = StatsModule.DamageOn; p.AtkOn = StatsModule.AttackSpeedOn; p.MoveOn = StatsModule.MoveSpeedOn; p.ArmorOn = StatsModule.ArmorOn; p.CritOn = StatsModule.CritOn; p.HpOn = StatsModule.MaxHealthOn; p.DmgMul = StatsModule.DamageMult; p.AtkMul = StatsModule.AttackSpeedMult; p.MoveMul = StatsModule.MoveSpeedMult; p.ArmorMul = StatsModule.ArmorMult; p.CritMul = StatsModule.CritMult; p.HpMul = StatsModule.MaxHealthMult; } private static void ClearStats(Preset p) { p.DmgOn = (p.AtkOn = (p.MoveOn = (p.ArmorOn = (p.CritOn = (p.HpOn = false))))); } private static string StatSummary(Preset p) { List<string> list = new List<string>(); if (p.DmgOn) { list.Add($"Dmg x{p.DmgMul:0.#}"); } if (p.AtkOn) { list.Add($"Atk x{p.AtkMul:0.#}"); } if (p.MoveOn) { list.Add($"Move x{p.MoveMul:0.#}"); } if (p.ArmorOn) { list.Add($"Armor x{p.ArmorMul:0.#}"); } if (p.CritOn) { list.Add($"Crit x{p.CritMul:0.#}"); } if (p.HpOn) { list.Add($"HP x{p.HpMul:0.#}"); } if (list.Count != 0) { return "Stat multipliers: " + string.Join(", ", list); } return "Stat multipliers: none"; } private static string Summary(Preset p) { List<string> list = new List<string>(); int num = p.Items.Count + p.Equipment.Count; if (num > 0) { list.Add(num + ((num == 1) ? " item" : " items")); } if (p.GiveAllItems) { list.Add("all items"); } if (p.Money > 0 || p.Xp > 0 || p.Coins > 0) { list.Add("currency"); } if (p.God) { list.Add("God"); } if (p.Flight) { list.Add("Flight"); } if (p.SilentAim) { list.Add("Silent Aim"); } if (p.Skills) { list.Add("Skills"); } if (list.Count != 0) { return string.Join(" · ", list); } return "empty"; } } internal class RenderModule : PoppyModule { internal static bool EspMobs; internal static bool EspInteractables; internal static bool EspTeleporter; internal static bool ShowNames = true; internal static bool ShowDistance = true; internal static bool ShowEnemyHealth = true; internal static float MaxDistance; internal static float MarkerSize = 6f; internal static Color EnemyColor = Color.red; internal static Color InteractableColor = Color.cyan; internal static Color TeleporterColor = Color.yellow; private static GUIStyle _labelStyle; private static Color _styleColor = Color.clear; private static PurchaseInteraction[] _interactables = (PurchaseInteraction[])(object)new PurchaseInteraction[0]; private static float _nextScan; internal override string Name => "ESP"; internal override void Tick() { if (EspInteractables && Time.realtimeSinceStartup >= _nextScan) { _interactables = Object.FindObjectsOfType<PurchaseInteraction>(); _nextScan = Time.realtimeSinceStartup + 0.5f; } } internal override void DrawMenu() { //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: 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_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) Widgets.SectionBegin("ESP / Wallhack"); EspMobs = Widgets.Toggle("Enemies", EspMobs); EspInteractables = Widgets.Toggle("Interactables", EspInteractables); EspTeleporter = Widgets.Toggle("Teleporter", EspTeleporter); Widgets.Hint("Markers draw through walls while in a run."); Widgets.SectionEnd(); Widgets.SectionBegin("Display"); ShowNames = Widgets.Toggle("Show names", ShowNames); ShowDistance = Widgets.Toggle("Show distance", ShowDistance); ShowEnemyHealth = Widgets.Toggle("Show enemy health", ShowEnemyHealth); MaxDistance = Widgets.Slider("Max distance (0 = unlimited)", MaxDistance, 0f, 500f); MarkerSize = Widgets.Slider("Marker size", MarkerSize, 2f, 16f); Widgets.SectionEnd(); Widgets.SectionBegin("Colors"); EnemyColor = ColorRow("Enemies", EnemyColor); InteractableColor = ColorRow("Interactables", InteractableColor); TeleporterColor = ColorRow("Teleporter", TeleporterColor); Widgets.SectionEnd(); } private static Color ColorRow(string label, Color c) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) Widgets.Label(label); c.r = Widgets.Slider(" R", c.r, 0f, 1f); c.g = Widgets.Slider(" G", c.g, 0f, 1f); c.b = Widgets.Slider(" B", c.b, 0f, 1f); return c; } internal override void DrawOverlay() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to inva