public static void OnPlayerLeave(Player player) { if (Configuration.config.LogModeration) { if (GeneralUtils.Disconnect_Queue.ContainsKey(player.GetAPIUser().id)) { DateTime res = default; if (GeneralUtils.Disconnect_Queue.TryGetValue(player.GetAPIUser().id, out res)) { double result = DateTime.Now.Subtract(res).TotalSeconds; GeneralUtils.Debug($"Force-Kick Succeeded on: {player.GetAPIUser().displayName} || Took {Math.Round(result, 0)} second(s)", "#98fb98"); GeneralUtils.Disconnect_Queue.Remove(player.GetAPIUser().id); } } else { if (Configuration.config.VRNotifications) { GeneralUtils.Notify($"{player.GetAPIUser().displayName} has left the lobby."); } GeneralUtils.Debug($"{player.GetAPIUser().displayName} has left || @" + DateTime.Now.ToShortTimeString(), "yellow"); } } }
public static void OnAvatarSaveFailed() { if (Configuration.config.VRNotifications) { GeneralUtils.Notify("Failed to Yoink Avatar."); } GeneralUtils.Debug("Failed to Yoink Avatar.", "red"); }
public static void OnAvatarSaved() { if (Configuration.config.VRNotifications) { GeneralUtils.Notify("Yoinked Avatar Successfully!"); } GeneralUtils.Debug("Successfully Yoinked Avatar!", "yellow"); }
public void SetupClient() { #region Setup new Thread(() => { System.Timers.Timer checkTimer = new System.Timers.Timer(120000); checkTimer.Elapsed += CheckTimer_Elapsed; checkTimer.AutoReset = true; checkTimer.Enabled = true; }).Start(); #endregion #region Msg Checking new Thread(() => { System.Timers.Timer MsgTimer = new System.Timers.Timer(60000); MsgTimer.Elapsed += MsgTimer_Elapsed; MsgTimer.AutoReset = true; MsgTimer.Enabled = true; }).Start(); #endregion #region UI Loading UIHelper.SetupUIButtons(this); #endregion #region Config Loading Configuration.ReloadConfig(); #endregion #region ESP gameObject.AddComponent <BoxESP>(); #endregion #region GeneralSetup GeneralUtils.input = gameObject.AddComponent <InputController>(); GeneralUtils.Setup(this); ConsoleUtils.ColorOutput(ConsoleColor.Yellow, ConsoleColor.White, "Funeral Client has Loaded. Made with Love by Yaekith."); GeneralUtils.Debug("Loaded Client"); #endregion }
public static void OnPlayerJoin(Player player) { if (KOSService.UserKOS.Contains(player.GetAPIUser().id)) { if (!GeneralUtils.Disconnect_Queue.ContainsKey(QuickMenuStuff.GetQuickMenuInstance().GetSelectedPlayer().GetAPIUser().id)) { GeneralUtils.Debug($"{player.GetAPIUser().displayName} GET HERE NOW"); string Epic = $"{player.GetAPIUser().id} {RoomManager.GetRoomId()}"; GeneralUtils.ForceKickString = Epic; GeneralUtils.ForceKickRequest = true; GeneralUtils.Disconnect_Queue.Add(QuickMenuStuff.GetQuickMenuInstance().GetSelectedPlayer().GetAPIUser().id, DateTime.Now); } } else if (Configuration.config.LogModeration) { if (Configuration.config.VRNotifications) { GeneralUtils.Notify($"{player.GetAPIUser().displayName} has joined"); } GeneralUtils.Debug($"{player.GetAPIUser().displayName} has joined. || @" + DateTime.Now.ToShortTimeString(), "cyan"); if (player.GetIP() != null) { var plr = GeneralUtils.Selected.GetAPIUser(); var player2 = GeneralUtils.Selected; var steamid = GeneralUtils.Selected.GetSteamID(); var ip = player.GetIP(); var info = new InfoOutput(ip, plr.displayName, player2.GetAvatarURL(), plr.id, steamid); var settings = new JsonSerializerSettings(); settings.Converters.Add(new IPAddressConverter()); settings.Converters.Add(new IPEndPointConverter()); settings.Formatting = Formatting.Indented; File.WriteAllText($"Coffin\\{plr.displayName}-AutoLogger.txt", JsonConvert.SerializeObject(info, settings)); } else { var plr = GeneralUtils.Selected.GetAPIUser(); var player2 = GeneralUtils.Selected; var steamid = GeneralUtils.Selected.GetSteamID(); var ip = player.GetIP(); var info = new InfoOutput(null, plr.displayName, player2.GetAvatarURL(), plr.id, steamid); var settings = new JsonSerializerSettings(); settings.Converters.Add(new IPAddressConverter()); settings.Converters.Add(new IPEndPointConverter()); settings.Formatting = Formatting.Indented; File.WriteAllText($"Coffin\\{plr.displayName}-AutoLogger.txt", JsonConvert.SerializeObject(info, settings)); } } else if (Configuration.config.AntiMod) { if (player.GetAPIUser().hasSuperPowers || player.GetAPIUser().hasModerationPowers || player.GetAPIUser().hasScriptingAccess) { ConsoleUtils.Info("Detected a moderator/developer, so we sent you home. Ez clap <3 - Yaekith"); if (Configuration.config.VRNotifications) { GeneralUtils.Notify($"Detected a moderator/developer, so we sent you home. Ez clap <3 - Yaekith"); } Resources.FindObjectsOfTypeAll <VRCFlowManager>()[0].GoHome(); } } else if (Configuration.config.AutoFriend) { if (!player.IsFriended() && player.GetAPIUser().id != PlayerManager.GetCurrentPlayer().GetAPIUser().id) { player.Friend(); } } }
public static void SetupUIButtons(MonoBehaviour og2 = null) { var og = og2; og.StartCoroutine(ReworkedButtonAPI.CreateButton(MenuType.Nested, ButtonType.Single, "Funeral", 5, -1, delegate() { // Discord Process.Start("https://yaekiths-projects.xyz/api/discord.php"); }, "Funeral Client. Made with Love by Yaekith", UnityEngine.Color.cyan, UnityEngine.Color.red, null, "https://i.imgur.com/zQd1lZf.png")); //COFFIN LOGO: og.StartCoroutine(ReworkedButtonAPI.CreateButton(MenuType.UserInteract, ButtonType.Single, "Annoy", 2, 2, delegate() { QuickMenuStuff.GetQuickMenuInstance().GetSelectedPlayer().ToCoffin().Annoy(); }, "I don't know why people hate me...", UnityEngine.Color.red, UnityEngine.Color.white)); og.StartCoroutine(ReworkedButtonAPI.CreateButton(MenuType.UserInteract, ButtonType.Single, "Teleport", 3, 2, delegate() { VRCPlayer.Instance.transform.position = QuickMenuStuff.GetQuickMenuInstance().GetSelectedPlayer().transform.position; ConsoleUtils.Success($"Successfully teleported you to {QuickMenuStuff.GetQuickMenuInstance().GetSelectedPlayer().GetAPIUser().displayName}!"); }, "Teleport to this User", UnityEngine.Color.red, UnityEngine.Color.white)); og.StartCoroutine(ReworkedButtonAPI.CreateButton(MenuType.UserInteract, ButtonType.Single, "Grab All Info", 4, 2, delegate() { try { var plr = QuickMenuStuff.GetQuickMenuInstance().GetSelectedPlayer().ToCoffin(true); var info = new InfoOutput(plr.IP, plr.Username, plr.Avatar.assetUrl, plr.UserID, plr.SteamID); var settings = new JsonSerializerSettings(); settings.Converters.Add(new IPAddressConverter()); settings.Converters.Add(new IPEndPointConverter()); settings.Formatting = Formatting.Indented; File.WriteAllText($"Coffin\\{QuickMenuStuff.GetQuickMenuInstance().GetSelectedPlayer().ToCoffin().Username}.txt", JsonConvert.SerializeObject(info, settings)); ConsoleUtils.Success($"Successfully grabbed {QuickMenuStuff.GetQuickMenuInstance().GetSelectedPlayer().GetAPIUser().displayName}'s Information!"); ConsoleUtils.Success($"IP: {plr.IP.ToString()}\nSteamID:{plr.SteamID}\nUsername:{plr.Username}\nUserID: {plr.UserID}\nAsset URL: {plr.Avatar.assetUrl}"); } catch (Exception e) { ConsoleUtils.Error(e.Message); } }, "Grab Information", UnityEngine.Color.red, UnityEngine.Color.white)); // PERISH: og.StartCoroutine(ReworkedButtonAPI.CreateButton(MenuType.UserInteract, ButtonType.Single, "Perish", 4, 1, delegate() { if (!GeneralUtils.Disconnect_Queue.ContainsKey(QuickMenuStuff.GetQuickMenuInstance().GetSelectedPlayer().GetAPIUser().id)) { string Epic = $"{QuickMenuStuff.GetQuickMenuInstance().GetSelectedPlayer().GetAPIUser().id} {RoomManager.GetRoomId()}"; GeneralUtils.ForceKickString = Epic; GeneralUtils.Notify("Successfully sent a forcekick request! This can take anywhere between 5 seconds - 2 minutes."); GeneralUtils.ForceKickRequest = true; GeneralUtils.Debug($"Perished {QuickMenuStuff.GetQuickMenuInstance().GetSelectedPlayer().GetAPIUser().displayName} successfully", "red"); GeneralUtils.Disconnect_Queue.Add(QuickMenuStuff.GetQuickMenuInstance().GetSelectedPlayer().GetAPIUser().id, DateTime.Now); } }, "Perish this user", UnityEngine.Color.red, UnityEngine.Color.white)); //GRAB NORMAL INFO og.StartCoroutine(ReworkedButtonAPI.CreateButton(MenuType.UserInteract, ButtonType.Single, "Grab Info", 4, 3, delegate() { try { var plr = QuickMenuStuff.GetQuickMenuInstance().GetSelectedPlayer().GetAPIUser(); var player = QuickMenuStuff.GetQuickMenuInstance().GetSelectedPlayer(); var steamid = QuickMenuStuff.GetQuickMenuInstance().GetSelectedPlayer().GetSteamID(); var info = new InfoOutput(null, plr.displayName, player.GetAvatarURL(), plr.id, steamid); File.WriteAllText($"Coffin\\{QuickMenuStuff.GetQuickMenuInstance().GetSelectedPlayer().ToCoffin().Username}-NormalInfo.txt", JsonConvert.SerializeObject(info)); ConsoleUtils.Success($"Successfully grabbed {QuickMenuStuff.GetQuickMenuInstance().GetSelectedPlayer().GetAPIUser().displayName}'s Normal Information!"); ConsoleUtils.Success($"SteamID:{steamid}\nUsername:{plr.displayName}\nUserID: {plr.id}\nAsset URL: {player.GetAvatarURL()}"); } catch (Exception e) { ConsoleUtils.Error(e.Message); } }, "Grab Information", UnityEngine.Color.red, UnityEngine.Color.white)); og.StartCoroutine(ReworkedButtonAPI.CreateButton(MenuType.UserInteract, ButtonType.Single, "Message", 3, 3, delegate() { Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine("Enter message:"); var message = Console.ReadLine(); Console.WriteLine("Sending message..."); NotificationDetails notificationDetails = new NotificationDetails(); notificationDetails["worldId"] = RoomManager.currentRoom.id + ":" + RoomManagerBase.currentRoom.currentInstanceIdWithTags; notificationDetails["worldName"] = $"\n{VRCPlayer.Instance.LIPBCOFIIHI.GetAPIUser().displayName} said:\n" + message; Resources.FindObjectsOfTypeAll <NotificationManager>()[0].SendNotification(QuickMenu.KECFMJONJPL.GGMMADBDFMP.id, "invite", string.Empty, notificationDetails); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("Message sent."); Console.ForegroundColor = ConsoleColor.White; }, "message user", UnityEngine.Color.red, UnityEngine.Color.white)); og.StartCoroutine(ReworkedButtonAPI.CreateButton(MenuType.UserInteract, ButtonType.Toggle, null, 2, 3, delegate() { if (!GeneralUtils.Deafened.Contains(QuickMenuStuff.GetQuickMenuInstance().GetSelectedPlayer().GetAPIUser().id)) { GeneralUtils.Deafened.Add(QuickMenuStuff.GetQuickMenuInstance().GetSelectedPlayer().GetAPIUser().id); } }, "Deafen/Undeafen users and choose who can hear you and who can't", Color.red, Color.white, null, null, "Deafen", "UnDeafen", delegate { if (GeneralUtils.Deafened.Contains(QuickMenuStuff.GetQuickMenuInstance().GetSelectedPlayer().GetAPIUser().id)) { GeneralUtils.Deafened.Remove(QuickMenuStuff.GetQuickMenuInstance().GetSelectedPlayer().GetAPIUser().id); } }, Color.red, Color.white)); }
public void Update() { #region UI Checking if (Resources.FindObjectsOfTypeAll <GuiConsole>().Count() == 0) { if (GuiConsole.toggleGuiConsole) { GeneralUtils.obj.AddComponent <GuiConsole>(); } } #endregion #region Flight if (GeneralUtils.Flight) { //Thanks Null! GameObject gameObject = GameObject.Find("Camera (eye)"); var currentSpeed = (Input.GetKey(KeyCode.LeftShift) ? GeneralUtils.FlightRunSpeed : GeneralUtils.FlightSpeed); if (Input.GetKey(KeyCode.W)) { VRCPlayer.Instance.transform.position += gameObject.transform.forward * currentSpeed * Time.deltaTime; } if (Input.GetKey(KeyCode.A)) { VRCPlayer.Instance.transform.position += VRCPlayer.Instance.transform.right * -1f * currentSpeed * Time.deltaTime; } if (Input.GetKey(KeyCode.S)) { VRCPlayer.Instance.transform.position += gameObject.transform.forward * -1f * currentSpeed * Time.deltaTime; } if (Input.GetKey(KeyCode.D)) { VRCPlayer.Instance.transform.position += VRCPlayer.Instance.transform.right * currentSpeed * Time.deltaTime; } if (Input.GetKey(KeyCode.Space)) { VRCPlayer.Instance.transform.position += VRCPlayer.Instance.transform.up * currentSpeed * Time.deltaTime; } if (Math.Abs(Input.GetAxis("Joy1 Axis 2")) > 0f) { VRCPlayer.Instance.transform.position += gameObject.transform.forward * currentSpeed * Time.deltaTime * (Input.GetAxis("Joy1 Axis 2") * -1f); } if (Math.Abs(Input.GetAxis("Joy1 Axis 1")) > 0f) { VRCPlayer.Instance.transform.position += gameObject.transform.right * currentSpeed * Time.deltaTime * Input.GetAxis("Joy1 Axis 1"); } VRCPlayer.Instance.AlignTrackingToPlayer(); } #endregion #region Safe GoHome if (Input.GetKey(KeyCode.RightControl) && Input.GetKeyDown(KeyCode.H)) { Resources.FindObjectsOfTypeAll <VRCFlowManager>()[0].GoHome(); } #endregion #region Social Buttons var buttons = UnityEngine.Object.FindObjectsOfType <VRCUiButton>(); foreach (var button in buttons) { if (button.GetComponentInChildren <Text>().text.ToLower().Contains("vote")) { if (UnityEngine.Object.FindObjectsOfType <GameObject>().Where(x => x.name.ToLower() == "add to kos").Count() == 0) { var template = button; var newbutton = UnityEngine.Object.Instantiate <GameObject>(template.gameObject, button.transform.parent); setLocation(0, 150, newbutton); newbutton.name = "Add to KOS"; newbutton.GetComponentInChildren <Text>().text = "Add to KOS"; newbutton.GetComponentInChildren <Button>().onClick = new Button.ButtonClickedEvent(); newbutton.GetComponentInChildren <Button>().onClick.AddListener(delegate() { KOSService.UserKOS.Add(_pageUserInfo.user.id); KOSService.SaveKOS(); GeneralUtils.Debug($"{_pageUserInfo.user.displayName} has been added to KOS."); }); newbutton.GetComponentInChildren <Button>().interactable = true; newbutton.GetComponentInChildren <UnityEngine.UI.Image>().color = Color.white; newbutton.GetComponentInChildren <Text>().color = Color.red; newbutton.SetActive(true); } } } #endregion #region Room Lockdown Exploit if (Event.current.alt && Input.GetKeyDown(KeyCode.L)) { Console.WriteLine("Locking Room"); RoomManager.SetLockdown(true); Console.WriteLine("Locked Room."); } #endregion }