using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Mirror;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("BigRun")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("BigRun")]
[assembly: AssemblyTitle("BigRun")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace bigrun
{
[BepInPlugin("bayturtleking.bigwalk.bigrun", "Big Run", "1.0.3")]
public class runnnnnnn : BasePlugin
{
internal static ManualLogSource logsource;
internal static ConfigEntry<KeyCode> keytotoggle;
internal static ConfigEntry<float> howmuchfaster;
internal static ConfigEntry<float> howmuchhigher;
public override void Load()
{
//IL_0079: Unknown result type (might be due to invalid IL or missing references)
logsource = ((BasePlugin)this).Log;
keytotoggle = ((BasePlugin)this).Config.Bind<KeyCode>("General", "keytotoggle", (KeyCode)106, "the key that toggles the mod off/on");
howmuchfaster = ((BasePlugin)this).Config.Bind<float>("General", "speed-multiplier", 6f, "how many times faster movement becomes when toggled on");
howmuchhigher = ((BasePlugin)this).Config.Bind<float>("General", "jump-multiplier", 6f, "how many times stronger jumping becomes when toggled on");
new Harmony("bayturtleking.bigwalk.bigrun").PatchAll();
logsource.LogInfo((object)"big run loaded");
}
}
[HarmonyPatch(typeof(PlayerCharacter), "Update")]
public static class bigrunner
{
private static bool havegamersups;
private static float oldforward;
private static float oldforwardsprint;
private static float oldforwardscrouch;
private static float oldforwardcrouchsprint;
private static float oldforwardswim;
private static float oldforwardswimsprint;
private static float oldjump;
private static float oldmaxup;
[HarmonyPostfix]
private static void Postfix(PlayerCharacter __instance)
{
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)__instance == (Object)null || !((NetworkBehaviour)__instance).isLocalPlayer || !Input.GetKeyDown(runnnnnnn.keytotoggle.Value))
{
return;
}
PlayerTunings tunings = __instance.tunings;
if (tunings != null)
{
havegamersups = !havegamersups;
if (havegamersups)
{
oldforward = tunings.forwardSpeed;
oldforwardsprint = tunings.forwardSprintSpeed;
oldforwardscrouch = tunings.crouchForwardSpeed;
oldforwardcrouchsprint = tunings.crouchForwardSprintSpeed;
oldforwardswim = tunings.swimForwardSpeed;
oldforwardswimsprint = tunings.swimForwardSprintSpeed;
oldjump = tunings.jumpForce;
oldmaxup = tunings.maxUpwardsVelocity;
tunings.forwardSpeed = oldforward * runnnnnnn.howmuchfaster.Value;
tunings.forwardSprintSpeed = oldforwardsprint * runnnnnnn.howmuchfaster.Value;
tunings.crouchForwardSpeed = oldforwardscrouch * runnnnnnn.howmuchfaster.Value;
tunings.crouchForwardSprintSpeed = oldforwardcrouchsprint * runnnnnnn.howmuchfaster.Value;
tunings.swimForwardSpeed = oldforwardswim * runnnnnnn.howmuchfaster.Value;
tunings.swimForwardSprintSpeed = oldforwardswimsprint * runnnnnnn.howmuchfaster.Value;
tunings.jumpForce = oldjump * runnnnnnn.howmuchhigher.Value;
tunings.maxUpwardsVelocity = oldmaxup * runnnnnnn.howmuchhigher.Value;
runnnnnnn.logsource.LogInfo((object)"turned big run on");
}
else
{
tunings.forwardSpeed = oldforward;
tunings.forwardSprintSpeed = oldforwardsprint;
tunings.crouchForwardSpeed = oldforwardscrouch;
tunings.crouchForwardSprintSpeed = oldforwardcrouchsprint;
tunings.swimForwardSpeed = oldforwardswim;
tunings.swimForwardSprintSpeed = oldforwardswimsprint;
tunings.jumpForce = oldjump;
tunings.maxUpwardsVelocity = oldmaxup;
runnnnnnn.logsource.LogInfo((object)"turned big run off.");
}
}
}
}
}