Exemple #1
0
        public override void OnStart()
        {
            ButtonAPI.CreateButton(ButtonAPI.ButtonType.Toggle, "Mirror Q", "Toggle mirror quality",
                                   ButtonAPI.HorizontalPosition.FourthButtonPos, ButtonAPI.VerticalPosition.SecondButton, ButtonAPI.MakeEmptyPage("PureCheat").transform, delegate(bool a)
            {
                MirrorReflection[] array = Object.FindObjectsOfType <MirrorReflection>();
                LayerMask mask           = new LayerMask();

                mask.value = a ? 263680 : -1025;

                for (int i = 0; i < array.Length; i++)
                {
                    array[i].m_ReflectLayers = mask;
                }

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

                VRC_MirrorReflection[] array4 = Object.FindObjectsOfType <VRC_MirrorReflection>();
                for (int i = 0; i < array4.Length; i++)
                {
                    array4[i].m_ReflectLayers = mask;
                }
            }, Color.white, Color.green, null, false, false);
        }
Exemple #2
0
        // ▲▼
        public override void OnStart()
        {
            //Change QM collider size [for more buttons]
            GameObject.Find("UserInterface/QuickMenu").GetComponent <BoxCollider>().size = new Vector3(5034.68f, 3342.426f, 1f);

            ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "HVH\nMod", "HVH menu",
                                   ButtonAPI.HorizontalPosition.LeftOfMenu, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.ShortcutMenuTransform, delegate(bool a)
            {
                ButtonAPI.EnterSubMenu(ButtonAPI.MakeEmptyPage("HVH"));
            }, Color.red, Color.magenta, null, true, false, false, false, null, true);

            ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "Player List", "Player list menu",
                                   ButtonAPI.HorizontalPosition.FirstButtonPos, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("HVH").transform, delegate(bool a)
            {
                ButtonAPI.EnterSubMenu(ButtonAPI.MakeEmptyPage("PlayerList"));
            }, Color.red, Color.magenta, null, false, true, false, false, null, true);

            ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "User\nUtils", "User utils menu [HVH]",
                                   ButtonAPI.HorizontalPosition.SecondButtonPos, ButtonAPI.VerticalPosition.BelowBottomButton, ButtonAPI.UserInteractMenuTransform, delegate(bool a)
            {
                ButtonAPI.EnterSubMenu(ButtonAPI.MakeEmptyPage("UserUtils"));
            }, Color.red, Color.magenta, null, true);

            isUIInit = true;
        }
Exemple #3
0
 public override void OnStart()
 {
     ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "Teleport", "Teleport to player",
                            ButtonAPI.HorizontalPosition.FirstButtonPos, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("UserUtils").transform, delegate(bool a)
     {
         PureUtils.GetLocalPlayer().transform.position = PureUtils.GetSelectedPlayerOrNull().gameObject.transform.position;
     }, Color.white, Color.white, null, false, false);
 }
Exemple #4
0
 public override void OnStart()
 {
     ButtonAPI.CreateButton(ButtonAPI.ButtonType.Toggle, "Quck Info!", "Toggle quick info on players",
                            ButtonAPI.HorizontalPosition.ThirdButtonPos, ButtonAPI.VerticalPosition.SecondButton, ButtonAPI.MakeEmptyPage("PureCheat").transform, delegate(bool a)
     {
         toggleQuickInfo = a;
     }, Color.white, Color.yellow, null, false, false);
 }
Exemple #5
0
 public override void OnStart()
 {
     ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "Get VRCA", "Download VRCA of Player",
                            ButtonAPI.HorizontalPosition.SecondButtonPos, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("UserUtils").transform, delegate(bool a)
     {
         Process.Start(Wrapper.GetQuickMenu().GetSelectedPlayer().field_Internal_VRCPlayer_0.prop_ApiAvatar_0.assetUrl);
     }, Color.white, Color.white, null, false, false);
 }
Exemple #6
0
 public override void OnStart()
 {
     ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "Reconnect", "Reconnect to instance",
                            ButtonAPI.HorizontalPosition.ThirdButtonPos, ButtonAPI.VerticalPosition.SecondButton, ButtonAPI.MakeEmptyPage("PureCheat").transform, delegate(bool a)
     {
         Networking.GoToRoom(PureUtils.GetInstance().instanceWorld.id + ":" + PureUtils.GetInstance().instanceWorld.currentInstanceIdWithTags);
     }, Color.white, Color.white, null, false, false);
 }
Exemple #7
0
 public override void OnStart()
 {
     earRapeButton = ButtonAPI.CreateButton(ButtonAPI.ButtonType.Toggle, "EarRape", "F**K ALL EARS",
                                            ButtonAPI.HorizontalPosition.FourthButtonPos, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("PureCheat").transform, delegate(bool a)
     {
         USpeaker.field_Internal_Static_Single_1 = a ? float.MaxValue : 1f;
         PureLogger.Log(a ? ConsoleColor.Red : ConsoleColor.Green, a ? "EarRape Enabled" : "EarRape Disabled");
     }, Color.white, Color.red, null, false, false, false, false, null, true);
 }
Exemple #8
0
        public override void OnStart()
        {
            beerEmojiButton = GameObject.Find("UserInterface/QuickMenu/EmojiMenu/Page2/EmojiButton2").GetComponent <Button>();

            ButtonAPI.CreateButton(ButtonAPI.ButtonType.Toggle, "Beer Time!", "Toggle spam snow emoji",
                                   ButtonAPI.HorizontalPosition.FirstButtonPos, ButtonAPI.VerticalPosition.SecondButton, ButtonAPI.MakeEmptyPage("PureCheat").transform, delegate(bool a)
            {
                toggleState = a;
            }, Color.white, Color.yellow, null, false);
        }
