Пример #1
0
        private static bool Enter(PortalInternal __instance, MethodInfo __originalMethod)
        {
            if (ModPrefs.GetBool("vrcextended", "disablePortal"))
            {
                return(false);
            }
            if (portalEnter == __instance)
            {
                return(true);
            }

            if (ModPrefs.GetBool("vrcextended", "askUsePortal"))
            {
                VRCUiPopupManagerUtils.ShowPopup("Enter Portal", "Do you really want to enter the portal?", "No", delegate()
                {
                    VRCUiPopupManagerUtils.GetVRCUiPopupManager().HideCurrentPopup();
                }, "Yes", delegate()
                {
                    portalEnter = __instance;
                    VRCUiPopupManagerUtils.GetVRCUiPopupManager().HideCurrentPopup();
                    __originalMethod.Invoke(__instance, new object[] { });
                });
                return(false);
            }
            return(true);
        }
Пример #2
0
 // Token: 0x060060A1 RID: 24737 RVA: 0x002207B8 File Offset: 0x0021EBB8
 private void CreatePortal()
 {
     if (RoomManager.inRoom)
     {
         PortalInternal.CreatePortal(this.mWorld, this.mWorld.GetBestInstance(null, false), VRCPlayer.Instance.transform.position, VRCPlayer.Instance.transform.forward, true);
     }
 }
Пример #3
0
 // Token: 0x06006078 RID: 24696 RVA: 0x0021FB88 File Offset: 0x0021DF88
 private void CreatePortal()
 {
     if (RoomManager.inRoom && PortalInternal.CreatePortal(this.mWorld, this.worldInstance, VRCPlayer.Instance.transform.position, VRCPlayer.Instance.transform.forward, true))
     {
         this.portalButton.gameObject.SetActive(false);
     }
 }
Пример #4
0
 public virtual void Setup(PortalInternal portal, RoomInfo roomInfo, APIUser dropper, string worldId, string roomId)
 {
     field_Public_String_0 = "SCREEN";
     this.portal           = portal;
     this.dropper          = dropper;
     this.worldId          = worldId;
     this.roomId           = roomId;
 }
Пример #5
0
 public static void EnterConfirm(IntPtr instance)
 {
     if (IntPtr.Zero != instance)
     {
         var portal  = new PortalInternal(instance);
         var dropper = PlayerManager.Method_Public_Static_Player_Int32_0(portal.field_Internal_Int32_0);
         VRCUiPopupManager.field_Private_Static_VRCUiPopupManager_0.
         Method_Public_Void_String_String_String_Action_Action_1_VRCUiPopup_0("Portal Confirmation", "Would you like to enter this world? \n" +
                                                                              $"Name: {portal.field_Private_ApiWorld_0.name}\n" +
                                                                              $"Author: {portal.field_Private_ApiWorld_0.authorName}\n" +
                                                                              $"Player: {(dropper != null ? dropper.field_Private_APIUser_0.displayName : "No Player")}", "Yes", new Action(() => {
             OldEnter(instance); VRCUiPopupManager.field_Private_Static_VRCUiPopupManager_0.Method_Public_Void_2();
         }));
     }
 }
Пример #6
0
    // Token: 0x060054AB RID: 21675 RVA: 0x001D3650 File Offset: 0x001D1A50
    public static void PortalCreated(PortalInternal p)
    {
        PortalInternal portalInternal = null;

        RoomManager.userPortals.TryGetValue(p.CreatorId, out portalInternal);
        if (portalInternal != null)
        {
            if (portalInternal == p)
            {
                return;
            }
            portalInternal.ForceShutdown();
        }
        RoomManager.userPortals.Remove(p.CreatorId);
        RoomManager.userPortals.Add(p.CreatorId, p);
    }
Пример #7
0
    private void KillPortal(Vector3 pos, Vector3 fwd)
    {
        RaycastHit raycastHit;

        if (!Physics.Raycast(pos, fwd, out raycastHit, 100f))
        {
            return;
        }
        PortalInternal component = raycastHit.collider.gameObject.GetComponent <PortalInternal>();

        if (component == null)
        {
            return;
        }
        VRC.Network.RPC(VRC_EventHandler.VrcTargetType.Master, component.gameObject, "KillPortal", new object[0]);
    }
Пример #8
0
        private static bool Enter(PortalInternal __instance, MethodInfo __originalMethod)
        {
            if (portalInternal == __instance)
            {
                return(true);
            }

            VRCMenuUtilsAPI.Alert("Enter Portal", "Do you really want to enter the portal?", "No", () =>
            {
                VRCMenuUtilsAPI.HideCurrentPopup();
            }, "Yes", () =>
            {
                portalInternal = __instance;
                VRCMenuUtilsAPI.HideCurrentPopup();
                __originalMethod.Invoke(__instance, new object[0]);
            });
            return(false);
        }
Пример #9
0
        public static void OnPortalEnter(RoomInfo roomInfo, PortalInternal portal, APIUser dropper, string worldId, string roomId)
        {
            UiManager.OpenBigMenu();

            vrcUiTabsParent.SetActive(false);
            tabsParent.SetActive(true);

            VRCUiManager.prop_VRCUiManager_0.HideScreen("SCREEN");
            basicMenuComponent.Setup(portal, roomInfo, dropper, worldId, roomId);
            detailedMenuComponent.Setup(portal, roomInfo, dropper, worldId, roomId);

            if (AskToPortalSettings.startOnDetailed.Value)
            {
                detailedMenuTab.ShowPage();
            }
            else
            {
                basicMenuTab.ShowPage();
            }
        }
