using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Net; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Text; using System.Threading; using BepInEx; using HarmonyLib; using Newtonsoft.Json; using Patching; using Photon.Pun; using Photon.Realtime; 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("s2e-repo")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("s2e-repo")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("29f01461-f3b6-4126-894d-91c44cc8aecb")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] internal static class PlayerUtilities { private sealed class GlobalCoroutineRunner : MonoBehaviour { public static GlobalCoroutineRunner Instance; internal static GlobalCoroutineRunner Create() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)Instance)) { return Instance; } GameObject val = new GameObject("~GlobalCoroutineRunner"); Object.DontDestroyOnLoad((Object)(object)val); Instance = val.AddComponent(); return Instance; } private void OnDestroy() { if ((Object)(object)Instance == (Object)(object)this) { Instance = null; } } } [CompilerGenerated] private sealed class d__55 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public ChompBookTrap trap; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__55(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; trap.Attack(); break; } if ((Object)(object)trap != (Object)null) { <>2__current = (object)new WaitForSeconds(0.7f); <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__10 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Action a; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__10(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; a(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__35 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerController player; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__35(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; player.MoveSpeed = originalMoveSpeed * 2f; player.SprintSpeed = originalSprintSpeed * 2f; break; case 1: <>1__state = -1; break; } if (speedBonusTimer > 0f) { speedBonusTimer -= Time.deltaTime; <>2__current = null; <>1__state = 1; return true; } player.MoveSpeed = originalMoveSpeed; player.SprintSpeed = originalSprintSpeed; isSpeedBonusActive = false; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__23 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PlayerController player; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__23(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; break; } if (staminaBonusTimer > 0f) { player.EnergyCurrent = 40f; staminaBonusTimer -= Time.deltaTime; <>2__current = null; <>1__state = 1; return true; } isStaminaBonusActive = false; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private static float staminaBonusTimer; private static bool isStaminaBonusActive; private static float speedBonusTimer; private static bool isSpeedBonusActive; private static float originalMoveSpeed; private static float originalSprintSpeed; internal static void PrintAllGameObjects() { GameObject[] array = Resources.LoadAll("Enemies"); Debug.Log((object)"========== ENEMY =========="); GameObject[] array2 = array; foreach (GameObject val in array2) { if (!((Object)(object)val == (Object)null)) { Debug.Log((object)("ENEMY: " + ((Object)val).name.Replace("Enemy - ", ""))); } } GameObject[] array3 = Resources.LoadAll("Items"); Debug.Log((object)"========== ITEM =========="); GameObject[] array4 = array3; foreach (GameObject val2 in array4) { if (!((Object)(object)val2 == (Object)null)) { Debug.Log((object)("ITEM: " + ((Object)val2).name.Replace("Item ", ""))); } } string[] array5 = new string[7] { "Valuables/01 Tiny", "Valuables/02 Small", "Valuables/03 Medium", "Valuables/04 Big", "Valuables/05 Wide", "Valuables/06 Tall", "Valuables/07 Very Tall" }; Debug.Log((object)"====== VALUABLE ITEM ======"); string[] array6 = array5; foreach (string text in array6) { GameObject[] array7 = Resources.LoadAll(text); GameObject[] array8 = array7; foreach (GameObject val3 in array8) { if (!((Object)(object)val3 == (Object)null)) { Debug.Log((object)("VALUABLE ITEM: " + ((Object)val3).name.Replace("Valuable ", ""))); } } } } private static void SendTikTokMessage(string nameTikTok, string message) { if (!((Object)(object)TruckScreenText.instance == (Object)null)) { string[] array = new string[10] { ":)", ":D", ":P", "eyes", ":o", "heart", ":(", ":’(", "heartbreak", "fedup" }; string text = "{" + array[Random.Range(0, array.Length)] + "}"; string text2 = "{" + array[Random.Range(0, array.Length)] + "}"; string text3 = text + " " + nameTikTok + " " + message + " " + text2; TruckScreenText.instance.MessageSendCustom("", text3, 0); } } private static string GetLocalSteamID() { if (GameManager.Multiplayer()) { return (PhotonNetwork.LocalPlayer != null) ? PhotonNetwork.LocalPlayer.UserId : string.Empty; } PlayerAvatar val = Object.FindObjectOfType(); return ((Object)(object)val != (Object)null) ? SemiFunc.PlayerGetSteamID(val) : string.Empty; } internal static void SpawnEnemyRandomLocation(string enemyName, string nameTikTok) { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: 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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) GameObject player = GameObject.FindWithTag("Player"); if ((Object)(object)player == (Object)null) { return; } RoomVolume val = ((IEnumerable)Object.FindObjectsOfType()).FirstOrDefault((Func)delegate(RoomVolume rv) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) Collider component3 = ((Component)rv).GetComponent(); int result; if (component3 == null) { result = 0; } else { Bounds bounds2 = component3.bounds; result = (((Bounds)(ref bounds2)).Contains(player.transform.position) ? 1 : 0); } return (byte)result != 0; }); if ((Object)(object)val == (Object)null) { return; } Collider component = ((Component)val).GetComponent(); Vector3 val2 = player.transform.position; for (int i = 0; i < 10; i++) { Vector3 val3 = player.transform.position + Random.insideUnitSphere * 3f; val3.y = player.transform.position.y; Bounds bounds = component.bounds; if (((Bounds)(ref bounds)).Contains(val3)) { val2 = val3; break; } } EnemyDirector instance = EnemyDirector.instance; if ((Object)(object)instance == (Object)null) { return; } EnemySetup val4 = FindEnemyByName(instance.enemiesDifficulty1, enemyName) ?? FindEnemyByName(instance.enemiesDifficulty2, enemyName) ?? FindEnemyByName(instance.enemiesDifficulty3, enemyName); if ((Object)(object)val4 == (Object)null) { return; } LevelGenerator instance2 = LevelGenerator.Instance; foreach (PrefabRef spawnObject in val4.spawnObjects) { GameObject val5 = ((GameManager.instance.gameMode != 0) ? PhotonNetwork.InstantiateRoomObject(spawnObject.ResourcePath, val2, Quaternion.identity, (byte)0, (object[])null) : Object.Instantiate(spawnObject.Prefab, val2, Quaternion.identity)); EnemyParent component2 = val5.GetComponent(); if (!((Object)(object)component2 == (Object)null)) { typeof(EnemyParent).GetField("SetupDone", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component2, true); Enemy componentInChildren = val5.GetComponentInChildren(); if (!((Object)(object)componentInChildren == (Object)null)) { componentInChildren.EnemyTeleported(val2); FieldInfo field = typeof(LevelGenerator).GetField("EnemiesSpawnTarget", BindingFlags.Instance | BindingFlags.NonPublic); field.SetValue(instance2, (int)field.GetValue(instance2) + 1); EnemyDirector.instance.FirstSpawnPointAdd(component2); RegisterAllPlayersForEnemy(componentInChildren); } } } SemiFunc.UIFocusText(nameTikTok + " spawned '" + enemyName + "'", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "spawned '" + enemyName + "'"); } internal static List GetLevelPoints(bool excludePlayerRooms) { List list = SemiFunc.LevelPointsGetAll(); if (!excludePlayerRooms) { return list; } List playerRoomPoints = SemiFunc.LevelPointsGetInPlayerRooms(); return list.Where((LevelPoint p) => !playerRoomPoints.Contains(p)).ToList(); } internal static void SpawnSpecificEnemyByName(string enemyName, string nameTikTok) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: 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_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) PlayerController val = Object.FindObjectOfType(); if ((Object)(object)val == (Object)null) { return; } Vector3 position = ((Component)val).transform.position; Vector3 spawnPos = GetClosestSpawnPointTo(position); spawnPos.y = position.y; EnemySetup val2 = FindEnemyByName(EnemyDirector.instance.enemiesDifficulty1, enemyName) ?? FindEnemyByName(EnemyDirector.instance.enemiesDifficulty2, enemyName) ?? FindEnemyByName(EnemyDirector.instance.enemiesDifficulty3, enemyName); if ((Object)(object)val2 == (Object)null) { return; } Enemy val3 = SpawnEnemyInternal(enemyName, spawnPos); if ((Object)(object)val3 == (Object)null) { return; } EnemyStateInvestigate inv = ((Component)val3).GetComponent(); if ((Object)(object)inv != (Object)null) { StartAfterOneFrame(delegate { //IL_0028: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)inv != (Object)null && ((Behaviour)inv).isActiveAndEnabled) { inv.Set(spawnPos, false); } }); } SemiFunc.UIFocusText(nameTikTok + " spawned '" + enemyName + "'", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "spawned '" + enemyName + "'"); } private static void StartAfterOneFrame(Action a) { TryStartCoroutine(NextFrame(a)); } private static void TryStartCoroutine(IEnumerator routine) { try { MonoBehaviour coroutineHost = GetCoroutineHost(); if ((Object)(object)coroutineHost != (Object)null) { coroutineHost.StartCoroutine(routine); } } catch { } } private static MonoBehaviour GetCoroutineHost() { MonoBehaviour instance = (MonoBehaviour)(object)CoroutineRunner.Instance; if (Object.op_Implicit((Object)(object)instance)) { return instance; } MonoBehaviour instance2 = (MonoBehaviour)(object)LevelGenerator.Instance; if (Object.op_Implicit((Object)(object)instance2)) { return instance2; } MonoBehaviour instance3 = (MonoBehaviour)(object)EnemyDirector.instance; if (Object.op_Implicit((Object)(object)instance3)) { return instance3; } return (MonoBehaviour)(object)(GlobalCoroutineRunner.Instance ?? GlobalCoroutineRunner.Create()); } [IteratorStateMachine(typeof(d__10))] private static IEnumerator NextFrame(Action a) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__10(0) { a = a }; } private static Enemy SpawnEnemyInternal(string enemyName, Vector3 spawnPoint) { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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_0042: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) string text = "Enemies/Enemy - " + enemyName; GameObject val = Resources.Load(text); if ((Object)(object)val == (Object)null) { return null; } RunManager.instance.EnemiesSpawnedRemoveStart(); GameObject val2 = ((GameManager.instance.gameMode != 0) ? PhotonNetwork.InstantiateRoomObject(text, spawnPoint, Quaternion.identity, (byte)0, (object[])null) : Object.Instantiate(val, spawnPoint, Quaternion.identity)); EnemyParent component = val2.GetComponent(); Enemy componentInChildren = val2.GetComponentInChildren(); if ((Object)(object)component == (Object)null || (Object)(object)componentInChildren == (Object)null) { RunManager.instance.EnemiesSpawnedRemoveEnd(); return componentInChildren; } typeof(EnemyParent).GetField("SetupDone", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component, true); componentInChildren.EnemyTeleported(spawnPoint); LevelGenerator instance = LevelGenerator.Instance; FieldInfo field = typeof(LevelGenerator).GetField("EnemiesSpawnTarget", BindingFlags.Instance | BindingFlags.NonPublic); field.SetValue(instance, (int)field.GetValue(instance) + 1); EnemyDirector.instance.FirstSpawnPointAdd(component); SemiFunc_EnemySpawnPatcher.Block(componentInChildren); component.DespawnedTimer = 999f; RegisterAllPlayersForEnemy(componentInChildren); RunManager.instance.EnemiesSpawnedRemoveEnd(); return componentInChildren; } private static Vector3 GetClosestSpawnPointTo(Vector3 start) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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) //IL_0095: Unknown result type (might be due to invalid IL or missing references) List list = SemiFunc.LevelPointsGetAll(); List list2 = SemiFunc.LevelPointsGetInPlayerRooms(); Vector3 result = start; float num = float.MaxValue; foreach (LevelPoint item in list) { if (!list2.Contains(item)) { Vector3 val = ((Component)item).transform.position - start; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; if (sqrMagnitude < num) { num = sqrMagnitude; result = ((Component)item).transform.position; } } } return result; } private static EnemySetup FindEnemyByName(List list, string name) { return list?.Find((EnemySetup e) => (Object)(object)e != (Object)null && ((Object)e).name.Equals("Enemy - " + name, StringComparison.OrdinalIgnoreCase)); } internal static Vector3 GetSafeSpawnPosition(Transform pt) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0009: 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) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_00a4: 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_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: 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_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: 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_00df: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: 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_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: 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_0136: 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_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01db: 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_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: 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_027a: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) QueryTriggerInteraction val = (QueryTriggerInteraction)1; Vector3 forward = pt.forward; forward.y = 0f; if (((Vector3)(ref forward)).sqrMagnitude < 0.001f) { forward = Vector3.forward; } ((Vector3)(ref forward)).Normalize(); Vector3 right = pt.right; right.y = 0f; if (((Vector3)(ref right)).sqrMagnitude < 0.001f) { right = Vector3.right; } ((Vector3)(ref right)).Normalize(); RaycastHit val4 = default(RaycastHit); RaycastHit val9 = default(RaycastHit); RaycastHit val11 = default(RaycastHit); for (int i = 0; i < 12; i++) { float num = Random.Range(2f, 3f); float num2 = Random.Range(-1f, 1f); Vector3 val2 = pt.position + forward * num + right * num2; Vector3 val3 = val2 + Vector3.up * 5f; if (!Physics.Raycast(val3, Vector3.down, ref val4, 20f, -1, val) || ((RaycastHit)(ref val4)).normal.y < 0.75f) { continue; } Vector3 val5 = ((RaycastHit)(ref val4)).point + Vector3.up * 0.45f; if (Physics.CheckSphere(val5, 0.2f, -1, val)) { continue; } Vector3 val6 = pt.position + Vector3.up * 0.8f; Vector3 val7 = val5 + Vector3.up * 0.2f; Vector3 val8 = val7 - val6; float magnitude = ((Vector3)(ref val8)).magnitude; if (magnitude > 0.01f && Physics.Raycast(val6, ((Vector3)(ref val8)).normalized, ref val9, magnitude, -1, val)) { Vector3 val10 = ((RaycastHit)(ref val9)).point - ((Vector3)(ref val8)).normalized * 0.35f; val10.y = pt.position.y + 0.45f; if (Physics.Raycast(val10 + Vector3.up * 3f, Vector3.down, ref val11, 10f, -1, val) && ((RaycastHit)(ref val11)).normal.y >= 0.75f) { Vector3 val12 = ((RaycastHit)(ref val11)).point + Vector3.up * 0.6f; if (!Physics.CheckSphere(val12, 0.2f, -1, val)) { return val12; } } return pt.position + forward * 0.8f + Vector3.up * 0.9f; } return val5; } return pt.position + forward * 0.8f + Vector3.up * 0.9f; } internal static void SpawnItem(string itemName, string nameTikTok) { //IL_0105: 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_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: 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_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) string text = (itemName.StartsWith("Item ") ? itemName : ("Item " + itemName)); if (GameManager.Multiplayer()) { GameObject val = Resources.Load("Items/" + text); if ((Object)(object)val == (Object)null) { return; } string localSteamID = GetLocalSteamID(); if (string.IsNullOrEmpty(localSteamID)) { return; } Room currentRoom = PhotonNetwork.CurrentRoom; if (currentRoom == null) { return; } PlayerController[] source = Object.FindObjectsOfType(); PlayerController val2 = ((IEnumerable)source).FirstOrDefault((Func)delegate(PlayerController p) { PhotonView component = ((Component)p).GetComponent(); return (Object)(object)component != (Object)null && component.Owner != null && component.Owner.UserId == localSteamID; }); if ((Object)(object)val2 == (Object)null) { return; } Vector3 safeSpawnPosition = GetSafeSpawnPosition(((Component)val2).transform); PhotonNetwork.Instantiate("Items/" + text, safeSpawnPosition, Quaternion.identity, (byte)0, (object[])null); } else { PlayerController val3 = Object.FindObjectOfType(); if ((Object)(object)val3 == (Object)null) { return; } Vector3 safeSpawnPosition2 = GetSafeSpawnPosition(((Component)val3).transform); GameObject val4 = Resources.Load("Items/" + text); if ((Object)(object)val4 == (Object)null) { return; } Object.Instantiate(val4, safeSpawnPosition2, Quaternion.identity); } SemiFunc.UIFocusText(nameTikTok + " spawn item '" + itemName + "'", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "spawn item '" + itemName + "'"); } internal static void SpawnValuableItem(string itemName, string nameTikTok) { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: 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_00b9: 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_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) if (string.IsNullOrWhiteSpace(itemName)) { return; } PlayerController val = (PlayerController)(GameManager.Multiplayer() ? ((object)((IEnumerable)Object.FindObjectsOfType()).FirstOrDefault((Func)delegate(PlayerController x) { PhotonView component = ((Component)x).GetComponent(); object obj; if (component == null) { obj = null; } else { Player owner = component.Owner; obj = ((owner != null) ? owner.UserId : null); } return (string?)obj == GetLocalSteamID(); })) : ((object)Object.FindObjectOfType())); if ((Object)(object)val == (Object)null) { return; } Vector3 safeSpawnPosition = GetSafeSpawnPosition(((Component)val).transform); string fullItemName = (itemName.StartsWith("Valuable ") ? itemName : ("Valuable " + itemName)); string text = FindValuableExactPath(fullItemName); if (string.IsNullOrEmpty(text)) { text = FindValuablePathByKeyword(itemName); } if (!string.IsNullOrEmpty(text)) { GameObject val2 = (GameManager.Multiplayer() ? PhotonNetwork.Instantiate(text, safeSpawnPosition, Quaternion.identity, (byte)0, (object[])null) : Object.Instantiate(Resources.Load(text), safeSpawnPosition, Quaternion.identity)); if (Object.op_Implicit((Object)(object)val2)) { SemiFunc.UIFocusText(nameTikTok + " spawn item '" + itemName + "'", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "spawn item '" + itemName + "'"); } } } private static string FindValuableExactPath(string fullItemName) { string[] array = new string[7] { "Valuables/01 Tiny", "Valuables/02 Small", "Valuables/03 Medium", "Valuables/04 Big", "Valuables/05 Wide", "Valuables/06 Tall", "Valuables/07 Very Tall" }; string[] array2 = array; foreach (string text in array2) { string text2 = text + "/" + fullItemName; if ((Object)(object)Resources.Load(text2) != (Object)null) { return text2; } } return null; } internal static void AddHeal(int amountHeal, string nameTikTok) { //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) PlayerHealth val = null; if (GameManager.Multiplayer()) { string localSteamID = GetLocalSteamID(); if (string.IsNullOrEmpty(localSteamID)) { return; } PlayerHealth[] array = Object.FindObjectsOfType(); foreach (PlayerHealth val2 in array) { PhotonView component = ((Component)val2).GetComponent(); if ((Object)(object)component != (Object)null && component.Owner != null && component.Owner.UserId == localSteamID) { val = val2; break; } } if ((Object)(object)val != (Object)null) { PhotonView component2 = ((Component)val).GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.RPC("HealOtherRPC", (RpcTarget)0, new object[2] { amountHeal, true }); } } } else { PlayerHealth val3 = Object.FindObjectOfType(); if ((Object)(object)val3 == (Object)null) { return; } val3.Heal(amountHeal, true); val = val3; } if ((Object)(object)val != (Object)null) { SemiFunc.UIFocusText($"{nameTikTok} healed {amountHeal}", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, $"healed {amountHeal}"); } } internal static void AddStamina(int amountStamina, string nameTikTok) { //IL_00a4: 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) if (GameManager.Multiplayer()) { string localSteamID = GetLocalSteamID(); if (string.IsNullOrEmpty(localSteamID)) { return; } PlayerController[] source = Object.FindObjectsOfType(); PlayerController val = ((IEnumerable)source).FirstOrDefault((Func)delegate(PlayerController controller) { PhotonView component = ((Component)controller).GetComponent(); return (Object)(object)component != (Object)null && component.Owner != null && component.Owner.UserId == localSteamID; }); if ((Object)(object)val != (Object)null) { val.EnergyCurrent += (float)amountStamina; } } else { PlayerController val2 = Object.FindObjectOfType(); if ((Object)(object)val2 == (Object)null) { return; } val2.EnergyCurrent += (float)amountStamina; } SemiFunc.UIFocusText($"{nameTikTok} added stamina {amountStamina}", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, $"added stamina {amountStamina}"); } internal static void ActivateStaminaInfinity(string nameTikTok) { //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) PlayerController val = null; if (GameManager.Multiplayer()) { string localSteamID = GetLocalSteamID(); if (string.IsNullOrEmpty(localSteamID)) { return; } PlayerController[] source = Object.FindObjectsOfType(); val = ((IEnumerable)source).FirstOrDefault((Func)delegate(PlayerController controller) { PhotonView component = ((Component)controller).GetComponent(); return (Object)(object)component != (Object)null && component.Owner != null && component.Owner.UserId == localSteamID; }); if ((Object)(object)val == (Object)null) { return; } } else { val = Object.FindObjectOfType(); if ((Object)(object)val == (Object)null) { return; } } staminaBonusTimer += 20f; if (!isStaminaBonusActive) { isStaminaBonusActive = true; ((MonoBehaviour)val).StartCoroutine(StaminaBonusCoroutine(val)); } SemiFunc.UIFocusText(nameTikTok + " activated infinite stamina", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "activated infinite stamina"); } [IteratorStateMachine(typeof(d__23))] private static IEnumerator StaminaBonusCoroutine(PlayerController player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__23(0) { player = player }; } internal static PlayerController GetLocalPlayer() { if (GameManager.Multiplayer()) { string localSteamID = GetLocalSteamID(); if (string.IsNullOrEmpty(localSteamID)) { return null; } PlayerController[] source = Object.FindObjectsOfType(); return ((IEnumerable)source).FirstOrDefault((Func)delegate(PlayerController p) { PhotonView component = ((Component)p).GetComponent(); return (Object)(object)component != (Object)null && component.Owner != null && component.Owner.UserId == localSteamID; }); } return Object.FindObjectOfType(); } internal static ValuableObject GetClosestValuable() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) ValuableObject[] array = Object.FindObjectsOfType(); if (array == null || array.Length == 0) { return null; } PlayerController localPlayer = GetLocalPlayer(); if ((Object)(object)localPlayer == (Object)null) { return null; } Vector3 position = ((Component)localPlayer).transform.position; ValuableObject result = null; float num = float.MaxValue; ValuableObject[] array2 = array; foreach (ValuableObject val in array2) { float num2 = Vector3.Distance(position, ((Component)val).transform.position); if (num2 < num) { num = num2; result = val; } } return result; } internal static void RandomDeleteItem(string nameTikTok) { //IL_0057: 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) if (GameManager.Multiplayer()) { ValuableObject closestValuable = GetClosestValuable(); if ((Object)(object)closestValuable != (Object)null) { PhotonNetwork.Destroy(((Component)closestValuable).gameObject); } } else { ValuableObject closestValuable2 = GetClosestValuable(); if ((Object)(object)closestValuable2 != (Object)null) { Object.Destroy((Object)(object)((Component)closestValuable2).gameObject); } } SemiFunc.UIFocusText(nameTikTok + " activated random delete item", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "activated random delete item"); } internal static void RandomCostRemoveItem(string nameTikTok) { //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) ValuableObject closestValuable = GetClosestValuable(); if ((Object)(object)closestValuable != (Object)null) { float num = 0f; if (GameManager.Multiplayer()) { PhotonView component = ((Component)closestValuable).GetComponent(); if (component != null) { component.RPC("DollarValueSetRPC", (RpcTarget)0, new object[1] { num }); } } else { FieldInfo field = typeof(ValuableObject).GetField("dollarValueCurrent", BindingFlags.Instance | BindingFlags.NonPublic); field.SetValue(closestValuable, num); } } SemiFunc.UIFocusText(nameTikTok + " activated random cost item removed", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "activated random cost item removed"); } internal static void ChangeCostUp(string nameTikTok) { //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) ValuableObject closestValuable = GetClosestValuable(); if ((Object)(object)closestValuable != (Object)null) { float num = (float)typeof(ValuableObject).GetField("dollarValueCurrent", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(closestValuable); float num2 = num * 1.2f; typeof(ValuableObject).GetField("dollarValueCurrent", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(closestValuable, num2); typeof(ValuableObject).GetField("dollarValueOriginal", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(closestValuable, num2); typeof(ValuableObject).GetField("dollarValueSet", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(closestValuable, true); if (GameManager.Multiplayer()) { PhotonView component = ((Component)closestValuable).GetComponent(); if (component != null) { component.RPC("DollarValueSetRPC", (RpcTarget)0, new object[1] { num2 }); } } } SemiFunc.UIFocusText(nameTikTok + " activated change cost UP", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "activated change cost UP"); } internal static void ChangeCostDown(string nameTikTok) { //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) ValuableObject closestValuable = GetClosestValuable(); if ((Object)(object)closestValuable != (Object)null) { float num = (float)typeof(ValuableObject).GetField("dollarValueCurrent", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(closestValuable); float num2 = num * 0.8f; typeof(ValuableObject).GetField("dollarValueCurrent", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(closestValuable, num2); typeof(ValuableObject).GetField("dollarValueOriginal", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(closestValuable, num2); typeof(ValuableObject).GetField("dollarValueSet", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(closestValuable, true); if (GameManager.Multiplayer()) { PhotonView component = ((Component)closestValuable).GetComponent(); if (component != null) { component.RPC("DollarValueSetRPC", (RpcTarget)0, new object[1] { num2 }); } } } SemiFunc.UIFocusText(nameTikTok + " activated change cost DOWN", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "activated change cost DOWN"); } internal static void ChangeSpeed(string nameTikTok) { //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) PlayerController val = null; if (GameManager.Multiplayer()) { string localSteamID = GetLocalSteamID(); if (string.IsNullOrEmpty(localSteamID)) { return; } PlayerController[] source = Object.FindObjectsOfType(); val = ((IEnumerable)source).FirstOrDefault((Func)delegate(PlayerController controller) { PhotonView component = ((Component)controller).GetComponent(); return (Object)(object)component != (Object)null && component.Owner != null && component.Owner.UserId == localSteamID; }); } else { val = Object.FindObjectOfType(); } if (!((Object)(object)val == (Object)null)) { speedBonusTimer += 20f; if (!isSpeedBonusActive) { isSpeedBonusActive = true; originalMoveSpeed = val.MoveSpeed; originalSprintSpeed = val.SprintSpeed; ((MonoBehaviour)val).StartCoroutine(SpeedBonusCoroutine(val)); } SemiFunc.UIFocusText(nameTikTok + " activated speed boost", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "activated speed boost"); } } [IteratorStateMachine(typeof(d__35))] private static IEnumerator SpeedBonusCoroutine(PlayerController player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__35(0) { player = player }; } internal static void ApplyRandomUpgrade(string nameTikTok) { //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) PlayerController val = Object.FindObjectOfType(); if ((Object)(object)val == (Object)null) { return; } string empty = string.Empty; if (GameManager.Multiplayer()) { string localSteamID = GetLocalSteamID(); if (string.IsNullOrEmpty(localSteamID)) { return; } Room currentRoom = PhotonNetwork.CurrentRoom; if (currentRoom == null) { return; } Player val2 = ((IEnumerable)currentRoom.Players.Values).FirstOrDefault((Func)((Player p) => p.UserId == localSteamID)); if (val2 == null) { return; } empty = val2.UserId; } else { empty = SemiFunc.PlayerGetSteamID(PlayerAvatar.instance); } Action[] array = new Action[8] { delegate(string id) { PunManager.instance.UpgradePlayerEnergy(id, 1); }, delegate(string id) { PunManager.instance.UpgradePlayerExtraJump(id, 1); }, delegate(string id) { PunManager.instance.UpgradePlayerGrabRange(id, 1); }, delegate(string id) { PunManager.instance.UpgradePlayerGrabStrength(id, 1); }, delegate(string id) { PunManager.instance.UpgradePlayerThrowStrength(id, 1); }, delegate(string id) { PunManager.instance.UpgradePlayerHealth(id, 1); }, delegate(string id) { PunManager.instance.UpgradePlayerSprintSpeed(id, 1); }, delegate(string id) { PunManager.instance.UpgradePlayerTumbleLaunch(id, 1); } }; int num = Random.Range(0, array.Length); array[num](empty); SemiFunc.UIFocusText(nameTikTok + " applied random upgrade", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "applied random upgrade"); } internal static void ReviveRandomPlayer(string nameTikTok) { //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) if (GameManager.Multiplayer()) { List playerList = GameDirector.instance.PlayerList; List list = playerList.Where((PlayerAvatar av) => (Object)(object)av != (Object)null && !((Component)av).gameObject.activeSelf).ToList(); if (list.Count != 0) { PlayerAvatar val = list[Random.Range(0, list.Count)]; val.Revive(false); SemiFunc.UIFocusText(nameTikTok + " revived a random player", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "revived a random player"); } } } internal static void SpawnActivatedMine(string nameTikTok) { //IL_00d4: 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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) PlayerController val = null; if (GameManager.Multiplayer()) { string localSteamID = GetLocalSteamID(); if (string.IsNullOrEmpty(localSteamID)) { return; } Room currentRoom = PhotonNetwork.CurrentRoom; if (currentRoom == null) { return; } Player val2 = ((IEnumerable)currentRoom.Players.Values).FirstOrDefault((Func)((Player p) => p.UserId == localSteamID)); if (val2 == null) { return; } PlayerController[] source = Object.FindObjectsOfType(); val = ((IEnumerable)source).FirstOrDefault((Func)delegate(PlayerController p) { PhotonView component5 = ((Component)p).GetComponent(); return (Object)(object)component5 != (Object)null && component5.Owner != null && component5.Owner.UserId == localSteamID; }); if ((Object)(object)val == (Object)null) { return; } } else { val = Object.FindObjectOfType(); if ((Object)(object)val == (Object)null) { return; } } Vector3 val3 = ((Component)val).transform.position + new Vector3(0f, 0.1f, 0f); string[] array = new string[2] { "Item Mine Explosive", "Item Mine Shockwave" }; int num = Random.Range(0, array.Length); string text = array[num]; if (GameManager.Multiplayer()) { GameObject val4 = PhotonNetwork.Instantiate("Items/" + text, val3, Quaternion.identity, (byte)0, (object[])null); if ((Object)(object)val4 == (Object)null) { return; } ItemMine component = val4.GetComponent(); if ((Object)(object)component != (Object)null) { component.destroyAfterTimer = true; component.destroyTimer = 0f; if (text == "Item Mine Shockwave") { ItemGrenadeShockwave component2 = val4.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.Explosion(); } } else { MineExplosionTrigger mineExplosionTrigger = val4.AddComponent(); mineExplosionTrigger.Initialize(component); } } } else { GameObject val5 = Resources.Load("Items/" + text); if ((Object)(object)val5 == (Object)null) { return; } GameObject val6 = Object.Instantiate(val5, val3, Quaternion.identity); ItemMine component3 = val6.GetComponent(); if ((Object)(object)component3 != (Object)null) { component3.destroyAfterTimer = true; component3.destroyTimer = 0f; if (text == "Item Mine Shockwave") { ItemGrenadeShockwave component4 = val6.GetComponent(); if ((Object)(object)component4 != (Object)null) { component4.Explosion(); } } else { MineExplosionTrigger mineExplosionTrigger2 = val6.AddComponent(); mineExplosionTrigger2.Initialize(component3); } } } SemiFunc.UIFocusText(nameTikTok + " spawned activated mine", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "spawned activated mine"); } internal static void SpawnRandomActivatedGrenade(string nameTikTok) { //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) string[] array = new string[5] { "Item Grenade Duct Taped", "Item Grenade Explosive", "Item Grenade Human", "Item Grenade Shockwave", "Item Grenade Stun" }; string text = array[Random.Range(0, array.Length)]; GameObject val = null; if (GameManager.Multiplayer()) { Player localPlayer = PhotonNetwork.LocalPlayer; string localId = ((localPlayer != null) ? localPlayer.UserId : null); if (string.IsNullOrEmpty(localId)) { return; } PlayerController[] source = Object.FindObjectsOfType(); PlayerController val2 = ((IEnumerable)source).FirstOrDefault((Func)delegate(PlayerController c) { PhotonView component3 = ((Component)c).GetComponent(); return (Object)(object)component3 != (Object)null && component3.Owner != null && component3.Owner.UserId == localId; }); if ((Object)(object)val2 == (Object)null) { return; } Vector3 val3 = ((Component)val2).transform.position + ((Component)val2).transform.forward * Random.Range(2f, 3f) + ((Component)val2).transform.right * Random.Range(-1f, 1f); val3.y = ((Component)val2).transform.position.y + 0.5f; val = PhotonNetwork.Instantiate("Items/" + text, val3, Quaternion.identity, (byte)0, (object[])null); if ((Object)(object)val != (Object)null) { PhotonView component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.RPC("ToggleItemRPC", (RpcTarget)0, new object[2] { true, PhotonNetwork.LocalPlayer.ActorNumber }); } } } else { PlayerController val4 = Object.FindObjectOfType(); if ((Object)(object)val4 == (Object)null) { return; } Vector3 val5 = ((Component)val4).transform.position + ((Component)val4).transform.forward * Random.Range(2f, 3f) + ((Component)val4).transform.right * Random.Range(-1f, 1f); val5.y = ((Component)val4).transform.position.y + 0.5f; GameObject val6 = Resources.Load("Items/" + text); if ((Object)(object)val6 == (Object)null) { return; } val = Object.Instantiate(val6, val5, Quaternion.identity); if ((Object)(object)val != (Object)null) { ItemToggle component2 = val.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.ToggleItem(true, 0); } } } SemiFunc.UIFocusText(nameTikTok + " spawned & activated " + text, Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "spawned & activated '" + text + "'"); } internal static void KnockdownPlayer(string nameTikTok) { //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: 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_0066: 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_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) PlayerAvatar instance = PlayerAvatar.instance; if ((Object)(object)instance != (Object)null) { object? obj = typeof(PlayerAvatar).GetField("tumble", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)?.GetValue(instance); PlayerTumble val = (PlayerTumble)((obj is PlayerTumble) ? obj : null); if ((Object)(object)val != (Object)null) { Vector3 val2 = ((Component)instance.localCamera).transform.forward * 5f; float num = 10f; val.TumbleForce(val2); val.TumbleTorque(((Component)val).transform.right * num); typeof(PlayerTumble).GetMethod("BreakFree", BindingFlags.Instance | BindingFlags.NonPublic, null, new Type[1] { typeof(Vector3) }, null)?.Invoke(val, new object[1] { ((Component)instance.localCamera).transform.forward }); val.TumbleSet(true, false); } } SemiFunc.UIFocusText(nameTikTok + " knockdown player", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "knockdown player"); } private static void RegisterAllPlayersForEnemy(Enemy enemy) { if ((Object)(object)enemy == (Object)null || GameDirector.instance?.PlayerList == null) { return; } foreach (PlayerAvatar player in GameDirector.instance.PlayerList) { if (!((Object)(object)player == (Object)null) && !((Object)(object)player.photonView == (Object)null)) { try { enemy.PlayerAdded(player.photonView.ViewID); } catch { } } } } internal static void ShakeCartItem(string nameTikTok) { //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_0184: Unknown result type (might be due to invalid IL or missing references) PlayerAvatar instance = PlayerAvatar.instance; if ((Object)(object)instance != (Object)null) { Vector3 position = ((Component)instance).transform.position; PhysGrabInCart val = null; float num = float.MaxValue; PhysGrabInCart[] array = Object.FindObjectsOfType(); foreach (PhysGrabInCart val2 in array) { Vector3 val3 = ((Component)val2).transform.position - position; float sqrMagnitude = ((Vector3)(ref val3)).sqrMagnitude; if (sqrMagnitude < num) { num = sqrMagnitude; val = val2; } } if ((Object)(object)val != (Object)null) { FieldInfo field = typeof(PhysGrabInCart).GetField("inCartObjects", BindingFlags.Instance | BindingFlags.NonPublic); if (field != null && field.GetValue(val) is List list) { foreach (CartObject item in list) { PhysGrabObject physGrabObject = item.physGrabObject; Rigidbody val4 = ((physGrabObject != null) ? ((Component)physGrabObject).GetComponent() : null); if ((Object)(object)val4 != (Object)null) { float num2 = Random.Range(5f, 10f) * ((Random.value < 0.5f) ? (-1f) : 1f); float num3 = Random.Range(5f, 20f); float num4 = Random.Range(5f, 10f) * ((Random.value < 0.5f) ? (-1f) : 1f); val4.AddForce(new Vector3(num2, num3, num4), (ForceMode)1); } } } } } SemiFunc.UIFocusText(nameTikTok + " shaked cart item", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "shaked cart item"); } internal static void StunEnemies(string nameTikTok) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) float num = 5f; EnemyStateStunned[] array = Object.FindObjectsOfType(); foreach (EnemyStateStunned val in array) { if ((Object)(object)val != (Object)null) { val.Set(num); } } SemiFunc.UIFocusText(nameTikTok + " stunned all enemies", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "stunned all enemies"); } internal static void PlayerDead(string nameTikTok) { //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) if (GameManager.Multiplayer()) { Player master = PhotonNetwork.MasterClient; if (master != null) { PlayerAvatar val = ((IEnumerable)Object.FindObjectsOfType()).FirstOrDefault((Func)delegate(PlayerAvatar av) { PhotonView component = ((Component)av).GetComponent(); return (Object)(object)component != (Object)null && component.Owner != null && component.Owner.UserId == master.UserId; }); if ((Object)(object)val != (Object)null) { val.PlayerDeath(-1); SemiFunc.UIFocusText(nameTikTok + " killed you", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "killed you"); } } } else { PlayerAvatar instance = PlayerAvatar.instance; if ((Object)(object)instance != (Object)null) { instance.PlayerDeath(-1); SemiFunc.UIFocusText(nameTikTok + " killed you", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "killed you"); } } } internal static void PushPlayerForward(string nameTikTok) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) PlayerAvatar instance = PlayerAvatar.instance; if ((Object)(object)instance != (Object)null) { Vector3 val = ((Component)instance.localCamera).transform.forward * 30f; instance.ForceImpulse(val); } SemiFunc.UIFocusText(nameTikTok + " pushed forward", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "pushed forward"); } internal static void PushPlayerBackward(string nameTikTok) { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: 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) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) PlayerAvatar instance = PlayerAvatar.instance; if ((Object)(object)instance != (Object)null) { Vector3 val = -((Component)instance.localCamera).transform.forward * 30f; instance.ForceImpulse(val); } SemiFunc.UIFocusText(nameTikTok + " pushed backward", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "pushed backward"); } public static void KillAllEnemies(string nameTikTok) { //IL_0105: 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) EnemyParent[] array = Object.FindObjectsOfType(); EnemyParent[] array2 = array; foreach (EnemyParent val in array2) { if (GameManager.Multiplayer()) { PhotonNetwork.Destroy(((Component)val).gameObject); } else { Object.Destroy((Object)(object)((Component)val).gameObject); } } if ((Object)(object)EnemyDirector.instance != (Object)null) { FieldInfo fieldInfo = typeof(EnemyDirector).GetField("enemies", BindingFlags.Instance | BindingFlags.NonPublic) ?? typeof(EnemyDirector).GetField("enemies", BindingFlags.Instance | BindingFlags.Public); if (fieldInfo != null && fieldInfo.GetValue(EnemyDirector.instance) is IList list) { for (int num = list.Count - 1; num >= 0; num--) { if (list[num] == null) { list.RemoveAt(num); } } } } SemiFunc.UIFocusText(nameTikTok + " killed all enemies", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "killed all enemies"); } internal static void RequestTeleportToRandomRoom(string nameTikTok) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_00a4: 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) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: 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_00bc: 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_00d7: Unknown result type (might be due to invalid IL or missing references) PlayerController val = Object.FindObjectOfType(); if ((Object)(object)val == (Object)null) { return; } List list = SemiFunc.LevelPointsGetAll(); if (list != null && list.Count != 0) { Vector3 currentPos = ((Component)val).transform.position; float minDistance = 8f; List list2 = list.Where((LevelPoint p) => Vector3.Distance(currentPos, ((Component)p).transform.position) >= minDistance).ToList(); if (list2.Count == 0) { list2 = list; } LevelPoint val2 = list2[Random.Range(0, list2.Count)]; Vector3 targetPosition = ((Component)val2).transform.position + Vector3.up * 1.5f; TeleportRequest.TargetPosition = targetPosition; TeleportRequest.Requested = true; SemiFunc.UIFocusText(nameTikTok + " teleported to random room", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "teleported to random room"); } } internal static void TeleportCartsByNameToRandomRooms(string nameTikTok) { //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) PhysGrabInCart[] array = Object.FindObjectsOfType(); if (array == null || array.Length == 0) { return; } string[] source = new string[2] { "Cart Medium", "Cart Small" }; HashSet hashSet = new HashSet(); PhysGrabInCart[] array2 = array; foreach (PhysGrabInCart val in array2) { Transform t = ((Component)val).transform; while ((Object)(object)t != (Object)null && !source.Any((string n) => ((Object)t).name.Contains(n))) { t = t.parent; } if ((Object)(object)t != (Object)null && source.Any((string n) => ((Object)t).name.Contains(n))) { hashSet.Add(t); } } if (hashSet.Count == 0) { return; } List list = SemiFunc.LevelPointsGetAll(); if (list == null || list.Count == 0) { return; } int num = 0; foreach (Transform item in hashSet) { Vector3 oldPos = ((Component)item).transform.position; List list2 = list.Where((LevelPoint p) => Vector3.Distance(oldPos, ((Component)p).transform.position) >= 8f).ToList(); if (list2.Count == 0) { list2 = list; } Vector3 val2 = ((Component)list2[Random.Range(0, list2.Count)]).transform.position + Vector3.up * 1.5f; Rigidbody[] componentsInChildren = ((Component)item).GetComponentsInChildren(); Rigidbody[] array3 = componentsInChildren; foreach (Rigidbody val3 in array3) { val3.isKinematic = true; val3.velocity = Vector3.zero; val3.angularVelocity = Vector3.zero; } item.SetPositionAndRotation(val2, item.rotation); Physics.SyncTransforms(); Rigidbody[] array4 = componentsInChildren; foreach (Rigidbody val4 in array4) { val4.isKinematic = false; } num++; } SemiFunc.UIFocusText(nameTikTok + ": random teleported cart", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, " random teleported cart"); } internal static void RequestTeleportPlayerToNearestCart(string nameTikTok) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: 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_011e: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) PlayerController val = Object.FindObjectOfType(); if ((Object)(object)val == (Object)null) { return; } Vector3 position = ((Component)val).transform.position; PhysGrabInCart[] array = Object.FindObjectsOfType(); if (array == null || array.Length == 0) { return; } string[] source = new string[2] { "Cart Medium", "Cart Small" }; Transform val2 = null; float num = float.MaxValue; PhysGrabInCart[] array2 = array; foreach (PhysGrabInCart val3 in array2) { Transform t = ((Component)val3).transform; while ((Object)(object)t != (Object)null && !source.Any((string n) => ((Object)t).name.Contains(n))) { t = t.parent; } if ((Object)(object)t != (Object)null && source.Any((string n) => ((Object)t).name.Contains(n))) { Vector3 val4 = t.position - position; float sqrMagnitude = ((Vector3)(ref val4)).sqrMagnitude; if (sqrMagnitude < num) { num = sqrMagnitude; val2 = t; } } } if (!((Object)(object)val2 == (Object)null)) { Vector3 targetPosition = val2.position + Vector3.up * 1.5f; TeleportRequest.TargetPosition = targetPosition; TeleportRequest.Requested = true; SemiFunc.UIFocusText(nameTikTok + ": teleporting to cart", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "teleported to cart"); } } internal static void RequestTeleportPlayerToTruckSpawn(string nameTikTok) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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) TruckSafetySpawnPoint instance = TruckSafetySpawnPoint.instance; if (!((Object)(object)instance == (Object)null)) { Vector3 position = ((Component)instance).transform.position; Quaternion rotation = ((Component)instance).transform.rotation; TeleportRequest.TargetPosition = position; TeleportRequest.Requested = true; SemiFunc.UIFocusText(nameTikTok + ": teleporting to truck", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "teleported to truck"); } } internal static void SpawnActivatedRubberDuck(string nameTikTok, float explodeDelay = 5f) { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: 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_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) GameObject val = Resources.Load("Items/Item Rubber Duck"); if ((Object)(object)val == (Object)null) { return; } PlayerController val2; if (GameManager.Multiplayer()) { string localSteamID = GetLocalSteamID(); if (string.IsNullOrEmpty(localSteamID)) { return; } val2 = ((IEnumerable)Object.FindObjectsOfType()).FirstOrDefault((Func)delegate(PlayerController p) { PhotonView component = ((Component)p).GetComponent(); object obj; if (component == null) { obj = null; } else { Player owner = component.Owner; obj = ((owner != null) ? owner.UserId : null); } return (string?)obj == localSteamID; }); } else { val2 = Object.FindObjectOfType(); } if (!((Object)(object)val2 == (Object)null)) { Transform transform = ((Component)val2).transform; Vector3 val3 = transform.position + transform.forward * Random.Range(2f, 3f) + transform.right * Random.Range(-1f, 1f); val3.y = transform.position.y + 0.5f; GameObject duckInstance = (GameManager.Multiplayer() ? PhotonNetwork.Instantiate("Items/Item Rubber Duck", val3, Quaternion.identity, (byte)0, (object[])null) : Object.Instantiate(val, val3, Quaternion.identity)); DuckExplosionHelper.Attach(duckInstance, explodeDelay); SemiFunc.UIFocusText(nameTikTok + " spawned activated Rubber Duck", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, $"spawned activated Rubber Duck (explodes in {explodeDelay}s)"); } } internal static void SpawnActivatedWizardDumgolfsStaff(string nameTikTok) { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) string fullItemName = ("Wizard Dumgolfs Staff".StartsWith("Valuable ") ? "Wizard Dumgolfs Staff" : "Valuable Wizard Dumgolfs Staff"); PlayerController val = (PlayerController)(GameManager.Multiplayer() ? ((object)((IEnumerable)Object.FindObjectsOfType()).FirstOrDefault((Func)delegate(PlayerController x) { PhotonView component2 = ((Component)x).GetComponent(); object obj; if (component2 == null) { obj = null; } else { Player owner = component2.Owner; obj = ((owner != null) ? owner.UserId : null); } return (string?)obj == GetLocalSteamID(); })) : ((object)Object.FindObjectOfType())); if ((Object)(object)val == (Object)null) { return; } Transform transform = ((Component)val).transform; Vector3 val2 = transform.position + transform.forward * Random.Range(2f, 3f) + transform.right * Random.Range(-1f, 1f); val2.y = transform.position.y + 0.5f; string[] source = new string[7] { "Valuables/01 Tiny", "Valuables/02 Small", "Valuables/03 Medium", "Valuables/04 Big", "Valuables/05 Wide", "Valuables/06 Tall", "Valuables/07 Very Tall" }; string text = source.Select((string s) => s + "/" + fullItemName).FirstOrDefault((string path) => (Object)(object)Resources.Load(path) != (Object)null); if (text == null) { return; } GameObject go = (GameManager.Multiplayer() ? PhotonNetwork.Instantiate(text, val2, Quaternion.identity, (byte)0, (object[])null) : Object.Instantiate(Resources.Load(text), val2, Quaternion.identity)); ((MonoBehaviour)CoroutineRunner.Instance).StartCoroutine(NextFrame(delegate { ValuableWizardStaff component = go.GetComponent(); if ((Object)(object)component != (Object)null) { component.StaffLaser(); } })); SemiFunc.UIFocusText(nameTikTok + " spawned & activated Wizard Dumgolfs Staff", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "spawned & activated Wizard Dumgolfs Staff"); } internal static void SpawnActivatedChompBook(string nameTikTok) { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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) //IL_0078: 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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_00ee: 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_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) PlayerController val = (PlayerController)(GameManager.Multiplayer() ? ((object)((IEnumerable)Object.FindObjectsOfType()).FirstOrDefault((Func)delegate(PlayerController x) { PhotonView component = ((Component)x).GetComponent(); object obj; if (component == null) { obj = null; } else { Player owner = component.Owner; obj = ((owner != null) ? owner.UserId : null); } return (string?)obj == GetLocalSteamID(); })) : ((object)Object.FindObjectOfType())); if ((Object)(object)val == (Object)null) { return; } Transform transform = ((Component)val).transform; Vector3 val2 = transform.position + transform.forward * Random.Range(2f, 3f) + transform.right * Random.Range(-1f, 1f); val2.y = transform.position.y + 0.5f; string text = FindValuablePathByKeyword("Chomp Book"); if (string.IsNullOrEmpty(text)) { return; } GameObject go = (GameManager.Multiplayer() ? PhotonNetwork.Instantiate(text, val2, Quaternion.identity, (byte)0, (object[])null) : Object.Instantiate(Resources.Load(text), val2, Quaternion.identity)); ((MonoBehaviour)CoroutineRunner.Instance).StartCoroutine(NextFrame(delegate { if (Object.op_Implicit((Object)(object)go)) { ChompBookTrap val3 = go.GetComponent() ?? go.GetComponentInChildren(true); if (!((Object)(object)val3 == (Object)null)) { val3.TrapActivate(); val3.Attack(); ((MonoBehaviour)CoroutineRunner.Instance).StartCoroutine(ChompLoop(val3)); } } })); SemiFunc.UIFocusText(nameTikTok + " spawned & activated Chomp Book", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "spawned & activated Chomp Book"); } [IteratorStateMachine(typeof(d__55))] private static IEnumerator ChompLoop(ChompBookTrap trap) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__55(0) { trap = trap }; } internal static void SpawnActivatedBottleTrap(string nameTikTok) { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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) //IL_0078: 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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_00ee: 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_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) PlayerController val = (PlayerController)(GameManager.Multiplayer() ? ((object)((IEnumerable)Object.FindObjectsOfType()).FirstOrDefault((Func)delegate(PlayerController x) { PhotonView component = ((Component)x).GetComponent(); object obj; if (component == null) { obj = null; } else { Player owner = component.Owner; obj = ((owner != null) ? owner.UserId : null); } return (string?)obj == GetLocalSteamID(); })) : ((object)Object.FindObjectOfType())); if ((Object)(object)val == (Object)null) { return; } Transform transform = ((Component)val).transform; Vector3 val2 = transform.position + transform.forward * Random.Range(2f, 3f) + transform.right * Random.Range(-1f, 1f); val2.y = transform.position.y + 0.5f; string text = FindValuablePathByKeyword("Bottle"); if (string.IsNullOrEmpty(text)) { return; } GameObject go = (GameManager.Multiplayer() ? PhotonNetwork.Instantiate(text, val2, Quaternion.identity, (byte)0, (object[])null) : Object.Instantiate(Resources.Load(text), val2, Quaternion.identity)); ((MonoBehaviour)CoroutineRunner.Instance).StartCoroutine(NextFrame(delegate { if (Object.op_Implicit((Object)(object)go)) { BottleTrap val3 = go.GetComponent() ?? go.GetComponentInChildren(true); if (!((Object)(object)val3 == (Object)null)) { val3.TrapActivate(); } } })); SemiFunc.UIFocusText(nameTikTok + " spawned & activated Bottle Trap", Color.white, Color.red, 3f); SendTikTokMessage(nameTikTok, "spawned & activated Bottle Trap"); } private static string FindValuablePathByKeyword(string keyword) { if (string.IsNullOrWhiteSpace(keyword)) { return null; } string kw = keyword.Trim().ToLowerInvariant(); string[] array = new string[7] { "Valuables/01 Tiny", "Valuables/02 Small", "Valuables/03 Medium", "Valuables/04 Big", "Valuables/05 Wide", "Valuables/06 Tall", "Valuables/07 Very Tall" }; GameObject val = null; string text = null; int num = int.MinValue; string[] array2 = array; foreach (string text2 in array2) { GameObject[] array3 = Resources.LoadAll(text2); if (array3 == null || array3.Length == 0) { continue; } GameObject[] array4 = array3; foreach (GameObject val2 in array4) { if (Object.op_Implicit((Object)(object)val2)) { int num2 = Score(((Object)val2).name); if (num2 > num) { num = num2; val = val2; text = text2; } } } } if ((Object)(object)val == (Object)null) { return null; } string text3 = text + "/" + ((Object)val).name; return ((Object)(object)Resources.Load(text3) != (Object)null) ? text3 : null; int Score(string prefabName) { string text4 = prefabName.ToLowerInvariant(); if (!text4.Contains(kw)) { return int.MinValue; } int num3 = 0; if (text4.EndsWith(" " + kw)) { num3 += 1000; } else if (text4.Contains(" " + kw + " ")) { num3 += 500; } if (text4.StartsWith("valuable ")) { num3 += 100; } if (kw == "bottle" && text4.Contains("ship in a bottle")) { num3 -= 300; } return num3; } } } internal class DuckExplosionHelper : MonoBehaviour { [CompilerGenerated] private sealed class d__4 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public DuckExplosionHelper <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__4(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(<>4__this._delay); <>1__state = 1; return true; case 1: <>1__state = -1; if (SemiFunc.IsMultiplayer() && (Object)(object)<>4__this._pv != (Object)null) { <>4__this._pv.RPC("QuackRPC", (RpcTarget)0, Array.Empty()); } else { ItemRubberDuck component = ((Component)<>4__this).GetComponent(); if (component != null) { component.QuackRPC(default(PhotonMessageInfo)); } } <>2__current = null; <>1__state = 2; return true; case 2: <>1__state = -1; if (SemiFunc.IsMultiplayer() && (Object)(object)<>4__this._pv != (Object)null) { PhotonNetwork.Destroy(<>4__this._duck); } else { Object.Destroy((Object)(object)<>4__this._duck); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private PhotonView _pv; private float _delay; private GameObject _duck; internal static void Attach(GameObject duckInstance, float delay) { DuckExplosionHelper duckExplosionHelper = duckInstance.AddComponent(); duckExplosionHelper._pv = duckInstance.GetComponent(); duckExplosionHelper._delay = delay; duckExplosionHelper._duck = duckInstance; } [IteratorStateMachine(typeof(d__4))] private IEnumerator Start() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__4(0) { <>4__this = this }; } } internal class MineExplosionTrigger : MonoBehaviour { [CompilerGenerated] private sealed class d__2 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public MineExplosionTrigger <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__2(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.mine.onTriggered.Invoke(); Object.Destroy((Object)(object)<>4__this); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private ItemMine mine; internal void Initialize(ItemMine _mine) { mine = _mine; ((MonoBehaviour)this).StartCoroutine(TriggerRoutine()); } [IteratorStateMachine(typeof(d__2))] private IEnumerator TriggerRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__2(0) { <>4__this = this }; } } internal static class TeleportRequest { internal static bool Requested = false; internal static Vector3 TargetPosition = Vector3.zero; } internal class CoroutineRunner : MonoBehaviour { private static CoroutineRunner _instance; internal static CoroutineRunner Instance => _instance ?? (_instance = new GameObject("CoroutineRunner").AddComponent()); } public class REPOTikTok : MonoBehaviour { private REPOTikTokHttpServer server; private void Start() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown Harmony val = new Harmony("streamtoearn.io"); val.PatchAll(); Debug.Log((object)"Mod s2e_REPO has been loaded!"); server = new REPOTikTokHttpServer(); server.StartServer(); } private void OnApplicationQuit() { server?.StopServer(); } } internal class REPOTikTokHttpServer { private HttpListener listener; private bool isStopping; internal void StartServer() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown try { listener = new HttpListener(); listener.Prefixes.Add("http://127.0.0.1:55001/"); listener.Start(); ThreadPool.QueueUserWorkItem(delegate { while (listener.IsListening && !isStopping) { try { HttpListenerContext context = listener.GetContext(); HttpListenerRequest request = context.Request; HttpListenerResponse response = context.Response; string text = request.Headers["Origin"]; if (string.IsNullOrEmpty(text) || !text.Contains("streamtoearn.io")) { response.StatusCode = 403; response.Close(); } else { response.Headers.Add("Access-Control-Allow-Origin", text); response.Headers.Add("Access-Control-Allow-Methods", "GET, POST, OPTIONS"); response.Headers.Add("Access-Control-Allow-Headers", "Content-Type, Superdupertoken"); if (request.HttpMethod == "OPTIONS") { response.StatusCode = 200; response.Close(); } else { string text2 = request.Headers["Superdupertoken"]; if (string.IsNullOrEmpty(text2) || text2 != "streamtoearn.io") { response.StatusCode = 401; response.Close(); } else { if (request.HttpMethod == "POST") { string requestBody; using (StreamReader streamReader = new StreamReader(request.InputStream, request.ContentEncoding)) { requestBody = streamReader.ReadToEnd(); } UnityMainThreadDispatcher.Enqueue(delegate { RequestHandler.HandleRequest(request.Url.AbsolutePath, requestBody); }); string s = "OTVET"; byte[] bytes = Encoding.UTF8.GetBytes(s); response.ContentLength64 = bytes.Length; response.OutputStream.Write(bytes, 0, bytes.Length); } response.Close(); } } } } catch (Exception ex2) { if (!isStopping) { Debug.LogError((object)("Error processing request: " + ex2)); } } } }); if ((Object)(object)Object.FindObjectOfType() == (Object)null) { GameObject val = new GameObject("UnityMainThreadDispatcher"); val.AddComponent(); Object.DontDestroyOnLoad((Object)(object)val); } } catch (Exception ex) { Debug.LogError((object)("Error initializing HTTP Server: " + ex)); } } internal void StopServer() { try { if (listener != null && listener.IsListening) { isStopping = true; listener.Stop(); listener.Close(); } } catch (Exception ex) { Debug.LogError((object)("Error stopping HTTP Server: " + ex)); } } } internal static class RequestHandler { internal static void HandleRequest(string path, string requestBody) { try { Dictionary dictionary = JsonConvert.DeserializeObject>(requestBody); string text = path.Split(new char[1] { '/' })[^1].ToLower(); string text2 = (dictionary.ContainsKey("effect") ? dictionary["effect"] : null); string nameTikTok = (dictionary.ContainsKey("name") ? dictionary["name"] : ""); switch (text) { case "spawnenemy": if (!string.IsNullOrEmpty(text2)) { if (text2.Equals("Gnome", StringComparison.OrdinalIgnoreCase)) { PlayerUtilities.SpawnEnemyRandomLocation(text2, nameTikTok); } else { PlayerUtilities.SpawnSpecificEnemyByName(text2, nameTikTok); } } break; case "spawnenemyrandomlocation": if (!string.IsNullOrEmpty(text2)) { PlayerUtilities.SpawnEnemyRandomLocation(text2, nameTikTok); } break; case "spawnitem": if (!string.IsNullOrEmpty(text2)) { PlayerUtilities.SpawnItem(text2, nameTikTok); } break; case "spawnvaluableitem": if (!string.IsNullOrEmpty(text2)) { PlayerUtilities.SpawnValuableItem(text2, nameTikTok); } break; case "heal": { int amountHeal = 100; if (!string.IsNullOrEmpty(text2) && int.TryParse(text2, out var result2)) { amountHeal = result2; } PlayerUtilities.AddHeal(amountHeal, nameTikTok); break; } case "stamina": { int amountStamina = 100; if (!string.IsNullOrEmpty(text2) && int.TryParse(text2, out var result)) { amountStamina = result; } PlayerUtilities.AddStamina(amountStamina, nameTikTok); break; } case "changecostup": PlayerUtilities.ChangeCostUp(nameTikTok); break; case "changecostdown": PlayerUtilities.ChangeCostDown(nameTikTok); break; case "removecost": PlayerUtilities.RandomCostRemoveItem(nameTikTok); break; case "destroyitem": PlayerUtilities.RandomDeleteItem(nameTikTok); break; case "infinitystamina": PlayerUtilities.ActivateStaminaInfinity(nameTikTok); break; case "bonusspeed": PlayerUtilities.ChangeSpeed(nameTikTok); break; case "randomupgrade": PlayerUtilities.ApplyRandomUpgrade(nameTikTok); break; case "revive": PlayerUtilities.ReviveRandomPlayer(nameTikTok); break; case "spawnmine": PlayerUtilities.SpawnActivatedMine(nameTikTok); break; case "spawngrenade": PlayerUtilities.SpawnRandomActivatedGrenade(nameTikTok); break; case "knockdown": PlayerUtilities.KnockdownPlayer(nameTikTok); break; case "shakecartitem": PlayerUtilities.ShakeCartItem(nameTikTok); break; case "stunenemies": PlayerUtilities.StunEnemies(nameTikTok); break; case "kill": PlayerUtilities.PlayerDead(nameTikTok); break; case "pushplayerforward": PlayerUtilities.PushPlayerForward(nameTikTok); break; case "pushplayerbackward": PlayerUtilities.PushPlayerBackward(nameTikTok); break; case "killallenemies": PlayerUtilities.KillAllEnemies(nameTikTok); break; case "randomteleport": PlayerUtilities.RequestTeleportToRandomRoom(nameTikTok); break; case "randomteleportcart": PlayerUtilities.TeleportCartsByNameToRandomRooms(nameTikTok); break; case "teleporttocart": PlayerUtilities.RequestTeleportPlayerToNearestCart(nameTikTok); break; case "teleporttotruck": PlayerUtilities.RequestTeleportPlayerToTruckSpawn(nameTikTok); break; case "spawnrubberduck": PlayerUtilities.SpawnActivatedRubberDuck(nameTikTok); break; case "spawnwizarddumgolfsstaff": PlayerUtilities.SpawnActivatedWizardDumgolfsStaff(nameTikTok); break; case "spawnbottle": PlayerUtilities.SpawnActivatedBottleTrap(nameTikTok); break; case "spawnchompbook": PlayerUtilities.SpawnActivatedChompBook(nameTikTok); break; default: Debug.Log((object)("Unknown command: " + text)); break; } } catch (Exception ex) { Debug.LogError((object)("Error in HandleRequest: " + ex)); } } } internal class UnityMainThreadDispatcher : MonoBehaviour { private static readonly Queue executionQueue = new Queue(); private static float lastExecutionTime = 0f; private const float delayBetweenCommands = 0.1f; internal static void Enqueue(Action action) { if (action == null) { return; } lock (executionQueue) { executionQueue.Enqueue(action); } } private void Update() { lock (executionQueue) { if (executionQueue.Count > 0 && Time.time - lastExecutionTime >= 0.1f) { try { executionQueue.Dequeue()?.Invoke(); } catch (Exception ex) { Debug.LogError((object)("Error executing queued action: " + ex)); } lastExecutionTime = Time.time; } } } } namespace S2EREPOTikTok { [BepInPlugin("com.streamtoearn.repotiktok", "REPOTikTok", "1.0.0")] public class REPOTikTokPlugin : BaseUnityPlugin { private void Awake() { SceneManager.sceneLoaded += OnSceneLoaded; } private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { if (((Scene)(ref scene)).name != "InitialScene") { InitializeMod(); SceneManager.sceneLoaded -= OnSceneLoaded; } } private void InitializeMod() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GameObject val = new GameObject("REPOTikTok"); val.AddComponent(); Object.DontDestroyOnLoad((Object)(object)val); } } } namespace Patching { [HarmonyPatch(typeof(SemiFunc), "EnemySpawn")] internal class SemiFunc_EnemySpawnPatcher { private static readonly HashSet _blocked = new HashSet(); public static void Block(Enemy e) { if ((Object)(object)e != (Object)null) { _blocked.Add(e); } } private static bool Prefix(Enemy enemy, ref bool __result) { if (!_blocked.Remove(enemy)) { return true; } __result = false; return false; } } [HarmonyPatch(typeof(PlayerController), "FixedUpdate")] internal class TeleportPlayerPatch { private static void Prefix(PlayerController __instance) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) if (TeleportRequest.Requested) { ((Component)__instance).transform.position = TeleportRequest.TargetPosition; CharacterController component = ((Component)__instance).GetComponent(); if ((Object)(object)component != (Object)null) { ((Collider)component).enabled = false; } Rigidbody component2 = ((Component)__instance).GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.isKinematic = true; component2.velocity = Vector3.zero; } if ((Object)(object)component != (Object)null) { ((Collider)component).enabled = true; } if ((Object)(object)component2 != (Object)null) { component2.isKinematic = false; } TeleportRequest.Requested = false; } } } }