Exemple #9
0
        public override void OnStart()
        {
            //UserInterface/QuickMenu/EmojiMenu/Page5/EmojiButton2
            micButton = GameObject.Find("UserInterface/QuickMenu/MicControls/MicButton").GetComponent <Button>();

            ButtonAPI.CreateButton(ButtonAPI.ButtonType.Toggle, "RIP Mic", "Fast toggle microphone",
                                   ButtonAPI.HorizontalPosition.FourthButtonPos, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("PureCheat").transform, delegate(bool a)
            {
                toggleState = a;
            }, Color.white, Color.red, null);
        }
Exemple #10
0
        public override void OnStart()
        {
            ButtonAPI.CreateButton(ButtonAPI.ButtonType.Toggle, "ESP", "ESP",
                                   ButtonAPI.HorizontalPosition.SecondButtonPos, ButtonAPI.VerticalPosition.SecondButton, ButtonAPI.MakeEmptyPage("PureCheat").transform, delegate(bool a)
            {
                toggleESP = a;

                localList   = PureUtils.GetPlayers();
                localPlayer = PureUtils.GetLocalPlayer();
            }, Color.white, Color.cyan, null);
        }
Exemple #11
0
 public override void OnStart()
 {
     ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "Allow Clone", "Allow to clone all avatars",
                            ButtonAPI.HorizontalPosition.SecondButtonPos, ButtonAPI.VerticalPosition.SecondButton, ButtonAPI.MakeEmptyPage("PureCheat").transform, delegate(bool a)
     {
         foreach (Player player in PureUtils.GetPlayers())
         {
             player.prop_APIUser_0.allowAvatarCopying = true;
         }
     }, Color.white, Color.white, null, false, false);
 }
        public override void OnStart()
        {
            killButton = ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "Quit", "Shutdown game",
                                                ButtonAPI.HorizontalPosition.ThirdButtonPos, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("PureCheat").transform, delegate(bool a)
            {
                Application.Quit();

                Timer aTimer    = new System.Timers.Timer();
                aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
                aTimer.Interval = 800;
                aTimer.Enabled  = true;
            }, Color.red, Color.red, null);
        }
Exemple #13
0
 public override void OnStart()
 {
     ButtonAPI.CreateButton(ButtonAPI.ButtonType.Toggle, "VRChat -", "Toggle Remove VRC+",
                            ButtonAPI.HorizontalPosition.ThirdButtonPos, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("PureCheat").transform, delegate(bool a)
     {
         GameObject.Find("UserInterface/QuickMenu/ShortcutMenu/UserIconButton").SetActive(!a);
         GameObject.Find("UserInterface/QuickMenu/ShortcutMenu/VRCPlusMiniBanner/Image").SetActive(!a);
         GameObject.Find("UserInterface/MenuContent/Screens/UserInfo/User Panel/Supporter").SetActive(!a);
         GameObject.Find("UserInterface/MenuContent/Screens/UserInfo/AvatarImage/SupporterIcon").SetActive(!a);
         GameObject.Find("UserInterface/QuickMenu/ShortcutMenu/HeaderContainer/VRCPlusBanner/Panel").SetActive(!a);
         GameObject.Find("UserInterface/MenuContent/Screens/UserInfo/User Panel/VRCPlusEarlyAdopter").SetActive(!a);
         GameObject.Find("UserInterface/MenuContent/Backdrop/Header/Tabs/ViewPort/Content/VRC+PageTab").SetActive(!a);
         GameObject.Find("UserInterface/MenuContent/Backdrop/Header/Tabs/ViewPort/Content/UserIconTab").SetActive(!a);
         GameObject.Find("UserInterface/MenuContent/Screens/Avatar/Vertical Scroll View/Viewport/Content/Favorite Avatar List/GetMoreFavorites").SetActive(!a);
     }, Color.yellow, Color.red, null, false, false);
 }
Exemple #14
0
        public override void OnStart()
        {
            ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "Add Jump", "Add jump component to player",
                                   ButtonAPI.HorizontalPosition.SecondButtonPos, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("PureCheat").transform, delegate(bool a)
            {
                if (PureUtils.GetLocalPlayer().GetComponent <PlayerModComponentJump>())
                {
                    return;
                }
                else
                {
                    PureUtils.GetLocalPlayer().AddComponent <PlayerModComponentJump>();
                }

                PureUtils.GetLocalPlayer().GetComponent <PlayerModComponentJump>().field_Private_Single_0 = 3.0f;
                //PureUtils.GetLocalPlayer().GetComponent<PlayerModComponentJump>().field_Private_Single_1 = 3.0f;
            }, Color.white, Color.white, null);
        }
        public override void OnStart()
        {
            playerCamera = Wrapper.GetLocalPlayerCamera().GetComponent <Camera>();

            defaultFOV = playerCamera.fieldOfView;
            playerCamera.fieldOfView = FOV;

            ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "FOV Menu", "Field of view menu",
                                   ButtonAPI.HorizontalPosition.SecondButtonPos, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("PureCheat").transform, delegate(bool a)
            {
                ButtonAPI.EnterSubMenu(ButtonAPI.MakeEmptyPage("FOVMenu"));
            }, Color.white, Color.white, null, false, false);

            resetFOVButton = ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, $"FOV [{FOV}]", $"Set field of view to {defaultFOV}",
                                                    ButtonAPI.HorizontalPosition.FirstButtonPos, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("FOVMenu").transform, delegate(bool a)
            {
                FOV = defaultFOV;
                playerCamera.fieldOfView = FOV;
                resetFOVButton.transform.GetComponentInChildren <Text>().text = $"FOV [{FOV}]";
            }, Color.white, Color.white, null, true);

            ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "▲", "Set field of view up",
                                   ButtonAPI.HorizontalPosition.SecondButtonPos, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("FOVMenu").transform, delegate(bool a)
            {
                FOV += 1;
                playerCamera.fieldOfView = FOV;
                resetFOVButton.transform.GetComponentInChildren <Text>().text = $"FOV [{FOV}]";
            }, Color.white, Color.white, null, false, false);

            ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "▼", "Set field of view down",
                                   ButtonAPI.HorizontalPosition.SecondButtonPos, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("FOVMenu").transform, delegate(bool a)
            {
                FOV -= 1;

                if (FOV <= 0)
                {
                    FOV = 1;
                }

                playerCamera.fieldOfView = FOV;
                resetFOVButton.transform.GetComponentInChildren <Text>().text = $"FOV [{FOV}]";
            }, Color.white, Color.white, null, false);
        }
