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.8
repo_mod.dll
Decompiled a month 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 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: 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 bool isTumbling() { FieldInfo field = typeof(PlayerAvatar).GetField("isTumbling", BindingFlags.Instance | BindingFlags.NonPublic); return (bool)field.GetValue(pc.playerAvatarScript); } private void LateUpdate() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown(fly_mod_plug.key_toggle.Value)) { if (isTumbling()) { Dis(); } else if (fly) { Dis(); } else { En(); } } if (fly && isTumbling()) { Dis(); } else 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); } Quaternion rotation = rb.rotation; Vector3 eulerAngles = ((Quaternion)(ref rotation)).eulerAngles; rotation = aim.rotation; eulerAngles.y = ((Quaternion)(ref rotation)).eulerAngles.y; rb.rotation = Quaternion.Euler(eulerAngles); } } } namespace repo_mod; [BepInPlugin("dev.coolchair.REPOFly", "REPOFly", "1.0.7")] public class fly_mod_plug : BaseUnityPlugin { public const string pluginGuid = "dev.coolchair.REPOFly"; public const string pluginName = "REPOFly"; public const string pluginVersion = "1.0.7"; 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."); } }