Пример #10
0
 private static bool EnterPortalPatch(PortalInternal __instance)
 {
     try
     {
         if (Configuration.GetConfig().PortalSafety)
         {
             GeneralWrappers.AlertV2($"Portal: {__instance.field_Private_ApiWorld_0.name}", $"Instance: {(__instance.field_Private_ApiWorld_0.instanceId == null ? "Random Public Instance" : __instance.field_Private_ApiWorld_0.instanceId)}\nWorld Creator: {__instance.field_Private_ApiWorld_0.authorName}\nWho Dropped: {__instance.GetPlayer().GetAPIUser().displayName}",
                                     "Enter", new Action(() =>
             {
                 Networking.GoToRoom($"{__instance.field_Private_ApiWorld_0.id}{__instance.field_Private_ApiWorld_0.instanceId}");
             }), "Don't Enter", new Action(() =>
             {
                 GeneralWrappers.ClosePopup();
             }));
             return(false);
         }
     }
     catch (Exception) { }
     return(true);
 }
Пример #11
0
 public static bool EnterConfirm(PortalInternal __instance, MethodBase __originalMethod)
 {
     if (!BypassThatThing)
     {
         if (__instance != null)
         {
             var dropper = PlayerManager.Method_Public_Static_Player_Int32_0(__instance.field_Internal_Int32_0);
             ShowPopUPthingy("Portal Confirmation", "Would you like to enter this world? \n" +
                             $"Name: {__instance.field_Private_ApiWorld_0.name}\n" +
                             $"Author: {__instance.field_Private_ApiWorld_0.authorName}\n" +
                             $"Player: {(dropper != null ? dropper.field_Private_APIUser_0.displayName : "No Player")}", "Yes", new Action(() =>
             {
                 BypassThatThing = true;
                 __originalMethod.Invoke(__instance, null);
             }));
         }
         return(false);
     }
     BypassThatThing = false;
     return(true);
 }
Пример #12
0
        public override void Setup(PortalInternal portal, RoomInfo roomInfo, APIUser dropper, string worldId, string roomId)
        {
            base.Setup(portal, roomInfo, dropper, worldId, roomId);

            field_Public_String_1 = "AskToPortal Detailed";

            instanceIdText.text        = "Instance Id: " + roomInfo.instanceId;
            instanceTypeText.text      = "Instance Type: " + roomInfo.instanceType;
            instanceRegionText.text    = "Instance Region: " + roomInfo.region;
            instanceCreatorIdText.text = "Instance Creator: " + roomInfo.ownerId;
            worldNameText.text         = "World Name: " + portal.field_Private_ApiWorld_0.name;
            worldAuthorText.text       = "World Author: " + portal.field_Private_ApiWorld_0.authorName;
            instancePopText.text       = "Instance Pop: " + portal.field_Private_Int32_0.ToString();

            dropperNameText.text = "Dropper Name: " + dropper.displayName;
            dropperIdText.text   = "Dropper Id: " + dropper.id;
            isFriendText.text    = "Is Friend: " + APIUser.IsFriendsWith(dropper.id).ToString();
            isSelfText.text      = "Is Self: " + dropper.IsSelf.ToString();
            statusText.text      = "Status: " + dropper.status;

            errorReasonText.text = string.Join("\n", roomInfo.errors);
        }
Пример #13
0
 public static void EnterPortal(PortalInternal portalInternal, APIUser dropper, string worldId, string roomId)
 {
     if (portalInternal == null)
     {
         object currentPortalInfo = Activator.CreateInstance(portalInfo);
         currentPortalInfo.GetType().GetProperty($"field_Public_{portalInfoEnum.Name}_0").SetValue(currentPortalInfo, 3); //I hate reflection
         typeof(Il2CppSystem.Collections.Generic.Dictionary <string, string>).GetMethod("Add").Invoke(currentPortalInfo.GetType().GetProperty("field_Public_Dictionary_2_String_String_0").GetValue(currentPortalInfo), new object[2] {
             "transitionPortalType", dropper.id == "" ? "Static" : "Dynamic"
         });
         typeof(Il2CppSystem.Collections.Generic.Dictionary <string, string>).GetMethod("Add").Invoke(currentPortalInfo.GetType().GetProperty("field_Public_Dictionary_2_String_String_0").GetValue(currentPortalInfo), new object[2] {
             "transitionPortalOwner", dropper.id
         });
         enterWorld.Invoke(VRCFlowManager.prop_VRCFlowManager_0, new object[5] {
             worldId, roomId, currentPortalInfo, (Il2CppSystem.Action <string>) new Action <string>((str) => UiManager.OpenAlertPopup("Cannot Join World")), false
         });                                                                                                                                                                                                                            //Just kill me
     }
     else
     {
         AskToPortalMod.shouldInterrupt = false;
         enterPortal.Invoke(portalInternal, null);
         AskToPortalMod.shouldInterrupt = true;
     }
 }
Пример #14
0
        public override void Setup(PortalInternal portal, RoomInfo roomInfo, APIUser dropper, string worldId, string roomId)
        {
            base.Setup(portal, roomInfo, dropper, worldId, roomId);

            field_Public_String_1 = "AskToPortal Basic";

            if (AskToPortalMod.cachedDroppers.ContainsKey(portal.GetInstanceID()))
            {
                try
                {
                    avatarImage.texture = AskToPortalMod.cachedDroppers[portal.GetInstanceID()].prop_VRCPlayer_0.field_Private_Texture2D_1;
                    if (avatarImage.texture == null)
                    {
                        avatarImage.texture = AskToPortalMod.cachedDroppers[portal.GetInstanceID()].prop_VRCPlayer_0.field_Private_Texture2D_0;
                    }
                }
                catch (NullReferenceException)
                {
                }
            }
            else
            {
                avatarImage.texture = null;
            }

            if (dropper.id != "")
            {
                messageText.text = $"{dropper.displayName} has dropped a portal to {portal.field_Private_ApiWorld_0.name} #{roomInfo.instanceId} {roomInfo.instanceType}.";
            }
            else
            {
                messageText.text = $"This is a world portal to {portal.field_Private_ApiWorld_0.name}.";
            }

            switch (roomInfo.errors.Count)
            {
            case 0:
                messageText.text += "\nThere are no detected errors with the portal, so it's destination should be safe.";
                break;

            case 1:
                messageText.text += "\nThere is one error with the portal, so it's destination will most likely be safe.";
                break;

            case 2:
                messageText.text += "\nThere are multiple errors with the portal. You probably should leave this one alone";
                break;

            default:
                messageText.text += "\nThere are a lot of errors with this portal. You really can only get this high when deliberately messing with the portal. Leave this one alone.";
                break;
            }

            if (dropper.id != "")
            {
                messageText.text += "\nDo you wish to enter, leave, or blacklist this dropper so you cant enter their porals until you restart?";
            }
            else
            {
                messageText.text += "\nDo you wish to enter or leave?";
            }
        }