Exemple #16
0
        public override void OnStart()
        {
            ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "Fly Menu", "Fly menu",
                                   ButtonAPI.HorizontalPosition.FirstButtonPos, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("PureCheat").transform, delegate(bool a)
            {
                ButtonAPI.EnterSubMenu(ButtonAPI.MakeEmptyPage("FlyMenu"));
            }, Color.white, Color.white, null, false, false);

            toggleFlyButton = ButtonAPI.CreateButton(ButtonAPI.ButtonType.Toggle, "Fly", "Toggle fly",
                                                     ButtonAPI.HorizontalPosition.FirstButtonPos, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("FlyMenu").transform, delegate(bool a)
            {
                isFly = a;
                PureUtils.GetLocalPlayer().GetComponent <CharacterController>().enabled = !a;
                PureLogger.Log(a ? "Fly enabled" : "Fly Disabled");
            }, Color.white, Color.red, null, false, false);

            resetFlySpeedButton = ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, $"Speed [{flySpeed}]", "Reset fly speed",
                                                         ButtonAPI.HorizontalPosition.FirstButtonPos, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("FlyMenu").transform, delegate(bool a)
            {
                flySpeed = 2;
                resetFlySpeedButton.SetText($"Speed [{flySpeed}]");
            }, Color.white, Color.white, null, false);

            ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "▲", "Fly speed up",
                                   ButtonAPI.HorizontalPosition.SecondButtonPos, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("FlyMenu").transform, delegate(bool a)
            {
                flySpeed += 1;
                resetFlySpeedButton.SetText($"Speed [{flySpeed}]");
            }, Color.white, Color.white, null, false, false);

            ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "▼", "Fly speed down",
                                   ButtonAPI.HorizontalPosition.SecondButtonPos, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("FlyMenu").transform, delegate(bool a)
            {
                flySpeed -= 1;

                if (flySpeed <= 0)
                {
                    flySpeed = 1;
                }

                resetFlySpeedButton.SetText($"Speed [{flySpeed}]");
            }, Color.white, Color.white, null, false);
        }
