Decompiled source of SpawnLoggerBypass v1.1.0

mod/fovchanger.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BoneLib.BoneMenu;
using FOVChanger;
using MelonLoader;
using MelonLoader.Preferences;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: MelonInfo(typeof(FOVChangerMod), "FOV Changer", "1.0.0", "nicebud", null)]
[assembly: MelonGame("Stress Level Zero", "BONELAB")]
[assembly: AssemblyTitle("armstretch")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("armstretch")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("8499ef9c-7a39-4309-88a0-ab764a503be2")]
[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")]
namespace FOVChanger;

public class FOVChangerMod : MelonMod
{
	private const float MIN_FOV = 40f;

	private const float MAX_FOV = 120f;

	private static readonly float[] INCREMENT_STEPS = new float[7] { 1f, 5f, 10f, 15f, 20f, 25f, 30f };

	private static float _defaultFov = 60f;

	private static bool _defaultFovCaptured = false;

	private static MelonPreferences_Category _prefsCategory;

	private static MelonPreferences_Entry<float> _fovEntry;

	private static FloatElement _fovSliderElement;

	private static float _currentIncrement = 1f;

	public override void OnInitializeMelon()
	{
		((MelonBase)this).LoggerInstance.Msg("========================================");
		((MelonBase)this).LoggerInstance.Msg("FOV Changer loaded!");
		((MelonBase)this).LoggerInstance.Msg("Credits: nicebud");
		((MelonBase)this).LoggerInstance.Msg("Creator: nicebud");
		((MelonBase)this).LoggerInstance.Msg("========================================");
		_prefsCategory = MelonPreferences.CreateCategory("FOVChanger");
		_fovEntry = _prefsCategory.CreateEntry<float>("FieldOfView", -1f, "Field of View", (string)null, false, false, (ValueValidator)null, (string)null);
		BuildMenu();
	}

	private void BuildMenu()
	{
		//IL_000a: 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_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_006f: 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_00a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_011c: Unknown result type (might be due to invalid IL or missing references)
		//IL_012e: Unknown result type (might be due to invalid IL or missing references)
		//IL_013f: Unknown result type (might be due to invalid IL or missing references)
		Page val = Page.Root.CreatePage("FOV Changer", Color.cyan, 0, true);
		_fovSliderElement = val.CreateFloat("Field of View", Color.white, _defaultFov, 1f, 40f, 120f, (Action<float>)OnFovChanged);
		val.CreateFunction("+ Increase FOV", Color.green, (Action)delegate
		{
			AdjustFov(_currentIncrement);
		});
		val.CreateFunction("- Decrease FOV", Color.red, (Action)delegate
		{
			AdjustFov(0f - _currentIncrement);
		});
		val.CreateFunction("Reset FOV to Default", Color.yellow, (Action)ResetFov);
		Page val2 = val.CreatePage("Increment Amount", Color.green, 0, true);
		float[] iNCREMENT_STEPS = INCREMENT_STEPS;
		foreach (float num2 in iNCREMENT_STEPS)
		{
			float capturedStep = num2;
			val2.CreateFunction("Set Increment: " + FormatStep(capturedStep), Color.green, (Action)delegate
			{
				SetIncrement(capturedStep);
			});
		}
		Page obj = val.CreatePage("Credits", Color.magenta, 0, true);
		obj.CreateFunction("Mod by: nicebud", Color.white, (Action)null);
		obj.CreateFunction("Creator: nicebud", Color.white, (Action)null);
	}

	private static string FormatStep(float step)
	{
		return step.ToString("0") + "°";
	}

	private void SetIncrement(float step)
	{
		_currentIncrement = step;
		((MelonBase)this).LoggerInstance.Msg("FOV increment set to " + step);
	}

	private void AdjustFov(float delta)
	{
		float value = Mathf.Clamp(((_fovEntry.Value >= 0f) ? _fovEntry.Value : _defaultFov) + delta, 40f, 120f);
		_fovEntry.Value = value;
		_prefsCategory.SaveToFile(false);
		ApplyFov(value);
		if (_fovSliderElement != null)
		{
			_fovSliderElement.Value = value;
		}
	}

	private void OnFovChanged(float newValue)
	{
		_fovEntry.Value = newValue;
		_prefsCategory.SaveToFile(false);
		ApplyFov(newValue);
	}

	private void ResetFov()
	{
		_fovEntry.Value = _defaultFov;
		_prefsCategory.SaveToFile(false);
		ApplyFov(_defaultFov);
		if (_fovSliderElement != null)
		{
			_fovSliderElement.Value = _defaultFov;
		}
		((MelonBase)this).LoggerInstance.Msg("FOV reset to Bonelab's default (" + _defaultFov + ")");
	}

	private void ApplyFov(float value)
	{
		Camera main = Camera.main;
		if ((Object)(object)main != (Object)null)
		{
			main.fieldOfView = value;
		}
	}

	private void TryCaptureDefaultFov()
	{
		if (_defaultFovCaptured)
		{
			return;
		}
		Camera main = Camera.main;
		if (!((Object)(object)main == (Object)null))
		{
			_defaultFov = main.fieldOfView;
			_defaultFovCaptured = true;
			if (_fovEntry.Value < 0f)
			{
				_fovEntry.Value = _defaultFov;
				_prefsCategory.SaveToFile(false);
			}
			if (_fovSliderElement != null)
			{
				_fovSliderElement.Value = _fovEntry.Value;
			}
			((MelonBase)this).LoggerInstance.Msg("Captured Bonelab's default FOV: " + _defaultFov);
		}
	}

	public override void OnUpdate()
	{
		if (!_defaultFovCaptured)
		{
			TryCaptureDefaultFov();
		}
		Camera main = Camera.main;
		if ((Object)(object)main != (Object)null && _fovEntry.Value >= 0f && Math.Abs(main.fieldOfView - _fovEntry.Value) > 0.01f)
		{
			main.fieldOfView = _fovEntry.Value;
		}
	}
}

mod/fullbright.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BoneLib.BoneMenu;
using FullbrightMod;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using MelonLoader;
using UnityEngine;
using UnityEngine.Rendering;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: MelonInfo(typeof(global::FullbrightMod.FullbrightMod), "Fullbright Toggle", "1.0.0", "bud", "https://github.com/yourname/FullbrightMod")]
[assembly: MelonGame("Stress Level Zero", "BONELAB")]
[assembly: AssemblyTitle("armstretch")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("armstretch")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("8499ef9c-7a39-4309-88a0-ab764a503be2")]
[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")]
namespace FullbrightMod;

public class FullbrightMod : MelonMod
{
	private class OriginalLightData
	{
		public float Intensity;

		public LightShadows Shadows;
	}

	private const KeyCode ToggleKey = (KeyCode)290;

	private bool _fullbrightEnabled;

	private readonly Dictionary<Light, OriginalLightData> _originalLights = new Dictionary<Light, OriginalLightData>();

	private float _originalAmbientIntensity;

	private Color _originalAmbientColor;

	private AmbientMode _originalAmbientMode;

	private BoolElement _menuToggle;

	public override void OnInitializeMelon()
	{
		((MelonBase)this).LoggerInstance.Msg("Fullbright Toggle mod loaded. Press F9 or use BoneMenu to toggle fullbright.");
		SetupBoneMenu();
	}

	private void SetupBoneMenu()
	{
		//IL_000a: 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)
		Page val = Page.Root.CreatePage("Fullbright Toggle", Color.yellow, 0, true);
		_menuToggle = val.CreateBool("Enabled", Color.white, _fullbrightEnabled, (Action<bool>)OnMenuToggled);
	}

	private void OnMenuToggled(bool value)
	{
		if (value != _fullbrightEnabled)
		{
			_fullbrightEnabled = value;
			if (_fullbrightEnabled)
			{
				EnableFullbright();
			}
			else
			{
				DisableFullbright();
			}
			((MelonBase)this).LoggerInstance.Msg("Fullbright " + (_fullbrightEnabled ? "ENABLED" : "disabled") + " (via BoneMenu)");
		}
	}

	public override void OnUpdate()
	{
		if (Input.GetKeyDown((KeyCode)290))
		{
			ToggleFullbright();
		}
	}

	private void ToggleFullbright()
	{
		_fullbrightEnabled = !_fullbrightEnabled;
		if (_fullbrightEnabled)
		{
			EnableFullbright();
		}
		else
		{
			DisableFullbright();
		}
		if (_menuToggle != null)
		{
			_menuToggle.Value = _fullbrightEnabled;
		}
		((MelonBase)this).LoggerInstance.Msg("Fullbright " + (_fullbrightEnabled ? "ENABLED" : "disabled"));
	}

	private void EnableFullbright()
	{
		//IL_0078: Unknown result type (might be due to invalid IL or missing references)
		//IL_007d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0083: Unknown result type (might be due to invalid IL or missing references)
		//IL_0088: Unknown result type (might be due to invalid IL or missing references)
		//IL_0093: Unknown result type (might be due to invalid IL or missing references)
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_0046: Unknown result type (might be due to invalid IL or missing references)
		_originalLights.Clear();
		Light[] array = Il2CppArrayBase<Light>.op_Implicit(Object.FindObjectsOfType<Light>());
		foreach (Light val in array)
		{
			if (!((Object)(object)val == (Object)null))
			{
				_originalLights[val] = new OriginalLightData
				{
					Intensity = val.intensity,
					Shadows = val.shadows
				};
				val.intensity = 3f;
				val.shadows = (LightShadows)0;
			}
		}
		_originalAmbientIntensity = RenderSettings.ambientIntensity;
		_originalAmbientColor = RenderSettings.ambientLight;
		_originalAmbientMode = RenderSettings.ambientMode;
		RenderSettings.ambientMode = (AmbientMode)3;
		RenderSettings.ambientLight = Color.white;
		RenderSettings.ambientIntensity = 1.5f;
	}

	private void DisableFullbright()
	{
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_0070: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		foreach (KeyValuePair<Light, OriginalLightData> originalLight in _originalLights)
		{
			Light key = originalLight.Key;
			if (!((Object)(object)key == (Object)null))
			{
				key.intensity = originalLight.Value.Intensity;
				key.shadows = originalLight.Value.Shadows;
			}
		}
		_originalLights.Clear();
		RenderSettings.ambientMode = _originalAmbientMode;
		RenderSettings.ambientLight = _originalAmbientColor;
		RenderSettings.ambientIntensity = _originalAmbientIntensity;
	}

	public override void OnSceneWasLoaded(int buildIndex, string sceneName)
	{
		if (_fullbrightEnabled)
		{
			EnableFullbright();
		}
	}

	public override void OnDeinitializeMelon()
	{
		if (_fullbrightEnabled)
		{
			DisableFullbright();
		}
	}
}

mod/SpawnLoggerBypass.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using MelonLoader;
using MelonLoader.Preferences;
using SpawnLoggerBypass;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: MelonInfo(typeof(SpawnLoggerBypassMod), "Spawn Logger Bypass", "1.0.0", "nicebud", null)]
[assembly: MelonGame("Stress Level Zero", "BONELAB")]
[assembly: AssemblyTitle("armstretch")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("armstretch")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("8499ef9c-7a39-4309-88a0-ab764a503be2")]
[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")]
namespace SpawnLoggerBypass;

public class SpawnLoggerBypassMod : MelonMod
{
	private static bool _bypassActive;

	private static MelonPreferences_Entry<bool> _prefBypass;

	private static Type _spawnLoggerType;

	private static FieldInfo _enabledField;

	private static PropertyInfo _enabledProperty;

	public override void OnInitializeMelon()
	{
		_prefBypass = MelonPreferences.CreateEntry<bool>("SpawnLoggerBypass", "BypassEnabled", false, "Enable Spawn Logger Bypass", (string)null, false, false, (ValueValidator)null);
		((MelonBase)this).LoggerInstance.Msg("========================================");
		((MelonBase)this).LoggerInstance.Msg("Spawn Logger Bypass by nicebud");
		((MelonBase)this).LoggerInstance.Msg("========================================");
		FindSpawnLoggerMod();
		_bypassActive = _prefBypass.Value;
		if (_bypassActive)
		{
			EnableBypass();
		}
		((MelonBase)this).LoggerInstance.Msg("Bypass is currently " + (IsBypassActive() ? "ACTIVE" : "INACTIVE"));
		((MelonBase)this).LoggerInstance.Msg("Press F8 to toggle bypass");
		((MelonBase)this).LoggerInstance.Msg("Press F9 to check status");
	}

	public override void OnUpdate()
	{
		if (Input.GetKeyDown((KeyCode)289))
		{
			ToggleBypass();
		}
		if (Input.GetKeyDown((KeyCode)290))
		{
			CheckLoggerStatus();
		}
		if (!_bypassActive || !(_spawnLoggerType != null))
		{
			return;
		}
		try
		{
			bool? flag = null;
			if (_enabledProperty != null && _enabledProperty.CanRead)
			{
				flag = (bool?)_enabledProperty.GetValue(null);
			}
			else if (_enabledField != null)
			{
				flag = (bool?)_enabledField.GetValue(null);
			}
			if (flag == true)
			{
				((MelonBase)this).LoggerInstance.Warning("Spawn Logger was re-enabled! Re-applying bypass...");
				if (_enabledProperty != null && _enabledProperty.CanWrite)
				{
					_enabledProperty.SetValue(null, false);
				}
				else if (_enabledField != null)
				{
					_enabledField.SetValue(null, false);
				}
			}
		}
		catch
		{
		}
	}

	private void FindSpawnLoggerMod()
	{
		try
		{
			foreach (MelonMod registeredMelon in MelonTypeBase<MelonMod>.RegisteredMelons)
			{
				if (!((MelonBase)registeredMelon).Info.Name.Contains("SpawnLogger") && !((MelonBase)registeredMelon).Info.Name.Contains("Spawn Logger"))
				{
					continue;
				}
				_spawnLoggerType = ((object)registeredMelon).GetType();
				((MelonBase)this).LoggerInstance.Msg("Found Spawn Logger mod: " + ((MelonBase)registeredMelon).Info.Name);
				_enabledProperty = _spawnLoggerType.GetProperty("IsEnabled", BindingFlags.Static | BindingFlags.Public);
				if (_enabledProperty != null && _enabledProperty.CanWrite)
				{
					((MelonBase)this).LoggerInstance.Msg("Found IsEnabled property");
					break;
				}
				_enabledField = _spawnLoggerType.GetField("_isEnabled", BindingFlags.Static | BindingFlags.NonPublic);
				if (_enabledField == null)
				{
					_enabledField = _spawnLoggerType.GetField("IsEnabled", BindingFlags.Static | BindingFlags.Public);
				}
				if (_enabledField != null)
				{
					((MelonBase)this).LoggerInstance.Msg("Found IsEnabled field");
				}
				break;
			}
			if (_spawnLoggerType == null)
			{
				((MelonBase)this).LoggerInstance.Warning("Spawn Logger mod not found!");
			}
		}
		catch (Exception ex)
		{
			((MelonBase)this).LoggerInstance.Error("Error finding Spawn Logger mod: " + ex.Message);
		}
	}

	private void ToggleBypass()
	{
		_bypassActive = !_bypassActive;
		_prefBypass.Value = _bypassActive;
		if (_bypassActive)
		{
			EnableBypass();
			((MelonBase)this).LoggerInstance.Msg("Bypass ENABLED - Spawn Logger is disabled");
		}
		else
		{
			DisableBypass();
			((MelonBase)this).LoggerInstance.Msg("Bypass DISABLED - Spawn Logger is enabled");
		}
	}

	private void EnableBypass()
	{
		if (_spawnLoggerType == null)
		{
			((MelonBase)this).LoggerInstance.Error("Spawn Logger mod not found!");
			return;
		}
		try
		{
			if (_enabledProperty != null && _enabledProperty.CanWrite)
			{
				_enabledProperty.SetValue(null, false);
			}
			else if (_enabledField != null)
			{
				_enabledField.SetValue(null, false);
			}
			((MelonBase)this).LoggerInstance.Msg("Bypass applied!");
		}
		catch (Exception ex)
		{
			((MelonBase)this).LoggerInstance.Error("Failed to enable bypass: " + ex.Message);
		}
	}

	private void DisableBypass()
	{
		if (_spawnLoggerType == null)
		{
			((MelonBase)this).LoggerInstance.Error("Spawn Logger mod not found!");
			return;
		}
		try
		{
			if (_enabledProperty != null && _enabledProperty.CanWrite)
			{
				_enabledProperty.SetValue(null, true);
			}
			else if (_enabledField != null)
			{
				_enabledField.SetValue(null, true);
			}
			((MelonBase)this).LoggerInstance.Msg("Bypass removed!");
		}
		catch (Exception ex)
		{
			((MelonBase)this).LoggerInstance.Error("Failed to disable bypass: " + ex.Message);
		}
	}

	private void CheckLoggerStatus()
	{
		if (_spawnLoggerType == null)
		{
			((MelonBase)this).LoggerInstance.Error("Spawn Logger mod not found!");
			return;
		}
		try
		{
			bool? flag = null;
			if (_enabledProperty != null && _enabledProperty.CanRead)
			{
				flag = (bool?)_enabledProperty.GetValue(null);
			}
			else if (_enabledField != null)
			{
				flag = (bool?)_enabledField.GetValue(null);
			}
			((MelonBase)this).LoggerInstance.Msg("Spawn Logger Status:");
			((MelonBase)this).LoggerInstance.Msg("  - IsEnabled: " + (flag?.ToString() ?? "Unknown"));
			((MelonBase)this).LoggerInstance.Msg($"  - Bypass Active: {_bypassActive}");
			((MelonBase)this).LoggerInstance.Msg((flag == false || _bypassActive) ? "⚠\ufe0f Logger is DISABLED" : "✅ Logger is ENABLED");
		}
		catch (Exception ex)
		{
			((MelonBase)this).LoggerInstance.Error("Error checking status: " + ex.Message);
		}
	}

	public static bool IsBypassActive()
	{
		return _bypassActive;
	}
}