using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BoneLib;
using BoneLib.BoneMenu;
using BoneLib.Notifications;
using GodMode;
using GodMode.Patches;
using HarmonyLib;
using Il2CppSLZ.Marrow;
using MelonLoader;
using Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: MelonInfo(typeof(GodModeMod), "God Mode", "1.0.0", "habibis_v on discord", null)]
[assembly: MelonGame("Stress Level Zero", "BONELAB")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("GodMode")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("GodMode")]
[assembly: AssemblyTitle("GodMode")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
}
namespace GodMode
{
public class GodModeMod : MelonMod
{
private static bool _built;
public override void OnInitializeMelon()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
new Harmony("com.habibis_v.godmode").PatchAll();
Hooking.OnUIRigCreated += BuildMenu;
((MelonBase)this).LoggerInstance.Msg("God Mode loaded.");
}
private static void BuildMenu()
{
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_005c: 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_00bc: Unknown result type (might be due to invalid IL or missing references)
//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
if (!_built)
{
_built = true;
Page val = Page.Root.CreatePage("God Mode", Color.yellow, 0, true);
val.CreateBool("God Mode", Color.yellow, false, (Action<bool>)delegate(bool v)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: 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_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: 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_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_0042: 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_0059: Expected O, but got Unknown
GodModePatch.Enabled = v;
Notifier.Send(new Notification
{
Title = NotificationText.op_Implicit("God Mode"),
Message = NotificationText.op_Implicit(v ? "You are invincible!" : "God Mode OFF"),
Type = (NotificationType)((!v) ? 1 : 3),
ShowTitleOnPopup = true,
PopupLength = 2f
});
});
val.CreateFunction("────────────────", Color.blue, (Action)delegate
{
});
val.CreateFunction("Add me on discord", Color.blue, (Action)delegate
{
});
val.CreateFunction("if you need help!", Color.blue, (Action)delegate
{
});
val.CreateFunction("Discord: habibis_v", Color.blue, (Action)delegate
{
});
}
}
}
}
namespace GodMode.Patches
{
[HarmonyPatch(typeof(Player_Health), "TAKEDAMAGE")]
public static class GodModePatch
{
public static bool Enabled { get; set; }
private static bool Prefix(Player_Health __instance)
{
if (!Enabled)
{
return true;
}
((Health)__instance).SetFullHealth();
return false;
}
}
}