Exemple #17
0
        public override void OnStart()
        {
            try
            {
                if (Buttons.Count() == 0)
                {
                    Transform parent = Wrappers.GetQuickMenu().transform.Find("UIElementsMenu");

                    if (parent != null)
                    {
                        var Flightbutton = ButtonAPI.CreateButton(ButtonType.Toggle, "Flight", "Enable/Disable Flight", Color.white, Color.blue, -1, 0, parent, new Action(() =>
                        {
                            GlobalUtils.DirectionalFlight = true;
                            Physics.gravity = GlobalUtils.DirectionalFlight ? Vector3.zero : GlobalUtils.Grav;
                            GlobalUtils.ToggleColliders(false);
                            MelonModLogger.Log($"Flight has been {(GlobalUtils.DirectionalFlight ? "Enabled" : "Disabled")}.");
                        }), new Action(() =>
                        {
                            GlobalUtils.DirectionalFlight = false;
                            Physics.gravity = GlobalUtils.DirectionalFlight ? Vector3.zero : GlobalUtils.Grav;
                            GlobalUtils.ToggleColliders(true);
                            MelonModLogger.Log($"Flight has been {(GlobalUtils.DirectionalFlight ? "Enabled" : "Disabled")}.");
                        }));

                        var ESPbutton = ButtonAPI.CreateButton(ButtonType.Toggle, "ESP", "Enable/Disable Selected ESP", Color.white, Color.blue, 0, 0, parent, new Action(() =>
                        {
                            GlobalUtils.SelectedPlayerESP = true;
                            MelonModLogger.Log($"Selected ESP has been {(GlobalUtils.SelectedPlayerESP ? "Enabled" : "Disabled")}.");

                            GameObject[] array = GameObject.FindGameObjectsWithTag("Player");
                            for (int i = 0; i < array.Length; i++)
                            {
                                if (array[i].transform.Find("SelectRegion"))
                                {
                                    array[i].transform.Find("SelectRegion").GetComponent <Renderer>().sharedMaterial.SetColor("_Color", Color.magenta);
                                    HighlightsFX.prop_HighlightsFX_0.EnableOutline(array[i].transform.Find("SelectRegion").GetComponent <Renderer>(), GlobalUtils.SelectedPlayerESP);
                                }
                            }

                            foreach (VRC_Pickup pickup in Resources.FindObjectsOfTypeAll <VRC_Pickup>())
                            {
                                if (pickup.gameObject.transform.Find("SelectRegion"))
                                {
                                    pickup.gameObject.transform.Find("SelectRegion").GetComponent <Renderer>().sharedMaterial.SetColor("_Color", Color.magenta);
                                    Wrappers.GetHighlightsFX().EnableOutline(pickup.gameObject.transform.Find("SelectRegion").GetComponent <Renderer>(), GlobalUtils.SelectedPlayerESP);
                                }
                            }
                        }), new Action(() =>
                        {
                            GlobalUtils.SelectedPlayerESP = false;
                            MelonModLogger.Log($"Selected ESP has been {(GlobalUtils.SelectedPlayerESP ? "Enabled" : "Disabled")}.");

                            GameObject[] array = GameObject.FindGameObjectsWithTag("Player");
                            for (int i = 0; i < array.Length; i++)
                            {
                                if (array[i].transform.Find("SelectRegion"))
                                {
                                    array[i].transform.Find("SelectRegion").GetComponent <Renderer>().sharedMaterial.SetColor("_Color", Color.magenta);
                                    HighlightsFX.prop_HighlightsFX_0.EnableOutline(array[i].transform.Find("SelectRegion").GetComponent <Renderer>(), GlobalUtils.SelectedPlayerESP);
                                }
                            }

                            foreach (VRC_Pickup pickup in Resources.FindObjectsOfTypeAll <VRC_Pickup>())
                            {
                                if (pickup.gameObject.transform.Find("SelectRegion"))
                                {
                                    pickup.gameObject.transform.Find("SelectRegion").GetComponent <Renderer>().sharedMaterial.SetColor("_Color", Color.magenta);
                                    Wrappers.GetHighlightsFX().EnableOutline(pickup.gameObject.transform.Find("SelectRegion").GetComponent <Renderer>(), GlobalUtils.SelectedPlayerESP);
                                }
                            }
                        }));

                        var teleportButton = ButtonAPI.CreateButton(ButtonType.Default, "Teleport", "Teleport to the selected player", Color.white, Color.cyan, 0, 0, Wrappers.GetQuickMenu().transform.Find("UserInteractMenu"), new Action(() =>
                        {
                            MelonModLogger.Log("Teleporting to selected player.");
                            var player                = PlayerWrappers.GetCurrentPlayer();
                            var SelectedPlayer        = Wrappers.GetQuickMenu().GetSelectedPlayer();
                            player.transform.position = SelectedPlayer.transform.position;
                        }));

                        var Freezebutton = ButtonAPI.CreateButton(ButtonType.Toggle, "Serialize", "Enable/Disable Custom Serialisation", Color.white, Color.blue, -3, -1, parent, new Action(() =>
                        {
                            GlobalUtils.Serialise = false;
                            MelonModLogger.Log($"Custom Serialisation has been Enabled.");
                        }), new Action(() =>
                        {
                            GlobalUtils.Serialise = true;
                            MelonModLogger.Log($"Custom Serialisation has been Disabled.");
                        }));

                        var ForceCloneButton = ButtonAPI.CreateButton(ButtonType.Toggle, "Force Clone", "Enable/disable force clone", Color.white, Color.blue, -2, -1, parent, new Action(() =>
                        {
                            GlobalUtils.ForceClone = true;
                            MelonModLogger.Log($"Force Clone has been Enabled.");
                        }), new Action(() =>
                        {
                            GlobalUtils.ForceClone = false;
                            MelonModLogger.Log($"Force Clone has been Disabled.");
                        }));

                        Buttons.Add(Flightbutton.gameObject);
                        Buttons.Add(ESPbutton.gameObject);
                        Buttons.Add(teleportButton.gameObject);
                        Buttons.Add(Freezebutton.gameObject);
                        Buttons.Add(ForceCloneButton.gameObject);
                    }
                }
            }
            catch (Exception) { }
        }
