public override void OnUpdate() { if (PlayerWrappers.GetCurrentPlayer() != null) { if (PlayerWrappers.GetCurrentPlayer().GetComponent <PlayerModComponentJump>() != null) { PlayerWrappers.GetCurrentPlayer().gameObject.AddComponent <PlayerModComponentJump>(); } } if (Input.GetKeyDown(KeyCode.F10)) { GlobalUtils.DirectionalFlight = !GlobalUtils.DirectionalFlight; Physics.gravity = GlobalUtils.DirectionalFlight ? Vector3.zero : GlobalUtils.Grav; if (!GlobalUtils.DirectionalFlight) { GlobalUtils.ToggleColliders(true); } UIButtons.ToggleUIButton(0, GlobalUtils.DirectionalFlight); MelonModLogger.Log($"Flight has been {(GlobalUtils.DirectionalFlight ? "Enabled" : "Disabled")}."); } if (Input.GetKeyDown(KeyCode.F11)) { GlobalUtils.SelectedPlayerESP = !GlobalUtils.SelectedPlayerESP; MelonModLogger.Log($"Selected ESP has been {(GlobalUtils.SelectedPlayerESP ? "Enabled" : "Disabled")}."); UIButtons.ToggleUIButton(1, GlobalUtils.SelectedPlayerESP); 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); } } } if (GlobalUtils.DirectionalFlight) { GameObject gameObject = Wrappers.GetPlayerCamera(); var currentSpeed = (Input.GetKey(KeyCode.LeftShift) ? 16f : 8f); var player = PlayerWrappers.GetCurrentPlayer(); if (Input.GetKey(KeyCode.W)) { player.transform.position += gameObject.transform.forward * currentSpeed * Time.deltaTime; } if (Input.GetKey(KeyCode.A)) { player.transform.position += player.transform.right * -1f * currentSpeed * Time.deltaTime; } if (Input.GetKey(KeyCode.S)) { player.transform.position += gameObject.transform.forward * -1f * currentSpeed * Time.deltaTime; } if (Input.GetKey(KeyCode.D)) { player.transform.position += player.transform.right * currentSpeed * Time.deltaTime; } if (Input.GetKey(KeyCode.Space)) { player.transform.position += player.transform.up * currentSpeed * Time.deltaTime; } if (Math.Abs(Input.GetAxis("Joy1 Axis 2")) > 0f) { player.transform.position += gameObject.transform.forward * currentSpeed * Time.deltaTime * (Input.GetAxis("Joy1 Axis 2") * -1f); } if (Math.Abs(Input.GetAxis("Joy1 Axis 1")) > 0f) { player.transform.position += gameObject.transform.right * currentSpeed * Time.deltaTime * Input.GetAxis("Joy1 Axis 1"); } } if (GlobalUtils.ForceClone) { if (UnityEngine.Object.FindObjectOfType <UserInteractMenu>() != null) { if (CachedUserInteract == null) { CachedUserInteract = UnityEngine.Object.FindObjectOfType <UserInteractMenu>(); } if (CachedUserInteract.menuController.activeUser != null) { if (CachedUserInteract.menuController.activeAvatar.releaseStatus == "private") { CachedUserInteract.cloneAvatarButtonText.color = Color.red; CachedUserInteract.cloneAvatarButtonText.text = "Private\nAvatar"; CachedUserInteract.menuController.activeUser.allowAvatarCopying = false; CachedUserInteract.cloneAvatarButton.interactable = false; } else if (!CachedUserInteract.menuController.activeUser.allowAvatarCopying) { CachedUserInteract.cloneAvatarButtonText.color = Color.cyan; CachedUserInteract.cloneAvatarButtonText.text = "Force\nClone"; CachedUserInteract.menuController.activeUser.allowAvatarCopying = true; CachedUserInteract.cloneAvatarButton.interactable = true; } else { CachedUserInteract.cloneAvatarButtonText.color = Color.white; CachedUserInteract.cloneAvatarButtonText.text = "Clone\nAvatar"; } } } } }
public Functions() : base("ShortcutMenu", 5, -1, "QoL", "VRChat Quality of Life, made by Yaekith and the IL2CPP Research Team.", Color.cyan, Color.white, Color.cyan, Color.white) { new QMToggleButton(this, 1, 0, "Flight\nON", new Action(() => { GlobalUtils.DirectionalFlight = true; Physics.gravity = GlobalUtils.DirectionalFlight ? Vector3.zero : GlobalUtils.Grav; MelonModLogger.Log($"Flight has been {(GlobalUtils.DirectionalFlight ? "Enabled" : "Disabled")}."); }), "Flight\nOFF", new Action(() => { GlobalUtils.DirectionalFlight = false; Physics.gravity = GlobalUtils.DirectionalFlight ? Vector3.zero : GlobalUtils.Grav; MelonModLogger.Log($"Flight has been {(GlobalUtils.DirectionalFlight ? "Enabled" : "Disabled")}."); }), "Come join us!", Color.cyan, Color.white); new QMToggleButton(this, 1, 0, "ESP\nON", new Action(() => { GlobalUtils.SelectedPlayerESP = !GlobalUtils.SelectedPlayerESP; 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); } } }), "ESP\nOFF", new Action(() => { GlobalUtils.SelectedPlayerESP = !GlobalUtils.SelectedPlayerESP; 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); } } }), "Come join us!", Color.cyan, Color.white); }
public override void OnUpdate() { try { if (Wrappers.GetQuickMenu().transform.Find("ShortcutMenu/BuildNumText") != null) { Wrappers.GetQuickMenu().transform.Find("ShortcutMenu/BuildNumText").GetComponentInChildren <Text>().text = "<color=red>Quality of Life</color> for <color=cyan>Build 921</color>"; } if (Input.GetKeyDown(KeyCode.F9)) { var avi = Wrappers.GetQuickMenu().GetSelectedPlayer().field_VRCPlayer_0.prop_ApiAvatar_0; if (avi.releaseStatus != "private") { VRC.Core.API.SendRequest($"avatars/{avi.id}", VRC.Core.BestHTTP.HTTPMethods.Get, new ApiModelContainer <ApiAvatar>(), null, true, false, 3600f, 2, null); new PageAvatar { avatar = new SimpleAvatarPedestal { field_ApiAvatar_0 = new ApiAvatar { id = avi.id } } }.ChangeToSelectedAvatar(); } } if (Input.GetKeyDown(KeyCode.F10)) { GlobalUtils.DirectionalFlight = !GlobalUtils.DirectionalFlight; Physics.gravity = GlobalUtils.DirectionalFlight ? Vector3.zero : GlobalUtils.Grav; if (!GlobalUtils.DirectionalFlight) { GlobalUtils.ToggleColliders(true); } UIButtons.ToggleUIButton(0, GlobalUtils.DirectionalFlight); MelonModLogger.Log($"Flight has been {(GlobalUtils.DirectionalFlight ? "Enabled" : "Disabled")}."); } if (Input.GetKeyDown(KeyCode.F11)) { GlobalUtils.SelectedPlayerESP = !GlobalUtils.SelectedPlayerESP; MelonModLogger.Log($"Selected ESP has been {(GlobalUtils.SelectedPlayerESP ? "Enabled" : "Disabled")}."); UIButtons.ToggleUIButton(1, GlobalUtils.SelectedPlayerESP); 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); } } } if (GlobalUtils.DirectionalFlight) { GameObject gameObject = Wrappers.GetPlayerCamera(); var currentSpeed = (Input.GetKey(KeyCode.LeftShift) ? 16f : 8f); var player = PlayerWrappers.GetCurrentPlayer(); if (Input.GetKey(KeyCode.W)) { player.transform.position += gameObject.transform.forward * currentSpeed * Time.deltaTime; } if (Input.GetKey(KeyCode.A)) { player.transform.position += player.transform.right * -1f * currentSpeed * Time.deltaTime; } if (Input.GetKey(KeyCode.S)) { player.transform.position += gameObject.transform.forward * -1f * currentSpeed * Time.deltaTime; } if (Input.GetKey(KeyCode.D)) { player.transform.position += player.transform.right * currentSpeed * Time.deltaTime; } if (Input.GetKey(KeyCode.Space)) { player.transform.position += player.transform.up * currentSpeed * Time.deltaTime; } if (Math.Abs(Input.GetAxis("Joy1 Axis 2")) > 0f) { player.transform.position += gameObject.transform.forward * currentSpeed * Time.deltaTime * (Input.GetAxis("Joy1 Axis 2") * -1f); } if (Math.Abs(Input.GetAxis("Joy1 Axis 1")) > 0f) { player.transform.position += gameObject.transform.right * currentSpeed * Time.deltaTime * Input.GetAxis("Joy1 Axis 1"); } } } catch (Exception) { } }
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) { } }
public override void OnStart() { //var testBtn = new QMNestedButton("ShortcutMenu", 0, 0, "lol", "BAN NAXUY!"); //var testBtn2 = new QMSingleButton(testBtn, 0, 1, "BAN!",new Action(() => Console.WriteLine("ssss")), "BAN NAXUY!"); var DoneteButton = new QMSingleButton("UIElementsMenu", 0, 0, "Donate", new Action(() => { Console.WriteLine("Thanks (^-^)"); Process.Start("https://www.donationalerts.com/r/ice_fox"); }), "Support Author Please (^-^)"); var DiscordButton = new QMSingleButton("UIElementsMenu", 0, 1, "Join us", new Action(() => { Console.WriteLine("Welcome"); Process.Start("https://discord.gg/kNDRN7k"); }), "Join us in discord server"); var Flightbutton = new QMToggleButton("UIElementsMenu", 3, 0, "Fly On", new Action(() => { GlobalUtils.DirectionalFlight = true; Physics.gravity = GlobalUtils.DirectionalFlight ? Vector3.zero : GlobalUtils.Grav; GlobalUtils.ToggleColliders(false); Console.WriteLine($"Flight has been enabled."); }), "Fly Off", new Action(() => { GlobalUtils.DirectionalFlight = false; Physics.gravity = GlobalUtils.DirectionalFlight ? Vector3.zero : GlobalUtils.Grav; GlobalUtils.ToggleColliders(true); Console.WriteLine($"Flight has been disabled."); }), "Enable or Disable Flight"); var ESPbutton = new QMToggleButton("UIElementsMenu", 4, 0, "ESP On", new Action(() => { GlobalUtils.SelectedPlayerESP = true; Console.WriteLine($"Selected ESP has been enabled."); 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); } } }), "ESP Off", new Action(() => { GlobalUtils.SelectedPlayerESP = false; Console.WriteLine($"Selected ESP has been 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); } } }), "Enable or Disable ESP"); var JumpButton = new QMToggleButton("UIElementsMenu", 1, 1, "Jump On", new Action(() => { if (PlayerWrappers.GetCurrentPlayer() != null) { if (PlayerWrappers.GetCurrentPlayer().GetComponent <PlayerModComponentJump>() == null) { PlayerWrappers.GetCurrentPlayer().gameObject.AddComponent <PlayerModComponentJump>(); } } }), "Jump Off", new Action(() => { if (PlayerWrappers.GetCurrentPlayer() != null) { if (PlayerWrappers.GetCurrentPlayer().GetComponent <PlayerModComponentJump>() != null) { UnityEngine.GameObject.Destroy(PlayerWrappers.GetCurrentPlayer().GetComponent <PlayerModComponentJump>()); } } }), "Enable or Disable Jump"); var ForceQuitButton = new QMSingleButton("UIElementsMenu", 5, 2, "Force Quit", new Action(() => { Process.GetCurrentProcess().Kill(); }), "Quit Game"); var CloneAvatarButton = new QMSingleButton("UserInteractMenu", 4, 2, "Force Clone", new Action(() => { Console.WriteLine("Cloned Avatar"); var avi = Wrappers.GetQuickMenu().GetSelectedPlayer().field_Internal_VRCPlayer_0.prop_ApiAvatar_0; if (avi.releaseStatus != "private") { new PageAvatar { avatar = new SimpleAvatarPedestal { field_Internal_ApiAvatar_0 = new ApiAvatar { id = avi.id } } }.ChangeToSelectedAvatar(); } }), "Clone Avatar"); var DownloadAvatarButton = new QMSingleButton("UserInteractMenu", 4, 3, "Download VRCA", new Action(() => { Console.WriteLine("Downloading Avatar..."); var avatar = Wrappers.GetQuickMenu().GetSelectedPlayer().field_Internal_VRCPlayer_0.prop_ApiAvatar_0; Process.Start(avatar.assetUrl); Console.WriteLine(avatar.assetUrl); }), "Clone Avatar"); /*var CloneAvatarButton2 = new QMSingleButton("/UserInterface/MenuContent/Screens/Social", 0, 0, "Download VRCA", new Action(() => * { * Console.WriteLine("Downloading Avatar..."); * var avatar = CustomList.AList.avatarPedestal.field_Internal_ApiAvatar_0; * Process.Start("https://api.vrchat.cloud/api/1/avatars/" + avatar.id); * }), "Clone Avatar");*/ if (Input.GetKeyDown(KeyCode.F)) { if (GlobalUtils.DirectionalFlight) { Flightbutton.btnOn.SetActive(true); Flightbutton.btnOff.SetActive(false); } else { Flightbutton.btnOn.SetActive(false); Flightbutton.btnOff.SetActive(true); } } if (Input.GetKeyDown(KeyCode.O)) { if (GlobalUtils.SelectedPlayerESP) { ESPbutton.btnOn.SetActive(true); ESPbutton.btnOff.SetActive(false); } else { ESPbutton.btnOn.SetActive(false); ESPbutton.btnOff.SetActive(true); } } //не имеет смысла но пусть будет ._. /*try * { * if (Buttons.Count() == 0) * { * Transform parent = Wrappers.GetQuickMenu().transform.Find("UIElementsMenu"); * Transform parentMain = Wrappers.GetQuickMenu().transform.Find("ShortcutMenu"); * * if (parentMain != null) * { * var TPLists = ButtonAPI.CreateMenuNestedButton("Teleport List", "Teleport List", Color.white, Color.red, 1, 1, parentMain); * * var TeleportToPlayerI = ButtonAPI.CreateButton(ButtonType.Default, "Teleport", "Teleport To Player", Color.white, Color.red, -2, 1, TPLists, new Action(() => * { * * })); * * Buttons.Add(TeleportToPlayerI.gameObject); * } * if (parent != null) * { * var Flightbutton = ButtonAPI.CreateButton(ButtonType.Toggle, "Flight", "Enable/Disable Flight", Color.white, Color.red, -1, 0, parent, new Action(() => * { * GlobalUtils.DirectionalFlight = true; * Physics.gravity = GlobalUtils.DirectionalFlight ? Vector3.zero : GlobalUtils.Grav; * GlobalUtils.ToggleColliders(false); * Console.WriteLine($"Flight has been {(GlobalUtils.DirectionalFlight ? "Enabled" : "Disabled")}."); * }), new Action(() => * { * GlobalUtils.DirectionalFlight = false; * Physics.gravity = GlobalUtils.DirectionalFlight ? Vector3.zero : GlobalUtils.Grav; * GlobalUtils.ToggleColliders(true); * Console.WriteLine($"Flight has been {(GlobalUtils.DirectionalFlight ? "Enabled" : "Disabled")}."); * })); * * var ESPbutton = ButtonAPI.CreateButton(ButtonType.Toggle, "ESP", "Enable/Disable Selected ESP", Color.white, Color.red, 0, 0, parent, new Action(() => * { * GlobalUtils.SelectedPlayerESP = true; * Console.WriteLine($"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; * Console.WriteLine($"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.red, 0, 0, Wrappers.GetQuickMenu().transform.Find("UserInteractMenu"), new Action(() => * { * Console.WriteLine("Teleporting to selected player."); * var player = PlayerWrappers.GetCurrentPlayer(); * var SelectedPlayer = Wrappers.GetQuickMenu().GetSelectedPlayer(); * player.transform.position = SelectedPlayer.transform.position; * })); * * var CloneAvatar = ButtonAPI.CreateButton(ButtonType.Default, "Clone", "Clone the selected player", Color.white, Color.red, 0, 1, Wrappers.GetQuickMenu().transform.Find("UserInteractMenu"), new Action(() => * { * Console.WriteLine("Cloned Avatar"); * var avi = Wrappers.GetQuickMenu().GetSelectedPlayer().field_Internal_VRCPlayer_0.prop_ApiAvatar_0; * * if (avi.releaseStatus != "private") * { * new PageAvatar * { * avatar = new SimpleAvatarPedestal * { * field_Internal_ApiAvatar_0 = new ApiAvatar * { * id = avi.id * } * } * }.ChangeToSelectedAvatar(); * } * })); * * var Freezebutton = ButtonAPI.CreateButton(ButtonType.Toggle, "Serialize", "Enable/Disable Custom Serialisation", Color.white, Color.red, -3, -1, parent, new Action(() => * { * GlobalUtils.Serialise = false; * Console.WriteLine($"Custom Serialisation has been Enabled."); * }), new Action(() => * { * GlobalUtils.Serialise = true; * Console.WriteLine($"Custom Serialisation has been Disabled."); * })); * * var ForceCloneButton = ButtonAPI.CreateButton(ButtonType.Toggle, "Jump", "Enable/disable jumping in the current world", Color.white, Color.red, -2, -1, parent, new Action(() => * { * if (PlayerWrappers.GetCurrentPlayer() != null) * { * if (PlayerWrappers.GetCurrentPlayer().GetComponent<PlayerModComponentJump>() == null) * { * PlayerWrappers.GetCurrentPlayer().gameObject.AddComponent<PlayerModComponentJump>(); * } * } * * Console.WriteLine($"Jumping has been Enabled."); * }), new Action(() => * { * if (PlayerWrappers.GetCurrentPlayer() != null) * { * if (PlayerWrappers.GetCurrentPlayer().GetComponent<PlayerModComponentJump>() != null) * { * UnityEngine.GameObject.Destroy(PlayerWrappers.GetCurrentPlayer().GetComponent<PlayerModComponentJump>()); * } * } * * Console.WriteLine($"Jumping has been Disabled."); * })); * * var ForceQuit = ButtonAPI.CreateButton(ButtonType.Default, "Force Quit", "Quit From Game", Color.white, Color.red, 1, 1, parent, new Action(() => * { * Process.GetCurrentProcess().Kill(); * })); * * Buttons.Add(Flightbutton.gameObject); * Buttons.Add(ESPbutton.gameObject); * Buttons.Add(CloneAvatar.gameObject); * Buttons.Add(teleportButton.gameObject); * Buttons.Add(Freezebutton.gameObject); * Buttons.Add(ForceCloneButton.gameObject); * Buttons.Add(ForceQuit.gameObject); * } * } * } * catch (Exception) { }*/ }
public override void OnUpdate() { if (Input.GetKeyDown(KeyCode.B)) { var avi = Wrappers.GetQuickMenu().GetSelectedPlayer().field_Internal_VRCPlayer_0.prop_ApiAvatar_0; if (avi.releaseStatus != "private") { new PageAvatar { avatar = new SimpleAvatarPedestal { field_Internal_ApiAvatar_0 = new ApiAvatar { id = avi.id } } }.ChangeToSelectedAvatar(); } } if (Input.GetKey(KeyCode.LeftAlt) && Input.GetKey(KeyCode.F5)) { Process.GetCurrentProcess().Kill(); } if (Input.GetKey(KeyCode.LeftControl) && Input.GetKeyDown(KeyCode.R)) { //Respawn Делай даун } if (Input.GetKey(KeyCode.LeftAlt) && Input.GetKeyDown(KeyCode.P)) { //TPS Делай Сука } if (Input.GetKeyDown(KeyCode.F)) { GlobalUtils.DirectionalFlight = !GlobalUtils.DirectionalFlight; Physics.gravity = GlobalUtils.DirectionalFlight ? Vector3.zero : GlobalUtils.Grav; if (!GlobalUtils.DirectionalFlight) { GlobalUtils.ToggleColliders(true); } else { GlobalUtils.ToggleColliders(false); } //UIButtons.ToggleUIButton(0, GlobalUtils.SelectedPlayerESP); Console.WriteLine($"Flight has been {(GlobalUtils.DirectionalFlight ? "Enabled" : "Disabled")}."); } if (Input.GetKeyDown(KeyCode.O)) { GlobalUtils.SelectedPlayerESP = !GlobalUtils.SelectedPlayerESP; Console.WriteLine($"Selected ESP has been {(GlobalUtils.SelectedPlayerESP ? "Enabled" : "Disabled")}."); //UIButtons.ToggleUIButton(1, GlobalUtils.SelectedPlayerESP); 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); } } } if (Input.GetKeyDown(KeyCode.T)) { RayTeleport(); Console.WriteLine("Teleported"); } if (GlobalUtils.DirectionalFlight) { GameObject gameObject = Wrappers.GetPlayerCamera(); var player = PlayerWrappers.GetCurrentPlayer(); if (currentSpeed <= 0f) { currentSpeed = 1f; } if (Input.GetKeyDown(KeyCode.LeftShift)) { currentSpeed *= 2f; } if (Input.GetKeyUp(KeyCode.LeftShift)) { currentSpeed /= 2f; } if (Input.mouseScrollDelta.y != 0) { currentSpeed += Input.mouseScrollDelta.y; Console.WriteLine("Speed Changed: [" + currentSpeed + "]"); } if (Input.GetKey(KeyCode.LeftControl) && Input.GetKeyDown(KeyCode.R)) { currentSpeed = 5f; Console.WriteLine("Fly Speed Reset [5]"); } if (Input.GetKey(KeyCode.W)) { player.transform.position += gameObject.transform.forward * currentSpeed * Time.deltaTime; } if (Input.GetKey(KeyCode.A)) { player.transform.position -= player.transform.right * currentSpeed * Time.deltaTime; } if (Input.GetKey(KeyCode.S)) { player.transform.position -= gameObject.transform.forward * currentSpeed * Time.deltaTime; } if (Input.GetKey(KeyCode.D)) { player.transform.position += player.transform.right * currentSpeed * Time.deltaTime; } if (Input.GetKey(KeyCode.E)) { player.transform.position += player.transform.up * currentSpeed * Time.deltaTime; } if (Input.GetKey(KeyCode.Q)) { player.transform.position -= player.transform.up * currentSpeed * Time.deltaTime; } if (Math.Abs(Input.GetAxis("Joy1 Axis 2")) > 0f) { player.transform.position += gameObject.transform.forward * currentSpeed * Time.deltaTime * (Input.GetAxis("Joy1 Axis 2") * -1f); } if (Math.Abs(Input.GetAxis("Joy1 Axis 1")) > 0f) { player.transform.position += gameObject.transform.right * currentSpeed * Time.deltaTime * Input.GetAxis("Joy1 Axis 1"); } } }
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) { } }