From ec66b4f08e34b8ebdf7dbdbd34321d8b2dee7a95 Mon Sep 17 00:00:00 2001 From: Bitl Date: Tue, 7 Jul 2020 07:18:26 -0700 Subject: [PATCH] project reorganization. added scripts --- .../Novetus.sln | 7 +- .../NovetusCMD/CommandLineArguments.cs | 0 .../NovetusCMD/LocalVars.cs | 0 .../NovetusCMD/NovetusCMD.csproj | 0 .../NovetusCMD/Program.cs | 0 .../NovetusCMD/Properties/AssemblyInfo.cs | 0 .../NovetusCMD/Resources/NovetusIcon.ico | Bin .../NovetusCMD/app.config | 0 .../NovetusCMD/packages.config | 0 .../NovetusFuncs/NovetusCodeExtensions.cs | 0 .../NovetusFuncs/NovetusFuncs.projitems | 0 .../NovetusFuncs/NovetusFuncs.shproj | 0 .../NovetusFuncs/NovetusGlobalFuncs.cs | 1 + .../NovetusFuncs/NovetusLauncherFuncs.cs | 0 .../NovetusFuncs/NovetusScriptFuncs.cs | 0 .../NovetusFuncs/NovetusSecurityFuncs.cs | 0 .../CharacterCustomization.Designer.cs | 0 .../CharacterCustomization.cs | 0 .../CharacterCustomization.resx | 0 .../CharacterCustomization_legacy.Designer.cs | 0 .../CharacterCustomization_legacy.cs | 0 .../CharacterCustomization_legacy.resx | 0 .../CharacterCustomization/Resources/BC.png | Bin .../Resources/BC_legacy.png | Bin .../CharacterCustomization/Resources/OBC.png | Bin .../Resources/OBC_legacy.png | Bin .../CharacterCustomization/Resources/TBC.png | Bin .../Resources/TBC_legacy.png | Bin .../NovetusLauncher/Documentation.Designer.cs | 0 .../NovetusLauncher/LocalVars.cs | 0 .../MainForm/MainForm.Designer.cs | 0 .../NovetusLauncher/MainForm/MainForm.cs | 0 .../NovetusLauncher/MainForm/MainForm.resx | 0 .../MainForm/MainForm_legacy.Designer.cs | 0 .../MainForm/MainForm_legacy.cs | 0 .../MainForm/MainForm_legacy.resx | 0 .../NovetusLauncher/NovetusIcon.ico | Bin .../NovetusLauncher/NovetusLauncher.csproj | 0 .../NovetusSettings.Designer.cs | 0 .../NovetusLauncher/NovetusSettings.cs | 0 .../NovetusLauncher/NovetusSettings.resx | 0 .../NovetusLauncher/Program.cs | 0 .../Properties/AssemblyInfo.cs | 0 .../Properties/Resources.Designer.cs | 0 .../NovetusLauncher/Properties/Resources.resx | 0 .../NovetusLauncher/Resources/N.png | Bin .../Resources/NOVETUS_small.png | Bin .../NovetusLauncher/Resources/NovetusIcon.ico | Bin .../SDK/AssetLocalizer.Designer.cs | 0 .../NovetusLauncher/SDK/AssetLocalizer.cs | 0 .../NovetusLauncher/SDK/AssetLocalizer.resx | 0 .../SDK/ClientScriptDocumentation.Designer.cs | 0 .../SDK/ClientScriptDocumentation.cs | 0 .../SDK/ClientScriptDocumentation.resx | 0 .../SDK/ClientinfoCreator.Designer.cs | 0 .../NovetusLauncher/SDK/ClientinfoCreator.cs | 0 .../SDK/ClientinfoCreator.resx | 0 .../SDK/DiogenesEditor.Designer.cs | 0 .../NovetusLauncher/SDK/DiogenesEditor.cs | 0 .../NovetusLauncher/SDK/DiogenesEditor.resx | 0 .../NovetusLauncher/SDK/ItemMaker.Designer.cs | 0 .../NovetusLauncher/SDK/ItemMaker.cs | 0 .../NovetusLauncher/SDK/ItemMaker.resx | 0 .../SDK/NovetusSDK.Designer.cs | 0 .../NovetusLauncher/SDK/NovetusSDK.cs | 0 .../NovetusLauncher/SDK/NovetusSDK.resx | 0 .../SDK/Obj2MeshV1GUI.Designer.cs | 0 .../NovetusLauncher/SDK/Obj2MeshV1GUI.cs | 0 .../NovetusLauncher/SDK/Obj2MeshV1GUI.resx | 0 .../SDK/SplashTester.Designer.cs | 0 .../NovetusLauncher/SDK/SplashTester.cs | 0 .../NovetusLauncher/SDK/SplashTester.resx | 0 .../NovetusLauncher/app.config | 0 .../NovetusLauncher/packages.config | 0 .../NovetusURI/App.config | 0 .../NovetusURI/Form1.Designer.cs | 0 .../NovetusURI/Form1.cs | 0 .../NovetusURI/Form1.resx | 0 .../NovetusURI/LocalVars.cs | 0 .../NovetusURI/NovetusIcon.ico | Bin .../NovetusURI/NovetusURI.csproj | 0 .../NovetusURI/Program.cs | 0 .../NovetusURI/Properties/AssemblyInfo.cs | 0 .../Properties/Resources.Designer.cs | 0 .../NovetusURI/Properties/Resources.resx | 0 .../Properties/Settings.Designer.cs | 0 .../NovetusURI/Properties/Settings.settings | 0 .../NovetusURI/URI/LoaderForm.Designer.cs | 0 .../NovetusURI/URI/LoaderForm.cs | 0 .../NovetusURI/URI/LoaderForm.resx | 0 .../NovetusURI/URI/QuickConfigure.Designer.cs | 0 .../NovetusURI/URI/QuickConfigure.cs | 0 .../NovetusURI/URI/QuickConfigure.resx | 0 .../NovetusURI/packages.config | 0 .../old/NovetusLauncher2_0/App.config | 0 .../old/NovetusLauncher2_0/App.xaml | 0 .../old/NovetusLauncher2_0/App.xaml.cs | 0 .../old/NovetusLauncher2_0/MainWindow.xaml | 0 .../old/NovetusLauncher2_0/MainWindow.xaml.cs | 0 .../NovetusLauncher2_0.csproj | 0 .../Properties/AssemblyInfo.cs | 0 .../Properties/Resources.Designer.cs | 0 .../Properties/Resources.resx | 0 .../Properties/Settings.Designer.cs | 0 .../Properties/Settings.settings | 0 .../old/NovetusLauncher2_0/resources/N.png | Bin .../resources/NOVETUS_small.png | Bin .../resources/NovetusIcon.ico | Bin .../resources/TinyBcIcon.png | Bin .../resources/TinyObcIcon.png | Bin .../resources/TinyTbcIcon.png | Bin github_scripts.bat | 28 + BodyColors.xml => old/BodyColors.xml | 0 .../NovetusCMDLauncher.bat | 0 NovetusSDK.bat => old/NovetusSDK.bat | 0 scripts/2006S-Shaders/CSMPFunctions.lua | 385 ++++++++++ scripts/2006S/CSMPFunctions.lua | 385 ++++++++++ scripts/2007M-Shaders/CSMPFunctions.lua | 488 ++++++++++++ scripts/2007M/CSMPFunctions.lua | 488 ++++++++++++ scripts/2008M/CSMPFunctions.lua | 595 +++++++++++++++ scripts/2009E/CSMPFunctions.lua | 661 ++++++++++++++++ scripts/2009L/CSMPFunctions.lua | 682 +++++++++++++++++ scripts/2010L/CSMPFunctions.lua | 684 +++++++++++++++++ scripts/2011E/CSMPFunctions.lua | 715 ++++++++++++++++++ scripts/2011M/CSMPFunctions.lua | 710 +++++++++++++++++ CSView.lua => scripts/3DView/CSView.lua | 86 ++- 126 files changed, 5895 insertions(+), 20 deletions(-) rename NovetusLauncher/NovetusLauncher.sln => Novetus/Novetus.sln (92%) rename {NovetusLauncher => Novetus}/NovetusCMD/CommandLineArguments.cs (100%) rename {NovetusLauncher => Novetus}/NovetusCMD/LocalVars.cs (100%) rename {NovetusLauncher => Novetus}/NovetusCMD/NovetusCMD.csproj (100%) rename {NovetusLauncher => Novetus}/NovetusCMD/Program.cs (100%) rename {NovetusLauncher => Novetus}/NovetusCMD/Properties/AssemblyInfo.cs (100%) rename {NovetusLauncher => Novetus}/NovetusCMD/Resources/NovetusIcon.ico (100%) rename {NovetusLauncher => Novetus}/NovetusCMD/app.config (100%) rename {NovetusLauncher => Novetus}/NovetusCMD/packages.config (100%) rename {NovetusLauncher => Novetus}/NovetusFuncs/NovetusCodeExtensions.cs (100%) rename {NovetusLauncher => Novetus}/NovetusFuncs/NovetusFuncs.projitems (100%) rename {NovetusLauncher => Novetus}/NovetusFuncs/NovetusFuncs.shproj (100%) rename {NovetusLauncher => Novetus}/NovetusFuncs/NovetusGlobalFuncs.cs (99%) rename {NovetusLauncher => Novetus}/NovetusFuncs/NovetusLauncherFuncs.cs (100%) rename {NovetusLauncher => Novetus}/NovetusFuncs/NovetusScriptFuncs.cs (100%) rename {NovetusLauncher => Novetus}/NovetusFuncs/NovetusSecurityFuncs.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/CharacterCustomization/CharacterCustomization.Designer.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/CharacterCustomization/CharacterCustomization.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/CharacterCustomization/CharacterCustomization.resx (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.Designer.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.resx (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/CharacterCustomization/Resources/BC.png (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/CharacterCustomization/Resources/BC_legacy.png (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/CharacterCustomization/Resources/OBC.png (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/CharacterCustomization/Resources/OBC_legacy.png (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/CharacterCustomization/Resources/TBC.png (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/CharacterCustomization/Resources/TBC_legacy.png (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/Documentation.Designer.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/LocalVars.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/MainForm/MainForm.Designer.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/MainForm/MainForm.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/MainForm/MainForm.resx (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/MainForm/MainForm_legacy.Designer.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/MainForm/MainForm_legacy.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/MainForm/MainForm_legacy.resx (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/NovetusIcon.ico (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/NovetusLauncher.csproj (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/NovetusSettings.Designer.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/NovetusSettings.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/NovetusSettings.resx (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/Program.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/Properties/AssemblyInfo.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/Properties/Resources.Designer.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/Properties/Resources.resx (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/Resources/N.png (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/Resources/NOVETUS_small.png (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/Resources/NovetusIcon.ico (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/AssetLocalizer.Designer.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/AssetLocalizer.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/AssetLocalizer.resx (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/ClientScriptDocumentation.Designer.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/ClientScriptDocumentation.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/ClientScriptDocumentation.resx (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/ClientinfoCreator.Designer.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/ClientinfoCreator.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/ClientinfoCreator.resx (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/DiogenesEditor.Designer.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/DiogenesEditor.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/DiogenesEditor.resx (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/ItemMaker.Designer.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/ItemMaker.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/ItemMaker.resx (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/NovetusSDK.Designer.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/NovetusSDK.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/NovetusSDK.resx (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/Obj2MeshV1GUI.Designer.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/Obj2MeshV1GUI.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/Obj2MeshV1GUI.resx (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/SplashTester.Designer.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/SplashTester.cs (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/SDK/SplashTester.resx (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/app.config (100%) rename {NovetusLauncher => Novetus}/NovetusLauncher/packages.config (100%) rename {NovetusLauncher => Novetus}/NovetusURI/App.config (100%) rename {NovetusLauncher => Novetus}/NovetusURI/Form1.Designer.cs (100%) rename {NovetusLauncher => Novetus}/NovetusURI/Form1.cs (100%) rename {NovetusLauncher => Novetus}/NovetusURI/Form1.resx (100%) rename {NovetusLauncher => Novetus}/NovetusURI/LocalVars.cs (100%) rename {NovetusLauncher => Novetus}/NovetusURI/NovetusIcon.ico (100%) rename {NovetusLauncher => Novetus}/NovetusURI/NovetusURI.csproj (100%) rename {NovetusLauncher => Novetus}/NovetusURI/Program.cs (100%) rename {NovetusLauncher => Novetus}/NovetusURI/Properties/AssemblyInfo.cs (100%) rename {NovetusLauncher => Novetus}/NovetusURI/Properties/Resources.Designer.cs (100%) rename {NovetusLauncher => Novetus}/NovetusURI/Properties/Resources.resx (100%) rename {NovetusLauncher => Novetus}/NovetusURI/Properties/Settings.Designer.cs (100%) rename {NovetusLauncher => Novetus}/NovetusURI/Properties/Settings.settings (100%) rename {NovetusLauncher => Novetus}/NovetusURI/URI/LoaderForm.Designer.cs (100%) rename {NovetusLauncher => Novetus}/NovetusURI/URI/LoaderForm.cs (100%) rename {NovetusLauncher => Novetus}/NovetusURI/URI/LoaderForm.resx (100%) rename {NovetusLauncher => Novetus}/NovetusURI/URI/QuickConfigure.Designer.cs (100%) rename {NovetusLauncher => Novetus}/NovetusURI/URI/QuickConfigure.cs (100%) rename {NovetusLauncher => Novetus}/NovetusURI/URI/QuickConfigure.resx (100%) rename {NovetusLauncher => Novetus}/NovetusURI/packages.config (100%) rename {NovetusLauncher => Novetus}/old/NovetusLauncher2_0/App.config (100%) rename {NovetusLauncher => Novetus}/old/NovetusLauncher2_0/App.xaml (100%) rename {NovetusLauncher => Novetus}/old/NovetusLauncher2_0/App.xaml.cs (100%) rename {NovetusLauncher => Novetus}/old/NovetusLauncher2_0/MainWindow.xaml (100%) rename {NovetusLauncher => Novetus}/old/NovetusLauncher2_0/MainWindow.xaml.cs (100%) rename {NovetusLauncher => Novetus}/old/NovetusLauncher2_0/NovetusLauncher2_0.csproj (100%) rename {NovetusLauncher => Novetus}/old/NovetusLauncher2_0/Properties/AssemblyInfo.cs (100%) rename {NovetusLauncher => Novetus}/old/NovetusLauncher2_0/Properties/Resources.Designer.cs (100%) rename {NovetusLauncher => Novetus}/old/NovetusLauncher2_0/Properties/Resources.resx (100%) rename {NovetusLauncher => Novetus}/old/NovetusLauncher2_0/Properties/Settings.Designer.cs (100%) rename {NovetusLauncher => Novetus}/old/NovetusLauncher2_0/Properties/Settings.settings (100%) rename {NovetusLauncher => Novetus}/old/NovetusLauncher2_0/resources/N.png (100%) rename {NovetusLauncher => Novetus}/old/NovetusLauncher2_0/resources/NOVETUS_small.png (100%) rename {NovetusLauncher => Novetus}/old/NovetusLauncher2_0/resources/NovetusIcon.ico (100%) rename {NovetusLauncher => Novetus}/old/NovetusLauncher2_0/resources/TinyBcIcon.png (100%) rename {NovetusLauncher => Novetus}/old/NovetusLauncher2_0/resources/TinyObcIcon.png (100%) rename {NovetusLauncher => Novetus}/old/NovetusLauncher2_0/resources/TinyTbcIcon.png (100%) create mode 100644 github_scripts.bat rename BodyColors.xml => old/BodyColors.xml (100%) rename NovetusCMDLauncher.bat => old/NovetusCMDLauncher.bat (100%) rename NovetusSDK.bat => old/NovetusSDK.bat (100%) create mode 100644 scripts/2006S-Shaders/CSMPFunctions.lua create mode 100644 scripts/2006S/CSMPFunctions.lua create mode 100644 scripts/2007M-Shaders/CSMPFunctions.lua create mode 100644 scripts/2007M/CSMPFunctions.lua create mode 100644 scripts/2008M/CSMPFunctions.lua create mode 100644 scripts/2009E/CSMPFunctions.lua create mode 100644 scripts/2009L/CSMPFunctions.lua create mode 100644 scripts/2010L/CSMPFunctions.lua create mode 100644 scripts/2011E/CSMPFunctions.lua create mode 100644 scripts/2011M/CSMPFunctions.lua rename CSView.lua => scripts/3DView/CSView.lua (81%) diff --git a/NovetusLauncher/NovetusLauncher.sln b/Novetus/Novetus.sln similarity index 92% rename from NovetusLauncher/NovetusLauncher.sln rename to Novetus/Novetus.sln index 31c41f3..cdc1a8e 100644 --- a/NovetusLauncher/NovetusLauncher.sln +++ b/Novetus/Novetus.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NovetusLauncher", "NovetusLauncher\NovetusLauncher.csproj", "{F92FFBED-2767-4676-9711-BB89CDA58A43}" EndProject @@ -38,4 +38,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {66CA6CE5-670E-48AA-A2DA-9347371D4CA0} + EndGlobalSection EndGlobal diff --git a/NovetusLauncher/NovetusCMD/CommandLineArguments.cs b/Novetus/NovetusCMD/CommandLineArguments.cs similarity index 100% rename from NovetusLauncher/NovetusCMD/CommandLineArguments.cs rename to Novetus/NovetusCMD/CommandLineArguments.cs diff --git a/NovetusLauncher/NovetusCMD/LocalVars.cs b/Novetus/NovetusCMD/LocalVars.cs similarity index 100% rename from NovetusLauncher/NovetusCMD/LocalVars.cs rename to Novetus/NovetusCMD/LocalVars.cs diff --git a/NovetusLauncher/NovetusCMD/NovetusCMD.csproj b/Novetus/NovetusCMD/NovetusCMD.csproj similarity index 100% rename from NovetusLauncher/NovetusCMD/NovetusCMD.csproj rename to Novetus/NovetusCMD/NovetusCMD.csproj diff --git a/NovetusLauncher/NovetusCMD/Program.cs b/Novetus/NovetusCMD/Program.cs similarity index 100% rename from NovetusLauncher/NovetusCMD/Program.cs rename to Novetus/NovetusCMD/Program.cs diff --git a/NovetusLauncher/NovetusCMD/Properties/AssemblyInfo.cs b/Novetus/NovetusCMD/Properties/AssemblyInfo.cs similarity index 100% rename from NovetusLauncher/NovetusCMD/Properties/AssemblyInfo.cs rename to Novetus/NovetusCMD/Properties/AssemblyInfo.cs diff --git a/NovetusLauncher/NovetusCMD/Resources/NovetusIcon.ico b/Novetus/NovetusCMD/Resources/NovetusIcon.ico similarity index 100% rename from NovetusLauncher/NovetusCMD/Resources/NovetusIcon.ico rename to Novetus/NovetusCMD/Resources/NovetusIcon.ico diff --git a/NovetusLauncher/NovetusCMD/app.config b/Novetus/NovetusCMD/app.config similarity index 100% rename from NovetusLauncher/NovetusCMD/app.config rename to Novetus/NovetusCMD/app.config diff --git a/NovetusLauncher/NovetusCMD/packages.config b/Novetus/NovetusCMD/packages.config similarity index 100% rename from NovetusLauncher/NovetusCMD/packages.config rename to Novetus/NovetusCMD/packages.config diff --git a/NovetusLauncher/NovetusFuncs/NovetusCodeExtensions.cs b/Novetus/NovetusFuncs/NovetusCodeExtensions.cs similarity index 100% rename from NovetusLauncher/NovetusFuncs/NovetusCodeExtensions.cs rename to Novetus/NovetusFuncs/NovetusCodeExtensions.cs diff --git a/NovetusLauncher/NovetusFuncs/NovetusFuncs.projitems b/Novetus/NovetusFuncs/NovetusFuncs.projitems similarity index 100% rename from NovetusLauncher/NovetusFuncs/NovetusFuncs.projitems rename to Novetus/NovetusFuncs/NovetusFuncs.projitems diff --git a/NovetusLauncher/NovetusFuncs/NovetusFuncs.shproj b/Novetus/NovetusFuncs/NovetusFuncs.shproj similarity index 100% rename from NovetusLauncher/NovetusFuncs/NovetusFuncs.shproj rename to Novetus/NovetusFuncs/NovetusFuncs.shproj diff --git a/NovetusLauncher/NovetusFuncs/NovetusGlobalFuncs.cs b/Novetus/NovetusFuncs/NovetusGlobalFuncs.cs similarity index 99% rename from NovetusLauncher/NovetusFuncs/NovetusGlobalFuncs.cs rename to Novetus/NovetusFuncs/NovetusGlobalFuncs.cs index 4cea60c..c4c0f03 100644 --- a/NovetusLauncher/NovetusFuncs/NovetusGlobalFuncs.cs +++ b/Novetus/NovetusFuncs/NovetusGlobalFuncs.cs @@ -23,6 +23,7 @@ using System.Windows.Forms; * change field names for all forms * Rewrite client launching into one function. * add regions to ALL classes. + * maybe make enums print out the names in inis instead of the int value? */ #region Enums diff --git a/NovetusLauncher/NovetusFuncs/NovetusLauncherFuncs.cs b/Novetus/NovetusFuncs/NovetusLauncherFuncs.cs similarity index 100% rename from NovetusLauncher/NovetusFuncs/NovetusLauncherFuncs.cs rename to Novetus/NovetusFuncs/NovetusLauncherFuncs.cs diff --git a/NovetusLauncher/NovetusFuncs/NovetusScriptFuncs.cs b/Novetus/NovetusFuncs/NovetusScriptFuncs.cs similarity index 100% rename from NovetusLauncher/NovetusFuncs/NovetusScriptFuncs.cs rename to Novetus/NovetusFuncs/NovetusScriptFuncs.cs diff --git a/NovetusLauncher/NovetusFuncs/NovetusSecurityFuncs.cs b/Novetus/NovetusFuncs/NovetusSecurityFuncs.cs similarity index 100% rename from NovetusLauncher/NovetusFuncs/NovetusSecurityFuncs.cs rename to Novetus/NovetusFuncs/NovetusSecurityFuncs.cs diff --git a/NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization.Designer.cs b/Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization.Designer.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization.Designer.cs rename to Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization.Designer.cs diff --git a/NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization.cs b/Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization.cs rename to Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization.cs diff --git a/NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization.resx b/Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization.resx similarity index 100% rename from NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization.resx rename to Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization.resx diff --git a/NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.Designer.cs b/Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.Designer.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.Designer.cs rename to Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.Designer.cs diff --git a/NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.cs b/Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.cs rename to Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.cs diff --git a/NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.resx b/Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.resx similarity index 100% rename from NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.resx rename to Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.resx diff --git a/NovetusLauncher/NovetusLauncher/CharacterCustomization/Resources/BC.png b/Novetus/NovetusLauncher/CharacterCustomization/Resources/BC.png similarity index 100% rename from NovetusLauncher/NovetusLauncher/CharacterCustomization/Resources/BC.png rename to Novetus/NovetusLauncher/CharacterCustomization/Resources/BC.png diff --git a/NovetusLauncher/NovetusLauncher/CharacterCustomization/Resources/BC_legacy.png b/Novetus/NovetusLauncher/CharacterCustomization/Resources/BC_legacy.png similarity index 100% rename from NovetusLauncher/NovetusLauncher/CharacterCustomization/Resources/BC_legacy.png rename to Novetus/NovetusLauncher/CharacterCustomization/Resources/BC_legacy.png diff --git a/NovetusLauncher/NovetusLauncher/CharacterCustomization/Resources/OBC.png b/Novetus/NovetusLauncher/CharacterCustomization/Resources/OBC.png similarity index 100% rename from NovetusLauncher/NovetusLauncher/CharacterCustomization/Resources/OBC.png rename to Novetus/NovetusLauncher/CharacterCustomization/Resources/OBC.png diff --git a/NovetusLauncher/NovetusLauncher/CharacterCustomization/Resources/OBC_legacy.png b/Novetus/NovetusLauncher/CharacterCustomization/Resources/OBC_legacy.png similarity index 100% rename from NovetusLauncher/NovetusLauncher/CharacterCustomization/Resources/OBC_legacy.png rename to Novetus/NovetusLauncher/CharacterCustomization/Resources/OBC_legacy.png diff --git a/NovetusLauncher/NovetusLauncher/CharacterCustomization/Resources/TBC.png b/Novetus/NovetusLauncher/CharacterCustomization/Resources/TBC.png similarity index 100% rename from NovetusLauncher/NovetusLauncher/CharacterCustomization/Resources/TBC.png rename to Novetus/NovetusLauncher/CharacterCustomization/Resources/TBC.png diff --git a/NovetusLauncher/NovetusLauncher/CharacterCustomization/Resources/TBC_legacy.png b/Novetus/NovetusLauncher/CharacterCustomization/Resources/TBC_legacy.png similarity index 100% rename from NovetusLauncher/NovetusLauncher/CharacterCustomization/Resources/TBC_legacy.png rename to Novetus/NovetusLauncher/CharacterCustomization/Resources/TBC_legacy.png diff --git a/NovetusLauncher/NovetusLauncher/Documentation.Designer.cs b/Novetus/NovetusLauncher/Documentation.Designer.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/Documentation.Designer.cs rename to Novetus/NovetusLauncher/Documentation.Designer.cs diff --git a/NovetusLauncher/NovetusLauncher/LocalVars.cs b/Novetus/NovetusLauncher/LocalVars.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/LocalVars.cs rename to Novetus/NovetusLauncher/LocalVars.cs diff --git a/NovetusLauncher/NovetusLauncher/MainForm/MainForm.Designer.cs b/Novetus/NovetusLauncher/MainForm/MainForm.Designer.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/MainForm/MainForm.Designer.cs rename to Novetus/NovetusLauncher/MainForm/MainForm.Designer.cs diff --git a/NovetusLauncher/NovetusLauncher/MainForm/MainForm.cs b/Novetus/NovetusLauncher/MainForm/MainForm.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/MainForm/MainForm.cs rename to Novetus/NovetusLauncher/MainForm/MainForm.cs diff --git a/NovetusLauncher/NovetusLauncher/MainForm/MainForm.resx b/Novetus/NovetusLauncher/MainForm/MainForm.resx similarity index 100% rename from NovetusLauncher/NovetusLauncher/MainForm/MainForm.resx rename to Novetus/NovetusLauncher/MainForm/MainForm.resx diff --git a/NovetusLauncher/NovetusLauncher/MainForm/MainForm_legacy.Designer.cs b/Novetus/NovetusLauncher/MainForm/MainForm_legacy.Designer.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/MainForm/MainForm_legacy.Designer.cs rename to Novetus/NovetusLauncher/MainForm/MainForm_legacy.Designer.cs diff --git a/NovetusLauncher/NovetusLauncher/MainForm/MainForm_legacy.cs b/Novetus/NovetusLauncher/MainForm/MainForm_legacy.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/MainForm/MainForm_legacy.cs rename to Novetus/NovetusLauncher/MainForm/MainForm_legacy.cs diff --git a/NovetusLauncher/NovetusLauncher/MainForm/MainForm_legacy.resx b/Novetus/NovetusLauncher/MainForm/MainForm_legacy.resx similarity index 100% rename from NovetusLauncher/NovetusLauncher/MainForm/MainForm_legacy.resx rename to Novetus/NovetusLauncher/MainForm/MainForm_legacy.resx diff --git a/NovetusLauncher/NovetusLauncher/NovetusIcon.ico b/Novetus/NovetusLauncher/NovetusIcon.ico similarity index 100% rename from NovetusLauncher/NovetusLauncher/NovetusIcon.ico rename to Novetus/NovetusLauncher/NovetusIcon.ico diff --git a/NovetusLauncher/NovetusLauncher/NovetusLauncher.csproj b/Novetus/NovetusLauncher/NovetusLauncher.csproj similarity index 100% rename from NovetusLauncher/NovetusLauncher/NovetusLauncher.csproj rename to Novetus/NovetusLauncher/NovetusLauncher.csproj diff --git a/NovetusLauncher/NovetusLauncher/NovetusSettings.Designer.cs b/Novetus/NovetusLauncher/NovetusSettings.Designer.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/NovetusSettings.Designer.cs rename to Novetus/NovetusLauncher/NovetusSettings.Designer.cs diff --git a/NovetusLauncher/NovetusLauncher/NovetusSettings.cs b/Novetus/NovetusLauncher/NovetusSettings.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/NovetusSettings.cs rename to Novetus/NovetusLauncher/NovetusSettings.cs diff --git a/NovetusLauncher/NovetusLauncher/NovetusSettings.resx b/Novetus/NovetusLauncher/NovetusSettings.resx similarity index 100% rename from NovetusLauncher/NovetusLauncher/NovetusSettings.resx rename to Novetus/NovetusLauncher/NovetusSettings.resx diff --git a/NovetusLauncher/NovetusLauncher/Program.cs b/Novetus/NovetusLauncher/Program.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/Program.cs rename to Novetus/NovetusLauncher/Program.cs diff --git a/NovetusLauncher/NovetusLauncher/Properties/AssemblyInfo.cs b/Novetus/NovetusLauncher/Properties/AssemblyInfo.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/Properties/AssemblyInfo.cs rename to Novetus/NovetusLauncher/Properties/AssemblyInfo.cs diff --git a/NovetusLauncher/NovetusLauncher/Properties/Resources.Designer.cs b/Novetus/NovetusLauncher/Properties/Resources.Designer.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/Properties/Resources.Designer.cs rename to Novetus/NovetusLauncher/Properties/Resources.Designer.cs diff --git a/NovetusLauncher/NovetusLauncher/Properties/Resources.resx b/Novetus/NovetusLauncher/Properties/Resources.resx similarity index 100% rename from NovetusLauncher/NovetusLauncher/Properties/Resources.resx rename to Novetus/NovetusLauncher/Properties/Resources.resx diff --git a/NovetusLauncher/NovetusLauncher/Resources/N.png b/Novetus/NovetusLauncher/Resources/N.png similarity index 100% rename from NovetusLauncher/NovetusLauncher/Resources/N.png rename to Novetus/NovetusLauncher/Resources/N.png diff --git a/NovetusLauncher/NovetusLauncher/Resources/NOVETUS_small.png b/Novetus/NovetusLauncher/Resources/NOVETUS_small.png similarity index 100% rename from NovetusLauncher/NovetusLauncher/Resources/NOVETUS_small.png rename to Novetus/NovetusLauncher/Resources/NOVETUS_small.png diff --git a/NovetusLauncher/NovetusLauncher/Resources/NovetusIcon.ico b/Novetus/NovetusLauncher/Resources/NovetusIcon.ico similarity index 100% rename from NovetusLauncher/NovetusLauncher/Resources/NovetusIcon.ico rename to Novetus/NovetusLauncher/Resources/NovetusIcon.ico diff --git a/NovetusLauncher/NovetusLauncher/SDK/AssetLocalizer.Designer.cs b/Novetus/NovetusLauncher/SDK/AssetLocalizer.Designer.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/AssetLocalizer.Designer.cs rename to Novetus/NovetusLauncher/SDK/AssetLocalizer.Designer.cs diff --git a/NovetusLauncher/NovetusLauncher/SDK/AssetLocalizer.cs b/Novetus/NovetusLauncher/SDK/AssetLocalizer.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/AssetLocalizer.cs rename to Novetus/NovetusLauncher/SDK/AssetLocalizer.cs diff --git a/NovetusLauncher/NovetusLauncher/SDK/AssetLocalizer.resx b/Novetus/NovetusLauncher/SDK/AssetLocalizer.resx similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/AssetLocalizer.resx rename to Novetus/NovetusLauncher/SDK/AssetLocalizer.resx diff --git a/NovetusLauncher/NovetusLauncher/SDK/ClientScriptDocumentation.Designer.cs b/Novetus/NovetusLauncher/SDK/ClientScriptDocumentation.Designer.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/ClientScriptDocumentation.Designer.cs rename to Novetus/NovetusLauncher/SDK/ClientScriptDocumentation.Designer.cs diff --git a/NovetusLauncher/NovetusLauncher/SDK/ClientScriptDocumentation.cs b/Novetus/NovetusLauncher/SDK/ClientScriptDocumentation.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/ClientScriptDocumentation.cs rename to Novetus/NovetusLauncher/SDK/ClientScriptDocumentation.cs diff --git a/NovetusLauncher/NovetusLauncher/SDK/ClientScriptDocumentation.resx b/Novetus/NovetusLauncher/SDK/ClientScriptDocumentation.resx similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/ClientScriptDocumentation.resx rename to Novetus/NovetusLauncher/SDK/ClientScriptDocumentation.resx diff --git a/NovetusLauncher/NovetusLauncher/SDK/ClientinfoCreator.Designer.cs b/Novetus/NovetusLauncher/SDK/ClientinfoCreator.Designer.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/ClientinfoCreator.Designer.cs rename to Novetus/NovetusLauncher/SDK/ClientinfoCreator.Designer.cs diff --git a/NovetusLauncher/NovetusLauncher/SDK/ClientinfoCreator.cs b/Novetus/NovetusLauncher/SDK/ClientinfoCreator.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/ClientinfoCreator.cs rename to Novetus/NovetusLauncher/SDK/ClientinfoCreator.cs diff --git a/NovetusLauncher/NovetusLauncher/SDK/ClientinfoCreator.resx b/Novetus/NovetusLauncher/SDK/ClientinfoCreator.resx similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/ClientinfoCreator.resx rename to Novetus/NovetusLauncher/SDK/ClientinfoCreator.resx diff --git a/NovetusLauncher/NovetusLauncher/SDK/DiogenesEditor.Designer.cs b/Novetus/NovetusLauncher/SDK/DiogenesEditor.Designer.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/DiogenesEditor.Designer.cs rename to Novetus/NovetusLauncher/SDK/DiogenesEditor.Designer.cs diff --git a/NovetusLauncher/NovetusLauncher/SDK/DiogenesEditor.cs b/Novetus/NovetusLauncher/SDK/DiogenesEditor.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/DiogenesEditor.cs rename to Novetus/NovetusLauncher/SDK/DiogenesEditor.cs diff --git a/NovetusLauncher/NovetusLauncher/SDK/DiogenesEditor.resx b/Novetus/NovetusLauncher/SDK/DiogenesEditor.resx similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/DiogenesEditor.resx rename to Novetus/NovetusLauncher/SDK/DiogenesEditor.resx diff --git a/NovetusLauncher/NovetusLauncher/SDK/ItemMaker.Designer.cs b/Novetus/NovetusLauncher/SDK/ItemMaker.Designer.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/ItemMaker.Designer.cs rename to Novetus/NovetusLauncher/SDK/ItemMaker.Designer.cs diff --git a/NovetusLauncher/NovetusLauncher/SDK/ItemMaker.cs b/Novetus/NovetusLauncher/SDK/ItemMaker.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/ItemMaker.cs rename to Novetus/NovetusLauncher/SDK/ItemMaker.cs diff --git a/NovetusLauncher/NovetusLauncher/SDK/ItemMaker.resx b/Novetus/NovetusLauncher/SDK/ItemMaker.resx similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/ItemMaker.resx rename to Novetus/NovetusLauncher/SDK/ItemMaker.resx diff --git a/NovetusLauncher/NovetusLauncher/SDK/NovetusSDK.Designer.cs b/Novetus/NovetusLauncher/SDK/NovetusSDK.Designer.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/NovetusSDK.Designer.cs rename to Novetus/NovetusLauncher/SDK/NovetusSDK.Designer.cs diff --git a/NovetusLauncher/NovetusLauncher/SDK/NovetusSDK.cs b/Novetus/NovetusLauncher/SDK/NovetusSDK.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/NovetusSDK.cs rename to Novetus/NovetusLauncher/SDK/NovetusSDK.cs diff --git a/NovetusLauncher/NovetusLauncher/SDK/NovetusSDK.resx b/Novetus/NovetusLauncher/SDK/NovetusSDK.resx similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/NovetusSDK.resx rename to Novetus/NovetusLauncher/SDK/NovetusSDK.resx diff --git a/NovetusLauncher/NovetusLauncher/SDK/Obj2MeshV1GUI.Designer.cs b/Novetus/NovetusLauncher/SDK/Obj2MeshV1GUI.Designer.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/Obj2MeshV1GUI.Designer.cs rename to Novetus/NovetusLauncher/SDK/Obj2MeshV1GUI.Designer.cs diff --git a/NovetusLauncher/NovetusLauncher/SDK/Obj2MeshV1GUI.cs b/Novetus/NovetusLauncher/SDK/Obj2MeshV1GUI.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/Obj2MeshV1GUI.cs rename to Novetus/NovetusLauncher/SDK/Obj2MeshV1GUI.cs diff --git a/NovetusLauncher/NovetusLauncher/SDK/Obj2MeshV1GUI.resx b/Novetus/NovetusLauncher/SDK/Obj2MeshV1GUI.resx similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/Obj2MeshV1GUI.resx rename to Novetus/NovetusLauncher/SDK/Obj2MeshV1GUI.resx diff --git a/NovetusLauncher/NovetusLauncher/SDK/SplashTester.Designer.cs b/Novetus/NovetusLauncher/SDK/SplashTester.Designer.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/SplashTester.Designer.cs rename to Novetus/NovetusLauncher/SDK/SplashTester.Designer.cs diff --git a/NovetusLauncher/NovetusLauncher/SDK/SplashTester.cs b/Novetus/NovetusLauncher/SDK/SplashTester.cs similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/SplashTester.cs rename to Novetus/NovetusLauncher/SDK/SplashTester.cs diff --git a/NovetusLauncher/NovetusLauncher/SDK/SplashTester.resx b/Novetus/NovetusLauncher/SDK/SplashTester.resx similarity index 100% rename from NovetusLauncher/NovetusLauncher/SDK/SplashTester.resx rename to Novetus/NovetusLauncher/SDK/SplashTester.resx diff --git a/NovetusLauncher/NovetusLauncher/app.config b/Novetus/NovetusLauncher/app.config similarity index 100% rename from NovetusLauncher/NovetusLauncher/app.config rename to Novetus/NovetusLauncher/app.config diff --git a/NovetusLauncher/NovetusLauncher/packages.config b/Novetus/NovetusLauncher/packages.config similarity index 100% rename from NovetusLauncher/NovetusLauncher/packages.config rename to Novetus/NovetusLauncher/packages.config diff --git a/NovetusLauncher/NovetusURI/App.config b/Novetus/NovetusURI/App.config similarity index 100% rename from NovetusLauncher/NovetusURI/App.config rename to Novetus/NovetusURI/App.config diff --git a/NovetusLauncher/NovetusURI/Form1.Designer.cs b/Novetus/NovetusURI/Form1.Designer.cs similarity index 100% rename from NovetusLauncher/NovetusURI/Form1.Designer.cs rename to Novetus/NovetusURI/Form1.Designer.cs diff --git a/NovetusLauncher/NovetusURI/Form1.cs b/Novetus/NovetusURI/Form1.cs similarity index 100% rename from NovetusLauncher/NovetusURI/Form1.cs rename to Novetus/NovetusURI/Form1.cs diff --git a/NovetusLauncher/NovetusURI/Form1.resx b/Novetus/NovetusURI/Form1.resx similarity index 100% rename from NovetusLauncher/NovetusURI/Form1.resx rename to Novetus/NovetusURI/Form1.resx diff --git a/NovetusLauncher/NovetusURI/LocalVars.cs b/Novetus/NovetusURI/LocalVars.cs similarity index 100% rename from NovetusLauncher/NovetusURI/LocalVars.cs rename to Novetus/NovetusURI/LocalVars.cs diff --git a/NovetusLauncher/NovetusURI/NovetusIcon.ico b/Novetus/NovetusURI/NovetusIcon.ico similarity index 100% rename from NovetusLauncher/NovetusURI/NovetusIcon.ico rename to Novetus/NovetusURI/NovetusIcon.ico diff --git a/NovetusLauncher/NovetusURI/NovetusURI.csproj b/Novetus/NovetusURI/NovetusURI.csproj similarity index 100% rename from NovetusLauncher/NovetusURI/NovetusURI.csproj rename to Novetus/NovetusURI/NovetusURI.csproj diff --git a/NovetusLauncher/NovetusURI/Program.cs b/Novetus/NovetusURI/Program.cs similarity index 100% rename from NovetusLauncher/NovetusURI/Program.cs rename to Novetus/NovetusURI/Program.cs diff --git a/NovetusLauncher/NovetusURI/Properties/AssemblyInfo.cs b/Novetus/NovetusURI/Properties/AssemblyInfo.cs similarity index 100% rename from NovetusLauncher/NovetusURI/Properties/AssemblyInfo.cs rename to Novetus/NovetusURI/Properties/AssemblyInfo.cs diff --git a/NovetusLauncher/NovetusURI/Properties/Resources.Designer.cs b/Novetus/NovetusURI/Properties/Resources.Designer.cs similarity index 100% rename from NovetusLauncher/NovetusURI/Properties/Resources.Designer.cs rename to Novetus/NovetusURI/Properties/Resources.Designer.cs diff --git a/NovetusLauncher/NovetusURI/Properties/Resources.resx b/Novetus/NovetusURI/Properties/Resources.resx similarity index 100% rename from NovetusLauncher/NovetusURI/Properties/Resources.resx rename to Novetus/NovetusURI/Properties/Resources.resx diff --git a/NovetusLauncher/NovetusURI/Properties/Settings.Designer.cs b/Novetus/NovetusURI/Properties/Settings.Designer.cs similarity index 100% rename from NovetusLauncher/NovetusURI/Properties/Settings.Designer.cs rename to Novetus/NovetusURI/Properties/Settings.Designer.cs diff --git a/NovetusLauncher/NovetusURI/Properties/Settings.settings b/Novetus/NovetusURI/Properties/Settings.settings similarity index 100% rename from NovetusLauncher/NovetusURI/Properties/Settings.settings rename to Novetus/NovetusURI/Properties/Settings.settings diff --git a/NovetusLauncher/NovetusURI/URI/LoaderForm.Designer.cs b/Novetus/NovetusURI/URI/LoaderForm.Designer.cs similarity index 100% rename from NovetusLauncher/NovetusURI/URI/LoaderForm.Designer.cs rename to Novetus/NovetusURI/URI/LoaderForm.Designer.cs diff --git a/NovetusLauncher/NovetusURI/URI/LoaderForm.cs b/Novetus/NovetusURI/URI/LoaderForm.cs similarity index 100% rename from NovetusLauncher/NovetusURI/URI/LoaderForm.cs rename to Novetus/NovetusURI/URI/LoaderForm.cs diff --git a/NovetusLauncher/NovetusURI/URI/LoaderForm.resx b/Novetus/NovetusURI/URI/LoaderForm.resx similarity index 100% rename from NovetusLauncher/NovetusURI/URI/LoaderForm.resx rename to Novetus/NovetusURI/URI/LoaderForm.resx diff --git a/NovetusLauncher/NovetusURI/URI/QuickConfigure.Designer.cs b/Novetus/NovetusURI/URI/QuickConfigure.Designer.cs similarity index 100% rename from NovetusLauncher/NovetusURI/URI/QuickConfigure.Designer.cs rename to Novetus/NovetusURI/URI/QuickConfigure.Designer.cs diff --git a/NovetusLauncher/NovetusURI/URI/QuickConfigure.cs b/Novetus/NovetusURI/URI/QuickConfigure.cs similarity index 100% rename from NovetusLauncher/NovetusURI/URI/QuickConfigure.cs rename to Novetus/NovetusURI/URI/QuickConfigure.cs diff --git a/NovetusLauncher/NovetusURI/URI/QuickConfigure.resx b/Novetus/NovetusURI/URI/QuickConfigure.resx similarity index 100% rename from NovetusLauncher/NovetusURI/URI/QuickConfigure.resx rename to Novetus/NovetusURI/URI/QuickConfigure.resx diff --git a/NovetusLauncher/NovetusURI/packages.config b/Novetus/NovetusURI/packages.config similarity index 100% rename from NovetusLauncher/NovetusURI/packages.config rename to Novetus/NovetusURI/packages.config diff --git a/NovetusLauncher/old/NovetusLauncher2_0/App.config b/Novetus/old/NovetusLauncher2_0/App.config similarity index 100% rename from NovetusLauncher/old/NovetusLauncher2_0/App.config rename to Novetus/old/NovetusLauncher2_0/App.config diff --git a/NovetusLauncher/old/NovetusLauncher2_0/App.xaml b/Novetus/old/NovetusLauncher2_0/App.xaml similarity index 100% rename from NovetusLauncher/old/NovetusLauncher2_0/App.xaml rename to Novetus/old/NovetusLauncher2_0/App.xaml diff --git a/NovetusLauncher/old/NovetusLauncher2_0/App.xaml.cs b/Novetus/old/NovetusLauncher2_0/App.xaml.cs similarity index 100% rename from NovetusLauncher/old/NovetusLauncher2_0/App.xaml.cs rename to Novetus/old/NovetusLauncher2_0/App.xaml.cs diff --git a/NovetusLauncher/old/NovetusLauncher2_0/MainWindow.xaml b/Novetus/old/NovetusLauncher2_0/MainWindow.xaml similarity index 100% rename from NovetusLauncher/old/NovetusLauncher2_0/MainWindow.xaml rename to Novetus/old/NovetusLauncher2_0/MainWindow.xaml diff --git a/NovetusLauncher/old/NovetusLauncher2_0/MainWindow.xaml.cs b/Novetus/old/NovetusLauncher2_0/MainWindow.xaml.cs similarity index 100% rename from NovetusLauncher/old/NovetusLauncher2_0/MainWindow.xaml.cs rename to Novetus/old/NovetusLauncher2_0/MainWindow.xaml.cs diff --git a/NovetusLauncher/old/NovetusLauncher2_0/NovetusLauncher2_0.csproj b/Novetus/old/NovetusLauncher2_0/NovetusLauncher2_0.csproj similarity index 100% rename from NovetusLauncher/old/NovetusLauncher2_0/NovetusLauncher2_0.csproj rename to Novetus/old/NovetusLauncher2_0/NovetusLauncher2_0.csproj diff --git a/NovetusLauncher/old/NovetusLauncher2_0/Properties/AssemblyInfo.cs b/Novetus/old/NovetusLauncher2_0/Properties/AssemblyInfo.cs similarity index 100% rename from NovetusLauncher/old/NovetusLauncher2_0/Properties/AssemblyInfo.cs rename to Novetus/old/NovetusLauncher2_0/Properties/AssemblyInfo.cs diff --git a/NovetusLauncher/old/NovetusLauncher2_0/Properties/Resources.Designer.cs b/Novetus/old/NovetusLauncher2_0/Properties/Resources.Designer.cs similarity index 100% rename from NovetusLauncher/old/NovetusLauncher2_0/Properties/Resources.Designer.cs rename to Novetus/old/NovetusLauncher2_0/Properties/Resources.Designer.cs diff --git a/NovetusLauncher/old/NovetusLauncher2_0/Properties/Resources.resx b/Novetus/old/NovetusLauncher2_0/Properties/Resources.resx similarity index 100% rename from NovetusLauncher/old/NovetusLauncher2_0/Properties/Resources.resx rename to Novetus/old/NovetusLauncher2_0/Properties/Resources.resx diff --git a/NovetusLauncher/old/NovetusLauncher2_0/Properties/Settings.Designer.cs b/Novetus/old/NovetusLauncher2_0/Properties/Settings.Designer.cs similarity index 100% rename from NovetusLauncher/old/NovetusLauncher2_0/Properties/Settings.Designer.cs rename to Novetus/old/NovetusLauncher2_0/Properties/Settings.Designer.cs diff --git a/NovetusLauncher/old/NovetusLauncher2_0/Properties/Settings.settings b/Novetus/old/NovetusLauncher2_0/Properties/Settings.settings similarity index 100% rename from NovetusLauncher/old/NovetusLauncher2_0/Properties/Settings.settings rename to Novetus/old/NovetusLauncher2_0/Properties/Settings.settings diff --git a/NovetusLauncher/old/NovetusLauncher2_0/resources/N.png b/Novetus/old/NovetusLauncher2_0/resources/N.png similarity index 100% rename from NovetusLauncher/old/NovetusLauncher2_0/resources/N.png rename to Novetus/old/NovetusLauncher2_0/resources/N.png diff --git a/NovetusLauncher/old/NovetusLauncher2_0/resources/NOVETUS_small.png b/Novetus/old/NovetusLauncher2_0/resources/NOVETUS_small.png similarity index 100% rename from NovetusLauncher/old/NovetusLauncher2_0/resources/NOVETUS_small.png rename to Novetus/old/NovetusLauncher2_0/resources/NOVETUS_small.png diff --git a/NovetusLauncher/old/NovetusLauncher2_0/resources/NovetusIcon.ico b/Novetus/old/NovetusLauncher2_0/resources/NovetusIcon.ico similarity index 100% rename from NovetusLauncher/old/NovetusLauncher2_0/resources/NovetusIcon.ico rename to Novetus/old/NovetusLauncher2_0/resources/NovetusIcon.ico diff --git a/NovetusLauncher/old/NovetusLauncher2_0/resources/TinyBcIcon.png b/Novetus/old/NovetusLauncher2_0/resources/TinyBcIcon.png similarity index 100% rename from NovetusLauncher/old/NovetusLauncher2_0/resources/TinyBcIcon.png rename to Novetus/old/NovetusLauncher2_0/resources/TinyBcIcon.png diff --git a/NovetusLauncher/old/NovetusLauncher2_0/resources/TinyObcIcon.png b/Novetus/old/NovetusLauncher2_0/resources/TinyObcIcon.png similarity index 100% rename from NovetusLauncher/old/NovetusLauncher2_0/resources/TinyObcIcon.png rename to Novetus/old/NovetusLauncher2_0/resources/TinyObcIcon.png diff --git a/NovetusLauncher/old/NovetusLauncher2_0/resources/TinyTbcIcon.png b/Novetus/old/NovetusLauncher2_0/resources/TinyTbcIcon.png similarity index 100% rename from NovetusLauncher/old/NovetusLauncher2_0/resources/TinyTbcIcon.png rename to Novetus/old/NovetusLauncher2_0/resources/TinyTbcIcon.png diff --git a/github_scripts.bat b/github_scripts.bat new file mode 100644 index 0000000..1feecd9 --- /dev/null +++ b/github_scripts.bat @@ -0,0 +1,28 @@ +@ECHO OFF + +SET basedir=%CD%\scripts + +if not exist "%basedir%" mkdir "%basedir%" +if not exist "%basedir%/2006S" mkdir "%basedir%/2006S" +if not exist "%basedir%/2006S-Shaders" mkdir "%basedir%/2006S-Shaders" +if not exist "%basedir%/2007M" mkdir "%basedir%/2007M" +if not exist "%basedir%/2007M-Shaders" mkdir "%basedir%/2007M-Shaders" +if not exist "%basedir%/2008M" mkdir "%basedir%/2008M" +if not exist "%basedir%/2009E" mkdir "%basedir%/2009E" +if not exist "%basedir%/2009L" mkdir "%basedir%/2009L" +if not exist "%basedir%/2010L" mkdir "%basedir%/2010L" +if not exist "%basedir%/2011E" mkdir "%basedir%/2011E" +if not exist "%basedir%/2011M" mkdir "%basedir%/2011M" +if not exist "%basedir%/3DView" mkdir "%basedir%/3DView" + +XCOPY Novetus\clients\2006S\content\scripts\CSMPFunctions.lua %basedir%/2006S +XCOPY Novetus\clients\2006S-Shaders\content\scripts\CSMPFunctions.lua %basedir%/2006S-Shaders +XCOPY Novetus\clients\2007M\content\scripts\CSMPFunctions.lua %basedir%/2007M +XCOPY Novetus\clients\2007M-Shaders\content\scripts\CSMPFunctions.lua %basedir%/2007M-Shaders +XCOPY Novetus\clients\2008M\content\scripts\CSMPFunctions.lua %basedir%/2008M +XCOPY Novetus\clients\2009E\content\scripts\CSMPFunctions.lua %basedir%/2009E +XCOPY Novetus\clients\2009L\content\scripts\CSMPFunctions.lua %basedir%/2009L +XCOPY Novetus\clients\2010L\content\scripts\CSMPFunctions.lua %basedir%/2010L +XCOPY Novetus\clients\2011E\content\scripts\CSMPFunctions.lua %basedir%/2011E +XCOPY Novetus\clients\2011M\content\scripts\CSMPFunctions.lua %basedir%/2011M +XCOPY Novetus\bin\preview\content\scripts\CSView.lua %basedir%/3DView \ No newline at end of file diff --git a/BodyColors.xml b/old/BodyColors.xml similarity index 100% rename from BodyColors.xml rename to old/BodyColors.xml diff --git a/NovetusCMDLauncher.bat b/old/NovetusCMDLauncher.bat similarity index 100% rename from NovetusCMDLauncher.bat rename to old/NovetusCMDLauncher.bat diff --git a/NovetusSDK.bat b/old/NovetusSDK.bat similarity index 100% rename from NovetusSDK.bat rename to old/NovetusSDK.bat diff --git a/scripts/2006S-Shaders/CSMPFunctions.lua b/scripts/2006S-Shaders/CSMPFunctions.lua new file mode 100644 index 0000000..c8c8a9a --- /dev/null +++ b/scripts/2006S-Shaders/CSMPFunctions.lua @@ -0,0 +1,385 @@ +settings().Network.maxDataModelSendBuffer = 1000000 +settings().Network.sendRate = 1000000 + +--function made by rbxbanland +function newWaitForChild(newParent,name) + local returnable = nil + if newParent:FindFirstChild(name) then + returnable = newParent:FindFirstChild(name) + else + repeat wait() returnable = newParent:FindFirstChild(name) until returnable ~= nil + end + return returnable +end + +function KickPlayer(Player,reason) + if (Player ~= nil) then + local message = Instance.new("Message") + message.Text = "You were kicked. Reason: "..reason + message.Parent = Player + wait(2) + Player:remove() + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: "..reason) + end +end + +function newWaitForChildSecurity(newParent,name) + local returnable = nil + local loadAttempts = 0 + local maxAttempts = 5 + while loadAttempts < maxAttempts do + if newParent:FindFirstChild(name) then + returnable = newParent:FindFirstChild(name) + break + end + wait() + loadAttempts = loadAttempts + 1 + print("Player '" .. newParent.Name .. "' trying to connect. Number of attempts: "..loadAttempts) + end + + if (loadAttempts == maxAttempts) then + KickPlayer(newParent, "Modified Client") + end + + return returnable +end + +function LoadCharacterNew(playerApp,newChar) + PlayerService = game:GetService("Players") + Player = PlayerService:GetPlayerFromCharacter(newChar) + + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (playerApp == nil) then + kick() + end + + if (not Player:FindFirstChild("Appearance")) then + kick() + end + + if ((playerApp:GetChildren() == 0) or (playerApp:GetChildren() == nil)) then + kick() + end + + local path = "rbxasset://../../../shareddata/charcustom/" + + local charparts = {[1] = newWaitForChild(newChar,"Head"),[2] = newWaitForChild(newChar,"Torso"),[3] = newWaitForChild(newChar,"Left Arm"),[4] = newWaitForChild(newChar,"Right Arm"),[5] = newWaitForChild(newChar,"Left Leg"),[6] = newWaitForChild(newChar,"Right Leg")} + for _,newVal in pairs(playerApp:GetChildren()) do + if (newVal.Name == "Body Color") then + pcall(function() + charparts[newVal.ColorIndex.Value].BrickColor = newVal.Value + end) + end + end +end + +function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + local newCharApp = Instance.new("IntValue",Player) + newCharApp.Name = "Appearance" + --BODY COLORS + for i=1,6,1 do + local BodyColor = Instance.new("BrickColorValue",newCharApp) + if (i == 1) then + if (HeadColorID ~= nil) then + BodyColor.Value = BrickColor.new(HeadColorID) + else + BodyColor.Value = BrickColor.new(1) + end + elseif (i == 2) then + if (TorsoColorID ~= nil) then + BodyColor.Value = BrickColor.new(TorsoColorID) + else + BodyColor.Value = BrickColor.new(1) + end + elseif (i == 3) then + if (LeftArmColorID ~= nil) then + BodyColor.Value = BrickColor.new(LeftArmColorID) + else + BodyColor.Value = BrickColor.new(1) + end + elseif (i == 4) then + if (RightArmColorID ~= nil) then + BodyColor.Value = BrickColor.new(RightArmColorID) + else + BodyColor.Value = BrickColor.new(1) + end + elseif (i == 5) then + if (LeftLegColorID ~= nil) then + BodyColor.Value = BrickColor.new(LeftLegColorID) + else + BodyColor.Value = BrickColor.new(1) + end + elseif (i == 6) then + if (RightLegColorID ~= nil) then + BodyColor.Value = BrickColor.new(RightLegColorID) + else + BodyColor.Value = BrickColor.new(1) + end + end + BodyColor.Name = "Body Color" + local indexValue = Instance.new("NumberValue") + indexValue.Name = "ColorIndex" + indexValue.Parent = BodyColor + indexValue.Value = i + end +end + +function LoadSecurity(playerApp,Player,ServerSecurityLocation) + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (playerApp == nil) then + kick() + end + + if (not Player:FindFirstChild("Security")) then + kick() + end + + if (not playerApp:FindFirstChild("ClientEXEMD5") or not playerApp:FindFirstChild("LauncherMD5") or not playerApp:FindFirstChild("ClientScriptMD5")) then + kick() + end + + for _,newVal in pairs(playerApp:GetChildren()) do + if (newVal.Name == "ClientEXEMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value or newVal.Value == "") then + kick() + break + end + end + + if (newVal.Name == "LauncherMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value or newVal.Value == "") then + kick() + break + end + end + + if (newVal.Name == "ClientScriptMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value or newVal.Value == "") then + kick() + break + end + end + end +end + +function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + Location = Instance.new("IntValue", Location) + Location.Name = "Security" + + local clientValue = Instance.new("StringValue", Location) + clientValue.Value = ClientEXEMD5 or "" + clientValue.Name = "ClientEXEMD5" + + local launcherValue = Instance.new("StringValue", Location) + launcherValue.Value = LauncherMD5 or "" + launcherValue.Name = "LauncherMD5" + + local scriptValue = Instance.new("StringValue", Location) + scriptValue.Value = ClientScriptMD5 or "" + scriptValue.Name = "ClientScriptMD5" +end + +function InitalizeTripcode(Location,Tripcode) + local code = Instance.new("StringValue", Location) + code.Value = Tripcode or "" + code.Name = "Tripcode" +end + +function LoadTripcode(Player) + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (not Player:FindFirstChild("Tripcode")) then + kick() + end + + for _,newVal in pairs(Player:GetChildren()) do + if (newVal.Name == "Tripcode") then + if (newVal.Value == "") then + kick() + break + end + end + end +end + +function InitalizeClientName(Location) + local newName = Instance.new("StringValue",Location) + newName.Value = "2006S-Shaders" + newName.Name = "Name" +end + +print("ROBLOX Client version '0.3.512.0' loaded.") + +function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + Server = game:GetService("NetworkServer") + RunService = game:GetService("RunService") + PlayerService = game:GetService("Players") + Server:start(Port, 20) + RunService:run() + game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") + PlayerService.MaxPlayers = PlayerLimit + PlayerService.PlayerAdded:connect(function(Player) + Player.Chatted:connect(function(msg) + print(Player.Name.."; "..msg) + end) + + if (PlayerService.NumPlayers > PlayerService.MaxPlayers) then + KickPlayer(Player, "Too many players on server.") + else + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added") + Player:LoadCharacter() + LoadSecurity(newWaitForChildSecurity(Player,"Security"),Player,game.Lighting) + newWaitForChildSecurity(Player,"Tripcode") + LoadTripcode(Player) + pcall(function() print("Player '" .. Player.Name .. "-" .. Player.userId .. "' security check success. Tripcode: '" .. Player.Tripcode.Value .. "'") end) + if (Player.Character ~= nil) then + LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) + end + end + + -- rename all Server replicators in NetworkServer to "ServerReplicator" + for _,Child in pairs(Server:GetChildren()) do + Child.Name = "ServerReplicator" + end + + coroutine.resume(coroutine.create(function() + while Player ~= nil do + wait(0.1) + if (Player.Character ~= nil) then + if (Player.Character.Humanoid.Health == 0) then + wait(5) + Player:LoadCharacter() + LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) + elseif (Player.Character.Parent == nil) then + wait(5) + Player:LoadCharacter() + LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) + end + end + end + end)) + end) + PlayerService.PlayerRemoving:connect(function(Player) + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving") + end) + pcall(function() game.Close:connect(function() Server:Stop() end) end) + InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + InitalizeClientName(game.Lighting) + Server.IncommingConnection:connect(IncommingConnection) +end + +function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Tripcode,Ticket) + local suc, err = pcall(function() + client = game:GetService("NetworkClient") + player = game:GetService("Players"):CreateLocalPlayer(UserID) + InitalizeSecurityValues(player,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + InitalizeTripcode(player,Tripcode) + player:SetSuperSafeChat(false) + pcall(function() player:SetUnder13(false) end) + pcall(function() player:SetAccountAge(365) end) + pcall(function() player.Name=PlayerName or "" end) + game:GetService("Visit") + InitalizeClientAppearance(player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + end) + + local function dieerror(errmsg) + game:SetMessage(errmsg) + wait(math.huge) + end + + if not suc then + dieerror(err) + end + + local function disconnect(peer,lostconnection) + game:SetMessage("You have lost connection to the game") + end + + local function connected(url, replicator) + replicator.Disconnection:connect(disconnect) + local marker = nil + local suc, err = pcall(function() + game:SetMessageBrickCount() + marker = replicator:SendMarker() + end) + if not suc then + dieerror(err) + end + marker.Received:connect(function() + local suc, err = pcall(function() + game:ClearMessage() + end) + if not suc then + dieerror(err) + end + end) + end + + local function rejected() + dieerror("Failed to connect to the Game. (Connection rejected)") + end + + local function failed(peer, errcode, why) + dieerror("Failed to connect to the Game. (ID="..errcode.." ["..why.."])") + end + + local suc, err = pcall(function() + game:SetMessage("Connecting to server...") + client.ConnectionAccepted:connect(connected) + client.ConnectionRejected:connect(rejected) + client.ConnectionFailed:connect(failed) + client:Connect(ServerIP,ServerPort, 0, 20) + game.GuiRoot.MainMenu["Toolbox"]:Remove() + game.GuiRoot.MainMenu["Edit Mode"]:Remove() + game.GuiRoot.RightPalette.ReportAbuse:Remove() + game.GuiRoot.ChatMenuPanel:Remove() + end) + + if not suc then + local x = Instance.new("Message") + x.Text = err + x.Parent = workspace + wait(math.huge) + end +end + +function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + local plr = game.Players:CreateLocalPlayer(UserID) + game:GetService("RunService"):run() + game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") + plr.Name = PlayerName + plr:LoadCharacter() + InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + game:GetService("Visit") + while true do + wait(0.001) + if (plr.Character ~= nil) then + if (plr.Character.Humanoid.Health == 0) then + wait(5) + plr:LoadCharacter() + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character) + elseif (plr.Character.Parent == nil) then + wait(5) + plr:LoadCharacter() -- to make sure nobody is deleted. + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character) + end + end + end +end + +function CSStudio() +end + +_G.CSServer=CSServer +_G.CSConnect=CSConnect +_G.CSSolo=CSSolo +_G.CSStudio=CSStudio \ No newline at end of file diff --git a/scripts/2006S/CSMPFunctions.lua b/scripts/2006S/CSMPFunctions.lua new file mode 100644 index 0000000..bf73b33 --- /dev/null +++ b/scripts/2006S/CSMPFunctions.lua @@ -0,0 +1,385 @@ +settings().Network.maxDataModelSendBuffer = 1000000 +settings().Network.sendRate = 1000000 + +--function made by rbxbanland +function newWaitForChild(newParent,name) + local returnable = nil + if newParent:FindFirstChild(name) then + returnable = newParent:FindFirstChild(name) + else + repeat wait() returnable = newParent:FindFirstChild(name) until returnable ~= nil + end + return returnable +end + +function KickPlayer(Player,reason) + if (Player ~= nil) then + local message = Instance.new("Message") + message.Text = "You were kicked. Reason: "..reason + message.Parent = Player + wait(2) + Player:remove() + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: "..reason) + end +end + +function newWaitForChildSecurity(newParent,name) + local returnable = nil + local loadAttempts = 0 + local maxAttempts = 5 + while loadAttempts < maxAttempts do + if newParent:FindFirstChild(name) then + returnable = newParent:FindFirstChild(name) + break + end + wait() + loadAttempts = loadAttempts + 1 + print("Player '" .. newParent.Name .. "' trying to connect. Number of attempts: "..loadAttempts) + end + + if (loadAttempts == maxAttempts) then + KickPlayer(newParent, "Modified Client") + end + + return returnable +end + +function LoadCharacterNew(playerApp,newChar) + PlayerService = game:GetService("Players") + Player = PlayerService:GetPlayerFromCharacter(newChar) + + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (playerApp == nil) then + kick() + end + + if (not Player:FindFirstChild("Appearance")) then + kick() + end + + if ((playerApp:GetChildren() == 0) or (playerApp:GetChildren() == nil)) then + kick() + end + + local path = "rbxasset://../../../shareddata/charcustom/" + + local charparts = {[1] = newWaitForChild(newChar,"Head"),[2] = newWaitForChild(newChar,"Torso"),[3] = newWaitForChild(newChar,"Left Arm"),[4] = newWaitForChild(newChar,"Right Arm"),[5] = newWaitForChild(newChar,"Left Leg"),[6] = newWaitForChild(newChar,"Right Leg")} + for _,newVal in pairs(playerApp:GetChildren()) do + if (newVal.Name == "Body Color") then + pcall(function() + charparts[newVal.ColorIndex.Value].BrickColor = newVal.Value + end) + end + end +end + +function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + local newCharApp = Instance.new("IntValue",Player) + newCharApp.Name = "Appearance" + --BODY COLORS + for i=1,6,1 do + local BodyColor = Instance.new("BrickColorValue",newCharApp) + if (i == 1) then + if (HeadColorID ~= nil) then + BodyColor.Value = BrickColor.new(HeadColorID) + else + BodyColor.Value = BrickColor.new(1) + end + elseif (i == 2) then + if (TorsoColorID ~= nil) then + BodyColor.Value = BrickColor.new(TorsoColorID) + else + BodyColor.Value = BrickColor.new(1) + end + elseif (i == 3) then + if (LeftArmColorID ~= nil) then + BodyColor.Value = BrickColor.new(LeftArmColorID) + else + BodyColor.Value = BrickColor.new(1) + end + elseif (i == 4) then + if (RightArmColorID ~= nil) then + BodyColor.Value = BrickColor.new(RightArmColorID) + else + BodyColor.Value = BrickColor.new(1) + end + elseif (i == 5) then + if (LeftLegColorID ~= nil) then + BodyColor.Value = BrickColor.new(LeftLegColorID) + else + BodyColor.Value = BrickColor.new(1) + end + elseif (i == 6) then + if (RightLegColorID ~= nil) then + BodyColor.Value = BrickColor.new(RightLegColorID) + else + BodyColor.Value = BrickColor.new(1) + end + end + BodyColor.Name = "Body Color" + local indexValue = Instance.new("NumberValue") + indexValue.Name = "ColorIndex" + indexValue.Parent = BodyColor + indexValue.Value = i + end +end + +function LoadSecurity(playerApp,Player,ServerSecurityLocation) + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (playerApp == nil) then + kick() + end + + if (not Player:FindFirstChild("Security")) then + kick() + end + + if (not playerApp:FindFirstChild("ClientEXEMD5") or not playerApp:FindFirstChild("LauncherMD5") or not playerApp:FindFirstChild("ClientScriptMD5")) then + kick() + end + + for _,newVal in pairs(playerApp:GetChildren()) do + if (newVal.Name == "ClientEXEMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value or newVal.Value == "") then + kick() + break + end + end + + if (newVal.Name == "LauncherMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value or newVal.Value == "") then + kick() + break + end + end + + if (newVal.Name == "ClientScriptMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value or newVal.Value == "") then + kick() + break + end + end + end +end + +function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + Location = Instance.new("IntValue", Location) + Location.Name = "Security" + + local clientValue = Instance.new("StringValue", Location) + clientValue.Value = ClientEXEMD5 or "" + clientValue.Name = "ClientEXEMD5" + + local launcherValue = Instance.new("StringValue", Location) + launcherValue.Value = LauncherMD5 or "" + launcherValue.Name = "LauncherMD5" + + local scriptValue = Instance.new("StringValue", Location) + scriptValue.Value = ClientScriptMD5 or "" + scriptValue.Name = "ClientScriptMD5" +end + +function InitalizeTripcode(Location,Tripcode) + local code = Instance.new("StringValue", Location) + code.Value = Tripcode or "" + code.Name = "Tripcode" +end + +function LoadTripcode(Player) + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (not Player:FindFirstChild("Tripcode")) then + kick() + end + + for _,newVal in pairs(Player:GetChildren()) do + if (newVal.Name == "Tripcode") then + if (newVal.Value == "") then + kick() + break + end + end + end +end + +function InitalizeClientName(Location) + local newName = Instance.new("StringValue",Location) + newName.Value = "2006S" + newName.Name = "Name" +end + +print("ROBLOX Client version '0.3.512.0' loaded.") + +function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + Server = game:GetService("NetworkServer") + RunService = game:GetService("RunService") + PlayerService = game:GetService("Players") + Server:start(Port, 20) + RunService:run() + game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") + PlayerService.MaxPlayers = PlayerLimit + PlayerService.PlayerAdded:connect(function(Player) + Player.Chatted:connect(function(msg) + print(Player.Name.."; "..msg) + end) + + if (PlayerService.NumPlayers > PlayerService.MaxPlayers) then + KickPlayer(Player, "Too many players on server.") + else + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added") + Player:LoadCharacter() + LoadSecurity(newWaitForChildSecurity(Player,"Security"),Player,game.Lighting) + newWaitForChildSecurity(Player,"Tripcode") + LoadTripcode(Player) + pcall(function() print("Player '" .. Player.Name .. "-" .. Player.userId .. "' security check success. Tripcode: '" .. Player.Tripcode.Value .. "'") end) + if (Player.Character ~= nil) then + LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) + end + end + + -- rename all Server replicators in NetworkServer to "ServerReplicator" + for _,Child in pairs(Server:GetChildren()) do + Child.Name = "ServerReplicator" + end + + coroutine.resume(coroutine.create(function() + while Player ~= nil do + wait(0.1) + if (Player.Character ~= nil) then + if (Player.Character.Humanoid.Health == 0) then + wait(5) + Player:LoadCharacter() + LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) + elseif (Player.Character.Parent == nil) then + wait(5) + Player:LoadCharacter() + LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) + end + end + end + end)) + end) + PlayerService.PlayerRemoving:connect(function(Player) + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving") + end) + pcall(function() game.Close:connect(function() Server:Stop() end) end) + InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + InitalizeClientName(game.Lighting) + Server.IncommingConnection:connect(IncommingConnection) +end + +function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Tripcode,Ticket) + local suc, err = pcall(function() + client = game:GetService("NetworkClient") + player = game:GetService("Players"):CreateLocalPlayer(UserID) + InitalizeSecurityValues(player,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + InitalizeTripcode(player,Tripcode) + player:SetSuperSafeChat(false) + pcall(function() player:SetUnder13(false) end) + pcall(function() player:SetAccountAge(365) end) + pcall(function() player.Name=PlayerName or "" end) + game:GetService("Visit") + InitalizeClientAppearance(player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + end) + + local function dieerror(errmsg) + game:SetMessage(errmsg) + wait(math.huge) + end + + if not suc then + dieerror(err) + end + + local function disconnect(peer,lostconnection) + game:SetMessage("You have lost connection to the game") + end + + local function connected(url, replicator) + replicator.Disconnection:connect(disconnect) + local marker = nil + local suc, err = pcall(function() + game:SetMessageBrickCount() + marker = replicator:SendMarker() + end) + if not suc then + dieerror(err) + end + marker.Received:connect(function() + local suc, err = pcall(function() + game:ClearMessage() + end) + if not suc then + dieerror(err) + end + end) + end + + local function rejected() + dieerror("Failed to connect to the Game. (Connection rejected)") + end + + local function failed(peer, errcode, why) + dieerror("Failed to connect to the Game. (ID="..errcode.." ["..why.."])") + end + + local suc, err = pcall(function() + game:SetMessage("Connecting to server...") + client.ConnectionAccepted:connect(connected) + client.ConnectionRejected:connect(rejected) + client.ConnectionFailed:connect(failed) + client:Connect(ServerIP,ServerPort, 0, 20) + game.GuiRoot.MainMenu["Toolbox"]:Remove() + game.GuiRoot.MainMenu["Edit Mode"]:Remove() + game.GuiRoot.RightPalette.ReportAbuse:Remove() + game.GuiRoot.ChatMenuPanel:Remove() + end) + + if not suc then + local x = Instance.new("Message") + x.Text = err + x.Parent = workspace + wait(math.huge) + end +end + +function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + local plr = game.Players:CreateLocalPlayer(UserID) + game:GetService("RunService"):run() + game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") + plr.Name = PlayerName + plr:LoadCharacter() + InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + game:GetService("Visit") + while true do + wait(0.001) + if (plr.Character ~= nil) then + if (plr.Character.Humanoid.Health == 0) then + wait(5) + plr:LoadCharacter() + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character) + elseif (plr.Character.Parent == nil) then + wait(5) + plr:LoadCharacter() -- to make sure nobody is deleted. + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character) + end + end + end +end + +function CSStudio() +end + +_G.CSServer=CSServer +_G.CSConnect=CSConnect +_G.CSSolo=CSSolo +_G.CSStudio=CSStudio \ No newline at end of file diff --git a/scripts/2007M-Shaders/CSMPFunctions.lua b/scripts/2007M-Shaders/CSMPFunctions.lua new file mode 100644 index 0000000..3663114 --- /dev/null +++ b/scripts/2007M-Shaders/CSMPFunctions.lua @@ -0,0 +1,488 @@ +settings().Network.maxDataModelSendBuffer = 1000000 +settings().Network.sendRate = 1000000 + +--function made by rbxbanland +function newWaitForChild(newParent,name) + local returnable = nil + if newParent:FindFirstChild(name) then + returnable = newParent:FindFirstChild(name) + else + repeat wait() returnable = newParent:FindFirstChild(name) until returnable ~= nil + end + return returnable +end + +function KickPlayer(Player,reason) + if (Player ~= nil) then + local message = Instance.new("Message") + message.Text = "You were kicked. Reason: "..reason + message.Parent = Player + wait(2) + Player:remove() + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: "..reason) + end +end + +function newWaitForChildSecurity(newParent,name) + local returnable = nil + local loadAttempts = 0 + local maxAttempts = 5 + while loadAttempts < maxAttempts do + if newParent:FindFirstChild(name) then + returnable = newParent:FindFirstChild(name) + break + end + wait() + loadAttempts = loadAttempts + 1 + print("Player '" .. newParent.Name .. "' trying to connect. Number of attempts: "..loadAttempts) + end + + if (loadAttempts == maxAttempts) then + KickPlayer(newParent, "Modified Client") + end + + return returnable +end + +function LoadCharacterNew(playerApp,newChar) + PlayerService = game:GetService("Players") + Player = PlayerService:GetPlayerFromCharacter(newChar) + + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (playerApp == nil) then + kick() + end + + if (not Player:FindFirstChild("Appearance")) then + kick() + end + + if ((playerApp:GetChildren() == 0) or (playerApp:GetChildren() == nil)) then + kick() + end + + local path = "rbxasset://../../../shareddata/charcustom/" + + local charparts = {[1] = newWaitForChild(newChar,"Head"),[2] = newWaitForChild(newChar,"Torso"),[3] = newWaitForChild(newChar,"Left Arm"),[4] = newWaitForChild(newChar,"Right Arm"),[5] = newWaitForChild(newChar,"Left Leg"),[6] = newWaitForChild(newChar,"Right Leg")} + for _,newVal in pairs(playerApp:GetChildren()) do + if (newVal.Name == "Body Color") then + pcall(function() + charparts[newVal.ColorIndex.Value].BrickColor = newVal.Value + end) + elseif (newVal.Name == "Hat") then + pcall(function() + local newHat = game.Workspace:InsertContent(path.."hats/"..newVal.Value) + if newHat[1] then + if newHat[1].className == "Hat" then + newHat[1].Parent = newChar + else + newHat[1]:remove() + end + end + end) + elseif (newVal.Name == "T-Shirt") then + pcall(function() + local newTShirt = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newTShirt = Instance.new("ShirtGraphic") + newTShirt.Graphic = newVal.Value + newTShirt.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newTShirt = game.Workspace:InsertContent(newVal.Value) + if newTShirt[1] then + if newTShirt[1].className == "ShirtGraphic" then + newTShirt[1].Parent = newChar + else + newTShirt[1]:remove() + end + end + else + newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value) + if newTShirt[1] then + if newTShirt[1].className == "ShirtGraphic" then + newTShirt[1].Parent = newChar + else + newTShirt[1]:remove() + end + end + end + end) + elseif (newVal.Name == "Extra") then + pcall(function() + local newHat = game.Workspace:InsertContent(path.."hats/"..newVal.Value) + if newHat[1] then + if newHat[1].className == "Hat" then + newHat[1].Parent = newChar + else + newHat[1]:remove() + end + end + end) + + pcall(function() + local newItem = game.Workspace:InsertContent(path.."custom/"..newVal.Value) + if newItem[1] then + if newItem[1].className == "Decal" then + newWaitForChild(charparts[1],"face"):remove() + newItem[1].Parent = charparts[1] + newItem[1].Face = "Front" + elseif newPart[1].className == "SpecialMesh" or newPart[1].className == "CylinderMesh" or newPart[1].className == "BlockMesh" then + newWaitForChild(charparts[1],"Mesh"):remove() + newItem[1].Parent = charparts[1] + else + newItem[1].Parent = newChar + end + end + end) + end + end +end + +function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + local newCharApp = Instance.new("IntValue",Player) + newCharApp.Name = "Appearance" + --BODY COLORS + for i=1,6,1 do + local BodyColor = Instance.new("BrickColorValue",newCharApp) + if (i == 1) then + if (HeadColorID ~= nil) then + BodyColor.Value = BrickColor.new(HeadColorID) + else + BodyColor.Value = BrickColor.new(1) + end + elseif (i == 2) then + if (TorsoColorID ~= nil) then + BodyColor.Value = BrickColor.new(TorsoColorID) + else + BodyColor.Value = BrickColor.new(1) + end + elseif (i == 3) then + if (LeftArmColorID ~= nil) then + BodyColor.Value = BrickColor.new(LeftArmColorID) + else + BodyColor.Value = BrickColor.new(1) + end + elseif (i == 4) then + if (RightArmColorID ~= nil) then + BodyColor.Value = BrickColor.new(RightArmColorID) + else + BodyColor.Value = BrickColor.new(1) + end + elseif (i == 5) then + if (LeftLegColorID ~= nil) then + BodyColor.Value = BrickColor.new(LeftLegColorID) + else + BodyColor.Value = BrickColor.new(1) + end + elseif (i == 6) then + if (RightLegColorID ~= nil) then + BodyColor.Value = BrickColor.new(RightLegColorID) + else + BodyColor.Value = BrickColor.new(1) + end + end + BodyColor.Name = "Body Color" + local indexValue = Instance.new("NumberValue") + indexValue.Name = "ColorIndex" + indexValue.Parent = BodyColor + indexValue.Value = i + end + --HATS + for i=1,3,1 do + local newHat = Instance.new("StringValue",newCharApp) + if (i == 1) then + if (Hat1ID ~= nil) then + newHat.Value = Hat1ID + else + newHat.Value = "NoHat.rbxm" + end + elseif (i == 2) then + if (Hat2ID ~= nil) then + newHat.Value = Hat2ID + else + newHat.Value = "NoHat.rbxm" + end + elseif (i == 3) then + if (Hat3ID ~= nil) then + newHat.Value = Hat3ID + else + newHat.Value = "NoHat.rbxm" + end + end + newHat.Name = "Hat" + end + --T-SHIRT + local newTShirt = Instance.new("StringValue",newCharApp) + if (TShirtID ~= nil) then + newTShirt.Value = TShirtID + else + newTShirt.Value = "NoTShirt.rbxm" + end + newTShirt.Name = "T-Shirt" + --EXTRA + local newItem = Instance.new("StringValue",newCharApp) + if (ItemID ~= nil) then + newItem.Value = ItemID + else + newItem.Value = "NoExtra.rbxm" + end + newItem.Name = "Extra" +end + +function LoadSecurity(playerApp,Player,ServerSecurityLocation) + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (playerApp == nil) then + kick() + end + + if (not Player:FindFirstChild("Security")) then + kick() + end + + if (not playerApp:FindFirstChild("ClientEXEMD5") or not playerApp:FindFirstChild("LauncherMD5") or not playerApp:FindFirstChild("ClientScriptMD5")) then + kick() + end + + for _,newVal in pairs(playerApp:GetChildren()) do + if (newVal.Name == "ClientEXEMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value or newVal.Value == "") then + kick() + break + end + end + + if (newVal.Name == "LauncherMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value or newVal.Value == "") then + kick() + break + end + end + + if (newVal.Name == "ClientScriptMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value or newVal.Value == "") then + kick() + break + end + end + end +end + +function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + Location = Instance.new("IntValue", Location) + Location.Name = "Security" + + local clientValue = Instance.new("StringValue", Location) + clientValue.Value = ClientEXEMD5 or "" + clientValue.Name = "ClientEXEMD5" + + local launcherValue = Instance.new("StringValue", Location) + launcherValue.Value = LauncherMD5 or "" + launcherValue.Name = "LauncherMD5" + + local scriptValue = Instance.new("StringValue", Location) + scriptValue.Value = ClientScriptMD5 or "" + scriptValue.Name = "ClientScriptMD5" +end + +function InitalizeTripcode(Location,Tripcode) + local code = Instance.new("StringValue", Location) + code.Value = Tripcode or "" + code.Name = "Tripcode" +end + +function LoadTripcode(Player) + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (not Player:FindFirstChild("Tripcode")) then + kick() + end + + for _,newVal in pairs(Player:GetChildren()) do + if (newVal.Name == "Tripcode") then + if (newVal.Value == "") then + kick() + break + end + end + end +end + +function InitalizeClientName(Location) + local newName = Instance.new("StringValue",Location) + newName.Value = "2007M-Shaders" + newName.Name = "Name" +end + +print("ROBLOX Client version '0.3.512.0' loaded.") + +function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + Server = game:GetService("NetworkServer") + RunService = game:GetService("RunService") + PlayerService = game:GetService("Players") + Server:start(Port, 20) + RunService:run() + game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") + PlayerService.MaxPlayers = PlayerLimit + PlayerService.PlayerAdded:connect(function(Player) + Player.Chatted:connect(function(msg) + print(Player.Name.."; "..msg) + end) + + if (PlayerService.NumPlayers > PlayerService.MaxPlayers) then + KickPlayer(Player, "Too many players on server.") + else + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added") + Player:LoadCharacter() + LoadSecurity(newWaitForChildSecurity(Player,"Security"),Player,game.Lighting) + newWaitForChildSecurity(Player,"Tripcode") + LoadTripcode(Player) + pcall(function() print("Player '" .. Player.Name .. "-" .. Player.userId .. "' security check success. Tripcode: '" .. Player.Tripcode.Value .. "'") end) + if (Player.Character ~= nil) then + LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) + end + end + + -- rename all Server replicators in NetworkServer to "ServerReplicator" + for _,Child in pairs(Server:GetChildren()) do + Child.Name = "ServerReplicator" + end + + coroutine.resume(coroutine.create(function() + while Player ~= nil do + wait(0.1) + if (Player.Character ~= nil) then + if (Player.Character.Humanoid.Health == 0) then + wait(5) + Player:LoadCharacter() + LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) + elseif (Player.Character.Parent == nil) then + wait(5) + Player:LoadCharacter() + LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) + end + end + end + end)) + end) + PlayerService.PlayerRemoving:connect(function(Player) + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving") + end) + pcall(function() game.Close:connect(function() Server:Stop() end) end) + InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + InitalizeClientName(game.Lighting) + Server.IncommingConnection:connect(IncommingConnection) +end + +function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Tripcode,Ticket) + local suc, err = pcall(function() + client = game:GetService("NetworkClient") + player = game:GetService("Players"):CreateLocalPlayer(UserID) + InitalizeSecurityValues(player,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + InitalizeTripcode(player,Tripcode) + player:SetSuperSafeChat(false) + pcall(function() player:SetUnder13(false) end) + pcall(function() player:SetAccountAge(365) end) + pcall(function() player.Name=PlayerName or "" end) + game:GetService("Visit") + InitalizeClientAppearance(player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + end) + + local function dieerror(errmsg) + game:SetMessage(errmsg) + wait(math.huge) + end + + if not suc then + dieerror(err) + end + + local function disconnect(peer,lostconnection) + game:SetMessage("You have lost connection to the game") + end + + local function connected(url, replicator) + replicator.Disconnection:connect(disconnect) + local marker = nil + local suc, err = pcall(function() + game:SetMessageBrickCount() + marker = replicator:SendMarker() + end) + if not suc then + dieerror(err) + end + marker.Received:connect(function() + local suc, err = pcall(function() + game:ClearMessage() + end) + if not suc then + dieerror(err) + end + end) + end + + local function rejected() + dieerror("Failed to connect to the Game. (Connection rejected)") + end + + local function failed(peer, errcode, why) + dieerror("Failed to connect to the Game. (ID="..errcode.." ["..why.."])") + end + + local suc, err = pcall(function() + game:SetMessage("Connecting to server...") + client.ConnectionAccepted:connect(connected) + client.ConnectionRejected:connect(rejected) + client.ConnectionFailed:connect(failed) + client:Connect(ServerIP,ServerPort, 0, 20) + game.GuiRoot.MainMenu["Toolbox"]:Remove() + game.GuiRoot.MainMenu["Edit Mode"]:Remove() + end) + + if not suc then + local x = Instance.new("Message") + x.Text = err + x.Parent = workspace + wait(math.huge) + end +end + +function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + local plr = game.Players:CreateLocalPlayer(UserID) + game:GetService("RunService"):run() + game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") + plr.Name = PlayerName + plr:LoadCharacter() + InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + game:GetService("Visit") + while true do + wait(0.001) + if (plr.Character ~= nil) then + if (plr.Character.Humanoid.Health == 0) then + wait(5) + plr:LoadCharacter() + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character) + elseif (plr.Character.Parent == nil) then + wait(5) + plr:LoadCharacter() -- to make sure nobody is deleted. + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character) + end + end + end +end + +function CSStudio() +end + +_G.CSServer=CSServer +_G.CSConnect=CSConnect +_G.CSSolo=CSSolo +_G.CSStudio=CSStudio \ No newline at end of file diff --git a/scripts/2007M/CSMPFunctions.lua b/scripts/2007M/CSMPFunctions.lua new file mode 100644 index 0000000..86ebf85 --- /dev/null +++ b/scripts/2007M/CSMPFunctions.lua @@ -0,0 +1,488 @@ +settings().Network.maxDataModelSendBuffer = 1000000 +settings().Network.sendRate = 1000000 + +--function made by rbxbanland +function newWaitForChild(newParent,name) + local returnable = nil + if newParent:FindFirstChild(name) then + returnable = newParent:FindFirstChild(name) + else + repeat wait() returnable = newParent:FindFirstChild(name) until returnable ~= nil + end + return returnable +end + +function KickPlayer(Player,reason) + if (Player ~= nil) then + local message = Instance.new("Message") + message.Text = "You were kicked. Reason: "..reason + message.Parent = Player + wait(2) + Player:remove() + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: "..reason) + end +end + +function newWaitForChildSecurity(newParent,name) + local returnable = nil + local loadAttempts = 0 + local maxAttempts = 5 + while loadAttempts < maxAttempts do + if newParent:FindFirstChild(name) then + returnable = newParent:FindFirstChild(name) + break + end + wait() + loadAttempts = loadAttempts + 1 + print("Player '" .. newParent.Name .. "' trying to connect. Number of attempts: "..loadAttempts) + end + + if (loadAttempts == maxAttempts) then + KickPlayer(newParent, "Modified Client") + end + + return returnable +end + +function LoadCharacterNew(playerApp,newChar) + PlayerService = game:GetService("Players") + Player = PlayerService:GetPlayerFromCharacter(newChar) + + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (playerApp == nil) then + kick() + end + + if (not Player:FindFirstChild("Appearance")) then + kick() + end + + if ((playerApp:GetChildren() == 0) or (playerApp:GetChildren() == nil)) then + kick() + end + + local path = "rbxasset://../../../shareddata/charcustom/" + + local charparts = {[1] = newWaitForChild(newChar,"Head"),[2] = newWaitForChild(newChar,"Torso"),[3] = newWaitForChild(newChar,"Left Arm"),[4] = newWaitForChild(newChar,"Right Arm"),[5] = newWaitForChild(newChar,"Left Leg"),[6] = newWaitForChild(newChar,"Right Leg")} + for _,newVal in pairs(playerApp:GetChildren()) do + if (newVal.Name == "Body Color") then + pcall(function() + charparts[newVal.ColorIndex.Value].BrickColor = newVal.Value + end) + elseif (newVal.Name == "Hat") then + pcall(function() + local newHat = game.Workspace:InsertContent(path.."hats/"..newVal.Value) + if newHat[1] then + if newHat[1].className == "Hat" then + newHat[1].Parent = newChar + else + newHat[1]:remove() + end + end + end) + elseif (newVal.Name == "T-Shirt") then + pcall(function() + local newTShirt = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newTShirt = Instance.new("ShirtGraphic") + newTShirt.Graphic = newVal.Value + newTShirt.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newTShirt = game.Workspace:InsertContent(newVal.Value) + if newTShirt[1] then + if newTShirt[1].className == "ShirtGraphic" then + newTShirt[1].Parent = newChar + else + newTShirt[1]:remove() + end + end + else + newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value) + if newTShirt[1] then + if newTShirt[1].className == "ShirtGraphic" then + newTShirt[1].Parent = newChar + else + newTShirt[1]:remove() + end + end + end + end) + elseif (newVal.Name == "Extra") then + pcall(function() + local newHat = game.Workspace:InsertContent(path.."hats/"..newVal.Value) + if newHat[1] then + if newHat[1].className == "Hat" then + newHat[1].Parent = newChar + else + newHat[1]:remove() + end + end + end) + + pcall(function() + local newItem = game.Workspace:InsertContent(path.."custom/"..newVal.Value) + if newItem[1] then + if newItem[1].className == "Decal" then + newWaitForChild(charparts[1],"face"):remove() + newItem[1].Parent = charparts[1] + newItem[1].Face = "Front" + elseif newPart[1].className == "SpecialMesh" or newPart[1].className == "CylinderMesh" or newPart[1].className == "BlockMesh" then + newWaitForChild(charparts[1],"Mesh"):remove() + newItem[1].Parent = charparts[1] + else + newItem[1].Parent = newChar + end + end + end) + end + end +end + +function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + local newCharApp = Instance.new("IntValue",Player) + newCharApp.Name = "Appearance" + --BODY COLORS + for i=1,6,1 do + local BodyColor = Instance.new("BrickColorValue",newCharApp) + if (i == 1) then + if (HeadColorID ~= nil) then + BodyColor.Value = BrickColor.new(HeadColorID) + else + BodyColor.Value = BrickColor.new(1) + end + elseif (i == 2) then + if (TorsoColorID ~= nil) then + BodyColor.Value = BrickColor.new(TorsoColorID) + else + BodyColor.Value = BrickColor.new(1) + end + elseif (i == 3) then + if (LeftArmColorID ~= nil) then + BodyColor.Value = BrickColor.new(LeftArmColorID) + else + BodyColor.Value = BrickColor.new(1) + end + elseif (i == 4) then + if (RightArmColorID ~= nil) then + BodyColor.Value = BrickColor.new(RightArmColorID) + else + BodyColor.Value = BrickColor.new(1) + end + elseif (i == 5) then + if (LeftLegColorID ~= nil) then + BodyColor.Value = BrickColor.new(LeftLegColorID) + else + BodyColor.Value = BrickColor.new(1) + end + elseif (i == 6) then + if (RightLegColorID ~= nil) then + BodyColor.Value = BrickColor.new(RightLegColorID) + else + BodyColor.Value = BrickColor.new(1) + end + end + BodyColor.Name = "Body Color" + local indexValue = Instance.new("NumberValue") + indexValue.Name = "ColorIndex" + indexValue.Parent = BodyColor + indexValue.Value = i + end + --HATS + for i=1,3,1 do + local newHat = Instance.new("StringValue",newCharApp) + if (i == 1) then + if (Hat1ID ~= nil) then + newHat.Value = Hat1ID + else + newHat.Value = "NoHat.rbxm" + end + elseif (i == 2) then + if (Hat2ID ~= nil) then + newHat.Value = Hat2ID + else + newHat.Value = "NoHat.rbxm" + end + elseif (i == 3) then + if (Hat3ID ~= nil) then + newHat.Value = Hat3ID + else + newHat.Value = "NoHat.rbxm" + end + end + newHat.Name = "Hat" + end + --T-SHIRT + local newTShirt = Instance.new("StringValue",newCharApp) + if (TShirtID ~= nil) then + newTShirt.Value = TShirtID + else + newTShirt.Value = "NoTShirt.rbxm" + end + newTShirt.Name = "T-Shirt" + --EXTRA + local newItem = Instance.new("StringValue",newCharApp) + if (ItemID ~= nil) then + newItem.Value = ItemID + else + newItem.Value = "NoExtra.rbxm" + end + newItem.Name = "Extra" +end + +function LoadSecurity(playerApp,Player,ServerSecurityLocation) + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (playerApp == nil) then + kick() + end + + if (not Player:FindFirstChild("Security")) then + kick() + end + + if (not playerApp:FindFirstChild("ClientEXEMD5") or not playerApp:FindFirstChild("LauncherMD5") or not playerApp:FindFirstChild("ClientScriptMD5")) then + kick() + end + + for _,newVal in pairs(playerApp:GetChildren()) do + if (newVal.Name == "ClientEXEMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value or newVal.Value == "") then + kick() + break + end + end + + if (newVal.Name == "LauncherMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value or newVal.Value == "") then + kick() + break + end + end + + if (newVal.Name == "ClientScriptMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value or newVal.Value == "") then + kick() + break + end + end + end +end + +function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + Location = Instance.new("IntValue", Location) + Location.Name = "Security" + + local clientValue = Instance.new("StringValue", Location) + clientValue.Value = ClientEXEMD5 or "" + clientValue.Name = "ClientEXEMD5" + + local launcherValue = Instance.new("StringValue", Location) + launcherValue.Value = LauncherMD5 or "" + launcherValue.Name = "LauncherMD5" + + local scriptValue = Instance.new("StringValue", Location) + scriptValue.Value = ClientScriptMD5 or "" + scriptValue.Name = "ClientScriptMD5" +end + +function InitalizeTripcode(Location,Tripcode) + local code = Instance.new("StringValue", Location) + code.Value = Tripcode or "" + code.Name = "Tripcode" +end + +function LoadTripcode(Player) + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (not Player:FindFirstChild("Tripcode")) then + kick() + end + + for _,newVal in pairs(Player:GetChildren()) do + if (newVal.Name == "Tripcode") then + if (newVal.Value == "") then + kick() + break + end + end + end +end + +function InitalizeClientName(Location) + local newName = Instance.new("StringValue",Location) + newName.Value = "2007M" + newName.Name = "Name" +end + +print("ROBLOX Client version '0.3.512.0' loaded.") + +function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + Server = game:GetService("NetworkServer") + RunService = game:GetService("RunService") + PlayerService = game:GetService("Players") + Server:start(Port, 20) + RunService:run() + game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") + PlayerService.MaxPlayers = PlayerLimit + PlayerService.PlayerAdded:connect(function(Player) + Player.Chatted:connect(function(msg) + print(Player.Name.."; "..msg) + end) + + if (PlayerService.NumPlayers > PlayerService.MaxPlayers) then + KickPlayer(Player, "Too many players on server.") + else + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added") + Player:LoadCharacter() + LoadSecurity(newWaitForChildSecurity(Player,"Security"),Player,game.Lighting) + newWaitForChildSecurity(Player,"Tripcode") + LoadTripcode(Player) + pcall(function() print("Player '" .. Player.Name .. "-" .. Player.userId .. "' security check success. Tripcode: '" .. Player.Tripcode.Value .. "'") end) + if (Player.Character ~= nil) then + LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) + end + end + + -- rename all Server replicators in NetworkServer to "ServerReplicator" + for _,Child in pairs(Server:GetChildren()) do + Child.Name = "ServerReplicator" + end + + coroutine.resume(coroutine.create(function() + while Player ~= nil do + wait(0.1) + if (Player.Character ~= nil) then + if (Player.Character.Humanoid.Health == 0) then + wait(5) + Player:LoadCharacter() + LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) + elseif (Player.Character.Parent == nil) then + wait(5) + Player:LoadCharacter() + LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) + end + end + end + end)) + end) + PlayerService.PlayerRemoving:connect(function(Player) + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving") + end) + pcall(function() game.Close:connect(function() Server:Stop() end) end) + InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + InitalizeClientName(game.Lighting) + Server.IncommingConnection:connect(IncommingConnection) +end + +function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Tripcode,Ticket) + local suc, err = pcall(function() + client = game:GetService("NetworkClient") + player = game:GetService("Players"):CreateLocalPlayer(UserID) + InitalizeSecurityValues(player,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + InitalizeTripcode(player,Tripcode) + player:SetSuperSafeChat(false) + pcall(function() player:SetUnder13(false) end) + pcall(function() player:SetAccountAge(365) end) + pcall(function() player.Name=PlayerName or "" end) + game:GetService("Visit") + InitalizeClientAppearance(player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + end) + + local function dieerror(errmsg) + game:SetMessage(errmsg) + wait(math.huge) + end + + if not suc then + dieerror(err) + end + + local function disconnect(peer,lostconnection) + game:SetMessage("You have lost connection to the game") + end + + local function connected(url, replicator) + replicator.Disconnection:connect(disconnect) + local marker = nil + local suc, err = pcall(function() + game:SetMessageBrickCount() + marker = replicator:SendMarker() + end) + if not suc then + dieerror(err) + end + marker.Received:connect(function() + local suc, err = pcall(function() + game:ClearMessage() + end) + if not suc then + dieerror(err) + end + end) + end + + local function rejected() + dieerror("Failed to connect to the Game. (Connection rejected)") + end + + local function failed(peer, errcode, why) + dieerror("Failed to connect to the Game. (ID="..errcode.." ["..why.."])") + end + + local suc, err = pcall(function() + game:SetMessage("Connecting to server...") + client.ConnectionAccepted:connect(connected) + client.ConnectionRejected:connect(rejected) + client.ConnectionFailed:connect(failed) + client:Connect(ServerIP,ServerPort, 0, 20) + game.GuiRoot.MainMenu["Toolbox"]:Remove() + game.GuiRoot.MainMenu["Edit Mode"]:Remove() + end) + + if not suc then + local x = Instance.new("Message") + x.Text = err + x.Parent = workspace + wait(math.huge) + end +end + +function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + local plr = game.Players:CreateLocalPlayer(UserID) + game:GetService("RunService"):run() + game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") + plr.Name = PlayerName + plr:LoadCharacter() + InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + game:GetService("Visit") + while true do + wait(0.001) + if (plr.Character ~= nil) then + if (plr.Character.Humanoid.Health == 0) then + wait(5) + plr:LoadCharacter() + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character) + elseif (plr.Character.Parent == nil) then + wait(5) + plr:LoadCharacter() -- to make sure nobody is deleted. + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character) + end + end + end +end + +function CSStudio() +end + +_G.CSServer=CSServer +_G.CSConnect=CSConnect +_G.CSSolo=CSSolo +_G.CSStudio=CSStudio diff --git a/scripts/2008M/CSMPFunctions.lua b/scripts/2008M/CSMPFunctions.lua new file mode 100644 index 0000000..190e41d --- /dev/null +++ b/scripts/2008M/CSMPFunctions.lua @@ -0,0 +1,595 @@ +settings().Rendering.frameRateManager = 2 +settings().Network.MaxSendBuffer = 1000000 +settings().Network.PhysicsReplicationUpdateRate = 1000000 +settings().Network.SendRate = 1000000 +settings().Network.PhysicsSend = 1 -- 1==RoundRobin + +--function made by rbxbanland +function newWaitForChild(newParent,name) + local returnable = nil + if newParent:FindFirstChild(name) then + returnable = newParent:FindFirstChild(name) + else + repeat wait() returnable = newParent:FindFirstChild(name) until returnable ~= nil + end + return returnable +end + +function KickPlayer(Player,reason) + if (Player ~= nil) then + local message = Instance.new("Message") + message.Text = "You were kicked. Reason: "..reason + message.Parent = Player + wait(2) + Player:remove() + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: "..reason) + end +end + +function newWaitForChildSecurity(newParent,name) + local returnable = nil + local loadAttempts = 0 + local maxAttempts = 5 + while loadAttempts < maxAttempts do + if newParent:FindFirstChild(name) then + returnable = newParent:FindFirstChild(name) + break + end + wait() + loadAttempts = loadAttempts + 1 + print("Player '" .. newParent.Name .. "' trying to connect. Number of attempts: "..loadAttempts) + end + + if (loadAttempts == maxAttempts) then + KickPlayer(newParent, "Modified Client") + end + + return returnable +end + +function LoadCharacterNew(playerApp,newChar) + PlayerService = game:GetService("Players") + Player = PlayerService:GetPlayerFromCharacter(newChar) + + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (playerApp == nil) then + kick() + end + + if (not Player:FindFirstChild("Appearance")) then + kick() + end + + if ((playerApp:GetChildren() == 0) or (playerApp:GetChildren() == nil)) then + kick() + end + + local path = "rbxasset://../../../shareddata/charcustom/" + + local charparts = {[1] = newWaitForChild(newChar,"Head"),[2] = newWaitForChild(newChar,"Torso"),[3] = newWaitForChild(newChar,"Left Arm"),[4] = newWaitForChild(newChar,"Right Arm"),[5] = newWaitForChild(newChar,"Left Leg"),[6] = newWaitForChild(newChar,"Right Leg")} + for _,newVal in pairs(playerApp:GetChildren()) do + local customtype = newVal.CustomizationType.Value + if (customtype == 1) then + pcall(function() + charparts[newVal.ColorIndex.Value].BrickColor = newVal.Value + end) + elseif (customtype == 2) then + pcall(function() + local newHat = game.Workspace:InsertContent(path.."hats/"..newVal.Value) + if newHat[1] then + if newHat[1].className == "Hat" then + newHat[1].Parent = newChar + else + newHat[1]:remove() + end + end + end) + elseif (customtype == 3) then + pcall(function() + local newTShirt = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newTShirt = Instance.new("ShirtGraphic") + newTShirt.Graphic = newVal.Value + newTShirt.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newTShirt = game.Workspace:InsertContent(newVal.Value) + if newTShirt[1] then + if newTShirt[1].className == "ShirtGraphic" then + newTShirt[1].Parent = newChar + else + newTShirt[1]:remove() + end + end + else + newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value) + if newTShirt[1] then + if newTShirt[1].className == "ShirtGraphic" then + newTShirt[1].Parent = newChar + else + newTShirt[1]:remove() + end + end + end + end) + elseif (customtype == 4) then + pcall(function() + local newShirt = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newShirt = Instance.new("Shirt") + newShirt.ShirtTemplate = newVal.Value + newShirt.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newShirt = game.Workspace:InsertContent(newVal.Value) + if newShirt[1] then + if newShirt[1].className == "Shirt" then + newShirt[1].Parent = newChar + else + newShirt[1]:remove() + end + end + else + newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value) + if newShirt[1] then + if newShirt[1].className == "Shirt" then + newShirt[1].Parent = newChar + else + newShirt[1]:remove() + end + end + end + end) + elseif (customtype == 5) then + pcall(function() + local newPants = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newPants = Instance.new("Pants") + newPants.PantsTemplate = newVal.Value + newPants.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newPants = game.Workspace:InsertContent(newVal.Value) + if newPants[1] then + if newPants[1].className == "Pants" then + newPants[1].Parent = newChar + else + newPants[1]:remove() + end + end + else + newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value) + if newPants[1] then + if newPants[1].className == "Pants" then + newPants[1].Parent = newChar + else + newPants[1]:remove() + end + end + end + end) + elseif (customtype == 6) then + pcall(function() + local newHat = game.Workspace:InsertContent(path.."hats/"..newVal.Value) + if newHat[1] then + if newHat[1].className == "Hat" then + newHat[1].Parent = newChar + else + newHat[1]:remove() + end + end + end) + + pcall(function() + local newItem = game.Workspace:InsertContent(path.."custom/"..newVal.Value) + if newItem[1] then + if newItem[1].className == "Decal" then + newWaitForChild(charparts[1],"face"):remove() + newItem[1].Parent = charparts[1] + newItem[1].Face = "Front" + elseif newPart[1].className == "SpecialMesh" or newPart[1].className == "CylinderMesh" or newPart[1].className == "BlockMesh" then + newWaitForChild(charparts[1],"Mesh"):remove() + newItem[1].Parent = charparts[1] + else + newItem[1].Parent = newChar + end + end + end) + end + end +end + +function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + local newCharApp = Instance.new("IntValue",Player) + newCharApp.Name = "Appearance" + --BODY COLORS + for i=1,6,1 do + local BodyColor = Instance.new("BrickColorValue",newCharApp) + if (i == 1) then + if (HeadColorID ~= nil) then + BodyColor.Value = BrickColor.new(HeadColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Head Color" + elseif (i == 2) then + if (TorsoColorID ~= nil) then + BodyColor.Value = BrickColor.new(TorsoColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Torso Color" + elseif (i == 3) then + if (LeftArmColorID ~= nil) then + BodyColor.Value = BrickColor.new(LeftArmColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Left Arm Color" + elseif (i == 4) then + if (RightArmColorID ~= nil) then + BodyColor.Value = BrickColor.new(RightArmColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Right Arm Color" + elseif (i == 5) then + if (LeftLegColorID ~= nil) then + BodyColor.Value = BrickColor.new(LeftLegColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Left Leg Color" + elseif (i == 6) then + if (RightLegColorID ~= nil) then + BodyColor.Value = BrickColor.new(RightLegColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Right Leg Color" + end + local indexValue = Instance.new("NumberValue") + indexValue.Name = "ColorIndex" + indexValue.Parent = BodyColor + indexValue.Value = i + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = BodyColor + typeValue.Value = 1 + end + --HATS + for i=1,3,1 do + local newHat = Instance.new("StringValue",newCharApp) + if (i == 1) then + if (Hat1ID ~= nil) then + newHat.Value = Hat1ID + newHat.Name = "Hat 1 - "..Hat1ID + else + newHat.Value = "NoHat.rbxm" + newHat.Name = "Hat 1 - NoHat.rbxm" + end + elseif (i == 2) then + if (Hat2ID ~= nil) then + newHat.Value = Hat2ID + newHat.Name = "Hat 2 - "..Hat2ID + else + newHat.Value = "NoHat.rbxm" + newHat.Name = "Hat 2 - NoHat.rbxm" + end + elseif (i == 3) then + if (Hat3ID ~= nil) then + newHat.Value = Hat3ID + newHat.Name = "Hat 3 - "..Hat3ID + else + newHat.Value = "NoHat.rbxm" + newHat.Name = "Hat 3 - NoHat.rbxm" + end + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newHat + typeValue.Value = 2 + end + --T-SHIRT + local newTShirt = Instance.new("StringValue",newCharApp) + if (TShirtID ~= nil) then + newTShirt.Value = TShirtID + newTShirt.Name = "T-Shirt - "..TShirtID + else + newTShirt.Value = "NoTShirt.rbxm" + newTShirt.Name = "T-Shirt - NoTShirt.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newTShirt + typeValue.Value = 3 + --SHIRT + local newShirt = Instance.new("StringValue",newCharApp) + if (ShirtID ~= nil) then + newShirt.Value = ShirtID + newShirt.Name = "Shirt - "..ShirtID + else + newShirt.Value = "NoShirt.rbxm" + newShirt.Name = "Shirt - NoShirt.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newShirt + typeValue.Value = 4 + --PANTS + local newPants = Instance.new("StringValue",newCharApp) + if (PantsID ~= nil) then + newPants.Value = PantsID + newPants.Name = "Pants - "..PantsID + else + newPants.Value = "NoPants.rbxm" + newPants.Name = "Pants - NoPants.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newPants + typeValue.Value = 5 + --EXTRA + local newItem = Instance.new("StringValue",newCharApp) + if (ItemID ~= nil) then + newItem.Value = ItemID + newItem.Name = "Extra - "..ItemID + else + newItem.Value = "NoExtra.rbxm" + newItem.Name = "Extra - NoExtra.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newItem + typeValue.Value = 6 +end + +function LoadSecurity(playerApp,Player,ServerSecurityLocation) + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (playerApp == nil) then + kick() + end + + if (not Player:FindFirstChild("Security")) then + kick() + end + + if (not playerApp:FindFirstChild("ClientEXEMD5") or not playerApp:FindFirstChild("LauncherMD5") or not playerApp:FindFirstChild("ClientScriptMD5")) then + kick() + end + + for _,newVal in pairs(playerApp:GetChildren()) do + if (newVal.Name == "ClientEXEMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value or newVal.Value == "") then + kick() + break + end + end + + if (newVal.Name == "LauncherMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value or newVal.Value == "") then + kick() + break + end + end + + if (newVal.Name == "ClientScriptMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value or newVal.Value == "") then + kick() + break + end + end + end +end + +function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + Location = Instance.new("IntValue", Location) + Location.Name = "Security" + + local clientValue = Instance.new("StringValue", Location) + clientValue.Value = ClientEXEMD5 or "" + clientValue.Name = "ClientEXEMD5" + + local launcherValue = Instance.new("StringValue", Location) + launcherValue.Value = LauncherMD5 or "" + launcherValue.Name = "LauncherMD5" + + local scriptValue = Instance.new("StringValue", Location) + scriptValue.Value = ClientScriptMD5 or "" + scriptValue.Name = "ClientScriptMD5" +end + +function InitalizeTripcode(Location,Tripcode) + local code = Instance.new("StringValue", Location) + code.Value = Tripcode or "" + code.Name = "Tripcode" +end + +function LoadTripcode(Player) + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (not Player:FindFirstChild("Tripcode")) then + kick() + end + + for _,newVal in pairs(Player:GetChildren()) do + if (newVal.Name == "Tripcode") then + if (newVal.Value == "") then + kick() + break + end + end + end +end + +function InitalizeClientName(Location) + local newName = Instance.new("StringValue",Location) + newName.Value = "2008M" + newName.Name = "Name" +end + +rbxversion = version() +print("ROBLOX Client version '" .. rbxversion .. "' loaded.") + +function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + Server = game:GetService("NetworkServer") + RunService = game:GetService("RunService") + Server:start(Port, 20) + RunService:run() + game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") + PlayerService = game:GetService("Players") + PlayerService.MaxPlayers = PlayerLimit + PlayerService.PlayerAdded:connect(function(Player) + Player.Chatted:connect(function(msg) + print(Player.Name.."; "..msg) + end) + + if (PlayerService.NumPlayers > PlayerService.MaxPlayers) then + KickPlayer(Player, "Too many players on server.") + else + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added") + Player:LoadCharacter() + LoadSecurity(newWaitForChildSecurity(Player,"Security"),Player,game.Lighting) + newWaitForChildSecurity(Player,"Tripcode") + LoadTripcode(Player) + pcall(function() print("Player '" .. Player.Name .. "-" .. Player.userId .. "' security check success. Tripcode: '" .. Player.Tripcode.Value .. "'") end) + if (Player.Character ~= nil) then + LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) + end + end + + -- rename all Server replicators in NetworkServer to "ServerReplicator" + for _,Child in pairs(Server:GetChildren()) do + Child.Name = "ServerReplicator" + end + + while true do + wait(0.001) + if (Player.Character ~= nil) then + if (Player.Character.Humanoid.Health == 0) then + wait(5) + Player:LoadCharacter() + LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) + elseif (Player.Character.Parent == nil) then + wait(5) + Player:LoadCharacter() -- to make sure nobody is deleted. + LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) + end + end + end + end) + PlayerService.PlayerRemoving:connect(function(Player) + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving") + end) + pcall(function() game.Close:connect(function() Server:Stop() end) end) + InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + InitalizeClientName(game.Lighting) + Server.IncommingConnection:connect(IncommingConnection) +end + +function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Tripcode,Ticket) + local suc, err = pcall(function() + client = game:GetService("NetworkClient") + player = game:GetService("Players"):CreateLocalPlayer(UserID) + player:SetSuperSafeChat(false) + pcall(function() player:SetUnder13(false) end) + pcall(function() player:SetMembershipType(Enum.MembershipType.BuildersClub) end) + pcall(function() player:SetAccountAge(365) end) + player.CharacterAppearance=0 + pcall(function() player.Name=PlayerName or "" end) + game:GetService("Visit") + InitalizeClientAppearance(player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + InitalizeSecurityValues(player,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + InitalizeTripcode(player,Tripcode) + end) + + local function dieerror(errmsg) + game:SetMessage(errmsg) + wait(math.huge) + end + + if not suc then + dieerror(err) + end + + local function disconnect(peer,lostconnection) + game:SetMessage("You have lost connection to the game") + end + + local function connected(url, replicator) + replicator.Disconnection:connect(disconnect) + local marker = nil + local suc, err = pcall(function() + game:SetMessageBrickCount() + marker = replicator:SendMarker() + end) + if not suc then + dieerror(err) + end + marker.Received:connect(function() + local suc, err = pcall(function() + game:ClearMessage() + end) + if not suc then + dieerror(err) + end + end) + end + + local function rejected() + dieerror("Failed to connect to the Game. (Connection rejected)") + end + + local function failed(peer, errcode, why) + dieerror("Failed to connect to the Game. (ID="..errcode.." ["..why.."])") + end + + local suc, err = pcall(function() + game:SetMessage("Connecting to server...") + client.ConnectionAccepted:connect(connected) + client.ConnectionRejected:connect(rejected) + client.ConnectionFailed:connect(failed) + client:Connect(ServerIP,ServerPort, 0, 20) + game.GuiRoot.MainMenu["Tools"]:Remove() + game.GuiRoot.MainMenu["Insert"]:Remove() + end) + + if not suc then + local x = Instance.new("Message") + x.Text = err + x.Parent = workspace + wait(math.huge) + end +end + +function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + local plr = game.Players:CreateLocalPlayer(UserID) + game:GetService("RunService"):run() + game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") + plr.Name = PlayerName + plr:LoadCharacter() + plr.CharacterAppearance=0 + InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + game:GetService("Visit") + while true do wait() + if (plr.Character.Humanoid.Health == 0) then + wait(5) + plr:LoadCharacter() + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + end + end +end + +function CSStudio() +end + +_G.CSServer=CSServer +_G.CSConnect=CSConnect +_G.CSSolo=CSSolo +_G.CSStudio=CSStudio \ No newline at end of file diff --git a/scripts/2009E/CSMPFunctions.lua b/scripts/2009E/CSMPFunctions.lua new file mode 100644 index 0000000..592bb6c --- /dev/null +++ b/scripts/2009E/CSMPFunctions.lua @@ -0,0 +1,661 @@ +settings().Rendering.FrameRateManager = 2 +settings().Rendering.MaxFrameRate = 120 +settings().Rendering.MinFrameRate = 60 +settings().Network.DataSendRate = 30 +settings().Network.ReceiveRate = 60 +settings().Network.PhysicsSend = 1 +settings().Network.NetworkOwnerRate = 30 +settings().Network.PhysicsSendRate = 30 + +--function made by rbxbanland +function newWaitForChild(newParent,name) + local returnable = nil + if newParent:FindFirstChild(name) then + returnable = newParent:FindFirstChild(name) + else + repeat wait() returnable = newParent:FindFirstChild(name) until returnable ~= nil + end + return returnable +end + +function KickPlayer(Player,reason) + if (Player ~= nil) then + local message = Instance.new("Message") + message.Text = "You were kicked. Reason: "..reason + message.Parent = Player + wait(2) + Player:remove() + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: "..reason) + end +end + +function newWaitForChildSecurity(newParent,name) + local returnable = nil + local loadAttempts = 0 + local maxAttempts = 5 + while loadAttempts < maxAttempts do + if newParent:FindFirstChild(name) then + returnable = newParent:FindFirstChild(name) + break + end + wait() + loadAttempts = loadAttempts + 1 + print("Player '" .. newParent.Name .. "' trying to connect. Number of attempts: "..loadAttempts) + end + + if (loadAttempts == maxAttempts) then + KickPlayer(newParent, "Modified Client") + end + + return returnable +end + +function LoadCharacterNew(playerApp,newChar) + PlayerService = game:GetService("Players") + Player = PlayerService:GetPlayerFromCharacter(newChar) + + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (playerApp == nil) then + kick() + end + + if (not Player:FindFirstChild("Appearance")) then + kick() + end + + if ((playerApp:GetChildren() == 0) or (playerApp:GetChildren() == nil)) then + kick() + end + + local path = "rbxasset://../../../shareddata/charcustom/" + + local charparts = {[1] = newWaitForChild(newChar,"Head"),[2] = newWaitForChild(newChar,"Torso"),[3] = newWaitForChild(newChar,"Left Arm"),[4] = newWaitForChild(newChar,"Right Arm"),[5] = newWaitForChild(newChar,"Left Leg"),[6] = newWaitForChild(newChar,"Right Leg")} + for _,newVal in pairs(playerApp:GetChildren()) do + local customtype = newVal.CustomizationType.Value + if (customtype == 1) then + pcall(function() + charparts[newVal.ColorIndex.Value].BrickColor = newVal.Value + end) + elseif (customtype == 2) then + pcall(function() + local newHat = game.Workspace:InsertContent(path.."hats/"..newVal.Value) + if newHat[1] then + if newHat[1].className == "Hat" then + newHat[1].Parent = newChar + else + newHat[1]:remove() + end + end + end) + elseif (customtype == 3) then + pcall(function() + local newTShirt = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newTShirt = Instance.new("ShirtGraphic") + newTShirt.Graphic = newVal.Value + newTShirt.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newTShirt = game.Workspace:InsertContent(newVal.Value) + if newTShirt[1] then + if newTShirt[1].className == "ShirtGraphic" then + newTShirt[1].Parent = newChar + else + newTShirt[1]:remove() + end + end + else + newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value) + if newTShirt[1] then + if newTShirt[1].className == "ShirtGraphic" then + newTShirt[1].Parent = newChar + else + newTShirt[1]:remove() + end + end + end + end) + elseif (customtype == 4) then + pcall(function() + local newShirt = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newShirt = Instance.new("Shirt") + newShirt.ShirtTemplate = newVal.Value + newShirt.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newShirt = game.Workspace:InsertContent(newVal.Value) + if newShirt[1] then + if newShirt[1].className == "Shirt" then + newShirt[1].Parent = newChar + else + newShirt[1]:remove() + end + end + else + newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value) + if newShirt[1] then + if newShirt[1].className == "Shirt" then + newShirt[1].Parent = newChar + else + newShirt[1]:remove() + end + end + end + end) + elseif (customtype == 5) then + pcall(function() + local newPants = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newPants = Instance.new("Pants") + newPants.PantsTemplate = newVal.Value + newPants.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newPants = game.Workspace:InsertContent(newVal.Value) + if newPants[1] then + if newPants[1].className == "Pants" then + newPants[1].Parent = newChar + else + newPants[1]:remove() + end + end + else + newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value) + if newPants[1] then + if newPants[1].className == "Pants" then + newPants[1].Parent = newChar + else + newPants[1]:remove() + end + end + end + end) + elseif (customtype == 6) then + pcall(function() + local newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value) + if newFace[1] then + if newFace[1].className == "Decal" then + newWaitForChild(charparts[1],"face"):remove() + newFace[1].Parent = charparts[1] + newFace[1].Face = "Front" + else + newFace[1]:remove() + end + end + end) + elseif (customtype == 7) then + pcall(function() + local newPart = game.Workspace:InsertContent(path.."heads/"..newVal.Value) + if newPart[1] then + if newPart[1].className == "SpecialMesh" or newPart[1].className == "CylinderMesh" or newPart[1].className == "BlockMesh" then + newWaitForChild(charparts[1],"Mesh"):remove() + newPart[1].Parent = charparts[1] + else + newPart[1]:remove() + end + end + end) + elseif (customtype == 8) then + pcall(function() + local newHat = game.Workspace:InsertContent(path.."hats/"..newVal.Value) + if newHat[1] then + if newHat[1].className == "Hat" then + newHat[1].Parent = newChar + else + newHat[1]:remove() + end + end + end) + + pcall(function() + local newItem = game.Workspace:InsertContent(path.."custom/"..newVal.Value) + if newItem[1] then + if newItem[1].className == "Decal" then + newWaitForChild(charparts[1],"face"):remove() + newItem[1].Parent = charparts[1] + newItem[1].Face = "Front" + elseif newPart[1].className == "SpecialMesh" or newPart[1].className == "CylinderMesh" or newPart[1].className == "BlockMesh" then + newWaitForChild(charparts[1],"Mesh"):remove() + newItem[1].Parent = charparts[1] + else + newItem[1].Parent = newChar + end + end + end) + end + end +end + +function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + local newCharApp = Instance.new("IntValue",Player) + newCharApp.Name = "Appearance" + --BODY COLORS + for i=1,6,1 do + local BodyColor = Instance.new("BrickColorValue",newCharApp) + if (i == 1) then + if (HeadColorID ~= nil) then + BodyColor.Value = BrickColor.new(HeadColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Head Color" + elseif (i == 2) then + if (TorsoColorID ~= nil) then + BodyColor.Value = BrickColor.new(TorsoColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Torso Color" + elseif (i == 3) then + if (LeftArmColorID ~= nil) then + BodyColor.Value = BrickColor.new(LeftArmColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Left Arm Color" + elseif (i == 4) then + if (RightArmColorID ~= nil) then + BodyColor.Value = BrickColor.new(RightArmColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Right Arm Color" + elseif (i == 5) then + if (LeftLegColorID ~= nil) then + BodyColor.Value = BrickColor.new(LeftLegColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Left Leg Color" + elseif (i == 6) then + if (RightLegColorID ~= nil) then + BodyColor.Value = BrickColor.new(RightLegColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Right Leg Color" + end + local indexValue = Instance.new("NumberValue") + indexValue.Name = "ColorIndex" + indexValue.Parent = BodyColor + indexValue.Value = i + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = BodyColor + typeValue.Value = 1 + end + --HATS + for i=1,3,1 do + local newHat = Instance.new("StringValue",newCharApp) + if (i == 1) then + if (Hat1ID ~= nil) then + newHat.Value = Hat1ID + newHat.Name = "Hat 1 - "..Hat1ID + else + newHat.Value = "NoHat.rbxm" + newHat.Name = "Hat 1 - NoHat.rbxm" + end + elseif (i == 2) then + if (Hat2ID ~= nil) then + newHat.Value = Hat2ID + newHat.Name = "Hat 2 - "..Hat2ID + else + newHat.Value = "NoHat.rbxm" + newHat.Name = "Hat 2 - NoHat.rbxm" + end + elseif (i == 3) then + if (Hat3ID ~= nil) then + newHat.Value = Hat3ID + newHat.Name = "Hat 3 - "..Hat3ID + else + newHat.Value = "NoHat.rbxm" + newHat.Name = "Hat 3 - NoHat.rbxm" + end + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newHat + typeValue.Value = 2 + end + --T-SHIRT + local newTShirt = Instance.new("StringValue",newCharApp) + if (TShirtID ~= nil) then + newTShirt.Value = TShirtID + newTShirt.Name = "T-Shirt - "..TShirtID + else + newTShirt.Value = "NoTShirt.rbxm" + newTShirt.Name = "T-Shirt - NoTShirt.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newTShirt + typeValue.Value = 3 + --SHIRT + local newShirt = Instance.new("StringValue",newCharApp) + if (ShirtID ~= nil) then + newShirt.Value = ShirtID + newShirt.Name = "Shirt - "..ShirtID + else + newShirt.Value = "NoShirt.rbxm" + newShirt.Name = "Shirt - NoShirt.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newShirt + typeValue.Value = 4 + --PANTS + local newPants = Instance.new("StringValue",newCharApp) + if (PantsID ~= nil) then + newPants.Value = PantsID + newPants.Name = "Pants - "..PantsID + else + newPants.Value = "NoPants.rbxm" + newPants.Name = "Pants - NoPants.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newPants + typeValue.Value = 5 + --FACE + local newFace = Instance.new("StringValue",newCharApp) + if (FaceID ~= nil) then + newFace.Value = FaceID + newFace.Name = "Face - "..FaceID + else + newFace.Value = "DefaultFace.rbxm" + newFace.Name = "Face - DefaultFace.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newFace + typeValue.Value = 6 + --HEADS + local newHead = Instance.new("StringValue",newCharApp) + if (HeadID ~= nil) then + newHead.Value = HeadID + newHead.Name = "Head - "..HeadID + else + newHead.Value = "DefaultHead.rbxm" + newHead.Name = "Head - DefaultHead.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newHead + typeValue.Value = 7 + --EXTRA + local newItem = Instance.new("StringValue",newCharApp) + if (ItemID ~= nil) then + newItem.Value = ItemID + newItem.Name = "Extra - "..ItemID + else + newItem.Value = "NoExtra.rbxm" + newItem.Name = "Extra - NoExtra.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newItem + typeValue.Value = 8 +end + +function LoadSecurity(playerApp,Player,ServerSecurityLocation) + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (playerApp == nil) then + kick() + end + + if (not Player:FindFirstChild("Security")) then + kick() + end + + if (not playerApp:FindFirstChild("ClientEXEMD5") or not playerApp:FindFirstChild("LauncherMD5") or not playerApp:FindFirstChild("ClientScriptMD5")) then + kick() + end + + for _,newVal in pairs(playerApp:GetChildren()) do + if (newVal.Name == "ClientEXEMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value or newVal.Value == "") then + kick() + break + end + end + + if (newVal.Name == "LauncherMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value or newVal.Value == "") then + kick() + break + end + end + + if (newVal.Name == "ClientScriptMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value or newVal.Value == "") then + kick() + break + end + end + end +end + +function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + Location = Instance.new("IntValue", Location) + Location.Name = "Security" + + local clientValue = Instance.new("StringValue", Location) + clientValue.Value = ClientEXEMD5 or "" + clientValue.Name = "ClientEXEMD5" + + local launcherValue = Instance.new("StringValue", Location) + launcherValue.Value = LauncherMD5 or "" + launcherValue.Name = "LauncherMD5" + + local scriptValue = Instance.new("StringValue", Location) + scriptValue.Value = ClientScriptMD5 or "" + scriptValue.Name = "ClientScriptMD5" +end + +function InitalizeTripcode(Location,Tripcode) + local code = Instance.new("StringValue", Location) + code.Value = Tripcode or "" + code.Name = "Tripcode" +end + +function LoadTripcode(Player) + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (not Player:FindFirstChild("Tripcode")) then + kick() + end + + for _,newVal in pairs(Player:GetChildren()) do + if (newVal.Name == "Tripcode") then + if (newVal.Value == "") then + kick() + break + end + end + end +end + +function InitalizeClientName(Location) + local newName = Instance.new("StringValue",Location) + newName.Value = "2009E" + newName.Name = "Name" +end + +rbxversion = version() +print("ROBLOX Client version '" .. rbxversion .. "' loaded.") + +function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + Server = game:GetService("NetworkServer") + RunService = game:GetService("RunService") + Server:start(Port, 20) + RunService:run() + game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") + PlayerService = game:GetService("Players") + PlayerService.MaxPlayers = PlayerLimit + PlayerService.PlayerAdded:connect(function(Player) + Player.Chatted:connect(function(msg) + print(Player.Name.."; "..msg) + end) + + if (PlayerService.NumPlayers > PlayerService.MaxPlayers) then + KickPlayer(Player, "Too many players on server.") + else + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added") + Player:LoadCharacter() + LoadSecurity(newWaitForChildSecurity(Player,"Security"),Player,game.Lighting) + newWaitForChildSecurity(Player,"Tripcode") + LoadTripcode(Player) + pcall(function() print("Player '" .. Player.Name .. "-" .. Player.userId .. "' security check success. Tripcode: '" .. Player.Tripcode.Value .. "'") end) + if (Player.Character ~= nil) then + LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) + end + end + + -- rename all Server replicators in NetworkServer to "ServerReplicator" + for _,Child in pairs(Server:GetChildren()) do + Child.Name = "ServerReplicator" + end + + while true do + wait(0.001) + if (Player.Character ~= nil) then + if (Player.Character.Humanoid.Health == 0) then + wait(5) + Player:LoadCharacter() + LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) + elseif (Player.Character.Parent == nil) then + wait(5) + Player:LoadCharacter() -- to make sure nobody is deleted. + LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) + end + end + end + end) + PlayerService.PlayerRemoving:connect(function(Player) + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving") + end) + pcall(function() game.Close:connect(function() Server:Stop() end) end) + InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + InitalizeClientName(game.Lighting) + Server.IncommingConnection:connect(IncommingConnection) +end +function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Tripcode,Ticket) + pcall(function() game:SetPlaceID(-1, false) end) + pcall(function() game:GetService("Players"):SetChatStyle(Enum.ChatStyle.ClassicAndBubble) end) + + pcall(function() + game:GetService("GuiService").Changed:connect(function() + pcall(function() game:GetService("GuiService").ShowLegacyPlayerList=true end) + pcall(function() game.CoreGui.RobloxGui.PlayerListScript:Remove() end) + pcall(function() game.CoreGui.RobloxGui.PlayerListTopRightFrame:Remove() end) + pcall(function() game.CoreGui.RobloxGui.BigPlayerListWindowImposter:Remove() end) + pcall(function() game.CoreGui.RobloxGui.BigPlayerlist:Remove() end) + end) + end) + + local suc, err = pcall(function() + client = game:GetService("NetworkClient") + player = game:GetService("Players"):CreateLocalPlayer(UserID) + player:SetSuperSafeChat(false) + pcall(function() player:SetUnder13(false) end) + pcall(function() player:SetMembershipType(Enum.MembershipType.BuildersClub) end) + pcall(function() player:SetAccountAge(365) end) + player.CharacterAppearance=0 + pcall(function() player.Name=PlayerName or "" end) + game:GetService("Visit") + InitalizeClientAppearance(player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + InitalizeSecurityValues(player,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + InitalizeTripcode(player,Tripcode) + end) + + local function dieerror(errmsg) + game:SetMessage(errmsg) + wait(math.huge) + end + + if not suc then + dieerror(err) + end + + local function disconnect(peer,lostconnection) + game:SetMessage("You have lost connection to the game") + end + + local function connected(url, replicator) + replicator.Disconnection:connect(disconnect) + local marker = nil + local suc, err = pcall(function() + game:SetMessageBrickCount() + marker = replicator:SendMarker() + end) + if not suc then + dieerror(err) + end + marker.Received:connect(function() + local suc, err = pcall(function() + game:ClearMessage() + end) + if not suc then + dieerror(err) + end + end) + end + + local function rejected() + dieerror("Failed to connect to the Game. (Connection rejected)") + end + + local function failed(peer, errcode, why) + dieerror("Failed to connect to the Game. (ID="..errcode.." ["..why.."])") + end + + local suc, err = pcall(function() + game:SetMessage("Connecting to server...") + client.ConnectionAccepted:connect(connected) + client.ConnectionRejected:connect(rejected) + client.ConnectionFailed:connect(failed) + client:Connect(ServerIP,ServerPort, 0, 20) + game.GuiRoot.MainMenu["Tools"]:Remove() + game.GuiRoot.MainMenu["Insert"]:Remove() + end) + + if not suc then + local x = Instance.new("Message") + x.Text = err + x.Parent = workspace + wait(math.huge) + end +end + +function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + local plr = game.Players:CreateLocalPlayer(UserID) + game:GetService("RunService"):run() + game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") + plr.Name = PlayerName + plr:LoadCharacter() + plr.CharacterAppearance=0 + InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + game:GetService("Visit") + while true do wait() + if (plr.Character.Humanoid.Health == 0) then + wait(5) + plr:LoadCharacter() + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + end + end +end + +function CSStudio() +end + +_G.CSServer=CSServer +_G.CSConnect=CSConnect +_G.CSSolo=CSSolo +_G.CSStudio=CSStudio \ No newline at end of file diff --git a/scripts/2009L/CSMPFunctions.lua b/scripts/2009L/CSMPFunctions.lua new file mode 100644 index 0000000..380d88c --- /dev/null +++ b/scripts/2009L/CSMPFunctions.lua @@ -0,0 +1,682 @@ +settings().Rendering.FrameRateManager = 2 +settings().Network.DataSendRate = 30 +settings().Network.PhysicsSendRate = 20 +settings().Network.ReceiveRate = 60 +settings().Network.NetworkOwnerRate = 30 +pcall(function() game:GetService("ScriptContext").ScriptsDisabled = false end) + +--function made by rbxbanland +function newWaitForChild(newParent,name) + local returnable = nil + if newParent:FindFirstChild(name) then + returnable = newParent:FindFirstChild(name) + else + repeat wait() returnable = newParent:FindFirstChild(name) until returnable ~= nil + end + return returnable +end + +function KickPlayer(Player,reason) + if (Player ~= nil) then + local message = Instance.new("Message") + message.Text = "You were kicked. Reason: "..reason + message.Parent = Player + wait(2) + Player:remove() + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: "..reason) + end +end + +function newWaitForChildSecurity(newParent,name) + local returnable = nil + local loadAttempts = 0 + local maxAttempts = 5 + while loadAttempts < maxAttempts do + if newParent:FindFirstChild(name) then + returnable = newParent:FindFirstChild(name) + break + end + wait() + loadAttempts = loadAttempts + 1 + print("Player '" .. newParent.Name .. "' trying to connect. Number of attempts: "..loadAttempts) + end + + if (loadAttempts == maxAttempts) then + KickPlayer(newParent, "Modified Client") + end + + return returnable +end + +function LoadCharacterNew(playerApp,newChar) + PlayerService = game:GetService("Players") + Player = PlayerService:GetPlayerFromCharacter(newChar) + + wait(0.65) + + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (playerApp == nil) then + kick() + end + + if (not Player:FindFirstChild("Appearance")) then + kick() + end + + if ((playerApp:GetChildren() == 0) or (playerApp:GetChildren() == nil)) then + kick() + end + + local path = "rbxasset://../../../shareddata/charcustom/" + + local charparts = {[1] = newWaitForChild(newChar,"Head"),[2] = newWaitForChild(newChar,"Torso"),[3] = newWaitForChild(newChar,"Left Arm"),[4] = newWaitForChild(newChar,"Right Arm"),[5] = newWaitForChild(newChar,"Left Leg"),[6] = newWaitForChild(newChar,"Right Leg")} + for _,newVal in pairs(playerApp:GetChildren()) do + local customtype = newVal.CustomizationType.Value + if (customtype == 1) then + pcall(function() + charparts[newVal.ColorIndex.Value].BrickColor = newVal.Value + end) + elseif (customtype == 2) then + pcall(function() + local newHat = game.Workspace:InsertContent(path.."hats/"..newVal.Value) + if newHat[1] then + if newHat[1].className == "Hat" then + newHat[1].Parent = newChar + else + newHat[1]:remove() + end + end + end) + elseif (customtype == 3) then + pcall(function() + local newTShirt = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newTShirt = Instance.new("ShirtGraphic") + newTShirt.Graphic = newVal.Value + newTShirt.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newTShirt = game.Workspace:InsertContent(newVal.Value) + if newTShirt[1] then + if newTShirt[1].className == "ShirtGraphic" then + newTShirt[1].Parent = newChar + else + newTShirt[1]:remove() + end + end + else + newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value) + if newTShirt[1] then + if newTShirt[1].className == "ShirtGraphic" then + newTShirt[1].Parent = newChar + else + newTShirt[1]:remove() + end + end + end + end) + elseif (customtype == 4) then + pcall(function() + local newShirt = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newShirt = Instance.new("Shirt") + newShirt.ShirtTemplate = newVal.Value + newShirt.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newShirt = game.Workspace:InsertContent(newVal.Value) + if newShirt[1] then + if newShirt[1].className == "Shirt" then + newShirt[1].Parent = newChar + else + newShirt[1]:remove() + end + end + else + newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value) + if newShirt[1] then + if newShirt[1].className == "Shirt" then + newShirt[1].Parent = newChar + else + newShirt[1]:remove() + end + end + end + end) + elseif (customtype == 5) then + pcall(function() + local newPants = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newPants = Instance.new("Pants") + newPants.PantsTemplate = newVal.Value + newPants.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newPants = game.Workspace:InsertContent(newVal.Value) + if newPants[1] then + if newPants[1].className == "Pants" then + newPants[1].Parent = newChar + else + newPants[1]:remove() + end + end + else + newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value) + if newPants[1] then + if newPants[1].className == "Pants" then + newPants[1].Parent = newChar + else + newPants[1]:remove() + end + end + end + end) + elseif (customtype == 6) then + pcall(function() + local newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value) + if newFace[1] then + if newFace[1].className == "Decal" then + newWaitForChild(charparts[1],"face"):remove() + newFace[1].Parent = charparts[1] + newFace[1].Face = "Front" + else + newFace[1]:remove() + end + end + end) + elseif (customtype == 7) then + pcall(function() + local newPart = game.Workspace:InsertContent(path.."heads/"..newVal.Value) + if newPart[1] then + if newPart[1].className == "SpecialMesh" or newPart[1].className == "CylinderMesh" or newPart[1].className == "BlockMesh" then + newWaitForChild(charparts[1],"Mesh"):remove() + newPart[1].Parent = charparts[1] + else + newPart[1]:remove() + end + end + end) + elseif (customtype == 8) then + pcall(function() + local newHat = game.Workspace:InsertContent(path.."hats/"..newVal.Value) + if newHat[1] then + if newHat[1].className == "Hat" then + newHat[1].Parent = newChar + else + newHat[1]:remove() + end + end + end) + + pcall(function() + local newItem = game.Workspace:InsertContent(path.."custom/"..newVal.Value) + if newItem[1] then + if newItem[1].className == "Decal" then + newWaitForChild(charparts[1],"face"):remove() + newItem[1].Parent = charparts[1] + newItem[1].Face = "Front" + elseif newPart[1].className == "SpecialMesh" or newPart[1].className == "CylinderMesh" or newPart[1].className == "BlockMesh" then + newWaitForChild(charparts[1],"Mesh"):remove() + newItem[1].Parent = charparts[1] + else + newItem[1].Parent = newChar + end + end + end) + end + end +end + +function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + local newCharApp = Instance.new("IntValue",Player) + newCharApp.Name = "Appearance" + --BODY COLORS + for i=1,6,1 do + local BodyColor = Instance.new("BrickColorValue",newCharApp) + if (i == 1) then + if (HeadColorID ~= nil) then + BodyColor.Value = BrickColor.new(HeadColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Head Color" + elseif (i == 2) then + if (TorsoColorID ~= nil) then + BodyColor.Value = BrickColor.new(TorsoColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Torso Color" + elseif (i == 3) then + if (LeftArmColorID ~= nil) then + BodyColor.Value = BrickColor.new(LeftArmColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Left Arm Color" + elseif (i == 4) then + if (RightArmColorID ~= nil) then + BodyColor.Value = BrickColor.new(RightArmColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Right Arm Color" + elseif (i == 5) then + if (LeftLegColorID ~= nil) then + BodyColor.Value = BrickColor.new(LeftLegColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Left Leg Color" + elseif (i == 6) then + if (RightLegColorID ~= nil) then + BodyColor.Value = BrickColor.new(RightLegColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Right Leg Color" + end + local indexValue = Instance.new("NumberValue") + indexValue.Name = "ColorIndex" + indexValue.Parent = BodyColor + indexValue.Value = i + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = BodyColor + typeValue.Value = 1 + end + --HATS + for i=1,3,1 do + local newHat = Instance.new("StringValue",newCharApp) + if (i == 1) then + if (Hat1ID ~= nil) then + newHat.Value = Hat1ID + newHat.Name = "Hat 1 - "..Hat1ID + else + newHat.Value = "NoHat.rbxm" + newHat.Name = "Hat 1 - NoHat.rbxm" + end + elseif (i == 2) then + if (Hat2ID ~= nil) then + newHat.Value = Hat2ID + newHat.Name = "Hat 2 - "..Hat2ID + else + newHat.Value = "NoHat.rbxm" + newHat.Name = "Hat 2 - NoHat.rbxm" + end + elseif (i == 3) then + if (Hat3ID ~= nil) then + newHat.Value = Hat3ID + newHat.Name = "Hat 3 - "..Hat3ID + else + newHat.Value = "NoHat.rbxm" + newHat.Name = "Hat 3 - NoHat.rbxm" + end + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newHat + typeValue.Value = 2 + end + --T-SHIRT + local newTShirt = Instance.new("StringValue",newCharApp) + if (TShirtID ~= nil) then + newTShirt.Value = TShirtID + newTShirt.Name = "T-Shirt - "..TShirtID + else + newTShirt.Value = "NoTShirt.rbxm" + newTShirt.Name = "T-Shirt - NoTShirt.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newTShirt + typeValue.Value = 3 + --SHIRT + local newShirt = Instance.new("StringValue",newCharApp) + if (ShirtID ~= nil) then + newShirt.Value = ShirtID + newShirt.Name = "Shirt - "..ShirtID + else + newShirt.Value = "NoShirt.rbxm" + newShirt.Name = "Shirt - NoShirt.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newShirt + typeValue.Value = 4 + --PANTS + local newPants = Instance.new("StringValue",newCharApp) + if (PantsID ~= nil) then + newPants.Value = PantsID + newPants.Name = "Pants - "..PantsID + else + newPants.Value = "NoPants.rbxm" + newPants.Name = "Pants - NoPants.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newPants + typeValue.Value = 5 + --FACE + local newFace = Instance.new("StringValue",newCharApp) + if (FaceID ~= nil) then + newFace.Value = FaceID + newFace.Name = "Face - "..FaceID + else + newFace.Value = "DefaultFace.rbxm" + newFace.Name = "Face - DefaultFace.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newFace + typeValue.Value = 6 + --HEADS + local newHead = Instance.new("StringValue",newCharApp) + if (HeadID ~= nil) then + newHead.Value = HeadID + newHead.Name = "Head - "..HeadID + else + newHead.Value = "DefaultHead.rbxm" + newHead.Name = "Head - DefaultHead.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newHead + typeValue.Value = 7 + --EXTRA + local newItem = Instance.new("StringValue",newCharApp) + if (ItemID ~= nil) then + newItem.Value = ItemID + newItem.Name = "Extra - "..ItemID + else + newItem.Value = "NoExtra.rbxm" + newItem.Name = "Extra - NoExtra.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newItem + typeValue.Value = 8 +end + +function LoadSecurity(playerApp,Player,ServerSecurityLocation) + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (playerApp == nil) then + kick() + end + + if (not Player:FindFirstChild("Security")) then + kick() + end + + if (not playerApp:FindFirstChild("ClientEXEMD5") or not playerApp:FindFirstChild("LauncherMD5") or not playerApp:FindFirstChild("ClientScriptMD5")) then + kick() + end + + for _,newVal in pairs(playerApp:GetChildren()) do + if (newVal.Name == "ClientEXEMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value or newVal.Value == "") then + kick() + break + end + end + + if (newVal.Name == "LauncherMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value or newVal.Value == "") then + kick() + break + end + end + + if (newVal.Name == "ClientScriptMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value or newVal.Value == "") then + kick() + break + end + end + end +end + +function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + Location = Instance.new("IntValue", Location) + Location.Name = "Security" + + local clientValue = Instance.new("StringValue", Location) + clientValue.Value = ClientEXEMD5 or "" + clientValue.Name = "ClientEXEMD5" + + local launcherValue = Instance.new("StringValue", Location) + launcherValue.Value = LauncherMD5 or "" + launcherValue.Name = "LauncherMD5" + + local scriptValue = Instance.new("StringValue", Location) + scriptValue.Value = ClientScriptMD5 or "" + scriptValue.Name = "ClientScriptMD5" +end + +function InitalizeTripcode(Location,Tripcode) + local code = Instance.new("StringValue", Location) + code.Value = Tripcode or "" + code.Name = "Tripcode" +end + +function LoadTripcode(Player) + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (not Player:FindFirstChild("Tripcode")) then + kick() + end + + for _,newVal in pairs(Player:GetChildren()) do + if (newVal.Name == "Tripcode") then + if (newVal.Value == "") then + kick() + break + end + end + end +end + +function InitalizeClientName(Location) + local newName = Instance.new("StringValue",Location) + newName.Value = "2009L" + newName.Name = "Name" +end + +rbxversion = version() +print("ROBLOX Client version '" .. rbxversion .. "' loaded.") + +function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + assert((type(Port)~="number" or tonumber(Port)~=nil or Port==nil),"CSRun Error: Port must be nil or a number.") + local NetworkServer=game:GetService("NetworkServer") + local RunService = game:GetService("RunService") + local PlayerService = game:GetService("Players") + pcall(NetworkServer.Stop,NetworkServer) + NetworkServer:Start(Port) + PlayerService.MaxPlayers = PlayerLimit + PlayerService.PlayerAdded:connect(function(Player) + if (PlayerService.NumPlayers > PlayerService.MaxPlayers) then + KickPlayer(Player, "Too many players on server.") + else + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added") + Player:LoadCharacter() + end + + Player.CharacterAdded:connect(function(char) + LoadSecurity(newWaitForChildSecurity(Player,"Security"),Player,game.Lighting) + newWaitForChildSecurity(Player,"Tripcode") + LoadTripcode(Player) + pcall(function() print("Player '" .. Player.Name .. "-" .. Player.userId .. "' security check success. Tripcode: '" .. Player.Tripcode.Value .. "'") end) + if (char ~= nil) then + LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),char) + end + + -- rename all Server replicators in NetworkServer to "ServerReplicator" + for _,Child in pairs(NetworkServer:GetChildren()) do + Child.Name = "ServerReplicator" + end + end) + + Player.Changed:connect(function(Property) + if (Property=="Character") and (Player.Character~=nil) then + local Character=Player.Character + local Humanoid=Character:FindFirstChild("Humanoid") + if (Humanoid~=nil) then + Humanoid.Died:connect(function() delay(5,function() Player:LoadCharacter() LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) end) end) + end + end + end) + + Player.Chatted:connect(function(msg) + print(Player.Name.."; "..msg) + end) + end) + PlayerService.PlayerRemoving:connect(function(Player) + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving") + end) + RunService:Run() + game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") + InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + InitalizeClientName(game.Lighting) + pcall(function() game.Close:connect(function() NetworkServer:Stop() end) end) + NetworkServer.IncommingConnection:connect(IncommingConnection) +end + +function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Tripcode,Ticket) + pcall(function() game:SetPlaceID(-1, false) end) + pcall(function() game:GetService("Players"):SetChatStyle(Enum.ChatStyle.ClassicAndBubble) end) + + pcall(function() + game:GetService("GuiService").Changed:connect(function() + pcall(function() game:GetService("GuiService").ShowLegacyPlayerList=true end) + pcall(function() game.CoreGui.RobloxGui.PlayerListScript:Remove() end) + pcall(function() game.CoreGui.RobloxGui.PlayerListTopRightFrame:Remove() end) + pcall(function() game.CoreGui.RobloxGui.BigPlayerListWindowImposter:Remove() end) + pcall(function() game.CoreGui.RobloxGui.BigPlayerlist:Remove() end) + end) + end) + game:GetService("RunService"):Run() + assert((ServerIP~=nil and ServerPort~=nil),"CSConnect Error: ServerIP and ServerPort must be defined.") + local function SetMessage(Message) game:SetMessage(Message) end + local Visit,NetworkClient,PlayerSuccess,Player,ConnectionFailedHook=game:GetService("Visit"),game:GetService("NetworkClient") + + local function GetClassCount(Class,Parent) + local Objects=Parent:GetChildren() + local Number=0 + for Index,Object in pairs(Objects) do + if (Object.className==Class) then + Number=Number+1 + end + Number=Number+GetClassCount(Class,Object) + end + return Number + end + + local function RequestCharacter(Replicator) + local Connection + Connection=Player.Changed:connect(function(Property) + if (Property=="Character") then + game:ClearMessage() + end + end) + SetMessage("Requesting character...") + Replicator:RequestCharacter() + SetMessage("Waiting for character...") + end + + local function Disconnection(Peer,LostConnection) + SetMessage("You have lost connection to the game") + end + + local function ConnectionAccepted(Peer,Replicator) + Replicator.Disconnection:connect(Disconnection) + local RequestingMarker=true + game:SetMessageBrickCount() + local Marker=Replicator:SendMarker() + Marker.Received:connect(function() + RequestingMarker=false + RequestCharacter(Replicator) + end) + while RequestingMarker do + Workspace:ZoomToExtents() + wait(0.5) + end + end + + local function ConnectionFailed(Peer, Code, why) + SetMessage("Failed to connect to the Game. (ID="..Code.." ["..why.."])") + end + + pcall(function() settings().Diagnostics:LegacyScriptMode() end) + pcall(function() game:SetRemoteBuildMode(true) end) + SetMessage("Connecting to server...") + NetworkClient.ConnectionAccepted:connect(ConnectionAccepted) + ConnectionFailedHook=NetworkClient.ConnectionFailed:connect(ConnectionFailed) + NetworkClient.ConnectionRejected:connect(function() + pcall(function() ConnectionFailedHook:disconnect() end) + SetMessage("Failed to connect to the Game. (Connection rejected)") + end) + + pcall(function() NetworkClient.Ticket=Ticket or "" end) -- 2008 client has no ticket :O + PlayerSuccess,Player=pcall(function() return NetworkClient:PlayerConnect(UserID,ServerIP,ServerPort) end) + + if (not PlayerSuccess) then + SetMessage("Failed to connect to the Game. (Invalid IP Address)") + NetworkClient:Disconnect() + end + + if (not PlayerSuccess) then + local Error,Message=pcall(function() + Player=game:GetService("Players"):CreateLocalPlayer(UserID) + NetworkClient:Connect(ServerIP,ServerPort) + end) + if (not Error) then + SetMessage("Failed to connect to the Game.") + end + end + + pcall(function() Player.Name=PlayerName or "" end) + InitalizeSecurityValues(Player,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + InitalizeTripcode(Player,Tripcode) + pcall(function() Player:SetUnder13(false) end) + pcall(function() Player:SetMembershipType(Enum.MembershipType.BuildersClub) end) + pcall(function() Player:SetAccountAge(365) end) + Player:SetSuperSafeChat(false) + Player.CharacterAppearance=0 + game.GuiRoot.MainMenu["Tools"]:Remove() + game.GuiRoot.MainMenu["Insert"]:Remove() + pcall(function() Visit:SetUploadUrl("") end) + game:GetService("Visit") +end + +function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + local plr = game.Players:CreateLocalPlayer(UserID) + game:GetService("RunService"):Run() + game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") + plr.Name = PlayerName + plr:LoadCharacter() + plr.CharacterAppearance=0 + InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + game:GetService("Visit") + while true do wait() + if (plr.Character.Humanoid.Health == 0) then + wait(5) + plr:LoadCharacter() + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + end + end +end + +function CSStudio() +end + +_G.CSServer=CSServer +_G.CSConnect=CSConnect +_G.CSSolo=CSSolo +_G.CSStudio=CSStudio \ No newline at end of file diff --git a/scripts/2010L/CSMPFunctions.lua b/scripts/2010L/CSMPFunctions.lua new file mode 100644 index 0000000..493794e --- /dev/null +++ b/scripts/2010L/CSMPFunctions.lua @@ -0,0 +1,684 @@ +settings().Rendering.FrameRateManager = 2 +settings().Network.DataSendRate = 30 +settings().Network.PhysicsSendRate = 20 +settings().Network.ReceiveRate = 60 +settings().Network.NetworkOwnerRate = 30 +pcall(function() game:GetService("ScriptContext").ScriptsDisabled = false end) + +--function made by rbxbanland +function newWaitForChild(newParent,name) + local returnable = nil + if newParent:FindFirstChild(name) then + returnable = newParent:FindFirstChild(name) + else + repeat wait() returnable = newParent:FindFirstChild(name) until returnable ~= nil + end + return returnable +end + +function KickPlayer(Player,reason) + if (Player ~= nil) then + local message = Instance.new("Message") + message.Text = "You were kicked. Reason: "..reason + message.Parent = Player + wait(2) + Player:remove() + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: "..reason) + end +end + +function newWaitForChildSecurity(newParent,name) + local returnable = nil + local loadAttempts = 0 + local maxAttempts = 5 + while loadAttempts < maxAttempts do + if newParent:FindFirstChild(name) then + returnable = newParent:FindFirstChild(name) + break + end + wait() + loadAttempts = loadAttempts + 1 + print("Player '" .. newParent.Name .. "' trying to connect. Number of attempts: "..loadAttempts) + end + + if (loadAttempts == maxAttempts) then + KickPlayer(newParent, "Modified Client") + end + + return returnable +end + +function LoadCharacterNew(playerApp,newChar) + PlayerService = game:GetService("Players") + Player = PlayerService:GetPlayerFromCharacter(newChar) + + wait(0.65) + + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (playerApp == nil) then + kick() + end + + if (not Player:FindFirstChild("Appearance")) then + kick() + end + + if ((playerApp:GetChildren() == 0) or (playerApp:GetChildren() == nil)) then + kick() + end + + local path = "rbxasset://../../../shareddata/charcustom/" + + local charparts = {[1] = newWaitForChild(newChar,"Head"),[2] = newWaitForChild(newChar,"Torso"),[3] = newWaitForChild(newChar,"Left Arm"),[4] = newWaitForChild(newChar,"Right Arm"),[5] = newWaitForChild(newChar,"Left Leg"),[6] = newWaitForChild(newChar,"Right Leg")} + for _,newVal in pairs(playerApp:GetChildren()) do + local customtype = newVal.CustomizationType.Value + if (customtype == 1) then + pcall(function() + charparts[newVal.ColorIndex.Value].BrickColor = newVal.Value + end) + elseif (customtype == 2) then + pcall(function() + local newHat = game.Workspace:InsertContent(path.."hats/"..newVal.Value) + if newHat[1] then + if newHat[1].className == "Hat" then + newHat[1].Parent = newChar + else + newHat[1]:remove() + end + end + end) + elseif (customtype == 3) then + pcall(function() + local newTShirt = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newTShirt = Instance.new("ShirtGraphic") + newTShirt.Graphic = newVal.Value + newTShirt.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newTShirt = game.Workspace:InsertContent(newVal.Value) + if newTShirt[1] then + if newTShirt[1].className == "ShirtGraphic" then + newTShirt[1].Parent = newChar + else + newTShirt[1]:remove() + end + end + else + newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value) + if newTShirt[1] then + if newTShirt[1].className == "ShirtGraphic" then + newTShirt[1].Parent = newChar + else + newTShirt[1]:remove() + end + end + end + end) + elseif (customtype == 4) then + pcall(function() + local newShirt = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newShirt = Instance.new("Shirt") + newShirt.ShirtTemplate = newVal.Value + newShirt.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newShirt = game.Workspace:InsertContent(newVal.Value) + if newShirt[1] then + if newShirt[1].className == "Shirt" then + newShirt[1].Parent = newChar + else + newShirt[1]:remove() + end + end + else + newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value) + if newShirt[1] then + if newShirt[1].className == "Shirt" then + newShirt[1].Parent = newChar + else + newShirt[1]:remove() + end + end + end + end) + elseif (customtype == 5) then + pcall(function() + local newPants = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newPants = Instance.new("Pants") + newPants.PantsTemplate = newVal.Value + newPants.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newPants = game.Workspace:InsertContent(newVal.Value) + if newPants[1] then + if newPants[1].className == "Pants" then + newPants[1].Parent = newChar + else + newPants[1]:remove() + end + end + else + newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value) + if newPants[1] then + if newPants[1].className == "Pants" then + newPants[1].Parent = newChar + else + newPants[1]:remove() + end + end + end + end) + elseif (customtype == 6) then + pcall(function() + local newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value) + if newFace[1] then + if newFace[1].className == "Decal" then + newWaitForChild(charparts[1],"face"):remove() + newFace[1].Parent = charparts[1] + newFace[1].Face = "Front" + else + newFace[1]:remove() + end + end + end) + elseif (customtype == 7) then + pcall(function() + local newPart = game.Workspace:InsertContent(path.."heads/"..newVal.Value) + if newPart[1] then + if newPart[1].className == "SpecialMesh" or newPart[1].className == "CylinderMesh" or newPart[1].className == "BlockMesh" then + newWaitForChild(charparts[1],"Mesh"):remove() + newPart[1].Parent = charparts[1] + else + newPart[1]:remove() + end + end + end) + elseif (customtype == 8) then + pcall(function() + local newHat = game.Workspace:InsertContent(path.."hats/"..newVal.Value) + if newHat[1] then + if newHat[1].className == "Hat" then + newHat[1].Parent = newChar + else + newHat[1]:remove() + end + end + end) + + pcall(function() + local newItem = game.Workspace:InsertContent(path.."custom/"..newVal.Value) + if newItem[1] then + if newItem[1].className == "Decal" then + newWaitForChild(charparts[1],"face"):remove() + newItem[1].Parent = charparts[1] + newItem[1].Face = "Front" + elseif newPart[1].className == "SpecialMesh" or newPart[1].className == "CylinderMesh" or newPart[1].className == "BlockMesh" then + newWaitForChild(charparts[1],"Mesh"):remove() + newItem[1].Parent = charparts[1] + else + newItem[1].Parent = newChar + end + end + end) + end + end +end + +function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + local newCharApp = Instance.new("IntValue",Player) + newCharApp.Name = "Appearance" + --BODY COLORS + for i=1,6,1 do + local BodyColor = Instance.new("BrickColorValue",newCharApp) + if (i == 1) then + if (HeadColorID ~= nil) then + BodyColor.Value = BrickColor.new(HeadColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Head Color" + elseif (i == 2) then + if (TorsoColorID ~= nil) then + BodyColor.Value = BrickColor.new(TorsoColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Torso Color" + elseif (i == 3) then + if (LeftArmColorID ~= nil) then + BodyColor.Value = BrickColor.new(LeftArmColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Left Arm Color" + elseif (i == 4) then + if (RightArmColorID ~= nil) then + BodyColor.Value = BrickColor.new(RightArmColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Right Arm Color" + elseif (i == 5) then + if (LeftLegColorID ~= nil) then + BodyColor.Value = BrickColor.new(LeftLegColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Left Leg Color" + elseif (i == 6) then + if (RightLegColorID ~= nil) then + BodyColor.Value = BrickColor.new(RightLegColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Right Leg Color" + end + local indexValue = Instance.new("NumberValue") + indexValue.Name = "ColorIndex" + indexValue.Parent = BodyColor + indexValue.Value = i + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = BodyColor + typeValue.Value = 1 + end + --HATS + for i=1,3,1 do + local newHat = Instance.new("StringValue",newCharApp) + if (i == 1) then + if (Hat1ID ~= nil) then + newHat.Value = Hat1ID + newHat.Name = "Hat 1 - "..Hat1ID + else + newHat.Value = "NoHat.rbxm" + newHat.Name = "Hat 1 - NoHat.rbxm" + end + elseif (i == 2) then + if (Hat2ID ~= nil) then + newHat.Value = Hat2ID + newHat.Name = "Hat 2 - "..Hat2ID + else + newHat.Value = "NoHat.rbxm" + newHat.Name = "Hat 2 - NoHat.rbxm" + end + elseif (i == 3) then + if (Hat3ID ~= nil) then + newHat.Value = Hat3ID + newHat.Name = "Hat 3 - "..Hat3ID + else + newHat.Value = "NoHat.rbxm" + newHat.Name = "Hat 3 - NoHat.rbxm" + end + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newHat + typeValue.Value = 2 + end + --T-SHIRT + local newTShirt = Instance.new("StringValue",newCharApp) + if (TShirtID ~= nil) then + newTShirt.Value = TShirtID + newTShirt.Name = "T-Shirt - "..TShirtID + else + newTShirt.Value = "NoTShirt.rbxm" + newTShirt.Name = "T-Shirt - NoTShirt.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newTShirt + typeValue.Value = 3 + --SHIRT + local newShirt = Instance.new("StringValue",newCharApp) + if (ShirtID ~= nil) then + newShirt.Value = ShirtID + newShirt.Name = "Shirt - "..ShirtID + else + newShirt.Value = "NoShirt.rbxm" + newShirt.Name = "Shirt - NoShirt.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newShirt + typeValue.Value = 4 + --PANTS + local newPants = Instance.new("StringValue",newCharApp) + if (PantsID ~= nil) then + newPants.Value = PantsID + newPants.Name = "Pants - "..PantsID + else + newPants.Value = "NoPants.rbxm" + newPants.Name = "Pants - NoPants.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newPants + typeValue.Value = 5 + --FACE + local newFace = Instance.new("StringValue",newCharApp) + if (FaceID ~= nil) then + newFace.Value = FaceID + newFace.Name = "Face - "..FaceID + else + newFace.Value = "DefaultFace.rbxm" + newFace.Name = "Face - DefaultFace.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newFace + typeValue.Value = 6 + --HEADS + local newHead = Instance.new("StringValue",newCharApp) + if (HeadID ~= nil) then + newHead.Value = HeadID + newHead.Name = "Head - "..HeadID + else + newHead.Value = "DefaultHead.rbxm" + newHead.Name = "Head - DefaultHead.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newHead + typeValue.Value = 7 + --EXTRA + local newItem = Instance.new("StringValue",newCharApp) + if (ItemID ~= nil) then + newItem.Value = ItemID + newItem.Name = "Extra - "..ItemID + else + newItem.Value = "NoExtra.rbxm" + newItem.Name = "Extra - NoExtra.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newItem + typeValue.Value = 8 +end + +function LoadSecurity(playerApp,Player,ServerSecurityLocation) + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (playerApp == nil) then + kick() + end + + if (not Player:FindFirstChild("Security")) then + kick() + end + + if (not playerApp:FindFirstChild("ClientEXEMD5") or not playerApp:FindFirstChild("LauncherMD5") or not playerApp:FindFirstChild("ClientScriptMD5")) then + kick() + end + + for _,newVal in pairs(playerApp:GetChildren()) do + if (newVal.Name == "ClientEXEMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value or newVal.Value == "") then + kick() + break + end + end + + if (newVal.Name == "LauncherMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value or newVal.Value == "") then + kick() + break + end + end + + if (newVal.Name == "ClientScriptMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value or newVal.Value == "") then + kick() + break + end + end + end +end + +function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + Location = Instance.new("IntValue", Location) + Location.Name = "Security" + + local clientValue = Instance.new("StringValue", Location) + clientValue.Value = ClientEXEMD5 or "" + clientValue.Name = "ClientEXEMD5" + + local launcherValue = Instance.new("StringValue", Location) + launcherValue.Value = LauncherMD5 or "" + launcherValue.Name = "LauncherMD5" + + local scriptValue = Instance.new("StringValue", Location) + scriptValue.Value = ClientScriptMD5 or "" + scriptValue.Name = "ClientScriptMD5" +end + +function InitalizeTripcode(Location,Tripcode) + local code = Instance.new("StringValue", Location) + code.Value = Tripcode or "" + code.Name = "Tripcode" +end + +function LoadTripcode(Player) + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (not Player:FindFirstChild("Tripcode")) then + kick() + end + + for _,newVal in pairs(Player:GetChildren()) do + if (newVal.Name == "Tripcode") then + if (newVal.Value == "") then + kick() + break + end + end + end +end + +function InitalizeClientName(Location) + local newName = Instance.new("StringValue",Location) + newName.Value = "2010L" + newName.Name = "Name" +end + +rbxversion = version() +print("ROBLOX Client version '" .. rbxversion .. "' loaded.") + +function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + assert((type(Port)~="number" or tonumber(Port)~=nil or Port==nil),"CSRun Error: Port must be nil or a number.") + local NetworkServer=game:GetService("NetworkServer") + local RunService = game:GetService("RunService") + local PlayerService = game:GetService("Players") + pcall(NetworkServer.Stop,NetworkServer) + NetworkServer:Start(Port) + PlayerService.MaxPlayers = PlayerLimit + PlayerService.PlayerAdded:connect(function(Player) + if (PlayerService.NumPlayers > PlayerService.MaxPlayers) then + KickPlayer(Player, "Too many players on server.") + else + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added") + Player:LoadCharacter() + end + + Player.CharacterAdded:connect(function(char) + LoadSecurity(newWaitForChildSecurity(Player,"Security"),Player,game.Lighting) + newWaitForChildSecurity(Player,"Tripcode") + LoadTripcode(Player) + pcall(function() print("Player '" .. Player.Name .. "-" .. Player.userId .. "' security check success. Tripcode: '" .. Player.Tripcode.Value .. "'") end) + if (char ~= nil) then + LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),char) + end + + -- rename all Server replicators in NetworkServer to "ServerReplicator" + for _,Child in pairs(NetworkServer:GetChildren()) do + Child.Name = "ServerReplicator" + end + end) + + Player.Changed:connect(function(Property) + if (Property=="Character") and (Player.Character~=nil) then + local Character=Player.Character + local Humanoid=Character:FindFirstChild("Humanoid") + if (Humanoid~=nil) then + Humanoid.Died:connect(function() delay(5,function() Player:LoadCharacter() LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) end) end) + end + end + end) + + Player.Chatted:connect(function(msg) + print(Player.Name.."; "..msg) + end) + end) + PlayerService.PlayerRemoving:connect(function(Player) + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving") + end) + RunService:Run() + game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") + InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + InitalizeClientName(game.Lighting) + pcall(function() game.Close:connect(function() NetworkServer:Stop() end) end) + NetworkServer.IncommingConnection:connect(IncommingConnection) +end + +function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Tripcode,Ticket) + pcall(function() game:SetPlaceID(-1, false) end) + pcall(function() game:GetService("Players"):SetChatStyle(Enum.ChatStyle.ClassicAndBubble) end) + + pcall(function() + game:GetService("GuiService").Changed:connect(function() + pcall(function() game:GetService("GuiService").ShowLegacyPlayerList=true end) + pcall(function() game.CoreGui.RobloxGui.PlayerListScript:Remove() end) + pcall(function() game.CoreGui.RobloxGui.PlayerListTopRightFrame:Remove() end) + pcall(function() game.CoreGui.RobloxGui.BigPlayerListWindowImposter:Remove() end) + pcall(function() game.CoreGui.RobloxGui.BigPlayerlist:Remove() end) + end) + end) + game:GetService("RunService"):Run() + assert((ServerIP~=nil and ServerPort~=nil),"CSConnect Error: ServerIP and ServerPort must be defined.") + local function SetMessage(Message) game:SetMessage(Message) end + local Visit,NetworkClient,PlayerSuccess,Player,ConnectionFailedHook=game:GetService("Visit"),game:GetService("NetworkClient") + + local function GetClassCount(Class,Parent) + local Objects=Parent:GetChildren() + local Number=0 + for Index,Object in pairs(Objects) do + if (Object.className==Class) then + Number=Number+1 + end + Number=Number+GetClassCount(Class,Object) + end + return Number + end + + local function RequestCharacter(Replicator) + local Connection + Connection=Player.Changed:connect(function(Property) + if (Property=="Character") then + game:ClearMessage() + end + end) + SetMessage("Requesting character...") + Replicator:RequestCharacter() + SetMessage("Waiting for character...") + end + + local function Disconnection(Peer,LostConnection) + SetMessage("You have lost connection to the game") + end + + local function ConnectionAccepted(Peer,Replicator) + Replicator.Disconnection:connect(Disconnection) + local RequestingMarker=true + game:SetMessageBrickCount() + local Marker=Replicator:SendMarker() + Marker.Received:connect(function() + RequestingMarker=false + RequestCharacter(Replicator) + end) + while RequestingMarker do + Workspace:ZoomToExtents() + wait(0.5) + end + end + + local function ConnectionFailed(Peer, Code, why) + SetMessage("Failed to connect to the Game. (ID="..Code.." ["..why.."])") + end + + pcall(function() settings().Diagnostics:LegacyScriptMode() end) + pcall(function() game:SetRemoteBuildMode(true) end) + SetMessage("Connecting to server...") + NetworkClient.ConnectionAccepted:connect(ConnectionAccepted) + ConnectionFailedHook=NetworkClient.ConnectionFailed:connect(ConnectionFailed) + NetworkClient.ConnectionRejected:connect(function() + pcall(function() ConnectionFailedHook:disconnect() end) + SetMessage("Failed to connect to the Game. (Connection rejected)") + end) + + pcall(function() NetworkClient.Ticket=Ticket or "" end) -- 2008 client has no ticket :O + PlayerSuccess,Player=pcall(function() return NetworkClient:PlayerConnect(UserID,ServerIP,ServerPort) end) + + if (not PlayerSuccess) then + SetMessage("Failed to connect to the Game. (Invalid IP Address)") + NetworkClient:Disconnect() + end + + if (not PlayerSuccess) then + local Error,Message=pcall(function() + Player=game:GetService("Players"):CreateLocalPlayer(UserID) + NetworkClient:Connect(ServerIP,ServerPort) + end) + if (not Error) then + SetMessage("Failed to connect to the Game.") + end + end + + pcall(function() Player.Name=PlayerName or "" end) + InitalizeSecurityValues(Player,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + InitalizeTripcode(Player,Tripcode) + pcall(function() Player:SetUnder13(false) end) + pcall(function() Player:SetMembershipType(Enum.MembershipType.BuildersClub) end) + pcall(function() Player:SetAccountAge(365) end) + Player:SetSuperSafeChat(false) + Player.CharacterAppearance=0 + game.GuiRoot.MainMenu["Tools"]:Remove() + game.GuiRoot.MainMenu["Insert"]:Remove() + pcall(function() Visit:SetUploadUrl("") end) + game:GetService("Visit") +end + +function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + local plr = game.Players:CreateLocalPlayer(UserID) + game:GetService("RunService"):Run() + plr.Name = PlayerName + plr:LoadCharacter() + plr.CharacterAppearance=0 + InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") + newWaitForChild(game.StarterGui, "Health") + game.StarterGui.Health:clone().Parent = plr.PlayerGui + game:GetService("Visit") + while true do wait() + if (plr.Character.Humanoid.Health == 0) then + wait(5) + plr:LoadCharacter() + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + end + end +end + +function CSStudio() +end + +_G.CSServer=CSServer +_G.CSConnect=CSConnect +_G.CSSolo=CSSolo +_G.CSStudio=CSStudio \ No newline at end of file diff --git a/scripts/2011E/CSMPFunctions.lua b/scripts/2011E/CSMPFunctions.lua new file mode 100644 index 0000000..e1284de --- /dev/null +++ b/scripts/2011E/CSMPFunctions.lua @@ -0,0 +1,715 @@ +settings().Rendering.FrameRateManager = 2 +settings().Network.DataSendRate = 30 +settings().Network.PhysicsSendRate = 20 +settings().Network.ReceiveRate = 60 +settings().Network.NetworkOwnerRate = 30 + +game:GetService("CoreGui").DescendantAdded:connect(function(Child) + if (Child:IsA("BaseScript")) and (Child.Name~="SubMenuBuilder") and (Child.Name~="ToolTipper") and (Child.Name~="MainBotChatScript") then + Child:Remove() + end +end) + +coroutine.resume(coroutine.create(function() + while not game:GetService("CoreGui"):FindFirstChild("RobloxGui") do game:GetService("CoreGui").ChildAdded:wait() end + game:GetService("CoreGui").RobloxGui.TopLeftControl:Remove() +end)) + +coroutine.resume(coroutine.create(function() + loadstring('\108\111\99\97\108\32\67\111\114\101\71\117\105\32\61\32\103\97\109\101\58\71\101\116\83\101\114\118\105\99\101\40\34\67\111\114\101\71\117\105\34\41\59\10\119\104\105\108\101\32\110\111\116\32\67\111\114\101\71\117\105\58\70\105\110\100\70\105\114\115\116\67\104\105\108\100\40\34\82\111\98\108\111\120\71\117\105\34\41\32\100\111\10\9\67\111\114\101\71\117\105\46\67\104\105\108\100\65\100\100\101\100\58\119\97\105\116\40\41\59\10\101\110\100\10\108\111\99\97\108\32\82\111\98\108\111\120\71\117\105\32\61\32\67\111\114\101\71\117\105\46\82\111\98\108\111\120\71\117\105\59\10\108\111\99\97\108\32\66\111\116\116\111\109\76\101\102\116\67\111\110\116\114\111\108\32\61\32\82\111\98\108\111\120\71\117\105\58\70\105\110\100\70\105\114\115\116\67\104\105\108\100\40\34\66\111\116\116\111\109\76\101\102\116\67\111\110\116\114\111\108\34\41\10\108\111\99\97\108\32\66\111\116\116\111\109\82\105\103\104\116\67\111\110\116\114\111\108\32\61\32\82\111\98\108\111\120\71\117\105\58\70\105\110\100\70\105\114\115\116\67\104\105\108\100\40\34\66\111\116\116\111\109\82\105\103\104\116\67\111\110\116\114\111\108\34\41\10\108\111\99\97\108\32\84\111\112\76\101\102\116\67\111\110\116\114\111\108\32\61\32\82\111\98\108\111\120\71\117\105\58\70\105\110\100\70\105\114\115\116\67\104\105\108\100\40\34\84\111\112\76\101\102\116\67\111\110\116\114\111\108\34\41\10\108\111\99\97\108\32\66\117\105\108\100\84\111\111\108\115\32\61\32\82\111\98\108\111\120\71\117\105\58\70\105\110\100\70\105\114\115\116\67\104\105\108\100\40\34\66\117\105\108\100\84\111\111\108\115\34\41\10\102\117\110\99\116\105\111\110\32\109\97\107\101\89\82\101\108\97\116\105\118\101\40\41\10\66\111\116\116\111\109\76\101\102\116\67\111\110\116\114\111\108\46\83\105\122\101\67\111\110\115\116\114\97\105\110\116\32\61\32\50\10\66\111\116\116\111\109\82\105\103\104\116\67\111\110\116\114\111\108\46\83\105\122\101\67\111\110\115\116\114\97\105\110\116\32\61\32\50\10\105\102\32\84\111\112\76\101\102\116\67\111\110\116\114\111\108\32\116\104\101\110\32\84\111\112\76\101\102\116\67\111\110\116\114\111\108\46\83\105\122\101\67\111\110\115\116\114\97\105\110\116\32\61\32\50\32\101\110\100\10\105\102\32\66\117\105\108\100\84\111\111\108\115\32\116\104\101\110\32\66\117\105\108\100\84\111\111\108\115\46\70\114\97\109\101\46\83\105\122\101\67\111\110\115\116\114\97\105\110\116\32\61\32\50\32\101\110\100\10\66\111\116\116\111\109\76\101\102\116\67\111\110\116\114\111\108\46\80\111\115\105\116\105\111\110\32\61\32\85\68\105\109\50\46\110\101\119\40\48\44\48\44\49\44\45\66\111\116\116\111\109\76\101\102\116\67\111\110\116\114\111\108\46\65\98\115\111\108\117\116\101\83\105\122\101\46\89\41\10\66\111\116\116\111\109\82\105\103\104\116\67\111\110\116\114\111\108\46\80\111\115\105\116\105\111\110\32\61\32\85\68\105\109\50\46\110\101\119\40\49\44\45\66\111\116\116\111\109\82\105\103\104\116\67\111\110\116\114\111\108\46\65\98\115\111\108\117\116\101\83\105\122\101\46\88\44\49\44\45\66\111\116\116\111\109\82\105\103\104\116\67\111\110\116\114\111\108\46\65\98\115\111\108\117\116\101\83\105\122\101\46\89\41\10\101\110\100\10\102\117\110\99\116\105\111\110\32\109\97\107\101\88\82\101\108\97\116\105\118\101\40\41\10\66\111\116\116\111\109\76\101\102\116\67\111\110\116\114\111\108\46\83\105\122\101\67\111\110\115\116\114\97\105\110\116\32\61\32\49\10\66\111\116\116\111\109\82\105\103\104\116\67\111\110\116\114\111\108\46\83\105\122\101\67\111\110\115\116\114\97\105\110\116\32\61\32\49\10\105\102\32\84\111\112\76\101\102\116\67\111\110\116\114\111\108\32\116\104\101\110\32\84\111\112\76\101\102\116\67\111\110\116\114\111\108\46\83\105\122\101\67\111\110\115\116\114\97\105\110\116\32\61\32\49\32\101\110\100\10\105\102\32\66\117\105\108\100\84\111\111\108\115\32\116\104\101\110\32\66\117\105\108\100\84\111\111\108\115\46\70\114\97\109\101\46\83\105\122\101\67\111\110\115\116\114\97\105\110\116\32\61\32\49\32\101\110\100\10\66\111\116\116\111\109\76\101\102\116\67\111\110\116\114\111\108\46\80\111\115\105\116\105\111\110\32\61\32\85\68\105\109\50\46\110\101\119\40\48\44\48\44\49\44\45\66\111\116\116\111\109\76\101\102\116\67\111\110\116\114\111\108\46\65\98\115\111\108\117\116\101\83\105\122\101\46\89\41\10\66\111\116\116\111\109\82\105\103\104\116\67\111\110\116\114\111\108\46\80\111\115\105\116\105\111\110\32\61\32\85\68\105\109\50\46\110\101\119\40\49\44\45\66\111\116\116\111\109\82\105\103\104\116\67\111\110\116\114\111\108\46\65\98\115\111\108\117\116\101\83\105\122\101\46\88\44\49\44\45\66\111\116\116\111\109\82\105\103\104\116\67\111\110\116\114\111\108\46\65\98\115\111\108\117\116\101\83\105\122\101\46\89\41\10\101\110\100\10\108\111\99\97\108\32\102\117\110\99\116\105\111\110\32\114\101\115\105\122\101\40\41\10\105\102\32\82\111\98\108\111\120\71\117\105\46\65\98\115\111\108\117\116\101\83\105\122\101\46\120\32\62\32\82\111\98\108\111\120\71\117\105\46\65\98\115\111\108\117\116\101\83\105\122\101\46\121\32\116\104\101\110\10\109\97\107\101\89\82\101\108\97\116\105\118\101\40\41\10\101\108\115\101\10\109\97\107\101\88\82\101\108\97\116\105\118\101\40\41\10\101\110\100\10\101\110\100\10\82\111\98\108\111\120\71\117\105\46\67\104\97\110\103\101\100\58\99\111\110\110\101\99\116\40\102\117\110\99\116\105\111\110\40\112\114\111\112\101\114\116\121\41\10\105\102\32\112\114\111\112\101\114\116\121\32\61\61\32\34\65\98\115\111\108\117\116\101\83\105\122\101\34\32\116\104\101\110\10\119\97\105\116\40\41\10\114\101\115\105\122\101\40\41\10\101\110\100\10\101\110\100\41\10\119\97\105\116\40\41\10\114\101\115\105\122\101\40\41\10')() +end)) + +pcall(function() game:GetService("ScriptContext").ScriptsDisabled = false end) + +--function made by rbxbanland +function newWaitForChild(newParent,name) + local returnable = nil + if newParent:FindFirstChild(name) then + returnable = newParent:FindFirstChild(name) + else + repeat wait() returnable = newParent:FindFirstChild(name) until returnable ~= nil + end + return returnable +end + +function KickPlayer(Player,reason) + if (Player ~= nil) then + local message = Instance.new("Message") + message.Text = "You were kicked. Reason: "..reason + message.Parent = Player + wait(2) + Player:remove() + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: "..reason) + end +end + +function newWaitForChildSecurity(newParent,name) + local returnable = nil + local loadAttempts = 0 + local maxAttempts = 5 + while loadAttempts < maxAttempts do + if newParent:FindFirstChild(name) then + returnable = newParent:FindFirstChild(name) + break + end + --for 2011+ to work the same way as other clients, we need to add half a second of wait time. + wait(0.5) + loadAttempts = loadAttempts + 1 + print("Player '" .. newParent.Name .. "' trying to connect. Number of attempts: "..loadAttempts) + end + + if (loadAttempts == maxAttempts) then + KickPlayer(newParent, "Modified Client") + end + + return returnable +end + +function LoadCharacterNew(playerApp,newChar) + PlayerService = game:GetService("Players") + Player = PlayerService:GetPlayerFromCharacter(newChar) + + wait(0.65) + + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (playerApp == nil) then + kick() + end + + if (not Player:FindFirstChild("Appearance")) then + kick() + end + + if ((playerApp:GetChildren() == 0) or (playerApp:GetChildren() == nil)) then + kick() + end + + local path = "rbxasset://../../../shareddata/charcustom/" + + local charparts = {[1] = newWaitForChild(newChar,"Head"),[2] = newWaitForChild(newChar,"Torso"),[3] = newWaitForChild(newChar,"Left Arm"),[4] = newWaitForChild(newChar,"Right Arm"),[5] = newWaitForChild(newChar,"Left Leg"),[6] = newWaitForChild(newChar,"Right Leg")} + for _,newVal in pairs(playerApp:GetChildren()) do + local customtype = newVal.CustomizationType.Value + if (customtype == 1) then + pcall(function() + charparts[newVal.ColorIndex.Value].BrickColor = newVal.Value + end) + elseif (customtype == 2) then + pcall(function() + local newHat = game.Workspace:InsertContent(path.."hats/"..newVal.Value) + if newHat[1] then + if newHat[1].className == "Hat" then + newHat[1].Parent = newChar + else + newHat[1]:remove() + end + end + end) + elseif (customtype == 3) then + pcall(function() + local newTShirt = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newTShirt = Instance.new("ShirtGraphic") + newTShirt.Graphic = newVal.Value + newTShirt.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newTShirt = game.Workspace:InsertContent(newVal.Value) + if newTShirt[1] then + if newTShirt[1].className == "ShirtGraphic" then + newTShirt[1].Parent = newChar + else + newTShirt[1]:remove() + end + end + else + newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value) + if newTShirt[1] then + if newTShirt[1].className == "ShirtGraphic" then + newTShirt[1].Parent = newChar + else + newTShirt[1]:remove() + end + end + end + end) + elseif (customtype == 4) then + pcall(function() + local newShirt = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newShirt = Instance.new("Shirt") + newShirt.ShirtTemplate = newVal.Value + newShirt.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newShirt = game.Workspace:InsertContent(newVal.Value) + if newShirt[1] then + if newShirt[1].className == "Shirt" then + newShirt[1].Parent = newChar + else + newShirt[1]:remove() + end + end + else + newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value) + if newShirt[1] then + if newShirt[1].className == "Shirt" then + newShirt[1].Parent = newChar + else + newShirt[1]:remove() + end + end + end + end) + elseif (customtype == 5) then + pcall(function() + local newPants = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newPants = Instance.new("Pants") + newPants.PantsTemplate = newVal.Value + newPants.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newPants = game.Workspace:InsertContent(newVal.Value) + if newPants[1] then + if newPants[1].className == "Pants" then + newPants[1].Parent = newChar + else + newPants[1]:remove() + end + end + else + newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value) + if newPants[1] then + if newPants[1].className == "Pants" then + newPants[1].Parent = newChar + else + newPants[1]:remove() + end + end + end + end) + elseif (customtype == 6) then + pcall(function() + local newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value) + if newFace[1] then + if newFace[1].className == "Decal" then + newWaitForChild(charparts[1],"face"):remove() + newFace[1].Parent = charparts[1] + newFace[1].Face = "Front" + else + newFace[1]:remove() + end + end + end) + elseif (customtype == 7) then + pcall(function() + local newPart = game.Workspace:InsertContent(path.."heads/"..newVal.Value) + if newPart[1] then + if newPart[1].className == "SpecialMesh" or newPart[1].className == "CylinderMesh" or newPart[1].className == "BlockMesh" then + newWaitForChild(charparts[1],"Mesh"):remove() + newPart[1].Parent = charparts[1] + else + newPart[1]:remove() + end + end + end) + elseif (customtype == 8) then + pcall(function() + local newHat = game.Workspace:InsertContent(path.."hats/"..newVal.Value) + if newHat[1] then + if newHat[1].className == "Hat" then + newHat[1].Parent = newChar + else + newHat[1]:remove() + end + end + end) + + pcall(function() + local newItem = game.Workspace:InsertContent(path.."custom/"..newVal.Value) + if newItem[1] then + if newItem[1].className == "Decal" then + newWaitForChild(charparts[1],"face"):remove() + newItem[1].Parent = charparts[1] + newItem[1].Face = "Front" + elseif newPart[1].className == "SpecialMesh" or newPart[1].className == "CylinderMesh" or newPart[1].className == "BlockMesh" then + newWaitForChild(charparts[1],"Mesh"):remove() + newItem[1].Parent = charparts[1] + else + newItem[1].Parent = newChar + end + end + end) + end + end +end + +function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + local newCharApp = Instance.new("IntValue",Player) + newCharApp.Name = "Appearance" + --BODY COLORS + for i=1,6,1 do + local BodyColor = Instance.new("BrickColorValue",newCharApp) + if (i == 1) then + if (HeadColorID ~= nil) then + BodyColor.Value = BrickColor.new(HeadColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Head Color" + elseif (i == 2) then + if (TorsoColorID ~= nil) then + BodyColor.Value = BrickColor.new(TorsoColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Torso Color" + elseif (i == 3) then + if (LeftArmColorID ~= nil) then + BodyColor.Value = BrickColor.new(LeftArmColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Left Arm Color" + elseif (i == 4) then + if (RightArmColorID ~= nil) then + BodyColor.Value = BrickColor.new(RightArmColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Right Arm Color" + elseif (i == 5) then + if (LeftLegColorID ~= nil) then + BodyColor.Value = BrickColor.new(LeftLegColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Left Leg Color" + elseif (i == 6) then + if (RightLegColorID ~= nil) then + BodyColor.Value = BrickColor.new(RightLegColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Right Leg Color" + end + local indexValue = Instance.new("NumberValue") + indexValue.Name = "ColorIndex" + indexValue.Parent = BodyColor + indexValue.Value = i + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = BodyColor + typeValue.Value = 1 + end + --HATS + for i=1,3,1 do + local newHat = Instance.new("StringValue",newCharApp) + if (i == 1) then + if (Hat1ID ~= nil) then + newHat.Value = Hat1ID + newHat.Name = "Hat 1 - "..Hat1ID + else + newHat.Value = "NoHat.rbxm" + newHat.Name = "Hat 1 - NoHat.rbxm" + end + elseif (i == 2) then + if (Hat2ID ~= nil) then + newHat.Value = Hat2ID + newHat.Name = "Hat 2 - "..Hat2ID + else + newHat.Value = "NoHat.rbxm" + newHat.Name = "Hat 2 - NoHat.rbxm" + end + elseif (i == 3) then + if (Hat3ID ~= nil) then + newHat.Value = Hat3ID + newHat.Name = "Hat 3 - "..Hat3ID + else + newHat.Value = "NoHat.rbxm" + newHat.Name = "Hat 3 - NoHat.rbxm" + end + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newHat + typeValue.Value = 2 + end + --T-SHIRT + local newTShirt = Instance.new("StringValue",newCharApp) + if (TShirtID ~= nil) then + newTShirt.Value = TShirtID + newTShirt.Name = "T-Shirt - "..TShirtID + else + newTShirt.Value = "NoTShirt.rbxm" + newTShirt.Name = "T-Shirt - NoTShirt.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newTShirt + typeValue.Value = 3 + --SHIRT + local newShirt = Instance.new("StringValue",newCharApp) + if (ShirtID ~= nil) then + newShirt.Value = ShirtID + newShirt.Name = "Shirt - "..ShirtID + else + newShirt.Value = "NoShirt.rbxm" + newShirt.Name = "Shirt - NoShirt.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newShirt + typeValue.Value = 4 + --PANTS + local newPants = Instance.new("StringValue",newCharApp) + if (PantsID ~= nil) then + newPants.Value = PantsID + newPants.Name = "Pants - "..PantsID + else + newPants.Value = "NoPants.rbxm" + newPants.Name = "Pants - NoPants.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newPants + typeValue.Value = 5 + --FACE + local newFace = Instance.new("StringValue",newCharApp) + if (FaceID ~= nil) then + newFace.Value = FaceID + newFace.Name = "Face - "..FaceID + else + newFace.Value = "DefaultFace.rbxm" + newFace.Name = "Face - DefaultFace.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newFace + typeValue.Value = 6 + --HEADS + local newHead = Instance.new("StringValue",newCharApp) + if (HeadID ~= nil) then + newHead.Value = HeadID + newHead.Name = "Head - "..HeadID + else + newHead.Value = "DefaultHead.rbxm" + newHead.Name = "Head - DefaultHead.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newHead + typeValue.Value = 7 + --EXTRA + local newItem = Instance.new("StringValue",newCharApp) + if (ItemID ~= nil) then + newItem.Value = ItemID + newItem.Name = "Extra - "..ItemID + else + newItem.Value = "NoExtra.rbxm" + newItem.Name = "Extra - NoExtra.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newItem + typeValue.Value = 8 +end + +function LoadSecurity(playerApp,Player,ServerSecurityLocation) + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (playerApp == nil) then + kick() + end + + if (not Player:FindFirstChild("Security")) then + kick() + end + + if (not playerApp:FindFirstChild("ClientEXEMD5") or not playerApp:FindFirstChild("LauncherMD5") or not playerApp:FindFirstChild("ClientScriptMD5")) then + kick() + end + + for _,newVal in pairs(playerApp:GetChildren()) do + if (newVal.Name == "ClientEXEMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value or newVal.Value == "") then + kick() + break + end + end + + if (newVal.Name == "LauncherMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value or newVal.Value == "") then + kick() + break + end + end + + if (newVal.Name == "ClientScriptMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value or newVal.Value == "") then + kick() + break + end + end + end +end + +function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + Location = Instance.new("IntValue", Location) + Location.Name = "Security" + + local clientValue = Instance.new("StringValue", Location) + clientValue.Value = ClientEXEMD5 or "" + clientValue.Name = "ClientEXEMD5" + + local launcherValue = Instance.new("StringValue", Location) + launcherValue.Value = LauncherMD5 or "" + launcherValue.Name = "LauncherMD5" + + local scriptValue = Instance.new("StringValue", Location) + scriptValue.Value = ClientScriptMD5 or "" + scriptValue.Name = "ClientScriptMD5" +end + +function InitalizeTripcode(Location,Tripcode) + local code = Instance.new("StringValue", Location) + code.Value = Tripcode or "" + code.Name = "Tripcode" +end + +function LoadTripcode(Player) + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (not Player:FindFirstChild("Tripcode")) then + kick() + end + + for _,newVal in pairs(Player:GetChildren()) do + if (newVal.Name == "Tripcode") then + if (newVal.Value == "") then + kick() + break + end + end + end +end + +function InitalizeClientName(Location) + local newName = Instance.new("StringValue",Location) + newName.Value = "2011E" + newName.Name = "Name" +end + +rbxversion = version() +print("ROBLOX Client version '" .. rbxversion .. "' loaded.") + +function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + assert((type(Port)~="number" or tonumber(Port)~=nil or Port==nil),"CSRun Error: Port must be nil or a number.") + local NetworkServer=game:GetService("NetworkServer") + local RunService = game:GetService("RunService") + local PlayerService = game:GetService("Players") + pcall(NetworkServer.Stop,NetworkServer) + NetworkServer:Start(Port) + PlayerService.MaxPlayers = PlayerLimit + PlayerService.PlayerAdded:connect(function(Player) + if (PlayerService.NumPlayers > PlayerService.MaxPlayers) then + KickPlayer(Player, "Too many players on server.") + else + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added") + Player:LoadCharacter() + end + + Player.CharacterAdded:connect(function(char) + LoadSecurity(newWaitForChildSecurity(Player,"Security"),Player,game.Lighting) + newWaitForChildSecurity(Player,"Tripcode") + LoadTripcode(Player) + pcall(function() print("Player '" .. Player.Name .. "-" .. Player.userId .. "' security check success. Tripcode: '" .. Player.Tripcode.Value .. "'") end) + if (char ~= nil) then + LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),char) + end + end) + + Player.Changed:connect(function(Property) + if (Property=="Character") and (Player.Character~=nil) then + local Character=Player.Character + local Humanoid=Character:FindFirstChild("Humanoid") + if (Humanoid~=nil) then + Humanoid.Died:connect(function() delay(5,function() Player:LoadCharacter() LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) end) end) + end + end + end) + + Player.Chatted:connect(function(msg) + print(Player.Name.."; "..msg) + end) + end) + PlayerService.PlayerRemoving:connect(function(Player) + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving") + end) + RunService:Run() + game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") + InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + InitalizeClientName(game.Lighting) + pcall(function() game.Close:connect(function() NetworkServer:Stop() end) end) + NetworkServer.IncommingConnection:connect(IncommingConnection) +end + +function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Tripcode,Ticket) + pcall(function() game:SetPlaceID(-1, false) end) + pcall(function() game:GetService("Players"):SetChatStyle(Enum.ChatStyle.ClassicAndBubble) end) + + pcall(function() + game:GetService("GuiService").Changed:connect(function() + pcall(function() game:GetService("GuiService").ShowLegacyPlayerList=true end) + pcall(function() game.CoreGui.RobloxGui.PlayerListScript:Remove() end) + pcall(function() game.CoreGui.RobloxGui.PlayerListTopRightFrame:Remove() end) + pcall(function() game.CoreGui.RobloxGui.BigPlayerListWindowImposter:Remove() end) + pcall(function() game.CoreGui.RobloxGui.BigPlayerlist:Remove() end) + end) + end) + game:GetService("RunService"):Run() + assert((ServerIP~=nil and ServerPort~=nil),"CSConnect Error: ServerIP and ServerPort must be defined.") + local function SetMessage(Message) game:SetMessage(Message) end + local Visit,NetworkClient,PlayerSuccess,Player,ConnectionFailedHook=game:GetService("Visit"),game:GetService("NetworkClient") + + local function GetClassCount(Class,Parent) + local Objects=Parent:GetChildren() + local Number=0 + for Index,Object in pairs(Objects) do + if (Object.className==Class) then + Number=Number+1 + end + Number=Number+GetClassCount(Class,Object) + end + return Number + end + + local function RequestCharacter(Replicator) + local Connection + Connection=Player.Changed:connect(function(Property) + if (Property=="Character") then + game:ClearMessage() + end + end) + SetMessage("Requesting character...") + Replicator:RequestCharacter() + SetMessage("Waiting for character...") + end + + local function Disconnection(Peer,LostConnection) + SetMessage("You have lost connection to the game") + end + + local function ConnectionAccepted(Peer,Replicator) + Replicator.Disconnection:connect(Disconnection) + local RequestingMarker=true + game:SetMessageBrickCount() + local Marker=Replicator:SendMarker() + Marker.Received:connect(function() + RequestingMarker=false + RequestCharacter(Replicator) + end) + while RequestingMarker do + Workspace:ZoomToExtents() + wait(0.5) + end + end + + local function ConnectionFailed(Peer, Code, why) + SetMessage("Failed to connect to the Game. (ID="..Code.." ["..why.."])") + end + + pcall(function() settings().Diagnostics:LegacyScriptMode() end) + pcall(function() game:SetRemoteBuildMode(true) end) + SetMessage("Connecting to server...") + NetworkClient.ConnectionAccepted:connect(ConnectionAccepted) + ConnectionFailedHook=NetworkClient.ConnectionFailed:connect(ConnectionFailed) + NetworkClient.ConnectionRejected:connect(function() + pcall(function() ConnectionFailedHook:disconnect() end) + SetMessage("Failed to connect to the Game. (Connection rejected)") + end) + + pcall(function() NetworkClient.Ticket=Ticket or "" end) -- 2008 client has no ticket :O + PlayerSuccess,Player=pcall(function() return NetworkClient:PlayerConnect(UserID,ServerIP,ServerPort) end) + + if (not PlayerSuccess) then + SetMessage("Failed to connect to the Game. (Invalid IP Address)") + NetworkClient:Disconnect() + end + + if (not PlayerSuccess) then + local Error,Message=pcall(function() + Player=game:GetService("Players"):CreateLocalPlayer(UserID) + NetworkClient:Connect(ServerIP,ServerPort) + end) + if (not Error) then + SetMessage("Failed to connect to the Game.") + end + end + + pcall(function() Player.Name=PlayerName or "" end) + pcall(function() Player:SetUnder13(false) end) + pcall(function() Player:SetAccountAge(365) end) + Player:SetSuperSafeChat(false) + Player.CharacterAppearance=0 + if (IconType == "BC") then + Player:SetMembershipType(Enum.MembershipType.BuildersClub) + elseif (IconType == "TBC") then + Player:SetMembershipType(Enum.MembershipType.TurboBuildersClub) + elseif (IconType == "OBC") then + Player:SetMembershipType(Enum.MembershipType.OutrageousBuildersClub) + elseif (IconType == "NBC") then + Player:SetMembershipType(Enum.MembershipType.None) + end + + pcall(function() Visit:SetUploadUrl("") end) + game:GetService("Visit") + InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + wait(0.65) + InitalizeSecurityValues(Player,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + InitalizeTripcode(Player,Tripcode) +end + +function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + local plr = game.Players:CreateLocalPlayer(UserID) + game:GetService("RunService"):Run() + plr.Name = PlayerName + plr:LoadCharacter() + if (IconType == "BC") then + plr:SetMembershipType(Enum.MembershipType.BuildersClub) + elseif (IconType == "TBC") then + plr:SetMembershipType(Enum.MembershipType.TurboBuildersClub) + elseif (IconType == "OBC") then + plr:SetMembershipType(Enum.MembershipType.OutrageousBuildersClub) + elseif (IconType == "NBC") then + plr:SetMembershipType(Enum.MembershipType.None) + end + plr.CharacterAppearance=0 + InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") + newWaitForChild(game.StarterGui, "Dialogs") + newWaitForChild(game.StarterGui, "Health") + game.StarterGui.Dialogs:clone().Parent = plr.PlayerGui + game.StarterGui.Health:clone().Parent = plr.PlayerGui + game:GetService("Visit") + while true do wait() + if (plr.Character.Humanoid.Health == 0) then + wait(5) + plr:LoadCharacter() + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + end + end +end + +function CSStudio() +end + +_G.CSServer=CSServer +_G.CSConnect=CSConnect +_G.CSSolo=CSSolo +_G.CSStudio=CSStudio \ No newline at end of file diff --git a/scripts/2011M/CSMPFunctions.lua b/scripts/2011M/CSMPFunctions.lua new file mode 100644 index 0000000..e17f708 --- /dev/null +++ b/scripts/2011M/CSMPFunctions.lua @@ -0,0 +1,710 @@ +settings().Rendering.FrameRateManager = 2 +settings().Network.DataSendRate = 30 +settings().Network.PhysicsSendRate = 20 +settings().Network.ReceiveRate = 60 +settings().Network.NetworkOwnerRate = 30 + +game:GetService("CoreGui").DescendantAdded:connect(function(Child) + if (Child:IsA("BaseScript")) and (Child.Name~="SubMenuBuilder") and (Child.Name~="ToolTipper") and (Child.Name~="MainBotChatScript") then + Child:Remove() + end +end) + +pcall(function() game:GetService("ScriptContext").ScriptsDisabled = false end) + +--function made by rbxbanland +function newWaitForChild(newParent,name) + local returnable = nil + if newParent:FindFirstChild(name) then + returnable = newParent:FindFirstChild(name) + else + repeat wait() returnable = newParent:FindFirstChild(name) until returnable ~= nil + end + return returnable +end + +function KickPlayer(Player,reason) + if (Player ~= nil) then + local message = Instance.new("Message") + message.Text = "You were kicked. Reason: "..reason + message.Parent = Player + wait(2) + Player:remove() + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: "..reason) + end +end + +function newWaitForChildSecurity(newParent,name) + local returnable = nil + local loadAttempts = 0 + local maxAttempts = 5 + while loadAttempts < maxAttempts do + if newParent:FindFirstChild(name) then + returnable = newParent:FindFirstChild(name) + break + end + --for 2011+ to work the same way as other clients, we need to add half a second of wait time. + wait(0.5) + loadAttempts = loadAttempts + 1 + print("Player '" .. newParent.Name .. "' trying to connect. Number of attempts: "..loadAttempts) + end + + if (loadAttempts == maxAttempts) then + KickPlayer(newParent, "Modified Client") + end + + return returnable +end + +function LoadCharacterNew(playerApp,newChar) + PlayerService = game:GetService("Players") + Player = PlayerService:GetPlayerFromCharacter(newChar) + + wait(0.65) + + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (playerApp == nil) then + kick() + end + + if (not Player:FindFirstChild("Appearance")) then + kick() + end + + if ((playerApp:GetChildren() == 0) or (playerApp:GetChildren() == nil)) then + kick() + end + + local path = "rbxasset://../../../shareddata/charcustom/" + + local charparts = {[1] = newWaitForChild(newChar,"Head"),[2] = newWaitForChild(newChar,"Torso"),[3] = newWaitForChild(newChar,"Left Arm"),[4] = newWaitForChild(newChar,"Right Arm"),[5] = newWaitForChild(newChar,"Left Leg"),[6] = newWaitForChild(newChar,"Right Leg")} + for _,newVal in pairs(playerApp:GetChildren()) do + local customtype = newVal.CustomizationType.Value + if (customtype == 1) then + pcall(function() + charparts[newVal.ColorIndex.Value].BrickColor = newVal.Value + end) + elseif (customtype == 2) then + pcall(function() + local newHat = game.Workspace:InsertContent(path.."hats/"..newVal.Value) + if newHat[1] then + if newHat[1].className == "Hat" then + newHat[1].Parent = newChar + else + newHat[1]:remove() + end + end + end) + elseif (customtype == 3) then + pcall(function() + local newTShirt = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newTShirt = Instance.new("ShirtGraphic") + newTShirt.Graphic = newVal.Value + newTShirt.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newTShirt = game.Workspace:InsertContent(newVal.Value) + if newTShirt[1] then + if newTShirt[1].className == "ShirtGraphic" then + newTShirt[1].Parent = newChar + else + newTShirt[1]:remove() + end + end + else + newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value) + if newTShirt[1] then + if newTShirt[1].className == "ShirtGraphic" then + newTShirt[1].Parent = newChar + else + newTShirt[1]:remove() + end + end + end + end) + elseif (customtype == 4) then + pcall(function() + local newShirt = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newShirt = Instance.new("Shirt") + newShirt.ShirtTemplate = newVal.Value + newShirt.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newShirt = game.Workspace:InsertContent(newVal.Value) + if newShirt[1] then + if newShirt[1].className == "Shirt" then + newShirt[1].Parent = newChar + else + newShirt[1]:remove() + end + end + else + newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value) + if newShirt[1] then + if newShirt[1].className == "Shirt" then + newShirt[1].Parent = newChar + else + newShirt[1]:remove() + end + end + end + end) + elseif (customtype == 5) then + pcall(function() + local newPants = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newPants = Instance.new("Pants") + newPants.PantsTemplate = newVal.Value + newPants.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newPants = game.Workspace:InsertContent(newVal.Value) + if newPants[1] then + if newPants[1].className == "Pants" then + newPants[1].Parent = newChar + else + newPants[1]:remove() + end + end + else + newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value) + if newPants[1] then + if newPants[1].className == "Pants" then + newPants[1].Parent = newChar + else + newPants[1]:remove() + end + end + end + end) + elseif (customtype == 6) then + pcall(function() + local newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value) + if newFace[1] then + if newFace[1].className == "Decal" then + newWaitForChild(charparts[1],"face"):remove() + newFace[1].Parent = charparts[1] + newFace[1].Face = "Front" + else + newFace[1]:remove() + end + end + end) + elseif (customtype == 7) then + pcall(function() + local newPart = game.Workspace:InsertContent(path.."heads/"..newVal.Value) + if newPart[1] then + if newPart[1].className == "SpecialMesh" or newPart[1].className == "CylinderMesh" or newPart[1].className == "BlockMesh" then + newWaitForChild(charparts[1],"Mesh"):remove() + newPart[1].Parent = charparts[1] + else + newPart[1]:remove() + end + end + end) + elseif (customtype == 8) then + pcall(function() + local newHat = game.Workspace:InsertContent(path.."hats/"..newVal.Value) + if newHat[1] then + if newHat[1].className == "Hat" then + newHat[1].Parent = newChar + else + newHat[1]:remove() + end + end + end) + + pcall(function() + local newItem = game.Workspace:InsertContent(path.."custom/"..newVal.Value) + if newItem[1] then + if newItem[1].className == "Decal" then + newWaitForChild(charparts[1],"face"):remove() + newItem[1].Parent = charparts[1] + newItem[1].Face = "Front" + elseif newPart[1].className == "SpecialMesh" or newPart[1].className == "CylinderMesh" or newPart[1].className == "BlockMesh" then + newWaitForChild(charparts[1],"Mesh"):remove() + newItem[1].Parent = charparts[1] + else + newItem[1].Parent = newChar + end + end + end) + end + end +end + +function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + local newCharApp = Instance.new("IntValue",Player) + newCharApp.Name = "Appearance" + --BODY COLORS + for i=1,6,1 do + local BodyColor = Instance.new("BrickColorValue",newCharApp) + if (i == 1) then + if (HeadColorID ~= nil) then + BodyColor.Value = BrickColor.new(HeadColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Head Color" + elseif (i == 2) then + if (TorsoColorID ~= nil) then + BodyColor.Value = BrickColor.new(TorsoColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Torso Color" + elseif (i == 3) then + if (LeftArmColorID ~= nil) then + BodyColor.Value = BrickColor.new(LeftArmColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Left Arm Color" + elseif (i == 4) then + if (RightArmColorID ~= nil) then + BodyColor.Value = BrickColor.new(RightArmColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Right Arm Color" + elseif (i == 5) then + if (LeftLegColorID ~= nil) then + BodyColor.Value = BrickColor.new(LeftLegColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Left Leg Color" + elseif (i == 6) then + if (RightLegColorID ~= nil) then + BodyColor.Value = BrickColor.new(RightLegColorID) + else + BodyColor.Value = BrickColor.new(1) + end + BodyColor.Name = "Right Leg Color" + end + local indexValue = Instance.new("NumberValue") + indexValue.Name = "ColorIndex" + indexValue.Parent = BodyColor + indexValue.Value = i + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = BodyColor + typeValue.Value = 1 + end + --HATS + for i=1,3,1 do + local newHat = Instance.new("StringValue",newCharApp) + if (i == 1) then + if (Hat1ID ~= nil) then + newHat.Value = Hat1ID + newHat.Name = "Hat 1 - "..Hat1ID + else + newHat.Value = "NoHat.rbxm" + newHat.Name = "Hat 1 - NoHat.rbxm" + end + elseif (i == 2) then + if (Hat2ID ~= nil) then + newHat.Value = Hat2ID + newHat.Name = "Hat 2 - "..Hat2ID + else + newHat.Value = "NoHat.rbxm" + newHat.Name = "Hat 2 - NoHat.rbxm" + end + elseif (i == 3) then + if (Hat3ID ~= nil) then + newHat.Value = Hat3ID + newHat.Name = "Hat 3 - "..Hat3ID + else + newHat.Value = "NoHat.rbxm" + newHat.Name = "Hat 3 - NoHat.rbxm" + end + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newHat + typeValue.Value = 2 + end + --T-SHIRT + local newTShirt = Instance.new("StringValue",newCharApp) + if (TShirtID ~= nil) then + newTShirt.Value = TShirtID + newTShirt.Name = "T-Shirt - "..TShirtID + else + newTShirt.Value = "NoTShirt.rbxm" + newTShirt.Name = "T-Shirt - NoTShirt.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newTShirt + typeValue.Value = 3 + --SHIRT + local newShirt = Instance.new("StringValue",newCharApp) + if (ShirtID ~= nil) then + newShirt.Value = ShirtID + newShirt.Name = "Shirt - "..ShirtID + else + newShirt.Value = "NoShirt.rbxm" + newShirt.Name = "Shirt - NoShirt.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newShirt + typeValue.Value = 4 + --PANTS + local newPants = Instance.new("StringValue",newCharApp) + if (PantsID ~= nil) then + newPants.Value = PantsID + newPants.Name = "Pants - "..PantsID + else + newPants.Value = "NoPants.rbxm" + newPants.Name = "Pants - NoPants.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newPants + typeValue.Value = 5 + --FACE + local newFace = Instance.new("StringValue",newCharApp) + if (FaceID ~= nil) then + newFace.Value = FaceID + newFace.Name = "Face - "..FaceID + else + newFace.Value = "DefaultFace.rbxm" + newFace.Name = "Face - DefaultFace.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newFace + typeValue.Value = 6 + --HEADS + local newHead = Instance.new("StringValue",newCharApp) + if (HeadID ~= nil) then + newHead.Value = HeadID + newHead.Name = "Head - "..HeadID + else + newHead.Value = "DefaultHead.rbxm" + newHead.Name = "Head - DefaultHead.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newHead + typeValue.Value = 7 + --EXTRA + local newItem = Instance.new("StringValue",newCharApp) + if (ItemID ~= nil) then + newItem.Value = ItemID + newItem.Name = "Extra - "..ItemID + else + newItem.Value = "NoExtra.rbxm" + newItem.Name = "Extra - NoExtra.rbxm" + end + local typeValue = Instance.new("NumberValue") + typeValue.Name = "CustomizationType" + typeValue.Parent = newItem + typeValue.Value = 8 +end + +function LoadSecurity(playerApp,Player,ServerSecurityLocation) + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (playerApp == nil) then + kick() + end + + if (not Player:FindFirstChild("Security")) then + kick() + end + + if (not playerApp:FindFirstChild("ClientEXEMD5") or not playerApp:FindFirstChild("LauncherMD5") or not playerApp:FindFirstChild("ClientScriptMD5")) then + kick() + end + + for _,newVal in pairs(playerApp:GetChildren()) do + if (newVal.Name == "ClientEXEMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value or newVal.Value == "") then + kick() + break + end + end + + if (newVal.Name == "LauncherMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value or newVal.Value == "") then + kick() + break + end + end + + if (newVal.Name == "ClientScriptMD5") then + if (newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value or newVal.Value == "") then + kick() + break + end + end + end +end + +function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + Location = Instance.new("IntValue", Location) + Location.Name = "Security" + + local clientValue = Instance.new("StringValue", Location) + clientValue.Value = ClientEXEMD5 or "" + clientValue.Name = "ClientEXEMD5" + + local launcherValue = Instance.new("StringValue", Location) + launcherValue.Value = LauncherMD5 or "" + launcherValue.Name = "LauncherMD5" + + local scriptValue = Instance.new("StringValue", Location) + scriptValue.Value = ClientScriptMD5 or "" + scriptValue.Name = "ClientScriptMD5" +end + +function InitalizeTripcode(Location,Tripcode) + local code = Instance.new("StringValue", Location) + code.Value = Tripcode or "" + code.Name = "Tripcode" +end + +function LoadTripcode(Player) + local function kick() + KickPlayer(Player, "Modified Client") + end + + if (not Player:FindFirstChild("Tripcode")) then + kick() + end + + for _,newVal in pairs(Player:GetChildren()) do + if (newVal.Name == "Tripcode") then + if (newVal.Value == "") then + kick() + break + end + end + end +end + +function InitalizeClientName(Location) + local newName = Instance.new("StringValue",Location) + newName.Value = "2011M" + newName.Name = "Name" +end + +rbxversion = version() +print("ROBLOX Client version '" .. rbxversion .. "' loaded.") + +function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + assert((type(Port)~="number" or tonumber(Port)~=nil or Port==nil),"CSRun Error: Port must be nil or a number.") + local NetworkServer=game:GetService("NetworkServer") + local RunService = game:GetService("RunService") + local PlayerService = game:GetService("Players") + pcall(NetworkServer.Stop,NetworkServer) + NetworkServer:Start(Port) + PlayerService.MaxPlayers = PlayerLimit + PlayerService.PlayerAdded:connect(function(Player) + if (PlayerService.NumPlayers > PlayerService.MaxPlayers) then + KickPlayer(Player, "Too many players on server.") + else + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added") + Player:LoadCharacter() + end + + Player.CharacterAdded:connect(function(char) + LoadSecurity(newWaitForChildSecurity(Player,"Security"),Player,game.Lighting) + newWaitForChildSecurity(Player,"Tripcode") + LoadTripcode(Player) + pcall(function() print("Player '" .. Player.Name .. "-" .. Player.userId .. "' security check success. Tripcode: '" .. Player.Tripcode.Value .. "'") end) + if (char ~= nil) then + LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),char) + end + end) + + Player.Changed:connect(function(Property) + if (Property=="Character") and (Player.Character~=nil) then + local Character=Player.Character + local Humanoid=Character:FindFirstChild("Humanoid") + if (Humanoid~=nil) then + Humanoid.Died:connect(function() delay(5,function() Player:LoadCharacter() LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) end) end) + end + end + end) + + Player.Chatted:connect(function(msg) + print(Player.Name.."; "..msg) + end) + end) + PlayerService.PlayerRemoving:connect(function(Player) + print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving") + end) + RunService:Run() + game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") + InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + InitalizeClientName(game.Lighting) + pcall(function() game.Close:connect(function() NetworkServer:Stop() end) end) + NetworkServer.IncommingConnection:connect(IncommingConnection) +end + +function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Tripcode,Ticket) + pcall(function() game:SetPlaceID(-1, false) end) + pcall(function() game:GetService("Players"):SetChatStyle(Enum.ChatStyle.ClassicAndBubble) end) + + pcall(function() + game:GetService("GuiService").Changed:connect(function() + pcall(function() game:GetService("GuiService").ShowLegacyPlayerList=true end) + pcall(function() game.CoreGui.RobloxGui.PlayerListScript:Remove() end) + pcall(function() game.CoreGui.RobloxGui.PlayerListTopRightFrame:Remove() end) + pcall(function() game.CoreGui.RobloxGui.BigPlayerListWindowImposter:Remove() end) + pcall(function() game.CoreGui.RobloxGui.BigPlayerlist:Remove() end) + end) + end) + game:GetService("RunService"):Run() + assert((ServerIP~=nil and ServerPort~=nil),"CSConnect Error: ServerIP and ServerPort must be defined.") + local function SetMessage(Message) game:SetMessage(Message) end + local Visit,NetworkClient,PlayerSuccess,Player,ConnectionFailedHook=game:GetService("Visit"),game:GetService("NetworkClient") + + local function GetClassCount(Class,Parent) + local Objects=Parent:GetChildren() + local Number=0 + for Index,Object in pairs(Objects) do + if (Object.className==Class) then + Number=Number+1 + end + Number=Number+GetClassCount(Class,Object) + end + return Number + end + + local function RequestCharacter(Replicator) + local Connection + Connection=Player.Changed:connect(function(Property) + if (Property=="Character") then + game:ClearMessage() + end + end) + SetMessage("Requesting character...") + Replicator:RequestCharacter() + SetMessage("Waiting for character...") + end + + local function Disconnection(Peer,LostConnection) + SetMessage("You have lost connection to the game") + end + + local function ConnectionAccepted(Peer,Replicator) + Replicator.Disconnection:connect(Disconnection) + local RequestingMarker=true + game:SetMessageBrickCount() + local Marker=Replicator:SendMarker() + Marker.Received:connect(function() + RequestingMarker=false + RequestCharacter(Replicator) + end) + while RequestingMarker do + Workspace:ZoomToExtents() + wait(0.5) + end + end + + local function ConnectionFailed(Peer, Code, why) + SetMessage("Failed to connect to the Game. (ID="..Code.." ["..why.."])") + end + + pcall(function() settings().Diagnostics:LegacyScriptMode() end) + pcall(function() game:SetRemoteBuildMode(true) end) + SetMessage("Connecting to server...") + NetworkClient.ConnectionAccepted:connect(ConnectionAccepted) + ConnectionFailedHook=NetworkClient.ConnectionFailed:connect(ConnectionFailed) + NetworkClient.ConnectionRejected:connect(function() + pcall(function() ConnectionFailedHook:disconnect() end) + SetMessage("Failed to connect to the Game. (Connection rejected)") + end) + + pcall(function() NetworkClient.Ticket=Ticket or "" end) -- 2008 client has no ticket :O + PlayerSuccess,Player=pcall(function() return NetworkClient:PlayerConnect(UserID,ServerIP,ServerPort) end) + + if (not PlayerSuccess) then + SetMessage("Failed to connect to the Game. (Invalid IP Address)") + NetworkClient:Disconnect() + end + + if (not PlayerSuccess) then + local Error,Message=pcall(function() + Player=game:GetService("Players"):CreateLocalPlayer(UserID) + NetworkClient:Connect(ServerIP,ServerPort) + end) + if (not Error) then + SetMessage("Failed to connect to the Game.") + end + end + + pcall(function() Player.Name=PlayerName or "" end) + pcall(function() Player:SetUnder13(false) end) + pcall(function() Player:SetAccountAge(365) end) + Player:SetSuperSafeChat(false) + Player.CharacterAppearance=0 + game.GuiRoot.ScoreHud:Remove() + if (IconType == "BC") then + Player:SetMembershipType(Enum.MembershipType.BuildersClub) + elseif (IconType == "TBC") then + Player:SetMembershipType(Enum.MembershipType.TurboBuildersClub) + elseif (IconType == "OBC") then + Player:SetMembershipType(Enum.MembershipType.OutrageousBuildersClub) + elseif (IconType == "NBC") then + Player:SetMembershipType(Enum.MembershipType.None) + end + + pcall(function() Visit:SetUploadUrl("") end) + game:GetService("Visit") + InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + wait(0.65) + InitalizeSecurityValues(Player,ClientEXEMD5,LauncherMD5,ClientScriptMD5) + InitalizeTripcode(Player,Tripcode) +end + +function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + local plr = game.Players:CreateLocalPlayer(UserID) + game:GetService("RunService"):Run() + plr.Name = PlayerName + plr:LoadCharacter() + if (IconType == "BC") then + plr:SetMembershipType(Enum.MembershipType.BuildersClub) + elseif (IconType == "TBC") then + plr:SetMembershipType(Enum.MembershipType.TurboBuildersClub) + elseif (IconType == "OBC") then + plr:SetMembershipType(Enum.MembershipType.OutrageousBuildersClub) + elseif (IconType == "NBC") then + plr:SetMembershipType(Enum.MembershipType.None) + end + game.GuiRoot.ScoreHud:Remove() + plr.CharacterAppearance=0 + InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") + newWaitForChild(game.StarterGui, "Dialogs") + newWaitForChild(game.StarterGui, "Health") + newWaitForChild(game.StarterGui, "Playerlist") + game.StarterGui.Dialogs:clone().Parent = plr.PlayerGui + game.StarterGui.Health:clone().Parent = plr.PlayerGui + game.StarterGui.Playerlist:clone().Parent = plr.PlayerGui + game:GetService("Visit") + while true do wait() + if (plr.Character.Humanoid.Health == 0) then + wait(5) + plr:LoadCharacter() + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + end + end +end + +function CSStudio() +end + +_G.CSServer=CSServer +_G.CSConnect=CSConnect +_G.CSSolo=CSSolo +_G.CSStudio=CSStudio \ No newline at end of file diff --git a/CSView.lua b/scripts/3DView/CSView.lua similarity index 81% rename from CSView.lua rename to scripts/3DView/CSView.lua index 2470436..6ad31ee 100644 --- a/CSView.lua +++ b/scripts/3DView/CSView.lua @@ -1,3 +1,5 @@ +settings().Rendering.FrameRateManager = 2 + --function made by rbxbanland function newWaitForChild(newParent,name) local returnable = nil @@ -32,34 +34,82 @@ function LoadCharacterNew(playerApp,newChar) end) elseif (customtype == 3) then pcall(function() - local newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value) - if newTShirt[1] then - if newTShirt[1].className == "ShirtGraphic" then - newTShirt[1].Parent = newChar - else - newTShirt[1]:remove() + local newTShirt = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newTShirt = Instance.new("ShirtGraphic") + newTShirt.Graphic = newVal.Value + newTShirt.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newTShirt = game.Workspace:InsertContent(newVal.Value) + if newTShirt[1] then + if newTShirt[1].className == "ShirtGraphic" then + newTShirt[1].Parent = newChar + else + newTShirt[1]:remove() + end + end + else + newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value) + if newTShirt[1] then + if newTShirt[1].className == "ShirtGraphic" then + newTShirt[1].Parent = newChar + else + newTShirt[1]:remove() + end end end end) elseif (customtype == 4) then pcall(function() - local newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value) - if newShirt[1] then - if newShirt[1].className == "Shirt" then - newShirt[1].Parent = newChar - else - newShirt[1]:remove() + local newShirt = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newShirt = Instance.new("Shirt") + newShirt.ShirtTemplate = newVal.Value + newShirt.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newShirt = game.Workspace:InsertContent(newVal.Value) + if newShirt[1] then + if newShirt[1].className == "Shirt" then + newShirt[1].Parent = newChar + else + newShirt[1]:remove() + end + end + else + newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value) + if newShirt[1] then + if newShirt[1].className == "Shirt" then + newShirt[1].Parent = newChar + else + newShirt[1]:remove() + end end end end) elseif (customtype == 5) then pcall(function() - local newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value) - if newPants[1] then - if newPants[1].className == "Pants" then - newPants[1].Parent = newChar - else - newPants[1]:remove() + local newPants = ""; + if (string.match(newVal.Value, "finobe") == "finobe") then + newPants = Instance.new("Pants") + newPants.PantsTemplate = newVal.Value + newPants.Parent = newChar + elseif (string.match(newVal.Value, "roblox") == "roblox") then + newPants = game.Workspace:InsertContent(newVal.Value) + if newPants[1] then + if newPants[1].className == "Pants" then + newPants[1].Parent = newChar + else + newPants[1]:remove() + end + end + else + newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value) + if newPants[1] then + if newPants[1].className == "Pants" then + newPants[1].Parent = newChar + else + newPants[1]:remove() + end end end end)