Exemple #18
0
        public override void VRChat_OnUiManagerInit()
        {
            if (subMenu != "UIExpansionKit")
            {
                ButtonAPI.CustomTransform = GameObject.Find("/UserInterface/QuickMenu/" + subMenu).transform;
                ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "Vibrator\nController", "Vibrator Controller Settings", buttonX - 4, 3 - buttonY, null, delegate(bool a)
                {
                    ButtonAPI.EnterSubMenu(ButtonAPI.MakeEmptyPage("SubMenu_1"));
                }, Color.white, Color.magenta, null, true, false, false, false, null, true);
            }

            //Back
            LockButtonUI = ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "Back", "Exit this menu", ButtonAPI.HorizontalPosition.RightOfMenu, ButtonAPI.VerticalPosition.BottomButton, ButtonAPI.MakeEmptyPage("SubMenu_1").transform, delegate(bool a)
            {
                if (subMenu == "UIExpansionKit")
                {
                    ButtonAPI.EnterSubMenu(GameObject.Find("/UserInterface/QuickMenu/ShortcutMenu"));
                }
                else
                {
                    ButtonAPI.EnterSubMenu(GameObject.Find("/UserInterface/QuickMenu/" + subMenu));
                }
            }, Color.yellow, Color.magenta, null, true, false, false, false, null, true);

            //Lock button
            LockButtonUI = ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "Lock Speed\nButton", "Click than press button on controller to set button to lock vibraton speed (click twice to disable)", ButtonAPI.HorizontalPosition.FirstButtonPos, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("SubMenu_1").transform, delegate(bool a)
            {
                if (findButton == "lockButton")
                {
                    lockButton = KeyCode.None;
                    findButton = null;
                    LockKeyBind.SetText("");
                    LockButtonUI.SetText("Lock Speed\nButton");
                    MelonPreferences.SetEntryValue(vibratorController.Identifier, "lockButton", lockButton.GetHashCode());
                    return;
                }
                findButton = "lockButton";
                LockButtonUI.SetText("Press Now");
            }, Color.white, Color.magenta, null, true, false, false, false, null, true);

            LockKeyBind = ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "", "Lock Speed Keybind", ButtonAPI.HorizontalPosition.FirstButtonPos, ButtonAPI.VerticalPosition.SecondButton, ButtonAPI.MakeEmptyPage("SubMenu_1").transform, delegate(bool a)
            {
            }, Color.white, Color.grey, null, false, false, false, false, null, false);
            LockKeyBind.SetInteractivity(false);
            if (lockButton != 0)
            {
                LockKeyBind.SetText(lockButton.ToString());
            }

            //Hold button
            HoldButtonUI = ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "Hold\nButton", "Click than press button on controller to set button to hold to use toy (click twice to disable)", ButtonAPI.HorizontalPosition.SecondButtonPos, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("SubMenu_1").transform, delegate(bool a)
            {
                if (findButton == "holdButton")
                {
                    holdButton = KeyCode.None;
                    findButton = null;
                    HoldKeyBind.SetText("");
                    HoldButtonUI.SetText("Hold\nButton");
                    MelonPreferences.SetEntryValue(vibratorController.Identifier, "lockButton", holdButton.GetHashCode());
                    return;
                }
                findButton = "holdButton";
                HoldButtonUI.SetText("Press Now");
            }, Color.white, Color.magenta, null, true, false, false, false, null, true);

            HoldKeyBind = ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "", "Hold Keybind", ButtonAPI.HorizontalPosition.SecondButtonPos, ButtonAPI.VerticalPosition.SecondButton, ButtonAPI.MakeEmptyPage("SubMenu_1").transform, delegate(bool a)
            {
            }, Color.white, Color.grey, null, false, false, false, false, null, false);
            HoldKeyBind.SetInteractivity(false);
            if (holdButton != 0)
            {
                HoldKeyBind.SetText(holdButton.ToString());
            }

            //Add toy
            addButtonUI = ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "Add\nToy", "Click to pair with a friend's toy", ButtonAPI.HorizontalPosition.ThirdButtonPos, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("SubMenu_1").transform, delegate(bool a)
            {
                InputPopup("", delegate(string text)
                {
                    if (text.Length != 4)
                    {
                        addButtonUI.SetText("Add\nToys\n<color=#FF0000>Invalid Code</color>");
                    }
                    else
                    {
                        Client.send("join " + text);
                    }
                });
            }, Color.white, Color.magenta, null, true, false, false, false, null, true);

            //How to use
            ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "How To Use", "Opens instructions to use", ButtonAPI.HorizontalPosition.ThirdButtonPos, ButtonAPI.VerticalPosition.SecondButton, ButtonAPI.MakeEmptyPage("SubMenu_1").transform, delegate(bool a)
            {
                System.Diagnostics.Process.Start("https://github.com/markviews/VRChatVibratorController");
            }, Color.white, Color.grey, null, false, false, false, false, null, false);

            quickMenu   = GameObject.Find("UserInterface/QuickMenu/QuickMenu_NewElements");
            menuContent = GameObject.Find("UserInterface/MenuContent/Backdrop/Backdrop");
        }
