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 REPOFly v1.0.6
repo_mod.dll
Decompiled a day agousing System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using HarmonyLib; using UnityEngine; using repo_mod; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("repo_mod")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("repo_mod")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("af5e0028-8f89-49a8-bb71-afc8717cafab")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] public class FlyBehavior : MonoBehaviour { public bool is_thumbling = false; public float sprint_mod = 2f; public float base_mod = 3f; private bool fly = false; private Transform aim; private Rigidbody rb; private PlayerController pc; private float mathSprint() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKey(fly_mod_plug.key_faster.Value)) { return fly_mod_plug.fly_fast_speed.Value; } return 1f; } private void apply(Vector3 vec) { //IL_0007: 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) //IL_0013: 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_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) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) Vector3 position = rb.position; rb.position = new Vector3(position.x + vec.x * Time.deltaTime * fly_mod_plug.fly_normal_speed.Value * mathSprint(), position.y + vec.y * Time.deltaTime * fly_mod_plug.fly_normal_speed.Value * mathSprint(), position.z + vec.z * Time.deltaTime * fly_mod_plug.fly_normal_speed.Value * mathSprint()); } public void Dis() { fly = false; rb.isKinematic = fly; ((Behaviour)pc).enabled = !fly; } public void En() { fly = true; rb.isKinematic = fly; ((Behaviour)pc).enabled = !fly; } private void Awake() { aim = ((Component)this).gameObject.GetComponent<PlayerController>().cameraGameObject.GetComponent<Transform>(); rb = ((Component)this).gameObject.GetComponent<Rigidbody>(); pc = ((Component)this).gameObject.GetComponent<PlayerController>(); Debug.Log((object)"Fly created!"); } private void OnGUI() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown if (fly_mod_plug.showStatus.Value && fly) { GUI.Label(new Rect((float)(Screen.width / 2 - 100), (float)(Screen.height / 4 * 3), 200f, 50f), new GUIContent(fly_mod_plug.statusString.Value)); } } private void LateUpdate() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown(fly_mod_plug.key_toggle.Value)) { if (is_thumbling) { Dis(); } else { fly = !fly; rb.isKinematic = fly; ((Behaviour)pc).enabled = !fly; } } if (fly) { if (Input.GetKey(fly_mod_plug.key_forward.Value)) { apply(aim.forward); } if (Input.GetKey(fly_mod_plug.key_back.Value)) { apply(-aim.forward); } if (Input.GetKey(fly_mod_plug.key_left.Value)) { apply(-aim.right); } if (Input.GetKey(fly_mod_plug.key_right.Value)) { apply(aim.right); } if (Input.GetKey(fly_mod_plug.key_up.Value)) { apply(new Vector3(0f, 1f, 0f)); } if (Input.GetKey(fly_mod_plug.key_down.Value)) { apply(new Vector3(0f, -1f, 0f)); } if (Input.GetKey(fly_mod_plug.key_up_camera.Value)) { apply(aim.up); } if (Input.GetKey(fly_mod_plug.key_down_camera.Value)) { apply(-aim.up); } } } } namespace repo_mod; [BepInPlugin("dev.coolchair.REPOFly", "REPOFly", "1.0.6.0")] public class fly_mod_plug : BaseUnityPlugin { public const string pluginGuid = "dev.coolchair.REPOFly"; public const string pluginName = "REPOFly"; public const string pluginVersion = "1.0.6.0"; public static ConfigEntry<float> fly_normal_speed; public static ConfigEntry<float> fly_fast_speed; public static ConfigEntry<KeyCode> key_toggle; public static ConfigEntry<KeyCode> key_forward; public static ConfigEntry<KeyCode> key_back; public static ConfigEntry<KeyCode> key_right; public static ConfigEntry<KeyCode> key_left; public static ConfigEntry<KeyCode> key_up; public static ConfigEntry<KeyCode> key_down; public static ConfigEntry<KeyCode> key_up_camera; public static ConfigEntry<KeyCode> key_down_camera; public static ConfigEntry<KeyCode> key_faster; public static ConfigEntry<bool> showStatus; public static ConfigEntry<string> statusString; public void Awake() { //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Expected O, but got Unknown fly_normal_speed = ((BaseUnityPlugin)this).Config.Bind<float>("Speed", "NormalSpeed", 3f, (ConfigDescription)null); fly_fast_speed = ((BaseUnityPlugin)this).Config.Bind<float>("Speed", "FasterModifier", 2f, (ConfigDescription)null); key_toggle = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Binds", "Toggle", (KeyCode)118, (ConfigDescription)null); key_faster = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Binds", "Faster", (KeyCode)304, (ConfigDescription)null); key_forward = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Binds", "Forward", (KeyCode)119, (ConfigDescription)null); key_back = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Binds", "Back", (KeyCode)115, (ConfigDescription)null); key_right = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Binds", "Right", (KeyCode)100, (ConfigDescription)null); key_left = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Binds", "Left", (KeyCode)97, (ConfigDescription)null); key_up = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Binds", "Up", (KeyCode)32, (ConfigDescription)null); key_down = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Binds", "Down", (KeyCode)306, (ConfigDescription)null); key_up_camera = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Binds", "CameraUp", (KeyCode)101, (ConfigDescription)null); key_down_camera = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Binds", "CameraDown", (KeyCode)113, (ConfigDescription)null); showStatus = ((BaseUnityPlugin)this).Config.Bind<bool>("UI", "ShowStatus", true, (ConfigDescription)null); statusString = ((BaseUnityPlugin)this).Config.Bind<string>("UI", "StatusText", "REPOFly enabled!", (ConfigDescription)null); Harmony val = new Harmony("dev.coolchair.REPOFly"); val.PatchAll(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Hello by chair6798!"); } } [HarmonyPatch(typeof(PlayerController), "Start")] public class FlyPatcher { private static void Postfix(PlayerController __instance) { ((Component)__instance).gameObject.AddComponent<FlyBehavior>(); Debug.Log((object)"Fly component added to PlayerController."); } } [HarmonyPatch(typeof(PlayerAvatar))] public class acttumblePatcher { [HarmonyPatch("TumbleStart")] [HarmonyPostfix] private static void StartPostfix(PlayerAvatar __instance) { if ((Object)(object)GameObject.Find("Controller").GetComponent<PlayerController>().playerAvatarScript == (Object)(object)__instance) { GameObject.Find("Controller").GetComponent<FlyBehavior>().Dis(); GameObject.Find("Controller").GetComponent<FlyBehavior>().is_thumbling = true; Debug.Log((object)"Player tumbled! Disabling fly!"); } } [HarmonyPatch("TumbleStop")] [HarmonyPostfix] private static void Postfix(PlayerAvatar __instance) { if ((Object)(object)GameObject.Find("Controller").GetComponent<PlayerController>().playerAvatarScript == (Object)(object)__instance) { GameObject.Find("Controller").GetComponent<FlyBehavior>().is_thumbling = false; Debug.Log((object)"Player unthumb! Disabling value!"); } } }