Пример #15
0
 // Token: 0x060054AC RID: 21676 RVA: 0x001D36B3 File Offset: 0x001D1AB3
 public static void PortalShutdown(PortalInternal p)
 {
     RoomManager.userPortals.Remove(p.CreatorId);
 }
Пример #16
0
        public static bool OnPortalEnter(PortalInternal __instance)
        {
            if (!AskToPortalSettings.enabled.Value)
            {
                return(true);
            }
            if (!shouldInterrupt)
            {
                return(true);
            }

            Photon.Pun.PhotonView photonView = __instance.gameObject.GetComponent <Photon.Pun.PhotonView>();
            APIUser dropper;

            if (photonView == null)
            {
                dropper = new APIUser(displayName: "Not Player Dropped", id: "");
            }
            else
            {
                dropper = cachedDroppers[__instance.GetInstanceID()].prop_APIUser_0; // Get cached user because the photon object before gets the owner and can be spoofed
            }
            if (blacklistedUserIds.Contains(dropper.id))
            {
                return(false);
            }
            if (!ShouldCheckUserPortal(dropper, photonView == null))
            {
                return(true);
            }

            string roomId  = __instance.field_Private_String_1;
            string worldId = __instance.field_Private_ApiWorld_0.id;
            int    roomPop = __instance.field_Private_Int32_0;

            RoomInfo roomInfo;

            if (photonView == null)
            {
                roomInfo = new RoomInfo();
            }
            else
            {
                roomInfo = new RoomInfo(roomId);
            }

            //If portal dropper is not owner of private instance but still dropped the portal or world id is the public ban world or if the population is in the negatives or is above 80
            if (!string.IsNullOrWhiteSpace(roomInfo.ownerId) && roomInfo.ownerId != dropper.id && !roomInfo.instanceType.Contains("Public"))
            {
                roomInfo.errors.Add("Instance type was non-public and the owner of the instance did not match the dropper of the portal");
            }

            if (worldId == "wrld_5b89c79e-c340-4510-be1b-476e9fcdedcc")
            {
                roomInfo.errors.Add("Portal leads to the public ban world, which is used almost exclusively by portal droppers");
            }

            if (roomPop < 0 || roomPop > 80)
            {
                roomInfo.errors.Add("Room population was an invalid value");
            }

            MenuManager.OnPortalEnter(roomInfo, __instance, dropper, worldId, roomId);
            return(false);
        }