Exemple #19
0
        internal Toy(string name, string id)
        {
            this.id   = id;
            this.name = name;

            button = ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, name + "\nClick to\nSet", "Click to set controll mode", (ButtonAPI.HorizontalPosition) x ++, ButtonAPI.VerticalPosition.BottomButton, ButtonAPI.MakeEmptyPage("SubMenu_1").transform, delegate(bool a)
            {
                changeHand();
            }, Color.white, Color.magenta, null, true, false, false, false, null, true);

            toys.Add(this);

            GameObject slider    = GameObject.Find("UserInterface/QuickMenu/UserInteractMenu/User Volume/VolumeSlider");
            GameObject quickmenu = GameObject.Find("UserInterface/QuickMenu/ShortcutMenu");

            GameObject speedSliderObject = GameObject.Instantiate(slider, quickmenu.transform, true);

            speedSlider              = speedSliderObject.GetComponent <UnityEngine.UI.Slider>();
            speedSlider.maxValue     = 20;
            speedSlider.wholeNumbers = true;
            speedSlider.value        = 0;
            speedSliderText          = speedSlider.transform.Find("Fill Area/VolumeNumberText").GetComponent <UnityEngine.UI.Text>();
            speedSliderText.text     = name + " Speed: 0%";
            speedSliderObject.SetActive(false);

            if (name.Equals("Max"))
            {
                GameObject maxSliderObject = GameObject.Instantiate(slider, quickmenu.transform, true);
                maxSliderObject.transform.localScale = new Vector3(0.7f, 1, 1);
                maxSlider              = maxSliderObject.GetComponent <UnityEngine.UI.Slider>();
                maxSlider.maxValue     = 3;
                maxSlider.wholeNumbers = true;
                maxSlider.value        = 0;
                Transform textTransform = maxSlider.transform.Find("Fill Area/VolumeNumberText");
                textTransform.localScale = new Vector3(1, 1, 1);
                maxSliderText            = textTransform.GetComponent <UnityEngine.UI.Text>();
                maxSliderText.text       = "Max Contraction: 0";
                maxSliderObject.SetActive(false);
            }
            else if (name.Equals("Nora"))
            {
                rotateButton = ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "Rotate", "Rotate Nora", ButtonAPI.HorizontalPosition.LeftOfMenu, ButtonAPI.VerticalPosition.BelowBottomButton, ButtonAPI.ShortcutMenuTransform, delegate(bool a)
                {
                    rotate();
                }, Color.white, Color.magenta, null, true, false, false, false, null, true);
                rotateButton.gameObject.GetComponent <RectTransform>().sizeDelta = new Vector2(720, 190);
                rotateButton.gameObject.SetActive(false);
            }
            else if (name.Equals("Edge"))
            {
                speedSlider.GetComponent <RectTransform>().sizeDelta = new Vector2(850, 160);
                GameObject edgeSliderObject = GameObject.Instantiate(slider, quickmenu.transform, true);
                edgeSliderObject.GetComponent <RectTransform>().sizeDelta = new Vector2(850, 160);
                edgeSlider              = edgeSliderObject.GetComponent <UnityEngine.UI.Slider>();
                edgeSlider.maxValue     = 20;
                edgeSlider.wholeNumbers = true;
                edgeSlider.value        = 0;
                Transform textTransform = edgeSlider.transform.Find("Fill Area/VolumeNumberText");
                textTransform.localScale = new Vector3(1, 1, 1);
                edgeSliderText           = textTransform.GetComponent <UnityEngine.UI.Text>();
                edgeSliderText.text      = "Edge Speed: 0%";
                edgeSliderObject.SetActive(false);
            }
        }
        public override void VRChat_OnUiManagerInit()
        {
            Tuple<string, string, Color?, Color?, Action<bool>> SubMenu1Data = Tuple.Create<string, string, Color?, Color?, Action<bool>>("Sub Menu 1", "The First SubMenu", UnityEngine.Color.magenta, null,
                delegate(bool a) { Process.Start("https://VRCAntiCrash.com/ButtonAPI"); });

            Tuple<string, string, Color?, Color?, Action<bool>> SubMenu2Data = Tuple.Create<string, string, Color?, Color?, Action<bool>>("Sub Menu 2", "The Second SubMenu", UnityEngine.Color.magenta,
                null, delegate(bool a) { Process.Start("https://VRCAntiCrash.com/ButtonAPI"); });

            //Make Button To Enter SubMenu_1
            ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, LoadedImage != null ? "" : "Utils", "Some Random Utils.", ButtonAPI.HorizontalPosition.LeftOfMenu, ButtonAPI.VerticalPosition.TopButton, null, delegate (bool a)
            {
                ButtonAPI.EnterSubMenu(ButtonAPI.MakeEmptyPage("SubMenu_1", SubMenu1Data.Item1, SubMenu1Data.Item2, SubMenu1Data.Item3, SubMenu1Data.Item4, SubMenu1Data.Item5));
            }, UnityEngine.Color.white, UnityEngine.Color.magenta, null, true, false, false, false, LoadedImage, true);

            //SubMenu_1 Contents
            ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "Next Page", "Goes To The Next Page.", ButtonAPI.HorizontalPosition.LeftOfMenu, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("SubMenu_1", SubMenu1Data.Item1, SubMenu1Data.Item2, SubMenu1Data.Item3, SubMenu1Data.Item4, SubMenu1Data.Item5).transform, delegate (bool a)
            {
                ButtonAPI.EnterSubMenu(ButtonAPI.MakeEmptyPage("SubMenu_2", SubMenu2Data.Item1, SubMenu2Data.Item2, SubMenu2Data.Item3, SubMenu2Data.Item4, SubMenu2Data.Item5));
            }, UnityEngine.Color.white, UnityEngine.Color.magenta, null, false, false, false, false, null, true);

            InputField InputField = null;

            InputField = ButtonAPI.CreateInputField("Enter Text Here..", ButtonAPI.VerticalPosition.BelowBottomButton, ButtonAPI.MakeEmptyPage("SubMenu_1", SubMenu1Data.Item1, SubMenu1Data.Item2, SubMenu1Data.Item3, SubMenu1Data.Item4, SubMenu1Data.Item5).transform, delegate (string text)
            {
                //MelonLogger.Log("New Text: " + text);
            }, delegate ()
            {
                if (InputField.text.StartsWith("teleport ") && InputField.text.Length > 9)
                {
                    Player TargetPlayer = PlayerManager.field_Private_Static_PlayerManager_0
                        .field_Private_List_1_Player_0.ToArray()
                        .FirstOrDefault(o => o.field_Private_APIUser_0.displayName.ToLower().StartsWith(InputField.text.Replace("teleport ", "").ToLower()));

                    if (TargetPlayer != null)
                    {
                        MelonLogger.Log("Teleporting To: " + TargetPlayer.field_Private_APIUser_0.displayName);

                        VRCPlayer.field_Internal_Static_VRCPlayer_0.transform.position =
                            TargetPlayer.transform.position;
                    }
                    else
                    {
                        MelonLogger.Log("Player: " + InputField.text.Replace("teleport ", "") + " Not Found!");
                    }
                }
            });

            ButtonAPI.CreateButton(ButtonAPI.ButtonType.Toggle, "Disable Portals", "Disables Portals Entirely - This Stops That Stupid Notorious Menu Disabling Bullshit", ButtonAPI.HorizontalPosition.FirstButtonPos, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("SubMenu_1", SubMenu1Data.Item1, SubMenu1Data.Item2, SubMenu1Data.Item3, SubMenu1Data.Item4, SubMenu1Data.Item5).transform, delegate (bool a)
            {
                DisablePortals = a;

                if (!a)
                {
                    Functions.TogglePortals(true);
                }
            }, UnityEngine.Color.white, UnityEngine.Color.magenta, null, false, false, false, DisablePortals, null, true, KeyCode.LeftControl, KeyCode.P);

            //Test Checkbox
            ButtonAPI.PlagueButton CheckBox = null;

            CheckBox = ButtonAPI.CreateButton(ButtonAPI.ButtonType.Toggle, "X", "A CheckBox, Ez", ButtonAPI.HorizontalPosition.SecondButtonPos, ButtonAPI.VerticalPosition.SecondButton, ButtonAPI.MakeEmptyPage("SubMenu_1", SubMenu1Data.Item1, SubMenu1Data.Item2, SubMenu1Data.Item3, SubMenu1Data.Item4, SubMenu1Data.Item5).transform, delegate (bool a)
            {
                CheckBox.text.text = (a ? "✓" : "X");
            }, UnityEngine.Color.white, UnityEngine.Color.magenta, null, false, false, true, false, null, true);

            ButtonAPI.CreateText(ButtonAPI.ButtonType.Toggle, ButtonAPI.SizeType.ButtonSize, "Some Text", "Just Some Text", ButtonAPI.HorizontalPosition.FirstButtonPos, ButtonAPI.VerticalPosition.SecondButton, ButtonAPI.MakeEmptyPage("SubMenu_1", SubMenu1Data.Item1, SubMenu1Data.Item2, SubMenu1Data.Item3, SubMenu1Data.Item4, SubMenu1Data.Item5).transform, true, true, delegate (bool a)
            {
                //Do Something Here
            }, false, UnityEngine.Color.magenta, UnityEngine.Color.white);

            ButtonAPI.CreateSlider(ButtonAPI.MakeEmptyPage("SubMenu_1", SubMenu1Data.Item1, SubMenu1Data.Item2, SubMenu1Data.Item3, SubMenu1Data.Item4, SubMenu1Data.Item5).transform, delegate (float v)
            {

            }, (float)ButtonAPI.HorizontalPosition.FirstButtonPos, (float)ButtonAPI.VerticalPosition.BottomButton, "Test Slider", 15f, 100f, 0f);

            //SubMenu_2 Contents
            ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "Prev Page", "Goes To The Previous Page.", ButtonAPI.HorizontalPosition.LeftOfMenu, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("SubMenu_2", SubMenu2Data.Item1, SubMenu2Data.Item2, SubMenu2Data.Item3, SubMenu2Data.Item4, SubMenu2Data.Item5).transform, delegate (bool a)
            {
                ButtonAPI.EnterSubMenu(ButtonAPI.MakeEmptyPage("SubMenu_1", SubMenu1Data.Item1, SubMenu1Data.Item2, SubMenu1Data.Item3, SubMenu1Data.Item4, SubMenu1Data.Item5));
            }, UnityEngine.Color.white, UnityEngine.Color.magenta, null, false, false, false, false, null, true);

            ButtonAPI.CreateButton(ButtonAPI.ButtonType.Default, "Hello World", "Prints Hello World To Console.", ButtonAPI.HorizontalPosition.FirstButtonPos, ButtonAPI.VerticalPosition.TopButton, ButtonAPI.MakeEmptyPage("SubMenu_2", SubMenu2Data.Item1, SubMenu2Data.Item2, SubMenu2Data.Item3, SubMenu2Data.Item4, SubMenu2Data.Item5).transform, delegate (bool a)
            {
                MelonLogger.Log(ConsoleColor.Magenta, "Hello World!");
            }, UnityEngine.Color.white, UnityEngine.Color.magenta, null, false, false, false, false, null, true);
        }
