Decompiled source of Free Fly v2.0.0

ClassLibrary3.dll

Decompiled 3 hours ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("ClassLibrary3")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ClassLibrary3")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("ed0f187d-88d0-45c9-b28c-b900defca557")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
[BepInPlugin("com.user.goi.simplenoclip", "Simple Noclip", "1.1.0")]
public class NoclipPlugin : BaseUnityPlugin
{
	private bool noclip = false;

	private float speed = 25f;

	private void Update()
	{
		//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_010d: Unknown result type (might be due to invalid IL or missing references)
		//IL_010f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0114: Unknown result type (might be due to invalid IL or missing references)
		//IL_0119: Unknown result type (might be due to invalid IL or missing references)
		//IL_0128: Unknown result type (might be due to invalid IL or missing references)
		//IL_012a: Unknown result type (might be due to invalid IL or missing references)
		//IL_012f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0134: 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_0145: Unknown result type (might be due to invalid IL or missing references)
		//IL_014a: Unknown result type (might be due to invalid IL or missing references)
		//IL_014f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0174: Unknown result type (might be due to invalid IL or missing references)
		//IL_0179: Unknown result type (might be due to invalid IL or missing references)
		//IL_0181: Unknown result type (might be due to invalid IL or missing references)
		//IL_018b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0190: Unknown result type (might be due to invalid IL or missing references)
		//IL_015e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0160: Unknown result type (might be due to invalid IL or missing references)
		//IL_0165: Unknown result type (might be due to invalid IL or missing references)
		//IL_016a: 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_01be: 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_01de: Unknown result type (might be due to invalid IL or missing references)
		if (Input.GetKeyDown((KeyCode)114))
		{
			noclip = !noclip;
			GameObject val = GameObject.Find("Player");
			if ((Object)(object)val != (Object)null)
			{
				Rigidbody2D component = val.GetComponent<Rigidbody2D>();
				component.gravityScale = (noclip ? 0f : 1.5f);
				if (noclip)
				{
					component.Sleep();
				}
				else
				{
					component.WakeUp();
				}
				Collider2D[] componentsInChildren = val.GetComponentsInChildren<Collider2D>();
				foreach (Collider2D val2 in componentsInChildren)
				{
					((Behaviour)val2).enabled = !noclip;
				}
			}
			((BaseUnityPlugin)this).Logger.LogInfo((object)("Noclip: " + noclip));
		}
		if (!noclip)
		{
			return;
		}
		GameObject val3 = GameObject.Find("Player");
		if ((Object)(object)val3 != (Object)null)
		{
			Vector3 val4 = Vector3.zero;
			if (Input.GetKey((KeyCode)119))
			{
				val4 += Vector3.up;
			}
			if (Input.GetKey((KeyCode)115))
			{
				val4 += Vector3.down;
			}
			if (Input.GetKey((KeyCode)97))
			{
				val4 += Vector3.left;
			}
			if (Input.GetKey((KeyCode)100))
			{
				val4 += Vector3.right;
			}
			Transform transform = val3.transform;
			transform.position += val4 * speed * Time.deltaTime;
			if ((Object)(object)Camera.main != (Object)null)
			{
				((Component)Camera.main).transform.position = new Vector3(val3.transform.position.x, val3.transform.position.y, -10f);
			}
			val3.GetComponent<Rigidbody2D>().velocity = Vector2.zero;
		}
	}
}