Пример #17
0
        public static bool OnPortalEnter(PortalInternal __instance)
        {
            if (!AskToPortalSettings.enabled)
            {
                return(true);
            }
            if (!hasTriggered)
            {
                Photon.Pun.PhotonView photonView = __instance.gameObject.GetComponent <Photon.Pun.PhotonView>();
                APIUser dropper;
                if (photonView == null)
                {
                    dropper = new APIUser(displayName: "Not Player Dropped", id: "");
                }
                else
                {
                    dropper = cachedDroppers[__instance.GetInstanceID()].field_Private_APIUser_0; // Get cached user because the photon object before gets the owner and can be spoofed
                }

                if (blacklistedUserIds.Contains(dropper.id))
                {
                    return(false);
                }

                string   roomId   = __instance.field_Private_String_1;
                string   worldId  = __instance.field_Private_ApiWorld_0.id;
                int      roomPop  = __instance.field_Private_Int32_0;
                RoomInfo roomInfo = new RoomInfo();
                if (roomId == null)
                {
                    if (dropper.id != "")
                    {
                        roomInfo.isPortalDropper = true;                   //If there is a dropper but the portal has no room id
                    }
                    roomInfo.instanceType = "Unknown";
                }
                else
                {
                    roomInfo = ParseRoomId(roomId);
                }

                //If portal dropper is not owner of private instance but still dropped the portal or world id is the public ban world or if the population is in the negatives or is above 80
                if ((roomInfo.ownerId != "" && roomInfo.ownerId != dropper.id && !roomInfo.instanceType.Contains("Friend")) || worldId == "wrld_5b89c79e-c340-4510-be1b-476e9fcdedcc" || roomPop < 0 || roomPop > 80)
                {
                    roomInfo.isPortalDropper = true;
                }

                if (roomInfo.isPortalDropper && !(AskToPortalSettings.autoAcceptSelf && dropper.IsSelf))
                {
                    popupV2.Invoke(VRCUiPopupManager.prop_VRCUiPopupManager_0, new object[7] {
                        "Portal Dropper Detected!!!",
                        $"This portal was likely dropped by someone malicious! Only go into this portal if you trust {dropper.displayName}. Pressing \"Leave and Blacklist\" will blacklist {dropper.displayName}'s portals until the game restarts",
                        "Enter", (Il2CppSystem.Action) new Action(() =>
                        {
                            closePopup.Invoke(VRCUiPopupManager.prop_VRCUiPopupManager_0, null);

                            if (__instance == null)
                            {
                                object currentPortalInfo = Activator.CreateInstance(portalInfo);
                                currentPortalInfo.GetType().GetProperty($"field_Public_{portalInfoEnum.Name}_0").SetValue(currentPortalInfo, portalInfoEnum.GetEnumValues().GetValue(3)); //I hate reflection
                                typeof(Il2CppSystem.Collections.Generic.Dictionary <string, string>).GetMethod("Add").Invoke(currentPortalInfo.GetType().GetProperty("field_Public_Dictionary_2_String_String_0").GetValue(currentPortalInfo), new object[2] {
                                    "transitionPortalType", dropper.id == "" ? "Static" : "Dynamic"
                                });
                                typeof(Il2CppSystem.Collections.Generic.Dictionary <string, string>).GetMethod("Add").Invoke(currentPortalInfo.GetType().GetProperty("field_Public_Dictionary_2_String_String_0").GetValue(currentPortalInfo), new object[2] {
                                    "transitionPortalOwner", dropper.id
                                });
                                enterWorld.Invoke(VRCFlowManager.prop_VRCFlowManager_0, new object[5] {
                                    worldId, roomId, currentPortalInfo, (Il2CppSystem.Action <string>) new Action <string>((str) => popupV2Small.Invoke(VRCUiPopupManager.prop_VRCUiPopupManager_0, new object[5] {
                                        "Alert", "Cannot Join World", "Close", (Il2CppSystem.Action) new Action(() => closePopup.Invoke(VRCUiPopupManager.prop_VRCUiPopupManager_0, null)), null
                                    })), false
                                });                                                                                                                                                                                                                                                                                                                                                                                                                           //Just kill me
                            }
                            else
                            {
                                hasTriggered = true;
                                try
                                {
                                    enterPortal.Invoke(__instance, null);
                                }
                                catch {}
                            }
                        }), "Leave and Blacklist", (Il2CppSystem.Action) new Action(() => { closePopup.Invoke(VRCUiPopupManager.prop_VRCUiPopupManager_0, null); blacklistedUserIds.Add(dropper.id); }), null
                    });
                    return(false);
                }
                else if (ShouldCheckUserPortal(dropper) && !(AskToPortalSettings.autoAcceptHome && __instance.field_Internal_Boolean_1) && !AskToPortalSettings.onlyPortalDrop)
                {
                    popupV2.Invoke(VRCUiPopupManager.prop_VRCUiPopupManager_0, new object[7] {
                        "Enter This Portal?",
                        $"Do you want to enter this portal?{Environment.NewLine}World Name: {__instance.field_Private_ApiWorld_0.name}{Environment.NewLine}Dropper: {dropper.displayName}{Environment.NewLine}Instance Type: {roomInfo.instanceType}",
                        "Yes", (Il2CppSystem.Action) new Action(() =>
                        {
                            closePopup.Invoke(VRCUiPopupManager.prop_VRCUiPopupManager_0, null);

                            if (__instance == null)
                            {
                                object currentPortalInfo = Activator.CreateInstance(portalInfo);
                                currentPortalInfo.GetType().GetProperty($"field_Public_{portalInfoEnum.Name}_0").SetValue(currentPortalInfo, portalInfoEnum.GetEnumValues().GetValue(3)); //I hate reflection
                                typeof(Il2CppSystem.Collections.Generic.Dictionary <string, string>).GetMethod("Add").Invoke(currentPortalInfo.GetType().GetProperty("field_Public_Dictionary_2_String_String_0").GetValue(currentPortalInfo), new object[2] {
                                    "transitionPortalType", dropper.id == "" ? "Static" : "Dynamic"
                                });
                                typeof(Il2CppSystem.Collections.Generic.Dictionary <string, string>).GetMethod("Add").Invoke(currentPortalInfo.GetType().GetProperty("field_Public_Dictionary_2_String_String_0").GetValue(currentPortalInfo), new object[2] {
                                    "transitionPortalOwner", dropper.id
                                });
                                enterWorld.Invoke(VRCFlowManager.prop_VRCFlowManager_0, new object[5] {
                                    worldId, roomId, currentPortalInfo, (Il2CppSystem.Action <string>) new Action <string>((str) => popupV2Small.Invoke(VRCUiPopupManager.prop_VRCUiPopupManager_0, new object[5] {
                                        "Alert", "Cannot Join World", "Close", (Il2CppSystem.Action) new Action(() => closePopup.Invoke(VRCUiPopupManager.prop_VRCUiPopupManager_0, null)), null
                                    })), false
                                });                                                                                                                                                                                                                                                                                                                                                                                                                           //Just kill me
                            }
                            else
                            {
                                hasTriggered = true;
                                try
                                {
                                    enterPortal.Invoke(__instance, null);
                                }
                                catch {}
                            }
                        }), "No", (Il2CppSystem.Action) new Action(() => closePopup.Invoke(VRCUiPopupManager.prop_VRCUiPopupManager_0, null)), null
                    });

                    return(false);
                }
            }
            hasTriggered = false;
            return(true);
        }
Пример #18
0
 public static Player GetPlayer(this PortalInternal internalportal)
 {
     return(internalportal.prop_Player_0);
 }