Exemple #21
0
        public override void OnStart()
        {
            try
            {
                if (Buttons.Count() == 0)
                {
                    Transform parent = Wrappers.GetQuickMenu().transform.Find("UIElementsMenu");

                    if (parent != null)
                    {
                        var Flightbutton = ButtonAPI.CreateButton(ButtonType.Toggle, "Flight", "Enable/Disable Flight", Color.white, Color.blue, -1, 0, parent, new Action(() =>
                        {
                            GlobalUtils.DirectionalFlight = true;
                            Physics.gravity = GlobalUtils.DirectionalFlight ? Vector3.zero : GlobalUtils.Grav;
                            GlobalUtils.ToggleColliders(false);
                            MelonModLogger.Log($"Flight has been {(GlobalUtils.DirectionalFlight ? "Enabled" : "Disabled")}.");
                        }), new Action(() =>
                        {
                            GlobalUtils.DirectionalFlight = false;
                            Physics.gravity = GlobalUtils.DirectionalFlight ? Vector3.zero : GlobalUtils.Grav;
                            GlobalUtils.ToggleColliders(true);
                            MelonModLogger.Log($"Flight has been {(GlobalUtils.DirectionalFlight ? "Enabled" : "Disabled")}.");
                        }));

                        var ESPbutton = ButtonAPI.CreateButton(ButtonType.Toggle, "ESP", "Enable/Disable Selected ESP", Color.white, Color.blue, 0, 0, parent, new Action(() =>
                        {
                            GlobalUtils.SelectedPlayerESP = true;
                            MelonModLogger.Log($"Selected ESP has been {(GlobalUtils.SelectedPlayerESP ? "Enabled" : "Disabled")}.");

                            GameObject[] array = GameObject.FindGameObjectsWithTag("Player");
                            for (int i = 0; i < array.Length; i++)
                            {
                                if (array[i].transform.Find("SelectRegion"))
                                {
                                    array[i].transform.Find("SelectRegion").GetComponent <Renderer>().sharedMaterial.SetColor("_Color", Color.magenta);
                                    HighlightsFX.prop_HighlightsFX_0.EnableOutline(array[i].transform.Find("SelectRegion").GetComponent <Renderer>(), GlobalUtils.SelectedPlayerESP);
                                }
                            }

                            foreach (VRC_Pickup pickup in Resources.FindObjectsOfTypeAll <VRC_Pickup>())
                            {
                                if (pickup.gameObject.transform.Find("SelectRegion"))
                                {
                                    pickup.gameObject.transform.Find("SelectRegion").GetComponent <Renderer>().sharedMaterial.SetColor("_Color", Color.magenta);
                                    Wrappers.GetHighlightsFX().EnableOutline(pickup.gameObject.transform.Find("SelectRegion").GetComponent <Renderer>(), GlobalUtils.SelectedPlayerESP);
                                }
                            }
                        }), new Action(() =>
                        {
                            GlobalUtils.SelectedPlayerESP = false;
                            MelonModLogger.Log($"Selected ESP has been {(GlobalUtils.SelectedPlayerESP ? "Enabled" : "Disabled")}.");

                            GameObject[] array = GameObject.FindGameObjectsWithTag("Player");
                            for (int i = 0; i < array.Length; i++)
                            {
                                if (array[i].transform.Find("SelectRegion"))
                                {
                                    array[i].transform.Find("SelectRegion").GetComponent <Renderer>().sharedMaterial.SetColor("_Color", Color.magenta);
                                    HighlightsFX.prop_HighlightsFX_0.EnableOutline(array[i].transform.Find("SelectRegion").GetComponent <Renderer>(), GlobalUtils.SelectedPlayerESP);
                                }
                            }

                            foreach (VRC_Pickup pickup in Resources.FindObjectsOfTypeAll <VRC_Pickup>())
                            {
                                if (pickup.gameObject.transform.Find("SelectRegion"))
                                {
                                    pickup.gameObject.transform.Find("SelectRegion").GetComponent <Renderer>().sharedMaterial.SetColor("_Color", Color.magenta);
                                    Wrappers.GetHighlightsFX().EnableOutline(pickup.gameObject.transform.Find("SelectRegion").GetComponent <Renderer>(), GlobalUtils.SelectedPlayerESP);
                                }
                            }
                        }));

                        var teleportButton = ButtonAPI.CreateButton(ButtonType.Default, "Teleport", "Teleport to the selected player", Color.white, Color.cyan, 0, 0, Wrappers.GetQuickMenu().transform.Find("UserInteractMenu"), new Action(() =>
                        {
                            MelonModLogger.Log("Teleporting to selected player.");
                            var player                = PlayerWrappers.GetCurrentPlayer();
                            var SelectedPlayer        = Wrappers.GetQuickMenu().GetSelectedPlayer();
                            player.transform.position = SelectedPlayer.transform.position;
                        }));

                        var Freezebutton = ButtonAPI.CreateButton(ButtonType.Toggle, "Serialize", "Enable/Disable Custom Serialisation", Color.white, Color.blue, -3, -1, parent, new Action(() =>
                        {
                            GlobalUtils.Serialise = false;
                            MelonModLogger.Log($"Custom Serialisation has been Enabled.");
                        }), new Action(() =>
                        {
                            GlobalUtils.Serialise = true;
                            MelonModLogger.Log($"Custom Serialisation has been Disabled.");
                        }));

                        var JumpButton = ButtonAPI.CreateButton(ButtonType.Toggle, "Jump", "Enable/disable jumping in the current world", Color.white, Color.blue, -2, -1, parent, new Action(() =>
                        {
                            if (PlayerWrappers.GetCurrentPlayer() != null)
                            {
                                if (PlayerWrappers.GetCurrentPlayer().GetComponent <PlayerModComponentJump>() == null)
                                {
                                    PlayerWrappers.GetCurrentPlayer().gameObject.AddComponent <PlayerModComponentJump>();
                                }
                                else
                                {
                                    PlayerWrappers.GetCurrentPlayer().GetComponent <PlayerModComponentJump>().enabled = true;
                                }
                            }

                            MelonModLogger.Log($"Jumping has been Enabled.");
                        }), new Action(() =>
                        {
                            if (PlayerWrappers.GetCurrentPlayer() != null)
                            {
                                if (PlayerWrappers.GetCurrentPlayer().GetComponent <PlayerModComponentJump>() != null)
                                {
                                    PlayerWrappers.GetCurrentPlayer().GetComponent <PlayerModComponentJump>().enabled = false;
                                }
                            }

                            MelonModLogger.Log($"Jumping has been Disabled.");
                        }));

                        var CloneButton = ButtonAPI.CreateButton(ButtonType.Default, "Clone\nBy\nID", "Clone an avatar by it's ID", Color.white, Color.blue, -1, 1, parent, new Action(() =>
                        {
                            MelonModLogger.Log("Enter AvatarID: ");
                            string ID = Console.ReadLine();
                            VRC.Core.API.SendRequest($"avatars/{ID}", HTTPMethods.Get, new ApiModelContainer <ApiAvatar>(), null, true, true, 3600f, 2, null);
                            new PageAvatar
                            {
                                avatar = new SimpleAvatarPedestal
                                {
                                    field_ApiAvatar_0 = new ApiAvatar
                                    {
                                        id = ID
                                    }
                                }
                            }.ChangeToSelectedAvatar();
                            Resources.FindObjectsOfTypeAll <VRCUiPopupManager>()[0].Method_Public_String_String_Single_0("<color=cyan>Success!</color>", "<color=green>Successfully cloned that avatar by It's AvtrID.</color>", 10f);
                        }), null);

                        var GotoButton = ButtonAPI.CreateButton(ButtonType.Default, "Join\nBy\nID", "Goto a world by It's ID", Color.white, Color.blue, 0, 1, parent, new Action(() =>
                        {
                            MelonModLogger.Log("Enter WorldID: ");
                            string ID = Console.ReadLine();
                            Networking.GoToRoom(ID);
                        }), null);

                        Buttons.Add(Flightbutton.gameObject);
                        Buttons.Add(ESPbutton.gameObject);
                        Buttons.Add(teleportButton.gameObject);
                        Buttons.Add(Freezebutton.gameObject);
                        Buttons.Add(JumpButton.gameObject);
                        Buttons.Add(CloneButton.gameObject);
                    }
                }
            }
            catch (Exception) { }
        }