From a10dcdcdfa39dc52a88bb6fe35f3f634580abe2f Mon Sep 17 00:00:00 2001 From: Bitl Date: Thu, 12 Jan 2023 18:14:41 -0700 Subject: [PATCH] update to latest snapshot --- .../NovetusCore/Classes/SemaphoreLocker.cs | 37 + Novetus/NovetusCore/Classes/WebProxy.cs | 62 +- Novetus/NovetusCore/NovetusCore.projitems | 1 + .../StorageAndFunctions/ClientManagement.cs | 71 +- .../StorageAndFunctions/GlobalVars.cs | 3 +- .../StorageAndFunctions/SecurityFuncs.cs | 1 + .../NovetusCore/StorageAndFunctions/Util.cs | 18 +- .../Forms/LauncherForm/LauncherFormShared.cs | 26 +- .../NovetusLauncher/Forms/NovetusConsole.cs | 16 +- .../Forms/SDK/ItemCreationSDKColorMenu.cs | 2 - README-AND-CREDITS.TXT | 4 +- changelog.txt | 22 + consolehelp.txt | 4 +- defaultaddons/URLSetup.lua | 30 + defaultaddons/core/AddonLoader.lua | 2 +- defaultaddons/novetusexts/webproxy/Asset.cs | 5 + .../novetusexts/webproxy/AwardBadge.cs | 137 +++ .../novetusexts/webproxy/StudioLaunchPage.cs | 5 + .../novetusexts/webproxy/UploadWarnings.cs | 5 + scripts/batch/clean_junk.bat | 1 + scripts/launcher/Appreciation.rbxl | 962 +++++++++--------- 21 files changed, 826 insertions(+), 588 deletions(-) create mode 100644 Novetus/NovetusCore/Classes/SemaphoreLocker.cs create mode 100644 defaultaddons/URLSetup.lua create mode 100644 defaultaddons/novetusexts/webproxy/AwardBadge.cs diff --git a/Novetus/NovetusCore/Classes/SemaphoreLocker.cs b/Novetus/NovetusCore/Classes/SemaphoreLocker.cs new file mode 100644 index 0000000..71837d1 --- /dev/null +++ b/Novetus/NovetusCore/Classes/SemaphoreLocker.cs @@ -0,0 +1,37 @@ +using System; +using System.Threading; +using System.Threading.Tasks; + +//https://stackoverflow.com/questions/7612602/why-cant-i-use-the-await-operator-within-the-body-of-a-lock-statement/50139704#50139704 + +public class SemaphoreLocker +{ + private readonly SemaphoreSlim _semaphore = new SemaphoreSlim(1, 1); + + public async Task LockAsync(Func worker) + { + await _semaphore.WaitAsync(); + try + { + await worker(); + } + finally + { + _semaphore.Release(); + } + } + + // overloading variant for non-void methods with return type (generic T) + public async Task LockAsync(Func> worker) + { + await _semaphore.WaitAsync(); + try + { + return await worker(); + } + finally + { + _semaphore.Release(); + } + } +} \ No newline at end of file diff --git a/Novetus/NovetusCore/Classes/WebProxy.cs b/Novetus/NovetusCore/Classes/WebProxy.cs index 649b870..0e95d08 100644 --- a/Novetus/NovetusCore/Classes/WebProxy.cs +++ b/Novetus/NovetusCore/Classes/WebProxy.cs @@ -30,14 +30,11 @@ namespace Novetus.Core public class WebProxy { - private ProxyServer Server = null; + private ProxyServer Server = new ProxyServer(); private ExplicitProxyEndPoint end; public ExtensionManager Manager = new ExtensionManager(); - - public bool HasStarted() - { - return Server.ProxyRunning; - } + private static readonly SemaphoreLocker _locker = new SemaphoreLocker(); + public bool Started { get { return Server.ProxyRunning; } } public void DoSetup() { @@ -77,8 +74,6 @@ namespace Novetus.Core public void Start() { - Server = new ProxyServer(); - if (Server.ProxyRunning) { Util.ConsolePrint("The web proxy is already on and running.", 2); @@ -208,43 +203,44 @@ namespace Novetus.Core } } -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously private async Task OnRequest(object sender, SessionEventArgs e) -#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously { - if (!IsValidURL(e.HttpClient)) + await _locker.LockAsync(async () => { - return; - } - - Uri uri = e.HttpClient.Request.RequestUri; - - foreach (IExtension extension in Manager.GetExtensionList().ToArray()) - { - IWebProxyExtension webProxyExtension = extension as IWebProxyExtension; - if (webProxyExtension != null) + if (!IsValidURL(e.HttpClient)) { - if (webProxyExtension.IsValidURL(uri.AbsolutePath.ToLowerInvariant(), uri.Host)) + return; + } + + Uri uri = e.HttpClient.Request.RequestUri; + + foreach (IExtension extension in Manager.GetExtensionList().ToArray()) + { + IWebProxyExtension webProxyExtension = extension as IWebProxyExtension; + if (webProxyExtension != null) { - try + if (webProxyExtension.IsValidURL(uri.AbsolutePath.ToLowerInvariant(), uri.Host)) { - await webProxyExtension.OnRequest(sender, e); - return; + try + { + await webProxyExtension.OnRequest(sender, e); + return; + } + catch (Exception) + { + e.GenericResponse("", HttpStatusCode.InternalServerError); + continue; + } } - catch (Exception) + else { - e.GenericResponse("", HttpStatusCode.InternalServerError); continue; } } - else - { - continue; - } } - } - e.GenericResponse("", HttpStatusCode.NotFound); + e.GenericResponse("", HttpStatusCode.NotFound); + }); } public void Stop() @@ -258,8 +254,6 @@ namespace Novetus.Core Util.ConsolePrint("Web Proxy stopping on port " + GlobalVars.WebProxyPort, 3); Server.BeforeRequest -= new AsyncEventHandler(OnRequest); Server.Stop(); - Server.Dispose(); - Server = null; foreach (IExtension extension in Manager.GetExtensionList().ToArray()) { diff --git a/Novetus/NovetusCore/NovetusCore.projitems b/Novetus/NovetusCore/NovetusCore.projitems index 2563963..658dacc 100644 --- a/Novetus/NovetusCore/NovetusCore.projitems +++ b/Novetus/NovetusCore/NovetusCore.projitems @@ -10,6 +10,7 @@ + diff --git a/Novetus/NovetusCore/StorageAndFunctions/ClientManagement.cs b/Novetus/NovetusCore/StorageAndFunctions/ClientManagement.cs index edd96bd..cad8171 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/ClientManagement.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/ClientManagement.cs @@ -335,6 +335,7 @@ namespace Novetus.Core case ScriptType.Studio: return GlobalVars.LauncherState.InStudio; case ScriptType.EasterEgg: + case ScriptType.EasterEggServer: return GlobalVars.LauncherState.InEasterEggGame; default: return GlobalVars.LauncherState.InLauncher; @@ -893,6 +894,7 @@ namespace Novetus.Core rbxfolder = "client"; break; case ScriptType.Server: + case ScriptType.EasterEggServer: rbxfolder = "server"; break; case ScriptType.Studio: @@ -929,11 +931,14 @@ namespace Novetus.Core switch (type) { case ScriptType.Client: - case ScriptType.Solo: case ScriptType.EasterEgg: rbxexe = BasePath + @"\\" + GetClientSeperateFolderName(type) + @"\\RobloxApp_client.exe"; break; + case ScriptType.Solo: + rbxexe = BasePath + @"\\" + GetClientSeperateFolderName(type) + @"\\RobloxApp_solo.exe"; + break; case ScriptType.Server: + case ScriptType.EasterEggServer: rbxexe = BasePath + @"\\" + GetClientSeperateFolderName(type) + @"\\RobloxApp_server.exe"; break; case ScriptType.Studio: @@ -950,16 +955,17 @@ namespace Novetus.Core switch (type) { case ScriptType.Client: + case ScriptType.EasterEgg: rbxexe = BasePath + @"\\RobloxApp_client.exe"; break; case ScriptType.Server: + case ScriptType.EasterEggServer: rbxexe = BasePath + @"\\RobloxApp_server.exe"; break; case ScriptType.Studio: rbxexe = BasePath + @"\\RobloxApp_studio.exe"; break; case ScriptType.Solo: - case ScriptType.EasterEgg: rbxexe = BasePath + @"\\RobloxApp_solo.exe"; break; case ScriptType.None: @@ -1045,7 +1051,7 @@ namespace Novetus.Core #if URI UpdateStatus(label, "The client has been detected as modified."); #elif LAUNCHER - Util.ConsolePrint("ERROR - Failed to launch Novetus. (The client has been detected as modified.)", 2); + Util.ConsolePrint("ERROR - Failed to launch Novetus. (The client has been detected as modified.)", 2); #endif #if LAUNCHER @@ -1075,46 +1081,48 @@ namespace Novetus.Core #endif { #if LAUNCHER - DecompressMap(type, nomap); + DecompressMap(type, nomap); #endif switch (type) { case ScriptType.Client: + case ScriptType.EasterEgg: FileManagement.ReloadLoadoutValue(true); - if (!GlobalVars.LocalPlayMode && GlobalVars.GameOpened != ScriptType.Server) + if (!GlobalVars.LocalPlayMode && GlobalVars.GameOpened != ScriptType.Server && GlobalVars.GameOpened != ScriptType.EasterEggServer) { goto default; } break; case ScriptType.Server: - if (GlobalVars.GameOpened == ScriptType.Server) + case ScriptType.EasterEggServer: + if (GlobalVars.GameOpened == ScriptType.Server || GlobalVars.GameOpened == ScriptType.EasterEggServer) { Util.ConsolePrint("ERROR - Failed to launch Novetus. (A server is already running.)", 2); #if LAUNCHER - if (!GlobalVars.isConsoleOnly) - { - MessageBox.Show("Failed to launch Novetus. (Error: A server is already running.)", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } + if (!GlobalVars.isConsoleOnly) + { + MessageBox.Show("Failed to launch Novetus. (Error: A server is already running.)", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } #endif return; } - else if (GlobalVars.UserConfiguration.FirstServerLaunch) + else if (GlobalVars.UserConfiguration.FirstServerLaunch && GlobalVars.GameOpened == ScriptType.Server) { #if LAUNCHER - string hostingTips = "For your first time hosting a server, make sure your server's port forwarded (set up in your router), going through a tunnel server, or running from UPnP.\n" + - "If your port is forwarded or you are going through a tunnel server, make sure your port is set up as UDP, not TCP.\n" + - "Roblox does NOT use TCP, only UDP. However, if your server doesn't work with just UDP, feel free to set up TCP too as that might help the issue in some cases."; + string hostingTips = "For your first time hosting a server, make sure your server's port forwarded (set up in your router), going through a tunnel server, or running from UPnP.\n" + + "If your port is forwarded or you are going through a tunnel server, make sure your port is set up as UDP, not TCP.\n" + + "Roblox does NOT use TCP, only UDP. However, if your server doesn't work with just UDP, feel free to set up TCP too as that might help the issue in some cases."; - if (!GlobalVars.isConsoleOnly) - { - MessageBox.Show(hostingTips, "Novetus - Hosting Tips", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - else - { - Util.ConsolePrint("Tips: " + hostingTips, 4); - } + if (!GlobalVars.isConsoleOnly) + { + MessageBox.Show(hostingTips, "Novetus - Hosting Tips", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + else + { + Util.ConsolePrint("Tips: " + hostingTips, 4); + } #endif GlobalVars.UserConfiguration.FirstServerLaunch = false; } @@ -1132,10 +1140,10 @@ namespace Novetus.Core Util.ConsolePrint("ERROR - Failed to launch Novetus. (A game is already running.)", 2); #if LAUNCHER - if (!GlobalVars.isConsoleOnly) - { - MessageBox.Show("Failed to launch Novetus. (Error: A game is already running.)", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } + if (!GlobalVars.isConsoleOnly) + { + MessageBox.Show("Failed to launch Novetus. (Error: A game is already running.)", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } #endif return; } @@ -1145,10 +1153,9 @@ namespace Novetus.Core ReadClientValues(ClientName); string luafile = GetLuaFileName(ClientName, type); string rbxexe = GetClientEXEDir(ClientName, type); - string mapfile = type.Equals(ScriptType.EasterEgg) ? - GlobalPaths.DataDir + "\\Appreciation.rbxl" : - (nomap ? (type.Equals(ScriptType.Studio) ? GlobalPaths.ConfigDir + "\\Place1.rbxl" : "") : GlobalVars.UserConfiguration.MapPath); - string mapname = type.Equals(ScriptType.EasterEgg) ? "" : (nomap ? "" : GlobalVars.UserConfiguration.Map); + bool isEasterEgg = (type.Equals(ScriptType.EasterEggServer)); + string mapfile = isEasterEgg ? GlobalPaths.DataDir + "\\Appreciation.rbxl" : (nomap ? (type.Equals(ScriptType.Studio) ? GlobalPaths.ConfigDir + "\\Place1.rbxl" : "") : GlobalVars.UserConfiguration.MapPath); + string mapname = isEasterEgg ? "" : (nomap ? "" : GlobalVars.UserConfiguration.Map); FileFormat.ClientInfo info = GetClientInfoValues(ClientName); string quote = "\""; string args = ""; @@ -1488,6 +1495,7 @@ namespace Novetus.Core switch (type) { case ScriptType.Client: + case ScriptType.EasterEgg: return "_G.CSConnect(" + (info.UsesID ? GlobalVars.UserConfiguration.UserID : 0) + ",'" + GlobalVars.CurrentServer.ServerIP + "'," @@ -1499,6 +1507,7 @@ namespace Novetus.Core + ((GlobalVars.ValidatedExtraFiles > 0) ? "'," + GlobalVars.ValidatedExtraFiles.ToString() + "," : "',0,") + GlobalVars.UserConfiguration.NewGUI.ToString().ToLower() + ");"; case ScriptType.Server: + case ScriptType.EasterEggServer: return "_G.CSServer(" + GlobalVars.UserConfiguration.RobloxPort + "," + GlobalVars.UserConfiguration.PlayerLimit + "," @@ -1507,7 +1516,6 @@ namespace Novetus.Core + ((GlobalVars.ValidatedExtraFiles > 0) ? "," + GlobalVars.ValidatedExtraFiles.ToString() + "," : ",0,") + GlobalVars.UserConfiguration.NewGUI.ToString().ToLower() + ");"; case ScriptType.Solo: - case ScriptType.EasterEgg: return "_G.CSSolo(" + (info.UsesID ? GlobalVars.UserConfiguration.UserID : 0) + ",'" + (info.UsesPlayerName ? GlobalVars.UserConfiguration.PlayerName : "Player") + "'," @@ -1534,6 +1542,7 @@ namespace Novetus.Core case ScriptType.Studio: return "Studio"; case ScriptType.EasterEgg: + case ScriptType.EasterEggServer: return "A message from Bitl"; default: return "N/A"; diff --git a/Novetus/NovetusCore/StorageAndFunctions/GlobalVars.cs b/Novetus/NovetusCore/StorageAndFunctions/GlobalVars.cs index 1f7d1dd..8465a11 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/GlobalVars.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/GlobalVars.cs @@ -24,7 +24,8 @@ namespace Novetus.Core Solo = 2, Studio = 3, EasterEgg = 4, - None = 5 + EasterEggServer = 5, + None = 6 } #endregion diff --git a/Novetus/NovetusCore/StorageAndFunctions/SecurityFuncs.cs b/Novetus/NovetusCore/StorageAndFunctions/SecurityFuncs.cs index 0fe29f2..7d1772c 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/SecurityFuncs.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/SecurityFuncs.cs @@ -299,6 +299,7 @@ namespace Novetus.Core + RandomStringTitle()); break; case ScriptType.EasterEgg: + case ScriptType.EasterEggServer: default: SetWindowText(exe.MainWindowHandle, ScriptFuncs.Generator.GetNameForType(type) + RandomStringTitle()); diff --git a/Novetus/NovetusCore/StorageAndFunctions/Util.cs b/Novetus/NovetusCore/StorageAndFunctions/Util.cs index 3ba1ef1..6cce83e 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/Util.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/Util.cs @@ -680,7 +680,7 @@ namespace Novetus.Core return (p <= 0); } - public static void ConsolePrint(string text, int type = 1, bool noLog = false) + public static void ConsolePrint(string text, int type = 1, bool noLog = false, bool scrollDown = true) { switch (type) { @@ -718,7 +718,7 @@ namespace Novetus.Core #if LAUNCHER if (GlobalVars.consoleForm != null) { - FormPrint(text, type, GlobalVars.consoleForm.ConsoleBox); + FormPrint(text, type, GlobalVars.consoleForm.ConsoleBox, scrollDown); } #endif } @@ -756,7 +756,7 @@ namespace Novetus.Core } } - private static void FormPrint(string text, int type, RichTextBox box) + private static void FormPrint(string text, int type, RichTextBox box, bool scrollDown = true) { if (box == null) return; @@ -790,6 +790,12 @@ namespace Novetus.Core box.AppendText(text, Color.Black); break; } + + if (scrollDown) + { + box.SelectionStart = box.Text.Length; + box.ScrollToCaret(); + } } private static void ConsoleText(string text, ConsoleColor color, bool newLine = false) @@ -805,7 +811,7 @@ namespace Novetus.Core } } - public static void ReadTextFileWithColor(string path) + public static void ReadTextFileWithColor(string path, bool scrollDown = true) { var lines = File.ReadLines(path); foreach (var line in lines) @@ -813,11 +819,11 @@ namespace Novetus.Core try { string[] vals = line.Split('|'); - ConsolePrint(vals[0], Convert.ToInt32(vals[1]), true); + ConsolePrint(vals[0], Convert.ToInt32(vals[1]), true, scrollDown); } catch (Exception) { - ConsolePrint(line, 1, true); + ConsolePrint(line, 1, true, scrollDown); } } } diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs index 1d615d8..d0093c9 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs @@ -142,6 +142,7 @@ namespace NovetusLauncher switch (GlobalVars.GameOpened) { case ScriptType.Server: + case ScriptType.EasterEggServer: ShowCloseError("A server is open.", "Server", e); break; default: @@ -191,7 +192,13 @@ namespace NovetusLauncher } if (GlobalVars.UserConfiguration.WebProxyEnabled) { - GlobalVars.Proxy.Stop(); + try + { + GlobalVars.Proxy.Stop(); + } + catch + { + } } if (!GlobalVars.AppClosed) @@ -269,7 +276,7 @@ namespace NovetusLauncher } } - public void StartGame(ScriptType gameType, bool no3d = false, bool nomap = false, bool console = false) + public async void StartGame(ScriptType gameType, bool no3d = false, bool nomap = false, bool console = false) { if (!console) { @@ -355,7 +362,9 @@ namespace NovetusLauncher ClientManagement.LaunchRBXClient(ScriptType.Studio, false, nomap, new EventHandler(ClientExitedBase)); break; case ScriptType.EasterEgg: - ClientManagement.LaunchRBXClient(ScriptType.EasterEgg, false, false, new EventHandler(EasterEggExited)); + ClientManagement.LaunchRBXClient(ScriptType.EasterEggServer, false, false, new EventHandler(ServerExited)); + await Util.Delay(1500); + ClientManagement.LaunchRBXClient(ScriptType.EasterEgg, false, true, new EventHandler(EasterEggExited)); break; case ScriptType.None: default: @@ -370,6 +379,11 @@ namespace NovetusLauncher public void EasterEggLogic() { + if (LocalVars.Clicks <= 0) + { + LocalVars.prevsplash = SplashLabel.Text; + } + if (LocalVars.Clicks < 10) { LocalVars.Clicks += 1; @@ -431,6 +445,12 @@ namespace NovetusLauncher { LocalVars.Clicks = 0; } + + var processes = Process.GetProcessesByName("RobloxApp_server"); + foreach (var process in processes) + { + process.Kill(); + } ClientExitedBase(sender, e); } diff --git a/Novetus/NovetusLauncher/Forms/NovetusConsole.cs b/Novetus/NovetusLauncher/Forms/NovetusConsole.cs index 4a45dc1..7083114 100644 --- a/Novetus/NovetusLauncher/Forms/NovetusConsole.cs +++ b/Novetus/NovetusLauncher/Forms/NovetusConsole.cs @@ -398,7 +398,7 @@ namespace NovetusLauncher } else if (vals[1].Equals("off", StringComparison.InvariantCultureIgnoreCase)) { - if (!GlobalVars.Proxy.HasStarted() && !GlobalVars.UserConfiguration.WebProxyEnabled) + if (!GlobalVars.Proxy.Started && !GlobalVars.UserConfiguration.WebProxyEnabled) { Util.ConsolePrint("The web proxy is disabled. Please turn it on in order to use this command.", 2); return; @@ -408,7 +408,7 @@ namespace NovetusLauncher } else if (vals[1].Equals("disable", StringComparison.InvariantCultureIgnoreCase)) { - if (!GlobalVars.Proxy.HasStarted() && !GlobalVars.UserConfiguration.WebProxyEnabled) + if (!GlobalVars.Proxy.Started && !GlobalVars.UserConfiguration.WebProxyEnabled) { Util.ConsolePrint("The web proxy is already disabled.", 2); return; @@ -425,7 +425,7 @@ namespace NovetusLauncher } else if (vals[1].Equals("extensions", StringComparison.InvariantCultureIgnoreCase)) { - if (!GlobalVars.Proxy.HasStarted() && !GlobalVars.UserConfiguration.WebProxyEnabled) + if (!GlobalVars.Proxy.Started && !GlobalVars.UserConfiguration.WebProxyEnabled) { Util.ConsolePrint("The web proxy is disabled. Please turn it on in order to use this command.", 2); return; @@ -468,9 +468,9 @@ namespace NovetusLauncher public void ConsoleHelp() { ClearConsole(); - Util.ConsolePrint("Help:", 3, true); - Util.ReadTextFileWithColor(GlobalPaths.BasePath + "\\" + GlobalPaths.ConsoleHelpFileName); - Util.ConsolePrint(GlobalVars.Important2, 0, true); + Util.ConsolePrint("Help:", 3, true, false); + Util.ReadTextFileWithColor(GlobalPaths.BasePath + "\\" + GlobalPaths.ConsoleHelpFileName, false); + Util.ConsolePrint(GlobalVars.Important2, 0, true, false); ScrollToTop(); } @@ -478,7 +478,7 @@ namespace NovetusLauncher { ClearConsole(); Util.ConsolePrint("ClientScript Documentation:", 3, true); - Util.ReadTextFileWithColor(GlobalPaths.BasePath + "\\" + GlobalPaths.ClientScriptDocumentationFileName); + Util.ReadTextFileWithColor(GlobalPaths.BasePath + "\\" + GlobalPaths.ClientScriptDocumentationFileName, false); ScrollToTop(); } @@ -537,7 +537,7 @@ namespace NovetusLauncher { GlobalVars.UserConfiguration = savedConfig; } - ConsoleForm.CloseEventInternal(); + ConsoleForm.CloseEvent(e); } } } diff --git a/Novetus/NovetusLauncher/Forms/SDK/ItemCreationSDKColorMenu.cs b/Novetus/NovetusLauncher/Forms/SDK/ItemCreationSDKColorMenu.cs index 2e03d2f..970f9d0 100644 --- a/Novetus/NovetusLauncher/Forms/SDK/ItemCreationSDKColorMenu.cs +++ b/Novetus/NovetusLauncher/Forms/SDK/ItemCreationSDKColorMenu.cs @@ -35,9 +35,7 @@ public partial class ItemCreationSDKColorMenu : Form } parent.partColorID = Convert.ToInt32(colorMenu.Items[selectedIndex].Tag); -#pragma warning disable CS1690 // Accessing a member on a field of a marshal-by-reference class may cause a runtime exception parent.partColorLabel.Text = parent.partColorID.ToString(); -#pragma warning restore CS1690 // Accessing a member on a field of a marshal-by-reference class may cause a runtime exception Close(); } diff --git a/README-AND-CREDITS.TXT b/README-AND-CREDITS.TXT index 4be084b..7d74297 100644 --- a/README-AND-CREDITS.TXT +++ b/README-AND-CREDITS.TXT @@ -306,10 +306,10 @@ ROBLOX Script Generator was made by S. Costeira. Thank you to NT_x86 for helping me with security fixes. Thank you XlXi for the idea of the original logo. This logo was remade in newer verions in higher quality. Thank you Nukley for the idea of the Splash Tester. -Credits go to Nostal-ia for getting 2011M corescripts working and helping me with 2011E corescripts. +Credits go to matboff for getting 2011M corescripts working and helping me with 2011E corescripts. Credits to Hazelnut (creator of JRBX) for the buttons used in the Stylish style. Credits go to davcs86 for the HWID generation code (https://github.com/davcs86/csharp-uhwid) -Credits go to BRAVONATCHO and Sodikm for parts of the web proxy code. +Credits go to matboff and Sodikm for parts of the web proxy code. All credits for the used pieces of code go to the respective authors. ------------------------------------------------------------ diff --git a/changelog.txt b/changelog.txt index 8f5408a..04cc096 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,25 @@ +1.3 Snapshot v22.8412.32591.1 +Enhancements: +- Added badge support to the Web Proxy. +- The Easter Egg now loads up a server and a client, rather than loading a client in Play Solo mode. +- Further improved web proxy reliability. + +Fixes: +- Fixed the previous splash not showing up after closing the Easter Egg. +- Fixed a bug where the Console could close Novetus with a client open. +---------------------------------------------------------------------------- +1.3 Snapshot v22.8411.39962.1 +Enhancements: +- Web Proxy Extension API additions: + - Added Author(). +- Improved Web Proxy Extension loading and management. +- Improved the Console user experience. +- Added proxy extensions reload - Reloads all Web Proxy extensions. +- Added proxy extensions list - Lists all Web Proxy extensions. + +Fixes: +- Fixed a bug that happens when the user manually stops the Web Proxy with the Console. +---------------------------------------------------------------------------- 1.3 Snapshot v22.8408.16129.1 Enhancements: - Changed the design of the Console to be more user friendly. diff --git a/consolehelp.txt b/consolehelp.txt index b9f8b7d..f2adc74 100644 --- a/consolehelp.txt +++ b/consolehelp.txt @@ -16,7 +16,9 @@ Commands:|3 + config save - Saves the config file|4 + config load - Reloads the config file|4 + config reset - Resets the config file|4 -+ proxy - Turns Novetus' web proxy on and off. ++ proxy - Turns Novetus' web proxy on and off. 'disable' disables the web proxy entirely.|4 ++ proxy extensions reload - Reloads all Web Proxy extensions.|4 ++ proxy extensions list - Lists all Web Proxy extensions.|4 ---------|1 Command-Line Parameters:|3 ---------|1 diff --git a/defaultaddons/URLSetup.lua b/defaultaddons/URLSetup.lua new file mode 100644 index 0000000..e45f5c6 --- /dev/null +++ b/defaultaddons/URLSetup.lua @@ -0,0 +1,30 @@ +local this = {} + +function this:Name() + return "URL Setup Addon" +end + +function this:IsEnabled(Script, Client) + if (Script ~= "Studio") then + return true + else + return false + end +end + +function this:PreInit(Script, Client) + pcall(function() game:GetService("BadgeService"):SetPlaceId(game.PlaceId) end) + pcall(function() game:GetService("BadgeService"):SetAwardBadgeUrl("http://www.roblox.com/Game/Badge/AwardBadge.ashx?UserID=%d&BadgeID=%d&PlaceID=%d") end) + pcall(function() game:GetService("BadgeService"):SetHasBadgeUrl("http://www.roblox.com/Game/Badge/HasBadge.ashx?UserID=%d&BadgeID=%d") end) + pcall(function() game:GetService("BadgeService"):SetIsBadgeDisabledUrl("http://www.roblox.com/Game/Badge/IsBadgeDisabled.ashx?BadgeID=%d&PlaceID=%d") end) + pcall(function() game:GetService("BadgeService"):SetIsBadgeLegalUrl("") end) +end + +-- DO NOT REMOVE THIS. this is required to load this addon into the game. + +function AddModule(t) + print("AddonLoader: Adding " .. this:Name()) + table.insert(t, this) +end + +_G.CSScript_AddModule=AddModule \ No newline at end of file diff --git a/defaultaddons/core/AddonLoader.lua b/defaultaddons/core/AddonLoader.lua index e3743dc..2bb83b8 100644 --- a/defaultaddons/core/AddonLoader.lua +++ b/defaultaddons/core/AddonLoader.lua @@ -1,6 +1,6 @@ -- put script names here -Addons = {"Utils", "ShadersCompatibility", "ServerWhitelist"} +Addons = {"Utils", "ShadersCompatibility", "ServerWhitelist", "URLSetup"} -- DONT EDIT ANYTHING ELSE BELOW diff --git a/defaultaddons/novetusexts/webproxy/Asset.cs b/defaultaddons/novetusexts/webproxy/Asset.cs index e527c2b..7c21e82 100644 --- a/defaultaddons/novetusexts/webproxy/Asset.cs +++ b/defaultaddons/novetusexts/webproxy/Asset.cs @@ -16,6 +16,11 @@ public class Asset : IWebProxyExtension return "Asset Redirection Extension"; } + public override string Author() + { + return "Bitl"; + } + public override bool IsValidURL(string absolutePath, string host) { return (absolutePath.EndsWith("/asset") || absolutePath.EndsWith("/asset/")); diff --git a/defaultaddons/novetusexts/webproxy/AwardBadge.cs b/defaultaddons/novetusexts/webproxy/AwardBadge.cs new file mode 100644 index 0000000..d8e498e --- /dev/null +++ b/defaultaddons/novetusexts/webproxy/AwardBadge.cs @@ -0,0 +1,137 @@ +using System; +using System.IO; +using System.Threading.Tasks; +using System.Web; +using System.Net; +using System.Collections.Generic; +using Titanium.Web.Proxy; +using Titanium.Web.Proxy.EventArguments; +using Titanium.Web.Proxy.Http; +using Titanium.Web.Proxy.Models; +using Novetus.Core; + +public class AwardBadge : IWebProxyExtension +{ + struct BadgeData + { + public long BadgeId; + public string BadgeName; + public string BadgeCreatorName; + } + + private static readonly string BadgeDatabasePath = GlobalPaths.ConfigDir + "\\BadgeDatabase.ini"; + private string BadgeDatabaseSection = "BadgeDatabase"; + private string MetadataFileExtension = "_meta.ini"; + private INIFile ini = new INIFile(BadgeDatabasePath); + + public override string Name() + { + return "Badge Award Extension"; + } + + public override string Author() + { + return "Bitl"; + } + + void AddBadgeToDB(long BadgeID, bool Awarded = false) + { + CreateBadgeDatabaseIfNeeded(); + ini.IniWriteValue(BadgeDatabaseSection, BadgeID.ToString(), Awarded.ToString()); + } + + bool PlayerHasBadge(long BadgeID) + { + CreateBadgeDatabaseIfNeeded(); + + if (ini.IniValueExists(BadgeID.ToString())) + { + string awarded = ini.IniReadValue(BadgeDatabaseSection, BadgeID.ToString(), "False"); + return Convert.ToBoolean(awarded); + } + + return false; + } + + void CreateBadgeDatabaseIfNeeded() + { + if (!File.Exists(BadgeDatabasePath)) + { + Util.ConsolePrint("WARNING - " + BadgeDatabasePath + " not found. Creating empty badge database.", 5); + File.Create(BadgeDatabasePath).Dispose(); + } + } + + public override void OnExtensionLoad() + { + CreateBadgeDatabaseIfNeeded(); + } + + BadgeData LoadMetadata(long BadgeID) + { + BadgeData result; + result.BadgeId = BadgeID; + result.BadgeName = BadgeID.ToString(); + result.BadgeCreatorName = "Unknown"; + string metaFile = (GlobalVars.UserConfiguration.MapPath.Replace(".rbxl", "").Replace(".rbxlx", "").Replace(".bz2", "") + MetadataFileExtension); + + if (GlobalVars.GameOpened == ScriptType.EasterEgg) + { + metaFile = ((GlobalPaths.DataDir + "\\Appreciation.rbxl").Replace(".rbxl", MetadataFileExtension)); + } + + if (File.Exists(metaFile)) + { + try + { + INIFile metaIni = new INIFile(metaFile); + string section = BadgeID.ToString(); + + string name = metaIni.IniReadValue(section, "BadgeName", BadgeID.ToString()); + string creator = metaIni.IniReadValue(section, "BadgeCreatorName", "Unknown"); + result.BadgeName = name; + result.BadgeCreatorName = creator; + } + catch (Exception) + { + } + } + + return result; + } + + public override bool IsValidURL(string absolutePath, string host) + { + return absolutePath.EndsWith("/game/badge/awardbadge.ashx"); + } + + string GenerateBadgeString(string creatorName, string badgeName, long id) + { + if (PlayerHasBadge(id)) + { + return "0"; + } + + return GlobalVars.UserConfiguration.PlayerName + " won " + creatorName + "'s \"" + badgeName + "\" award!"; + } + + public override async Task OnRequest(object sender, SessionEventArgs e) + { + await Util.Delay(1000); + string query = e.HttpClient.Request.RequestUri.Query; + long badgeid = 0; + long userid = 0; + if (!long.TryParse(NetFuncs.FindQueryString(query, "badgeid"), out badgeid) && + !long.TryParse(NetFuncs.FindQueryString(query, "userid"), out userid)) + { + e.GenericResponse("", HttpStatusCode.BadRequest); + return; + } + + BadgeData meta = LoadMetadata(badgeid); + + string badgeAwardString = GenerateBadgeString(meta.BadgeCreatorName, meta.BadgeName, badgeid); + AddBadgeToDB(badgeid, true); + e.Ok(badgeAwardString, NetFuncs.GenerateHeaders(badgeAwardString.Length.ToString())); + } +} \ No newline at end of file diff --git a/defaultaddons/novetusexts/webproxy/StudioLaunchPage.cs b/defaultaddons/novetusexts/webproxy/StudioLaunchPage.cs index dcb744c..9eaf555 100644 --- a/defaultaddons/novetusexts/webproxy/StudioLaunchPage.cs +++ b/defaultaddons/novetusexts/webproxy/StudioLaunchPage.cs @@ -16,6 +16,11 @@ public class StudioLaunchPage : IWebProxyExtension return "Studio Launch Page Extension"; } + public override string Author() + { + return "Bitl"; + } + public override bool IsValidURL(string absolutePath, string host) { return absolutePath.EndsWith("/ide/landing.aspx") || absolutePath.EndsWith("/my/places.aspx"); diff --git a/defaultaddons/novetusexts/webproxy/UploadWarnings.cs b/defaultaddons/novetusexts/webproxy/UploadWarnings.cs index cac5430..7048ae7 100644 --- a/defaultaddons/novetusexts/webproxy/UploadWarnings.cs +++ b/defaultaddons/novetusexts/webproxy/UploadWarnings.cs @@ -16,6 +16,11 @@ public class UploadWarnings : IWebProxyExtension return "Upload Dialog Warnings Extension"; } + public override string Author() + { + return "Bitl"; + } + public override bool IsValidURL(string absolutePath, string host) { return absolutePath.EndsWith("/uploadmedia/postimage.aspx") || absolutePath.EndsWith("/uploadmedia/uploadvideo.aspx"); diff --git a/scripts/batch/clean_junk.bat b/scripts/batch/clean_junk.bat index 1330c2d..a194752 100644 --- a/scripts/batch/clean_junk.bat +++ b/scripts/batch/clean_junk.bat @@ -108,6 +108,7 @@ del /s /q Novetus\config\ReShade.ini del /s /q Novetus\config\config.ini del /s /q Novetus\config\config_customization.ini del /s /q Novetus\config\initialfilelist.txt +del /s /q Novetus\config\BadgeDatabase.ini del /s /q Novetus\config\clients\GlobalSettings2_2007E.xml del /s /q Novetus\config\clients\GlobalSettings2_2007E-Shaders.xml diff --git a/scripts/launcher/Appreciation.rbxl b/scripts/launcher/Appreciation.rbxl index eb6f3db..44b4cd2 100644 --- a/scripts/launcher/Appreciation.rbxl +++ b/scripts/launcher/Appreciation.rbxl @@ -1,23 +1,10 @@ null nil - + - Run Service - true - - - - - Selection - true - - - - - 0 - true - RBX0 + RBX1 + 56.700002957135439 0 0 @@ -33,49 +20,11 @@ 1 Workspace - RBX1 + RBX2 true - + - null - 0 - - 9.39895344 - 21.2737999 - 50.021347 - 0.999782801 - 0.011853327 - -0.0171419401 - -1.86264515e-009 - 0.822510302 - 0.568750203 - 0.0208410043 - -0.568626702 - 0.822331667 - - - 9.74179173 - 9.89881229 - 33.5747375 - 1 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 1 - - Camera - true - - - - - 0 - true 0 0 @@ -91,10 +40,10 @@ 1 Base - RBX2 + RBX4 true - + true -0.5 @@ -121,10 +70,6 @@ 1 true - false - 0 - true - true false 0.5 1 @@ -138,6 +83,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -167,8 +113,40 @@ 64 + + + BadgeID + 2018 + true + + + + + false + + Script + print("Badge Awarder Loaded. BadgeID:" .. script.Parent.BadgeID.Value) + +-- ROBLOX scripter hackers, see what you can do with this: +-- game:GetService("BadgeService"):UserHasBadge(userid, badgeid) + +function OnTouch(part) + if (part.Parent:FindFirstChild("Humanoid") ~= nil) then + local p = game.Players:GetPlayerFromCharacter(part.Parent) + if (p ~= nil) then + print("Awarding BadgeID: " ..script.Parent.BadgeID.Value .. " to UserID: " .. p.userId) + local b = game:GetService("BadgeService") + b:AwardBadge(p.userId, script.Parent.BadgeID.Value) + end + end +end + +script.Parent.Touched:connect(OnTouch) + true + + - + true -0.5 @@ -195,10 +173,6 @@ 0 true - false - 0 - true - true false 0.5 1 @@ -212,6 +186,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -242,7 +217,7 @@ - + true -0.5 @@ -269,10 +244,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -286,6 +257,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -316,7 +288,7 @@ - + true -0.5 @@ -343,10 +315,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -360,6 +328,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -390,7 +359,7 @@ - + true -0.5 @@ -417,10 +386,6 @@ 0 false - true - 0 - true - true false 0.5 1 @@ -434,6 +399,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -465,10 +431,8 @@ - + - 0 - true 0 0 @@ -484,10 +448,10 @@ 1 Bitl - RBX3 + RBX12 true - + true -0.5 @@ -514,13 +478,9 @@ -1 true - true - 0 - true - true false 0.5 - 0 + 1 0.300000012 -0.5 0.5 @@ -531,6 +491,7 @@ 0 0 true + 256 Head 0 -0.5 @@ -560,21 +521,33 @@ 1 - + + 2 + 2 0 Mesh + + 0 + 0 + 0 + 1.25 1.25 1.25 + + 1 + 1 + 1 + true - + 5 face @@ -585,7 +558,7 @@ - + true -0.5 @@ -612,13 +585,9 @@ -1 true - true - 0 - true - true false 0.5 - 0 + 1 0.300000012 -0.5 0.5 @@ -629,6 +598,7 @@ 2 0 true + 256 Torso 0 0 @@ -658,7 +628,7 @@ 1 - + 5 Decal @@ -669,7 +639,7 @@ - + true -0.5 @@ -696,13 +666,9 @@ -1 true - true - 0 - true - true false 0.5 - 0 + 1 0.300000012 -0.5 0.5 @@ -713,6 +679,7 @@ 0 0 true + 256 Left Arm 0 -0.5 @@ -743,7 +710,7 @@ - + true -0.5 @@ -770,13 +737,9 @@ -1 true - true - 0 - true - true false 0.5 - 0 + 1 0.300000012 -0.5 0.5 @@ -787,6 +750,7 @@ 0 0 true + 256 Right Arm 0 -0.5 @@ -817,7 +781,7 @@ - + true -0.5 @@ -844,13 +808,9 @@ -1 true - true - 0 - true - true false 0.5 - 0 + 1 0.300000012 -0.5 0.5 @@ -861,6 +821,7 @@ 0 0 true + 256 Left Leg 0 -0.5 @@ -891,7 +852,7 @@ - + true -0.5 @@ -918,13 +879,9 @@ -1 true - true - 0 - true - true false 0.5 - 0 + 1 0.300000012 -0.5 0.5 @@ -935,6 +892,7 @@ 0 0 true + 256 Right Leg 0 -0.5 @@ -965,7 +923,7 @@ - + true -0.5 @@ -992,13 +950,9 @@ 1 true - true - 0 - true - true false 0.5 - 2 + 1 0.300000012 -0.5 0.5 @@ -1009,6 +963,7 @@ 0 0 true + 256 Hat 0 -0.5 @@ -1038,22 +993,34 @@ 1 - + + 2 + 2 rbxasset://../../../shareddata/charcustom/hats/fonts/tophat.mesh 5 Mesh + + 0 + 0 + 0 + 1 1 1 rbxasset://../../../shareddata/charcustom/hats/textures/RedTopHat.png + + 1 + 1 + 1 + true - + true -0.5 @@ -1080,13 +1047,9 @@ 1 true - true - 0 - true - true false 0.5 - 0 + 1 0.300000012 -0.5 0.5 @@ -1097,6 +1060,7 @@ 0 0 true + 256 Swordpack 0 -0.5 @@ -1126,26 +1090,36 @@ 1 - + + 2 + 2 rbxasset://../../../shareddata/charcustom/hats/fonts/Swordpack.mesh 5 Mesh + + 0 + 0 + 0 + 1 1 1 rbxasset://../../../shareddata/charcustom/hats/textures/Swordpack.png + + 1 + 1 + 1 + true - + - 0 - true 0 0 @@ -1161,10 +1135,10 @@ 1 Icon - RBX4 + RBX26 true - + true -0.5 @@ -1191,10 +1165,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -1208,6 +1178,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -1238,7 +1209,7 @@ - + true -0.5 @@ -1265,10 +1236,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -1282,6 +1249,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -1312,7 +1280,7 @@ - + true -0.5 @@ -1339,10 +1307,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -1356,6 +1320,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -1386,7 +1351,7 @@ - + true -0.5 @@ -1413,10 +1378,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -1430,6 +1391,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -1460,7 +1422,7 @@ - + true -0.5 @@ -1487,10 +1449,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -1504,6 +1462,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -1535,10 +1494,8 @@ - + - 0 - true 0 0 @@ -1554,10 +1511,10 @@ 1 Room - RBX1 + RBX2 true - + true -0.5 @@ -1584,10 +1541,6 @@ 0 true - false - 0 - true - true false 0.5 1 @@ -1601,6 +1554,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -1631,7 +1585,7 @@ - + true -0.5 @@ -1658,10 +1612,6 @@ 0 false - false - 0 - true - true false 0.5 1 @@ -1675,6 +1625,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -1704,16 +1655,29 @@ 64 - + false + DoorEnter - brick = script.Parent messageText = "Epilepsy Warning: Flashing lights. Don't press the button if you've had a history of seizures." message = Instance.new("Hint") message.Name = "Warning" message.Text = messageText function onHit(hit) if (hit.Parent:findFirstChild("Humanoid") ~= nil) then message.Parent = game.Workspace end end brick.Touched:connect(onHit) + brick = script.Parent +messageText = "Epilepsy Warning: Flashing lights. Don't press the button if you've had a history of seizures." +message = Instance.new("Hint") +message.Name = "Warning" +message.Text = messageText + +function onHit(hit) + if (hit.Parent:findFirstChild("Humanoid") ~= nil) then + message.Parent = game.Workspace + end +end + +brick.Touched:connect(onHit) true - + true -0.5 @@ -1740,10 +1704,6 @@ 0 true - false - 0 - true - true false 0.5 1 @@ -1757,6 +1717,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -1787,7 +1748,7 @@ - + true -0.5 @@ -1814,10 +1775,6 @@ 0 true - false - 0 - true - true false 0.5 1 @@ -1831,6 +1788,7 @@ 0 0 true + 256 Panel 0 -0.5 @@ -1860,7 +1818,7 @@ 64 - + 4 Animation @@ -1871,7 +1829,7 @@ - + true -0.5 @@ -1898,10 +1856,6 @@ 1 true - false - 0 - true - true false 0.5 1 @@ -1915,6 +1869,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -1945,7 +1900,7 @@ - + true -0.5 @@ -1972,10 +1927,6 @@ 1 true - false - 0 - true - true false 0.5 1 @@ -1989,6 +1940,7 @@ 0 0 true + 256 DanceFloor 0 -0.5 @@ -2019,7 +1971,7 @@ - + false -0.5 @@ -2046,10 +1998,6 @@ -1 true - true - 0 - true - true false 0.5 1 @@ -2063,6 +2011,7 @@ 0 0 false + 256 Start 0 -0.5 @@ -2092,18 +2041,61 @@ 5 - + false + ButtonPress - brick = script.Parent animation = script.Parent.Parent.Panel.Animation dancefloor = script.Parent.Parent.DanceFloor messageText = "Art by Voreburger" message = Instance.new("Hint") message.Text = messageText function antonymph() brick.Antonymph:play() message.Parent = game.Workspace while true do animation.Texture = "rbxasset://../../../shareddata/textures/f1_antonymph.png" dancefloor.BrickColor = BrickColor.random() wait(0.2) animation.Texture = "rbxasset://../../../shareddata/textures/f2_of.png" dancefloor.BrickColor = BrickColor.random() wait(0.2) animation.Texture = "rbxasset://../../../shareddata/textures/f3_the.png" dancefloor.BrickColor = BrickColor.random() wait(0.2) animation.Texture = "rbxasset://../../../shareddata/textures/f4_internet.png" dancefloor.BrickColor = BrickColor.random() wait(0.2) end end function onHit(hit) if hit.Parent:findFirstChild("Humanoid") ~= nil then if game.Workspace:findFirstChild("Warning") ~= nil then game.Workspace.Warning:remove() end antonymph() end end brick.Touched:connect(onHit) + brick = script.Parent +animation = script.Parent.Parent.Panel.Animation +dancefloor = script.Parent.Parent.DanceFloor +messageText = "Art by Voreburger" +message = Instance.new("Hint") +message.Text = messageText + +function antonymph() + brick.Antonymph:play() + message.Parent = game.Workspace + + while true do + animation.Texture = "rbxasset://../../../shareddata/textures/f1_antonymph.png" + dancefloor.BrickColor = BrickColor.random() + wait(0.2) + animation.Texture = "rbxasset://../../../shareddata/textures/f2_of.png" + dancefloor.BrickColor = BrickColor.random() + wait(0.2) + animation.Texture = "rbxasset://../../../shareddata/textures/f3_the.png" + dancefloor.BrickColor = BrickColor.random() + wait(0.2) + animation.Texture = "rbxasset://../../../shareddata/textures/f4_internet.png" + dancefloor.BrickColor = BrickColor.random() + wait(0.2) + end +end + +function onHit(hit) + if hit.Parent:findFirstChild("Humanoid") ~= nil then + if game.Workspace:findFirstChild("Warning") ~= nil then + game.Workspace.Warning:remove() + end + local p = game.Players:GetPlayerFromCharacter(hit.Parent) + if p ~= nil then + local b = game:GetService("BadgeService") + b:AwardBadge(p.userId, script.Parent.BadgeID.Value) + end + antonymph() + end +end + +brick.Touched:connect(onHit) true - + true Antonymph + 1 -1 false rbxasset://../../../shareddata/sounds/antonymph.mp3 @@ -2111,7 +2103,7 @@ true - + 1 Warning @@ -2121,12 +2113,17 @@ true + + + BadgeID + 42021 + true + + - + - 0 - true 0 0 @@ -2142,13 +2139,11 @@ 1 THANK YOU! - RBX5 + RBX45 true - + - 0 - true 0 0 @@ -2164,10 +2159,10 @@ 1 THANK - RBX5 + RBX45 true - + true -0.5 @@ -2194,10 +2189,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -2211,6 +2202,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -2241,7 +2233,7 @@ - + true -0.5 @@ -2268,10 +2260,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -2285,6 +2273,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -2315,7 +2304,7 @@ - + true -0.5 @@ -2342,10 +2331,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -2359,6 +2344,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -2389,7 +2375,7 @@ - + true -0.5 @@ -2416,10 +2402,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -2433,6 +2415,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -2463,7 +2446,7 @@ - + true -0.5 @@ -2490,10 +2473,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -2507,6 +2486,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -2537,7 +2517,7 @@ - + true -0.5 @@ -2564,10 +2544,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -2581,6 +2557,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -2611,7 +2588,7 @@ - + true -0.5 @@ -2638,10 +2615,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -2655,6 +2628,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -2685,7 +2659,7 @@ - + true -0.5 @@ -2712,10 +2686,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -2729,6 +2699,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -2759,7 +2730,7 @@ - + true -0.5 @@ -2786,10 +2757,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -2803,6 +2770,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -2833,7 +2801,7 @@ - + true -0.5 @@ -2860,10 +2828,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -2877,6 +2841,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -2907,7 +2872,7 @@ - + true -0.5 @@ -2934,10 +2899,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -2951,6 +2912,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -2981,7 +2943,7 @@ - + true -0.5 @@ -3008,10 +2970,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -3025,6 +2983,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -3055,7 +3014,7 @@ - + true -0.5 @@ -3082,10 +3041,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -3099,6 +3054,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -3129,7 +3085,7 @@ - + true -0.5 @@ -3156,10 +3112,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -3173,6 +3125,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -3203,7 +3156,7 @@ - + true -0.5 @@ -3230,10 +3183,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -3247,6 +3196,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -3277,7 +3227,7 @@ - + true -0.5 @@ -3304,10 +3254,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -3321,6 +3267,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -3351,7 +3298,7 @@ - + true -0.5 @@ -3378,10 +3325,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -3395,6 +3338,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -3425,7 +3369,7 @@ - + true -0.5 @@ -3452,10 +3396,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -3469,6 +3409,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -3499,7 +3440,7 @@ - + true -0.5 @@ -3526,10 +3467,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -3543,6 +3480,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -3573,7 +3511,7 @@ - + true -0.5 @@ -3600,10 +3538,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -3617,6 +3551,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -3648,10 +3583,8 @@ - + - 0 - true 0 0 @@ -3667,10 +3600,10 @@ 1 YOU! - RBX6 + RBX67 true - + true -0.5 @@ -3697,10 +3630,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -3714,6 +3643,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -3744,7 +3674,7 @@ - + true -0.5 @@ -3771,10 +3701,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -3788,6 +3714,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -3818,7 +3745,7 @@ - + true -0.5 @@ -3845,10 +3772,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -3862,6 +3785,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -3892,7 +3816,7 @@ - + true -0.5 @@ -3919,10 +3843,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -3936,6 +3856,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -3966,7 +3887,7 @@ - + true -0.5 @@ -3993,10 +3914,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -4010,6 +3927,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -4040,7 +3958,7 @@ - + true -0.5 @@ -4067,10 +3985,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -4084,6 +3998,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -4114,7 +4029,7 @@ - + true -0.5 @@ -4141,10 +4056,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -4158,6 +4069,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -4188,7 +4100,7 @@ - + true -0.5 @@ -4215,10 +4127,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -4232,6 +4140,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -4262,7 +4171,7 @@ - + true -0.5 @@ -4289,10 +4198,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -4306,6 +4211,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -4336,7 +4242,7 @@ - + true -0.5 @@ -4363,10 +4269,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -4380,6 +4282,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -4410,7 +4313,7 @@ - + true -0.5 @@ -4437,10 +4340,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -4454,6 +4353,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -4484,7 +4384,7 @@ - + true -0.5 @@ -4511,10 +4411,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -4528,6 +4424,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -4558,7 +4455,7 @@ - + true -0.5 @@ -4585,10 +4482,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -4602,6 +4495,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -4632,7 +4526,7 @@ - + true -0.5 @@ -4659,10 +4553,6 @@ 0 true - true - 0 - true - true false 0.5 1 @@ -4676,6 +4566,7 @@ 0 0 true + 256 Part 0 -0.5 @@ -4708,8 +4599,9 @@ - + + false true -0.5 0.5 @@ -4735,11 +4627,8 @@ 1 true - true - 0 - true - true false + 10 0.5 1 0.300000012 @@ -4752,6 +4641,7 @@ 2 0 true + 256 SpawnLocation true 0 @@ -4764,6 +4654,7 @@ 0 0 + 194 -0.5 0.5 0 @@ -4782,7 +4673,7 @@ 6 - + 1 Decal @@ -4793,64 +4684,28 @@ - + null 0 - 0 - 1.10537087e-006 - 1.10537087e-006 - 1 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 1 + 18.7733498 + 50.8485947 + 70.46241 + 0.987410367 + -0.0628171042 + 0.145171881 + -3.7252903e-009 + 0.917764783 + 0.397124588 + -0.158179849 + -0.392124921 + 0.906210363 - 0 - 0 - -5 - 1 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 1 - - Camera - true - - - - - null - 0 - - 1.87747955 - 36.7402802 - 32.7510681 - 0.99968034 - 0.018067915 - -0.0176865812 - -2.79396772e-009 - 0.699525595 - 0.714607596 - 0.025283685 - -0.714379191 - 0.699301958 - - - 2.23121119 - 22.4481277 - 18.7650299 + 3 + 7.69984436 + -28 1 0 0 @@ -4866,62 +4721,171 @@ - RBX7 - RBX8 - + - Players - true - 10 - - - - - StarterPack + Run Service true - - - Soundscape - true - 10 - 1 - 1 - - RBX9 - RBX10 - RBX11 - RBX12 - RBX13 - RBX14 - RBX15 - RBX16 - RBX17 - RBX18 - RBX19 - RBX20 - RBX21 - RBX22 - - + RBX84 + RBX85 + Instance true - RBX23 - + - 4286221432 - 4278190080 - Lighting - 4291151301 - 14:00:00 - 4292335327 + ContentFilter + true + + + + + Instance + true + + + + + GuiService + true + + + + + 12 + Players + true + + + + + StarterPack + true + + + + + StarterGui + true + true + + + + + 0 + 10 + 1 + Soundscape + 1 + true + + RBX94 + RBX95 + RBX96 + RBX97 + RBX98 + RBX99 + RBX100 + RBX101 + RBX102 + RBX103 + RBX104 + RBX105 + RBX106 + RBX107 + + + + PhysicsService + true + + + + + BadgeService + true + + + + + Geometry + true + + + RBX111 + + + 1000 + Debris + true + + + + + Instance + true + + + + + Instance + true + + + RBX115 + + + Selection + true + + + RBX117 + RBX118 + + + CollectionService + true + + + + + 4286611584 + 1 + 4278190080 + 4278190080 + 41.7332993 + Lighting + 4289967032 + 14:00:00 + true + + + + SkipSecurity + 0 + true + + + + + + ChangeHistoryService + true + + + + + Instance + true + + + + + Teams true - RBX24 - RBX25 \ No newline at end of file