Пример #19
0
        public override void OnStart()
        {
            // Инициализация меню
            mainMenuP1     = new QMNestedButton("ShortcutMenu", 5, 2, "Utils", "Ice Burn Utils");
            mainMenuP2     = new QMNestedButton(mainMenuP1, 5, 1, "Next\nPage", "Page 2");
            mainMenuP3     = new QMNestedButton(mainMenuP2, 5, 1, "Next\nPage", "Page 3");
            speedHackMenu  = new QMNestedButton(mainMenuP1, 1, 2, "Player\nSpeed", "Speed Hack Menu");
            brightnessMenu = new QMNestedButton(mainMenuP2, 1, 1, "Light\nIntensity", "Set Light Intensity");
            lightMenu      = new QMNestedButton(mainMenuP2, 3, 1, "Light\nMenu", "User Light Menu");

            // Это просто нужно
            mainMenuP2.getBackButton().setButtonText("Previous\nPage");
            mainMenuP3.getBackButton().setButtonText("Previous\nPage");

            // Инициализация кнопок

            toggleESP = new QMToggleButton(mainMenuP1, 3, 0,
                                           "ESP ON", new Action(() =>
            {
                GlobalUtils.ESP = true;

                var allPlayers = PlayerWrapper.GetAllPlayers().ToArray();
                for (int i = 0; i < allPlayers.Length; i++)
                {
                    Transform sRegion = allPlayers[i].transform.Find("SelectRegion");
                    if (sRegion != null)
                    {
                        sRegion.GetComponent <Renderer>().sharedMaterial.SetColor("_Color", Color.red);
                        Renderer testRenderer = allPlayers[i].field_Internal_VRCPlayer_0.namePlate.gameObject.GetComponent <Renderer>();
                        HighlightsFX.prop_HighlightsFX_0.EnableOutline(testRenderer, GlobalUtils.ESP);
                        HighlightsFX.prop_HighlightsFX_0.EnableOutline(sRegion.GetComponent <Renderer>(), GlobalUtils.ESP);
                    }
                }
                IceLogger.Log("ESP has been Enabled");
            }), "ESP OFF", new Action(() =>
            {
                GlobalUtils.ESP = false;

                var allPlayers = PlayerWrapper.GetAllPlayers().ToArray();
                for (int i = 0; i < allPlayers.Length; i++)
                {
                    Transform sRegion = allPlayers[i].transform.Find("SelectRegion");
                    if (sRegion != null)
                    {
                        sRegion.GetComponent <Renderer>().sharedMaterial.SetColor("_Color", Color.red);
                        HighlightsFX.prop_HighlightsFX_0.EnableOutline(sRegion.GetComponent <Renderer>(), GlobalUtils.ESP);
                    }
                }
                IceLogger.Log("ESP has been Disabled");
            }), "Toggle ESP");

            void updatepointlist()
            {
                // Remove old Buttons
                foreach (QMHalfButton item in tPointList)
                {
                    item.DestroyMe();
                }
                tPointList.Clear();

                removeAllPointsToTeleport.setTextColor(Color.red);
                if (pointTeleportList.Count < 24)
                {
                    createNewPointToTeleport.setActive(true);
                }
                else
                {
                    createNewPointToTeleport.setActive(false);
                }

                int   localX = 1;
                float localY = -0.5f;

                foreach (GameObject point in pointTeleportList)
                {
                    QMHalfButton tmpButton = new QMHalfButton(pointTeleportMenu, localX, localY, point.name, new Action(() =>
                    {
                        try
                        {
                            IceLogger.Log("Trying Teleport TO: [" + point.name + "]");
                            PlayerWrapper.GetCurrentPlayer().transform.position = point.transform.position;
                        }
                        catch (Exception ex)
                        {
                            IceLogger.Error(ex.ToString());
                        }
                    }), "Teleport To " + point.name);

                    localX++;
                    if (localX > 4)
                    {
                        localX  = 1;
                        localY += 1f;
                    }
                    tPointList.Add(tmpButton);
                }

                if (pointTeleportList.Count < 24)
                {
                    createNewPointToTeleport.setActive(true);
                }
                else
                {
                    createNewPointToTeleport.setActive(false);
                }
            }

            pointTeleportMenu = new QMNestedButton(mainMenuP1, 2, 1, "Point\nTeleport", new Action(() =>
            {
                updatepointlist();
            }), "Teleport TO Points");

            removeAllPointsToTeleport = new QMHalfButton(pointTeleportMenu, 5, 2.5f, "Remove All", new Action(() =>
            {
                foreach (QMHalfButton buttons in tPointList)
                {
                    buttons.DestroyMe();
                }
                tPointList.Clear();
                pointTeleportList.Clear();

                if (pointTeleportList.Count < 24)
                {
                    createNewPointToTeleport.setActive(true);
                }
                else
                {
                    createNewPointToTeleport.setActive(false);
                }
            }), "Remove All Points");

            createNewPointToTeleport = new QMHalfButton(pointTeleportMenu, 5, 1.5f, "Create New", new Action(() =>
            {
                Transform tmpPlayerTransform = PlayerWrapper.GetCurrentPlayer().gameObject.transform;
                GameObject tmpPointGO        = GameObject.Instantiate(new GameObject(), tmpPlayerTransform);
                Text tmpPointGOText          = tmpPointGO.AddComponent <Text>();

                //tmpPointGOText.font = Resources.GetBuiltinResource(Il2CppSystem.Type.typeof(Font), "BankGothicLight.ttf") as Font;
                tmpPointGOText.text = PlayerWrapper.GetCurrentPlayer().transform.position.ToString();
                tmpPointGO.name     = tmpPointGOText.text;

                pointTeleportList.Add(tmpPointGO);
                updatepointlist();
            }), "Create New Point");

            quitApp = new QMSingleButton("UIElementsMenu", 5, 2, "Quit\nGame", new Action(() =>
            {
                Process.GetCurrentProcess().Kill();
                UnityEngine.Application.Quit();
            }), "Quit Game", null, Color.red);

            resetWalkSpeed = new QMSingleButton(speedHackMenu, 1, 0, "Reset\nSpeed\n[" + GlobalUtils.walkSpeed + "]", new Action(() =>
            {
                GlobalUtils.walkSpeed = 2;
                GlobalUtils.UpdatePlayerSpeed();
                resetWalkSpeed.setButtonText("Reset\nSpeed\n[" + GlobalUtils.walkSpeed + "]");
            }), "Reset Speed To Default [2]");

            WalkSpeedUp = new QMHalfButton(speedHackMenu, 2, -0.5f, "▲", new Action(() =>
            {
                GlobalUtils.walkSpeed++;
                GlobalUtils.UpdatePlayerSpeed();
                resetWalkSpeed.setButtonText("Reset\nSpeed\n[" + GlobalUtils.walkSpeed + "]");
            }), "Speed UP");

            WalkSpeedDown = new QMHalfButton(speedHackMenu, 2, 0.5f, "▼", new Action(() =>
            {
                GlobalUtils.walkSpeed--;
                GlobalUtils.UpdatePlayerSpeed();
                resetWalkSpeed.setButtonText("Reset\nSpeed\n[" + GlobalUtils.walkSpeed + "]");
            }), "Speed DOWN");

            WalkSpeedUpX = new QMHalfButton(speedHackMenu, 3, -0.5f, "▲▲▲", new Action(() =>
            {
                GlobalUtils.walkSpeed += 3;
                GlobalUtils.UpdatePlayerSpeed();
                resetWalkSpeed.setButtonText("Reset\nSpeed\n[" + GlobalUtils.walkSpeed + "]");
            }), "Speed UP 3X");

            WalkSpeedDownX = new QMHalfButton(speedHackMenu, 3, 0.5f, "▼▼▼", new Action(() =>
            {
                GlobalUtils.walkSpeed -= 3;
                GlobalUtils.UpdatePlayerSpeed();
                resetWalkSpeed.setButtonText("Reset\nSpeed\n[" + GlobalUtils.walkSpeed + "]");
            }), "Speed DOWN 3X");

            ohShiitWalk = new QMSingleButton(speedHackMenu, 1, 2, "SHEEET", new Action(() =>
            {
                GlobalUtils.walkSpeed += 1000;
                GlobalUtils.UpdatePlayerSpeed();
                resetWalkSpeed.setButtonText("Reset\nSpeed\n[" + GlobalUtils.walkSpeed + "]");
            }), "OH SHEEEEEEEEEEEEEEEEEEEET");

            deleteAllPortals = new QMSingleButton(mainMenuP2, 2, 0, "Delete\nPortals", new Action(() =>
            {
                (from portal in Resources.FindObjectsOfTypeAll <PortalInternal>()
                 where portal.gameObject.activeInHierarchy && !portal.gameObject.GetComponentInParent <VRC_PortalMarker>()
                 select portal).ToList <PortalInternal>().ForEach(delegate(PortalInternal p)
                {
                    Player component = Networking.GetOwner(p.gameObject).gameObject.GetComponent <Player>();
                    UnityEngine.Object.Destroy(p.transform.root.gameObject);
                });
            }), "Delete All Portals");

            hideAllPortals = new QMSingleButton(mainMenuP1, 3, 1, "Hide\nPortals", new Action(() =>
            {
                (from portal in Resources.FindObjectsOfTypeAll <PortalInternal>()
                 where portal.gameObject.activeInHierarchy && !portal.gameObject.GetComponentInParent <VRC_PortalMarker>()
                 select portal).ToList <PortalInternal>().ForEach(delegate(PortalInternal p)
                {
                    Player component = Networking.GetOwner(p.gameObject).gameObject.GetComponent <Player>();
                    p.transform.root.gameObject.SetActive(false);
                });
            }), "Hide All Portals");

            toggleAudioBitrate = new QMToggleButton(mainMenuP1, 2, 2, "64kbps", new Action(() =>
            {
                PlayerWrapper.GetCurrentPlayer().field_Private_USpeaker_0.CurrentBitrate = EnumPublicSealedvaBi15BiBiBiBiBiBiBiUnique.BitRate_64k;
            }), "24kbps", new Action(() =>
            {
                PlayerWrapper.GetCurrentPlayer().field_Private_USpeaker_0.CurrentBitrate = EnumPublicSealedvaBi15BiBiBiBiBiBiBiUnique.BitRate_24K;
            }), "Toggle Audio Bitrate");

            reconnectInstance = new QMSingleButton(mainMenuP1, 3, 2, "Reconnect", new Action(() =>
            {
                Networking.GoToRoom(Wrapper.GetInstance().instanceWorld.id + ":" + Wrapper.GetInstance().instanceWorld.currentInstanceIdWithTags);
            }), "Reconnect to instance");

            test = new QMSingleButton(mainMenuP1, 4, 2, "Test", new Action(() =>
            {
                var allPlayers = PlayerWrapper.GetAllPlayers().ToArray();
                for (int i = 0; i < allPlayers.Length; i++)
                {
                    IceLogger.Log(allPlayers[i].field_Internal_VRCPlayer_0.prop_String_0);
                    IceLogger.Log(allPlayers[i].field_Internal_VRCPlayer_0.prop_String_1);
                    var usertags = allPlayers[i].GetAPIUser().tags;
                    foreach (var tags in usertags)
                    {
                        IceLogger.Log(allPlayers[i].ToString() + " " + tags);
                    }
                    //Status: IceLogger.Log(allPlayers[i].field_Internal_VRCPlayer_0.field_Internal_String_1.ToString());
                }

                IceLogger.Log(PlayerWrapper.GetCurrentPlayer().namePlate.mainText.font.name);

                /*var allPlayers = Wrapper.GetPlayerManager().GetAllPlayers().ToArray();
                 * for (int i = 0; i < allPlayers.Length; i++)
                 * {
                 *  Image someImage = allPlayers[i].field_Internal_VRCPlayer_0.friendSprite.gameObject.AddComponent<Image>();
                 *  someImage.rectTransform.anchoredPosition += new Vector2(-1f, 0f);
                 *
                 *  float distance = Vector3.Distance(PlayerWrapper.GetCurrentPlayer().transform.position, allPlayers[i].transform.position);
                 *  IceLogger.Log(allPlayers[i].field_Internal_VRCPlayer_0.prop_String_0 + ": " + distance);
                 *
                 *  IceLogger.Log(allPlayers[i].field_Internal_VRCPlayer_0.prop_String_0 + ": " + allPlayers[i].field_Internal_VRCPlayer_0.prop_String_1);
                 *  var usertags = allPlayers[i].GetAPIUser().tags;
                 *  foreach (var tags in usertags)
                 *  {
                 *      IceLogger.Log(allPlayers[i].field_Internal_VRCPlayer_0.prop_String_0 + ": " + tags);
                 *  }
                 * }*/
            }), "Test");

            toggleShadows = new QMToggleButton(mainMenuP2, 3, 0, "Shadows ON", new Action(() =>
            {
                foreach (Light light in Resources.FindObjectsOfTypeAll <Light>())
                {
                    light.shadows          = LightShadows.Soft;
                    light.shadowResolution = UnityEngine.Rendering.LightShadowResolution.High;
                }
            }), "Shadows OFF", new Action(() =>
            {
                foreach (Light light in Resources.FindObjectsOfTypeAll <Light>())
                {
                    light.shadows = LightShadows.None;
                }
            }), "Toggle Shadows on map");

            addJump = new QMSingleButton(mainMenuP2, 1, 0, "Add\nJump", new Action(() =>
            {
                if (VRCPlayer.field_Internal_Static_VRCPlayer_0.gameObject.GetComponent <PlayerModComponentJump>())
                {
                    return;
                }
                else
                {
                    PlayerWrapper.GetCurrentPlayer().gameObject.AddComponent <PlayerModComponentJump>();
                }
            }), "Add JumpComponent to you");

            toggleOptimizeMirror = new QMToggleButton(mainMenuP2, 4, 0, "Optimized Mirror", new Action(() =>
            {
                MirrorReflection[] array = UnityEngine.Object.FindObjectsOfType <MirrorReflection>();
                LayerMask mask           = new LayerMask();
                mask.value = 263680;

                for (int i = 0; i < array.Length; i++)
                {
                    array[i].m_ReflectLayers = mask;//.value = 263680;
                }
                VRCSDK2.VRC_MirrorReflection[] array2 = UnityEngine.Object.FindObjectsOfType <VRCSDK2.VRC_MirrorReflection>();
                for (int i = 0; i < array2.Length; i++)
                {
                    array2[i].m_ReflectLayers = mask;//.value = 263680;
                }

                VRC_MirrorReflection[] array4 = UnityEngine.Object.FindObjectsOfType <VRC_MirrorReflection>();
                for (int i = 0; i < array4.Length; i++)
                {
                    array4[i].m_ReflectLayers = mask;//.value = -1025;
                }
            }), "Normal Mirror", new Action(() =>
            {
                MirrorReflection[] array = UnityEngine.Object.FindObjectsOfType <MirrorReflection>();
                LayerMask mask           = new LayerMask();
                mask.value = -1025;

                for (int i = 0; i < array.Length; i++)
                {
                    array[i].m_ReflectLayers = mask;//.value = 263680;
                }
                VRCSDK2.VRC_MirrorReflection[] array2 = UnityEngine.Object.FindObjectsOfType <VRCSDK2.VRC_MirrorReflection>();
                for (int i = 0; i < array2.Length; i++)
                {
                    array2[i].m_ReflectLayers = mask;//.value = 263680;
                }

                VRC_MirrorReflection[] array4 = UnityEngine.Object.FindObjectsOfType <VRC_MirrorReflection>();
                for (int i = 0; i < array4.Length; i++)
                {
                    array4[i].m_ReflectLayers = mask;//.value = -1025;
                }
            }), "Toggle Shadows on map");

            brightnessUp = new QMHalfButton(brightnessMenu, 2, -0.5f, "▲", new Action(() =>
            {
                GlobalUtils.brightness += (1f / 10f);
                foreach (Light light in Resources.FindObjectsOfTypeAll <Light>())
                {
                    light.intensity = GlobalUtils.brightness;
                }
                resetBrightness.setButtonText("Reset\nBrightness\n[" + GlobalUtils.brightness + "]");
            }), "Brightness Up");

            brightnessDown = new QMHalfButton(brightnessMenu, 2, 0.5f, "▼", new Action(() =>
            {
                GlobalUtils.brightness -= (1f / 10f);
                foreach (Light light in Resources.FindObjectsOfTypeAll <Light>())
                {
                    light.intensity = GlobalUtils.brightness;
                }
                resetBrightness.setButtonText("Reset\nBrightness\n[" + GlobalUtils.brightness + "]");
            }), "Brightness Down");

            resetBrightness = new QMSingleButton(brightnessMenu, 1, 0, "Reset\nBrightness\n[" + GlobalUtils.brightness + "]", new Action(() =>
            {
                GlobalUtils.brightness = 1f;
                foreach (Light light in Resources.FindObjectsOfTypeAll <Light>())
                {
                    light.intensity = GlobalUtils.brightness;
                }
                resetBrightness.setButtonText("Reset\nBrightness\n[" + GlobalUtils.brightness + "]");
            }), "Reset To Default Brightness");

            toggleHand = new QMToggleButton(mainMenuP2, 2, 1, "Hand ON", new Action(() =>
            {
                /*controller = PlayerWrapper.GetCurrentPlayer().prop_Player_0.prop_VRCAvatarManager_0.prop_GameObject_0.GetComponent<RootMotion.FinalIK.VRIK>();
                 * if (Input.GetMouseButton(1))
                 * {
                 *  if (controller != null)
                 *  {
                 *      switch (hand)
                 *      {
                 *          case Hand.Left:
                 *              controller.solver.leftArm.positionWeight = 1;
                 *              controller.solver.leftArm.rotationWeight = 1;
                 *              break;
                 *          case Hand.Right:
                 *              controller.solver.rightArm.positionWeight = 1;
                 *              controller.solver.rightArm.rotationWeight = 1;
                 *              break;
                 *          case Hand.Both:
                 *              controller.solver.leftArm.positionWeight = 1;
                 *              controller.solver.leftArm.rotationWeight = 1;
                 *              controller.solver.rightArm.positionWeight = 1;
                 *              controller.solver.rightArm.rotationWeight = 1;
                 *              break;
                 *          default:
                 *              break;
                 *      }
                 *  }
                 * }*/
            }), "Hand OFF", new Action(() =>
            {
            }), "Toggle Sphere For Desktop Hand");

            toggleOwnLight = new QMToggleButton(lightMenu, 1, 0, "Light ON", new Action(() =>
            {
                PlayerLight.enabled = true;
            }), "Light OFF", new Action(() =>
            {
                PlayerLight.enabled = false;
            }), "Toggle Own Light");

            toggleOwnLightShadows = new QMToggleButton(lightMenu, 1, 1, "Shadows ON", new Action(() =>
            {
                PlayerLight.shadows          = LightShadows.Soft;
                PlayerLight.shadowResolution = UnityEngine.Rendering.LightShadowResolution.VeryHigh;
            }), "Shadows OFF", new Action(() =>
            {
                PlayerLight.shadows = LightShadows.None;
            }), "Toggle Own Shadow");

            ownLightIntUp = new QMHalfButton(lightMenu, 2, -0.5f, "▲", new Action(() =>
            {
                GlobalUtils.ownBrightness += 1f / 10f;
                ownLightIntReset.setButtonText("Reset\nInt\n[" + GlobalUtils.ownBrightness + "]");
                PlayerLight.intensity = GlobalUtils.ownBrightness;
            }), "Light Int UP");

            ownLightIntDown = new QMHalfButton(lightMenu, 2, 0.5f, "▼", new Action(() =>
            {
                if (GlobalUtils.ownBrightness <= 0)
                {
                    GlobalUtils.ownBrightness = 0.1f;
                }
                GlobalUtils.ownBrightness -= 1f / 10f;
                ownLightIntReset.setButtonText("Reset\nInt\n[" + GlobalUtils.ownBrightness + "]");
                PlayerLight.intensity = GlobalUtils.ownBrightness;
            }), "Light Int DOWN");

            ownLightIntReset = new QMSingleButton(lightMenu, 3, 0, "Reset\nInt\n[" + GlobalUtils.ownBrightness + "]", new Action(() =>
            {
                GlobalUtils.ownBrightness = 1f;
                PlayerLight.intensity     = GlobalUtils.ownBrightness;
                ownLightIntReset.setButtonText("Reset\nInt\n[" + GlobalUtils.ownBrightness + "]");
            }), "Reset Own Light Int");

            ownLightAdd = new QMSingleButton(lightMenu, 4, 0, "Init\nLight", new Action(() =>
            {
                VRCPlayer player       = PlayerWrapper.GetCurrentPlayer();
                GameObject def         = GameObject.Instantiate(new GameObject(), player.transform);
                def.transform.position = player.transform.position + (player.transform.forward * 0.5f) + player.transform.up;
                PlayerLight            = def.AddComponent <Light>();
                PlayerLight.type       = LightType.Point;
                PlayerLight.intensity  = 1.0f;
                PlayerLight.enabled    = false;
                IceLogger.Log("Light XPos: " + def.transform.position.x);
                IceLogger.Log("Light YPos: " + def.transform.position.y);
                IceLogger.Log("Light ZPos: " + def.transform.position.z);
            }), "USE ONE TIME!");

            toggleGDB = new QMToggleButton(mainMenuP2, 1, 2, "GDB ON", new Action(() =>
            {
                GlobalDynamicBones.AddAllCollidersToAllPlayers();
            }), "GDB OFF", new Action(() =>
            {
                GlobalDynamicBones.RestoreOriginalColliderList();
            }), "Toggle GlobalDynamicBones");

            togglePortalColliders = new QMToggleButton(mainMenuP2, 2, 2, "PortalCol. ON", new Action(() =>
            {
                try
                {
                    IEnumerator <PortalInternal> enumerator = UnityEngine.Object.FindObjectsOfType <PortalInternal>().GetEnumerator();
                    try
                    {
                        while (enumerator.MoveNext())
                        {
                            PortalInternal portalInternal = enumerator.Current;
                            portalInternal.gameObject.GetComponent <Collider>().enabled = true;
                        }
                    }
                    finally
                    {
                        if (enumerator != null)
                        {
                            enumerator.Dispose();
                        }
                    }
                }
                catch { }
            }), "PortalCol. OFF", new Action(() =>
            {
                try
                {
                    IEnumerator <PortalInternal> enumerator = UnityEngine.Object.FindObjectsOfType <PortalInternal>().GetEnumerator();
                    try
                    {
                        while (enumerator.MoveNext())
                        {
                            PortalInternal portalInternal = enumerator.Current;
                            portalInternal.gameObject.GetComponent <Collider>().enabled = false;
                        }
                    }
                    finally
                    {
                        if (enumerator != null)
                        {
                            enumerator.Dispose();
                        }
                    }
                }
                catch { }
            }), "Toggle Portal Colliders");

            toggleFreeCamera = new QMToggleButton(mainMenuP2, 3, 2, "FreeCam ON", new Action(() =>
            {
                GameObject playerOrigCam = Wrapper.GetPlayerCamera().gameObject;
                GameObject playerFreeCam = GameObject.Instantiate(playerOrigCam, playerOrigCam.transform.position, playerOrigCam.transform.rotation);
                playerFreeCam.name       = "playerFreeCam";
                GlobalUtils.FreeCam      = true;
            }), "FreeCam OFF", new Action(() =>
            {
                GlobalUtils.FreeCam   = false;
                GlobalUtils.walkSpeed = 2;
                GlobalUtils.UpdatePlayerSpeed();
                resetWalkSpeed.setButtonText("Reset\nSpeed\n[" + GlobalUtils.walkSpeed + "]");
                GameObject.Destroy(GameObject.Find("playerFreeCam"));
            }), "Toggle Free Cam");
        }