private IEnumerator DelayedStart() { yield return(new WaitForSeconds(10)); Tick += TrackUser_Tick; m_uiTrackUser = VrcOverrideUI.InstantiateUIButton(VrcOverrideUI.GetPlayerDetailsBase(), VrcOverrideUI.GetPlayerDetailsBase().transform.parent.gameObject, "TRACK", () => { trackingUser = !trackingUser; if (trackingUser) { APIUser targetUser = QuickMenuWrappers.SelectedUser; trackedUser = PlayerManager.GetPlayer(targetUser.id); self = PlayerWrappers.GetLocalPlayer(); VrcOverrideUI.ChangeUIButtonText(m_uiTrackUser, "[TRACKING]"); InstantiateStopTrackingButton(); } else { trackedUser = null; VrcOverrideUI.ChangeUIButtonText(m_uiTrackUser, "TRACK"); } }, new[] { Vector2.left }); }
private void TrackUser_Tick() { if (Input.GetKeyDown(KeyCode.T)) { trackingUser = !trackingUser; if (trackingUser) { APIUser targetUser = QuickMenuWrappers.SelectedUser; trackedUser = PlayerManager.GetPlayer(targetUser.id); self = PlayerWrappers.GetLocalPlayer(); } } if (trackedUser == null && trackingUser) { trackingUser = false; } if (trackingUser) { self.transform.position = trackedUser.transform.position; self.transform.rotation = trackedUser.transform.rotation; } }
private static bool TriggerEvent(ref VrcEvent __0, ref VrcBroadcastType __1, ref int __2, ref float __3) { try { Player Sender = GeneralWrappers.GetPlayerManager().GetPlayer(__2); if (__1 == VrcBroadcastType.Always || __1 == VrcBroadcastType.AlwaysUnbuffered || __1 == VrcBroadcastType.AlwaysBufferOne) { if (Sender != null) { if (Sender.GetAPIUser().id != PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetAPIUser().id) { if (Configuration.GetConfig().AntiWorldTriggers) { return(false); } } } } if (GeneralUtils.WorldTriggers && (__1 != VrcBroadcastType.Always || __1 != VrcBroadcastType.AlwaysBufferOne || __1 != VrcBroadcastType.AlwaysUnbuffered)) { __1 = VrcBroadcastType.Always; } } catch (Exception c) { ConsoleUtil.Exception(c); } return(true); }
public override void OnGUI() { if (MinunnMain.mainMenuEnabled) { GUI.skin.button.margin = new RectOffset(10, 10, 25, 25); new GUIStyle(GUI.skin.box); GUI.skin.box.normal.background = MakeTex(2, 2, new Color32(byte.MaxValue, 0, 0, 220)); this.menuWidth = (float)(Screen.width / 2); this.menuHeight = (float)(Screen.height / 2); GUI.Box(new Rect(this.menuWidth / 2f, this.menuHeight / 2f, this.menuWidth, this.menuHeight), "Minunn Desktop Client"); } float num = 60f; GUI.Box(new Rect(0f, 0f, 200f, 500f), ""); new GUIStyle(GUI.skin.box); GUI.skin.box.normal.background = MakeTex(2, 2, new Color32(0, 0, 0, 220)); GUI.Label(new Rect(25f, 25f, (float)Screen.width, 20f), "MinunnClient"); foreach (Player player in PlayerWrappers.GetAllPlayers(PlayerManager.prop_PlayerManager_0)) { //GUI.Label(new Rect(25f, num, (float)Screen.width, 20f), player.prop_APIUser_0.displayName); num += 15f; bool flag = GUI.Button(new Rect(25f, num, 300f, 20f), player.prop_APIUser_0.displayName); if (flag) { ConsoleUtil.Info("Test selected player"); } } }
public static void RayTeleport() { Ray ray = new Ray(Wrappers.GetPlayerCamera().transform.position, Wrappers.GetPlayerCamera().transform.forward); RaycastHit[] hits = Physics.RaycastAll(ray); if (hits.Length > 0) { RaycastHit raycastHit = hits[0]; var thisPlayer = PlayerWrappers.GetCurrentPlayer(); thisPlayer.transform.position = raycastHit.point; } }
//private Dictionary<PhotonPlayer, PingFreezer> m_freezes = new Dictionary<PhotonPlayer, PingFreezer>(); private IEnumerator DelayedStart() { yield return(new WaitForSeconds(10)); /*m_uiGen5 = VrcOverrideUI.InstantiateUIButton(VrcOverrideUI.GetPlayerDetailsBase(), VrcOverrideUI.GetPlayerDetailsBase().transform.parent.gameObject, "GEN5", () => * { * APIUser targetUser = QuickMenuWrappers.SelectedUser; * VRC.Player targetPlayer = PlayerManager.GetPlayer(targetUser.id); * var photonPlayer = PlayerWrappers.PhotonPlayer(targetPlayer); * * Log.Info($"Logging out user {targetUser.displayName}"); * * Gen5 gen5 = new Gen5(photonPlayer); * gen5.Trigger(); * }, new[] { Vector2.down, Vector2.left, Vector2.left, Vector2.left, Vector2.left }); * * m_uiGen7 = VrcOverrideUI.InstantiateUIButton(VrcOverrideUI.GetPlayerDetailsBase(), VrcOverrideUI.GetPlayerDetailsBase().transform.parent.gameObject, "GEN7", () => * { * APIUser targetUser = QuickMenuWrappers.SelectedUser; * VRC.Player targetPlayer = PlayerManager.GetPlayer(targetUser.id); * var photonPlayer = PlayerWrappers.PhotonPlayer(targetPlayer); * * Log.Info($"Logging out user {targetUser.displayName}"); * * Gen7 gen7 = new Gen7(photonPlayer); * gen7.Trigger(); * }, new[] { Vector2.down, Vector2.left, Vector2.left, Vector2.left }); */ m_uiQuestionMark = VrcOverrideUI.InstantiateUIButton(VrcOverrideUI.GetPlayerDetailsBase(), VrcOverrideUI.GetPlayerDetailsBase().transform.parent.gameObject, "?: <color=red>OFF</color>", () => { APIUser targetUser = QuickMenuWrappers.SelectedUser; VRC.Player targetPlayer = PlayerManager.GetPlayer(targetUser.id); var photonPlayer = PlayerWrappers.PhotonPlayer(targetPlayer); Log.Info($"Beginning ping freeze on {targetUser.displayName}"); m_active = !m_active; if (m_active) { m_qq = new LoglessGen2(photonPlayer); m_qq.Trigger(); VrcOverrideUI.ChangeUIButtonText(m_uiQuestionMark, "?: <color=green>ON</color>"); } else { m_qq.Stop(); VrcOverrideUI.ChangeUIButtonText(m_uiQuestionMark, "?: <color=green>OFF</color>"); } }, new[] { Vector2.down, Vector2.left, Vector2.left, Vector2.left }); }
public override void OnUpdate() { try { if (GeneralUtils.SpinBot) { PlayerWrappers.GetVRC_Player(PlayerWrappers.GetCurrentPlayer()).gameObject.transform.Rotate(0f, 20f, 0f); } if (Input.GetKey(KeyCode.LeftControl) && Input.GetKeyDown(KeyCode.S)) { GeneralUtils.SpinBot = !GeneralUtils.SpinBot; GeneralUtils.ToggleUIButton("Spin Bot", GeneralUtils.SpinBot); } if (GeneralUtils.Flight) { GameObject gameObject = GeneralWrappers.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) { } }
private void FuckupBitrate(bool enable) { Player p = PlayerWrappers.GetLocalPlayer(); if (enable) { m_originalBitrate = p.vrcPlayer.USpeaker().Bitrate; p.vrcPlayer.USpeaker().Bitrate = BitRate.BitRate_8K; } else { p.vrcPlayer.USpeaker().Bitrate = m_originalBitrate; } }
public TargetVRMenu(EthosVRButton config) : base(config.Menu, config.X, config.Y, config.Name, config.Tooltip, GeneralUtils.GetColor(config.ColorScheme.Colors[0]), GeneralUtils.GetColor(config.ColorScheme.Colors[1]), GeneralUtils.GetColor(config.ColorScheme.Colors[2]), GeneralUtils.GetColor(config.ColorScheme.Colors[3])) { new QMSingleButton(this, 1, 0, "Teleport", new Action(() => { GeneralWrappers.GetPlayerManager().GetCurrentPlayer().transform.position = PlayerWrappers.GetSelectedPlayer(GeneralWrappers.GetQuickMenu()).transform.position; }), "Teleports you to the selected player.", Color.red, Color.white); new QMToggleButton(this, 2, 0, "Local\nBlock", delegate { PlayerWrappers.GetSelectedPlayer(GeneralWrappers.GetQuickMenu()).GetVRCPlayer().GetUSpeaker().gameObject.SetActive(false); PlayerWrappers.GetSelectedPlayer(GeneralWrappers.GetQuickMenu()).GetVRCAvatarManager().gameObject.SetActive(false); PlayerWrappers.GetSelectedPlayer(GeneralWrappers.GetQuickMenu()).GetVRCPlayer().prop_Boolean_0 = false; //disables the nameplate (always the first public boolean) PlayerWrappers.GetSelectedPlayer(GeneralWrappers.GetQuickMenu()).GetVRCPlayer().nameTag_old.gameObject.SetActive(false); PlayerWrappers.GetSelectedPlayer(GeneralWrappers.GetQuickMenu()).GetVRCPlayer().namePlate.gameObject.SetActive(false); }, "Local\nUnblock", delegate { PlayerWrappers.GetSelectedPlayer(GeneralWrappers.GetQuickMenu()).GetVRCPlayer().GetUSpeaker().gameObject.SetActive(true); PlayerWrappers.GetSelectedPlayer(GeneralWrappers.GetQuickMenu()).GetVRCPlayer().prop_Boolean_0 = true; //enables the nameplate (always the first public boolean) PlayerWrappers.GetSelectedPlayer(GeneralWrappers.GetQuickMenu()).GetVRCAvatarManager().gameObject.SetActive(true); }, "Decide whether you want to block this user locally, meaning, the blocking doesn't effect them but it also makes them disappear to yourself.", Color.red, Color.white); new QMToggleButton(this, 3, 0, "Can't\nHear", delegate { PlayerWrappers.GetSelectedPlayer(GeneralWrappers.GetQuickMenu()).GetVRCPlayer().field_Internal_Boolean_3 = false; }, "Can\nHear", delegate { //canHear is always the second last internal boolean in the VRCPlayer class //canSpeak is 1 before it LOL PlayerWrappers.GetSelectedPlayer(GeneralWrappers.GetQuickMenu()).GetVRCPlayer().field_Internal_Boolean_3 = true; }, "Decide whether you want this user to be able to hear you or not", Color.red, Color.white); new QMToggleButton(this, 4, 0, "Can\nHear Whitelist", delegate { if (GeneralUtils.CantHearOnNonFriends && !GeneralUtils.WhitelistedCanHearUsers.Contains(PlayerWrappers.GetSelectedPlayer(GeneralWrappers.GetQuickMenu()).GetAPIUser().displayName)) { GeneralUtils.WhitelistedCanHearUsers.Add(PlayerWrappers.GetSelectedPlayer(GeneralWrappers.GetQuickMenu()).GetAPIUser().displayName); PlayerWrappers.GetSelectedPlayer(GeneralWrappers.GetQuickMenu()).GetVRCPlayer().field_Internal_Boolean_3 = true; } //this is because you can't get the user id of a person who has left through their vrcplayerapi }, "Can't\nHear Blacklist", delegate { if (GeneralUtils.CantHearOnNonFriends && GeneralUtils.WhitelistedCanHearUsers.Contains(PlayerWrappers.GetSelectedPlayer(GeneralWrappers.GetQuickMenu()).GetAPIUser().displayName)) { GeneralUtils.WhitelistedCanHearUsers.Remove(PlayerWrappers.GetSelectedPlayer(GeneralWrappers.GetQuickMenu()).GetAPIUser().displayName); PlayerWrappers.GetSelectedPlayer(GeneralWrappers.GetQuickMenu()).GetVRCPlayer().field_Internal_Boolean_3 = false; } //this is because you can't get the user id of a person who has left through their vrcplayerapi }, "This is for when you enable can't hear on everyone but friends, but you also want to whitelist/blacklist this user from being able to hear you aswell. When Can't Hear on Non friends is disabled, this won't do anything when toggled.", Color.red, Color.white); }
public static void ToggleColliders(bool toggle) { Collider[] array = UnityEngine.Object.FindObjectsOfType <Collider>(); Component component = PlayerWrappers.GetCurrentPlayer().GetComponents(Collider.Il2CppType).FirstOrDefault <Component>(); //Fix this later but im lazy ok for (int i = 0; i < array.Length; i++) { Collider collider = array[i]; bool flag = collider.GetComponent <PlayerSelector>() != null || collider.GetComponent <VRC.SDKBase.VRC_Pickup>() != null || collider.GetComponent <QuickMenu>() != null || collider.GetComponent <VRC_Station>() != null || collider.GetComponent <VRC.SDKBase.VRC_AvatarPedestal>() != null; if (!flag && collider != component) { collider.enabled = toggle; } } }
public TargetVRMenu() : base("UserInteractMenu", 3, 3, "Player\nOptions", "Open this menu and control what you want of other players.", Color.red, Color.white, Color.red, Color.cyan) { new QMSingleButton(this, 1, 0, "Teleport", new Action(() => { PlayerWrappers.GetCurrentPlayer().transform.position = PlayerWrappers.GetSelectedPlayer(GeneralWrappers.GetQuickMenu()).transform.position; }), "Teleports you to the selected player.", Color.red, Color.white); new QMToggleButton(this, 2, 0, "Local\nBlock", delegate { var player = PlayerWrappers.GetSelectedPlayer(GeneralWrappers.GetQuickMenu()); player.gameObject.SetActive(false); }, "Local\nUnblock", delegate { var player = PlayerWrappers.GetSelectedPlayer(GeneralWrappers.GetQuickMenu()); player.gameObject.SetActive(true); }, "Decide whether you want to block this user locally, meaning, the blocking doesn't effect them but it also makes them disappear to yourself.", Color.red, Color.white); }
private void FuckupGain(bool enable) { Player p = PlayerWrappers.GetLocalPlayer(); if (enable) { USpeaker.LocalGain = float.MaxValue; USpeaker.RemoteGain = float.MaxValue; m_originalBandMode = p.vrcPlayer.USpeaker().BandwidthMode; p.vrcPlayer.USpeaker().BandwidthMode = BandMode.Narrow; } else { USpeaker.LocalGain = 1.0f; USpeaker.RemoteGain = 1.0f; p.vrcPlayer.USpeaker().BandwidthMode = m_originalBandMode; } }
public static void Update(object sender, ElapsedEventArgs args) { var room = RoomManagerBase.field_Internal_Static_ApiWorld_0; presence.state = $"In a(n) {room.currentInstanceAccess} instance"; if (room.currentInstanceAccess == VRC.Core.ApiWorldInstance.AccessType.InviteOnly) { presence.largeImageKey = "big_pog"; } else { presence.largeImageKey = "even_more_pog"; } presence.smallImageKey = "funeral_logo"; presence.partySize = 1; presence.partyMax = GeneralWrappers.GetPlayerManager().GetAllPlayers().Count; presence.largeImageText = $"As {PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetAPIUser().displayName}"; presence.smallImageText = GeneralUtils.Version; DiscordRpc.UpdatePresence(ref presence); }
public MainMenu(EthosVRButton config) : base(config.Menu, config.X, config.Y, config.Name, config.Tooltip, GeneralUtils.GetColor(config.ColorScheme.Colors[0]), GeneralUtils.GetColor(config.ColorScheme.Colors[1]), GeneralUtils.GetColor(config.ColorScheme.Colors[2]), GeneralUtils.GetColor(config.ColorScheme.Colors[3])) { new QMSingleButton(this, 1, 0, "GitHub", new Action(() => { Process.Start("https://github.com/Yaekith/EthosClient"); }), "Open the github repository in a new browser window", Color.red, Color.white); new QMSingleButton(this, 2, 0, "Discord", new Action(() => { Process.Start("https://discord.gg/pY4AN3Q"); }), "Join the official discord", Color.red, Color.white); new QMSingleButton(this, 3, 0, "Credits", new Action(() => { GeneralUtils.InformHudText(Color.yellow, "Yaekith - Developer\n404 - Developer"); }), "Displays who made this cheat", Color.red, Color.white); new UtilsVRMenu(this, GeneralUtils.GetEthosVRButton("Utils")); new FunVRMenu(this, GeneralUtils.GetEthosVRButton("Fun")); new ProtectionsVRMenu(this, GeneralUtils.GetEthosVRButton("Protections")); new TargetVRMenu(GeneralUtils.GetEthosVRButton("PlayerOptions")); new FavoritesVRMenu(this, GeneralUtils.GetEthosVRButton("ExtendedFavorites")); new SettingsVRMenu(this, GeneralUtils.GetEthosVRButton("Settings")); new KeybindVRMenu(this, GeneralUtils.GetEthosVRButton("Keybinds")); new VRUtilsMenu(this, GeneralUtils.GetEthosVRButton("VRUtils")); if (GeneralUtils.IsDevBranch) { new DeveloperVRMenu(GeneralUtils.GetEthosVRButton("Developer")); } new QMSingleButton(this, 4, 0, "Select\nYourself", new Action(() => { GeneralWrappers.GetQuickMenu().SelectPlayer(PlayerWrappers.GetCurrentPlayer()); }), "Select your own current player and do some stuff to yourself, I don't know lol.", Color.red, Color.white); new QMToggleButton(this, 1, 2, "Hide\nYourself", new Action(() => { PlayerWrappers.GetCurrentPlayer().prop_VRCAvatarManager_0.gameObject.SetActive(false); }), "Unhide\nYourself", new Action(() => { PlayerWrappers.GetCurrentPlayer().prop_VRCAvatarManager_0.gameObject.SetActive(true); }), "Hide/Unhide yourself, for safety reasons maybe, who knows.", Color.red, Color.white); }
private void PlayerDetails() { Drawing.StyleMenu(); Drawing.SetMenuTitle($"Player: {CleanPlayerName(m_selectedPlayer.name)}"); int tp = Drawing.AddMenuEntry("Teleport to player"); int rot = Drawing.AddMenuEntry("Copy player rotation"); int dump = Drawing.AddMenuEntry("Dump Player Properties"); int gen5entry = Drawing.AddMenuEntry("AAA"); int stopAAA = -1; if (logoutTarget != -1) { stopAAA = Drawing.AddMenuEntry("Stop AAA"); } if (Drawing.IsEntryPressed(tp)) { PlayerWrappers.GetLocalPlayer().transform.position = m_selectedPlayer.transform.position; } if (Drawing.IsEntryPressed(rot)) { PlayerWrappers.GetLocalPlayer().transform.rotation = m_selectedPlayer.transform.rotation; } if (Drawing.IsEntryPressed(gen5entry)) { logoutTarget = m_selectedPlayer.PhotonPlayer().PhotonActor(); Log.Info($"Target set to {logoutTarget}"); } if (Drawing.IsEntryPressed(stopAAA)) { logoutTarget = -1; } }
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"; } } } } }
private void ESP_RenderObject() { if (m_enabled || m_vrEnabled) { if (!m_styleSetup) { SetupStyle(); m_styleSetup = !m_styleSetup; } foreach (Player p in m_players) { VRCPlayer vrcPlayer = p.vrcPlayer; Animator animator; if (vrcPlayer == null) { animator = null; } else { VRCAvatarManager vrcAvatarManager = vrcPlayer.AvatarManager(); if (vrcAvatarManager == null) { animator = null; } else { GameObject currentAvatar = vrcAvatarManager.currentAvatarObject; animator = ((currentAvatar != null) ? currentAvatar.GetComponent <Animator>() : null); } } if (animator != null) { void DrawBoneEsp(HumanBodyBones bone1, HumanBodyBones bone2) { try { GL.Begin(GL.LINES); m_mat.SetPass(0); GL.Color(GetGroupColour(p)); GL.Vertex(animator.GetBoneTransform(bone1).position); GL.Vertex(animator.GetBoneTransform(bone2).position /* + new Vector3(0, .5f, 0)*/); } catch { } finally { GL.End(); } } /*EspType espType = ConfigFile.Config.Common.EspType; * * if (espType == EspType.Cute) * { * for (int j = 0; j < 56; j++) * { * if (j == 0) * { * continue; * } * * DrawBoneEsp((HumanBodyBones)j - 1, (HumanBodyBones)j); * } * } * else if (espType == EspType.Bone)*/ { // hips to left toes DrawBoneEsp(HumanBodyBones.Hips, HumanBodyBones.LeftUpperLeg); DrawBoneEsp(HumanBodyBones.LeftUpperLeg, HumanBodyBones.LeftLowerLeg); DrawBoneEsp(HumanBodyBones.LeftLowerLeg, HumanBodyBones.LeftFoot); DrawBoneEsp(HumanBodyBones.LeftFoot, HumanBodyBones.LeftToes); // hips to right toes DrawBoneEsp(HumanBodyBones.Hips, HumanBodyBones.RightUpperLeg); DrawBoneEsp(HumanBodyBones.RightUpperLeg, HumanBodyBones.RightLowerLeg); DrawBoneEsp(HumanBodyBones.RightLowerLeg, HumanBodyBones.RightFoot); DrawBoneEsp(HumanBodyBones.RightFoot, HumanBodyBones.RightToes); // hips to head DrawBoneEsp(HumanBodyBones.Hips, HumanBodyBones.Spine); DrawBoneEsp(HumanBodyBones.Spine, HumanBodyBones.Chest); DrawBoneEsp(HumanBodyBones.Chest, HumanBodyBones.Neck); DrawBoneEsp(HumanBodyBones.Neck, HumanBodyBones.Head); // chest to left hand DrawBoneEsp(HumanBodyBones.Chest, HumanBodyBones.LeftShoulder); DrawBoneEsp(HumanBodyBones.LeftShoulder, HumanBodyBones.LeftUpperArm); DrawBoneEsp(HumanBodyBones.LeftUpperArm, HumanBodyBones.LeftLowerArm); DrawBoneEsp(HumanBodyBones.LeftLowerArm, HumanBodyBones.LeftHand); // chest to right hand DrawBoneEsp(HumanBodyBones.Chest, HumanBodyBones.RightShoulder); DrawBoneEsp(HumanBodyBones.RightShoulder, HumanBodyBones.RightUpperArm); DrawBoneEsp(HumanBodyBones.RightUpperArm, HumanBodyBones.RightLowerArm); DrawBoneEsp(HumanBodyBones.RightLowerArm, HumanBodyBones.RightHand); // right fingers // thumb DrawBoneEsp(HumanBodyBones.RightHand, HumanBodyBones.RightThumbProximal); DrawBoneEsp(HumanBodyBones.RightThumbProximal, HumanBodyBones.RightThumbIntermediate); DrawBoneEsp(HumanBodyBones.RightThumbIntermediate, HumanBodyBones.RightThumbDistal); // index DrawBoneEsp(HumanBodyBones.RightHand, HumanBodyBones.RightIndexProximal); DrawBoneEsp(HumanBodyBones.RightIndexProximal, HumanBodyBones.RightIndexIntermediate); DrawBoneEsp(HumanBodyBones.RightIndexIntermediate, HumanBodyBones.RightIndexDistal); // middle DrawBoneEsp(HumanBodyBones.RightHand, HumanBodyBones.RightMiddleProximal); DrawBoneEsp(HumanBodyBones.RightMiddleProximal, HumanBodyBones.RightMiddleIntermediate); DrawBoneEsp(HumanBodyBones.RightMiddleIntermediate, HumanBodyBones.RightMiddleDistal); // ring DrawBoneEsp(HumanBodyBones.RightHand, HumanBodyBones.RightRingProximal); DrawBoneEsp(HumanBodyBones.RightRingProximal, HumanBodyBones.RightRingIntermediate); DrawBoneEsp(HumanBodyBones.RightRingIntermediate, HumanBodyBones.RightRingDistal); // little DrawBoneEsp(HumanBodyBones.RightHand, HumanBodyBones.RightLittleProximal); DrawBoneEsp(HumanBodyBones.RightLittleProximal, HumanBodyBones.RightLittleIntermediate); DrawBoneEsp(HumanBodyBones.RightLittleIntermediate, HumanBodyBones.RightLittleDistal); // left fingers // thumb DrawBoneEsp(HumanBodyBones.LeftHand, HumanBodyBones.LeftThumbProximal); DrawBoneEsp(HumanBodyBones.LeftThumbProximal, HumanBodyBones.LeftThumbIntermediate); DrawBoneEsp(HumanBodyBones.LeftThumbIntermediate, HumanBodyBones.LeftThumbDistal); // index DrawBoneEsp(HumanBodyBones.LeftHand, HumanBodyBones.LeftIndexProximal); DrawBoneEsp(HumanBodyBones.LeftIndexProximal, HumanBodyBones.LeftIndexIntermediate); DrawBoneEsp(HumanBodyBones.LeftIndexIntermediate, HumanBodyBones.LeftIndexDistal); // middle DrawBoneEsp(HumanBodyBones.LeftHand, HumanBodyBones.LeftMiddleProximal); DrawBoneEsp(HumanBodyBones.LeftMiddleProximal, HumanBodyBones.LeftMiddleIntermediate); DrawBoneEsp(HumanBodyBones.LeftMiddleIntermediate, HumanBodyBones.LeftMiddleDistal); // ring DrawBoneEsp(HumanBodyBones.LeftHand, HumanBodyBones.LeftRingProximal); DrawBoneEsp(HumanBodyBones.LeftRingProximal, HumanBodyBones.LeftRingIntermediate); DrawBoneEsp(HumanBodyBones.LeftRingIntermediate, HumanBodyBones.LeftRingDistal); // little DrawBoneEsp(HumanBodyBones.LeftHand, HumanBodyBones.LeftLittleProximal); DrawBoneEsp(HumanBodyBones.LeftLittleProximal, HumanBodyBones.LeftLittleIntermediate); DrawBoneEsp(HumanBodyBones.LeftLittleIntermediate, HumanBodyBones.LeftLittleDistal); } } } } if (m_vrEnabled) { foreach (Player p in m_players) { if (p == null || p.ApiUser() == null) { continue; } string displayName = p.ApiUser().displayName; // draw player tag if (!m_names.ContainsKey(displayName)) { GameObject obj = new GameObject(); UnityEngine.Object.DontDestroyOnLoad(obj); Text t = obj.AddComponent <Text>(); t.text = displayName; t.color = GetGroupColour(p); m_names[displayName] = obj; } m_names[displayName].transform.LookAt(VRCVrCamera.GetInstance().screenCamera.transform.position); m_names[displayName].transform.position = p.transform.position; GameObject myAvatar = PlayerWrappers.GetLocalPlayer().vrcPlayer.AvatarManager().currentAvatarObject; Animator myAnimator = ((myAvatar != null) ? myAvatar.GetComponent <Animator>() : null); Vector3 myPos = PlayerWrappers.GetLocalPlayer().transform.position; if (myAnimator != null) { myPos = myAnimator.GetBoneTransform(HumanBodyBones.LeftIndexDistal).position; if (myPos == null) { myPos = myAnimator.GetBoneTransform(HumanBodyBones.LeftIndexIntermediate).position; } if (myPos == null) { myPos = myAnimator.GetBoneTransform(HumanBodyBones.LeftIndexProximal).position; } if (myPos == null) { myPos = myAnimator.GetBoneTransform(HumanBodyBones.LeftHand).position; } } GameObject targetAvatar = p.vrcPlayer.AvatarManager().currentAvatarObject; Animator targetAnimator = ((targetAvatar != null) ? targetAvatar.GetComponent <Animator>() : null); Vector3 targetPos = p.transform.position; if (targetAnimator != null) { targetPos = targetAnimator.GetBoneTransform(HumanBodyBones.Head).position; } GL.Begin(GL.LINES); m_mat.SetPass(0); GL.Color(GetGroupColour(p)); GL.Vertex(myPos); GL.Vertex(targetPos); GL.End(); } } }
private void TestPlugin_Tick() { if (Input.GetKeyDown(KeyCode.U) && Input.GetKey(KeyCode.LeftControl)) { string[] text = File.ReadAllText("notiftext.txt").Replace("\r\n", "\n").Split('\n'); string target = text[0]; string message = text[1]; Dictionary <string, object> dictionary = new Dictionary <string, object>(); dictionary["worldId"] = ":" + RoomManagerBase.currentRoom.currentInstanceIdWithTags; dictionary["worldName"] = RoomManagerBase.currentRoom.name; ApiNotification.SendNotification(target, ApiNotification.NotificationType.Invite, message, dictionary, null, null); } if (Input.GetKeyDown(KeyCode.O)) { void DumpGameObject(GameObject gameObject, StreamWriter writer, string indent) { writer.WriteLine("{0}+{1}", indent, gameObject.name); foreach (Component component in gameObject.GetComponents <Component>()) { DumpComponent(component, writer, indent + "\t"); } foreach (Transform child in gameObject.transform) { DumpGameObject(child.gameObject, writer, indent + "\t"); /*foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(child.gameObject)) * { * string name = descriptor.Name; * object value = descriptor.GetValue(child.gameObject); * writer.WriteLine($"{name}={value}"); * }*/ } } void DumpComponent(Component component, StreamWriter writer, string indent) { writer.WriteLine("{0}{1}", indent, (component == null ? "(null)" : component.GetType().Name)); } List <GameObject> rootObjects = new List <GameObject>(); Scene scene = SceneManager.GetActiveScene(); { List <GameObject> tempRootObjects = new List <GameObject>(); scene.GetRootGameObjects(tempRootObjects); rootObjects.AddRange(tempRootObjects); } new Thread(() => { if (!Directory.Exists("NekoClient\\Objects")) { Directory.CreateDirectory("NekoClient\\Objects"); } StreamWriter writer = new StreamWriter($"NekoClient\\Objects\\Objects-{DateTime.Now.ToFileTimeUtc()}.txt", false); for (int i = 0; i < rootObjects.Count; ++i) { //if (!rootObjects[i].name.Contains("VRCPlayer")) { DumpGameObject(rootObjects[i], writer, ""); } } writer.Close(); }).Start(); } if (Input.GetKeyDown(KeyCode.P)) { VRCPlayer me = PlayerWrappers.GetLocalPlayer().vrcPlayer; DynamicBone[] bones = me.GetComponentsInChildren <DynamicBone>(); List <DynamicBoneDump> dump = new List <DynamicBoneDump>(); foreach (DynamicBone bone in bones) { try { List <string> exclusions = new List <string>(); List <DynamicBoneColliderDump> colliders = new List <DynamicBoneColliderDump>(); if (bone.m_Exclusions != null) { foreach (Transform t in bone.m_Exclusions) { exclusions.Add(t.gameObject.name); } } if (bone.m_Colliders != null) { foreach (DynamicBoneCollider c in bone.m_Colliders) { colliders.Add(new DynamicBoneColliderDump() { m_Center = new TheresThree() { X = c.m_Center.x, Y = c.m_Center.y, Z = c.m_Center.z }, m_Bound = (Bound)c.m_Bound, m_Direction = (Direction)c.m_Direction, m_Height = c.m_Height, m_Radius = c.m_Radius }); } } dump.Add(new DynamicBoneDump() { m_parentName = bone.gameObject.name, m_DistantDisable = bone.m_DistantDisable, m_FreezeAxis = (FreezeAxis)bone.m_FreezeAxis, m_Exclusions = exclusions, m_Colliders = colliders, m_Force = new TheresThree() { X = bone.m_Force.x, Y = bone.m_Force.y, Z = bone.m_Force.z, }, m_Gravity = new TheresThree() { X = bone.m_Gravity.x, Y = bone.m_Gravity.y, Z = bone.m_Gravity.z, }, m_EndLength = bone.m_EndLength, m_RadiusDistrib = bone.m_RadiusDistrib, m_EndOffset = new TheresThree() { X = bone.m_EndOffset.x, Y = bone.m_EndOffset.y, Z = bone.m_EndOffset.z, }, m_InertDistrib = bone.m_InertDistrib, m_UpdateRate = bone.m_UpdateRate, m_Radius = bone.m_Radius, m_DampingDistrib = bone.m_DampingDistrib, m_Elasticity = bone.m_Elasticity, m_Damping = bone.m_Damping, m_Stiffness = bone.m_Stiffness, m_StiffnessDistrib = bone.m_StiffnessDistrib, m_Inert = bone.m_Inert, m_ElasticityDistrib = bone.m_ElasticityDistrib }); } catch (Exception e) { Log.Debug($"Ignoring bone cause of: {e.InnerException.Message}"); } } /*VRCAvatarManager am = me.GetVRCAvatarManager(); * ApiAvatar aa = am == null ? null : am.GetApiAvatar(); * * string fname = (aa?.name == null ? "ninininini" : am.name) + "_" + DateTime.Now.ToFileTimeUtc();*/ new FileSystem("NekoClient\\DynamicBonesDump").SaveJson($"dump-{DateTime.Now.ToFileTimeUtc()}.json", dump); } }
public static void Initialize() { Stopwatch watch = new Stopwatch(); InitCheck CheckInitialized(Type type) { FieldInfo[] infos = type.GetFields(BindingFlags.NonPublic | BindingFlags.Static); int notNull = 0; List <string> nulls = new List <string>(); foreach (FieldInfo i in infos) { if (i.GetValue(null) != null) { notNull++; } else { nulls.Add(i.Name); } } return(new InitCheck() { Total = infos.Length, NotNull = notNull, Nulls = nulls }); } void LogInitialize(string name, Action cb, Type type) { watch.Reset(); Log.Info($"[{name}] Initializing wrappers..."); watch.Start(); try { cb(); } catch { } watch.Stop(); var inited = CheckInitialized(type); Log.Info($"[{name}] Initialization took {watch.ElapsedMilliseconds}ms ({inited.NotNull} out of {inited.Total} are valid)"); if (inited.NotNull != inited.Total) { Log.Info($"[{name}] Failed: {string.Join(", ", inited.Nulls.ToArray())}"); } } LogInitialize("Player", () => { PlayerWrappers.Initialize(); }, typeof(PlayerWrappers)); LogInitialize("VRCPlayer", () => { VRCPlayerWrappers.Initialize(); }, typeof(VRCPlayerWrappers)); LogInitialize("RoomManagerBase", () => { RoomManagerBaseWrappers.Initialize(); }, typeof(RoomManagerBaseWrappers)); LogInitialize("PlayerNet", () => { PlayerNetWrappers.Initialize(); }, typeof(PlayerNetWrappers)); LogInitialize("QuickMenu", () => { QuickMenuWrappers.Initialize(); }, typeof(QuickMenuWrappers)); LogInitialize("VRCUiManager", () => { VRCUiManagerWrappers.Initialize(); }, typeof(VRCUiManagerWrappers)); LogInitialize("VRCFlowManager", () => { VRCFlowManagerWrappers.Initialize(); }, typeof(VRCFlowManagerWrappers)); LogInitialize("VRCInputManager", () => { VRCInputManagerWrappers.Initialize(); }, typeof(VRCInputManagerWrappers)); LogInitialize("PhotonPlayer", () => { PhotonPlayerWrappers.Initialize(); }, typeof(PhotonPlayerWrappers)); LogInitialize("PhotonNetwork", () => { PhotonNetworkWrappers.Initialize(); }, typeof(PhotonNetworkWrappers)); LogInitialize("Misc UI", () => { UIWrappers.Initialize(); }, typeof(UIWrappers)); LogInitialize("VRCApplicationSetup", () => { VRCApplicationSetupWrappers.Initialize(); }, typeof(UIWrappers)); }
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) { } }
private void Update() { if (!RoomManagerBaseWrappers.InRoom) { return; } if (m_localPlayer == null) { VRC.Player player = PlayerWrappers.GetLocalPlayer(); if (player != null) // early init I guess { m_localPlayer = player; } } if (m_localPlayer == null) { return; // wait until player is ready } bool controller = VRCInputManagerWrappers.LastInputMethod == InputMethod.Controller; bool oculus = VRCInputManagerWrappers.LastInputMethod == InputMethod.Oculus; bool desktop = (VRCInputManagerWrappers.LastInputMethod == InputMethod.Keyboard || VRCInputManagerWrappers.LastInputMethod == InputMethod.Mouse); bool isActiveController = controller && Input.GetKey(KeyCode.JoystickButton5); bool isActiveOculus = oculus && Input.GetKey((KeyCode)Oculus.LeftThumbstickPress); bool isActiveDesktop = desktop && (Input.GetKey(KeyCode.Mouse4) || Input.GetKey(KeyCode.RightControl)); bool swapSpeedsController = controller && Input.GetKey(KeyCode.JoystickButton9); bool swapSpeedsOculus = oculus && Input.GetKey((KeyCode)Oculus.AButton); bool swapSpeedsKeyboard = desktop && Input.GetKey(KeyCode.LeftShift); bool isActive = isActiveController || isActiveOculus || isActiveDesktop; bool swapSpeeds = swapSpeedsKeyboard || swapSpeedsController || swapSpeedsOculus; if (isActive && Time.time - m_lastTime > 1f) { if (m_airbreakActive) { DisableAirbreak(); } else { SetupAirbreak(); } m_airbreakActive = !m_airbreakActive; m_lastTime = Time.time; } if (swapSpeeds && m_airbreakActive && Time.time - m_lastTime > 0.2f) { m_speedIndex += 1; if (m_speedIndex > m_speeds.Count() - 1) { m_speedIndex = 0; } m_currentSpeed = m_speeds[m_speedIndex]; m_lastTime = Time.time; } // get default fallback VRCVrCameraOculus[] ctrls = ((VRCVrCameraOculus[])UnityEngine.Object.FindObjectsOfType(typeof(VRCVrCameraOculus))); Transform trans = null; if (ctrls.Length > 0) { trans = ctrls[0].transform; } // alright so // let's start by getting our current vrcPlayer VRCPlayer vrcPlayer = PlayerWrappers.GetLocalPlayer().vrcPlayer; Animator animator = null; if (vrcPlayer == null) { animator = null; } else { // let's get our avatar manager VRCAvatarManager vrcAvatarManager = vrcPlayer.AvatarManager(); if (vrcAvatarManager == null) { animator = null; } else { // current avatar GameObject currentAvatar = vrcAvatarManager.currentAvatarObject; animator = ((currentAvatar != null) ? currentAvatar.GetComponent <Animator>() : null); } } // if the animator is not null at this stage and airbreak is enabled if (animator != null) { // get the head bone Transform tempTrans = animator.GetBoneTransform(HumanBodyBones.Head); // if we're humanoid if (tempTrans != null) { // use the head bone's transform instead of oculus camera trans = tempTrans; } } if (trans == null) { return; } if (Input.GetKey(KeyCode.W)) { m_position += trans.forward * m_currentSpeed * Time.deltaTime; } if (Input.GetKey(KeyCode.A)) { m_position += (trans.right * -1) * m_currentSpeed * Time.deltaTime; } if (Input.GetKey(KeyCode.S)) { m_position += (trans.forward * -1) * m_currentSpeed * Time.deltaTime; } if (Input.GetKey(KeyCode.D)) { m_position += trans.right * m_currentSpeed * Time.deltaTime; } if (Input.GetKey(KeyCode.E)) { m_position += m_localPlayer.transform.up * m_currentSpeed * Time.deltaTime; } if (Input.GetKey(KeyCode.Q)) { m_position += (m_localPlayer.transform.up * -1) * m_currentSpeed * Time.deltaTime; } if ((Input.GetAxis("Joy1 Axis 2") != 0)) { m_position += trans.forward * m_currentSpeed * Time.deltaTime * (Input.GetAxis("Joy1 Axis 2") * -1); } if (Input.GetAxis("Joy1 Axis 1") != 0) { m_position += trans.right * m_currentSpeed * Time.deltaTime * Input.GetAxis("Joy1 Axis 1"); } if (m_airbreakActive) { m_localPlayer.transform.position = m_position; } }
public FavoritesVRMenu(QMNestedButton parent) : base(parent, 4, 1, "Extended\nFavorites", "Open up the extended favorites menu and add more avatars than the default limit of 16", Color.red, Color.white, Color.red, Color.cyan) { new QMSingleButton(this, 0, 0, "Next", delegate { //to-do }, "Go to the next page", Color.red, Color.white); new QMSingleButton(this, 0, 1, "Back", delegate { //to-do }, "Go back to the previous page", Color.red, Color.white); new QMSingleButton(this, 5, 0, "Add\nCurrent Avatar", delegate { var currentAvatar = PlayerWrappers.GetCurrentPlayer().GetAPIAvatar(); Configuration.GetConfig().ExtendedFavoritedAvatars.Add(new FavoritedAvatar(currentAvatar.name, currentAvatar.id, currentAvatar.authorName, currentAvatar.authorId)); Configuration.SaveConfiguration(); GeneralWrappers.GetVRCUiPopupManager().AlertPopup("<color=cyan>Success!</color>", "<color=green>Successfully added your current Avatar to extended favorites</color>"); }, "Adds your current avatar to the extended favorites list", Color.red, Color.white); new QMSingleButton(this, 5, 1, "Remove\nCurrent Avatar", delegate { var currentAvatar = GeneralUtils.GetExtendedFavorite(PlayerWrappers.GetCurrentPlayer().GetAPIAvatar().id); Configuration.GetConfig().ExtendedFavoritedAvatars.Remove(currentAvatar); Configuration.SaveConfiguration(); GeneralWrappers.GetVRCUiPopupManager().AlertPopup("<color=cyan>Success!</color>", "<color=green>Successfully removed your current Avatar from extended favorites</color>"); }, "Removes your current avatar from the extended favorites list", Color.red, Color.white); new QMToggleButton(this, 5, -1, "Delete\nMode", delegate { DeleteMode = true; }, "Normal\nMode", delegate { DeleteMode = false; }, "Enable/Disable Delete Mode, with this on, you can remove avatars from this list by just clicking their respective buttons", Color.red, Color.white); foreach (var avatar in Configuration.GetConfig().ExtendedFavoritedAvatars) { if (X == 4) { if (Y != 4) { new QMSingleButton(this, X, Y, avatar.Name, delegate { if (DeleteMode) { Configuration.GetConfig().ExtendedFavoritedAvatars.Remove(avatar); Configuration.SaveConfiguration(); GeneralWrappers.GetVRCUiPopupManager().AlertPopup("<color=cyan>Success!</color>", "<color=green>Successfully removed this Avatar from extended favorites</color>"); } else { VRC.Core.API.SendRequest($"avatars/{avatar.ID}", VRC.Core.BestHTTP.HTTPMethods.Get, new ApiModelContainer <ApiAvatar>(), null, true, true, 3600f, 2, null); new PageAvatar { avatar = new SimpleAvatarPedestal { field_Internal_ApiAvatar_0 = new ApiAvatar { id = avatar.ID } } }.ChangeToSelectedAvatar(); } }, $"by {avatar.Author}\nSwitch into this avatar.", Color.red, Color.white); } Y++; } else { new QMSingleButton(this, X, Y, avatar.Name, delegate { if (DeleteMode) { Configuration.GetConfig().ExtendedFavoritedAvatars.Remove(avatar); Configuration.SaveConfiguration(); GeneralWrappers.GetVRCUiPopupManager().AlertPopup("<color=cyan>Success!</color>", "<color=green>Successfully removed this Avatar from extended favorites</color>"); } else { VRC.Core.API.SendRequest($"avatars/{avatar.ID}", VRC.Core.BestHTTP.HTTPMethods.Get, new ApiModelContainer <ApiAvatar>(), null, true, true, 3600f, 2, null); new PageAvatar { avatar = new SimpleAvatarPedestal { field_Internal_ApiAvatar_0 = new ApiAvatar { id = avatar.ID } } }.ChangeToSelectedAvatar(); } }, $"by {avatar.Author}\nSwitch into this avatar.", Color.red, Color.white); X++; } } }
public FavoritesVRMenu(QMNestedButton parent, EthosVRButton config) : base(parent, config.X, config.Y, config.Name, config.Tooltip, GeneralUtils.GetColor(config.ColorScheme.Colors[0]), GeneralUtils.GetColor(config.ColorScheme.Colors[1]), GeneralUtils.GetColor(config.ColorScheme.Colors[2]), GeneralUtils.GetColor(config.ColorScheme.Colors[3])) { new QMSingleButton(this, 0, 0, "Next", delegate { //to-do }, "Go to the next page", Color.red, Color.white); new QMSingleButton(this, 0, 1, "Back", delegate { //to-do }, "Go back to the previous page", Color.red, Color.white); new QMSingleButton(this, 5, 0, "Add\nCurrent Avatar", delegate { var currentAvatar = PlayerWrappers.GetCurrentPlayer().GetAPIAvatar(); Configuration.GetConfig().ExtendedFavoritedAvatars.Add(new FavoritedAvatar(currentAvatar.name, currentAvatar.id, currentAvatar.authorName, currentAvatar.authorId)); Configuration.SaveConfiguration(); GeneralWrappers.GetVRCUiPopupManager().AlertPopup("<color=cyan>Success!</color>", "<color=green>Successfully added your current Avatar to extended favorites</color>"); }, "Adds your current avatar to the extended favorites list", Color.red, Color.white); new QMSingleButton(this, 5, 1, "Remove\nCurrent Avatar", delegate { var currentAvatar = GeneralUtils.GetExtendedFavorite(PlayerWrappers.GetCurrentPlayer().GetAPIAvatar().id); Configuration.GetConfig().ExtendedFavoritedAvatars.Remove(currentAvatar); Configuration.SaveConfiguration(); GeneralWrappers.GetVRCUiPopupManager().AlertPopup("<color=cyan>Success!</color>", "<color=green>Successfully removed your current Avatar from extended favorites</color>"); }, "Removes your current avatar from the extended favorites list", Color.red, Color.white); new QMToggleButton(this, 5, -1, "Delete\nMode", delegate { DeleteMode = true; }, "Normal\nMode", delegate { DeleteMode = false; }, "Enable/Disable Delete Mode, with this on, you can remove avatars from this list by just clicking their respective buttons", Color.red, Color.white); foreach (var avatar in Configuration.GetConfig().ExtendedFavoritedAvatars) { if (X == 4) { if (Y != 4) { new QMSingleButton(this, X, Y, avatar.Name, delegate { if (DeleteMode) { Configuration.GetConfig().ExtendedFavoritedAvatars.Remove(avatar); Configuration.SaveConfiguration(); GeneralWrappers.GetVRCUiPopupManager().AlertPopup("<color=cyan>Success!</color>", "<color=green>Successfully removed this Avatar from extended favorites</color>"); } else { new ApiAvatar() { id = avatar.ID }.Get(new Action <ApiContainer>(x => { PAviSaved.avatar.field_Internal_ApiAvatar_0 = x.Model.Cast <ApiAvatar>(); // can fix better later. PAviSaved.ChangeToSelectedAvatar(); }), null, null, false); } }, $"by {avatar.Author}\nSwitch into this avatar.", Color.red, Color.white); } Y++; } else { new QMSingleButton(this, X, Y, avatar.Name, delegate { if (DeleteMode) { Configuration.GetConfig().ExtendedFavoritedAvatars.Remove(avatar); Configuration.SaveConfiguration(); GeneralWrappers.GetVRCUiPopupManager().AlertPopup("<color=cyan>Success!</color>", "<color=green>Successfully removed this Avatar from extended favorites</color>"); } else { new ApiAvatar() { id = avatar.ID }.Get(new Action <ApiContainer>(x => { PAviSaved.avatar.field_Internal_ApiAvatar_0 = x.Model.Cast <ApiAvatar>(); // can fix better later. PAviSaved.ChangeToSelectedAvatar(); }), null, null, false); } }, $"by {avatar.Author}\nSwitch into this avatar.", Color.red, Color.white); X++; } } }
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) { } }
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 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 QuickMenuButton() : base("ShortcutMenu", 0, 0, "Main", "A client for vrchat's il2cpp system, hopefully just an updated version of my old publicly sold client, with more features and fixed bugs of course.", Color.red, Color.white, Color.red, Color.white) { new QMSingleButton(this, 1, 0, "GitHub", new Action(() => { Process.Start("https://github.com/Yaekith/Funeral_ClientV2"); }), "Open the github repository in a new browser window", Color.red, Color.white); new QMSingleButton(this, 2, 0, "Discord", new Action(() => { Process.Start("https://discord.gg/8fwurVW"); }), "Join the official discord", Color.red, Color.white); new QMSingleButton(this, 3, 0, "Daily\nNotice", new Action(() => { new System.Threading.Thread(() => { var information = new WebClient().DownloadString("https://pastebin.com/raw/BjsgVdQp"); GeneralUtils.InformHudText(Color.cyan, information); }) { IsBackground = true }.Start(); }), "Gather information about the latest notice in the Discord", Color.red, Color.white); new QMSingleButton(this, 4, 0, "Credits", new Action(() => { GeneralUtils.InformHudText(Color.yellow, "Yaekith - Developer\n404 - Developer"); }), "Displays who made this cheat", Color.red, Color.white); new UtilsVRMenu(this, GeneralUtils.GetEthosVRButton("Utils")); new FunVRMenu(this, GeneralUtils.GetEthosVRButton("Fun")); new ProtectionsVRMenu(this, GeneralUtils.GetEthosVRButton("Protections")); new TargetVRMenu(GeneralUtils.GetEthosVRButton("PlayerOptions")); new FavoritesVRMenu(this, GeneralUtils.GetEthosVRButton("ExtendedFavorites")); if (GeneralUtils.IsDevBranch) { new DeveloperVRMenu(GeneralUtils.GetEthosVRButton("Developer")); } new QMToggleButton(this, 1, 2, "Clear\nConsole", delegate { Configuration.GetConfig().CleanConsole = true; Configuration.SaveConfiguration(); }, "Don't Clear\nConsole", delegate { Configuration.GetConfig().CleanConsole = false; Configuration.SaveConfiguration(); }, "Decide whether you want your console to be spammed by useless game information or not.", Color.red, Color.white).setToggleState(Configuration.GetConfig().CleanConsole); new QMSingleButton(this, 2, 2, "Select\nYourself", new Action(() => { GeneralWrappers.GetQuickMenu().SelectPlayer(PlayerWrappers.GetCurrentPlayer()); }), "Select your own current player and do some stuff to yourself, I don't know lol.", Color.red, Color.white); new QMToggleButton(this, 3, 2, "Hide\nYourself", new Action(() => { PlayerWrappers.GetCurrentPlayer().prop_VRCAvatarManager_0.gameObject.SetActive(false); }), "Unhide\nYourself", new Action(() => { PlayerWrappers.GetCurrentPlayer().prop_VRCAvatarManager_0.gameObject.SetActive(true); }), "Hide/Unhide yourself, for safety reasons maybe, who knows.", Color.red, Color.white); new QMToggleButton(this, 4, 2, "Enable\nDeveloper Mode", new Action(() => { GeneralUtils.IsDevBranch = true; }), "Disable\nDeveloper Mode", new Action(() => { GeneralUtils.IsDevBranch = false; }), "Ethos Developer Stuff ok", Color.red, Color.white).setToggleState(GeneralUtils.IsDevBranch); }
public override void OnUpdate() { try { if (StoredKeybinds.Count() == 0) { StoredKeybinds.AddRange(Configuration.GetConfig().Keybinds); } foreach (var keybind in StoredKeybinds) { if (Input.GetKey(keybind.FirstKey) && Input.GetKeyDown(keybind.SecondKey)) { switch (keybind.Target) { default: break; case EthosFeature.Flight: GeneralUtils.Flight = !GeneralUtils.Flight; Physics.gravity = GeneralUtils.Flight ? Vector3.zero : GeneralUtils.SavedGravity; GeneralUtils.ToggleColliders(!GeneralUtils.Flight); break; case EthosFeature.ESP: GeneralUtils.ESP = !GeneralUtils.ESP; 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>().material.color = Color.green; array[i].transform.Find("SelectRegion").GetComponent <Renderer>().sharedMaterial.color = Color.red; GeneralWrappers.GetHighlightsFX().EnableOutline(array[i].transform.Find("SelectRegion").GetComponent <Renderer>(), GeneralUtils.ESP); } } foreach (VRCSDK2.VRC_Interactable vrc_Interactable in Resources.FindObjectsOfTypeAll <VRCSDK2.VRC_Interactable>()) { GeneralWrappers.GetHighlightsFX().EnableOutline(vrc_Interactable.GetComponentInChildren <Renderer>(), GeneralUtils.ESP); } foreach (VRCSDK2.VRC_Pickup vrc_Pickup in Resources.FindObjectsOfTypeAll <VRCSDK2.VRC_Pickup>()) { GeneralWrappers.GetHighlightsFX().EnableOutline(vrc_Pickup.GetComponentInChildren <Renderer>(), GeneralUtils.ESP); } foreach (PortalInternal portalInternal in Resources.FindObjectsOfTypeAll <PortalInternal>()) { GeneralWrappers.GetHighlightsFX().EnableOutline(portalInternal.GetComponentInChildren <Renderer>(), GeneralUtils.ESP); } break; case EthosFeature.Autism: GeneralUtils.Autism = !GeneralUtils.Autism; break; case EthosFeature.SpinBot: GeneralUtils.SpinBot = !GeneralUtils.SpinBot; break; case EthosFeature.WorldTriggers: GeneralUtils.WorldTriggers = !GeneralUtils.WorldTriggers; break; case EthosFeature.ToggleAllTriggers: foreach (VRC_Trigger trigger in Resources.FindObjectsOfTypeAll <VRC_Trigger>()) { if (!trigger.name.Contains("Avatar") && !trigger.name.Contains("Chair")) { trigger.Interact(); } } break; case EthosFeature.AntiWorldTriggers: Configuration.GetConfig().AntiWorldTriggers = !Configuration.GetConfig().AntiWorldTriggers; Configuration.SaveConfiguration(); break; } } } if (GeneralUtils.AutoDeleteEveryonesPortals) { if (Resources.FindObjectsOfTypeAll <PortalInternal>().Count() > 0) { foreach (var portal in Resources.FindObjectsOfTypeAll <PortalInternal>()) { UnityEngine.Object.Destroy(portal.gameObject); } } } if (GeneralUtils.AutoDeleteNonFriendsPortals) { if (Resources.FindObjectsOfTypeAll <PortalInternal>().Count() > 0) { foreach (var portal in Resources.FindObjectsOfTypeAll <PortalInternal>()) { var player = portal.GetPlayer(); if (player.GetAPIUser() != null) { if (!APIUser.IsFriendsWith(player.GetAPIUser().id)) { UnityEngine.Object.Destroy(portal.gameObject); } } } } } if (GeneralUtils.AutoDeleteAllPickups) { if (Resources.FindObjectsOfTypeAll <VRC_Pickup>().Count() > 0) { foreach (var pickup in Resources.FindObjectsOfTypeAll <VRC_Pickup>()) { UnityEngine.Object.Destroy(pickup.gameObject); } } } if (GeneralUtils.SpinBot) { PlayerWrappers.GetVRC_Player(GeneralWrappers.GetPlayerManager().GetCurrentPlayer()).gameObject.transform.Rotate(0f, 20f, 0f); } if (GeneralUtils.InfiniteJump) { if (VRCInputManager.Method_Public_Static_ObjectPublicStSiBoSiObBoSiObStSiUnique_String_0("Jump").prop_Boolean_0) { GeneralWrappers.GetPlayerManager().GetCurrentPlayer().GetComponent <VRCMotionState>().field_Private_Boolean_0 = true; } } if (GeneralUtils.Autism) { var randomPlr = PlayerWrappers.GetAllPlayers(GeneralWrappers.GetPlayerManager())[new System.Random().Next(0, PlayerWrappers.GetAllPlayers(GeneralWrappers.GetPlayerManager()).Count())]; PlayerWrappers.GetVRC_Player(GeneralWrappers.GetPlayerManager().GetCurrentPlayer()).gameObject.transform.position = randomPlr.transform.position; } if (GeneralUtils.Flight) { GameObject gameObject = GeneralWrappers.GetPlayerCamera(); var currentSpeed = (Input.GetKey(KeyCode.LeftShift) ? 16f : 8f); var player = GeneralWrappers.GetPlayerManager().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 SelfControlVRMenu(QMNestedButton parent) : base(parent, 1, 1, "Self\nControl", "Controls stuff on your own player.", Color.red, Color.white, Color.red, Color.white) { new QMSingleButton(this, 0, 0, "Increase\nUSpeaker Volume", delegate { if (!GeneralUtils.VoiceMod) { return; } PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentVoice>().field_Private_USpeaker_0.field_Private_Single_0 = PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentVoice>().field_Private_USpeaker_0.field_Private_Single_0 * 2f; }, "Increase your own uspeaker's volume", Color.red, Color.white); new QMSingleButton(this, 0, 1, "Decrease\nUSpeaker Volume", delegate { if (!GeneralUtils.VoiceMod) { return; } PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentVoice>().field_Private_USpeaker_0.field_Private_Single_0 = PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentVoice>().field_Private_USpeaker_0.field_Private_Single_0 / 2f; }, "Decrease your own uspeaker's bitrate", Color.red, Color.white); new QMToggleButton(this, 4, 2, "Enable\nVoice Mod", delegate { if (!PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentVoice>()) { PlayerWrappers.GetCurrentPlayer().GetVRC_Player().gameObject.AddComponent <PlayerModComponentVoice>(); } GeneralUtils.VoiceMod = true; }, "Disable\nVoice Mod", delegate { GeneralUtils.VoiceMod = false; if (!PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentVoice>()) { PlayerWrappers.GetCurrentPlayer().GetVRC_Player().gameObject.AddComponent <PlayerModComponentVoice>(); } PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentVoice>().field_Private_USpeaker_0.CurrentBitrate = EnumPublicSealedvaBi15BiBiBiBiBiBiBiUnique.BitRate_64k; }, "Enable/Disable Voice Modification, allowing you to increase the bitrate and volume of your microphone at please.", Color.red, Color.white).setToggleState(GeneralUtils.VoiceMod); new QMToggleButton(this, 4, 1, "Go\nAutistic", new Action(() => { GeneralUtils.Autism = true; }), "Revert\nYour Autism", new Action(() => { GeneralUtils.Autism = false; }), "Do some crazy shit idk", Color.red, Color.white).setToggleState(GeneralUtils.Autism); new QMToggleButton(this, 4, 0, "Enable\nSpin Bot", delegate { GeneralUtils.SpinBot = true; }, "Disable\nSpin Bot", delegate { GeneralUtils.SpinBot = false; }, "Toggle the spin bot and go zooming in circles lol", Color.red, Color.white).setToggleState(GeneralUtils.SpinBot); new QMSingleButton(this, 3, 2, "Add\nJump", delegate { PlayerWrappers.GetCurrentPlayer().GetVRC_Player().gameObject.AddComponent <PlayerModComponentJump>(); }, "Adds the jump component to your player if it doesn't exist.", Color.red, Color.white); new QMToggleButton(this, 5, 0, "Enable\nFlight", delegate { Physics.gravity = Vector3.zero; GeneralUtils.Flight = true; GeneralUtils.ToggleColliders(!GeneralUtils.Flight); }, "Disable\nFlight", delegate { Physics.gravity = GeneralUtils.SavedGravity; GeneralUtils.Flight = false; GeneralUtils.ToggleColliders(!GeneralUtils.Flight); }, "Toggle Flight and move around within the air with ease!", Color.red, Color.white).setToggleState(GeneralUtils.Flight); new QMSingleButton(this, 5, 1, "Reset\nOptions", delegate { GeneralUtils.InfiniteJump = false; GeneralUtils.VoiceMod = false; GeneralUtils.Flight = false; GeneralUtils.Autism = false; GeneralUtils.SpinBot = false; GeneralUtils.SpeedHax = false; GeneralUtils.CustomSerialization = false; PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentSpeed>().field_Private_LocomotionInputController_0.walkSpeed = GeneralUtils.WalkSpeed; PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentSpeed>().field_Private_LocomotionInputController_0.runSpeed = GeneralUtils.RunSpeed; PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentSpeed>().field_Private_LocomotionInputController_0.strafeSpeed = GeneralUtils.StrafeSpeed; PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentVoice>().field_Private_USpeaker_0.CurrentBitrate = EnumPublicSealedvaBi15BiBiBiBiBiBiBiUnique.BitRate_64k; GeneralUtils.ToggleColliders(true); Physics.gravity = GeneralUtils.SavedGravity; }, "Resets all options on here to default.", Color.red, Color.white); new QMToggleButton(this, 5, -1, "Enable\nCustom Serialisation", delegate { GeneralUtils.CustomSerialization = true; }, "Disable\nCustom Serialisation", delegate { GeneralUtils.CustomSerialization = false; }, "Enable/Disable Custom Serialisation via OpRaiseEvent (Experimental)", Color.red, Color.white).setToggleState(GeneralUtils.CustomSerialization); new QMToggleButton(this, 1, 2, "Infinite\nJump", delegate { GeneralUtils.InfiniteJump = true; }, "Finite\nJump", delegate { GeneralUtils.InfiniteJump = false; PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <VRCMotionState>().field_Private_Boolean_0 = false; }, "Enable/Disable Infinite jumping, when this is enabled, it allows you to jump as much as possible >lol", Color.red, Color.white).setToggleState(GeneralUtils.InfiniteJump); new QMToggleButton(this, 2, 2, "Enable\nSpeed Hax", delegate { GeneralUtils.SpeedHax = true; if (!PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentSpeed>()) { PlayerWrappers.GetCurrentPlayer().GetVRC_Player().gameObject.AddComponent <PlayerModComponentSpeed>(); } }, "Disable\nSpeed Hax", delegate { GeneralUtils.SpeedHax = false; if (!PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentSpeed>()) { PlayerWrappers.GetCurrentPlayer().GetVRC_Player().gameObject.AddComponent <PlayerModComponentSpeed>(); } PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentSpeed>().field_Private_LocomotionInputController_0.walkSpeed = GeneralUtils.WalkSpeed; PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentSpeed>().field_Private_LocomotionInputController_0.runSpeed = GeneralUtils.RunSpeed; PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentSpeed>().field_Private_LocomotionInputController_0.strafeSpeed = GeneralUtils.StrafeSpeed; }, "Enables/Disable Speed Hax on your own player, basically makes you move faster ok.", Color.red, Color.white).setToggleState(GeneralUtils.SpeedHax); new QMSingleButton(this, 1, 0, "Increase\nWalk Speed (+2)", delegate { if (!GeneralUtils.SpeedHax) { return; } PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentSpeed>().field_Private_LocomotionInputController_0.walkSpeed = PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentSpeed>().field_Private_LocomotionInputController_0.walkSpeed + 2f; }, "Increases your own player's walk speed, only works when Speed Hax is enabled.", Color.red, Color.white); new QMSingleButton(this, 1, 1, "Decrease\nWalk Speed (-2)", delegate { if (!GeneralUtils.SpeedHax) { return; } PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentSpeed>().field_Private_LocomotionInputController_0.walkSpeed = PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentSpeed>().field_Private_LocomotionInputController_0.walkSpeed - 2f; }, "Decreases your own player's walk speed, only works when Speed Hax is enabled.", Color.red, Color.white); new QMSingleButton(this, 2, 0, "Increase\nRun Speed (+2)", delegate { if (!GeneralUtils.SpeedHax) { return; } PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentSpeed>().field_Private_LocomotionInputController_0.runSpeed = PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentSpeed>().field_Private_LocomotionInputController_0.runSpeed + 2f; }, "Increases your own player's run speed, only works when Speed Hax is enabled.", Color.red, Color.white); new QMSingleButton(this, 2, 1, "Decrease\nRun Speed (-2)", delegate { if (!GeneralUtils.SpeedHax) { return; } PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentSpeed>().field_Private_LocomotionInputController_0.runSpeed = PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentSpeed>().field_Private_LocomotionInputController_0.runSpeed - 2f; }, "Decreases your own player's run speed, only works when Speed Hax is enabled.", Color.red, Color.white); new QMSingleButton(this, 3, 0, "Increase\nStrafe Speed (+2)", delegate { if (!GeneralUtils.SpeedHax) { return; } PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentSpeed>().field_Private_LocomotionInputController_0.strafeSpeed = PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentSpeed>().field_Private_LocomotionInputController_0.strafeSpeed + 2f; }, "Increases your own player's strafe speed, only works when Speed Hax is enabled.", Color.red, Color.white); new QMSingleButton(this, 3, 1, "Decrease\nStrafe Speed (-2)", delegate { if (!GeneralUtils.SpeedHax) { return; } PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentSpeed>().field_Private_LocomotionInputController_0.strafeSpeed = PlayerWrappers.GetCurrentPlayer().GetVRC_Player().GetComponent <PlayerModComponentSpeed>().field_Private_LocomotionInputController_0.strafeSpeed - 2f; }, "Decreases your own player's strafe speed, only works when Speed Hax is enabled.", Color.red, Color.white); }