using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppSystem;
using Il2CppSystem.Reflection;
using MelonLoader;
using Microsoft.CodeAnalysis;
using ScottModMenu;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: MelonInfo(typeof(ModMenu), "Scott's Mod Menu", "1.0.0", "Scott", null)]
[assembly: MelonGame("The Sledding Corporation", "Sledding Game")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("ScottModMenu")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("ScottModMenu")]
[assembly: AssemblyTitle("ScottModMenu")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.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 ScottModMenu
{
public class ModMenu : MelonMod
{
private struct SavedPos
{
public Vector3 pos;
public string name;
}
private bool _showMenu;
private int _currentTab;
private readonly string[] _tabs = new string[4] { "Player", "Teleport", "Fun", "Info" };
private Rect _windowRect = new Rect(30f, 30f, 420f, 520f);
private Vector2 _scrollPos = Vector2.zero;
private bool _speedHack;
private float _speedMult = 2f;
private bool _superJump;
private float _jumpMult = 3f;
private bool _flyMode;
private float _flySpeed = 20f;
private bool _noClip;
private bool _godMode;
private bool _freeze;
private List<SavedPos> _savedPositions = new List<SavedPos>();
private string _posName = "Spot";
private bool _bigHead;
private float _playerScale = 1f;
private bool _moonGravity;
private GameObject _localPlayer;
private Transform _playerTransform;
private Camera _mainCam;
private List<Rigidbody> _flyRBs = new List<Rigidbody>();
private List<bool> _flyRBStates = new List<bool>();
private List<Behaviour> _flySuspended = new List<Behaviour>();
private GUIStyle _windowStyle;
private GUIStyle _tabActiveStyle;
private GUIStyle _tabInactiveStyle;
private GUIStyle _toggleOnStyle;
private GUIStyle _toggleOffStyle;
private GUIStyle _headerStyle;
private GUIStyle _labelStyle;
private GUIStyle _btnStyle;
private GUIStyle _sliderThumb;
private GUIStyle _sliderBg;
private GUIStyle _textFieldStyle;
private Texture2D _bgTex;
private Texture2D _darkTex;
private Texture2D _accentTex;
private Texture2D _accentDarkTex;
private Texture2D _redTex;
private Texture2D _greenTex;
private Texture2D _headerTex;
private bool _stylesBuilt;
public override void OnInitializeMelon()
{
((MelonBase)this).LoggerInstance.Msg("Scott's Mod Menu loaded — press INSERT to toggle.");
}
public override void OnUpdate()
{
if (Input.GetKeyDown((KeyCode)277))
{
_showMenu = !_showMenu;
((MelonBase)this).LoggerInstance.Msg(_showMenu ? "Menu opened" : "Menu closed");
}
RefreshPlayerRef();
if ((Object)(object)_localPlayer != (Object)null && (Object)(object)_playerTransform != (Object)null)
{
if (_flyMode)
{
HandleFly();
}
if (_speedHack)
{
HandleSpeed();
}
}
}
public override void OnGUI()
{
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
if (_showMenu)
{
BuildStyles();
_windowRect = GUI.Window(9831, _windowRect, WindowFunction.op_Implicit((Action<int>)DrawWindow), "", _windowStyle);
}
}
private void RefreshPlayerRef()
{
if ((Object)(object)_localPlayer != (Object)null)
{
return;
}
try
{
GameObject val = GameObject.Find("Player Networked(Clone)");
if ((Object)(object)val != (Object)null)
{
_localPlayer = val;
_playerTransform = val.transform;
}
_mainCam = Camera.main;
}
catch
{
}
}
private void DrawWindow(int id)
{
//IL_0014: 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_0101: Unknown result type (might be due to invalid IL or missing references)
//IL_0146: Unknown result type (might be due to invalid IL or missing references)
//IL_0152: Unknown result type (might be due to invalid IL or missing references)
//IL_0158: Unknown result type (might be due to invalid IL or missing references)
//IL_015d: Unknown result type (might be due to invalid IL or missing references)
//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
GUI.Label(new Rect(15f, 5f, 390f, 30f), "★ SCOTT'S MOD MENU ★", _headerStyle);
GUI.Label(new Rect(15f, 28f, 390f, 18f), "Sledding Game • v1.0.0 • INSERT to toggle", _labelStyle);
float num = 52f;
float num2 = (((Rect)(ref _windowRect)).width - 30f) / (float)_tabs.Length;
for (int i = 0; i < _tabs.Length; i++)
{
GUIStyle val = ((i == _currentTab) ? _tabActiveStyle : _tabInactiveStyle);
if (GUI.Button(new Rect(15f + (float)i * num2, num, num2, 28f), _tabs[i], val))
{
_currentTab = i;
}
}
Rect val2 = default(Rect);
((Rect)(ref val2))..ctor(10f, 88f, ((Rect)(ref _windowRect)).width - 20f, ((Rect)(ref _windowRect)).height - 98f);
GUI.Box(val2, "", _windowStyle);
GUILayout.BeginArea(new Rect(((Rect)(ref val2)).x + 5f, ((Rect)(ref val2)).y + 5f, ((Rect)(ref val2)).width - 10f, ((Rect)(ref val2)).height - 10f));
_scrollPos = GUILayout.BeginScrollView(_scrollPos, (Il2CppReferenceArray<GUILayoutOption>)null);
switch (_currentTab)
{
case 0:
DrawPlayerTab();
break;
case 1:
DrawTeleportTab();
break;
case 2:
DrawFunTab();
break;
case 3:
DrawInfoTab();
break;
}
GUILayout.EndScrollView();
GUILayout.EndArea();
GUI.DragWindow(new Rect(0f, 0f, ((Rect)(ref _windowRect)).width, 50f));
}
private void DrawPlayerTab()
{
SectionHeader("Movement");
_speedHack = DrawToggle("Speed Hack", _speedHack);
if (_speedHack)
{
GUILayout.BeginHorizontal((Il2CppReferenceArray<GUILayoutOption>)null);
GUILayout.Label($" Multiplier: {_speedMult:F1}x", _labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) });
_speedMult = GUILayout.HorizontalSlider(_speedMult, 1f, 10f, Array.Empty<GUILayoutOption>());
GUILayout.EndHorizontal();
GUILayout.Space(4f);
}
_superJump = DrawToggle("Super Jump", _superJump);
if (_superJump)
{
GUILayout.BeginHorizontal((Il2CppReferenceArray<GUILayoutOption>)null);
GUILayout.Label($" Jump Force: {_jumpMult:F1}x", _labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) });
_jumpMult = GUILayout.HorizontalSlider(_jumpMult, 1f, 15f, Array.Empty<GUILayoutOption>());
GUILayout.EndHorizontal();
GUILayout.Space(4f);
}
GUILayout.Space(6f);
SectionHeader("Abilities");
bool flyMode = _flyMode;
_flyMode = DrawToggle("Fly Mode (WASD + Space/Ctrl)", _flyMode);
if (_flyMode != flyMode)
{
if (_flyMode)
{
EnableFly();
}
else
{
DisableFly();
}
}
if (_flyMode)
{
GUILayout.BeginHorizontal((Il2CppReferenceArray<GUILayoutOption>)null);
GUILayout.Label($" Fly Speed: {_flySpeed:F0}", _labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) });
_flySpeed = GUILayout.HorizontalSlider(_flySpeed, 5f, 100f, Array.Empty<GUILayoutOption>());
GUILayout.EndHorizontal();
GUILayout.Space(4f);
}
_noClip = DrawToggle("No-Clip", _noClip);
_freeze = DrawToggle("Freeze Position", _freeze);
}
private void DrawTeleportTab()
{
//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
//IL_0213: Unknown result type (might be due to invalid IL or missing references)
//IL_0236: Unknown result type (might be due to invalid IL or missing references)
//IL_0147: Unknown result type (might be due to invalid IL or missing references)
//IL_029d: Unknown result type (might be due to invalid IL or missing references)
//IL_03c3: Unknown result type (might be due to invalid IL or missing references)
//IL_03c8: Unknown result type (might be due to invalid IL or missing references)
//IL_03d2: Unknown result type (might be due to invalid IL or missing references)
//IL_03d7: Unknown result type (might be due to invalid IL or missing references)
//IL_0360: Unknown result type (might be due to invalid IL or missing references)
//IL_0370: Unknown result type (might be due to invalid IL or missing references)
//IL_037a: Unknown result type (might be due to invalid IL or missing references)
//IL_037f: Unknown result type (might be due to invalid IL or missing references)
SectionHeader("Save Position");
GUILayout.BeginHorizontal((Il2CppReferenceArray<GUILayoutOption>)null);
GUILayout.Label("Name:", _labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(50f) });
_posName = GUILayout.TextField(_posName, _textFieldStyle, Array.Empty<GUILayoutOption>());
GUILayout.EndHorizontal();
GUILayout.Space(4f);
if (GUILayout.Button("\ud83d\udcbe Save Current Position", _btnStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) }) && (Object)(object)_playerTransform != (Object)null)
{
_savedPositions.Add(new SavedPos
{
pos = _playerTransform.position,
name = (string.IsNullOrEmpty(_posName) ? $"Spot {_savedPositions.Count + 1}" : _posName)
});
((MelonBase)this).LoggerInstance.Msg($"Saved position '{_posName}' at {_playerTransform.position}");
}
GUILayout.Space(10f);
SectionHeader("Saved Locations");
if (_savedPositions.Count == 0)
{
GUILayout.Label(" No saved positions yet.", _labelStyle, (Il2CppReferenceArray<GUILayoutOption>)null);
}
for (int i = 0; i < _savedPositions.Count; i++)
{
SavedPos savedPos = _savedPositions[i];
GUILayout.BeginHorizontal((Il2CppReferenceArray<GUILayoutOption>)null);
GUILayout.Label(" " + savedPos.name, _labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) });
GUILayout.Label($"({savedPos.pos.x:F0}, {savedPos.pos.y:F0}, {savedPos.pos.z:F0})", _labelStyle, (Il2CppReferenceArray<GUILayoutOption>)null);
if (GUILayout.Button("TP", _btnStyle, (GUILayoutOption[])(object)new GUILayoutOption[2]
{
GUILayout.Width(40f),
GUILayout.Height(22f)
}))
{
TeleportTo(savedPos.pos);
}
if (GUILayout.Button("X", _btnStyle, (GUILayoutOption[])(object)new GUILayoutOption[2]
{
GUILayout.Width(25f),
GUILayout.Height(22f)
}))
{
_savedPositions.RemoveAt(i);
i--;
}
GUILayout.EndHorizontal();
}
GUILayout.Space(10f);
SectionHeader("Quick Teleport");
if (GUILayout.Button("⬆ Teleport Forward (10 units)", _btnStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(28f) }) && (Object)(object)_playerTransform != (Object)null && (Object)(object)_mainCam != (Object)null)
{
TeleportTo(_playerTransform.position + ((Component)_mainCam).transform.forward * 10f);
}
if (GUILayout.Button("⬆ Teleport Up (20 units)", _btnStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(28f) }) && (Object)(object)_playerTransform != (Object)null)
{
TeleportTo(_playerTransform.position + Vector3.up * 20f);
}
}
private void DrawFunTab()
{
//IL_005f: 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_0087: Unknown result type (might be due to invalid IL or missing references)
SectionHeader("Physics");
bool moonGravity = _moonGravity;
_moonGravity = DrawToggle("Moon Gravity", _moonGravity);
if (_moonGravity != moonGravity)
{
Physics.gravity = (_moonGravity ? new Vector3(0f, -2f, 0f) : new Vector3(0f, -9.81f, 0f));
((MelonBase)this).LoggerInstance.Msg($"Gravity set to {Physics.gravity.y}");
}
GUILayout.Space(6f);
SectionHeader("Visual");
GUILayout.BeginHorizontal((Il2CppReferenceArray<GUILayoutOption>)null);
GUILayout.Label($" Time Scale: {Time.timeScale:F2}x", _labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) });
Time.timeScale = GUILayout.HorizontalSlider(Time.timeScale, 0.1f, 3f, Array.Empty<GUILayoutOption>());
GUILayout.EndHorizontal();
GUILayout.Space(4f);
GUILayout.Space(6f);
SectionHeader("Camera");
GUILayout.BeginHorizontal((Il2CppReferenceArray<GUILayoutOption>)null);
GUILayout.Label($" FOV: {(((Object)(object)_mainCam != (Object)null) ? _mainCam.fieldOfView : 60f):F0}", _labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) });
if ((Object)(object)_mainCam != (Object)null)
{
_mainCam.fieldOfView = GUILayout.HorizontalSlider(_mainCam.fieldOfView, 30f, 140f, Array.Empty<GUILayoutOption>());
}
GUILayout.EndHorizontal();
GUILayout.Space(4f);
}
private void DrawInfoTab()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0090: Unknown result type (might be due to invalid IL or missing references)
//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
SectionHeader("Status");
string text = (((Object)(object)_localPlayer != (Object)null) ? "✔ Found" : "✘ Not found (join a game first)");
GUILayout.Label(" Local Player: " + text, _labelStyle, (Il2CppReferenceArray<GUILayoutOption>)null);
if ((Object)(object)_playerTransform != (Object)null)
{
Vector3 position = _playerTransform.position;
GUILayout.Label($" Position: ({position.x:F1}, {position.y:F1}, {position.z:F1})", _labelStyle, (Il2CppReferenceArray<GUILayoutOption>)null);
}
GUILayout.Label($" FPS: {1f / Time.unscaledDeltaTime:F0}", _labelStyle, (Il2CppReferenceArray<GUILayoutOption>)null);
GUILayout.Label($" Time Scale: {Time.timeScale:F2}", _labelStyle, (Il2CppReferenceArray<GUILayoutOption>)null);
GUILayout.Space(10f);
SectionHeader("Controls");
GUILayout.Label(" INSERT — Toggle this menu", _labelStyle, (Il2CppReferenceArray<GUILayoutOption>)null);
GUILayout.Label(" Fly Mode: WASD to move", _labelStyle, (Il2CppReferenceArray<GUILayoutOption>)null);
GUILayout.Label(" Space = fly up | Ctrl = fly down", _labelStyle, (Il2CppReferenceArray<GUILayoutOption>)null);
GUILayout.Space(10f);
SectionHeader("Credits");
GUILayout.Label(" Made by Scott", _labelStyle, (Il2CppReferenceArray<GUILayoutOption>)null);
GUILayout.Label(" Powered by MelonLoader v0.7.2", _labelStyle, (Il2CppReferenceArray<GUILayoutOption>)null);
GUILayout.Label(" Game: Sledding Game (Unity 6)", _labelStyle, (Il2CppReferenceArray<GUILayoutOption>)null);
GUILayout.Space(10f);
if (GUILayout.Button("Reset ALL Settings", _btnStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(28f) }))
{
ResetAll();
}
}
private void HandleSpeed()
{
//IL_0026: 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_0073: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)_playerTransform == (Object)null)
{
return;
}
try
{
Rigidbody component = _localPlayer.GetComponent<Rigidbody>();
if ((Object)(object)component != (Object)null)
{
Vector3 linearVelocity = component.linearVelocity;
linearVelocity.x *= _speedMult * Time.deltaTime + (1f - Time.deltaTime);
linearVelocity.z *= _speedMult * Time.deltaTime + (1f - Time.deltaTime);
component.linearVelocity = linearVelocity;
}
}
catch
{
}
}
private void HandleFly()
{
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: 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_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_006b: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: 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_007e: 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_008d: Unknown result type (might be due to invalid IL or missing references)
//IL_008e: Unknown result type (might be due to invalid IL or missing references)
//IL_008f: Unknown result type (might be due to invalid IL or missing references)
//IL_0094: Unknown result type (might be due to invalid IL or missing references)
//IL_009e: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: Unknown result type (might be due to invalid IL or missing references)
//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
//IL_00af: Unknown result type (might be due to invalid IL or missing references)
//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
//IL_0104: Unknown result type (might be due to invalid IL or missing references)
//IL_0109: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)_playerTransform == (Object)null || (Object)(object)_mainCam == (Object)null)
{
return;
}
try
{
Vector3 val = Vector3.zero;
Transform transform = ((Component)_mainCam).transform;
Vector3 forward = transform.forward;
forward.y = 0f;
((Vector3)(ref forward)).Normalize();
Vector3 right = transform.right;
right.y = 0f;
((Vector3)(ref right)).Normalize();
if (Input.GetKey((KeyCode)119))
{
val += forward;
}
if (Input.GetKey((KeyCode)115))
{
val -= forward;
}
if (Input.GetKey((KeyCode)97))
{
val -= right;
}
if (Input.GetKey((KeyCode)100))
{
val += right;
}
if (Input.GetKey((KeyCode)32))
{
val += Vector3.up;
}
if (Input.GetKey((KeyCode)306))
{
val -= Vector3.up;
}
if (((Vector3)(ref val)).sqrMagnitude > 0.01f)
{
Transform playerTransform = _playerTransform;
playerTransform.position += ((Vector3)(ref val)).normalized * _flySpeed * Time.deltaTime;
}
}
catch
{
}
}
private void EnableFly()
{
if ((Object)(object)_localPlayer == (Object)null)
{
RefreshPlayerRef();
if ((Object)(object)_localPlayer == (Object)null)
{
return;
}
}
try
{
_flyRBs.Clear();
_flyRBStates.Clear();
Il2CppArrayBase<Rigidbody> componentsInChildren = _localPlayer.GetComponentsInChildren<Rigidbody>();
if (componentsInChildren != null)
{
foreach (Rigidbody item in componentsInChildren)
{
_flyRBs.Add(item);
_flyRBStates.Add(item.isKinematic);
item.isKinematic = true;
}
}
_flySuspended.Clear();
string[] array = new string[9] { "CharacterBody", "CharacterActor", "PlayerControl", "PlayerMovement", "PlayerSledController", "PlayerPushingController", "PlayerSnowmanRollingController", "PhysicsActorSync", "CharacterCollisions3D" };
Il2CppArrayBase<Behaviour> componentsInChildren2 = _localPlayer.GetComponentsInChildren<Behaviour>();
if (componentsInChildren2 != null)
{
foreach (Behaviour item2 in componentsInChildren2)
{
if ((Object)(object)item2 == (Object)null || !item2.enabled)
{
continue;
}
string name = ((MemberInfo)((Object)item2).GetIl2CppType()).Name;
string[] array2 = array;
foreach (string text in array2)
{
if (name == text)
{
item2.enabled = false;
_flySuspended.Add(item2);
((MelonBase)this).LoggerInstance.Msg("Fly: suspended " + name);
break;
}
}
}
}
((MelonBase)this).LoggerInstance.Msg("Fly: ON");
}
catch (Exception ex)
{
((MelonBase)this).LoggerInstance.Error("Fly enable error: " + ex.Message);
}
}
private void DisableFly()
{
try
{
for (int i = 0; i < _flyRBs.Count; i++)
{
if ((Object)(object)_flyRBs[i] != (Object)null)
{
_flyRBs[i].isKinematic = _flyRBStates[i];
}
}
_flyRBs.Clear();
_flyRBStates.Clear();
foreach (Behaviour item in _flySuspended)
{
if ((Object)(object)item != (Object)null)
{
item.enabled = true;
}
}
_flySuspended.Clear();
((MelonBase)this).LoggerInstance.Msg("Fly: OFF");
}
catch (Exception ex)
{
((MelonBase)this).LoggerInstance.Error("Fly disable error: " + ex.Message);
}
}
private void TeleportTo(Vector3 pos)
{
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)_playerTransform == (Object)null)
{
return;
}
try
{
_playerTransform.position = pos;
((MelonBase)this).LoggerInstance.Msg($"Teleported to ({pos.x:F1}, {pos.y:F1}, {pos.z:F1})");
}
catch (Exception ex)
{
((MelonBase)this).LoggerInstance.Error("Teleport error: " + ex.Message);
}
}
private void ResetAll()
{
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
if (_flyMode)
{
DisableFly();
}
_speedHack = false;
_superJump = false;
_flyMode = false;
_noClip = false;
_godMode = false;
_freeze = false;
_moonGravity = false;
_speedMult = 2f;
_jumpMult = 3f;
_flySpeed = 20f;
_playerScale = 1f;
Time.timeScale = 1f;
Physics.gravity = new Vector3(0f, -9.81f, 0f);
if ((Object)(object)_mainCam != (Object)null)
{
_mainCam.fieldOfView = 60f;
}
((MelonBase)this).LoggerInstance.Msg("All settings reset.");
}
private void SectionHeader(string text)
{
GUILayout.Space(4f);
GUILayout.Label("── " + text + " ──", _headerStyle, (Il2CppReferenceArray<GUILayoutOption>)null);
GUILayout.Space(2f);
}
private bool DrawToggle(string label, bool value)
{
GUILayout.BeginHorizontal((Il2CppReferenceArray<GUILayoutOption>)null);
string obj = (value ? " ON " : " OFF ");
GUIStyle val = (value ? _toggleOnStyle : _toggleOffStyle);
if (GUILayout.Button(obj, val, (GUILayoutOption[])(object)new GUILayoutOption[2]
{
GUILayout.Width(55f),
GUILayout.Height(22f)
}))
{
value = !value;
}
GUILayout.Label(" " + label, _labelStyle, (Il2CppReferenceArray<GUILayoutOption>)null);
GUILayout.EndHorizontal();
GUILayout.Space(2f);
return value;
}
private void BuildStyles()
{
//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
//IL_010a: 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_0138: Unknown result type (might be due to invalid IL or missing references)
//IL_0148: Unknown result type (might be due to invalid IL or missing references)
//IL_015f: Unknown result type (might be due to invalid IL or missing references)
//IL_0169: Expected O, but got Unknown
//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
//IL_01bb: Expected O, but got Unknown
//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
//IL_01cf: Expected O, but got Unknown
//IL_01da: Unknown result type (might be due to invalid IL or missing references)
//IL_01e4: Expected O, but got Unknown
//IL_0231: Unknown result type (might be due to invalid IL or missing references)
//IL_025f: Unknown result type (might be due to invalid IL or missing references)
//IL_0269: Expected O, but got Unknown
//IL_02ca: Unknown result type (might be due to invalid IL or missing references)
//IL_02ec: Unknown result type (might be due to invalid IL or missing references)
//IL_02f6: Expected O, but got Unknown
//IL_032d: Unknown result type (might be due to invalid IL or missing references)
//IL_0367: Unknown result type (might be due to invalid IL or missing references)
//IL_0371: Expected O, but got Unknown
//IL_03a8: Unknown result type (might be due to invalid IL or missing references)
//IL_03d6: Unknown result type (might be due to invalid IL or missing references)
//IL_03e0: Expected O, but got Unknown
//IL_03eb: Unknown result type (might be due to invalid IL or missing references)
//IL_0421: Unknown result type (might be due to invalid IL or missing references)
//IL_042b: Expected O, but got Unknown
//IL_0436: Unknown result type (might be due to invalid IL or missing references)
//IL_0455: Unknown result type (might be due to invalid IL or missing references)
//IL_045f: Expected O, but got Unknown
//IL_04ac: Unknown result type (might be due to invalid IL or missing references)
//IL_04cb: Unknown result type (might be due to invalid IL or missing references)
//IL_04d5: Expected O, but got Unknown
//IL_04f6: Unknown result type (might be due to invalid IL or missing references)
if (!_stylesBuilt)
{
_stylesBuilt = true;
Color col = default(Color);
((Color)(ref col))..ctor(0.1f, 0.1f, 0.14f, 0.95f);
Color col2 = default(Color);
((Color)(ref col2))..ctor(0.08f, 0.08f, 0.11f, 1f);
Color val = default(Color);
((Color)(ref val))..ctor(0.3f, 0.55f, 1f, 1f);
Color col3 = default(Color);
((Color)(ref col3))..ctor(0.2f, 0.4f, 0.8f, 1f);
Color col4 = default(Color);
((Color)(ref col4))..ctor(0.15f, 0.75f, 0.35f, 1f);
Color col5 = default(Color);
((Color)(ref col5))..ctor(0.75f, 0.2f, 0.2f, 1f);
Color col6 = default(Color);
((Color)(ref col6))..ctor(0.14f, 0.14f, 0.2f, 1f);
Color textColor = default(Color);
((Color)(ref textColor))..ctor(0.9f, 0.92f, 0.96f, 1f);
_bgTex = MakeTex(2, 2, col);
_darkTex = MakeTex(2, 2, col2);
_accentTex = MakeTex(2, 2, val);
_accentDarkTex = MakeTex(2, 2, col3);
_greenTex = MakeTex(2, 2, col4);
_redTex = MakeTex(2, 2, col5);
_headerTex = MakeTex(2, 2, col6);
_windowStyle = new GUIStyle(GUI.skin.window);
_windowStyle.normal.background = _bgTex;
_windowStyle.onNormal.background = _bgTex;
_windowStyle.normal.textColor = textColor;
_windowStyle.padding = new RectOffset(4, 4, 4, 4);
_windowStyle.border = new RectOffset(1, 1, 1, 1);
_tabActiveStyle = new GUIStyle(GUI.skin.button);
_tabActiveStyle.normal.background = _accentTex;
_tabActiveStyle.hover.background = _accentTex;
_tabActiveStyle.active.background = _accentDarkTex;
_tabActiveStyle.normal.textColor = Color.white;
_tabActiveStyle.fontStyle = (FontStyle)1;
_tabActiveStyle.fontSize = 13;
_tabInactiveStyle = new GUIStyle(GUI.skin.button);
_tabInactiveStyle.normal.background = _darkTex;
_tabInactiveStyle.hover.background = _headerTex;
_tabInactiveStyle.active.background = _accentDarkTex;
_tabInactiveStyle.normal.textColor = new Color(0.6f, 0.6f, 0.7f, 1f);
_tabInactiveStyle.fontSize = 13;
_toggleOnStyle = new GUIStyle(GUI.skin.button);
_toggleOnStyle.normal.background = _greenTex;
_toggleOnStyle.hover.background = _greenTex;
_toggleOnStyle.normal.textColor = Color.white;
_toggleOnStyle.fontStyle = (FontStyle)1;
_toggleOnStyle.fontSize = 11;
_toggleOnStyle.alignment = (TextAnchor)4;
_toggleOffStyle = new GUIStyle(GUI.skin.button);
_toggleOffStyle.normal.background = _redTex;
_toggleOffStyle.hover.background = _redTex;
_toggleOffStyle.normal.textColor = Color.white;
_toggleOffStyle.fontSize = 11;
_toggleOffStyle.alignment = (TextAnchor)4;
_headerStyle = new GUIStyle(GUI.skin.label);
_headerStyle.normal.textColor = val;
_headerStyle.fontStyle = (FontStyle)1;
_headerStyle.fontSize = 14;
_headerStyle.alignment = (TextAnchor)4;
_labelStyle = new GUIStyle(GUI.skin.label);
_labelStyle.normal.textColor = textColor;
_labelStyle.fontSize = 12;
_btnStyle = new GUIStyle(GUI.skin.button);
_btnStyle.normal.background = _headerTex;
_btnStyle.hover.background = _accentDarkTex;
_btnStyle.active.background = _accentTex;
_btnStyle.normal.textColor = textColor;
_btnStyle.fontSize = 12;
_textFieldStyle = new GUIStyle(GUI.skin.textField);
_textFieldStyle.normal.background = _darkTex;
_textFieldStyle.normal.textColor = textColor;
_textFieldStyle.fontSize = 12;
}
}
private Texture2D MakeTex(int w, int h, Color col)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
Texture2D val = new Texture2D(w, h);
Color[] array = (Color[])(object)new Color[w * h];
for (int i = 0; i < array.Length; i++)
{
array[i] = col;
}
val.SetPixels(Il2CppStructArray<Color>.op_Implicit(array));
val.Apply();
((Object)val).hideFlags = (HideFlags)61;
return val;
}
}
}