using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using TMPro;
using UnityEngine;
using UnityEngine.SceneManagement;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Custom_Death_Message")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Custom_Death_Message")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("afe4570b-5ffb-4298-b49c-568066f0a78d")]
[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 CustomDeathMessage;
[BepInPlugin("com.AquaEther.CustomDeathMessage", "CustomDeathMessage", "1.0.0")]
public class CustomDeathMessagePlugin : BaseUnityPlugin
{
public TextMeshProUGUI script;
public bool textSwitch;
private const string MyGUID = "com.AquaEther.CustomDeathMessage";
private const string PluginName = "CustomDeathMessage";
private const string VersionString = "1.0.0";
public static ManualLogSource Log = new ManualLogSource("CustomDeathMessage");
public ConfigEntry<string> fortnite;
public void Awake()
{
fortnite = ((BaseUnityPlugin)this).Config.Bind<string>("General", "DeathText", "<color=orange>WARNING: EXTREME BRAIN DAMAGE SUSTAINED.</color>\r\n<color=orange>BUYING PROPERTY IN EGYPT</color>\r\nERROR: HAWK TUAH MODULE #1 NOT RESPONDING\r\nERROR: HAWK TUAH MODULE #2 NOT RESPONDING\r\n<color=orange>WARNING: SIGMA SYSTEMS INOPERABLE</color>\r\n<color=orange>ATTEMPTING RECONSTRUCTION (WHAT?!?)</color>\r\nERROR: THE FUCKING MIMIC NOT RESPONDING\r\nINSUFFICIENT MANGO.\r\nINSUFFICIENT MANGO.\r\n<color=orange>INITIATING RIZZLER PROTOCOL</color>\r\n<color=orange>ATTEMPTING CONNECTION WITH KAI CENAT</color>\r\nERROR: GOON CORE MODULE #1 NOT RESPONDING\r\nERROR: GOON CORE MODULE #2 NOT RESPONDING\r\n<color=orange>WARNING: UNABLE TO PLAY THESE GAMES BEFORE</color>\r\nERROR: VISUAL LOOKSMAXX MALFUNCTION\r\nERROR: CHOPPED CHIN NOT RESPONDING\r\nINSUFFICIENT MANGO.\r\nINSUFFICIENT MANGO.\r\n<color=orange>WARNING: UNABLE TO SUSTAIN SKIBIDI TOILETS</color>\r\n! AURA FAILURE !\r\n! AURA FAILURE !\r\n! AURA FAILURE !\r\n-!- CRASHOUT IMMINENT -!-\r\nERROR: NO FATHER DETECTED, UNABLE TO ANSWER QUESTION\r\n! MUSTAAAARD !\r\n! MUSTAAAARD !\r\nINSUFFICIENT STILLWATER.\r\nINSUFFICIENT STILLWATER.\r\n<color=orange>WARNING: THOSE UNABLE TO KNOW :SKULL:</color>\r\n-!- CRASHOUT IMMINENT -!-\r\n-!- CRASHOUT IMMINENT -!-\r\nTS PMO ICL.\r\nTS PMO ICL.\r\nTS PMO ICL.\r\nTS PMO ICL.\r\nTS PMO ICL.\r\nTS PMO ICL.\r\nTS PMO ICL.\r\nTS PMO ICL.", "The text on the left of the screen when you die");
((BaseUnityPlugin)this).Logger.LogInfo((object)"PluginName: CustomDeathMessage, VersionString: 1.0.0 is loaded.");
Log = ((BaseUnityPlugin)this).Logger;
SceneManager.sceneLoaded -= OnSceneLoaded;
SceneManager.sceneLoaded += OnSceneLoaded;
}
public void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
if (((Scene)(ref scene)).name == "b3e7f2f8052488a45b35549efb98d902")
{
((BaseUnityPlugin)this).Logger.LogInfo((object)"menu = no death");
return;
}
DeathSequence[] array = Object.FindObjectsOfType<DeathSequence>(true);
if (array.Length >= 1)
{
TextMeshProUGUI componentInChildren = ((Component)((Component)array.First()).transform).GetComponentInChildren<TextMeshProUGUI>();
if ((Object)(object)componentInChildren != (Object)null)
{
script = ((Component)componentInChildren).GetComponent<TextMeshProUGUI>();
}
((TMP_Text)script).text = fortnite.Value;
}
}
}