diff --git a/Novetus/NovetusCore/CharCustom/CharacterCustomizationShared.cs b/Novetus/NovetusCore/CharCustom/CharacterCustomizationShared.cs index fbbc353..2b7dea0 100644 --- a/Novetus/NovetusCore/CharCustom/CharacterCustomizationShared.cs +++ b/Novetus/NovetusCore/CharCustom/CharacterCustomizationShared.cs @@ -752,42 +752,25 @@ class CharacterCustomizationShared public void Launch3DView() { FileManagement.ReloadLoadoutValue(); - //HACK! - try +#if URI + ClientManagement.LaunchRBXClient(ScriptType.OutfitView, false, false, new EventHandler(SoloExited), null); +#else + ClientManagement.LaunchRBXClient(ScriptType.OutfitView, false, false, new EventHandler(SoloExited)); +#endif + } + + void SoloExited(object sender, EventArgs e) + { + if (GlobalVars.GameOpened != ScriptType.Studio) { - ClientManagement.ChangeGameSettings("2011E"); - } - catch (Exception ex) - { - Util.LogExceptions(ex); + GlobalVars.GameOpened = ScriptType.None; } - string luafile = "rbxasset://scripts\\\\CSView.lua"; - string mapfile = GlobalPaths.BasePathLauncher + "\\preview\\content\\fonts\\3DView.rbxl"; - string rbxexe = GlobalPaths.BasePathLauncher + (GlobalVars.AdminMode ? "\\preview\\3DView_studio.exe" : "\\preview\\3DView.exe"); - string quote = "\""; - string script = "_G.CS3DView(0,'" + GlobalVars.UserConfiguration.ReadSetting("PlayerName") + "'," + GlobalVars.Loadout + ");"; + ClientManagement.UpdateRichPresence(ClientManagement.GetStateForType(GlobalVars.GameOpened)); - if (GlobalVars.AdminMode) + if (GlobalVars.UserConfiguration.ReadSettingBool("CloseOnLaunch")) { - DialogResult adminres = MessageBox.Show("Would you like to run 3D Preview Studio with or without scripts?\n\nPress Yes to load with scripts, press No to load without.", "Novetus - 3D Preview Studio", MessageBoxButtons.YesNo, MessageBoxIcon.Information); - - if (adminres == DialogResult.No) - { - script = "_G.CS3DViewEdit();"; - } - } - - string args = quote + mapfile + "\" -script \" dofile('" + luafile + "');" + script + quote; - - try - { - ClientManagement.OpenClient(ScriptType.None, rbxexe, args, "", "", null, true); - } - catch (Exception ex) - { - MessageBox.Show("Failed to launch the 3D Preview. (Error: " + ex.Message + ")", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - Util.LogExceptions(ex); + Parent.Visible = true; } } diff --git a/Novetus/NovetusCore/Classes/VCPPRedistInstallationDetector.cs b/Novetus/NovetusCore/Classes/VCPPRedistInstallationDetector.cs index 168f571..16c0cef 100644 --- a/Novetus/NovetusCore/Classes/VCPPRedistInstallationDetector.cs +++ b/Novetus/NovetusCore/Classes/VCPPRedistInstallationDetector.cs @@ -82,7 +82,7 @@ namespace Novetus.Core /// private static Dictionary _VCRedistToRedistKeysMap = new Dictionary() { - [VCPPRedist.VCPP2005] = new RedistInformation(RedistKeyLocation.Products, new[] { "c1c4f01781cc94c4c8fb1542c0981a2a" }), + [VCPPRedist.VCPP2005] = new RedistInformation(RedistKeyLocation.Products, new[] { "b25099274a207264182f8181add555d0" }), [VCPPRedist.VCPP2008] = new RedistInformation(RedistKeyLocation.Products, new[] { "6E815EB96CCE9A53884E7857C57002F0" }), [VCPPRedist.VCPP2012] = new RedistInformation(RedistKeyLocation.Dependencies, new[] { "{33d1fd90-4274-48a1-9bc1-97e33d9c2d6f}", "{95716cce-fc71-413f-8ad5-56c2892d4b3a}" }) }; @@ -122,6 +122,22 @@ namespace Novetus.Core /// Is installed public static bool IsInstalled(VCPPRedist redist) => _VCRedistResults[redist]; + public static string GetNameForRedist(VCPPRedist redist) + { + switch(redist) + { + case VCPPRedist.VCPP2005: + return "Visual C++ 2005 SP1 Redistributables"; + case VCPPRedist.VCPP2008: + return "Visual C++ 2008 Redistributables"; + case VCPPRedist.VCPP2012: + return "Visual C++ 2012 Redistributables"; + case VCPPRedist.None: + default: + return "Generic Redistributables"; + } + } + /// /// Checks for all keys /// diff --git a/Novetus/NovetusCore/StorageAndFunctions/ClientManagement.cs b/Novetus/NovetusCore/StorageAndFunctions/ClientManagement.cs index 59095fe..def06a8 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/ClientManagement.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/ClientManagement.cs @@ -321,12 +321,12 @@ namespace Novetus.Core case ScriptType.Client: return GlobalVars.LauncherState.InMPGame; case ScriptType.Solo: + case ScriptType.SoloServer: return GlobalVars.LauncherState.InSoloGame; case ScriptType.Studio: return GlobalVars.LauncherState.InStudio; - case ScriptType.EasterEgg: - case ScriptType.EasterEggServer: - return GlobalVars.LauncherState.InEasterEggGame; + case ScriptType.OutfitView: + return GlobalVars.LauncherState.InCustomization; default: return GlobalVars.LauncherState.InLauncher; } @@ -335,7 +335,7 @@ namespace Novetus.Core public static void UpdateRichPresence(GlobalVars.LauncherState state, bool initial = false) { string mapname = ""; - if (GlobalVars.GameOpened != ScriptType.Client) + if (GlobalVars.GameOpened != ScriptType.Client || GlobalVars.GameOpened != ScriptType.Solo || GlobalVars.GameOpened != ScriptType.OutfitView) { mapname = GlobalVars.UserConfiguration.ReadSetting("Map"); } @@ -398,13 +398,6 @@ namespace Novetus.Core GlobalVars.presence.largeImageText = GlobalVars.UserConfiguration.ReadSetting("PlayerName") + " | Novetus " + GlobalVars.ProgramInformation.Version; GlobalVars.presence.smallImageText = "In Character Customization"; break; - case GlobalVars.LauncherState.InEasterEggGame: - GlobalVars.presence.smallImageKey = GlobalVars.image_ingame; - GlobalVars.presence.details = ValidMapname; - GlobalVars.presence.state = "Reading a message."; - GlobalVars.presence.largeImageText = GlobalVars.UserConfiguration.ReadSetting("PlayerName") + " | Novetus " + GlobalVars.ProgramInformation.Version; - GlobalVars.presence.smallImageText = "Reading a message."; - break; case GlobalVars.LauncherState.LoadingURI: GlobalVars.presence.smallImageKey = GlobalVars.image_ingame; GlobalVars.presence.details = ValidMapname; @@ -856,11 +849,11 @@ namespace Novetus.Core { case ScriptType.Client: case ScriptType.Solo: - case ScriptType.EasterEgg: + case ScriptType.OutfitView: rbxfolder = "client"; break; case ScriptType.Server: - case ScriptType.EasterEggServer: + case ScriptType.SoloServer: rbxfolder = "server"; break; case ScriptType.Studio: @@ -897,14 +890,14 @@ namespace Novetus.Core switch (type) { case ScriptType.Client: - case ScriptType.EasterEgg: + case ScriptType.Solo: rbxexe = BasePath + @"\\" + GetClientSeperateFolderName(type) + @"\\RobloxApp_client.exe"; break; - case ScriptType.Solo: - rbxexe = BasePath + @"\\" + GetClientSeperateFolderName(type) + @"\\RobloxApp_solo.exe"; + case ScriptType.OutfitView: + rbxexe = BasePath + @"\\" + GetClientSeperateFolderName(type) + @"\\RobloxApp_preview.exe"; break; case ScriptType.Server: - case ScriptType.EasterEggServer: + case ScriptType.SoloServer: rbxexe = BasePath + @"\\" + GetClientSeperateFolderName(type) + @"\\RobloxApp_server.exe"; break; case ScriptType.Studio: @@ -921,18 +914,18 @@ namespace Novetus.Core switch (type) { case ScriptType.Client: - case ScriptType.EasterEgg: + case ScriptType.Solo: rbxexe = BasePath + @"\\RobloxApp_client.exe"; break; case ScriptType.Server: - case ScriptType.EasterEggServer: + case ScriptType.SoloServer: rbxexe = BasePath + @"\\RobloxApp_server.exe"; break; case ScriptType.Studio: rbxexe = BasePath + @"\\RobloxApp_studio.exe"; break; - case ScriptType.Solo: - rbxexe = BasePath + @"\\RobloxApp_solo.exe"; + case ScriptType.OutfitView: + rbxexe = BasePath + @"\\RobloxApp_preview.exe"; break; case ScriptType.None: default: @@ -963,7 +956,7 @@ namespace Novetus.Core public static void DecompressMap(ScriptType type, bool nomap) { - if ((type != ScriptType.Client || type != ScriptType.EasterEgg) && !nomap && GlobalVars.UserConfiguration.ReadSetting("Map").Contains(".bz2")) + if ((type != ScriptType.Client || GlobalVars.GameOpened != ScriptType.Solo || type != ScriptType.OutfitView) && !nomap && GlobalVars.UserConfiguration.ReadSetting("Map").Contains(".bz2")) { Util.Decompress(GlobalVars.UserConfiguration.ReadSetting("MapPath"), true); @@ -988,7 +981,7 @@ namespace Novetus.Core #if URI public static void LaunchRBXClient(ScriptType type, bool no3d, bool nomap, EventHandler e, Label label) #else - public static void LaunchRBXClient(ScriptType type, bool no3d, bool nomap, EventHandler e) + public static void LaunchRBXClient(ScriptType type, bool no3d, bool nomap, EventHandler e) #endif { #if URI @@ -1134,9 +1127,6 @@ namespace Novetus.Core switch (type) { - case ScriptType.Client: - case ScriptType.EasterEgg: - break; case ScriptType.Server: if (GlobalVars.UserConfiguration.ReadSettingBool("FirstServerLaunch")) { @@ -1157,16 +1147,20 @@ namespace Novetus.Core GlobalVars.UserConfiguration.SaveSettingBool("FirstServerLaunch", false); } break; - case ScriptType.Solo: + default: break; } ReadClientValues(ClientName); string luafile = GetLuaFileName(ClientName, type); string rbxexe = GetClientEXEDir(ClientName, type); - bool isEasterEgg = (type.Equals(ScriptType.EasterEggServer)); - string mapfile = isEasterEgg ? GlobalPaths.DataDir + "\\Appreciation.rbxl" : (nomap ? (type.Equals(ScriptType.Studio) ? GlobalPaths.ConfigDir + "\\Place1.rbxl" : "") : GlobalVars.UserConfiguration.ReadSetting("MapPath")); - string mapname = isEasterEgg ? "" : (nomap ? "" : GlobalVars.UserConfiguration.ReadSetting("Map")); + bool isEasterEgg = GlobalVars.Clicks >= 10; + bool is3DView = (type.Equals(ScriptType.OutfitView)); + string mapfilepath = nomap ? (type.Equals(ScriptType.Studio) ? GlobalPaths.ConfigDir + "\\Place1.rbxl" : "") : GlobalVars.UserConfiguration.ReadSetting("MapPath"); + string mapfilename = nomap ? "" : GlobalVars.UserConfiguration.ReadSetting("Map"); + string mapfile = isEasterEgg ? GlobalPaths.DataDir + "\\Appreciation.rbxl" : + (is3DView ? GlobalPaths.DataDir + "\\3DView.rbxl" : mapfilepath); + string mapname = (isEasterEgg || is3DView) ? "" : mapfilename; FileFormat.ClientInfo info = GetClientInfoValues(ClientName); string quote = "\""; string args = ""; @@ -1481,14 +1475,20 @@ namespace Novetus.Core string md5exe = !info.AlreadyHasSecurity ? SecurityFuncs.GenerateMD5(rbxexe) : ""; string md5s = "'" + md5exe + "','" + md5dir + "','" + md5script + "'"; + string serverIP = (type == ScriptType.SoloServer ? "localhost" : GlobalVars.CurrentServer.ServerIP); + int serverjoinport = (type == ScriptType.SoloServer ? GlobalVars.DefaultRobloxPort : GlobalVars.CurrentServer.ServerPort); + string serverport = (type == ScriptType.SoloServer ? GlobalVars.DefaultRobloxPort.ToString() : GlobalVars.UserConfiguration.ReadSetting("RobloxPort")); + string playerLimit = (type == ScriptType.SoloServer ? "1" : GlobalVars.UserConfiguration.ReadSetting("PlayerLimit")); + string joinNotifs = (type == ScriptType.SoloServer ? "false" : GlobalVars.UserConfiguration.ReadSetting("ShowServerNotifications").ToLower()); + switch (type) { case ScriptType.Client: - case ScriptType.EasterEgg: + case ScriptType.Solo: return "_G.CSConnect(" + (info.UsesID ? GlobalVars.UserConfiguration.ReadSettingInt("UserID") : 0) + ",'" - + GlobalVars.CurrentServer.ServerIP + "'," - + GlobalVars.CurrentServer.ServerPort + ",'" + + serverIP + "'," + + serverjoinport + ",'" + (info.UsesPlayerName ? GlobalVars.UserConfiguration.ReadSetting("PlayerName") : "Player") + "'," + GlobalVars.Loadout + "," + md5s + ",'" @@ -1496,23 +1496,21 @@ namespace Novetus.Core + ((GlobalVars.ValidatedExtraFiles > 0) ? "'," + GlobalVars.ValidatedExtraFiles.ToString() + "," : "',0,") + GlobalVars.UserConfiguration.ReadSetting("NewGUI").ToLower() + ");"; case ScriptType.Server: - case ScriptType.EasterEggServer: + case ScriptType.SoloServer: return "_G.CSServer(" - + GlobalVars.UserConfiguration.ReadSetting("RobloxPort") + "," - + GlobalVars.UserConfiguration.ReadSetting("PlayerLimit") + "," + + serverport + "," + + playerLimit + "," + md5s + "," - + GlobalVars.UserConfiguration.ReadSetting("ShowServerNotifications").ToLower() + + joinNotifs + ((GlobalVars.ValidatedExtraFiles > 0) ? "," + GlobalVars.ValidatedExtraFiles.ToString() + "," : ",0,") + GlobalVars.UserConfiguration.ReadSetting("NewGUI").ToLower() + ");"; - case ScriptType.Solo: - return "_G.CSSolo(" - + (info.UsesID ? GlobalVars.UserConfiguration.ReadSettingInt("UserID") : 0) + ", '" - + (info.UsesPlayerName ? GlobalVars.UserConfiguration.ReadSetting("PlayerName") : "Player") + "'," - + GlobalVars.soloLoadout + "," - + GlobalVars.UserConfiguration.ReadSetting("NewGUI").ToLower() + ");"; case ScriptType.Studio: return "_G.CSStudio(" + GlobalVars.UserConfiguration.ReadSetting("NewGUI").ToLower() + ");"; + case ScriptType.OutfitView: + return "_G.CS3DView(0,'" + + GlobalVars.UserConfiguration.ReadSetting("PlayerName") + "'," + + GlobalVars.Loadout + ");"; default: return ""; } @@ -1527,12 +1525,12 @@ namespace Novetus.Core case ScriptType.Server: return "Server"; case ScriptType.Solo: + case ScriptType.SoloServer: return "Play Solo"; case ScriptType.Studio: return "Studio"; - case ScriptType.EasterEgg: - case ScriptType.EasterEggServer: - return "A message from Bitl"; + case ScriptType.OutfitView: + return "3D Preview"; default: return "N/A"; } @@ -1545,6 +1543,12 @@ namespace Novetus.Core public static void GenerateScriptForClient(string ClientName, ScriptType type) { + string outputPath = (GlobalVars.SelectedClientInfo.SeperateFolders ? + GlobalPaths.ClientDir + @"\\" + ClientName + @"\\" + ClientManagement.GetClientSeperateFolderName(type) + @"\\content\\scripts\\" + GlobalPaths.ScriptGenName + ".lua" : + GlobalPaths.ClientDir + @"\\" + ClientName + @"\\content\\scripts\\" + GlobalPaths.ScriptGenName + ".lua"); + + Util.FixedFileDelete(outputPath); + bool shouldUseLoadFile = GlobalVars.SelectedClientInfo.CommandLineArgs.Contains("%useloadfile%"); string execScriptMethod = shouldUseLoadFile ? "loadfile" : "dofile"; @@ -1566,10 +1570,6 @@ namespace Novetus.Core } } - string outputPath = (GlobalVars.SelectedClientInfo.SeperateFolders ? - GlobalPaths.ClientDir + @"\\" + ClientName + @"\\" + ClientManagement.GetClientSeperateFolderName(type) + @"\\content\\scripts\\" + GlobalPaths.ScriptGenName + ".lua" : - GlobalPaths.ClientDir + @"\\" + ClientName + @"\\content\\scripts\\" + GlobalPaths.ScriptGenName + ".lua"); - File.WriteAllLines(outputPath, code); bool shouldSign = GlobalVars.SelectedClientInfo.CommandLineArgs.Contains("%signgeneratedjoinscript%"); @@ -1868,7 +1868,7 @@ namespace Novetus.Core .Replace("%tripcode%", GlobalVars.PlayerTripcode) .Replace("%scripttype%", Generator.GetNameForType(type)) .Replace("%notifications%", GlobalVars.UserConfiguration.ReadSetting("ShowServerNotifications").ToLower()) - .Replace("%loadout%", code.Contains("") ? GlobalVars.soloLoadout : GlobalVars.Loadout) + .Replace("%loadout%", GlobalVars.Loadout) .Replace("%validatedextrafiles%", GlobalVars.ValidatedExtraFiles.ToString()) .Replace("%argstring%", GetRawArgsForType(type, ClientName, luafile)) .Replace("%tshirttexid%", GlobalVars.TShirtTextureID) diff --git a/Novetus/NovetusCore/StorageAndFunctions/FileManagement.cs b/Novetus/NovetusCore/StorageAndFunctions/FileManagement.cs index f5630dc..b57e0f7 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/FileManagement.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/FileManagement.cs @@ -13,6 +13,7 @@ using System.Windows.Forms; using System.Xml.Serialization; using System.Xml; using System.Xml.Linq; +using static System.Windows.Forms.LinkLabel; #if !BASICLAUNCHER using Newtonsoft.Json; #endif @@ -271,7 +272,11 @@ namespace Novetus.Core try { - userName = Environment.UserName; + string[] termspath = File.ReadAllLines(GlobalPaths.ConfigDir + "\\" + GlobalPaths.TermListFileName); + var r = new CryptoRandom(); + var randomLineNumber = r.Next(0, termspath.Length - 1); + var line = termspath[randomLineNumber]; + userName = line + NovetusFuncs.GenerateRandomNumber(); } catch (Exception) { @@ -1098,12 +1103,6 @@ namespace Novetus.Core baseClothing + extra + "'"; - GlobalVars.soloLoadout = "'" + GlobalVars.UserCustomization.ReadSetting("Hat1") + "','" + - GlobalVars.UserCustomization.ReadSetting("Hat2") + "','" + - GlobalVars.UserCustomization.ReadSetting("Hat3") + "'," + - baseClothing + - GlobalVars.UserCustomization.ReadSetting("Extra") + "'"; - if (localizeOnlineClothing) { GlobalVars.TShirtTextureID = GetItemTextureID(GlobalVars.UserCustomization.ReadSetting("TShirt"), "TShirt", new AssetCacheDefBasic("ShirtGraphic", new string[] { "Graphic" })); diff --git a/Novetus/NovetusCore/StorageAndFunctions/GlobalVars.cs b/Novetus/NovetusCore/StorageAndFunctions/GlobalVars.cs index 7ded1d8..ce2d0e8 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/GlobalVars.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/GlobalVars.cs @@ -23,8 +23,8 @@ namespace Novetus.Core Server = 1, Solo = 2, Studio = 3, - EasterEgg = 4, - EasterEggServer = 5, + SoloServer = 4, + OutfitView = 5, None = 6 } #endregion @@ -77,8 +77,7 @@ namespace Novetus.Core InSoloGame = 2, InStudio = 3, InCustomization = 4, - InEasterEggGame = 5, - LoadingURI = 6 + LoadingURI = 5 } public static IDiscordRPC.EventHandlers handlers; @@ -113,7 +112,6 @@ namespace Novetus.Core #region Customization public static string Loadout = ""; - public static string soloLoadout = ""; public static string TShirtTextureID = ""; public static string ShirtTextureID = ""; public static string PantsTextureID = ""; @@ -150,6 +148,7 @@ namespace Novetus.Core public static bool AppClosed = false; public static bool isConsoleOnly = false; public static bool isMapCompressed = false; + public static int Clicks = 0; #endregion } #endregion diff --git a/Novetus/NovetusCore/StorageAndFunctions/NovetusFuncs.cs b/Novetus/NovetusCore/StorageAndFunctions/NovetusFuncs.cs index 0b27455..b192b27 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/NovetusFuncs.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/NovetusFuncs.cs @@ -70,7 +70,7 @@ namespace Novetus.Core public static void PingMasterServer(bool online, string reason) { - if (GlobalVars.GameOpened == ScriptType.Server || GlobalVars.GameOpened == ScriptType.EasterEggServer) + if (GlobalVars.GameOpened == ScriptType.Server || GlobalVars.GameOpened == ScriptType.SoloServer) return; if (string.IsNullOrWhiteSpace(GlobalVars.UserConfiguration.ReadSetting("ServerBrowserServerAddress"))) diff --git a/Novetus/NovetusCore/StorageAndFunctions/SecurityFuncs.cs b/Novetus/NovetusCore/StorageAndFunctions/SecurityFuncs.cs index 09794c3..8059a5e 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/SecurityFuncs.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/SecurityFuncs.cs @@ -123,7 +123,8 @@ namespace Novetus.Core break; case ScriptType.Server: case ScriptType.Solo: - SetWindowText(exe.MainWindowHandle, "Novetus " + case ScriptType.SoloServer: + SetWindowText(exe.MainWindowHandle, "Novetus " + GlobalVars.ProgramInformation.Version + " - " + clientname + " " + ScriptFuncs.Generator.GetNameForType(type) @@ -137,9 +138,14 @@ namespace Novetus.Core + (string.IsNullOrWhiteSpace(mapname) ? " [Place1]" : " [" + mapname + "]") + RandomStringTitle()); break; - case ScriptType.EasterEgg: - case ScriptType.EasterEggServer: - default: + case ScriptType.OutfitView: + SetWindowText(exe.MainWindowHandle, "Novetus Avatar 3D Preview " + + GlobalVars.ProgramInformation.Version + " - " + + clientname + " " + + ScriptFuncs.Generator.GetNameForType(type) + + RandomStringTitle()); + break; + default: SetWindowText(exe.MainWindowHandle, ScriptFuncs.Generator.GetNameForType(type) + RandomStringTitle()); break; diff --git a/Novetus/NovetusLauncher/Classes/LocalVars.cs b/Novetus/NovetusLauncher/Classes/LocalVars.cs index 8c6e7de..23f1fe2 100644 --- a/Novetus/NovetusLauncher/Classes/LocalVars.cs +++ b/Novetus/NovetusLauncher/Classes/LocalVars.cs @@ -7,7 +7,6 @@ namespace NovetusLauncher class LocalVars { #region Variables - public static int Clicks = 0; public static string prevsplash = ""; public static bool launcherInitState = true; //hack for linux. store the command line variables locally. diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs index 4d5f437..10feeee 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs @@ -11,6 +11,7 @@ using System.IO; using System.Linq; using System.Net; using System.Reflection; +using System.Security.Cryptography; using System.Threading.Tasks; using System.Windows.Forms; #endregion @@ -128,40 +129,12 @@ namespace NovetusLauncher LocalVars.launcherInitState = false; } - // very hacky but hear me out - bool VC2005 = VCPPRedistInstallationDetector.IsInstalled(VCPPRedist.VCPP2005); - bool VC2008 = VCPPRedistInstallationDetector.IsInstalled(VCPPRedist.VCPP2008); - bool VC2012 = VCPPRedistInstallationDetector.IsInstalled(VCPPRedist.VCPP2012); - bool isAnyInstalled = VC2005 && VC2008 && VC2012; - string notInstalledText = ""; + bool VC2005 = CheckClientDependency(VCPPRedist.VCPP2005); + bool VC2008 = CheckClientDependency(VCPPRedist.VCPP2008); + bool VC2012 = CheckClientDependency(VCPPRedist.VCPP2012); + bool isAllInstalled = VC2005 && VC2008 && VC2012; - if (!isAnyInstalled) - { - if (!VC2005) - { - Util.ConsolePrint("WARNING - Visual C++ 2005 SP1 Redistributables have not been found. Some clients may not launch.", 5); - notInstalledText += "Visual C++ 2005 SP1 Redistributables\n"; - } - - if (!VC2008) - { - Util.ConsolePrint("WARNING - Visual C++ 2008 Redistributables have not been found. Some clients may not launch.", 5); - notInstalledText += "Visual C++ 2008 Redistributables\n"; - } - - if (!VC2012) - { - Util.ConsolePrint("WARNING - Visual C++ 2012 Redistributables have not been found. Some clients may not launch.", 5); - notInstalledText += "Visual C++ 2012 Redistributables\n"; - } - - string text = "Novetus has detected that the following dependencies are not installed:\n\n" - + notInstalledText - + "\n\nIt is recomended to download these dependencies from the Microsoft website. Installing these will prevent errors upon starting up a client, like 'side-by-side configuration' errors."; - - MessageBox.Show(text, "Novetus - Dependency Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); - } - else + if (isAllInstalled) { Util.ConsolePrint("All client dependencies are installed.", 4); } @@ -174,6 +147,25 @@ namespace NovetusLauncher return Application.ProductVersion + " (" + GlobalVars.ProgramInformation.NetVersion + ")"; } + public bool CheckClientDependency(VCPPRedist redist) + { + bool Installed = VCPPRedistInstallationDetector.IsInstalled(redist); + + if (!Installed) + { + string name = VCPPRedistInstallationDetector.GetNameForRedist(redist); + Util.ConsolePrint("WARNING - The " + name + " have not been found. Some clients may not launch.", 5); + + string text = "Novetus has detected that the " + name + " are not installed." + + "\n\nIt is recomended to download these dependencies from the Microsoft website." + + "\n\nInstalling these will prevent errors upon starting up a client, like 'side-by-side configuration' errors."; + + MessageBox.Show(text, "Novetus - Dependency Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + + return Installed; + } + public void CloseEvent(CancelEventArgs e) { if (GlobalVars.GameOpened != ScriptType.None) @@ -181,7 +173,7 @@ namespace NovetusLauncher switch (GlobalVars.GameOpened) { case ScriptType.Server: - case ScriptType.EasterEggServer: + case ScriptType.SoloServer: NovetusFuncs.PingMasterServer(false, "Removing server from Master Server list. Reason: Novetus is shutting down."); break; default: @@ -189,7 +181,7 @@ namespace NovetusLauncher } } - if (GlobalVars.AdminMode && Parent.GetType() != typeof(NovetusConsole)) + if (GlobalVars.AdminMode) { DialogResult closeNovetus = MessageBox.Show("You are in Admin Mode.\nAre you sure you want to quit Novetus?", "Novetus - Admin Mode Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (closeNovetus == DialogResult.No) @@ -359,7 +351,7 @@ namespace NovetusLauncher } } - if (gameType == ScriptType.Client && GlobalVars.LocalPlayMode && FormStyle != Settings.Style.Stylish) + if ((gameType == ScriptType.Client || gameType == ScriptType.Solo) && GlobalVars.LocalPlayMode && FormStyle != Settings.Style.Stylish) { GeneratePlayerID(); } @@ -377,16 +369,17 @@ namespace NovetusLauncher ClientManagement.LaunchRBXClient(ScriptType.Server, no3d, false, new EventHandler(ServerExited)); break; case ScriptType.Solo: - ClientManagement.LaunchRBXClient(ScriptType.Solo, false, false, new EventHandler(SoloExited)); + var SoloEvent = GlobalVars.Clicks >= 10 ? new EventHandler(EasterEggExited) : new EventHandler(SoloExited); + + ClientManagement.LaunchRBXClient(ScriptType.SoloServer, false, false, new EventHandler(ServerExited)); + await Task.Delay(1500); + ClientManagement.LaunchRBXClient(ScriptType.Solo, false, true, SoloEvent); break; case ScriptType.Studio: ClientManagement.LaunchRBXClient(ScriptType.Studio, false, nomap, new EventHandler(ClientExitedBase)); break; - case ScriptType.EasterEgg: - ClientManagement.LaunchRBXClient(ScriptType.EasterEggServer, false, false, new EventHandler(ServerExited)); - await Task.Delay(1500); - ClientManagement.LaunchRBXClient(ScriptType.EasterEgg, false, true, new EventHandler(EasterEggExited)); - break; + case ScriptType.OutfitView: + //customization handles loading of this client case ScriptType.None: default: break; @@ -400,19 +393,19 @@ namespace NovetusLauncher public void EasterEggLogic() { - if (LocalVars.Clicks <= 0) + if (GlobalVars.Clicks <= 0) { LocalVars.prevsplash = SplashLabel.Text; } - if (LocalVars.Clicks < 10) + if (GlobalVars.Clicks < 10) { - LocalVars.Clicks += 1; + GlobalVars.Clicks += 1; - switch (LocalVars.Clicks) + switch (GlobalVars.Clicks) { case 1: - SplashLabel.Text = "Hi " + GlobalVars.UserConfiguration.ReadSetting("SelectedClient") + "!"; + SplashLabel.Text = "Hi " + GlobalVars.UserConfiguration.ReadSetting("PlayerName") + "!"; break; case 3: SplashLabel.Text = "How are you doing today?"; @@ -425,7 +418,7 @@ namespace NovetusLauncher break; case 10: SplashLabel.Text = "Thank you. <3"; - StartGame(ScriptType.EasterEgg); + StartGame(ScriptType.Solo); break; default: break; @@ -480,7 +473,7 @@ namespace NovetusLauncher SplashLabel.Text = LocalVars.prevsplash; if (GlobalVars.AdminMode) { - LocalVars.Clicks = 0; + GlobalVars.Clicks = 0; } SoloExperimentalExited(sender, e); diff --git a/Novetus/NovetusLauncher/Forms/NovetusConsole.cs b/Novetus/NovetusLauncher/Forms/NovetusConsole.cs index f34e29a..a5de55a 100644 --- a/Novetus/NovetusLauncher/Forms/NovetusConsole.cs +++ b/Novetus/NovetusLauncher/Forms/NovetusConsole.cs @@ -213,11 +213,6 @@ namespace NovetusLauncher } break; case ScriptType.Solo: - { - MapArg(ConsoleArgs); - } - break; - case ScriptType.EasterEgg: default: break; } diff --git a/changelog.txt b/changelog.txt index 1cae90e..41d5ddc 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,12 @@ +EDGE Snapshot v23.8731.22692.1 +Enhancements: +- Play Solo now has its own dedicated server component, much like the original Roblox feature. This means scripts in Play Solo are far more accurate to how they're depicted in multiplayer sessions. +- Added the ability for the 3D Preview to use other clients. + - The Banhammer's animations in the 3D Preview can now be stopped mid frame. Hold down the left mouse button to play the animation. Let go of the left mouse button to stop the animation. Click and/or hold the left mouse button to switch to the next animation. +- Redid the default username generation as a response to privacy concerns. + - A term from a list of terms will be chosen, alongside a series of numbers. +- Improved Visual C++ dependency detection. +---------------------------------------------------------------------------- EDGE Snapshot v23.8728.23339.1 Enhancements: - Novetus will now set your default username to your Windows user name. diff --git a/scripts/batch/github_sync.bat b/scripts/batch/github_sync.bat index 13b3878..5386bd5 100644 --- a/scripts/batch/github_sync.bat +++ b/scripts/batch/github_sync.bat @@ -100,15 +100,9 @@ echo. echo Copying launcher scripts... SET launcherscriptdir=%basedir%\launcher if not exist "%launcherscriptdir%" mkdir "%launcherscriptdir%" -if not exist "%launcherscriptdir%/3DView" mkdir "%launcherscriptdir%/3DView" -XCOPY "%cd%\Novetus\bin\preview\content\scripts\CSView.lua" "%launcherscriptdir%/3DView" /y -SET previewcores=%launcherscriptdir%\3DView\cores -if not exist "%previewcores%" mkdir "%previewcores%" -XCOPY "%cd%\Novetus\bin\preview\content\scripts\cores\*.lua" "%previewcores%" /sy - -XCOPY "%cd%\Novetus\bin\preview\content\fonts\3DView.rbxl" "%launcherscriptdir%/3DView" /y -XCOPY "%cd%\Novetus\bin\data\Appreciation.rbxl" "%launcherscriptdir%" /y +XCOPY "%cd%\Novetus\config\launcherdata\3DView.rbxl" "%launcherscriptdir%" /y +XCOPY "%cd%\Novetus\config\launcherdata\Appreciation.rbxl" "%launcherscriptdir%" /y XCOPY "%cd%\Novetus\config\ContentProviders.xml" "%launcherscriptdir%" /y XCOPY "%cd%\Novetus\config\PartColors.xml" "%launcherscriptdir%" /y XCOPY "%cd%\Novetus\config\splashes.txt" "%launcherscriptdir%" /y diff --git a/scripts/game/2006S-Shaders/CSMPFunctions.lua b/scripts/game/2006S-Shaders/CSMPFunctions.lua index fea13c9..9d24e38 100644 --- a/scripts/game/2006S-Shaders/CSMPFunctions.lua +++ b/scripts/game/2006S-Shaders/CSMPFunctions.lua @@ -412,43 +412,6 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He end end -function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) - pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) - pcall(function() _G.CSScript_PreInit("Solo", "2006S-Shaders") end) - game:service("RunService"):run() - local plr = game.Players:createLocalPlayer(UserID) - game.Workspace:insertContent("rbxasset://Fonts//libraries.rbxm") - plr.Name = PlayerName - plr:SetAdminMode(true) - 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:service("Visit"):setUploadUrl("") - pcall(function() _G.CSScript_PostInit() end) - coroutine.resume(coroutine.create(function() - while true do - wait(0.1) - pcall(function() _G.CSScript_Update() end) - end - end)) - while true do - wait(0.001) - if (game.Lighting:findFirstChild("DisableRespawns") == nil) then - if (plr.Character ~= nil) then - if (plr.Character:findFirstChild("Humanoid") and (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 -end - function CSStudio() pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) pcall(function() _G.CSScript_PreInit("Studio", "2006S-Shaders") end) @@ -461,10 +424,56 @@ function CSStudio() end)) end +function CS3DView(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + print("3DView loaded. Nerd.") + game:service("RunService"):run() + game:SetMessage("Loading Player...") + + local plr = game.Players:createLocalPlayer(UserID) + plr.Name = PlayerName + plr:LoadCharacter() + InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID,IconType) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + + local target = game.Workspace.Base + local camera = game.Workspace.CurrentCamera + camera.CameraType = 2 + local cf = CFrame.new(0, 10, 18) + camera.CoordinateFrame = cf; + camera.CameraSubject = target + + i = true + + local function fixJump(prop) + plr.Character.Torso.Velocity = plr.Character.Torso.Velocity * Vector3.new (1, 0, 1) + if i == true then + plr.Character.Torso.CFrame = plr.Character.Torso.CFrame - Vector3.new(0, 1.8, 0) + i = false + else + i = true + end + end + + for i,v in pairs(plr.Character:children()) do + if v.className == "Part" then + v.Anchored = true + end + end + + plr.Character.Health:remove() + plr.Character.Sound:remove() + game.GuiRoot:remove() + + local human = plr.Character.Humanoid + human.Jumping:connect(fixJump) + game:ClearMessage() + game:service("NetworkClient") +end + _G.CSServer=CSServer _G.CSConnect=CSConnect -_G.CSSolo=CSSolo _G.CSStudio=CSStudio +_G.CS3DView=CS3DView -- credit to KeyboardCombination local succ = pcall(function() --check if the metatables are already read only lol diff --git a/scripts/game/2006S/CSMPFunctions.lua b/scripts/game/2006S/CSMPFunctions.lua index 812794a..0939c29 100644 --- a/scripts/game/2006S/CSMPFunctions.lua +++ b/scripts/game/2006S/CSMPFunctions.lua @@ -412,43 +412,6 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He end end -function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) - pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) - pcall(function() _G.CSScript_PreInit("Solo", "2006S") end) - game:service("RunService"):run() - local plr = game.Players:createLocalPlayer(UserID) - game.Workspace:insertContent("rbxasset://Fonts//libraries.rbxm") - plr.Name = PlayerName - plr:SetAdminMode(true) - 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:service("Visit"):setUploadUrl("") - pcall(function() _G.CSScript_PostInit() end) - coroutine.resume(coroutine.create(function() - while true do - wait(0.1) - pcall(function() _G.CSScript_Update() end) - end - end)) - while true do - wait(0.001) - if (game.Lighting:findFirstChild("DisableRespawns") == nil) then - if (plr.Character ~= nil) then - if (plr.Character:findFirstChild("Humanoid") and (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 -end - function CSStudio() pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) pcall(function() _G.CSScript_PreInit("Studio", "2006S") end) @@ -461,10 +424,56 @@ function CSStudio() end)) end +function CS3DView(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + print("3DView loaded. Nerd.") + game:service("RunService"):run() + game:SetMessage("Loading Player...") + + local plr = game.Players:createLocalPlayer(UserID) + plr.Name = PlayerName + plr:LoadCharacter() + InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID,IconType) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + + local target = game.Workspace.Base + local camera = game.Workspace.CurrentCamera + camera.CameraType = 2 + local cf = CFrame.new(0, 10, 18) + camera.CoordinateFrame = cf; + camera.CameraSubject = target + + i = true + + local function fixJump(prop) + plr.Character.Torso.Velocity = plr.Character.Torso.Velocity * Vector3.new (1, 0, 1) + if i == true then + plr.Character.Torso.CFrame = plr.Character.Torso.CFrame - Vector3.new(0, 1.8, 0) + i = false + else + i = true + end + end + + for i,v in pairs(plr.Character:children()) do + if v.className == "Part" then + v.Anchored = true + end + end + + plr.Character.Health:remove() + plr.Character.Sound:remove() + game.GuiRoot:remove() + + local human = plr.Character.Humanoid + human.Jumping:connect(fixJump) + game:ClearMessage() + game:service("NetworkClient") +end + _G.CSServer=CSServer _G.CSConnect=CSConnect -_G.CSSolo=CSSolo _G.CSStudio=CSStudio +_G.CS3DView=CS3DView -- credit to KeyboardCombination local succ = pcall(function() --check if the metatables are already read only lol diff --git a/scripts/game/2007E-Shaders/CSMPFunctions.lua b/scripts/game/2007E-Shaders/CSMPFunctions.lua index fbddbaf..71d66af 100644 --- a/scripts/game/2007E-Shaders/CSMPFunctions.lua +++ b/scripts/game/2007E-Shaders/CSMPFunctions.lua @@ -470,43 +470,6 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He end end -function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) - pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) - pcall(function() _G.CSScript_PreInit("Solo", "2007E-Shaders") end) - game:service("RunService"):run() - local plr = game.Players:createLocalPlayer(UserID) - game.Workspace:insertContent("rbxasset://Fonts//libraries.rbxm") - plr.Name = PlayerName - plr:SetAdminMode(true) - 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:service("Visit"):setUploadUrl("") - pcall(function() _G.CSScript_PostInit() end) - coroutine.resume(coroutine.create(function() - while true do - wait(0.1) - pcall(function() _G.CSScript_Update() end) - end - end)) - while true do - wait(0.001) - if (game.Lighting:findFirstChild("DisableRespawns") == nil) then - if (plr.Character ~= nil) then - if (plr.Character:findFirstChild("Humanoid") and (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 -end - function CSStudio() pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) pcall(function() _G.CSScript_PreInit("Studio", "2007E-Shaders") end) @@ -519,10 +482,57 @@ function CSStudio() end)) end +function CS3DView(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + print("3DView loaded. Nerd.") + game:service("RunService"):run() + game:SetMessage("Loading Player...") + + local plr = game.Players:createLocalPlayer(UserID) + plr.Name = PlayerName + plr:LoadCharacter() + InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID,IconType) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + + local target = game.Workspace.Base.SpawnLocation + local camera = game.Workspace.CurrentCamera + camera.CameraType = 2 + local cf = CFrame.new(0, 10, 18) + camera.CoordinateFrame = cf; + camera.CameraSubject = target + + i = true + + local function fixJump(prop) + plr.Character.Torso.Velocity = plr.Character.Torso.Velocity * Vector3.new (1, 0, 1) + if i == true then + plr.Character.Torso.CFrame = plr.Character.Torso.CFrame - Vector3.new(0, 1.8, 0) + i = false + else + i = true + end + end + + for i,v in pairs(plr.Character:children()) do + if v.className == "Part" then + v.Anchored = true + end + end + + plr.Character.Animate:remove() + plr.Character.Health:remove() + plr.Character.Sound:remove() + game.GuiRoot:remove() + + local human = plr.Character.Humanoid + human.Jumping:connect(fixJump) + game:ClearMessage() + game:service("NetworkClient") +end + _G.CSServer=CSServer _G.CSConnect=CSConnect -_G.CSSolo=CSSolo _G.CSStudio=CSStudio +_G.CS3DView=CS3DView -- credit to KeyboardCombination local succ = pcall(function() --check if the metatables are already read only lol diff --git a/scripts/game/2007E/CSMPFunctions.lua b/scripts/game/2007E/CSMPFunctions.lua index 418ca2e..9d04aaf 100644 --- a/scripts/game/2007E/CSMPFunctions.lua +++ b/scripts/game/2007E/CSMPFunctions.lua @@ -470,43 +470,6 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He end end -function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) - pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) - pcall(function() _G.CSScript_PreInit("Solo", "2007E") end) - game:service("RunService"):run() - local plr = game.Players:createLocalPlayer(UserID) - game.Workspace:insertContent("rbxasset://Fonts//libraries.rbxm") - plr.Name = PlayerName - plr:SetAdminMode(true) - 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:service("Visit"):setUploadUrl("") - pcall(function() _G.CSScript_PostInit() end) - coroutine.resume(coroutine.create(function() - while true do - wait(0.1) - pcall(function() _G.CSScript_Update() end) - end - end)) - while true do - wait(0.001) - if (game.Lighting:findFirstChild("DisableRespawns") == nil) then - if (plr.Character ~= nil) then - if (plr.Character:findFirstChild("Humanoid") and (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 -end - function CSStudio() pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) pcall(function() _G.CSScript_PreInit("Studio", "2007E") end) @@ -519,10 +482,57 @@ function CSStudio() end)) end +function CS3DView(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + print("3DView loaded. Nerd.") + game:service("RunService"):run() + game:SetMessage("Loading Player...") + + local plr = game.Players:createLocalPlayer(UserID) + plr.Name = PlayerName + plr:LoadCharacter() + InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID,IconType) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + + local target = game.Workspace.Base.SpawnLocation + local camera = game.Workspace.CurrentCamera + camera.CameraType = 2 + local cf = CFrame.new(0, 10, 18) + camera.CoordinateFrame = cf; + camera.CameraSubject = target + + i = true + + local function fixJump(prop) + plr.Character.Torso.Velocity = plr.Character.Torso.Velocity * Vector3.new (1, 0, 1) + if i == true then + plr.Character.Torso.CFrame = plr.Character.Torso.CFrame - Vector3.new(0, 1.8, 0) + i = false + else + i = true + end + end + + for i,v in pairs(plr.Character:children()) do + if v.className == "Part" then + v.Anchored = true + end + end + + plr.Character.Animate:remove() + plr.Character.Health:remove() + plr.Character.Sound:remove() + game.GuiRoot:remove() + + local human = plr.Character.Humanoid + human.Jumping:connect(fixJump) + game:ClearMessage() + game:service("NetworkClient") +end + _G.CSServer=CSServer _G.CSConnect=CSConnect -_G.CSSolo=CSSolo _G.CSStudio=CSStudio +_G.CS3DView=CS3DView -- credit to KeyboardCombination local succ = pcall(function() --check if the metatables are already read only lol diff --git a/scripts/game/2007M-Shaders/CSMPFunctions.lua b/scripts/game/2007M-Shaders/CSMPFunctions.lua index 2562b3b..356520c 100644 --- a/scripts/game/2007M-Shaders/CSMPFunctions.lua +++ b/scripts/game/2007M-Shaders/CSMPFunctions.lua @@ -527,42 +527,6 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He end end -function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) - pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) - pcall(function() _G.CSScript_PreInit("Solo", "2007M-Shaders") end) - game:GetService("RunService"):run() - local plr = game.Players:CreateLocalPlayer(UserID) - 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"):SetUploadUrl("") - pcall(function() _G.CSScript_PostInit() end) - coroutine.resume(coroutine.create(function() - while true do - wait(0.1) - pcall(function() _G.CSScript_Update() end) - end - end)) - while true do - wait(0.001) - if (game.Lighting:findFirstChild("DisableRespawns") == nil) then - if (plr.Character ~= nil) then - if (plr.Character:findFirstChild("Humanoid") and (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 -end - function CSStudio() pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) pcall(function() _G.CSScript_PreInit("Studio", "2007M-Shaders") end) @@ -575,10 +539,58 @@ function CSStudio() end)) end +function CS3DView(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + print("3DView loaded. Nerd.") + game:service("RunService"):run() + game:SetMessage("Loading Player...") + + local plr = game.Players:createLocalPlayer(UserID) + plr.Name = PlayerName + plr:LoadCharacter() + InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID,IconType) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + + local target = game.Workspace.Base.SpawnLocation + local camera = game.Workspace.CurrentCamera + camera.CameraType = 2 + local cf = CFrame.new(0, 10, 18) + camera.CoordinateFrame = cf; + camera.CameraSubject = target + + i = true + + local function fixJump(prop) + plr.Character.Torso.Velocity = plr.Character.Torso.Velocity * Vector3.new (1, 0, 1) + if i == true then + plr.Character.Torso.CFrame = plr.Character.Torso.CFrame - Vector3.new(0, 1.8, 0) + i = false + else + i = true + end + end + + wait(0.5) + for i,v in pairs(plr.Character:children()) do + if v.className == "Part" then + v.Anchored = true + end + end + + plr.Character.Animate:remove() + plr.Character.Health:remove() + plr.Character.Sound:remove() + game.GuiRoot:remove() + + local human = plr.Character.Humanoid + human.Jumping:connect(fixJump) + game:ClearMessage() + game:service("NetworkClient") +end + _G.CSServer=CSServer _G.CSConnect=CSConnect -_G.CSSolo=CSSolo _G.CSStudio=CSStudio +_G.CS3DView=CS3DView -- credit to KeyboardCombination local succ = pcall(function() --check if the metatables are already read only lol diff --git a/scripts/game/2007M/CSMPFunctions.lua b/scripts/game/2007M/CSMPFunctions.lua index db3abe9..7135f64 100644 --- a/scripts/game/2007M/CSMPFunctions.lua +++ b/scripts/game/2007M/CSMPFunctions.lua @@ -527,42 +527,6 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He end end -function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) - pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) - pcall(function() _G.CSScript_PreInit("Solo", "2007M") end) - game:GetService("RunService"):run() - local plr = game.Players:CreateLocalPlayer(UserID) - 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"):SetUploadUrl("") - pcall(function() _G.CSScript_PostInit() end) - coroutine.resume(coroutine.create(function() - while true do - wait(0.1) - pcall(function() _G.CSScript_Update() end) - end - end)) - while true do - wait(0.001) - if (game.Lighting:findFirstChild("DisableRespawns") == nil) then - if (plr.Character ~= nil) then - if (plr.Character:findFirstChild("Humanoid") and (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 -end - function CSStudio() pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) pcall(function() _G.CSScript_PreInit("Studio", "2007M") end) @@ -575,10 +539,58 @@ function CSStudio() end)) end +function CS3DView(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + print("3DView loaded. Nerd.") + game:service("RunService"):run() + game:SetMessage("Loading Player...") + + local plr = game.Players:createLocalPlayer(UserID) + plr.Name = PlayerName + plr:LoadCharacter() + InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID,IconType) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + + local target = game.Workspace.Base.SpawnLocation + local camera = game.Workspace.CurrentCamera + camera.CameraType = 2 + local cf = CFrame.new(0, 10, 18) + camera.CoordinateFrame = cf; + camera.CameraSubject = target + + i = true + + local function fixJump(prop) + plr.Character.Torso.Velocity = plr.Character.Torso.Velocity * Vector3.new (1, 0, 1) + if i == true then + plr.Character.Torso.CFrame = plr.Character.Torso.CFrame - Vector3.new(0, 1.8, 0) + i = false + else + i = true + end + end + + wait(0.5) + for i,v in pairs(plr.Character:children()) do + if v.className == "Part" then + v.Anchored = true + end + end + + plr.Character.Animate:remove() + plr.Character.Health:remove() + plr.Character.Sound:remove() + game.GuiRoot:remove() + + local human = plr.Character.Humanoid + human.Jumping:connect(fixJump) + game:ClearMessage() + game:service("NetworkClient") +end + _G.CSServer=CSServer _G.CSConnect=CSConnect -_G.CSSolo=CSSolo _G.CSStudio=CSStudio +_G.CS3DView=CS3DView -- credit to KeyboardCombination local succ = pcall(function() --check if the metatables are already read only lol diff --git a/scripts/game/2008M/CSMPFunctions.lua b/scripts/game/2008M/CSMPFunctions.lua index 5de80a1..94cc330 100644 --- a/scripts/game/2008M/CSMPFunctions.lua +++ b/scripts/game/2008M/CSMPFunctions.lua @@ -645,43 +645,6 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He end end -function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) - pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) - pcall(function() _G.CSScript_PreInit("Solo", "2008M") end) - game:GetService("RunService"):run() - local plr = game.Players:CreateLocalPlayer(UserID) - 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"):SetUploadUrl("") - pcall(function() _G.CSScript_PostInit() end) - coroutine.resume(coroutine.create(function() - while true do - wait(0.1) - pcall(function() _G.CSScript_Update() end) - end - end)) - while true do - wait(0.001) - if (game.Lighting:findFirstChild("DisableRespawns") == nil) then - if (plr.Character ~= nil) then - if (plr.Character:findFirstChild("Humanoid") and (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 -end - function CSStudio() pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) pcall(function() _G.CSScript_PreInit("Studio", "2008M") end) @@ -694,10 +657,59 @@ function CSStudio() end)) end +function CS3DView(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + print("3DView loaded. Nerd.") + game:service("RunService"):run() + game:SetMessage("Loading Player...") + + local plr = game.Players:createLocalPlayer(UserID) + plr.Name = PlayerName + plr:LoadCharacter() + InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID,IconType) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + + local target = game.Workspace.Base.SpawnLocation + local camera = game.Workspace.CurrentCamera + camera.CameraType = 2 + local cf = CFrame.new(0, 10, 18) + camera.CoordinateFrame = cf; + camera.CameraSubject = target + + i = true + + local function fixJump(prop) + plr.Character.Torso.Velocity = plr.Character.Torso.Velocity * Vector3.new (1, 0, 1) + if i == true then + plr.Character.Torso.CFrame = plr.Character.Torso.CFrame - Vector3.new(0, 1.8, 0) + i = false + else + i = true + end + end + + wait(0.5) + for i,v in pairs(plr.Character:children()) do + if v.className == "Part" then + v.Anchored = true + end + end + + plr.Character.Animate:remove() + plr.Character.Health:remove() + plr.Character.Sound:remove() + game.GuiRoot:remove() + + local human = plr.Character.Humanoid + human.Jumping:connect(fixJump) + game:ClearMessage() + game:GetService("Visit"):SetUploadUrl("") + game:service("NetworkClient") +end + _G.CSServer=CSServer _G.CSConnect=CSConnect -_G.CSSolo=CSSolo _G.CSStudio=CSStudio +_G.CS3DView=CS3DView -- credit to KeyboardCombination local succ = pcall(function() --check if the metatables are already read only lol diff --git a/scripts/game/2009E-HD/CSMPFunctions.lua b/scripts/game/2009E-HD/CSMPFunctions.lua index c95ab2d..8e53632 100644 --- a/scripts/game/2009E-HD/CSMPFunctions.lua +++ b/scripts/game/2009E-HD/CSMPFunctions.lua @@ -739,43 +739,6 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He end end -function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) - pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) - pcall(function() _G.CSScript_PreInit("Solo", "2009E-HD") end) - game:GetService("RunService"):run() - local plr = game.Players:CreateLocalPlayer(UserID) - 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"):SetUploadUrl("") - pcall(function() _G.CSScript_PostInit() end) - coroutine.resume(coroutine.create(function() - while true do - wait(0.1) - pcall(function() _G.CSScript_Update() end) - end - end)) - while true do - wait(0.001) - if (game.Lighting:findFirstChild("DisableRespawns") == nil) then - if (plr.Character ~= nil) then - if (plr.Character:findFirstChild("Humanoid") and (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 -end - function CSStudio() pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) pcall(function() _G.CSScript_PreInit("Studio", "2009E-HD") end) @@ -788,10 +751,63 @@ function CSStudio() end)) end +function CS3DView(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + print("3DView loaded. Nerd.") + game:service("RunService"):run() + game:SetMessage("Loading Player...") + + local plr = game.Players:createLocalPlayer(UserID) + plr.Name = PlayerName + plr:LoadCharacter() + InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID,IconType) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + + local target = game.Workspace.Base.SpawnLocation + local camera = game.Workspace.CurrentCamera + camera.CameraType = 2 + local cf = CFrame.new(0, 10, 18) + camera.CoordinateFrame = cf; + camera.CameraSubject = target + + i = true + + local function fixJump(prop) + plr.Character.Torso.Velocity = plr.Character.Torso.Velocity * Vector3.new (1, 0, 1) + if i == true then + plr.Character.Torso.CFrame = plr.Character.Torso.CFrame - Vector3.new(0, 1.8, 0) + i = false + else + i = true + end + end + + wait(0.5) + for i,v in pairs(plr.Character:children()) do + if v.className == "Part" then + v.Anchored = true + end + end + + plr.Character.Animate:remove() + plr.Character.Health:remove() + plr.Character.Sound:remove() + game.GuiRoot.RightPalette:remove() + game.GuiRoot.ChatMenuPanel:remove() + game.GuiRoot.HealthHud:remove() + game.GuiRoot.ScoreHud:remove() + game.GuiRoot.MainMenu:remove() + + local human = plr.Character.Humanoid + human.Jumping:connect(fixJump) + game:ClearMessage() + game:GetService("Visit"):SetUploadUrl("") + game:service("NetworkClient") +end + _G.CSServer=CSServer _G.CSConnect=CSConnect -_G.CSSolo=CSSolo _G.CSStudio=CSStudio +_G.CS3DView=CS3DView -- credit to KeyboardCombination local succ = pcall(function() --check if the metatables are already read only lol diff --git a/scripts/game/2009E/CSMPFunctions.lua b/scripts/game/2009E/CSMPFunctions.lua index ae5d933..4b9f7f7 100644 --- a/scripts/game/2009E/CSMPFunctions.lua +++ b/scripts/game/2009E/CSMPFunctions.lua @@ -739,43 +739,6 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He end end -function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) - pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) - pcall(function() _G.CSScript_PreInit("Solo", "2009E") end) - game:GetService("RunService"):run() - local plr = game.Players:CreateLocalPlayer(UserID) - 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"):SetUploadUrl("") - pcall(function() _G.CSScript_PostInit() end) - coroutine.resume(coroutine.create(function() - while true do - wait(0.1) - pcall(function() _G.CSScript_Update() end) - end - end)) - while true do - wait(0.001) - if (game.Lighting:findFirstChild("DisableRespawns") == nil) then - if (plr.Character ~= nil) then - if (plr.Character:findFirstChild("Humanoid") and (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 -end - function CSStudio() pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) pcall(function() _G.CSScript_PreInit("Studio", "2009E") end) @@ -788,10 +751,63 @@ function CSStudio() end)) end +function CS3DView(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + print("3DView loaded. Nerd.") + game:service("RunService"):run() + game:SetMessage("Loading Player...") + + local plr = game.Players:createLocalPlayer(UserID) + plr.Name = PlayerName + plr:LoadCharacter() + InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID,IconType) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + + local target = game.Workspace.Base.SpawnLocation + local camera = game.Workspace.CurrentCamera + camera.CameraType = 2 + local cf = CFrame.new(0, 10, 18) + camera.CoordinateFrame = cf; + camera.CameraSubject = target + + i = true + + local function fixJump(prop) + plr.Character.Torso.Velocity = plr.Character.Torso.Velocity * Vector3.new (1, 0, 1) + if i == true then + plr.Character.Torso.CFrame = plr.Character.Torso.CFrame - Vector3.new(0, 1.8, 0) + i = false + else + i = true + end + end + + wait(0.5) + for i,v in pairs(plr.Character:children()) do + if v.className == "Part" then + v.Anchored = true + end + end + + plr.Character.Animate:remove() + plr.Character.Health:remove() + plr.Character.Sound:remove() + game.GuiRoot.RightPalette:remove() + game.GuiRoot.ChatMenuPanel:remove() + game.GuiRoot.HealthHud:remove() + game.GuiRoot.ScoreHud:remove() + game.GuiRoot.MainMenu:remove() + + local human = plr.Character.Humanoid + human.Jumping:connect(fixJump) + game:ClearMessage() + game:GetService("Visit"):SetUploadUrl("") + game:service("NetworkClient") +end + _G.CSServer=CSServer _G.CSConnect=CSConnect -_G.CSSolo=CSSolo _G.CSStudio=CSStudio +_G.CS3DView=CS3DView -- credit to KeyboardCombination local succ = pcall(function() --check if the metatables are already read only lol diff --git a/scripts/game/2009L/CSMPFunctions.lua b/scripts/game/2009L/CSMPFunctions.lua index 27c966a..6401058 100644 --- a/scripts/game/2009L/CSMPFunctions.lua +++ b/scripts/game/2009L/CSMPFunctions.lua @@ -743,45 +743,6 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He end end -function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) - pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) - pcall(function() _G.CSScript_PreInit("Solo", "2009L") end) - game:GetService("RunService"):Run() - local plr = game.Players:CreateLocalPlayer(UserID) - 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) - wait(0.5) - LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) - game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") - game:GetService("Visit"):SetUploadUrl("") - pcall(function() _G.CSScript_PostInit() end) - coroutine.resume(coroutine.create(function() - while true do - wait(0.1) - pcall(function() _G.CSScript_Update() end) - end - end)) - - while true do - wait(0.001) - if (game.Lighting:findFirstChild("DisableRespawns") == nil) then - if (plr.Character ~= nil) then - if (plr.Character:findFirstChild("Humanoid") and (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 -end - function CSStudio() pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) pcall(function() _G.CSScript_PreInit("Studio", "2009L") end) @@ -794,10 +755,53 @@ function CSStudio() end)) end +function CS3DView(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + print("3DView loaded. Nerd.") + game:GetService("RunService"):run() + game:SetMessage("Loading Player...") + + local plr = game.Players:CreateLocalPlayer(UserID) + 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,IconType) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + plr.Character.Animate:remove() + plr.Character.Health:remove() + plr.Character.Sound:remove() + + local target = game.Workspace.Base.SpawnLocation + local camera = game.Workspace.CurrentCamera + camera.CameraType = Enum.CameraType.Watch + local cf = CFrame.new(0, 10, 18) + camera.CoordinateFrame = cf; + camera.CameraSubject = target + + i = true + + local function fixJump(prop) + plr.Character.Torso.Velocity = plr.Character.Torso.Velocity * Vector3.new (1, 0, 1) + if i == true then + plr.Character.Torso.CFrame = plr.Character.Torso.CFrame - Vector3.new(0, 1.8, 0) + i = false + else + i = true + end + end + + local human = plr.Character.Humanoid + + human.WalkSpeed = 0 + human.Jumping:connect(fixJump) + + game:GetService("Visit"):SetUploadUrl("") + game:ClearMessage() +end + _G.CSServer=CSServer _G.CSConnect=CSConnect -_G.CSSolo=CSSolo _G.CSStudio=CSStudio +_G.CS3DView=CS3DView -- credit to KeyboardCombination local succ = pcall(function() --check if the metatables are already read only lol diff --git a/scripts/game/2010L/CSMPFunctions.lua b/scripts/game/2010L/CSMPFunctions.lua index 517a26d..79cc101 100644 --- a/scripts/game/2010L/CSMPFunctions.lua +++ b/scripts/game/2010L/CSMPFunctions.lua @@ -743,46 +743,6 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He end end -function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) - pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) - pcall(function() _G.CSScript_PreInit("Solo", "2010L") end) - game:GetService("RunService"):Run() - local plr = game.Players:CreateLocalPlayer(UserID) - 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) - wait(0.5) - 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"):SetUploadUrl("") - pcall(function() _G.CSScript_PostInit() end) - coroutine.resume(coroutine.create(function() - while true do - wait(0.1) - pcall(function() _G.CSScript_Update() end) - end - end)) - while true do - wait(0.001) - if (game.Lighting:findFirstChild("DisableRespawns") == nil) then - if (plr.Character ~= nil) then - if (plr.Character:findFirstChild("Humanoid") and (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 -end - function CSStudio() pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) pcall(function() _G.CSScript_PreInit("Studio", "2010L") end) @@ -795,10 +755,62 @@ function CSStudio() end)) end +function CS3DView(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + print("3DView loaded. Nerd.") + game:GetService("RunService"):Run() + game:SetMessage("Loading Player...") + + local plr = game.Players:CreateLocalPlayer(UserID) + 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" or string.match(IconType, "http") == "http") 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,IconType) + wait(0.79) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + + local target = game.Workspace.Base.SpawnLocation + local camera = game.Workspace.CurrentCamera + camera.CameraType = Enum.CameraType.Watch + local cf = CFrame.new(0, 10, 18) * CFrame.Angles(math.rad(180), 0, 0) + camera.CoordinateFrame = cf; + camera.CameraSubject = target + + i = true + + local function fixJump(prop) + plr.Character.Torso.Velocity = plr.Character.Torso.Velocity * Vector3.new (1, 0, 1) + if i == true then + plr.Character.Torso.CFrame = plr.Character.Torso.CFrame - Vector3.new(0, 1.8, 0) + i = false + else + i = true + end + end + + local human = plr.Character.Humanoid + + plr.Character.Animate:remove() + + human.WalkSpeed = 0 + human.Jumping:connect(fixJump) + + game:GetService("Visit"):SetUploadUrl("") + game:ClearMessage() +end + _G.CSServer=CSServer _G.CSConnect=CSConnect -_G.CSSolo=CSSolo _G.CSStudio=CSStudio +_G.CS3DView=CS3DView -- credit to KeyboardCombination local succ = pcall(function() --check if the metatables are already read only lol diff --git a/scripts/game/2011M/CSMPFunctions.lua b/scripts/game/2011M/CSMPFunctions.lua index 3d83d8f..8fce9a9 100644 --- a/scripts/game/2011M/CSMPFunctions.lua +++ b/scripts/game/2011M/CSMPFunctions.lua @@ -798,62 +798,6 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He InitalizeTripcode(Player,Tripcode) end -function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,NewGUI) - pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) - pcall(function() _G.CSScript_PreInit("Solo", "2011M") end) - pcall(function() - id = -1 - if NewGUI == true then - id = 1337 - end - game:SetPlaceID(id, false) - end) - dofile("rbxasset://scripts\\cores\\StarterScript.lua") - game:GetService("RunService"):Run() - local plr = game.Players:CreateLocalPlayer(UserID) - 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" or string.match(IconType, "http") == "http") 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,IconType) - wait(0.7) - LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) - game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") - game:GetService("Visit"):SetUploadUrl("") - pcall(function() _G.CSScript_PostInit() end) - coroutine.resume(coroutine.create(function() - while true do - wait(0.1) - pcall(function() _G.CSScript_Update() end) - end - end)) - while true do - wait(0.001) - if (game.Lighting:findFirstChild("DisableRespawns") == nil) then - if (plr.Character ~= nil) then - if (plr.Character:findFirstChild("Humanoid") and (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 -end - function CSStudio(NewGUI) pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) pcall(function() _G.CSScript_PreInit("Studio", "2011M") end) @@ -874,7 +818,73 @@ function CSStudio(NewGUI) end)) end +function CS3DView(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + print("3DView loaded. Nerd.") + dofile("rbxasset://scripts\\cores\\StarterScript3DView.lua") + game:GetService("RunService"):Run() + game:SetMessage("Loading Player...") + + local plr = game.Players:CreateLocalPlayer(UserID) + 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" or string.match(IconType, "http") == "http") 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,IconType) + wait(0.79) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + + plr.Character.Animate:remove() + plr.Character.Health:remove() + plr.Character["HealthScript v3.1"]:remove() + plr.Character.RobloxTeam:remove() + plr.Character.Sound:remove() + plr.PlayerGui.HealthGUI:remove() + + game.CoreGui.RobloxGui.ControlFrame.TopLeftControl:Remove() + game.CoreGui.RobloxGui.ControlFrame.BottomLeftControl:Remove() + game.CoreGui.RobloxGui.ControlFrame.BottomRightControl:Remove() + game.GuiRoot.RightPalette:Remove() + game.GuiRoot.ChatMenuPanel:Remove() + game.GuiRoot.ScoreHud:Remove() + game.GuiRoot.ChatHud:Remove() + + local target = game.Workspace.Base.SpawnLocation + local camera = game.Workspace.CurrentCamera + camera.CameraType = Enum.CameraType.Watch + local cf = CFrame.new(0, 10, 18) * CFrame.Angles(math.rad(180), 0, 0) + camera.CoordinateFrame = cf; + camera.CameraSubject = target + + i = true + + local function fixJump(prop) + plr.Character.Torso.Velocity = plr.Character.Torso.Velocity * Vector3.new (1, 0, 1) + if i == true then + plr.Character.Torso.CFrame = plr.Character.Torso.CFrame - Vector3.new(0, 1.8, 0) + i = false + else + i = true + end + end + + local human = plr.Character.Humanoid + + human.WalkSpeed = 0 + human.Jumping:connect(fixJump) + + game:GetService("Visit"):SetUploadUrl("") + game:ClearMessage() +end + _G.CSServer=CSServer _G.CSConnect=CSConnect -_G.CSSolo=CSSolo -_G.CSStudio=CSStudio \ No newline at end of file +_G.CSStudio=CSStudio +_G.CS3DView=CS3DView \ No newline at end of file diff --git a/scripts/game/2011M/cores/StarterScript3DView.lua b/scripts/game/2011M/cores/StarterScript3DView.lua new file mode 100644 index 0000000..9cad57c --- /dev/null +++ b/scripts/game/2011M/cores/StarterScript3DView.lua @@ -0,0 +1,61 @@ +-- Creates all neccessary scripts for the gui on initial load, everything except build tools +-- Created by Ben T. 10/29/10 +-- Please note that these are loaded in a specific order to diminish errors/perceived load time by user + +delay(0, function() + +print("Accurate CS by Matt Brown.") + +local function waitForChild(instance, name) + while not instance:FindFirstChild(name) do + instance.ChildAdded:wait() + end +end +local function waitForProperty(instance, property) + while not instance[property] do + instance.Changed:wait() + end +end + + +local backpackTestPlaces = {41324860,87241143,1818,65033,25415,14403,33913,21783593,17467963,3271,16184658} + +waitForChild(game:GetService("CoreGui"),"RobloxGui") +local screenGui = game:GetService("CoreGui"):FindFirstChild("RobloxGui") + +local scriptContext = game:GetService("ScriptContext") + +-- Resizer (dynamically resizes gui) +dofile("rbxasset://scripts\\cores\\Resizer.lua") + +-- SubMenuBuilder (builds out the material,surface and color panels) +dofile("rbxasset://scripts\\cores\\SubMenuBuilder.lua") + +-- ToolTipper (creates tool tips for gui) +dofile("rbxasset://scripts\\cores\\ToolTipper.lua") + +--[[if game.CoreGui.Version < 2 then + -- (controls the movement and selection of sub panels) + -- PaintMenuMover + scriptContext:AddCoreScript(36040464,screenGui.BuildTools.Frame.PropertyTools.PaintTool,"PaintMenuMover") + -- MaterialMenuMover + scriptContext:AddCoreScript(36040495,screenGui.BuildTools.Frame.PropertyTools.MaterialSelector,"MaterialMenuMover") + -- InputMenuMover + scriptContext:AddCoreScript(36040483,screenGui.BuildTools.Frame.PropertyTools.InputSelector,"InputMenuMover") +end]] + +-- SettingsScript +dofile("rbxasset://scripts\\cores\\SettingsScript.lua") + +-- MainBotChatScript +dofile("rbxasset://scripts\\cores\\MainBotChatScript.lua") + +if game.CoreGui.Version >= 2 then + -- New Player List + dofile("rbxasset://scripts\\cores\\PlayerlistScript.lua") + -- Popup Script + dofile("rbxasset://scripts\\cores\\PopupScript.lua") + -- Friend Notification Script (probably can use this script to expand out to other notifications) + dofile("rbxasset://scripts\\cores\\NotificationScript.lua") +end +end) \ No newline at end of file diff --git a/scripts/game/2012M/CSMPFunctions.lua b/scripts/game/2012M/CSMPFunctions.lua index 2d1acda..988d2ec 100644 --- a/scripts/game/2012M/CSMPFunctions.lua +++ b/scripts/game/2012M/CSMPFunctions.lua @@ -789,55 +789,6 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He InitalizeTripcode(Player,Tripcode) end -function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,NewGUI) - pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) - pcall(function() _G.CSScript_PreInit("Solo", "2012M") end) - pcall(function() game:SetPlaceID(-1, false) end) - dofile("rbxasset://scripts\\cores\\StarterScript.lua") - game:GetService("RunService"):Run() - local plr = game.Players:CreateLocalPlayer(UserID) - 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" or string.match(IconType, "http") == "http") 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,IconType) - wait(0.7) - delay(0.5,function() LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character) end) - game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") - game:GetService("Visit"):SetUploadUrl("") - pcall(function() _G.CSScript_PostInit() end) - coroutine.resume(coroutine.create(function() - while true do - wait(0.1) - pcall(function() _G.CSScript_Update() end) - end - end)) - while true do - wait(0.001) - if (game.Lighting:findFirstChild("DisableRespawns") == nil) then - if (plr.Character ~= nil) then - if (plr.Character:findFirstChild("Humanoid") and (plr.Character.Humanoid.Health == 0)) then - wait(5) - plr:LoadCharacter() - delay(0.5,function() LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character) end) - elseif (plr.Character.Parent == nil) then - wait(5) - plr:LoadCharacter() -- to make sure nobody is deleted. - delay(0.5,function() LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character) end) - end - end - end - end -end - function CSStudio(NewGUI) pcall(function() dofile("rbxasset://..//..//..//addons//core//AddonLoader.lua") end) pcall(function() _G.CSScript_PreInit("Studio", "2012M") end) @@ -852,7 +803,70 @@ function CSStudio(NewGUI) end)) end +function CS3DView(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) + print("3DView loaded. Nerd.") + dofile("rbxasset://scripts\\cores\\StarterScript3DView.lua") + game:GetService("RunService"):Run() + game:SetMessage("Loading Player...") + + local plr = game.Players:CreateLocalPlayer(UserID) + 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" or string.match(IconType, "http") == "http") 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,IconType) + wait(0.79) + LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) + + plr.Character.Animate:remove() + plr.Character.Health:remove() + plr.Character["HealthScript v3.1"]:remove() + plr.Character.RobloxTeam:remove() + plr.Character.Sound:remove() + plr.PlayerGui.HealthGUI:remove() + + game.CoreGui.RobloxGui.ControlFrame:Remove() + game.GuiRoot.RightPalette:Remove() + game.GuiRoot.ChatMenuPanel:Remove() + game.GuiRoot.ChatHud:Remove() + + local target = game.Workspace.Base.SpawnLocation + local camera = game.Workspace.CurrentCamera + camera.CameraType = Enum.CameraType.Watch + local cf = CFrame.new(0, 10, 18) * CFrame.Angles(math.rad(180), 0, 0) + camera.CoordinateFrame = cf; + camera.CameraSubject = target + + i = true + + local function fixJump(prop) + plr.Character.Torso.Velocity = plr.Character.Torso.Velocity * Vector3.new (1, 0, 1) + if i == true then + plr.Character.Torso.CFrame = plr.Character.Torso.CFrame - Vector3.new(0, 1.8, 0) + i = false + else + i = true + end + end + + local human = plr.Character.Humanoid + + human.WalkSpeed = 0 + human.Jumping:connect(fixJump) + + game:GetService("Visit"):SetUploadUrl("") + game:ClearMessage() +end + _G.CSServer=CSServer _G.CSConnect=CSConnect -_G.CSSolo=CSSolo -_G.CSStudio=CSStudio \ No newline at end of file +_G.CSStudio=CSStudio +_G.CS3DView=CS3DView \ No newline at end of file diff --git a/scripts/game/2012M/cores/StarterScript3DView.lua b/scripts/game/2012M/cores/StarterScript3DView.lua new file mode 100644 index 0000000..24d5236 --- /dev/null +++ b/scripts/game/2012M/cores/StarterScript3DView.lua @@ -0,0 +1,88 @@ + +-- Creates all neccessary scripts for the gui on initial load, everything except build tools +-- Created by Ben T. 10/29/10 +-- Please note that these are loaded in a specific order to diminish errors/perceived load time by user + +delay(0, function() + +print("Accurate CS by Matt Brown.") + +local function waitForChild(instance, name) + while not instance:FindFirstChild(name) do + instance.ChildAdded:wait() + end +end +local function waitForProperty(instance, property) + while not instance[property] do + instance.Changed:wait() + end +end + + +local backpackTestPlaces = {41324860,87241143,1818,65033,25415,14403,33913,21783593,17467963,3271,16184658} + +waitForChild(game:GetService("CoreGui"),"RobloxGui") +local screenGui = game:GetService("CoreGui"):FindFirstChild("RobloxGui") + +local scriptContext = game:GetService("ScriptContext") + +-- Resizer (dynamically resizes gui) +dofile("rbxasset://scripts\\cores\\Resizer.lua") + +-- SubMenuBuilder (builds out the material,surface and color panels) +dofile("rbxasset://scripts\\cores\\SubMenuBuilder.lua") + +-- ToolTipper (creates tool tips for gui) +dofile("rbxasset://scripts\\cores\\ToolTipper.lua") + +--[[if game.CoreGui.Version < 2 then + -- (controls the movement and selection of sub panels) + -- PaintMenuMover + scriptContext:AddCoreScript(36040464,screenGui.BuildTools.Frame.PropertyTools.PaintTool,"PaintMenuMover") + -- MaterialMenuMover + scriptContext:AddCoreScript(36040495,screenGui.BuildTools.Frame.PropertyTools.MaterialSelector,"MaterialMenuMover") + -- InputMenuMover + scriptContext:AddCoreScript(36040483,screenGui.BuildTools.Frame.PropertyTools.InputSelector,"InputMenuMover") +end]] + +-- SettingsScript +dofile("rbxasset://scripts\\cores\\SettingsScript.lua") + +-- MainBotChatScript +dofile("rbxasset://scripts\\cores\\MainBotChatScript.lua") + +if game.CoreGui.Version >= 2 then + -- New Player List + dofile("rbxasset://scripts\\cores\\PlayerlistScript.lua") + -- Popup Script + dofile("rbxasset://scripts\\cores\\PopupScript.lua") + -- Friend Notification Script (probably can use this script to expand out to other notifications) + dofile("rbxasset://scripts\\cores\\NotificationScript.lua") +end + +if game.CoreGui.Version >= 3 then + waitForProperty(game,"PlaceId") + local inRightPlace = false + for i,v in ipairs(backpackTestPlaces) do + if v == game.PlaceId then + inRightPlace = true + break + end + end + + waitForChild(game,"Players") + waitForProperty(game.Players,"LocalPlayer") + if game.Players.LocalPlayer.userId == 7210880 or game.Players.LocalPlayer.userId == 0 then inRightPlace = true end + + --if not inRightPlace then return end -- restricting availability of backpack + + -- Backpack Builder + dofile("rbxasset://scripts\\cores\\BackpackBuilder.lua") + waitForChild(screenGui,"CurrentLoadout") + waitForChild(screenGui.CurrentLoadout,"TempSlot") + waitForChild(screenGui.CurrentLoadout.TempSlot,"SlotNumber") + -- Backpack Script + dofile("rbxasset://scripts\\cores\\BackpackScript.lua") +end + +end) \ No newline at end of file diff --git a/scripts/launcher/3DView/3DView.rbxl b/scripts/launcher/3DView.rbxl similarity index 70% rename from scripts/launcher/3DView/3DView.rbxl rename to scripts/launcher/3DView.rbxl index 5ca50cb..55ec180 100644 --- a/scripts/launcher/3DView/3DView.rbxl +++ b/scripts/launcher/3DView.rbxl @@ -21,7 +21,6 @@ Workspace null - true @@ -41,7 +40,6 @@ Base null - true @@ -71,7 +69,6 @@ true 0.5 - 2 0.300000012 -0.5 0.5 @@ -104,7 +101,7 @@ 0 0 - true + 2 1 18 @@ -143,7 +140,6 @@ false 0 0.5 - 2 0.300000012 -0.5 0.5 @@ -178,7 +174,7 @@ 0 0 - true + 2 1 6 @@ -215,7 +211,6 @@ true 0.5 - 0 0.300000012 -0.5 0.5 @@ -248,7 +243,7 @@ 0 0 - true + 0 1 16 @@ -285,7 +280,6 @@ true 0.5 - 0 0.300000012 -0.5 0.5 @@ -318,7 +312,7 @@ 0 0 - true + 0 1 16 @@ -355,7 +349,6 @@ true 0.5 - 0 0.300000012 -0.5 0.5 @@ -388,7 +381,7 @@ 0 0 - true + 0 1 16 @@ -425,7 +418,6 @@ true 0.5 - 0 0.300000012 -0.5 0.5 @@ -458,7 +450,7 @@ 0 0 - true + 0 1 16 @@ -473,19 +465,20 @@ null 0 - -15.8144407 - 27.562851 - -16.619154 - -0.715869188 - 0.419248611 - -0.558356404 - 1.49011612e-008 - 0.799669027 - 0.600441039 - 0.698234439 - 0.429837227 - -0.572458386 + -9.99471855 + 31.509964 + -15.371006 + -0.930511177 + 0.310275495 + -0.194622949 + -0 + 0.531374097 + 0.847137332 + 0.366263509 + 0.788270772 + -0.494449526 + 70 -6.88076401 17.955822 @@ -501,7 +494,6 @@ 1 Camera - true @@ -510,72 +502,105 @@ Startup for _, newtool in ipairs(game.Lighting.ClassicWeapons:GetChildren()) do - if newtool:IsA("Tool") then - copiedtool = newtool:Clone() - copiedtool.Parent = game.StarterPack - end + if newtool:IsA("Tool") then + copiedtool = newtool:Clone() + copiedtool.Parent = game.StarterPack + end end - true CurPlayerAnim none - true + + + + + true + true + -0.5 + 0.5 + 0 + 0 + -0.5 + 0.5 + 4 + 0 + 194 + + -2 + 126 + -2 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 1 + + true + + 0.5 + 0.300000012 + -0.5 + 0.5 + 0 + 0 + -0.5 + 0.5 + 0 + 0 + true + 256 + Terrain + 0 + -0.5 + 0.5 + 0 + 0 + + 0 + 0 + 0 + + -0.5 + 0.5 + 3 + 0 + 0 + + 0 + 0 + 0 + + + 2044 + 252 + 2044 + - - - Run Service - true - - - - - Instance - true - - - - - ContentFilter - true - - - - - Instance - true - - - - - 12 - Players - true - - - + StarterPack - true - + StarterGui true - true - + 3DViewUI - true - + true false @@ -583,8 +608,11 @@ end 0.600000024 4279308561 0 + false + false 2 3 + false BaseTransparency 1 @@ -603,35 +631,36 @@ end 0 Change Base Transparency 4294967295 + false + 4278190080 + 1 0 - false + false 2 1 true 1 - true - + false LocalScript function onClicked() - if (game.Workspace.Base.baseplate.Transparency == 0) then - game.Workspace.Base.baseplate.Transparency = 0.5 - elseif (game.Workspace.Base.baseplate.Transparency == 0.5) then - game.Workspace.Base.baseplate.Transparency = 1 - elseif (game.Workspace.Base.baseplate.Transparency == 1) then - game.Workspace.Base.baseplate.Transparency = 0 - end + if (game.Workspace.Base.baseplate.Transparency == 0) then + game.Workspace.Base.baseplate.Transparency = 0.5 + elseif (game.Workspace.Base.baseplate.Transparency == 0.5) then + game.Workspace.Base.baseplate.Transparency = 1 + elseif (game.Workspace.Base.baseplate.Transparency == 1) then + game.Workspace.Base.baseplate.Transparency = 0 + end end script.Parent.MouseButton1Down:connect(onClicked) - true - + true false @@ -639,8 +668,11 @@ script.Parent.MouseButton1Down:connect(onClicked) 0.600000024 4279308561 0 + false + false 2 3 + false BackgroundColor 1 @@ -659,120 +691,134 @@ script.Parent.MouseButton1Down:connect(onClicked) 0 Change Background Color 4294967295 + false + 4278190080 + 1 0 - false + false 2 1 true 1 - true - + false LocalScript function onClicked() - if (game.Lighting.Sky.SkyboxBk == "rbxasset://Sky/modernsky512_bk.png") then - game.Lighting.Sky.SkyboxBk = "rbxasset://Sky/red.jpg" - game.Lighting.Sky.SkyboxDn = "rbxasset://Sky/red.jpg" - game.Lighting.Sky.SkyboxFt = "rbxasset://Sky/red.jpg" - game.Lighting.Sky.SkyboxLf = "rbxasset://Sky/red.jpg" - game.Lighting.Sky.SkyboxRt = "rbxasset://Sky/red.jpg" - game.Lighting.Sky.SkyboxUp = "rbxasset://Sky/red.jpg" - elseif (game.Lighting.Sky.SkyboxBk == "rbxasset://Sky/red.jpg") then - game.Lighting.Sky.SkyboxBk = "rbxasset://Sky/green.jpg" - game.Lighting.Sky.SkyboxDn = "rbxasset://Sky/green.jpg" - game.Lighting.Sky.SkyboxFt = "rbxasset://Sky/green.jpg" - game.Lighting.Sky.SkyboxLf = "rbxasset://Sky/green.jpg" - game.Lighting.Sky.SkyboxRt = "rbxasset://Sky/green.jpg" - game.Lighting.Sky.SkyboxUp = "rbxasset://Sky/green.jpg" - elseif (game.Lighting.Sky.SkyboxBk == "rbxasset://Sky/green.jpg") then - game.Lighting.Sky.SkyboxBk = "rbxasset://Sky/orange.jpg" - game.Lighting.Sky.SkyboxDn = "rbxasset://Sky/orange.jpg" - game.Lighting.Sky.SkyboxFt = "rbxasset://Sky/orange.jpg" - game.Lighting.Sky.SkyboxLf = "rbxasset://Sky/orange.jpg" - game.Lighting.Sky.SkyboxRt = "rbxasset://Sky/orange.jpg" - game.Lighting.Sky.SkyboxUp = "rbxasset://Sky/orange.jpg" - elseif (game.Lighting.Sky.SkyboxBk == "rbxasset://Sky/orange.jpg") then - game.Lighting.Sky.SkyboxBk = "rbxasset://Sky/black.jpg" - game.Lighting.Sky.SkyboxDn = "rbxasset://Sky/black.jpg" - game.Lighting.Sky.SkyboxFt = "rbxasset://Sky/black.jpg" - game.Lighting.Sky.SkyboxLf = "rbxasset://Sky/black.jpg" - game.Lighting.Sky.SkyboxRt = "rbxasset://Sky/black.jpg" - game.Lighting.Sky.SkyboxUp = "rbxasset://Sky/black.jpg" - elseif (game.Lighting.Sky.SkyboxBk == "rbxasset://Sky/black.jpg") then - game.Lighting.Sky.SkyboxBk = "rbxasset://Sky/white.jpg" - game.Lighting.Sky.SkyboxDn = "rbxasset://Sky/white.jpg" - game.Lighting.Sky.SkyboxFt = "rbxasset://Sky/white.jpg" - game.Lighting.Sky.SkyboxLf = "rbxasset://Sky/white.jpg" - game.Lighting.Sky.SkyboxRt = "rbxasset://Sky/white.jpg" - game.Lighting.Sky.SkyboxUp = "rbxasset://Sky/white.jpg" - elseif (game.Lighting.Sky.SkyboxBk == "rbxasset://Sky/white.jpg") then - game.Lighting.Sky.SkyboxBk = "rbxasset://Sky/greenscreen.jpg" - game.Lighting.Sky.SkyboxDn = "rbxasset://Sky/greenscreen.jpg" - game.Lighting.Sky.SkyboxFt = "rbxasset://Sky/greenscreen.jpg" - game.Lighting.Sky.SkyboxLf = "rbxasset://Sky/greenscreen.jpg" - game.Lighting.Sky.SkyboxRt = "rbxasset://Sky/greenscreen.jpg" - game.Lighting.Sky.SkyboxUp = "rbxasset://Sky/greenscreen.jpg" - elseif (game.Lighting.Sky.SkyboxBk == "rbxasset://Sky/greenscreen.jpg") then - game.Lighting.Sky.SkyboxBk = "rbxasset://Sky/blue.jpg" - game.Lighting.Sky.SkyboxDn = "rbxasset://Sky/blue.jpg" - game.Lighting.Sky.SkyboxFt = "rbxasset://Sky/blue.jpg" - game.Lighting.Sky.SkyboxLf = "rbxasset://Sky/blue.jpg" - game.Lighting.Sky.SkyboxRt = "rbxasset://Sky/blue.jpg" - game.Lighting.Sky.SkyboxUp = "rbxasset://Sky/blue.jpg" - elseif (game.Lighting.Sky.SkyboxBk == "rbxasset://Sky/blue.jpg") then - game.Lighting.Sky.SkyboxBk = "rbxasset://Sky/plainsky512_bk.jpg" - game.Lighting.Sky.SkyboxDn = "rbxasset://Sky/plainsky512_dn.jpg" - game.Lighting.Sky.SkyboxFt = "rbxasset://Sky/plainsky512_ft.jpg" - game.Lighting.Sky.SkyboxLf = "rbxasset://Sky/plainsky512_lf.jpg" - game.Lighting.Sky.SkyboxRt = "rbxasset://Sky/plainsky512_rt.jpg" - game.Lighting.Sky.SkyboxUp = "rbxasset://Sky/plainsky512_up.jpg" - elseif (game.Lighting.Sky.SkyboxBk == "rbxasset://Sky/plainsky512_bk.jpg") then - game.Lighting.Sky.SkyboxBk = "rbxasset://../../../shareddata/sky/GreySky_bk.png" - game.Lighting.Sky.SkyboxDn = "rbxasset://../../../shareddata/sky/GreySky_dn.png" - game.Lighting.Sky.SkyboxFt = "rbxasset://../../../shareddata/sky/GreySky_ft.png" - game.Lighting.Sky.SkyboxLf = "rbxasset://../../../shareddata/sky/GreySky_lf.png" - game.Lighting.Sky.SkyboxRt = "rbxasset://../../../shareddata/sky/GreySky_rt.png" - game.Lighting.Sky.SkyboxUp = "rbxasset://../../../shareddata/sky/GreySky_up.png" - elseif (game.Lighting.Sky.SkyboxBk == "rbxasset://../../../shareddata/sky/GreySky_bk.png") then - game.Lighting.Sky.SkyboxBk = "rbxasset://../../../shareddata/sky/redsky512_bk.png" - game.Lighting.Sky.SkyboxDn = "rbxasset://../../../shareddata/sky/redsky512_dn.png" - game.Lighting.Sky.SkyboxFt = "rbxasset://../../../shareddata/sky/redsky512_ft.png" - game.Lighting.Sky.SkyboxLf = "rbxasset://../../../shareddata/sky/redsky512_lf.png" - game.Lighting.Sky.SkyboxRt = "rbxasset://../../../shareddata/sky/redsky512_rt.png" - game.Lighting.Sky.SkyboxUp = "rbxasset://../../../shareddata/sky/redsky512_up.png" - elseif (game.Lighting.Sky.SkyboxBk == "rbxasset://../../../shareddata/sky/redsky512_bk.png") then - game.Lighting.Sky.SkyboxBk = "rbxasset://../../../shareddata/sky/darksky512_bk.png" - game.Lighting.Sky.SkyboxDn = "rbxasset://../../../shareddata/sky/darksky512_dn.png" - game.Lighting.Sky.SkyboxFt = "rbxasset://../../../shareddata/sky/darksky512_ft.png" - game.Lighting.Sky.SkyboxLf = "rbxasset://../../../shareddata/sky/darksky512_lf.png" - game.Lighting.Sky.SkyboxRt = "rbxasset://../../../shareddata/sky/darksky512_rt.png" - game.Lighting.Sky.SkyboxUp = "rbxasset://../../../shareddata/sky/darksky512_up.png" - elseif (game.Lighting.Sky.SkyboxBk == "rbxasset://../../../shareddata/sky/darksky512_bk.png") then - game.Lighting.Sky.SkyboxBk = "rbxasset://Sky/modernsky512_bk.jpg" - game.Lighting.Sky.SkyboxDn = "rbxasset://Sky/modernsky512_dn.jpg" - game.Lighting.Sky.SkyboxFt = "rbxasset://Sky/modernsky512_ft.jpg" - game.Lighting.Sky.SkyboxLf = "rbxasset://Sky/modernsky512_lf.jpg" - game.Lighting.Sky.SkyboxRt = "rbxasset://Sky/modernsky512_rt.jpg" - game.Lighting.Sky.SkyboxUp = "rbxasset://Sky/modernsky512_up.jpg" - else - game.Lighting.Sky.SkyboxBk = "rbxasset://Sky/red.jpg" - game.Lighting.Sky.SkyboxDn = "rbxasset://Sky/red.jpg" - game.Lighting.Sky.SkyboxFt = "rbxasset://Sky/red.jpg" - game.Lighting.Sky.SkyboxLf = "rbxasset://Sky/red.jpg" - game.Lighting.Sky.SkyboxRt = "rbxasset://Sky/red.jpg" - game.Lighting.Sky.SkyboxUp = "rbxasset://Sky/red.jpg" - end + if (game.Lighting.Sky.SkyboxBk == "rbxasset://../../../shareddata/sky/blue.jpg") then + game.Lighting.Sky.SkyboxBk = "rbxasset://../../../shareddata/sky/red.jpg" + game.Lighting.Sky.SkyboxDn = "rbxasset://../../../shareddata/sky/red.jpg" + game.Lighting.Sky.SkyboxFt = "rbxasset://../../../shareddata/sky/red.jpg" + game.Lighting.Sky.SkyboxLf = "rbxasset://../../../shareddata/sky/red.jpg" + game.Lighting.Sky.SkyboxRt = "rbxasset://../../../shareddata/sky/red.jpg" + game.Lighting.Sky.SkyboxUp = "rbxasset://../../../shareddata/sky/red.jpg" + print("1") + elseif (game.Lighting.Sky.SkyboxBk == "rbxasset://../../../shareddata/sky/red.jpg") then + game.Lighting.Sky.SkyboxBk = "rbxasset://../../../shareddata/sky/green.jpg" + game.Lighting.Sky.SkyboxDn = "rbxasset://../../../shareddata/sky/green.jpg" + game.Lighting.Sky.SkyboxFt = "rbxasset://../../../shareddata/sky/green.jpg" + game.Lighting.Sky.SkyboxLf = "rbxasset://../../../shareddata/sky/green.jpg" + game.Lighting.Sky.SkyboxRt = "rbxasset://../../../shareddata/sky/green.jpg" + game.Lighting.Sky.SkyboxUp = "rbxasset://../../../shareddata/sky/green.jpg" + print("2") + elseif (game.Lighting.Sky.SkyboxBk == "rbxasset://../../../shareddata/sky/green.jpg") then + game.Lighting.Sky.SkyboxBk = "rbxasset://../../../shareddata/sky/orange.jpg" + game.Lighting.Sky.SkyboxDn = "rbxasset://../../../shareddata/sky/orange.jpg" + game.Lighting.Sky.SkyboxFt = "rbxasset://../../../shareddata/sky/orange.jpg" + game.Lighting.Sky.SkyboxLf = "rbxasset://../../../shareddata/sky/orange.jpg" + game.Lighting.Sky.SkyboxRt = "rbxasset://../../../shareddata/sky/orange.jpg" + game.Lighting.Sky.SkyboxUp = "rbxasset://../../../shareddata/sky/orange.jpg" + print("3") + elseif (game.Lighting.Sky.SkyboxBk == "rbxasset://../../../shareddata/sky/orange.jpg") then + game.Lighting.Sky.SkyboxBk = "rbxasset://../../../shareddata/sky/black.jpg" + game.Lighting.Sky.SkyboxDn = "rbxasset://../../../shareddata/sky/black.jpg" + game.Lighting.Sky.SkyboxFt = "rbxasset://../../../shareddata/sky/black.jpg" + game.Lighting.Sky.SkyboxLf = "rbxasset://../../../shareddata/sky/black.jpg" + game.Lighting.Sky.SkyboxRt = "rbxasset://../../../shareddata/sky/black.jpg" + game.Lighting.Sky.SkyboxUp = "rbxasset://../../../shareddata/sky/black.jpg" + print("4") + elseif (game.Lighting.Sky.SkyboxBk == "rbxasset://../../../shareddata/sky/black.jpg") then + game.Lighting.Sky.SkyboxBk = "rbxasset://../../../shareddata/sky/white.jpg" + game.Lighting.Sky.SkyboxDn = "rbxasset://../../../shareddata/sky/white.jpg" + game.Lighting.Sky.SkyboxFt = "rbxasset://../../../shareddata/sky/white.jpg" + game.Lighting.Sky.SkyboxLf = "rbxasset://../../../shareddata/sky/white.jpg" + game.Lighting.Sky.SkyboxRt = "rbxasset://../../../shareddata/sky/white.jpg" + game.Lighting.Sky.SkyboxUp = "rbxasset://../../../shareddata/sky/white.jpg" + print("5") + elseif (game.Lighting.Sky.SkyboxBk == "rbxasset://../../../shareddata/sky/white.jpg") then + game.Lighting.Sky.SkyboxBk = "rbxasset://../../../shareddata/sky/greenscreen.jpg" + game.Lighting.Sky.SkyboxDn = "rbxasset://../../../shareddata/sky/greenscreen.jpg" + game.Lighting.Sky.SkyboxFt = "rbxasset://../../../shareddata/sky/greenscreen.jpg" + game.Lighting.Sky.SkyboxLf = "rbxasset://../../../shareddata/sky/greenscreen.jpg" + game.Lighting.Sky.SkyboxRt = "rbxasset://../../../shareddata/sky/greenscreen.jpg" + game.Lighting.Sky.SkyboxUp = "rbxasset://../../../shareddata/sky/greenscreen.jpg" + print("6") + elseif (game.Lighting.Sky.SkyboxBk == "rbxasset://../../../shareddata/sky/greenscreen.jpg") then + game.Lighting.Sky.SkyboxBk = "rbxasset://../../../shareddata/sky/plainsky512_bk.jpg" + game.Lighting.Sky.SkyboxDn = "rbxasset://../../../shareddata/sky/plainsky512_dn.jpg" + game.Lighting.Sky.SkyboxFt = "rbxasset://../../../shareddata/sky/plainsky512_ft.jpg" + game.Lighting.Sky.SkyboxLf = "rbxasset://../../../shareddata/sky/plainsky512_lf.jpg" + game.Lighting.Sky.SkyboxRt = "rbxasset://../../../shareddata/sky/plainsky512_rt.jpg" + game.Lighting.Sky.SkyboxUp = "rbxasset://../../../shareddata/sky/plainsky512_up.jpg" + print("7") + elseif (game.Lighting.Sky.SkyboxBk == "rbxasset://../../../shareddata/sky/plainsky512_bk.jpg") then + game.Lighting.Sky.SkyboxBk = "rbxasset://../../../shareddata/sky/GreySky_bk.png" + game.Lighting.Sky.SkyboxDn = "rbxasset://../../../shareddata/sky/GreySky_dn.png" + game.Lighting.Sky.SkyboxFt = "rbxasset://../../../shareddata/sky/GreySky_ft.png" + game.Lighting.Sky.SkyboxLf = "rbxasset://../../../shareddata/sky/GreySky_lf.png" + game.Lighting.Sky.SkyboxRt = "rbxasset://../../../shareddata/sky/GreySky_rt.png" + game.Lighting.Sky.SkyboxUp = "rbxasset://../../../shareddata/sky/GreySky_up.png" + print("8") + elseif (game.Lighting.Sky.SkyboxBk == "rbxasset://../../../shareddata/sky/GreySky_bk.png") then + game.Lighting.Sky.SkyboxBk = "rbxasset://../../../shareddata/sky/redsky512_bk.png" + game.Lighting.Sky.SkyboxDn = "rbxasset://../../../shareddata/sky/redsky512_dn.png" + game.Lighting.Sky.SkyboxFt = "rbxasset://../../../shareddata/sky/redsky512_ft.png" + game.Lighting.Sky.SkyboxLf = "rbxasset://../../../shareddata/sky/redsky512_lf.png" + game.Lighting.Sky.SkyboxRt = "rbxasset://../../../shareddata/sky/redsky512_rt.png" + game.Lighting.Sky.SkyboxUp = "rbxasset://../../../shareddata/sky/redsky512_up.png" + print("9") + elseif (game.Lighting.Sky.SkyboxBk == "rbxasset://../../../shareddata/sky/redsky512_bk.png") then + game.Lighting.Sky.SkyboxBk = "rbxasset://../../../shareddata/sky/darksky512_bk.png" + game.Lighting.Sky.SkyboxDn = "rbxasset://../../../shareddata/sky/darksky512_dn.png" + game.Lighting.Sky.SkyboxFt = "rbxasset://../../../shareddata/sky/darksky512_ft.png" + game.Lighting.Sky.SkyboxLf = "rbxasset://../../../shareddata/sky/darksky512_lf.png" + game.Lighting.Sky.SkyboxRt = "rbxasset://../../../shareddata/sky/darksky512_rt.png" + game.Lighting.Sky.SkyboxUp = "rbxasset://../../../shareddata/sky/darksky512_up.png" + print("10") + elseif (game.Lighting.Sky.SkyboxBk == "rbxasset://../../../shareddata/sky/darksky512_bk.png") then + game.Lighting.Sky.SkyboxBk = "rbxasset://../../../shareddata/sky/modernsky512_bk.jpg" + game.Lighting.Sky.SkyboxDn = "rbxasset://../../../shareddata/sky/modernsky512_dn.jpg" + game.Lighting.Sky.SkyboxFt = "rbxasset://../../../shareddata/sky/modernsky512_ft.jpg" + game.Lighting.Sky.SkyboxLf = "rbxasset://../../../shareddata/sky/modernsky512_lf.jpg" + game.Lighting.Sky.SkyboxRt = "rbxasset://../../../shareddata/sky/modernsky512_rt.jpg" + game.Lighting.Sky.SkyboxUp = "rbxasset://../../../shareddata/sky/modernsky512_up.jpg" + print("11") + elseif (game.Lighting.Sky.SkyboxBk == "rbxasset://../../../shareddata/sky/modernsky512_bk.jpg") then + game.Lighting.Sky.SkyboxBk = "rbxasset://../../../shareddata/sky/blue.jpg" + game.Lighting.Sky.SkyboxDn = "rbxasset://../../../shareddata/sky/blue.jpg" + game.Lighting.Sky.SkyboxFt = "rbxasset://../../../shareddata/sky/blue.jpg" + game.Lighting.Sky.SkyboxLf = "rbxasset://../../../shareddata/sky/blue.jpg" + game.Lighting.Sky.SkyboxRt = "rbxasset://../../../shareddata/sky/blue.jpg" + game.Lighting.Sky.SkyboxUp = "rbxasset://../../../shareddata/sky/blue.jpg" + print("12") + else + game.Lighting.Sky.SkyboxBk = "rbxasset://../../../shareddata/sky/red.jpg" + game.Lighting.Sky.SkyboxDn = "rbxasset://../../../shareddata/sky/red.jpg" + game.Lighting.Sky.SkyboxFt = "rbxasset://../../../shareddata/sky/red.jpg" + game.Lighting.Sky.SkyboxLf = "rbxasset://../../../shareddata/sky/red.jpg" + game.Lighting.Sky.SkyboxRt = "rbxasset://../../../shareddata/sky/red.jpg" + game.Lighting.Sky.SkyboxUp = "rbxasset://../../../shareddata/sky/red.jpg" + print("Error") + end end script.Parent.MouseButton1Down:connect(onClicked) - true - + true false @@ -780,8 +826,11 @@ script.Parent.MouseButton1Down:connect(onClicked) 0.600000024 4279308561 0 + false + false 2 3 + false PoseRunTool 1 @@ -800,76 +849,77 @@ script.Parent.MouseButton1Down:connect(onClicked) 0 Run W/ Tool 4294967295 + false + 4278190080 + 1 0 - true + true 2 1 true 1 - true - + false LocalScript function waitForChild(parent, childName) - local child = parent:findFirstChild(childName) - if child then return child end - while true do - child = parent.ChildAdded:wait() - if child.Name==childName then return child end - end + local child = parent:findFirstChild(childName) + if child then return child end + while true do + child = parent.ChildAdded:wait() + if child.Name==childName then return child end + end end function onClicked() - local plr = game.Players.LocalPlayer - - if (plr ~= nil) then - local character = plr.Character - local Figure = character - local Torso = waitForChild(Figure, "Torso") - local RightShoulder = waitForChild(Torso, "Right Shoulder") - local LeftShoulder = waitForChild(Torso, "Left Shoulder") - local RightHip = waitForChild(Torso, "Right Hip") - local LeftHip = waitForChild(Torso, "Left Hip") - local Neck = waitForChild(Torso, "Neck") - local Humanoid = waitForChild(Figure, "Humanoid") - - RightShoulder.DesiredAngle = 0 - LeftShoulder.DesiredAngle = 0 - RightHip.DesiredAngle = 0 - LeftHip.DesiredAngle = 0 + local plr = game.Players.LocalPlayer + + if (plr ~= nil) then + local character = plr.Character + local Figure = character + local Torso = waitForChild(Figure, "Torso") + local RightShoulder = waitForChild(Torso, "Right Shoulder") + local LeftShoulder = waitForChild(Torso, "Left Shoulder") + local RightHip = waitForChild(Torso, "Right Hip") + local LeftHip = waitForChild(Torso, "Left Hip") + local Neck = waitForChild(Torso, "Neck") + local Humanoid = waitForChild(Figure, "Humanoid") + + RightShoulder.DesiredAngle = 0 + LeftShoulder.DesiredAngle = 0 + RightHip.DesiredAngle = 0 + LeftHip.DesiredAngle = 0 - local function move(time) - RightShoulder.MaxVelocity = 0.5 - --RightShoulder.MaxVelocity = 0.15 - RightShoulder.DesiredAngle = 1.57 + local function move(time) + RightShoulder.MaxVelocity = 0.5 + --RightShoulder.MaxVelocity = 0.15 + RightShoulder.DesiredAngle = 1.57 - LeftShoulder.MaxVelocity = 0.15 - --LeftShoulder.DesiredAngle = 1.57 + LeftShoulder.MaxVelocity = 0.15 + --LeftShoulder.DesiredAngle = 1.57 - local amplitude = 1 - local frequency = 9 + local amplitude = 1 + local frequency = 9 - local desiredAngle = amplitude * math.sin(time*frequency) + local desiredAngle = amplitude * math.sin(time*frequency) - --RightShoulder.DesiredAngle = desiredAngle - LeftShoulder.DesiredAngle = desiredAngle - RightHip.DesiredAngle = -desiredAngle - LeftHip.DesiredAngle = -desiredAngle - end + --RightShoulder.DesiredAngle = desiredAngle + LeftShoulder.DesiredAngle = desiredAngle + RightHip.DesiredAngle = -desiredAngle + LeftHip.DesiredAngle = -desiredAngle + end - move(wait(0.1)) - end + move(wait(0.1)) + end end script.Parent.MouseButton1Down:connect(onClicked) - true - + true false @@ -877,8 +927,11 @@ script.Parent.MouseButton1Down:connect(onClicked) 0.600000024 4279308561 0 + false + false 2 3 + false ChangeWalkSpeed 1 @@ -897,43 +950,44 @@ script.Parent.MouseButton1Down:connect(onClicked) 0 Change Walk Speed 4294967295 + false + 4278190080 + 1 0 - false + false 2 1 true 1 - true - + false LocalScript function onClicked() - local plr = game.Players.LocalPlayer - - if (plr ~= nil) then - local human = plr.Character.Humanoid - - if (human.WalkSpeed == 0) then - human.WalkSpeed = 4 - elseif (human.WalkSpeed == 4) then - human.WalkSpeed = 8 - elseif (human.WalkSpeed == 8) then - human.WalkSpeed = 16 - elseif (human.WalkSpeed == 16) then - human.WalkSpeed = 0 - end - end + local plr = game.Players.LocalPlayer + + if (plr ~= nil) then + local human = plr.Character.Humanoid + + if (human.WalkSpeed == 0) then + human.WalkSpeed = 4 + elseif (human.WalkSpeed == 4) then + human.WalkSpeed = 8 + elseif (human.WalkSpeed == 8) then + human.WalkSpeed = 16 + elseif (human.WalkSpeed == 16) then + human.WalkSpeed = 0 + end + end end script.Parent.MouseButton1Down:connect(onClicked) - true - + true false @@ -941,8 +995,11 @@ script.Parent.MouseButton1Down:connect(onClicked) 0.600000024 4279308561 0 + false + false 2 3 + false PoseStandTool 1 @@ -961,62 +1018,63 @@ script.Parent.MouseButton1Down:connect(onClicked) 0 Stand W/ Tool 4294967295 + false + 4278190080 + 1 0 - true + true 2 1 true 1 - true - + false LocalScript function waitForChild(parent, childName) - local child = parent:findFirstChild(childName) - if child then return child end - while true do - child = parent.ChildAdded:wait() - if child.Name==childName then return child end - end + local child = parent:findFirstChild(childName) + if child then return child end + while true do + child = parent.ChildAdded:wait() + if child.Name==childName then return child end + end end function onClicked() - local plr = game.Players.LocalPlayer - - if (plr ~= nil) then - local character = plr.Character - local Figure = character - local Torso = waitForChild(Figure, "Torso") - local RightShoulder = waitForChild(Torso, "Right Shoulder") - local LeftShoulder = waitForChild(Torso, "Left Shoulder") - local RightHip = waitForChild(Torso, "Right Hip") - local LeftHip = waitForChild(Torso, "Left Hip") - local Neck = waitForChild(Torso, "Neck") - local Humanoid = waitForChild(Figure, "Humanoid") + local plr = game.Players.LocalPlayer + + if (plr ~= nil) then + local character = plr.Character + local Figure = character + local Torso = waitForChild(Figure, "Torso") + local RightShoulder = waitForChild(Torso, "Right Shoulder") + local LeftShoulder = waitForChild(Torso, "Left Shoulder") + local RightHip = waitForChild(Torso, "Right Hip") + local LeftHip = waitForChild(Torso, "Left Hip") + local Neck = waitForChild(Torso, "Neck") + local Humanoid = waitForChild(Figure, "Humanoid") - RightShoulder.DesiredAngle = 0 - LeftShoulder.DesiredAngle = 0 - RightHip.DesiredAngle = 0 - LeftHip.DesiredAngle = 0 + RightShoulder.DesiredAngle = 0 + LeftShoulder.DesiredAngle = 0 + RightHip.DesiredAngle = 0 + LeftHip.DesiredAngle = 0 - local function moveTool() - RightShoulder.MaxVelocity = 0.5 - RightShoulder.DesiredAngle = 1.57 - end + local function moveTool() + RightShoulder.MaxVelocity = 0.5 + RightShoulder.DesiredAngle = 1.57 + end - moveTool() - end + moveTool() + end end script.Parent.MouseButton1Down:connect(onClicked) - true - + true false @@ -1024,8 +1082,11 @@ script.Parent.MouseButton1Down:connect(onClicked) 0.600000024 4279308561 0 + false + false 2 3 + false PoseStand 1 @@ -1044,59 +1105,60 @@ script.Parent.MouseButton1Down:connect(onClicked) 0 Stand 4294967295 + false + 4278190080 + 1 0 - false + false 2 1 true 1 - true - + false LocalScript function waitForChild(parent, childName) - local child = parent:findFirstChild(childName) - if child then return child end - while true do - child = parent.ChildAdded:wait() - if child.Name==childName then return child end - end + local child = parent:findFirstChild(childName) + if child then return child end + while true do + child = parent.ChildAdded:wait() + if child.Name==childName then return child end + end end function onClicked() - local plr = game.Players.LocalPlayer - - if (plr ~= nil) then - local character = plr.Character - local Figure = character - local Torso = waitForChild(Figure, "Torso") - local RightShoulder = waitForChild(Torso, "Right Shoulder") - local LeftShoulder = waitForChild(Torso, "Left Shoulder") - local RightHip = waitForChild(Torso, "Right Hip") - local LeftHip = waitForChild(Torso, "Left Hip") - local Neck = waitForChild(Torso, "Neck") - local Humanoid = waitForChild(Figure, "Humanoid") + local plr = game.Players.LocalPlayer + + if (plr ~= nil) then + local character = plr.Character + local Figure = character + local Torso = waitForChild(Figure, "Torso") + local RightShoulder = waitForChild(Torso, "Right Shoulder") + local LeftShoulder = waitForChild(Torso, "Left Shoulder") + local RightHip = waitForChild(Torso, "Right Hip") + local LeftHip = waitForChild(Torso, "Left Hip") + local Neck = waitForChild(Torso, "Neck") + local Humanoid = waitForChild(Figure, "Humanoid") - local function moveDefault() - RightShoulder.DesiredAngle = 0 - LeftShoulder.DesiredAngle = 0 - RightHip.DesiredAngle = 0 - LeftHip.DesiredAngle = 0 - end + local function moveDefault() + RightShoulder.DesiredAngle = 0 + LeftShoulder.DesiredAngle = 0 + RightHip.DesiredAngle = 0 + LeftHip.DesiredAngle = 0 + end - moveDefault() - end + moveDefault() + end end script.Parent.MouseButton1Down:connect(onClicked) - true - + true false @@ -1104,8 +1166,11 @@ script.Parent.MouseButton1Down:connect(onClicked) 0.600000024 4279308561 0 + false + false 2 3 + false PoseLunge 1 @@ -1124,68 +1189,69 @@ script.Parent.MouseButton1Down:connect(onClicked) 0 Lunge 4294967295 + false + 4278190080 + 1 0 - false + false 2 1 true 1 - true - + false LocalScript function waitForChild(parent, childName) - local child = parent:findFirstChild(childName) - if child then return child end - while true do - child = parent.ChildAdded:wait() - if child.Name==childName then return child end - end + local child = parent:findFirstChild(childName) + if child then return child end + while true do + child = parent.ChildAdded:wait() + if child.Name==childName then return child end + end end function onClicked() - local plr = game.Players.LocalPlayer - - if (plr ~= nil) then - local character = plr.Character - local Figure = character - local Torso = waitForChild(Figure, "Torso") - local RightShoulder = waitForChild(Torso, "Right Shoulder") - local LeftShoulder = waitForChild(Torso, "Left Shoulder") - local RightHip = waitForChild(Torso, "Right Hip") - local LeftHip = waitForChild(Torso, "Left Hip") - local Neck = waitForChild(Torso, "Neck") - local Humanoid = waitForChild(Figure, "Humanoid") + local plr = game.Players.LocalPlayer + + if (plr ~= nil) then + local character = plr.Character + local Figure = character + local Torso = waitForChild(Figure, "Torso") + local RightShoulder = waitForChild(Torso, "Right Shoulder") + local LeftShoulder = waitForChild(Torso, "Left Shoulder") + local RightHip = waitForChild(Torso, "Right Hip") + local LeftHip = waitForChild(Torso, "Left Hip") + local Neck = waitForChild(Torso, "Neck") + local Humanoid = waitForChild(Figure, "Humanoid") - RightShoulder.DesiredAngle = 0 - LeftShoulder.DesiredAngle = 0 - RightHip.DesiredAngle = 0 - LeftHip.DesiredAngle = 0 + RightShoulder.DesiredAngle = 0 + LeftShoulder.DesiredAngle = 0 + RightHip.DesiredAngle = 0 + LeftHip.DesiredAngle = 0 - local function moveLunge() - RightShoulder.MaxVelocity = 0.5 - LeftShoulder.MaxVelocity = 0.5 - RightHip.MaxVelocity = 0.5 - LeftHip.MaxVelocity = 0.5 - RightShoulder.DesiredAngle = 1.57 - LeftShoulder.DesiredAngle = 1.0 - RightHip.DesiredAngle = 1.57 - LeftHip.DesiredAngle = 1.0 - end + local function moveLunge() + RightShoulder.MaxVelocity = 0.5 + LeftShoulder.MaxVelocity = 0.5 + RightHip.MaxVelocity = 0.5 + LeftHip.MaxVelocity = 0.5 + RightShoulder.DesiredAngle = 1.57 + LeftShoulder.DesiredAngle = 1.0 + RightHip.DesiredAngle = 1.57 + LeftHip.DesiredAngle = 1.0 + end - moveLunge() - end + moveLunge() + end end script.Parent.MouseButton1Down:connect(onClicked) - true - + true false @@ -1193,8 +1259,11 @@ script.Parent.MouseButton1Down:connect(onClicked) 0.600000024 4279308561 0 + false + false 2 3 + false PoseRun 1 @@ -1213,76 +1282,77 @@ script.Parent.MouseButton1Down:connect(onClicked) 0 Run 4294967295 + false + 4278190080 + 1 0 - false + false 2 1 true 1 - true - + false LocalScript function waitForChild(parent, childName) - local child = parent:findFirstChild(childName) - if child then return child end - while true do - child = parent.ChildAdded:wait() - if child.Name==childName then return child end - end + local child = parent:findFirstChild(childName) + if child then return child end + while true do + child = parent.ChildAdded:wait() + if child.Name==childName then return child end + end end function onClicked() - local plr = game.Players.LocalPlayer - - if (plr ~= nil) then - local character = plr.Character - local Figure = character - local Torso = waitForChild(Figure, "Torso") - local RightShoulder = waitForChild(Torso, "Right Shoulder") - local LeftShoulder = waitForChild(Torso, "Left Shoulder") - local RightHip = waitForChild(Torso, "Right Hip") - local LeftHip = waitForChild(Torso, "Left Hip") - local Neck = waitForChild(Torso, "Neck") - local Humanoid = waitForChild(Figure, "Humanoid") - - RightShoulder.DesiredAngle = 0 - LeftShoulder.DesiredAngle = 0 - RightHip.DesiredAngle = 0 - LeftHip.DesiredAngle = 0 + local plr = game.Players.LocalPlayer + + if (plr ~= nil) then + local character = plr.Character + local Figure = character + local Torso = waitForChild(Figure, "Torso") + local RightShoulder = waitForChild(Torso, "Right Shoulder") + local LeftShoulder = waitForChild(Torso, "Left Shoulder") + local RightHip = waitForChild(Torso, "Right Hip") + local LeftHip = waitForChild(Torso, "Left Hip") + local Neck = waitForChild(Torso, "Neck") + local Humanoid = waitForChild(Figure, "Humanoid") + + RightShoulder.DesiredAngle = 0 + LeftShoulder.DesiredAngle = 0 + RightHip.DesiredAngle = 0 + LeftHip.DesiredAngle = 0 - local function move(time) - --RightShoulder.MaxVelocity = 0.5 - RightShoulder.MaxVelocity = 0.15 - --RightShoulder.DesiredAngle = 1.57 + local function move(time) + --RightShoulder.MaxVelocity = 0.5 + RightShoulder.MaxVelocity = 0.15 + --RightShoulder.DesiredAngle = 1.57 - LeftShoulder.MaxVelocity = 0.15 - --LeftShoulder.DesiredAngle = 1.57 + LeftShoulder.MaxVelocity = 0.15 + --LeftShoulder.DesiredAngle = 1.57 - local amplitude = 1 - local frequency = 9 + local amplitude = 1 + local frequency = 9 - local desiredAngle = amplitude * math.sin(time*frequency) + local desiredAngle = amplitude * math.sin(time*frequency) - RightShoulder.DesiredAngle = desiredAngle - LeftShoulder.DesiredAngle = desiredAngle - RightHip.DesiredAngle = -desiredAngle - LeftHip.DesiredAngle = -desiredAngle - end + RightShoulder.DesiredAngle = desiredAngle + LeftShoulder.DesiredAngle = desiredAngle + RightHip.DesiredAngle = -desiredAngle + LeftHip.DesiredAngle = -desiredAngle + end - move(wait(0.1)) - end + move(wait(0.1)) + end end script.Parent.MouseButton1Down:connect(onClicked) - true - + true false @@ -1290,8 +1360,11 @@ script.Parent.MouseButton1Down:connect(onClicked) 0.600000024 4279308561 0 + false + false 2 3 + false PoseSit 1 @@ -1310,66 +1383,67 @@ script.Parent.MouseButton1Down:connect(onClicked) 0 Sit 4294967295 + false + 4278190080 + 1 0 - false + false 2 1 true 1 - true - + false LocalScript function waitForChild(parent, childName) - local child = parent:findFirstChild(childName) - if child then return child end - while true do - child = parent.ChildAdded:wait() - if child.Name==childName then return child end - end + local child = parent:findFirstChild(childName) + if child then return child end + while true do + child = parent.ChildAdded:wait() + if child.Name==childName then return child end + end end function onClicked() - local plr = game.Players.LocalPlayer - - if (plr ~= nil) then - local character = plr.Character - local Figure = character - local Torso = waitForChild(Figure, "Torso") - local RightShoulder = waitForChild(Torso, "Right Shoulder") - local LeftShoulder = waitForChild(Torso, "Left Shoulder") - local RightHip = waitForChild(Torso, "Right Hip") - local LeftHip = waitForChild(Torso, "Left Hip") - local Neck = waitForChild(Torso, "Neck") - local Humanoid = waitForChild(Figure, "Humanoid") + local plr = game.Players.LocalPlayer + + if (plr ~= nil) then + local character = plr.Character + local Figure = character + local Torso = waitForChild(Figure, "Torso") + local RightShoulder = waitForChild(Torso, "Right Shoulder") + local LeftShoulder = waitForChild(Torso, "Left Shoulder") + local RightHip = waitForChild(Torso, "Right Hip") + local LeftHip = waitForChild(Torso, "Left Hip") + local Neck = waitForChild(Torso, "Neck") + local Humanoid = waitForChild(Figure, "Humanoid") - RightShoulder.DesiredAngle = 0 - LeftShoulder.DesiredAngle = 0 - RightHip.DesiredAngle = 0 - LeftHip.DesiredAngle = 0 + RightShoulder.DesiredAngle = 0 + LeftShoulder.DesiredAngle = 0 + RightHip.DesiredAngle = 0 + LeftHip.DesiredAngle = 0 - local function moveSit() - RightShoulder.MaxVelocity = 0.15 - LeftShoulder.MaxVelocity = 0.15 - RightShoulder.DesiredAngle = 3.14 /2 - LeftShoulder.DesiredAngle = -3.14 /2 - RightHip.DesiredAngle = 3.14 /2 - LeftHip.DesiredAngle = -3.14 /2 - end + local function moveSit() + RightShoulder.MaxVelocity = 0.15 + LeftShoulder.MaxVelocity = 0.15 + RightShoulder.DesiredAngle = 3.14 /2 + LeftShoulder.DesiredAngle = -3.14 /2 + RightHip.DesiredAngle = 3.14 /2 + LeftHip.DesiredAngle = -3.14 /2 + end - moveSit() - end + moveSit() + end end script.Parent.MouseButton1Down:connect(onClicked) - true - + true false @@ -1377,8 +1451,11 @@ script.Parent.MouseButton1Down:connect(onClicked) 0.600000024 4279308561 0 + false + false 2 3 + false PoseZombie 1 @@ -1397,74 +1474,75 @@ script.Parent.MouseButton1Down:connect(onClicked) 0 Zombie 4294967295 + false + 4278190080 + 1 0 - false + false 2 1 true 1 - true - + false LocalScript function waitForChild(parent, childName) - local child = parent:findFirstChild(childName) - if child then return child end - while true do - child = parent.ChildAdded:wait() - if child.Name==childName then return child end - end + local child = parent:findFirstChild(childName) + if child then return child end + while true do + child = parent.ChildAdded:wait() + if child.Name==childName then return child end + end end function onClicked() - local plr = game.Players.LocalPlayer - - if (plr ~= nil) then - local character = plr.Character - local Figure = character - local Torso = waitForChild(Figure, "Torso") - local RightShoulder = waitForChild(Torso, "Right Shoulder") - local LeftShoulder = waitForChild(Torso, "Left Shoulder") - local RightHip = waitForChild(Torso, "Right Hip") - local LeftHip = waitForChild(Torso, "Left Hip") - local Neck = waitForChild(Torso, "Neck") - local Humanoid = waitForChild(Figure, "Humanoid") + local plr = game.Players.LocalPlayer + + if (plr ~= nil) then + local character = plr.Character + local Figure = character + local Torso = waitForChild(Figure, "Torso") + local RightShoulder = waitForChild(Torso, "Right Shoulder") + local LeftShoulder = waitForChild(Torso, "Left Shoulder") + local RightHip = waitForChild(Torso, "Right Hip") + local LeftHip = waitForChild(Torso, "Left Hip") + local Neck = waitForChild(Torso, "Neck") + local Humanoid = waitForChild(Figure, "Humanoid") - RightShoulder.DesiredAngle = 0 - LeftShoulder.DesiredAngle = 0 - RightHip.DesiredAngle = 0 - LeftHip.DesiredAngle = 0 + RightShoulder.DesiredAngle = 0 + LeftShoulder.DesiredAngle = 0 + RightHip.DesiredAngle = 0 + LeftHip.DesiredAngle = 0 - local function moveZombieWalk(time) - local amplitude - local frequency - - RightShoulder.MaxVelocity = 0.15 - LeftShoulder.MaxVelocity = 0.15 - RightShoulder.DesiredAngle = 3.14 /2 - LeftShoulder.DesiredAngle = -3.14 /2 - amplitude = 1 - frequency = 9 + local function moveZombieWalk(time) + local amplitude + local frequency + + RightShoulder.MaxVelocity = 0.15 + LeftShoulder.MaxVelocity = 0.15 + RightShoulder.DesiredAngle = 3.14 /2 + LeftShoulder.DesiredAngle = -3.14 /2 + amplitude = 1 + frequency = 9 - local desiredAngle = amplitude * math.sin(time*frequency) - - RightHip.DesiredAngle = -desiredAngle - LeftHip.DesiredAngle = -desiredAngle - end + local desiredAngle = amplitude * math.sin(time*frequency) + + RightHip.DesiredAngle = -desiredAngle + LeftHip.DesiredAngle = -desiredAngle + end - moveZombieWalk(wait(0.1)) - end + moveZombieWalk(wait(0.1)) + end end script.Parent.MouseButton1Down:connect(onClicked) - true - + true false @@ -1472,8 +1550,11 @@ script.Parent.MouseButton1Down:connect(onClicked) 0.600000024 4279308561 0 + false + false 2 3 + false TimeOfDay 1 @@ -1492,51 +1573,52 @@ script.Parent.MouseButton1Down:connect(onClicked) 0 Change Time of Day 4294967295 + false + 4278190080 + 1 0 - false + false 2 1 true 1 - true - + false LocalScript function onClicked() - game.Lighting.Minute.Value = game.Lighting.Minute.Value + 30 + game.Lighting.Minute.Value = game.Lighting.Minute.Value + 30 - if game.Lighting.Minute.Value == 60 then - game.Lighting.Minute.Value = 0 - game.Lighting.Hour.Value = game.Lighting.Hour.Value + 1 + if game.Lighting.Minute.Value == 60 then + game.Lighting.Minute.Value = 0 + game.Lighting.Hour.Value = game.Lighting.Hour.Value + 1 - if game.Lighting.Hour.Value == 24 then - game.Lighting.Hour.Value = 0 - end - end + if game.Lighting.Hour.Value == 24 then + game.Lighting.Hour.Value = 0 + end + end - hextra = "" - mextra = "" + hextra = "" + mextra = "" - if game.Lighting.Hour.Value < 10 then - hextra = "0" - end + if game.Lighting.Hour.Value < 10 then + hextra = "0" + end - if game.Lighting.Minute.Value < 10 then - mextra = "0" - end + if game.Lighting.Minute.Value < 10 then + mextra = "0" + end - game.Lighting.TimeOfDay = hextra..game.Lighting.Hour.Value..":"..mextra..game.Lighting.Minute.Value..":00" + game.Lighting.TimeOfDay = hextra..game.Lighting.Hour.Value..":"..mextra..game.Lighting.Minute.Value..":00" end script.Parent.MouseButton1Down:connect(onClicked) - true - + true false @@ -1544,8 +1626,11 @@ script.Parent.MouseButton1Down:connect(onClicked) 0.600000024 4279308561 0 + false + false 2 3 + false PoseJump 1 @@ -1564,66 +1649,67 @@ script.Parent.MouseButton1Down:connect(onClicked) 0 Jump 4294967295 + false + 4278190080 + 1 0 - false + false 2 1 true 1 - true - + false LocalScript function waitForChild(parent, childName) - local child = parent:findFirstChild(childName) - if child then return child end - while true do - child = parent.ChildAdded:wait() - if child.Name==childName then return child end - end + local child = parent:findFirstChild(childName) + if child then return child end + while true do + child = parent.ChildAdded:wait() + if child.Name==childName then return child end + end end function onClicked() - local plr = game.Players.LocalPlayer - - if (plr ~= nil) then - local character = plr.Character - local Figure = character - local Torso = waitForChild(Figure, "Torso") - local RightShoulder = waitForChild(Torso, "Right Shoulder") - local LeftShoulder = waitForChild(Torso, "Left Shoulder") - local RightHip = waitForChild(Torso, "Right Hip") - local LeftHip = waitForChild(Torso, "Left Hip") - local Neck = waitForChild(Torso, "Neck") - local Humanoid = waitForChild(Figure, "Humanoid") + local plr = game.Players.LocalPlayer + + if (plr ~= nil) then + local character = plr.Character + local Figure = character + local Torso = waitForChild(Figure, "Torso") + local RightShoulder = waitForChild(Torso, "Right Shoulder") + local LeftShoulder = waitForChild(Torso, "Left Shoulder") + local RightHip = waitForChild(Torso, "Right Hip") + local LeftHip = waitForChild(Torso, "Left Hip") + local Neck = waitForChild(Torso, "Neck") + local Humanoid = waitForChild(Figure, "Humanoid") - RightShoulder.DesiredAngle = 0 - LeftShoulder.DesiredAngle = 0 - RightHip.DesiredAngle = 0 - LeftHip.DesiredAngle = 0 + RightShoulder.DesiredAngle = 0 + LeftShoulder.DesiredAngle = 0 + RightHip.DesiredAngle = 0 + LeftHip.DesiredAngle = 0 - local function moveJump() - RightShoulder.MaxVelocity = 0.5 - LeftShoulder.MaxVelocity = 0.5 - RightShoulder.DesiredAngle = 3.14 - LeftShoulder.DesiredAngle = -3.14 - RightHip.DesiredAngle = 0 - LeftHip.DesiredAngle = 0 - end + local function moveJump() + RightShoulder.MaxVelocity = 0.5 + LeftShoulder.MaxVelocity = 0.5 + RightShoulder.DesiredAngle = 3.14 + LeftShoulder.DesiredAngle = -3.14 + RightHip.DesiredAngle = 0 + LeftHip.DesiredAngle = 0 + end - moveJump() - end + moveJump() + end end script.Parent.MouseButton1Down:connect(onClicked) - true - + true false @@ -1631,8 +1717,11 @@ script.Parent.MouseButton1Down:connect(onClicked) 0.600000024 4279308561 0 + false + false 2 3 + false ToggleCelestialBodies 1 @@ -1651,33 +1740,34 @@ script.Parent.MouseButton1Down:connect(onClicked) 0 Toggle Sun, Moon, and Stars 4294967295 + false + 4278190080 + 1 0 - false + false 2 1 true 1 - true - + false LocalScript function onClicked() - if game.Lighting.Sky.CelestialBodiesShown == true then - game.Lighting.Sky.CelestialBodiesShown = false - else - game.Lighting.Sky.CelestialBodiesShown = true - end + if game.Lighting.Sky.CelestialBodiesShown == true then + game.Lighting.Sky.CelestialBodiesShown = false + else + game.Lighting.Sky.CelestialBodiesShown = true + end end script.Parent.MouseButton1Down:connect(onClicked) - true - + true false @@ -1685,8 +1775,11 @@ script.Parent.MouseButton1Down:connect(onClicked) 0.600000024 4279308561 0 + false + false 2 3 + false ToolLoadout 1 @@ -1705,201 +1798,206 @@ script.Parent.MouseButton1Down:connect(onClicked) 0 Change Tool Loadout 4294967295 + false + 4278190080 + 1 0 - false + false 2 1 true 1 - true - + false LocalScript function onClicked() - player = game.Players.LocalPlayer - - for _, tool in ipairs(player.Backpack:GetChildren()) do - if tool:IsA("Tool") then - tool:Remove() - end - end + player = game.Players.LocalPlayer + + for _, tool in ipairs(player.Backpack:GetChildren()) do + if tool:IsA("Tool") then + tool:Remove() + end + end - for _, equippedtool in ipairs(player.Character:GetChildren()) do - if equippedtool:IsA("Tool") then - equippedtool:Remove() - end - end + for _, equippedtool in ipairs(player.Character:GetChildren()) do + if equippedtool:IsA("Tool") then + equippedtool:Remove() + end + end - if game.Lighting.Inventory.Value == 0 then - --sfoth - for _, newtool in ipairs(game.Lighting.SFOTHWeapons:GetChildren()) do - if newtool:IsA("Tool") then - copiedtool = newtool:Clone() - copiedtool.Parent = player.Backpack - end - end - sword = game.Lighting.ClassicWeapons.ClassicSword:Clone() - sword.Parent = player.Backpack - game.Lighting.Inventory.Value = 1 - elseif game.Lighting.Inventory.Value == 1 then - --rise of the killbots - for _, newtool in ipairs(game.Lighting.ROTKBWeapons:GetChildren()) do - if newtool:IsA("Tool") then - copiedtool = newtool:Clone() - copiedtool.Parent = player.Backpack - end - end - rpg = game.Lighting.ClassicWeapons.ClassicRPG:Clone() - rpg.Parent = player.Backpack - trowel = game.Lighting.ClassicWeapons.ClassicTrowel:Clone() - trowel.Parent = player.Backpack - game.Lighting.Inventory.Value = 2 - elseif game.Lighting.Inventory.Value == 2 then - --gears - for _, newtool in ipairs(game.Lighting.Gears:GetChildren()) do - if newtool:IsA("Tool") then - copiedtool = newtool:Clone() - copiedtool.Parent = player.Backpack - end - end - game.Lighting.Inventory.Value = 3 - elseif game.Lighting.Inventory.Value == 3 then - --none - game.Lighting.Inventory.Value = 4 - else - --classic - for _, newtool in ipairs(game.Lighting.ClassicWeapons:GetChildren()) do - if newtool:IsA("Tool") then - copiedtool = newtool:Clone() - copiedtool.Parent = player.Backpack - end - end - game.Lighting.Inventory.Value = 0 - end + if game.Lighting.Inventory.Value == 0 then + --sfoth + for _, newtool in ipairs(game.Lighting.SFOTHWeapons:GetChildren()) do + if newtool:IsA("Tool") then + copiedtool = newtool:Clone() + copiedtool.Parent = player.Backpack + end + end + sword = game.Lighting.ClassicWeapons.ClassicSword:Clone() + sword.Parent = player.Backpack + game.Lighting.Inventory.Value = 1 + elseif game.Lighting.Inventory.Value == 1 then + --rise of the killbots + for _, newtool in ipairs(game.Lighting.ROTKBWeapons:GetChildren()) do + if newtool:IsA("Tool") then + copiedtool = newtool:Clone() + copiedtool.Parent = player.Backpack + end + end + rpg = game.Lighting.ClassicWeapons.ClassicRPG:Clone() + rpg.Parent = player.Backpack + trowel = game.Lighting.ClassicWeapons.ClassicTrowel:Clone() + trowel.Parent = player.Backpack + game.Lighting.Inventory.Value = 2 + elseif game.Lighting.Inventory.Value == 2 then + --gears + for _, newtool in ipairs(game.Lighting.Gears:GetChildren()) do + if newtool:IsA("Tool") then + copiedtool = newtool:Clone() + copiedtool.Parent = player.Backpack + end + end + game.Lighting.Inventory.Value = 3 + elseif game.Lighting.Inventory.Value == 3 then + --none + game.Lighting.Inventory.Value = 4 + else + --classic + for _, newtool in ipairs(game.Lighting.ClassicWeapons:GetChildren()) do + if newtool:IsA("Tool") then + copiedtool = newtool:Clone() + copiedtool.Parent = player.Backpack + end + end + game.Lighting.Inventory.Value = 0 + end end script.Parent.MouseButton1Down:connect(onClicked) - true - + 0 10 1 Soundscape 1 - true - + CollectionService - true - + PhysicsService - true - + BadgeService - true - + Geometry - true - + RenderHooksService - true - + SocialService - true - + 1000 Debris - true - + Instance - true - + Instance - true - + + + CookiesService + + + + + Teleport Service + + + + + true + Players + + + Selection - true - + 4288453788 1 4278190080 4278190080 + 4290822336 + 100000 + 0 41.7332993 Lighting 4291809236 14:00:00 - true - + false Sky - rbxasset://Sky/null_plainsky512_bk.jpg - rbxasset://Sky/null_plainsky512_dn.jpg - rbxasset://Sky/null_plainsky512_ft.jpg - rbxasset://Sky/null_plainsky512_lf.jpg - rbxasset://Sky/null_plainsky512_rt.jpg - rbxasset://Sky/null_plainsky512_up.jpg + rbxasset://../../../shareddata/sky/blue.jpg + rbxasset://../../../shareddata/sky/blue.jpg + rbxasset://../../../shareddata/sky/blue.jpg + rbxasset://../../../shareddata/sky/blue.jpg + rbxasset://../../../shareddata/sky/blue.jpg + rbxasset://../../../shareddata/sky/blue.jpg 3000 - true + + + + + Hour + 14 - - Hour - 14 - true - - - Minute 0 - true - + 0 @@ -1917,10 +2015,10 @@ script.Parent.MouseButton1Down:connect(onClicked) ClassicWeapons null - true - + + true true 0 @@ -1937,10 +2035,10 @@ script.Parent.MouseButton1Down:connect(onClicked) -0 ClassicPaintballGun - rbxasset://Textures/PaintballIcon.png - true + rbxasset://../../../shareddata/Textures/PaintballIcon.png + - + false -0.5 @@ -1968,7 +2066,6 @@ script.Parent.MouseButton1Down:connect(onClicked) true 0.5 - 0 0.300000012 -0.5 0.5 @@ -2001,7 +2098,7 @@ script.Parent.MouseButton1Down:connect(onClicked) 0 0 - true + 0 1 1 @@ -2009,11 +2106,11 @@ script.Parent.MouseButton1Down:connect(onClicked) 2 - + 2 2 - rbxasset://Fonts/PaintballGun.mesh + rbxasset://../../../shareddata/Fonts/PaintballGun.mesh 5 Mesh @@ -2026,19 +2123,19 @@ script.Parent.MouseButton1Down:connect(onClicked) 1 1 - rbxasset://Textures/PaintballGunTex128.png + rbxasset://../../../shareddata/Textures/PaintballGunTex128.png 1 1 1 - true - + + true true 0 @@ -2056,9 +2153,9 @@ script.Parent.MouseButton1Down:connect(onClicked) ClassicSlingshot rbxasset://../../../shareddata/Textures/Slingshot.png - true + - + false -0.5 @@ -2086,7 +2183,6 @@ script.Parent.MouseButton1Down:connect(onClicked) true 0.5 - 1 0.300000012 -0.5 0.5 @@ -2119,7 +2215,7 @@ script.Parent.MouseButton1Down:connect(onClicked) 0 0 - true + 1 1 2 @@ -2127,11 +2223,11 @@ script.Parent.MouseButton1Down:connect(onClicked) 1 - + 2 2 - rbxasset://Fonts/slingshot.mesh + rbxasset://../../../shareddata/Fonts/slingshot.mesh 5 Mesh @@ -2144,19 +2240,19 @@ script.Parent.MouseButton1Down:connect(onClicked) 0.5 0.5 - rbxasset://Textures/SlingshotTexture.png + rbxasset://../../../shareddata/Textures/SlingshotTexture.png 1 1 1 - true - + + true true 0 @@ -2173,10 +2269,10 @@ script.Parent.MouseButton1Down:connect(onClicked) 1 ClassicSuperball - rbxasset://Textures/Superball.png - true + rbxasset://../../../shareddata/Textures/Superball.png + - + false -0.5 @@ -2204,7 +2300,6 @@ script.Parent.MouseButton1Down:connect(onClicked) true 1 - 0 0 -0.5 0.5 @@ -2237,7 +2332,7 @@ script.Parent.MouseButton1Down:connect(onClicked) 0 0 - true + 0 0 2 @@ -2247,8 +2342,9 @@ script.Parent.MouseButton1Down:connect(onClicked) - + + true true -1 @@ -2265,10 +2361,10 @@ script.Parent.MouseButton1Down:connect(onClicked) -0 ClassicRPG - rbxasset://Textures/Rocket.png - true + rbxasset://../../../shareddata/Textures/Rocket.png + - + false -0.5 @@ -2296,7 +2392,6 @@ script.Parent.MouseButton1Down:connect(onClicked) true 0.5 - 2 0.300000012 -0.5 0.5 @@ -2329,7 +2424,7 @@ script.Parent.MouseButton1Down:connect(onClicked) 0 0 - true + 2 1 4 @@ -2337,11 +2432,11 @@ script.Parent.MouseButton1Down:connect(onClicked) 1 - + 2 2 - rbxasset://Fonts/rocketlauncher.mesh + rbxasset://../../../shareddata/Fonts/rocketlauncher.mesh 5 Mesh @@ -2354,19 +2449,19 @@ script.Parent.MouseButton1Down:connect(onClicked) 0.75 0.75 - rbxasset://Textures/rocketlaunchertex.png + rbxasset://../../../shareddata/Textures/rocketlaunchertex.png 1 1 1 - true - + + true true 0 @@ -2384,9 +2479,9 @@ script.Parent.MouseButton1Down:connect(onClicked) ClassicSword rbxasset://../../../shareddata/Textures/Sword128.png - true + - + false -0.5 @@ -2414,7 +2509,6 @@ script.Parent.MouseButton1Down:connect(onClicked) true 0.5 - 2 0.300000012 -0.5 0.5 @@ -2447,7 +2541,7 @@ script.Parent.MouseButton1Down:connect(onClicked) 0 0 - true + 2 1 1 @@ -2455,11 +2549,11 @@ script.Parent.MouseButton1Down:connect(onClicked) 4 - + 2 2 - rbxasset://Fonts/sword.mesh + rbxasset://../../../shareddata/Fonts/sword.mesh 5 Mesh @@ -2472,17 +2566,16 @@ script.Parent.MouseButton1Down:connect(onClicked) 1 1 - rbxasset://Textures/SwordTexture.png + rbxasset://../../../shareddata/Textures/SwordTexture.png 1 1 1 - true - + false @@ -2491,41 +2584,40 @@ script.Parent.MouseButton1Down:connect(onClicked) Tool = script.Parent function swordUp() - Tool.GripForward = Vector3.new(-1,0,0) - Tool.GripRight = Vector3.new(0,1,0) - Tool.GripUp = Vector3.new(0,0,1) + Tool.GripForward = Vector3.new(-1,0,0) + Tool.GripRight = Vector3.new(0,1,0) + Tool.GripUp = Vector3.new(0,0,1) end function swordOut() - Tool.GripForward = Vector3.new(0,0,1) - Tool.GripRight = Vector3.new(0,-1,0) - Tool.GripUp = Vector3.new(-1,0,0) + Tool.GripForward = Vector3.new(0,0,1) + Tool.GripRight = Vector3.new(0,-1,0) + Tool.GripUp = Vector3.new(-1,0,0) end function onActivated() - if Tool.Lunged.Value == false then - swordOut() - Tool.Lunged.Value = true - else - swordUp() - Tool.Lunged.Value = false - end + if Tool.Lunged.Value == false then + swordOut() + Tool.Lunged.Value = true + else + swordUp() + Tool.Lunged.Value = false + end end script.Parent.Activated:connect(onActivated) - true - + Lunged false - true - + + true true 0 @@ -2542,10 +2634,10 @@ script.Parent.Activated:connect(onActivated) 0 ClassicTimebomb - rbxasset://Textures/Bomb.png - true + rbxasset://../../../shareddata/Textures/Bomb.png + - + false -0.5 @@ -2573,7 +2665,6 @@ script.Parent.Activated:connect(onActivated) true 0.5 - 0 0.300000012 -0.5 0.5 @@ -2606,7 +2697,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 0 0 2 @@ -2614,11 +2705,11 @@ script.Parent.Activated:connect(onActivated) 2 - + 2 2 - rbxasset://Fonts/timebomb.mesh + rbxasset://../../../shareddata/Fonts/timebomb.mesh 5 Mesh @@ -2631,19 +2722,19 @@ script.Parent.Activated:connect(onActivated) 1 1 - rbxasset://Textures/bombtex.png + rbxasset://../../../shareddata/Textures/bombtex.png 1 1 1 - true - + + true true 0 @@ -2660,10 +2751,10 @@ script.Parent.Activated:connect(onActivated) 1 ClassicTrowel - rbxasset://Textures/Wall.png - true + rbxasset://../../../shareddata/Textures/Wall.png + - + false -0.5 @@ -2691,7 +2782,6 @@ script.Parent.Activated:connect(onActivated) true 0.5 - 2 0.300000012 -0.5 0.5 @@ -2724,7 +2814,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 2 1 1 @@ -2732,11 +2822,11 @@ script.Parent.Activated:connect(onActivated) 1 - + 2 2 - rbxasset://Fonts/trowel.mesh + rbxasset://../../../shareddata/Fonts/trowel.mesh 5 Mesh @@ -2749,19 +2839,19 @@ script.Parent.Activated:connect(onActivated) 1 1 - rbxasset://Textures/TrowelTexture.png + rbxasset://../../../shareddata/Textures/TrowelTexture.png 1 1 1 - true - + + true true -1 @@ -2778,10 +2868,10 @@ script.Parent.Activated:connect(onActivated) -0 ClassicRPGHD - rbxasset://Textures/Rocket_hd.png - true + rbxasset://../../../shareddata/Textures/Rocket_hd.png + - + false -0.5 @@ -2809,7 +2899,6 @@ script.Parent.Activated:connect(onActivated) true 0.5 - 2 0.300000012 -0.5 0.5 @@ -2842,7 +2931,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 2 1 4 @@ -2850,11 +2939,11 @@ script.Parent.Activated:connect(onActivated) 1 - + 2 2 - rbxasset://Fonts/rocketlauncher_hd.mesh + rbxasset://../../../shareddata/Fonts/rocketlauncher_hd.mesh 5 Mesh @@ -2867,26 +2956,24 @@ script.Parent.Activated:connect(onActivated) 0.75 0.75 - rbxasset://Textures/rocketlaunchertex.png + rbxasset://../../../shareddata/Textures/rocketlaunchertex.png 1 1 1 - true - + Inventory 0 - true - + 0 @@ -2904,10 +2991,10 @@ script.Parent.Activated:connect(onActivated) SFOTHWeapons null - true - + + true true 0 @@ -2925,9 +3012,9 @@ script.Parent.Activated:connect(onActivated) Darkheart - true + - + false -0.5 @@ -2955,7 +3042,6 @@ script.Parent.Activated:connect(onActivated) true 0.5 - 2 0.300000012 -0.5 0.5 @@ -2988,7 +3074,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 2 1 1 @@ -2996,7 +3082,7 @@ script.Parent.Activated:connect(onActivated) 4 - + 2 2 @@ -3019,11 +3105,10 @@ script.Parent.Activated:connect(onActivated) 0 0 - true - + false @@ -3032,41 +3117,40 @@ script.Parent.Activated:connect(onActivated) Tool = script.Parent function swordUp() - Tool.GripForward = Vector3.new(-1,0,0) - Tool.GripRight = Vector3.new(0,1,0) - Tool.GripUp = Vector3.new(0,0,1) + Tool.GripForward = Vector3.new(-1,0,0) + Tool.GripRight = Vector3.new(0,1,0) + Tool.GripUp = Vector3.new(0,0,1) end function swordOut() - Tool.GripForward = Vector3.new(0,0,1) - Tool.GripRight = Vector3.new(0,-1,0) - Tool.GripUp = Vector3.new(-1,0,0) + Tool.GripForward = Vector3.new(0,0,1) + Tool.GripRight = Vector3.new(0,-1,0) + Tool.GripUp = Vector3.new(-1,0,0) end function onActivated() - if Tool.Lunged.Value == false then - swordOut() - Tool.Lunged.Value = true - else - swordUp() - Tool.Lunged.Value = false - end + if Tool.Lunged.Value == false then + swordOut() + Tool.Lunged.Value = true + else + swordUp() + Tool.Lunged.Value = false + end end script.Parent.Activated:connect(onActivated) - true - + Lunged false - true - + + true true 0 @@ -3084,9 +3168,9 @@ script.Parent.Activated:connect(onActivated) Firebrand - true + - + false -0.5 @@ -3114,7 +3198,6 @@ script.Parent.Activated:connect(onActivated) true 0.5 - 2 0.300000012 -0.5 0.5 @@ -3147,7 +3230,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 2 1 1 @@ -3155,7 +3238,7 @@ script.Parent.Activated:connect(onActivated) 6 - + 2 2 @@ -3178,18 +3261,16 @@ script.Parent.Activated:connect(onActivated) 0 0 - true - + Lunged false - true - + false @@ -3198,34 +3279,34 @@ script.Parent.Activated:connect(onActivated) Tool = script.Parent function swordUp() - Tool.GripForward = Vector3.new(-1,0,0) - Tool.GripRight = Vector3.new(0,1,0) - Tool.GripUp = Vector3.new(0,0,1) + Tool.GripForward = Vector3.new(-1,0,0) + Tool.GripRight = Vector3.new(0,1,0) + Tool.GripUp = Vector3.new(0,0,1) end function swordOut() - Tool.GripForward = Vector3.new(0,0,1) - Tool.GripRight = Vector3.new(0,-1,0) - Tool.GripUp = Vector3.new(-1,0,0) + Tool.GripForward = Vector3.new(0,0,1) + Tool.GripRight = Vector3.new(0,-1,0) + Tool.GripUp = Vector3.new(-1,0,0) end function onActivated() - if Tool.Lunged.Value == false then - swordOut() - Tool.Lunged.Value = true - else - swordUp() - Tool.Lunged.Value = false - end + if Tool.Lunged.Value == false then + swordOut() + Tool.Lunged.Value = true + else + swordUp() + Tool.Lunged.Value = false + end end script.Parent.Activated:connect(onActivated) - true - + + true true 0 @@ -3243,9 +3324,9 @@ script.Parent.Activated:connect(onActivated) Ghostwalker - true + - + false -0.5 @@ -3273,7 +3354,6 @@ script.Parent.Activated:connect(onActivated) true 0.5 - 2 0.300000012 -0.5 0.5 @@ -3306,7 +3386,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 2 1 1 @@ -3314,7 +3394,7 @@ script.Parent.Activated:connect(onActivated) 4 - + 2 2 @@ -3337,18 +3417,16 @@ script.Parent.Activated:connect(onActivated) 1 0 - true - + Lunged false - true - + false @@ -3357,34 +3435,34 @@ script.Parent.Activated:connect(onActivated) Tool = script.Parent function swordUp() - Tool.GripForward = Vector3.new(-1,0,0) - Tool.GripRight = Vector3.new(0,1,0) - Tool.GripUp = Vector3.new(0,0,1) + Tool.GripForward = Vector3.new(-1,0,0) + Tool.GripRight = Vector3.new(0,1,0) + Tool.GripUp = Vector3.new(0,0,1) end function swordOut() - Tool.GripForward = Vector3.new(0,0,1) - Tool.GripRight = Vector3.new(0,-1,0) - Tool.GripUp = Vector3.new(-1,0,0) + Tool.GripForward = Vector3.new(0,0,1) + Tool.GripRight = Vector3.new(0,-1,0) + Tool.GripUp = Vector3.new(-1,0,0) end function onActivated() - if Tool.Lunged.Value == false then - swordOut() - Tool.Lunged.Value = true - else - swordUp() - Tool.Lunged.Value = false - end + if Tool.Lunged.Value == false then + swordOut() + Tool.Lunged.Value = true + else + swordUp() + Tool.Lunged.Value = false + end end script.Parent.Activated:connect(onActivated) - true - + + true true 0 @@ -3402,9 +3480,9 @@ script.Parent.Activated:connect(onActivated) Ice Dagger - true + - + false -0.5 @@ -3432,7 +3510,6 @@ script.Parent.Activated:connect(onActivated) true 0.5 - 2 0.300000012 -0.5 0.5 @@ -3465,7 +3542,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 2 1 1 @@ -3473,7 +3550,7 @@ script.Parent.Activated:connect(onActivated) 2 - + 2 2 @@ -3496,11 +3573,10 @@ script.Parent.Activated:connect(onActivated) 0 1 - true - + false @@ -3509,41 +3585,40 @@ script.Parent.Activated:connect(onActivated) Tool = script.Parent function swordUp() - Tool.GripForward = Vector3.new(-1,0,0) - Tool.GripRight = Vector3.new(0,1,0) - Tool.GripUp = Vector3.new(0,0,1) + Tool.GripForward = Vector3.new(-1,0,0) + Tool.GripRight = Vector3.new(0,1,0) + Tool.GripUp = Vector3.new(0,0,1) end function swordOut() - Tool.GripForward = Vector3.new(0,0,1) - Tool.GripRight = Vector3.new(0,-1,0) - Tool.GripUp = Vector3.new(-1,0,0) + Tool.GripForward = Vector3.new(0,0,1) + Tool.GripRight = Vector3.new(0,-1,0) + Tool.GripUp = Vector3.new(-1,0,0) end function onActivated() - if Tool.Lunged.Value == false then - swordOut() - Tool.Lunged.Value = true - else - swordUp() - Tool.Lunged.Value = false - end + if Tool.Lunged.Value == false then + swordOut() + Tool.Lunged.Value = true + else + swordUp() + Tool.Lunged.Value = false + end end script.Parent.Activated:connect(onActivated) - true - + Lunged false - true - + + true true 0 @@ -3561,9 +3636,9 @@ script.Parent.Activated:connect(onActivated) Illumina - true + - + false -0.5 @@ -3591,7 +3666,6 @@ script.Parent.Activated:connect(onActivated) true 0.5 - 2 0.300000012 -0.5 0.5 @@ -3624,7 +3698,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 2 1 1 @@ -3632,7 +3706,7 @@ script.Parent.Activated:connect(onActivated) 4 - + 2 2 @@ -3655,19 +3729,17 @@ script.Parent.Activated:connect(onActivated) 1 0 - true - + true Sparkles 4291559628 - true - + false @@ -3676,41 +3748,40 @@ script.Parent.Activated:connect(onActivated) Tool = script.Parent function swordUp() - Tool.GripForward = Vector3.new(-1,0,0) - Tool.GripRight = Vector3.new(0,1,0) - Tool.GripUp = Vector3.new(0,0,1) + Tool.GripForward = Vector3.new(-1,0,0) + Tool.GripRight = Vector3.new(0,1,0) + Tool.GripUp = Vector3.new(0,0,1) end function swordOut() - Tool.GripForward = Vector3.new(0,0,1) - Tool.GripRight = Vector3.new(0,-1,0) - Tool.GripUp = Vector3.new(-1,0,0) + Tool.GripForward = Vector3.new(0,0,1) + Tool.GripRight = Vector3.new(0,-1,0) + Tool.GripUp = Vector3.new(-1,0,0) end function onActivated() - if Tool.Lunged.Value == false then - swordOut() - Tool.Lunged.Value = true - else - swordUp() - Tool.Lunged.Value = false - end + if Tool.Lunged.Value == false then + swordOut() + Tool.Lunged.Value = true + else + swordUp() + Tool.Lunged.Value = false + end end script.Parent.Activated:connect(onActivated) - true - + Lunged false - true - + + true true 0 @@ -3728,9 +3799,9 @@ script.Parent.Activated:connect(onActivated) Venomshank - true + - + false -0.5 @@ -3758,7 +3829,6 @@ script.Parent.Activated:connect(onActivated) true 0.5 - 2 0.300000012 -0.5 0.5 @@ -3791,7 +3861,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 2 1 1 @@ -3799,7 +3869,7 @@ script.Parent.Activated:connect(onActivated) 6 - + 2 2 @@ -3822,11 +3892,10 @@ script.Parent.Activated:connect(onActivated) 1 0.300000012 - true - + false @@ -3835,41 +3904,40 @@ script.Parent.Activated:connect(onActivated) Tool = script.Parent function swordUp() - Tool.GripForward = Vector3.new(-1,0,0) - Tool.GripRight = Vector3.new(0,1,0) - Tool.GripUp = Vector3.new(0,0,1) + Tool.GripForward = Vector3.new(-1,0,0) + Tool.GripRight = Vector3.new(0,1,0) + Tool.GripUp = Vector3.new(0,0,1) end function swordOut() - Tool.GripForward = Vector3.new(0,0,1) - Tool.GripRight = Vector3.new(0,-1,0) - Tool.GripUp = Vector3.new(-1,0,0) + Tool.GripForward = Vector3.new(0,0,1) + Tool.GripRight = Vector3.new(0,-1,0) + Tool.GripUp = Vector3.new(-1,0,0) end function onActivated() - if Tool.Lunged.Value == false then - swordOut() - Tool.Lunged.Value = true - else - swordUp() - Tool.Lunged.Value = false - end + if Tool.Lunged.Value == false then + swordOut() + Tool.Lunged.Value = true + else + swordUp() + Tool.Lunged.Value = false + end end script.Parent.Activated:connect(onActivated) - true - + Lunged false - true - + + true true 0 @@ -3887,9 +3955,9 @@ script.Parent.Activated:connect(onActivated) Ice Dagger (Blue) - true + - + false -0.5 @@ -3917,7 +3985,6 @@ script.Parent.Activated:connect(onActivated) true 0.5 - 2 0.300000012 -0.5 0.5 @@ -3950,7 +4017,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 2 1 1 @@ -3958,7 +4025,7 @@ script.Parent.Activated:connect(onActivated) 2 - + 2 2 @@ -3981,11 +4048,10 @@ script.Parent.Activated:connect(onActivated) 0 1 - true - + false @@ -3994,41 +4060,40 @@ script.Parent.Activated:connect(onActivated) Tool = script.Parent function swordUp() - Tool.GripForward = Vector3.new(-1,0,0) - Tool.GripRight = Vector3.new(0,1,0) - Tool.GripUp = Vector3.new(0,0,1) + Tool.GripForward = Vector3.new(-1,0,0) + Tool.GripRight = Vector3.new(0,1,0) + Tool.GripUp = Vector3.new(0,0,1) end function swordOut() - Tool.GripForward = Vector3.new(0,0,1) - Tool.GripRight = Vector3.new(0,-1,0) - Tool.GripUp = Vector3.new(-1,0,0) + Tool.GripForward = Vector3.new(0,0,1) + Tool.GripRight = Vector3.new(0,-1,0) + Tool.GripUp = Vector3.new(-1,0,0) end function onActivated() - if Tool.Lunged.Value == false then - swordOut() - Tool.Lunged.Value = true - else - swordUp() - Tool.Lunged.Value = false - end + if Tool.Lunged.Value == false then + swordOut() + Tool.Lunged.Value = true + else + swordUp() + Tool.Lunged.Value = false + end end script.Parent.Activated:connect(onActivated) - true - + Lunged false - true - + + true true 0 @@ -4046,9 +4111,9 @@ script.Parent.Activated:connect(onActivated) Windforce - true + - + false -0.5 @@ -4076,7 +4141,6 @@ script.Parent.Activated:connect(onActivated) true 0.5 - 2 0.300000012 -0.5 0.5 @@ -4109,7 +4173,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 2 1 1 @@ -4117,7 +4181,7 @@ script.Parent.Activated:connect(onActivated) 5 - + 2 2 @@ -4140,11 +4204,10 @@ script.Parent.Activated:connect(onActivated) 1 0 - true - + false @@ -4153,41 +4216,39 @@ script.Parent.Activated:connect(onActivated) Tool = script.Parent function swordUp() - Tool.GripForward = Vector3.new(-1,0,0) - Tool.GripRight = Vector3.new(0,1,0) - Tool.GripUp = Vector3.new(0,0,1) + Tool.GripForward = Vector3.new(-1,0,0) + Tool.GripRight = Vector3.new(0,1,0) + Tool.GripUp = Vector3.new(0,0,1) end function swordOut() - Tool.GripForward = Vector3.new(0,0,1) - Tool.GripRight = Vector3.new(0,-1,0) - Tool.GripUp = Vector3.new(-1,0,0) + Tool.GripForward = Vector3.new(0,0,1) + Tool.GripRight = Vector3.new(0,-1,0) + Tool.GripUp = Vector3.new(-1,0,0) end function onActivated() - if Tool.Lunged.Value == false then - swordOut() - Tool.Lunged.Value = true - else - swordUp() - Tool.Lunged.Value = false - end + if Tool.Lunged.Value == false then + swordOut() + Tool.Lunged.Value = true + else + swordUp() + Tool.Lunged.Value = false + end end script.Parent.Activated:connect(onActivated) - true - + Lunged false - true - + 0 @@ -4205,10 +4266,10 @@ script.Parent.Activated:connect(onActivated) ROTKBWeapons null - true - + + true true 0 @@ -4226,9 +4287,9 @@ script.Parent.Activated:connect(onActivated) Shotgun rbxasset://../../../shareddata/RiseOfTheKillbots/textures/shotgun_icon.png - true + - + false -0.5 @@ -4256,7 +4317,6 @@ script.Parent.Activated:connect(onActivated) false 0.5 - 0 0.300000012 -0.5 0.5 @@ -4289,7 +4349,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 0 1 1 @@ -4297,7 +4357,7 @@ script.Parent.Activated:connect(onActivated) 2 - + 2 2 @@ -4320,13 +4380,13 @@ script.Parent.Activated:connect(onActivated) 97 97 - true - + + true true 0 @@ -4344,9 +4404,9 @@ script.Parent.Activated:connect(onActivated) Pistol rbxasset://../../../shareddata/RiseOfTheKillbots/textures/pistol_icon.png - true + - + false -0.5 @@ -4374,7 +4434,6 @@ script.Parent.Activated:connect(onActivated) false 0.5 - 0 0.300000012 -0.5 0.5 @@ -4407,7 +4466,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 0 1 1 @@ -4415,7 +4474,7 @@ script.Parent.Activated:connect(onActivated) 1 - + 2 2 @@ -4438,20 +4497,18 @@ script.Parent.Activated:connect(onActivated) 97 97 - true - + CameraType 0 - true - + 0 @@ -4469,10 +4526,10 @@ script.Parent.Activated:connect(onActivated) Gears null - true - + + true true 0 @@ -4489,10 +4546,10 @@ script.Parent.Activated:connect(onActivated) 0 KnightsSword - rbxasset://textures/BrigandsSword.png - true + rbxasset://../../../shareddata/textures/BrigandsSword.png + - + false -0.5 @@ -4520,7 +4577,6 @@ script.Parent.Activated:connect(onActivated) true 0.5 - 2 0.300000012 -0.5 0.5 @@ -4553,7 +4609,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 2 1 1 @@ -4561,11 +4617,11 @@ script.Parent.Activated:connect(onActivated) 4 - + 2 2 - rbxasset://fonts/BrigandsSwordMesh.mesh + rbxasset://../../../shareddata/fonts/BrigandsSwordMesh.mesh 5 Mesh @@ -4578,24 +4634,22 @@ script.Parent.Activated:connect(onActivated) 1.70000005 1.70000005 - rbxasset://textures/BrigandsSwordTex.png + rbxasset://../../../shareddata/textures/BrigandsSwordTex.png 1 1 1 - true - + Lunged false - true - + false @@ -4604,34 +4658,34 @@ script.Parent.Activated:connect(onActivated) Tool = script.Parent function swordUp() - Tool.GripForward = Vector3.new(-1,0,0) - Tool.GripRight = Vector3.new(0,1,0) - Tool.GripUp = Vector3.new(0,0,1) + Tool.GripForward = Vector3.new(-1,0,0) + Tool.GripRight = Vector3.new(0,1,0) + Tool.GripUp = Vector3.new(0,0,1) end function swordOut() - Tool.GripForward = Vector3.new(0,0,1) - Tool.GripRight = Vector3.new(0,-1,0) - Tool.GripUp = Vector3.new(-1,0,0) + Tool.GripForward = Vector3.new(0,0,1) + Tool.GripRight = Vector3.new(0,-1,0) + Tool.GripUp = Vector3.new(-1,0,0) end function onActivated() - if Tool.Lunged.Value == false then - swordOut() - Tool.Lunged.Value = true - else - swordUp() - Tool.Lunged.Value = false - end + if Tool.Lunged.Value == false then + swordOut() + Tool.Lunged.Value = true + else + swordUp() + Tool.Lunged.Value = false + end end script.Parent.Activated:connect(onActivated) - true - + + true true 0.5 @@ -4648,10 +4702,10 @@ script.Parent.Activated:connect(onActivated) 0 Cheezburger - rbxasset://textures/Cheezburger.png - true + rbxasset://../../../shareddata/textures/Cheezburger.png + - + false -0.5 @@ -4679,7 +4733,6 @@ script.Parent.Activated:connect(onActivated) true 0.5 - 2 0.300000012 -0.5 0.5 @@ -4712,7 +4765,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 2 1 1 @@ -4720,11 +4773,11 @@ script.Parent.Activated:connect(onActivated) 1 - + 2 2 - rbxasset://fonts/CheezburgerMesh.mesh + rbxasset://../../../shareddata/fonts/CheezburgerMesh.mesh 5 Mesh @@ -4737,17 +4790,16 @@ script.Parent.Activated:connect(onActivated) 1 1 - rbxasset://textures/CheezburgerTex.png + rbxasset://../../../shareddata/textures/CheezburgerTex.png 1 1 1 - true - + false @@ -4756,43 +4808,42 @@ script.Parent.Activated:connect(onActivated) Tool = script.Parent function burgerIdle() - Tool.GripForward = Vector3.new(-1, 0, 0) - Tool.GripPos = Vector3.new(-.5, -.1, 0) - Tool.GripRight = Vector3.new(0, 0, 1) - Tool.GripUp = Vector3.new(0,1,0) + Tool.GripForward = Vector3.new(-1, 0, 0) + Tool.GripPos = Vector3.new(-.5, -.1, 0) + Tool.GripRight = Vector3.new(0, 0, 1) + Tool.GripUp = Vector3.new(0,1,0) end function burgerEat() - Tool.GripForward = Vector3.new(-.981, .196, 0) - Tool.GripPos = Vector3.new(-.5, -0.6, -1.5) - Tool.GripRight = Vector3.new(0, -0, -1) - Tool.GripUp = Vector3.new(0.196, .981, 0) + Tool.GripForward = Vector3.new(-.981, .196, 0) + Tool.GripPos = Vector3.new(-.5, -0.6, -1.5) + Tool.GripRight = Vector3.new(0, -0, -1) + Tool.GripUp = Vector3.new(0.196, .981, 0) end function onActivated() - if Tool.Eat.Value == false then - burgerEat() - Tool.Eat.Value = true - else - burgerIdle() - Tool.Eat.Value = false - end + if Tool.Eat.Value == false then + burgerEat() + Tool.Eat.Value = true + else + burgerIdle() + Tool.Eat.Value = false + end end script.Parent.Activated:connect(onActivated) - true - + Eat false - true - + + true true -0.600000024 @@ -4809,10 +4860,10 @@ script.Parent.Activated:connect(onActivated) 0.928505063 WhiteNinjaStar - rbxasset://textures/NinjaStar.png - true + rbxasset://../../../shareddata/textures/NinjaStar.png + - + false -0.5 @@ -4840,7 +4891,6 @@ script.Parent.Activated:connect(onActivated) true 0.5 - 2 0.300000012 -0.5 0.5 @@ -4873,7 +4923,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 2 1 1 @@ -4881,11 +4931,11 @@ script.Parent.Activated:connect(onActivated) 1 - + 2 2 - rbxasset://fonts/NinjaStarMesh.mesh + rbxasset://../../../shareddata/fonts/NinjaStarMesh.mesh 5 Mesh @@ -4898,19 +4948,19 @@ script.Parent.Activated:connect(onActivated) 3 3 - rbxasset://textures/NinjaStarTex.png + rbxasset://../../../shareddata/textures/NinjaStarTex.png 1 1 1 - true - + + true true 0 @@ -4927,10 +4977,10 @@ script.Parent.Activated:connect(onActivated) -1 GravityCoil - rbxasset://textures/Coil.png - true + rbxasset://../../../shareddata/textures/Coil.png + - + false -0.5 @@ -4958,7 +5008,6 @@ script.Parent.Activated:connect(onActivated) true 0.5 - 2 0.300000012 -0.5 0.5 @@ -4991,7 +5040,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 2 1 1 @@ -4999,11 +5048,11 @@ script.Parent.Activated:connect(onActivated) 2 - + 2 2 - rbxasset://fonts/CoilMesh.mesh + rbxasset://../../../shareddata/fonts/CoilMesh.mesh 5 Mesh @@ -5016,19 +5065,19 @@ script.Parent.Activated:connect(onActivated) 0.699999988 0.699999988 - rbxasset://textures/CoilTex.png + rbxasset://../../../shareddata/textures/CoilTex.png 1 1 1 - true - + + true true 0.0299999993 @@ -5045,10 +5094,10 @@ script.Parent.Activated:connect(onActivated) 0.217036352 BloxyCola - rbxasset://textures/BloxyCola.png - true + rbxasset://../../../shareddata/textures/BloxyCola.png + - + false -0.5 @@ -5076,7 +5125,6 @@ script.Parent.Activated:connect(onActivated) true 0.5 - 2 0.300000012 -0.5 0.5 @@ -5109,7 +5157,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 2 1 1 @@ -5117,11 +5165,11 @@ script.Parent.Activated:connect(onActivated) 1 - + 2 2 - rbxasset://fonts/BloxyColaMesh.mesh + rbxasset://../../../shareddata/fonts/BloxyColaMesh.mesh 5 Mesh @@ -5134,17 +5182,16 @@ script.Parent.Activated:connect(onActivated) 1.20000005 1.20000005 - rbxasset://textures/BloxyColaTex.png + rbxasset://../../../shareddata/textures/BloxyColaTex.png 1 1 1 - true - + false @@ -5153,43 +5200,42 @@ script.Parent.Activated:connect(onActivated) Tool = script.Parent function colaIdle() - Tool.GripForward = Vector3.new(-.976,0,-0.217) - Tool.GripPos = Vector3.new(0.03,0,0) - Tool.GripRight = Vector3.new(.217,0,-.976) - Tool.GripUp = Vector3.new(0,1,0) + Tool.GripForward = Vector3.new(-.976,0,-0.217) + Tool.GripPos = Vector3.new(0.03,0,0) + Tool.GripRight = Vector3.new(.217,0,-.976) + Tool.GripUp = Vector3.new(0,1,0) end function colaDrink() - Tool.GripForward = Vector3.new(0,-.759,-.651) - Tool.GripPos = Vector3.new(1.5,-.5,.3) - Tool.GripRight = Vector3.new(1,0,0) - Tool.GripUp = Vector3.new(0,.651,-.759) + Tool.GripForward = Vector3.new(0,-.759,-.651) + Tool.GripPos = Vector3.new(1.5,-.5,.3) + Tool.GripRight = Vector3.new(1,0,0) + Tool.GripUp = Vector3.new(0,.651,-.759) end function onActivated() - if Tool.Drink.Value == false then - colaDrink() - Tool.Drink.Value = true - else - colaIdle() - Tool.Drink.Value = false - end + if Tool.Drink.Value == false then + colaDrink() + Tool.Drink.Value = true + else + colaIdle() + Tool.Drink.Value = false + end end script.Parent.Activated:connect(onActivated) - true - + Drink false - true - + + true true 0 @@ -5206,10 +5252,10 @@ script.Parent.Activated:connect(onActivated) -1 EnergySword - rbxasset://textures/EnergySword.png - true + rbxasset://../../../shareddata/textures/EnergySword.png + - + false -0.5 @@ -5237,7 +5283,6 @@ script.Parent.Activated:connect(onActivated) true 0.5 - 2 0.300000012 -0.5 0.5 @@ -5270,7 +5315,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 2 1 1 @@ -5278,11 +5323,11 @@ script.Parent.Activated:connect(onActivated) 4 - + 2 2 - rbxasset://fonts/EnergySwordMesh.mesh + rbxasset://../../../shareddata/fonts/EnergySwordMesh.mesh 5 Mesh @@ -5295,27 +5340,26 @@ script.Parent.Activated:connect(onActivated) 1.39999998 1.39999998 - rbxasset://textures/EnergySwordTex.png + rbxasset://../../../shareddata/textures/EnergySwordTex.png 1 1 0 - true - + true Sparkles 4278196480 - true - + + true true 0 @@ -5332,10 +5376,10 @@ script.Parent.Activated:connect(onActivated) 1 BanHammer - rbxasset://textures/Banhammer.png - true + rbxasset://../../../shareddata/textures/Banhammer.png + - + false -0.5 @@ -5363,7 +5407,6 @@ script.Parent.Activated:connect(onActivated) true 0.5 - 1 0.300000012 -0.5 0.5 @@ -5396,7 +5439,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 1 1 1 @@ -5404,11 +5447,11 @@ script.Parent.Activated:connect(onActivated) 1 - + 2 2 - rbxasset://fonts/BanhammerMesh.mesh + rbxasset://../../../shareddata/fonts/BanhammerMesh.mesh 5 Mesh @@ -5421,17 +5464,16 @@ script.Parent.Activated:connect(onActivated) 0.5 0.5 - rbxasset://textures/BanhammerTex.png + rbxasset://../../../shareddata/textures/BanhammerTex.png 1 1 1 - true - + false @@ -5447,154 +5489,206 @@ GRP = nil RW, LW = Instance.new("Weld"), Instance.new("Weld") function WaitForChild(obj, ch_n) - local t = time() - while not obj:FindFirstChild(ch_n) and time() - t < 10 do wait(0.1) end - return obj:FindFirstChild(ch_n) + local t = time() + while not obj:FindFirstChild(ch_n) and time() - t < 10 do wait(0.1) end + return obj:FindFirstChild(ch_n) end --onselected, save shoulders and get player script.Parent.Equipped:connect(function() - player = game.Players:playerFromCharacter(script.Parent.Parent) - local ch = script.Parent.Parent - WaitForChild(ch, "Torso") - RSH = WaitForChild(ch.Torso, "Right Shoulder") - LSH = WaitForChild(ch.Torso, "Left Shoulder") - GRP = WaitForChild(ch["Right Arm"], "RightGrip") - _G.Grip = GRP - -- - RSH.Part1 = nil - LSH.Part1 = nil - -- - RW.Part0 = ch.Torso - RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) - RW.C1 = CFrame.new(0, 0.5, 0) - RW.Part1 = ch["Right Arm"] - RW.Parent = ch.Torso - _G.R = RW - -- - LW.Part0 = ch.Torso - LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) - LW.C1 = CFrame.new(0, 0.5, 0) - LW.Part1 = ch["Left Arm"] - LW.Parent = ch.Torso - _G.L = LW - -- - GRP.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-1, 0, 0) - --Bring_Arm_Up animation - for i = 0, 1, 0.05 do - wait() - RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.3*i, 0, -0.5*i) - LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7*i, 0, 0.8*i) - LW.C1 = CFrame.new(-0.3*i, 0.5+1.2*i, 0) - end - --put in grip - wait() - local rg = (ch["Right Arm"]:FindFirstChild("RightGrip") or GRP) - if rg ~= GRP then - GRP.Parent = ch["Right Arm"] - rg:remove() - end + player = game.Players:playerFromCharacter(script.Parent.Parent) + + local ch = script.Parent.Parent + WaitForChild(ch, "Torso") + RSH = WaitForChild(ch.Torso, "Right Shoulder") + LSH = WaitForChild(ch.Torso, "Left Shoulder") + GRP = WaitForChild(ch["Right Arm"], "RightGrip") + _G.Grip = GRP + -- + RSH.Part1 = nil + LSH.Part1 = nil + -- + RW.Part0 = ch.Torso + RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) + RW.C1 = CFrame.new(0, 0.5, 0) + RW.Part1 = ch["Right Arm"] + RW.Parent = ch.Torso + _G.R = RW + -- + LW.Part0 = ch.Torso + LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) + LW.C1 = CFrame.new(0, 0.5, 0) + LW.Part1 = ch["Left Arm"] + LW.Parent = ch.Torso + _G.L = LW + -- + GRP.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-1, 0, 0) + --Bring_Arm_Up animation + Tool.AnimSection.Value = 1 + for i = 0, 1, 0.05 do + wait() + RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.3*i, 0, -0.5*i) + LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7*i, 0, 0.8*i) + LW.C1 = CFrame.new(-0.3*i, 0.5+1.2*i, 0) + Tool.AnimFrame.Value = Tool.AnimFrame.Value + i + end + --put in grip + wait() + local rg = (ch["Right Arm"]:FindFirstChild("RightGrip") or GRP) + if rg ~= GRP then + GRP.Parent = ch["Right Arm"] + rg:remove() + end end) --griptcf = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-math.pi/2+0.5, 0, 0) script.Parent.Unequipped:connect(function() - local pl = player - --Bring_Arm_Down animation - for i = 1, 0, -0.05 do - wait() - RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.3*i, 0, -0.5*i) - LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7*i, 0, 0.8*i) - LW.C1 = CFrame.new(-0.3*i, 0.5+1.2*i, 0) - end - RW.Parent = nil - LW.Parent = nil - RSH.Part1 = pl.Character["Right Arm"] - LSH.Part1 = pl.Character["Left Arm"] + local pl = player + --Bring_Arm_Down animation + Tool.AnimSection.Value = 1 + for i = 1, 0, -0.05 do + wait() + RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.3*i, 0, -0.5*i) + LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7*i, 0, 0.8*i) + LW.C1 = CFrame.new(-0.3*i, 0.5+1.2*i, 0) + Tool.AnimFrame.Value = Tool.AnimFrame.Value + i + end + RW.Parent = nil + LW.Parent = nil + RSH.Part1 = pl.Character["Right Arm"] + LSH.Part1 = pl.Character["Left Arm"] end) function HomeRun() - for i = 0, 1, 0.1 do - if Tool.CurAnim.Value ~= "homerun" then return end - wait() - RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.3+1.2*i, -0.5*i, -0.5+i) - --R.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.5, -0.5, 0.5) - LW.C0 = CFrame.new(-1.5+0.5*i, 0.5, -0.5*i) * CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) - --L.C0 = CFrame.new(-1.0, 0.5, -0.5) * CFrame.fromEulerAnglesXYZ(1.7, 0, 1) - end - ---------------------------------------- - for i = 0, 1, 0.2 do - wait() - RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.5, -0.5-1.7*i, 0.5+0.5*i) - --R.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.5, -2.2, 1) - LW.C0 = CFrame.new(-1-0.5*i, 0.5, -0.5+0.5*i) * CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8-1.2*i) - LW.C1 = CFrame.new(0, 0.5-i, 0) - GRP.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-1-2*i, 0, 0) - end - for i = 0, 1, 0.2 do - wait() - RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.5, -2.2-0.6*i, 1) - end - wait(0.1) - -------------------------------------- - for i = 0, 1, 0.1 do - wait() - RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.5-1.2*i, -2.8+2.8*i, 1-1.5*i) - --RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) - LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7, 0, -0.4+1.2*i) - LW.C1 = CFrame.new(0, -0.5+i*2, 0) - --LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) - GRP.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-3+2*i, 0, 0) - end + Tool.AnimSection.Value = 1 + for i = 0, 1, 0.1 do + if Tool.PlayAnim.Value == false then return end + if Tool.CurAnim.Value ~= "homerun" then return end + wait() + RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.3+1.2*i, -0.5*i, -0.5+i) + --R.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.5, -0.5, 0.5) + LW.C0 = CFrame.new(-1.5+0.5*i, 0.5, -0.5*i) * CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) + --L.C0 = CFrame.new(-1.0, 0.5, -0.5) * CFrame.fromEulerAnglesXYZ(1.7, 0, 1) + Tool.AnimFrame.Value = Tool.AnimFrame.Value + i + end + Tool.AnimSection.Value = 2 + ---------------------------------------- + for i = 0, 1, 0.2 do + if Tool.PlayAnim.Value == false then return end + wait() + RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.5, -0.5-1.7*i, 0.5+0.5*i) + --R.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.5, -2.2, 1) + LW.C0 = CFrame.new(-1-0.5*i, 0.5, -0.5+0.5*i) * CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8-1.2*i) + LW.C1 = CFrame.new(0, 0.5-i, 0) + GRP.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-1-2*i, 0, 0) + Tool.AnimFrame.Value = Tool.AnimFrame.Value + i + end + Tool.AnimSection.Value = 3 + for i = 0, 1, 0.2 do + if Tool.PlayAnim.Value == false then return end + wait() + RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.5, -2.2-0.6*i, 1) + Tool.AnimFrame.Value = Tool.AnimFrame.Value + i + end + wait(0.1) + Tool.AnimSection.Value = 4 + -------------------------------------- + for i = 0, 1, 0.1 do + if Tool.PlayAnim.Value == false then return end + wait() + RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.5-1.2*i, -2.8+2.8*i, 1-1.5*i) + --RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) + LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7, 0, -0.4+1.2*i) + LW.C1 = CFrame.new(0, -0.5+i*2, 0) + --LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) + GRP.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-3+2*i, 0, 0) + Tool.AnimFrame.Value = Tool.AnimFrame.Value + i + end end function Whack() - for i = 0, 1, 0.2 do - if Tool.CurAnim.Value ~= "norm" then return end - wait() - RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.3+i, 0, -0.5+0.5*i) - LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7-0.25*i, 0, 0.8-0.6*i) - end - for i = 0, 1, 0.25 do - if Tool.CurAnim.Value ~= "norm" then return end - wait() - RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.3-2.5*i, 0, 0) - LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.45-0.25*i, 0, 0.2) - GRP.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-1-0.5*i, 0, 0) - end - for i = 0, 1, 0.2 do - if Tool.CurAnim.Value ~= "norm" then return end - wait() - RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(-0.2+1.5*i, 0, -0.5*i) - LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.2+0.5*i, 0, 0.2+0.6*i) - GRP.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-1.5+0.5*i, 0, 0) - end + Tool.AnimSection.Value = 1 + for i = 0, 1, 0.2 do + if Tool.PlayAnim.Value == false then return end + if Tool.CurAnim.Value ~= "norm" then return end + wait() + RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.3+i, 0, -0.5+0.5*i) + LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7-0.25*i, 0, 0.8-0.6*i) + Tool.AnimFrame.Value = Tool.AnimFrame.Value + i + end + Tool.AnimSection.Value = 2 + for i = 0, 1, 0.25 do + if Tool.PlayAnim.Value == false then return end + if Tool.CurAnim.Value ~= "norm" then return end + wait() + RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.3-2.5*i, 0, 0) + LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.45-0.25*i, 0, 0.2) + GRP.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-1-0.5*i, 0, 0) + Tool.AnimFrame.Value = Tool.AnimFrame.Value + i + end + Tool.AnimSection.Value = 3 + for i = 0, 1, 0.2 do + if Tool.PlayAnim.Value == false then return end + if Tool.CurAnim.Value ~= "norm" then return end + wait() + RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(-0.2+1.5*i, 0, -0.5*i) + LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.2+0.5*i, 0, 0.2+0.6*i) + GRP.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-1.5+0.5*i, 0, 0) + Tool.AnimFrame.Value = Tool.AnimFrame.Value + i + end end function onActivated() - if Tool.CurAnim.Value == "homerun" then - Tool.CurAnim.Value = "norm" - Whack() - elseif Tool.CurAnim.Value == "norm" then - Tool.CurAnim.Value = "homerun" - HomeRun() - end + Tool.PlayAnim.Value = true + Tool.AnimFrame.Value = 0 + Tool.AnimSection.Value = 0 + if Tool.CurAnim.Value == "homerun" then + Tool.CurAnim.Value = "norm" + Whack() + elseif Tool.CurAnim.Value == "norm" then + Tool.CurAnim.Value = "homerun" + HomeRun() + end end -script.Parent.Activated:connect(onActivated) - true +function onDeactivated() + Tool.PlayAnim.Value = false +end + +script.Parent.Activated:connect(onActivated) +script.Parent.Deactivated:connect(onDeactivated) + - + CurAnim homerun - true + + + + + PlayAnim + false + + + + + AnimFrame + 0 + + + + + AnimSection + 0 - + + true true -0.5 @@ -5611,10 +5705,10 @@ script.Parent.Activated:connect(onActivated) 0 SubspaceTripmine - rbxasset://textures/Tripmine.png - true + rbxasset://../../../shareddata/textures/Tripmine.png + - + false -0.5 @@ -5642,7 +5736,6 @@ script.Parent.Activated:connect(onActivated) true 0.5 - 0 0.300000012 -0.5 0.5 @@ -5675,7 +5768,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 0 1 2 @@ -5683,11 +5776,11 @@ script.Parent.Activated:connect(onActivated) 2 - + 2 2 - rbxasset://fonts/TripmineMesh.mesh + rbxasset://../../../shareddata/fonts/TripmineMesh.mesh 5 Mesh @@ -5700,19 +5793,19 @@ script.Parent.Activated:connect(onActivated) 0.699999988 0.699999988 - rbxasset://textures/TripmineTex.png + rbxasset://../../../shareddata/textures/TripmineTex.png 1 1 1 - true - + + true true -0.400000006 @@ -5729,10 +5822,10 @@ script.Parent.Activated:connect(onActivated) -1 BluesteelClaws - rbxasset://textures/Claw.png - true + rbxasset://../../../shareddata/textures/Claw.png + - + false -0.5 @@ -5760,7 +5853,6 @@ script.Parent.Activated:connect(onActivated) true 0.5 - 2 0.300000012 -0.5 0.5 @@ -5793,7 +5885,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 2 1 1 @@ -5801,11 +5893,11 @@ script.Parent.Activated:connect(onActivated) 2 - + 2 2 - rbxasset://fonts/ClawMesh.mesh + rbxasset://../../../shareddata/fonts/ClawMesh.mesh 5 Mesh @@ -5818,19 +5910,19 @@ script.Parent.Activated:connect(onActivated) 1 1 - rbxasset://textures/ClawTex.png + rbxasset://../../../shareddata/textures/ClawTex.png 1 1 1 - true - + + true true 0 @@ -5847,10 +5939,10 @@ script.Parent.Activated:connect(onActivated) 0 LaserPistol - rbxasset://textures/LaserPistol.png - true + rbxasset://../../../shareddata/textures/LaserPistol.png + - + false -0.5 @@ -5878,7 +5970,6 @@ script.Parent.Activated:connect(onActivated) true 0.5 - 2 0.300000012 -0.5 0.5 @@ -5911,7 +6002,7 @@ script.Parent.Activated:connect(onActivated) 0 0 - true + 2 1 1 @@ -5919,11 +6010,11 @@ script.Parent.Activated:connect(onActivated) 1 - + 2 2 - rbxasset://fonts/LaserPistolMesh.mesh + rbxasset://../../../shareddata/fonts/LaserPistolMesh.mesh 5 Mesh @@ -5936,17 +6027,16 @@ script.Parent.Activated:connect(onActivated) 1 1 - rbxasset://textures/LaserPistolTex.png + rbxasset://../../../shareddata/textures/LaserPistolTex.png 1 1 1 - true - + false @@ -5955,57 +6045,42 @@ script.Parent.Activated:connect(onActivated) Tool = script.Parent function gunUp() - Tool.GripForward = Vector3.new(0,.981,-.196) - Tool.GripRight = Vector3.new(1,0,0) - Tool.GripUp = Vector3.new(0,.196,.981) + Tool.GripForward = Vector3.new(0,.981,-.196) + Tool.GripRight = Vector3.new(1,0,0) + Tool.GripUp = Vector3.new(0,.196,.981) end function gunOut() - Tool.GripForward = Vector3.new(0,1,0) - Tool.GripRight = Vector3.new(1,0,0) - Tool.GripUp = Vector3.new(0,0,1) + Tool.GripForward = Vector3.new(0,1,0) + Tool.GripRight = Vector3.new(1,0,0) + Tool.GripUp = Vector3.new(0,0,1) end function onActivated() - if Tool.Shoot.Value == false then - gunUp() - Tool.Shoot.Value = true - else - gunOut() - Tool.Shoot.Value = false - end + if Tool.Shoot.Value == false then + gunUp() + Tool.Shoot.Value = true + else + gunOut() + Tool.Shoot.Value = false + end end script.Parent.Activated:connect(onActivated) - true - + Shoot false - true - + ChangeHistoryService - true - - - - - Instance - true - - - - - Instance - true \ No newline at end of file diff --git a/scripts/launcher/3DView/CSView.lua b/scripts/launcher/3DView/CSView.lua deleted file mode 100644 index e48542c..0000000 --- a/scripts/launcher/3DView/CSView.lua +++ /dev/null @@ -1,481 +0,0 @@ -dofile("rbxasset://scripts\\cores\\StarterScript.lua") - -pcall(function() game:GetService("ScriptContext").ScriptsDisabled = false end) -game.CoreGui.RobloxGui.TopLeftControl:Remove() -game.CoreGui.RobloxGui.BottomLeftControl:Remove() -game.CoreGui.RobloxGui.BottomRightControl:Remove() -game.GuiRoot.RightPalette:Remove() -game.GuiRoot.ChatMenuPanel:Remove() -game.GuiRoot.ScoreHud:Remove() -game.GuiRoot.ChatHud:Remove() - ---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 LoadCharacterNew(playerApp,newChar) - local path = "rbxasset://../../../shareddata/charcustom/" - - wait(0.65) - - 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, "http") == "http") then - if (pcall(function() - newTShirt = game.Workspace:InsertContent(newVal.Value) - if newTShirt[1] then - if newTShirt[1].className == "ShirtGraphic" then - newTShirt[1].Parent = newChar - local oldTexture = newTShirt[1].Graphic; - OldURL,OldID = oldTexture:match("(.+)=(.+)") - NewURL,NewID = newVal.Value:match("(.+)=(.+)") - newTShirt[1].Graphic = NewURL .. '=' .. OldID - else - newTShirt[1]:remove() - end - end - end)) then - --nothing - print("success"); - else - print("fail"); - newTShirt = Instance.new("ShirtGraphic") - newTShirt.Graphic = newVal.Value - newTShirt.Parent = newChar - 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, "http") == "http") then - if (pcall(function() - newShirt = game.Workspace:InsertContent(newVal.Value) - if newShirt[1] then - if newShirt[1].className == "Shirt" then - newShirt[1].Parent = newChar - local oldTexture = newShirt[1].ShirtTemplate; - OldURL,OldID = oldTexture:match("(.+)=(.+)") - NewURL,NewID = newVal.Value:match("(.+)=(.+)") - newShirt[1].ShirtTemplate = NewURL .. '=' .. OldID - else - newShirt[1]:remove() - end - end - end)) then - --nothing - print("success"); - else - print("fail"); - newShirt = Instance.new("Shirt") - newShirt.ShirtTemplate = newVal.Value - newShirt.Parent = newChar - 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, "http") == "http") then - if (pcall(function() - newPants = game.Workspace:InsertContent(newVal.Value) - if newPants[1] then - if newPants[1].className == "Pants" then - newPants[1].Parent = newChar - local oldTexture = newPants[1].PantsTemplate; - OldURL,OldID = oldTexture:match("(.+)=(.+)") - NewURL,NewID = newVal.Value:match("(.+)=(.+)") - newPants[1].PantsTemplate = NewURL .. '=' .. OldID - else - newPants[1]:remove() - end - end - end)) then - --nothing - print("success"); - else - print("fail"); - newPants = Instance.new("Pants") - newPants.PantsTemplate = newVal.Value - newPants.Parent = newChar - 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 = ""; - if (string.match(newVal.Value, "http") == "http") then - if (pcall(function() - newFace = game.Workspace:InsertContent(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" - local oldTexture = newFace[1].Texture; - OldURL,OldID = oldTexture:match("(.+)=(.+)") - NewURL,NewID = newVal.Value:match("(.+)=(.+)") - newFace[1].Texture = NewURL .. '=' .. OldID - else - newFace[1]:remove() - end - end - end)) then - --nothing - print("success"); - else - print("fail"); - newWaitForChild(charparts[1],"face"):remove() - newFace = Instance.new("Decal") - newFace.Texture = newVal.Value - newFace.Face = "Front" - newFace.Parent = charparts[1] - end - else - 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 - 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,IconType) - 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 - --ICON - local newIcon = Instance.new("StringValue",newCharApp) - if (IconType ~= nil) then - newIcon.Value = IconType - else - newIcon.Value = "NBC" - end - newIcon.Name = "Icon" - local typeValue = Instance.new("NumberValue") - typeValue.Name = "CustomizationType" - typeValue.Parent = newIcon - typeValue.Value = 9 -end - -print("3DView loaded. Nerd.") - -function CS3DView(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) - game:GetService("RunService"):Run() - game:SetMessage("Loading Player...") - - local plr = game.Players:CreateLocalPlayer(UserID) - 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" or string.match(IconType, "http") == "http") 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,IconType) - wait(0.79) - LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) - - local target = game.Workspace.Base.SpawnLocation - local camera = game.Workspace.CurrentCamera - camera.CameraType = Enum.CameraType.Watch - local cf = CFrame.new(0, 10, 18) * CFrame.Angles(math.rad(180), 0, 0) - camera.CoordinateFrame = cf; - camera.CameraSubject = target - - i = true - - local function fixJump(prop) - plr.Character.Torso.Velocity = plr.Character.Torso.Velocity * Vector3.new (1, 0, 1) - if i == true then - plr.Character.Torso.CFrame = plr.Character.Torso.CFrame - Vector3.new(0, 1.8, 0) - i = false - else - i = true - end - end - - local human = plr.Character.Humanoid - - human.WalkSpeed = 0 - human.Jumping:connect(fixJump) - - game:GetService("Visit"):SetUploadUrl("") - game:ClearMessage() -end - -function CS3DViewEdit() -end - -_G.CS3DView=CS3DView -_G.CS3DViewEdit=CS3DViewEdit \ No newline at end of file diff --git a/scripts/launcher/3DView/cores/PlayerlistScript.lua b/scripts/launcher/3DView/cores/PlayerlistScript.lua deleted file mode 100644 index c4c867f..0000000 --- a/scripts/launcher/3DView/cores/PlayerlistScript.lua +++ /dev/null @@ -1,3613 +0,0 @@ -print("Starting playerlist...") --- RBXGUI START -- -local RbxGuiLib = {} - -local function ScopedConnect(parentInstance, instance, event, signalFunc, syncFunc, removeFunc) - local eventConnection = nil - - --Connection on parentInstance is scoped by parentInstance (when destroyed, it goes away) - local tryConnect = function() - if game:IsAncestorOf(parentInstance) then - --Entering the world, make sure we are connected/synced - if not eventConnection then - eventConnection = instance[event]:connect(signalFunc) - if syncFunc then syncFunc() end - end - else - --Probably leaving the world, so disconnect for now - if eventConnection then - eventConnection:disconnect() - if removeFunc then removeFunc() end - end - end - end - - --Hook it up to ancestryChanged signal - local connection = parentInstance.AncestryChanged:connect(tryConnect) - - --Now connect us if we're already in the world - tryConnect() - - return connection -end - -local function CreateButtons(frame, buttons, yPos, ySize) - local buttonNum = 1 - local buttonObjs = {} - for i, obj in ipairs(buttons) do - local button = Instance.new("TextButton") - button.Name = "Button" .. buttonNum - button.Font = Enum.Font.Arial - button.FontSize = Enum.FontSize.Size18 - button.AutoButtonColor = true - button.Style = Enum.ButtonStyle.RobloxButtonDefault - button.Text = obj.Text - button.TextColor3 = Color3.new(1,1,1) - button.MouseButton1Click:connect(obj.Function) - button.Parent = frame - buttonObjs[buttonNum] = button - - buttonNum = buttonNum + 1 - end - local numButtons = buttonNum-1 - - if numButtons == 1 then - frame.Button1.Position = UDim2.new(0.35, 0, yPos.Scale, yPos.Offset) - frame.Button1.Size = UDim2.new(.4,0,ySize.Scale, ySize.Offset) - elseif numButtons == 2 then - frame.Button1.Position = UDim2.new(0.1, 0, yPos.Scale, yPos.Offset) - frame.Button1.Size = UDim2.new(.8/3,0, ySize.Scale, ySize.Offset) - - frame.Button2.Position = UDim2.new(0.55, 0, yPos.Scale, yPos.Offset) - frame.Button2.Size = UDim2.new(.35,0, ySize.Scale, ySize.Offset) - elseif numButtons >= 3 then - local spacing = .1 / numButtons - local buttonSize = .9 / numButtons - - buttonNum = 1 - while buttonNum <= numButtons do - buttonObjs[buttonNum].Position = UDim2.new(spacing*buttonNum + (buttonNum-1) * buttonSize, 0, yPos.Scale, yPos.Offset) - buttonObjs[buttonNum].Size = UDim2.new(buttonSize, 0, ySize.Scale, ySize.Offset) - buttonNum = buttonNum + 1 - end - end -end - -local function setSliderPos(newAbsPosX,slider,sliderPosition,bar,steps) - - local newStep = steps - 1 --otherwise we really get one more step than we want - - local relativePosX = math.min(1, math.max(0, (newAbsPosX - bar.AbsolutePosition.X) / bar.AbsoluteSize.X ) ) - local wholeNum, remainder = math.modf(relativePosX * newStep) - if remainder > 0.5 then - wholeNum = wholeNum + 1 - end - relativePosX = wholeNum/newStep - - local result = math.ceil(relativePosX * newStep) - if sliderPosition.Value ~= (result + 1) then --onky update if we moved a step - sliderPosition.Value = result + 1 - - if relativePosX == 1 then - slider.Position = UDim2.new(1,-slider.AbsoluteSize.X,slider.Position.Y.Scale,slider.Position.Y.Offset) - else - slider.Position = UDim2.new(relativePosX,0,slider.Position.Y.Scale,slider.Position.Y.Offset) - end - end - -end - -local function cancelSlide(areaSoak) - areaSoak.Visible = false - if areaSoakMouseMoveCon then areaSoakMouseMoveCon:disconnect() end -end - -RbxGuiLib.CreateStyledMessageDialog = function(title, message, style, buttons) - local frame = Instance.new("Frame") - frame.Size = UDim2.new(0.5, 0, 0, 165) - frame.Position = UDim2.new(0.25, 0, 0.5, -72.5) - frame.Name = "MessageDialog" - frame.Active = true - frame.Style = Enum.FrameStyle.RobloxRound - - local styleImage = Instance.new("ImageLabel") - styleImage.Name = "StyleImage" - styleImage.BackgroundTransparency = 1 - styleImage.Position = UDim2.new(0,5,0,15) - if style == "error" or style == "Error" then - styleImage.Size = UDim2.new(0, 71, 0, 71) - styleImage.Image = "rbxasset://textures/ui/Error.png" - elseif style == "notify" or style == "Notify" then - styleImage.Size = UDim2.new(0, 71, 0, 71) - styleImage.Image = "rbxasset://textures/ui/Notify.png" - elseif style == "confirm" or style == "Confirm" then - styleImage.Size = UDim2.new(0, 74, 0, 76) - styleImage.Image = "rbxasset://textures/ui/Confirm.png" - else - return RbxGuiLib.CreateMessageDialog(title,message,buttons) - end - styleImage.Parent = frame - - local titleLabel = Instance.new("TextLabel") - titleLabel.Name = "Title" - titleLabel.Text = title - titleLabel.BackgroundTransparency = 1 - titleLabel.TextColor3 = Color3.new(221/255,221/255,221/255) - titleLabel.Position = UDim2.new(0, 80, 0, 0) - titleLabel.Size = UDim2.new(1, -80, 0, 40) - titleLabel.Font = Enum.Font.ArialBold - titleLabel.FontSize = Enum.FontSize.Size36 - titleLabel.TextXAlignment = Enum.TextXAlignment.Center - titleLabel.TextYAlignment = Enum.TextYAlignment.Center - titleLabel.Parent = frame - - local messageLabel = Instance.new("TextLabel") - messageLabel.Name = "Message" - messageLabel.Text = message - messageLabel.TextColor3 = Color3.new(221/255,221/255,221/255) - messageLabel.Position = UDim2.new(0.025, 80, 0, 45) - messageLabel.Size = UDim2.new(0.95, -80, 0, 55) - messageLabel.BackgroundTransparency = 1 - messageLabel.Font = Enum.Font.Arial - messageLabel.FontSize = Enum.FontSize.Size18 - messageLabel.TextWrap = true - messageLabel.TextXAlignment = Enum.TextXAlignment.Left - messageLabel.TextYAlignment = Enum.TextYAlignment.Top - messageLabel.Parent = frame - - CreateButtons(frame, buttons, UDim.new(0, 105), UDim.new(0, 40) ) - - return frame -end - -RbxGuiLib.CreateMessageDialog = function(title, message, buttons) - local frame = Instance.new("Frame") - frame.Size = UDim2.new(0.5, 0, 0.5, 0) - frame.Position = UDim2.new(0.25, 0, 0.25, 0) - frame.Name = "MessageDialog" - frame.Active = true - frame.Style = Enum.FrameStyle.RobloxRound - - local titleLabel = Instance.new("TextLabel") - titleLabel.Name = "Title" - titleLabel.Text = title - titleLabel.BackgroundTransparency = 1 - titleLabel.TextColor3 = Color3.new(221/255,221/255,221/255) - titleLabel.Position = UDim2.new(0, 0, 0, 0) - titleLabel.Size = UDim2.new(1, 0, 0.15, 0) - titleLabel.Font = Enum.Font.ArialBold - titleLabel.FontSize = Enum.FontSize.Size36 - titleLabel.TextXAlignment = Enum.TextXAlignment.Center - titleLabel.TextYAlignment = Enum.TextYAlignment.Center - titleLabel.Parent = frame - - local messageLabel = Instance.new("TextLabel") - messageLabel.Name = "Message" - messageLabel.Text = message - messageLabel.TextColor3 = Color3.new(221/255,221/255,221/255) - messageLabel.Position = UDim2.new(0.025, 0, 0.175, 0) - messageLabel.Size = UDim2.new(0.95, 0, .55, 0) - messageLabel.BackgroundTransparency = 1 - messageLabel.Font = Enum.Font.Arial - messageLabel.FontSize = Enum.FontSize.Size18 - messageLabel.TextWrap = true - messageLabel.TextXAlignment = Enum.TextXAlignment.Left - messageLabel.TextYAlignment = Enum.TextYAlignment.Top - messageLabel.Parent = frame - - CreateButtons(frame, buttons, UDim.new(0.8,0), UDim.new(0.15, 0)) - - return frame -end - -RbxGuiLib.CreateDropDownMenu = function(items, onSelect, forRoblox) - local width = UDim.new(0, 100) - local height = UDim.new(0, 32) - - local xPos = 0.055 - local frame = Instance.new("Frame") - frame.Name = "DropDownMenu" - frame.BackgroundTransparency = 1 - frame.Size = UDim2.new(width, height) - - local dropDownMenu = Instance.new("TextButton") - dropDownMenu.Name = "DropDownMenuButton" - dropDownMenu.TextWrap = true - dropDownMenu.TextColor3 = Color3.new(1,1,1) - dropDownMenu.Text = "Choose One" - dropDownMenu.Font = Enum.Font.ArialBold - dropDownMenu.FontSize = Enum.FontSize.Size18 - dropDownMenu.TextXAlignment = Enum.TextXAlignment.Left - dropDownMenu.TextYAlignment = Enum.TextYAlignment.Center - dropDownMenu.BackgroundTransparency = 1 - dropDownMenu.AutoButtonColor = true - dropDownMenu.Style = Enum.ButtonStyle.RobloxButton - dropDownMenu.Size = UDim2.new(1,0,1,0) - dropDownMenu.Parent = frame - dropDownMenu.ZIndex = 2 - - local dropDownIcon = Instance.new("ImageLabel") - dropDownIcon.Name = "Icon" - dropDownIcon.Active = false - dropDownIcon.Image = "rbxasset://textures/ui/DropDown.png" - dropDownIcon.BackgroundTransparency = 1 - dropDownIcon.Size = UDim2.new(0,11,0,6) - dropDownIcon.Position = UDim2.new(1,-11,0.5, -2) - dropDownIcon.Parent = dropDownMenu - dropDownIcon.ZIndex = 2 - - local itemCount = #items - local dropDownItemCount = #items - local useScrollButtons = false - if dropDownItemCount > 6 then - useScrollButtons = true - dropDownItemCount = 6 - end - - local droppedDownMenu = Instance.new("TextButton") - droppedDownMenu.Name = "List" - droppedDownMenu.Text = "" - droppedDownMenu.BackgroundTransparency = 1 - --droppedDownMenu.AutoButtonColor = true - droppedDownMenu.Style = Enum.ButtonStyle.RobloxButton - droppedDownMenu.Visible = false - droppedDownMenu.Active = true --Blocks clicks - droppedDownMenu.Position = UDim2.new(0,0,0,0) - droppedDownMenu.Size = UDim2.new(1,0, (1 + dropDownItemCount)*.8, 0) - droppedDownMenu.Parent = frame - droppedDownMenu.ZIndex = 2 - - local choiceButton = Instance.new("TextButton") - choiceButton.Name = "ChoiceButton" - choiceButton.BackgroundTransparency = 1 - choiceButton.BorderSizePixel = 0 - choiceButton.Text = "ReplaceMe" - choiceButton.TextColor3 = Color3.new(1,1,1) - choiceButton.TextXAlignment = Enum.TextXAlignment.Left - choiceButton.TextYAlignment = Enum.TextYAlignment.Center - choiceButton.BackgroundColor3 = Color3.new(1, 1, 1) - choiceButton.Font = Enum.Font.Arial - choiceButton.FontSize = Enum.FontSize.Size18 - if useScrollButtons then - choiceButton.Size = UDim2.new(1,-13, .8/((dropDownItemCount + 1)*.8),0) - else - choiceButton.Size = UDim2.new(1, 0, .8/((dropDownItemCount + 1)*.8),0) - end - choiceButton.TextWrap = true - choiceButton.ZIndex = 2 - - local dropDownSelected = false - - local scrollUpButton - local scrollDownButton - local scrollMouseCount = 0 - - local setZIndex = function(baseZIndex) - droppedDownMenu.ZIndex = baseZIndex +1 - if scrollUpButton then - scrollUpButton.ZIndex = baseZIndex + 3 - end - if scrollDownButton then - scrollDownButton.ZIndex = baseZIndex + 3 - end - - local children = droppedDownMenu:GetChildren() - if children then - for i, child in ipairs(children) do - if child.Name == "ChoiceButton" then - child.ZIndex = baseZIndex + 2 - elseif child.Name == "ClickCaptureButton" then - child.ZIndex = baseZIndex - end - end - end - end - - local scrollBarPosition = 1 - local updateScroll = function() - if scrollUpButton then - scrollUpButton.Active = scrollBarPosition > 1 - end - if scrollDownButton then - scrollDownButton.Active = scrollBarPosition + dropDownItemCount <= itemCount - end - - local children = droppedDownMenu:GetChildren() - if not children then return end - - local childNum = 1 - for i, obj in ipairs(children) do - if obj.Name == "ChoiceButton" then - if childNum < scrollBarPosition or childNum >= scrollBarPosition + dropDownItemCount then - obj.Visible = false - else - obj.Position = UDim2.new(0,0,((childNum-scrollBarPosition+1)*.8)/((dropDownItemCount+1)*.8),0) - obj.Visible = true - end - obj.TextColor3 = Color3.new(1,1,1) - obj.BackgroundTransparency = 1 - - childNum = childNum + 1 - end - end - end - local toggleVisibility = function() - dropDownSelected = not dropDownSelected - - dropDownMenu.Visible = not dropDownSelected - droppedDownMenu.Visible = dropDownSelected - if dropDownSelected then - setZIndex(4) - else - setZIndex(2) - end - if useScrollButtons then - updateScroll() - end - end - droppedDownMenu.MouseButton1Click:connect(toggleVisibility) - - local updateSelection = function(text) - local foundItem = false - local children = droppedDownMenu:GetChildren() - local childNum = 1 - if children then - for i, obj in ipairs(children) do - if obj.Name == "ChoiceButton" then - if obj.Text == text then - obj.Font = Enum.Font.ArialBold - foundItem = true - scrollBarPosition = childNum - else - obj.Font = Enum.Font.Arial - end - childNum = childNum + 1 - end - end - end - if not text then - dropDownMenu.Text = "Choose One" - scrollBarPosition = 1 - else - if not foundItem then - error("Invalid Selection Update -- " .. text) - end - - if scrollBarPosition + dropDownItemCount > itemCount + 1 then - scrollBarPosition = itemCount - dropDownItemCount + 1 - end - - dropDownMenu.Text = text - end - end - - local function scrollDown() - if scrollBarPosition + dropDownItemCount <= itemCount then - scrollBarPosition = scrollBarPosition + 1 - updateScroll() - return true - end - return false - end - local function scrollUp() - if scrollBarPosition > 1 then - scrollBarPosition = scrollBarPosition - 1 - updateScroll() - return true - end - return false - end - - if useScrollButtons then - --Make some scroll buttons - scrollUpButton = Instance.new("ImageButton") - scrollUpButton.Name = "ScrollUpButton" - scrollUpButton.BackgroundTransparency = 1 - scrollUpButton.Image = "rbxasset://textures/ui/scrollbuttonUp.png" - scrollUpButton.Size = UDim2.new(0,17,0,17) - scrollUpButton.Position = UDim2.new(1,-11,(1*.8)/((dropDownItemCount+1)*.8),0) - scrollUpButton.MouseButton1Click:connect( - function() - scrollMouseCount = scrollMouseCount + 1 - end) - scrollUpButton.MouseLeave:connect( - function() - scrollMouseCount = scrollMouseCount + 1 - end) - scrollUpButton.MouseButton1Down:connect( - function() - scrollMouseCount = scrollMouseCount + 1 - - scrollUp() - local val = scrollMouseCount - wait(0.5) - while val == scrollMouseCount do - if scrollUp() == false then - break - end - wait(0.1) - end - end) - - scrollUpButton.Parent = droppedDownMenu - - scrollDownButton = Instance.new("ImageButton") - scrollDownButton.Name = "ScrollDownButton" - scrollDownButton.BackgroundTransparency = 1 - scrollDownButton.Image = "rbxasset://textures/ui/scrollbuttonDown.png" - scrollDownButton.Size = UDim2.new(0,17,0,17) - scrollDownButton.Position = UDim2.new(1,-11,1,-11) - scrollDownButton.Parent = droppedDownMenu - scrollDownButton.MouseButton1Click:connect( - function() - scrollMouseCount = scrollMouseCount + 1 - end) - scrollDownButton.MouseLeave:connect( - function() - scrollMouseCount = scrollMouseCount + 1 - end) - scrollDownButton.MouseButton1Down:connect( - function() - scrollMouseCount = scrollMouseCount + 1 - - scrollDown() - local val = scrollMouseCount - wait(0.5) - while val == scrollMouseCount do - if scrollDown() == false then - break - end - wait(0.1) - end - end) - - local scrollbar = Instance.new("ImageLabel") - scrollbar.Name = "ScrollBar" - scrollbar.Image = "rbxasset://textures/ui/scrollbar.png" - scrollbar.BackgroundTransparency = 1 - scrollbar.Size = UDim2.new(0, 18, (dropDownItemCount*.8)/((dropDownItemCount+1)*.8), -(17) - 11 - 4) - scrollbar.Position = UDim2.new(1,-11,(1*.8)/((dropDownItemCount+1)*.8),17+2) - scrollbar.Parent = droppedDownMenu - end - - for i,item in ipairs(items) do - -- needed to maintain local scope for items in event listeners below - local button = choiceButton:clone() - if forRoblox then - button.RobloxLocked = true - end - button.Text = item - button.Parent = droppedDownMenu - button.MouseButton1Click:connect(function() - --Remove Highlight - button.TextColor3 = Color3.new(1,1,1) - button.BackgroundTransparency = 1 - - updateSelection(item) - onSelect(item) - - toggleVisibility() - end) - button.MouseEnter:connect(function() - --Add Highlight - button.TextColor3 = Color3.new(0,0,0) - button.BackgroundTransparency = 0 - end) - - button.MouseLeave:connect(function() - --Remove Highlight - button.TextColor3 = Color3.new(1,1,1) - button.BackgroundTransparency = 1 - end) - end - - --This does the initial layout of the buttons - updateScroll() - - local bigFakeButton = Instance.new("TextButton") - bigFakeButton.BackgroundTransparency = 1 - bigFakeButton.Name = "ClickCaptureButton" - bigFakeButton.Size = UDim2.new(0, 4000, 0, 3000) - bigFakeButton.Position = UDim2.new(0, -2000, 0, -1500) - bigFakeButton.ZIndex = 1 - bigFakeButton.Text = "" - bigFakeButton.Parent = droppedDownMenu - bigFakeButton.MouseButton1Click:connect(toggleVisibility) - - dropDownMenu.MouseButton1Click:connect(toggleVisibility) - return frame, updateSelection -end - -RbxGuiLib.CreatePropertyDropDownMenu = function(instance, property, enum) - - local items = enum:GetEnumItems() - local names = {} - local nameToItem = {} - for i,obj in ipairs(items) do - names[i] = obj.Name - nameToItem[obj.Name] = obj - end - - local frame - local updateSelection - frame, updateSelection = RbxGuiLib.CreateDropDownMenu(names, function(text) instance[property] = nameToItem[text] end) - - ScopedConnect(frame, instance, "Changed", - function(prop) - if prop == property then - updateSelection(instance[property].Name) - end - end, - function() - updateSelection(instance[property].Name) - end) - - return frame -end - -RbxGuiLib.GetFontHeight = function(font, fontSize) - if font == nil or fontSize == nil then - error("Font and FontSize must be non-nil") - end - - if font == Enum.Font.Legacy then - if fontSize == Enum.FontSize.Size8 then - return 12 - elseif fontSize == Enum.FontSize.Size9 then - return 14 - elseif fontSize == Enum.FontSize.Size10 then - return 15 - elseif fontSize == Enum.FontSize.Size11 then - return 17 - elseif fontSize == Enum.FontSize.Size12 then - return 18 - elseif fontSize == Enum.FontSize.Size14 then - return 21 - elseif fontSize == Enum.FontSize.Size18 then - return 27 - elseif fontSize == Enum.FontSize.Size24 then - return 36 - elseif fontSize == Enum.FontSize.Size36 then - return 54 - elseif fontSize == Enum.FontSize.Size48 then - return 72 - else - error("Unknown FontSize") - end - elseif font == Enum.Font.Arial or font == Enum.Font.ArialBold then - if fontSize == Enum.FontSize.Size8 then - return 8 - elseif fontSize == Enum.FontSize.Size9 then - return 9 - elseif fontSize == Enum.FontSize.Size10 then - return 10 - elseif fontSize == Enum.FontSize.Size11 then - return 11 - elseif fontSize == Enum.FontSize.Size12 then - return 12 - elseif fontSize == Enum.FontSize.Size14 then - return 14 - elseif fontSize == Enum.FontSize.Size18 then - return 18 - elseif fontSize == Enum.FontSize.Size24 then - return 24 - elseif fontSize == Enum.FontSize.Size36 then - return 36 - elseif fontSize == Enum.FontSize.Size48 then - return 48 - else - error("Unknown FontSize") - end - else - error("Unknown Font " .. font) - end -end - -local function layoutGuiObjectsHelper(frame, guiObjects, settingsTable) - local totalPixels = frame.AbsoluteSize.Y - local pixelsRemaining = frame.AbsoluteSize.Y - for i, child in ipairs(guiObjects) do - if child:IsA("TextLabel") or child:IsA("TextButton") then - local isLabel = child:IsA("TextLabel") - if isLabel then - pixelsRemaining = pixelsRemaining - settingsTable["TextLabelPositionPadY"] - else - pixelsRemaining = pixelsRemaining - settingsTable["TextButtonPositionPadY"] - end - child.Position = UDim2.new(child.Position.X.Scale, child.Position.X.Offset, 0, totalPixels - pixelsRemaining) - child.Size = UDim2.new(child.Size.X.Scale, child.Size.X.Offset, 0, pixelsRemaining) - - if child.TextFits and child.TextBounds.Y < pixelsRemaining then - child.Visible = true - if isLabel then - child.Size = UDim2.new(child.Size.X.Scale, child.Size.X.Offset, 0, child.TextBounds.Y + settingsTable["TextLabelSizePadY"]) - else - child.Size = UDim2.new(child.Size.X.Scale, child.Size.X.Offset, 0, child.TextBounds.Y + settingsTable["TextButtonSizePadY"]) - end - - while not child.TextFits do - child.Size = UDim2.new(child.Size.X.Scale, child.Size.X.Offset, 0, child.AbsoluteSize.Y + 1) - end - pixelsRemaining = pixelsRemaining - child.AbsoluteSize.Y - - if isLabel then - pixelsRemaining = pixelsRemaining - settingsTable["TextLabelPositionPadY"] - else - pixelsRemaining = pixelsRemaining - settingsTable["TextButtonPositionPadY"] - end - else - child.Visible = false - pixelsRemaining = -1 - end - - else - --GuiObject - child.Position = UDim2.new(child.Position.X.Scale, child.Position.X.Offset, 0, totalPixels - pixelsRemaining) - pixelsRemaining = pixelsRemaining - child.AbsoluteSize.Y - child.Visible = (pixelsRemaining >= 0) - end - end -end - -RbxGuiLib.LayoutGuiObjects = function(frame, guiObjects, settingsTable) - if not frame:IsA("GuiObject") then - error("Frame must be a GuiObject") - end - for i, child in ipairs(guiObjects) do - if not child:IsA("GuiObject") then - error("All elements that are layed out must be of type GuiObject") - end - end - - if not settingsTable then - settingsTable = {} - end - - if not settingsTable["TextLabelSizePadY"] then - settingsTable["TextLabelSizePadY"] = 0 - end - if not settingsTable["TextLabelPositionPadY"] then - settingsTable["TextLabelPositionPadY"] = 0 - end - if not settingsTable["TextButtonSizePadY"] then - settingsTable["TextButtonSizePadY"] = 12 - end - if not settingsTable["TextButtonPositionPadY"] then - settingsTable["TextButtonPositionPadY"] = 2 - end - - --Wrapper frame takes care of styled objects - local wrapperFrame = Instance.new("Frame") - wrapperFrame.Name = "WrapperFrame" - wrapperFrame.BackgroundTransparency = 1 - wrapperFrame.Size = UDim2.new(1,0,1,0) - wrapperFrame.Parent = frame - - for i, child in ipairs(guiObjects) do - child.Parent = wrapperFrame - end - - local recalculate = function() - wait() - layoutGuiObjectsHelper(wrapperFrame, guiObjects, settingsTable) - end - - frame.Changed:connect( - function(prop) - if prop == "AbsoluteSize" then - --Wait a heartbeat for it to sync in - recalculate() - end - end) - frame.AncestryChanged:connect(recalculate) - - layoutGuiObjectsHelper(wrapperFrame, guiObjects, settingsTable) -end - - -RbxGuiLib.CreateSlider = function(steps,width,position) - local sliderGui = Instance.new("Frame") - sliderGui.Size = UDim2.new(1,0,1,0) - sliderGui.BackgroundTransparency = 1 - sliderGui.Name = "SliderGui" - - local areaSoak = Instance.new("TextButton") - areaSoak.Name = "AreaSoak" - areaSoak.Text = "" - areaSoak.BackgroundTransparency = 1 - areaSoak.Active = false - areaSoak.Size = UDim2.new(1,0,1,0) - areaSoak.Visible = false - areaSoak.ZIndex = 4 - areaSoak.Parent = sliderGui - - local sliderPosition = Instance.new("IntValue") - sliderPosition.Name = "SliderPosition" - sliderPosition.Value = 0 - sliderPosition.Parent = sliderGui - - local id = math.random(1,100) - - local bar = Instance.new("Frame") - bar.Name = "Bar" - bar.BackgroundColor3 = Color3.new(0,0,0) - if type(width) == "number" then - bar.Size = UDim2.new(0,width,0,5) - else - bar.Size = UDim2.new(0,200,0,5) - end - bar.BorderColor3 = Color3.new(95/255,95/255,95/255) - bar.ZIndex = 2 - bar.Parent = sliderGui - - if position["X"] and position["X"]["Scale"] and position["X"]["Offset"] and position["Y"] and position["Y"]["Scale"] and position["Y"]["Offset"] then - bar.Position = position - end - - local slider = Instance.new("ImageButton") - slider.Name = "Slider" - slider.BackgroundTransparency = 1 - slider.Image = "rbxasset://textures/ui/Slider.png" - slider.Position = UDim2.new(0,0,0.5,-10) - slider.Size = UDim2.new(0,20,0,20) - slider.ZIndex = 3 - slider.Parent = bar - - local areaSoakMouseMoveCon = nil - - areaSoak.MouseLeave:connect(function() - if areaSoak.Visible then - cancelSlide(areaSoak) - end - end) - areaSoak.MouseButton1Up:connect(function() - if areaSoak.Visible then - cancelSlide(areaSoak) - end - end) - - slider.MouseButton1Down:connect(function() - areaSoak.Visible = true - if areaSoakMouseMoveCon then areaSoakMouseMoveCon:disconnect() end - areaSoakMouseMoveCon = areaSoak.MouseMoved:connect(function(x,y) - setSliderPos(x,slider,sliderPosition,bar,steps) - end) - end) - - slider.MouseButton1Up:connect(function() cancelSlide(areaSoak) end) - - sliderPosition.Changed:connect(function(prop) - sliderPosition.Value = math.min(steps, math.max(1,sliderPosition.Value)) - local relativePosX = (sliderPosition.Value) / steps - if relativePosX >= 1 then - slider.Position = UDim2.new(relativePosX,-20,slider.Position.Y.Scale,slider.Position.Y.Offset) - else - slider.Position = UDim2.new(relativePosX,0,slider.Position.Y.Scale,slider.Position.Y.Offset) - end - end) - - return sliderGui, sliderPosition - -end - - -RbxGuiLib.CreateScrollingFrame = function(orderList,scrollStyle) - local frame = Instance.new("Frame") - frame.Name = "ScrollingFrame" - frame.BackgroundTransparency = 1 - frame.Size = UDim2.new(1,0,1,0) - - local scrollUpButton = Instance.new("ImageButton") - scrollUpButton.Name = "ScrollUpButton" - scrollUpButton.BackgroundTransparency = 1 - scrollUpButton.Image = "rbxasset://textures/ui/scrollbuttonUp.png" - scrollUpButton.Size = UDim2.new(0,17,0,17) - - - local scrollDownButton = Instance.new("ImageButton") - scrollDownButton.Name = "ScrollDownButton" - scrollDownButton.BackgroundTransparency = 1 - scrollDownButton.Image = "rbxasset://textures/ui/scrollbuttonDown.png" - scrollDownButton.Size = UDim2.new(0,17,0,17) - - local style = "simple" - if scrollStyle and tostring(scrollStyle) then - style = scrollStyle - end - - local scrollPosition = 1 - local rowSize = 1 - - local layoutGridScrollBar = function() - local guiObjects = {} - if orderList then - for i, child in ipairs(orderList) do - if child.Parent == frame then - table.insert(guiObjects, child) - end - end - else - local children = frame:GetChildren() - if children then - for i, child in ipairs(children) do - if child:IsA("GuiObject") then - table.insert(guiObjects, child) - end - end - end - end - if #guiObjects == 0 then - scrollUpButton.Active = false - scrollDownButton.Active = false - scrollPosition = 1 - return - end - - if scrollPosition > #guiObjects then - scrollPosition = #guiObjects - end - - local totalPixelsY = frame.AbsoluteSize.Y - local pixelsRemainingY = frame.AbsoluteSize.Y - - local totalPixelsX = frame.AbsoluteSize.X - - local xCounter = 0 - local rowSizeCounter = 0 - local setRowSize = true - - local pixelsBelowScrollbar = 0 - local pos = #guiObjects - while pixelsBelowScrollbar < totalPixelsY and pos >= 1 do - if pos >= scrollPosition then - pixelsBelowScrollbar = pixelsBelowScrollbar + guiObjects[pos].AbsoluteSize.Y - else - xCounter = xCounter + guiObjects[pos].AbsoluteSize.X - rowSizeCounter = rowSizeCounter + 1 - if xCounter >= totalPixelsX then - if setRowSize then - rowSize = rowSizeCounter - 1 - setRowSize = false - end - - rowSizeCounter = 0 - xCounter = 0 - if pixelsBelowScrollbar + guiObjects[pos].AbsoluteSize.Y <= totalPixelsY then - --It fits, so back up our scroll position - pixelsBelowScrollbar = pixelsBelowScrollbar + guiObjects[pos].AbsoluteSize.Y - if scrollPosition <= rowSize then - scrollPosition = rowSize - break - else - --print("Backing up ScrollPosition from -- " ..scrollPosition) - scrollPosition = scrollPosition - rowSize - end - else - break - end - end - end - pos = pos - 1 - end - - xCounter = 0 - --print("ScrollPosition = " .. scrollPosition) - pos = scrollPosition - rowSizeCounter = 0 - setRowSize = true - local lastChildSize = 0 - - local xOffset,yOffset = 0 - if guiObjects[1] then - yOffset = math.ceil(math.floor(math.fmod(totalPixelsY,guiObjects[1].AbsoluteSize.X))/2) - xOffset = math.ceil(math.floor(math.fmod(totalPixelsX,guiObjects[1].AbsoluteSize.Y))/2) - end - - for i, child in ipairs(guiObjects) do - if i < scrollPosition then - --print("Hiding " .. child.Name) - child.Visible = false - else - if pixelsRemainingY < 0 then - --print("Out of Space " .. child.Name) - child.Visible = false - else - --print("Laying out " .. child.Name) - --GuiObject - if setRowSize then rowSizeCounter = rowSizeCounter + 1 end - if xCounter + child.AbsoluteSize.X >= totalPixelsX then - if setRowSize then - rowSize = rowSizeCounter - 1 - setRowSize = false - end - xCounter = 0 - pixelsRemainingY = pixelsRemainingY - child.AbsoluteSize.Y - end - child.Position = UDim2.new(child.Position.X.Scale,xCounter + xOffset, 0, totalPixelsY - pixelsRemainingY + yOffset) - xCounter = xCounter + child.AbsoluteSize.X - child.Visible = ((pixelsRemainingY - child.AbsoluteSize.Y) >= 0) - lastChildSize = child.AbsoluteSize - end - end - end - - scrollUpButton.Active = (scrollPosition > 1) - if lastChildSize == 0 then - scrollDownButton.Active = false - else - scrollDownButton.Active = ((pixelsRemainingY - lastChildSize.Y) < 0) - end - end - - - local layoutSimpleScrollBar = function() - local guiObjects = {} - - if orderList then - for i, child in ipairs(orderList) do - if child.Parent == frame then - table.insert(guiObjects, child) - end - end - else - local children = frame:GetChildren() - if children then - for i, child in ipairs(children) do - if child:IsA("GuiObject") then - table.insert(guiObjects, child) - end - end - end - end - if #guiObjects == 0 then - scrollUpButton.Active = false - scrollDownButton.Active = false - scrollPosition = 1 - return - end - - if scrollPosition > #guiObjects then - scrollPosition = #guiObjects - end - - local totalPixels = frame.AbsoluteSize.Y - local pixelsRemaining = frame.AbsoluteSize.Y - - local pixelsBelowScrollbar = 0 - local pos = #guiObjects - while pixelsBelowScrollbar < totalPixels and pos >= 1 do - if pos >= scrollPosition then - pixelsBelowScrollbar = pixelsBelowScrollbar + guiObjects[pos].AbsoluteSize.Y - else - if pixelsBelowScrollbar + guiObjects[pos].AbsoluteSize.Y <= totalPixels then - --It fits, so back up our scroll position - pixelsBelowScrollbar = pixelsBelowScrollbar + guiObjects[pos].AbsoluteSize.Y - if scrollPosition <= 1 then - scrollPosition = 1 - break - else - --print("Backing up ScrollPosition from -- " ..scrollPosition) - scrollPosition = scrollPosition - 1 - end - else - break - end - end - pos = pos - 1 - end - - --print("ScrollPosition = " .. scrollPosition) - pos = scrollPosition - for i, child in ipairs(guiObjects) do - if i < scrollPosition then - --print("Hiding " .. child.Name) - child.Visible = false - else - if pixelsRemaining < 0 then - --print("Out of Space " .. child.Name) - child.Visible = false - else - --print("Laying out " .. child.Name) - --GuiObject - child.Position = UDim2.new(child.Position.X.Scale, child.Position.X.Offset, 0, totalPixels - pixelsRemaining) - pixelsRemaining = pixelsRemaining - child.AbsoluteSize.Y - child.Visible = (pixelsRemaining >= 0) - end - end - end - scrollUpButton.Active = (scrollPosition > 1) - scrollDownButton.Active = (pixelsRemaining < 0) - end - - local reentrancyGuard = false - local recalculate = function() - if reentrancyGuard then - return - end - reentrancyGuard = true - wait() - local success, err = nil - if style == "grid" then - success, err = pcall(function() layoutGridScrollBar(frame) end) - elseif style == "simple" then - success, err = pcall(function() layoutSimpleScrollBar(frame) end) - end - if not success then print(err) end - - reentrancyGuard = false - end - - local scrollUp = function() - if scrollUpButton.Active then - scrollPosition = scrollPosition - rowSize - recalculate() - end - end - - local scrollDown = function() - if scrollDownButton.Active then - scrollPosition = scrollPosition + rowSize - recalculate() - end - end - - local scrollMouseCount = 0 - scrollUpButton.MouseButton1Click:connect( - function() - --print("Up-MouseButton1Click") - scrollMouseCount = scrollMouseCount + 1 - end) - scrollUpButton.MouseLeave:connect( - function() - --print("Up-Leave") - scrollMouseCount = scrollMouseCount + 1 - end) - - scrollUpButton.MouseButton1Down:connect( - function() - --print("Up-Down") - scrollMouseCount = scrollMouseCount + 1 - - scrollUp() - local val = scrollMouseCount - wait(0.5) - while val == scrollMouseCount do - if scrollUp() == false then - break - end - wait(0.1) - end - end) - - scrollDownButton.MouseButton1Click:connect( - function() - --print("Down-Click") - scrollMouseCount = scrollMouseCount + 1 - end) - scrollDownButton.MouseLeave:connect( - function() - --print("Down-Leave") - scrollMouseCount = scrollMouseCount + 1 - end) - scrollDownButton.MouseButton1Down:connect( - function() - --print("Down-Down") - scrollMouseCount = scrollMouseCount + 1 - - scrollDown() - local val = scrollMouseCount - wait(0.5) - while val == scrollMouseCount do - if scrollDown() == false then - break - end - wait(0.1) - end - end) - - - frame.ChildAdded:connect(function() - recalculate() - end) - - frame.ChildRemoved:connect(function() - recalculate() - end) - - frame.Changed:connect( - function(prop) - if prop == "AbsoluteSize" then - --Wait a heartbeat for it to sync in - recalculate() - end - end) - frame.AncestryChanged:connect(recalculate) - - return frame, scrollUpButton, scrollDownButton, recalculate -end -local function binaryGrow(min, max, fits) - if min > max then - return min - end - local biggestLegal = min - - while min <= max do - local mid = min + math.floor((max - min) / 2) - if fits(mid) and (biggestLegal == nil or biggestLegal < mid) then - biggestLegal = mid - - --Try growing - min = mid + 1 - else - --Doesn't fit, shrink - max = mid - 1 - end - end - return biggestLegal -end - - -local function binaryShrink(min, max, fits) - if min > max then - return min - end - local smallestLegal = max - - while min <= max do - local mid = min + math.floor((max - min) / 2) - if fits(mid) and (smallestLegal == nil or smallestLegal > mid) then - smallestLegal = mid - - --It fits, shrink - max = mid - 1 - else - --Doesn't fit, grow - min = mid + 1 - end - end - return smallestLegal -end - - -local function getGuiOwner(instance) - while instance ~= nil do - if instance:IsA("ScreenGui") or instance:IsA("BillboardGui") then - return instance - end - instance = instance.Parent - end - return nil -end - -RbxGuiLib.AutoTruncateTextObject = function(textLabel) - local text = textLabel.Text - - local fullLabel = textLabel:Clone() - fullLabel.Name = "Full" .. textLabel.Name - fullLabel.BorderSizePixel = 0 - fullLabel.BackgroundTransparency = 0 - fullLabel.Text = text - fullLabel.TextXAlignment = Enum.TextXAlignment.Center - fullLabel.Position = UDim2.new(0,-3,0,0) - fullLabel.Size = UDim2.new(0,100,1,0) - fullLabel.Visible = false - fullLabel.Parent = textLabel - - local shortText = nil - local mouseEnterConnection = nil - local mouseLeaveConnection= nil - - local checkForResize = function() - if getGuiOwner(textLabel) == nil then - return - end - textLabel.Text = text - if textLabel.TextFits then - --Tear down the rollover if it is active - if mouseEnterConnection then - mouseEnterConnection:disconnect() - mouseEnterConnection = nil - end - if mouseLeaveConnection then - mouseLeaveConnection:disconnect() - mouseLeaveConnection = nil - end - else - local len = string.len(text) - textLabel.Text = text .. "~" - - --Shrink the text - local textSize = binaryGrow(0, len, - function(pos) - if pos == 0 then - textLabel.Text = "~" - else - textLabel.Text = string.sub(text, 1, pos) .. "~" - end - return textLabel.TextFits - end) - shortText = string.sub(text, 1, textSize) .. "~" - textLabel.Text = shortText - - --Make sure the fullLabel fits - if not fullLabel.TextFits then - --Already too small, grow it really bit to start - fullLabel.Size = UDim2.new(0, 10000, 1, 0) - end - - --Okay, now try to binary shrink it back down - local fullLabelSize = binaryShrink(textLabel.AbsoluteSize.X,fullLabel.AbsoluteSize.X, - function(size) - fullLabel.Size = UDim2.new(0, size, 1, 0) - return fullLabel.TextFits - end) - fullLabel.Size = UDim2.new(0,fullLabelSize+6,1,0) - - --Now setup the rollover effects, if they are currently off - if mouseEnterConnection == nil then - mouseEnterConnection = textLabel.MouseEnter:connect( - function() - fullLabel.ZIndex = textLabel.ZIndex + 1 - fullLabel.Visible = true - --textLabel.Text = "" - end) - end - if mouseLeaveConnection == nil then - mouseLeaveConnection = textLabel.MouseLeave:connect( - function() - fullLabel.Visible = false - --textLabel.Text = shortText - end) - end - end - end - textLabel.AncestryChanged:connect(checkForResize) - textLabel.Changed:connect( - function(prop) - if prop == "AbsoluteSize" then - checkForResize() - end - end) - - checkForResize() - - local function changeText(newText) - text = newText - fullLabel.Text = text - checkForResize() - end - - return textLabel, changeText -end - -local function TransitionTutorialPages(fromPage, toPage, transitionFrame, currentPageValue) - if fromPage then - fromPage.Visible = false - if transitionFrame.Visible == false then - transitionFrame.Size = fromPage.Size - transitionFrame.Position = fromPage.Position - end - else - if transitionFrame.Visible == false then - transitionFrame.Size = UDim2.new(0.0,50,0.0,50) - transitionFrame.Position = UDim2.new(0.5,-25,0.5,-25) - end - end - transitionFrame.Visible = true - currentPageValue.Value = nil - - local newsize, newPosition - if toPage then - --Make it visible so it resizes - toPage.Visible = true - - newSize = toPage.Size - newPosition = toPage.Position - - toPage.Visible = false - else - newSize = UDim2.new(0.0,50,0.0,50) - newPosition = UDim2.new(0.5,-25,0.5,-25) - end - transitionFrame:TweenSizeAndPosition(newSize, newPosition, Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.3, true, - function(state) - if state == Enum.TweenStatus.Completed then - transitionFrame.Visible = false - if toPage then - toPage.Visible = true - currentPageValue.Value = toPage - end - end - end) -end - -RbxGuiLib.CreateTutorial = function(name, tutorialKey, createButtons) - local frame = Instance.new("Frame") - frame.Name = "Tutorial-" .. name - frame.BackgroundTransparency = 1 - frame.Size = UDim2.new(0.6, 0, 0.6, 0) - frame.Position = UDim2.new(0.2, 0, 0.2, 0) - - local transitionFrame = Instance.new("Frame") - transitionFrame.Name = "TransitionFrame" - transitionFrame.Style = Enum.FrameStyle.RobloxRound - transitionFrame.Size = UDim2.new(0.6, 0, 0.6, 0) - transitionFrame.Position = UDim2.new(0.2, 0, 0.2, 0) - transitionFrame.Visible = false - transitionFrame.Parent = frame - - local currentPageValue = Instance.new("ObjectValue") - currentPageValue.Name = "CurrentTutorialPage" - currentPageValue.Value = nil - currentPageValue.Parent = frame - - local boolValue = Instance.new("BoolValue") - boolValue.Name = "Buttons" - boolValue.Value = createButtons - boolValue.Parent = frame - - local pages = Instance.new("Frame") - pages.Name = "Pages" - pages.BackgroundTransparency = 1 - pages.Size = UDim2.new(1,0,1,0) - pages.Parent = frame - - local function getVisiblePageAndHideOthers() - local visiblePage = nil - local children = pages:GetChildren() - if children then - for i,child in ipairs(children) do - if child.Visible then - if visiblePage then - child.Visible = false - else - visiblePage = child - end - end - end - end - return visiblePage - end - - local showTutorial = function(alwaysShow) - if alwaysShow or UserSettings().GameSettings:GetTutorialState(tutorialKey) == false then - print("Showing tutorial-",tutorialKey) - local currentTutorialPage = getVisiblePageAndHideOthers() - - local firstPage = pages:FindFirstChild("TutorialPage1") - if firstPage then - TransitionTutorialPages(currentTutorialPage, firstPage, transitionFrame, currentPageValue) - else - error("Could not find TutorialPage1") - end - end - end - - local dismissTutorial = function() - local currentTutorialPage = getVisiblePageAndHideOthers() - - if currentTutorialPage then - TransitionTutorialPages(currentTutorialPage, nil, transitionFrame, currentPageValue) - end - - UserSettings().GameSettings:SetTutorialState(tutorialKey, true) - end - - local gotoPage = function(pageNum) - local page = pages:FindFirstChild("TutorialPage" .. pageNum) - local currentTutorialPage = getVisiblePageAndHideOthers() - TransitionTutorialPages(currentTutorialPage, page, transitionFrame, currentPageValue) - end - - return frame, showTutorial, dismissTutorial, gotoPage -end - -local function CreateBasicTutorialPage(name, handleResize, skipTutorial) - local frame = Instance.new("Frame") - frame.Name = "TutorialPage" - frame.Style = Enum.FrameStyle.RobloxRound - frame.Size = UDim2.new(0.6, 0, 0.6, 0) - frame.Position = UDim2.new(0.2, 0, 0.2, 0) - frame.Visible = false - - local frameHeader = Instance.new("TextLabel") - frameHeader.Name = "Header" - frameHeader.Text = name - frameHeader.BackgroundTransparency = 1 - frameHeader.FontSize = Enum.FontSize.Size24 - frameHeader.Font = Enum.Font.ArialBold - frameHeader.TextColor3 = Color3.new(1,1,1) - frameHeader.TextXAlignment = Enum.TextXAlignment.Center - frameHeader.TextWrap = true - frameHeader.Size = UDim2.new(1,-55, 0, 22) - frameHeader.Position = UDim2.new(0,0,0,0) - frameHeader.Parent = frame - - local skipButton = Instance.new("ImageButton") - skipButton.Name = "SkipButton" - skipButton.AutoButtonColor = false - skipButton.BackgroundTransparency = 1 - skipButton.Image = "rbxasset://textures/ui/Skip.png" - skipButton.MouseButton1Click:connect(function() - skipButton.Image = "rbxasset://textures/ui/Skip.png" - skipTutorial() - end) - skipButton.MouseEnter:connect(function() - skipButton.Image = "rbxasset://textures/ui/SkipEnter.png" - end) - skipButton.MouseLeave:connect(function() - skipButton.Image = "rbxasset://textures/ui/Skip.png" - end) - skipButton.Size = UDim2.new(0, 55, 0, 22) - skipButton.Position = UDim2.new(1, -55, 0, 0) - skipButton.Parent = frame - - local innerFrame = Instance.new("Frame") - innerFrame.Name = "ContentFrame" - innerFrame.BackgroundTransparency = 1 - innerFrame.Position = UDim2.new(0,0,0,22) - innerFrame.Parent = frame - - local nextButton = Instance.new("TextButton") - nextButton.Name = "NextButton" - nextButton.Text = "Next" - nextButton.TextColor3 = Color3.new(1,1,1) - nextButton.Font = Enum.Font.Arial - nextButton.FontSize = Enum.FontSize.Size18 - nextButton.Style = Enum.ButtonStyle.RobloxButtonDefault - nextButton.Size = UDim2.new(0,80, 0, 32) - nextButton.Position = UDim2.new(0.5, 5, 1, -32) - nextButton.Active = false - nextButton.Visible = false - nextButton.Parent = frame - - local prevButton = Instance.new("TextButton") - prevButton.Name = "PrevButton" - prevButton.Text = "Previous" - prevButton.TextColor3 = Color3.new(1,1,1) - prevButton.Font = Enum.Font.Arial - prevButton.FontSize = Enum.FontSize.Size18 - prevButton.Style = Enum.ButtonStyle.RobloxButton - prevButton.Size = UDim2.new(0,80, 0, 32) - prevButton.Position = UDim2.new(0.5, -85, 1, -32) - prevButton.Active = false - prevButton.Visible = false - prevButton.Parent = frame - - innerFrame.Size = UDim2.new(1,0,1,-22-35) - - local parentConnection = nil - - local function basicHandleResize() - if frame.Visible and frame.Parent then - local maxSize = math.min(frame.Parent.AbsoluteSize.X, frame.Parent.AbsoluteSize.Y) - handleResize(200,maxSize) - end - end - - frame.Changed:connect( - function(prop) - if prop == "Parent" then - if parentConnection ~= nil then - parentConnection:disconnect() - parentConnection = nil - end - if frame.Parent and frame.Parent:IsA("GuiObject") then - parentConnection = frame.Parent.Changed:connect( - function(parentProp) - if parentProp == "AbsoluteSize" then - wait() - basicHandleResize() - end - end) - basicHandleResize() - end - end - - if prop == "Visible" then - basicHandleResize() - end - end) - - return frame, innerFrame -end - -RbxGuiLib.CreateTextTutorialPage = function(name, text, skipTutorialFunc) - local frame = nil - local contentFrame = nil - - local textLabel = Instance.new("TextLabel") - textLabel.BackgroundTransparency = 1 - textLabel.TextColor3 = Color3.new(1,1,1) - textLabel.Text = text - textLabel.TextWrap = true - textLabel.TextXAlignment = Enum.TextXAlignment.Left - textLabel.TextYAlignment = Enum.TextYAlignment.Center - textLabel.Font = Enum.Font.Arial - textLabel.FontSize = Enum.FontSize.Size14 - textLabel.Size = UDim2.new(1,0,1,0) - - local function handleResize(minSize, maxSize) - size = binaryShrink(minSize, maxSize, - function(size) - frame.Size = UDim2.new(0, size, 0, size) - return textLabel.TextFits - end) - frame.Size = UDim2.new(0, size, 0, size) - frame.Position = UDim2.new(0.5, -size/2, 0.5, -size/2) - end - - frame, contentFrame = CreateBasicTutorialPage(name, handleResize, skipTutorialFunc) - textLabel.Parent = contentFrame - - return frame -end - -RbxGuiLib.CreateImageTutorialPage = function(name, imageAsset, x, y, skipTutorialFunc) - local frame = nil - local contentFrame = nil - - local imageLabel = Instance.new("ImageLabel") - imageLabel.BackgroundTransparency = 1 - imageLabel.Image = imageAsset - imageLabel.Size = UDim2.new(0,x,0,y) - imageLabel.Position = UDim2.new(0.5,-x/2,0.5,-y/2) - - local function handleResize(minSize, maxSize) - size = binaryShrink(minSize, maxSize, - function(size) - return size >= x and size >= y - end) - if size >= x and size >= y then - imageLabel.Size = UDim2.new(0,x, 0,y) - imageLabel.Position = UDim2.new(0.5,-x/2, 0.5, -y/2) - else - if x > y then - --X is limiter, so - imageLabel.Size = UDim2.new(1,0,y/x,0) - imageLabel.Position = UDim2.new(0,0, 0.5 - (y/x)/2, 0) - else - --Y is limiter - imageLabel.Size = UDim2.new(x/y,0,1, 0) - imageLabel.Position = UDim2.new(0.5-(x/y)/2, 0, 0, 0) - end - end - frame.Size = UDim2.new(0, size, 0, size) - frame.Position = UDim2.new(0.5, -size/2, 0.5, -size/2) - end - - frame, contentFrame = CreateBasicTutorialPage(name, handleResize, skipTutorialFunc) - imageLabel.Parent = contentFrame - - return frame -end - -RbxGuiLib.AddTutorialPage = function(tutorial, tutorialPage) - local transitionFrame = tutorial.TransitionFrame - local currentPageValue = tutorial.CurrentTutorialPage - - if not tutorial.Buttons.Value then - tutorialPage.ContentFrame.Size = UDim2.new(1,0,1,-22) - tutorialPage.NextButton.Parent = nil - tutorialPage.PrevButton.Parent = nil - end - - local children = tutorial.Pages:GetChildren() - if children and #children > 0 then - tutorialPage.Name = "TutorialPage" .. (#children+1) - local previousPage = children[#children] - if not previousPage:IsA("GuiObject") then - error("All elements under Pages must be GuiObjects") - end - - if tutorial.Buttons.Value then - if previousPage.NextButton.Active then - error("NextButton already Active on previousPage, please only add pages with RbxGui.AddTutorialPage function") - end - previousPage.NextButton.MouseButton1Click:connect( - function() - TransitionTutorialPages(previousPage, tutorialPage, transitionFrame, currentPageValue) - end) - previousPage.NextButton.Active = true - previousPage.NextButton.Visible = true - - if tutorialPage.PrevButton.Active then - error("PrevButton already Active on tutorialPage, please only add pages with RbxGui.AddTutorialPage function") - end - tutorialPage.PrevButton.MouseButton1Click:connect( - function() - TransitionTutorialPages(tutorialPage, previousPage, transitionFrame, currentPageValue) - end) - tutorialPage.PrevButton.Active = true - tutorialPage.PrevButton.Visible = true - end - - tutorialPage.Parent = tutorial.Pages - else - --First child - tutorialPage.Name = "TutorialPage1" - tutorialPage.Parent = tutorial.Pages - end -end - -RbxGuiLib.Help = - function(funcNameOrFunc) - --input argument can be a string or a function. Should return a description (of arguments and expected side effects) - if funcNameOrFunc == "CreatePropertyDropDownMenu" or funcNameOrFunc == RbxGuiLib.CreatePropertyDropDownMenu then - return "Function CreatePropertyDropDownMenu. " .. - "Arguments: (instance, propertyName, enumType). " .. - "Side effect: returns a container with a drop-down-box that is linked to the 'property' field of 'instance' which is of type 'enumType'" - end - if funcNameOrFunc == "CreateDropDownMenu" or funcNameOrFunc == RbxGuiLib.CreateDropDownMenu then - return "Function CreateDropDownMenu. " .. - "Arguments: (items, onItemSelected). " .. - "Side effect: Returns 2 results, a container to the gui object and a 'updateSelection' function for external updating. The container is a drop-down-box created around a list of items" - end - if funcNameOrFunc == "CreateMessageDialog" or funcNameOrFunc == RbxGuiLib.CreateMessageDialog then - return "Function CreateMessageDialog. " .. - "Arguments: (title, message, buttons). " .. - "Side effect: Returns a gui object of a message box with 'title' and 'message' as passed in. 'buttons' input is an array of Tables contains a 'Text' and 'Function' field for the text/callback of each button" - end - if funcNameOrFunc == "CreateStyledMessageDialog" or funcNameOrFunc == RbxGuiLib.CreateStyledMessageDialog then - return "Function CreateStyledMessageDialog. " .. - "Arguments: (title, message, style, buttons). " .. - "Side effect: Returns a gui object of a message box with 'title' and 'message' as passed in. 'buttons' input is an array of Tables contains a 'Text' and 'Function' field for the text/callback of each button, 'style' is a string, either Error, Notify or Confirm" - end - if funcNameOrFunc == "GetFontHeight" or funcNameOrFunc == RbxGuiLib.GetFontHeight then - return "Function GetFontHeight. " .. - "Arguments: (font, fontSize). " .. - "Side effect: returns the size in pixels of the given font + fontSize" - end - if funcNameOrFunc == "LayoutGuiObjects" or funcNameOrFunc == RbxGuiLib.LayoutGuiObjects then - - end - if funcNameOrFunc == "CreateScrollingFrame" or funcNameOrFunc == RbxGuiLib.CreateScrollingFrame then - return "Function CreateScrollingFrame. " .. - "Arguments: (orderList, style) " .. - "Side effect: returns 4 objects, (scrollFrame, scrollUpButton, scrollDownButton, recalculateFunction). 'scrollFrame' can be filled with GuiObjects. It will lay them out and allow scrollUpButton/scrollDownButton to interact with them. Orderlist is optional (and specifies the order to layout the children. Without orderlist, it uses the children order. style is also optional, and allows for a 'grid' styling if style is passed 'grid' as a string. recalculateFunction can be called when a relayout is needed (when orderList changes)" - end - if funcNameOrFunc == "AutoTruncateTextObject" or funcNameOrFunc == RbxGuiLib.AutoTruncateTextObject then - return "Function AutoTruncateTextObject. " .. - "Arguments: (textLabel) " .. - "Side effect: returns 2 objects, (textLabel, changeText). The 'textLabel' input is modified to automatically truncate text (with ellipsis), if it gets too small to fit. 'changeText' is a function that can be used to change the text, it takes 1 string as an argument" - end - if funcNameOrFunc == "CreateSlider" or funcNameOrFunc == RbxGuiLib.CreateSlider then - return "Function CreateSlider. " .. - "Arguments: (steps, width, position) " .. - "Side effect: returns 2 objects, (sliderGui, sliderPosition). The 'steps' argument specifies how many different positions the slider can hold along the bar. 'width' specifies in pixels how wide the bar should be (modifiable afterwards if desired). 'position' argument should be a UDim2 for slider positioning. 'sliderPosition' is an IntValue whose current .Value specifies the specific step the slider is currently on." - end - end --- RBXGUI END -- - -delay(0, function() - -local RbxGui - -local localTesting = true - -local screen = game:GetService("CoreGui").RobloxGui -local screenResizeCon = nil - -local friendWord = "Friend" -local friendWordLowercase = "friend" - -local testFriendingPlaces = {} -testFriendingPlaces[41324860] = true -local enableFriendingGlobally = true - -local testPlayerListPlaces = {} -testPlayerListPlaces[41324860] = true -testPlayerListPlaces[10042455] = true -local enablePlayerListGlobally = true - -local bigEasingStyle = Enum.EasingStyle.Back -local smallEasingStyle = Enum.EasingStyle.Quart -local lightBackground = true - -local function waitForChild(instance, name) - while not instance:FindFirstChild(name) do - instance.ChildAdded:wait() - end -end - -local function waitForProperty(instance, prop) - while not instance[prop] do - instance.Changed:wait() - end -end - -local function Color3I(r,g,b) - return Color3.new(r/255,g/255,b/255) -end - -function robloxLock(instance) - instance.RobloxLocked = true - children = instance:GetChildren() - if children then - for i, child in ipairs(children) do - robloxLock(child) - end - end -end - -function ArrayRemove(t, obj) - for i, obj2 in ipairs(t) do - if obj == obj2 then - table.remove(t, i) - return true - end - end - return false -end - -local function getPlayers() - local result = {} - local players = game:GetService("Players"):GetChildren() - if players then - for i, player in ipairs(players) do - if player:IsA("Player") then - table.insert(result, player) - end - end - end - return result -end - -local brickColorTable = {} -for i = 0, 63 do - brickColorTable[BrickColor.palette(i).Name] = BrickColor.palette(i).Color -end - -local function remapColor(i, j) - brickColorTable[BrickColor.palette(i).Name] = BrickColor.palette(j).Color -end - -remapColor(13, 12) -remapColor(14, 12) -remapColor(15, 12) -remapColor(61, 29) -remapColor(63, 62) -remapColor(56, 50) -remapColor(45, 53) -remapColor(51, 20) -remapColor(4, 20) -remapColor(59, 35) -remapColor(60, 29) - -local function getColor(brickColor) - if brickColorTable[brickColor.Name] then - return brickColorTable[brickColor.Name] - else - return brickColor.Color; - end -end - - - -local function getTeams() - local result = {} - local teams = game:GetService("Teams"):GetChildren() - for i, team in ipairs(teams) do - if team:IsA("Team") then - table.insert(result, team) - end - end - return result -end - -local supportFriends = true -local currentBoardType = "PlayerList" -local currentStatCount = 0 - -local createBoardsFunction = nil - - -local playerTable = {} -local teamTable = {} -local teamColorTable = {} - -local removePlayerFunction = nil -local recreatePlayerFunction = nil -local addPlayerFunction = function(player) - if recreatePlayerFunction then - recreatePlayerFunction(player) - end -end -local sortPlayerListsFunction = nil - -local minimizedState = nil -local bigWindowImposter = nil -local smallWindowPosition = UDim2.new(0, -20, 0,5) -local smallWindowSize = UDim2.new(1,0,1,0) -local bigWindowSize = UDim2.new(0.6,0,0.6,0) -local bigWindowPosition = UDim2.new(.2, 0, .2,0) - -local smallWindowHeaderYSize = 32 - -local debounceTeamsChanged = false - -local currentWindowState = "Small" -local previousWindowState = nil -local transitionWindowsFunction = nil - -local container = nil -local topRightTrayContainer = nil - -local playerContextMenu = nil -local contextMenuElements = {} - -local function addContextMenuLabel(getText1, getText2, isVisible) - local t = {} - t.Type = "Label" - t.GetText1 = getText1 - t.GetText2 = getText2 - t.IsVisible = isVisible - table.insert(contextMenuElements, t) -end -local function addContextMenuButton(text, isVisible, isActive, doIt) - local t = {} - t.Text = text - t.Type = "Button" - t.IsVisible = isVisible - t.IsActive = isActive - t.DoIt = doIt - table.insert(contextMenuElements, t) -end - -local function getFriendStatus(player) - if player == game.Players.LocalPlayer then - return Enum.FriendStatus.NotFriend - else - local success, result = pcall(function() return game.Players.LocalPlayer:GetFriendStatus(player) end) - if success then - return result - else - return Enum.FriendStatus.NotFriend - end - end -end ---Populate the ContextMenus -addContextMenuLabel( - --GetText1 - function(player) - return "Loading..." - end, - --GetText2 - nil, - --IsVisible - function(player) - return getFriendStatus(player) == Enum.FriendStatus.Unknown - end) - -addContextMenuButton("Send " .. friendWord .. " Request", - --IsVisible - function(player) - return getFriendStatus(player) == Enum.FriendStatus.NotFriend - end, - --IsActive - function(player) - return true - end, - --DoIt - function(player) - return game.Players.LocalPlayer:RequestFriendship(player) - end -) -addContextMenuButton("Un" .. friendWordLowercase, - --IsVisible - function(player) - return getFriendStatus(player) == Enum.FriendStatus.Friend - end, - --IsActive - function(player) - return true - end, - --DoIt - function(player) - return game.Players.LocalPlayer:RevokeFriendship(player) - end -) -addContextMenuButton("Accept " .. friendWord .. " Request", - --IsVisible - function(player) - return getFriendStatus(player) == Enum.FriendStatus.FriendRequestReceived - end, - --IsActive - function(player) - return true - end, - --DoIt - function(player) - return game.Players.LocalPlayer:RequestFriendship(player) - end -) - -addContextMenuButton("Deny " .. friendWord .. " Request", - --IsVisible - function(player) - return getFriendStatus(player) == Enum.FriendStatus.FriendRequestReceived - end, - --IsActive - function(player) - return true - end, - --DoIt - function(player) - return game.Players.LocalPlayer:RevokeFriendship(player) - end -) - -addContextMenuButton("Cancel " .. friendWord .. " Request", - --IsVisible - function(player) - return getFriendStatus(player) == Enum.FriendStatus.FriendRequestSent - end, - --IsActive - function(player) - return true - end, - --DoIt - function(player) - return game.Players.LocalPlayer:RevokeFriendship(player) - end -) - - -local function getStatColumns(players) - for i, player in ipairs(players) do - local leaderstats = player:FindFirstChild("leaderstats") - if leaderstats then - local stats = {} - local children = leaderstats:GetChildren() - if children then - for i, stat in ipairs(children) do - if stat:IsA("IntValue") then - table.insert(stats, stat.Name) - else - --TODO: This should check for IntValue only but current ScoreHud does not - table.insert(stats, stat.Name) - end - end - end - return stats - end - end - return nil -end - -local function determineBoardType() - local players = getPlayers() - - local foundLeaderstats = false - local numStats = 0 - local foundTeam = false - - local stats = getStatColumns(players) - if stats then - foundLeaderstats = true - numStats = #stats - end - - for i, player in ipairs(players) do - if not foundTeam then - if not player.Neutral then - foundTeam = true - break - end - end - end - - if foundLeaderstats and foundTeam then - return "TeamScore", numStats - elseif foundLeaderstats then - return "PlayerScore", numStats - elseif foundTeam then - return "TeamList", numStats - else - return "PlayerList", numStats - end -end - -local function toggleBigWindow() - if container == nil then - return - end - - if currentWindowState == "Big" then - --Hide it - if previousWindowState == nil or previousWindowState == "Big" or previousWindowState == "None" then - transitionWindowsFunction("None") - else - transitionWindowsFunction("Small") - end - else - previousWindowState = currentWindowState - transitionWindowsFunction("Big") - end -end -local previousBigPlayerList = nil -local function rebuildBoard(owner, boardType, numStats) - if topRightTrayContainer == nil then - topRightTrayContainer = owner:FindFirstChild("PlayerListTopRightFrame") - if topRightTrayContainer == nil then - topRightTrayContainer = Instance.new("Frame") - topRightTrayContainer.Name = "PlayerListTopRightFrame" - topRightTrayContainer.BackgroundTransparency = 1 - topRightTrayContainer.Size = UDim2.new(0.2, 16, 0.42, 16) - topRightTrayContainer.Position = UDim2.new(0.8, 0, 0, 0) - topRightTrayContainer.Parent = container - end - end - if minimizedState == nil then - minimizedState = Instance.new("Frame") - minimizedState.Name = "MinimizedPlayerlist" - minimizedState.BackgroundTransparency = 1 - minimizedState.Position = UDim2.new(1, -166, 0,0) - minimizedState.Size = UDim2.new(0, 151, 0, 30) - - playerListButton = Instance.new("ImageButton") - playerListButton.Name = "GoSmallButton" - playerListButton.Image = "rbxasset://textures/ui/playerlist_hidden_small.png" - playerListButton.BackgroundTransparency = 1 - playerListButton.Size = UDim2.new(0.0, 35, 0, 30) - playerListButton.Position = UDim2.new(1, -35, 0, 0) - playerListButton.MouseButton1Click:connect( - function() - transitionWindowsFunction("Small") - end) - playerListButton.Parent = minimizedState - - minimizedState.Visible = false - robloxLock(minimizedState) - minimizedState.Parent = topRightTrayContainer - end - if bigWindowImposter == nil then - bigWindowImposter = owner:FindFirstChild("BigPlayerListWindowImposter") - if bigWindowImposter == nil then - bigWindowImposter = Instance.new("Frame") - bigWindowImposter.Name = "BigPlayerListWindowImposter" - bigWindowImposter.Visible = false - bigWindowImposter.BackgroundColor3 = Color3.new(0,0,0) - bigWindowImposter.BackgroundTransparency = 0.7 - bigWindowImposter.BorderSizePixel = 0 - bigWindowImposter.Size = UDim2.new(0.4, 7, 0.4, 7) - bigWindowImposter.Position = UDim2.new(0.3, 0, 0.3, 0) - robloxLock(bigWindowImposter) - bigWindowImposter.Parent = container - end - end - if container == nil or container ~= owner then - container = owner - - topRightTrayContainer.Parent = container - bigWindowImposter.Parent = container - end - - local smallVisible = true - local bigVisible = false - if container then - if topRightTrayContainer then - --Delete the old boards - if topRightTrayContainer:FindFirstChild("SmallPlayerlist") then - smallVisible = topRightTrayContainer.SmallPlayerlist.Visible - topRightTrayContainer.SmallPlayerlist.Parent = nil - end - end - if container:FindFirstChild("BigPlayerlist") then - bigVisible = container.BigPlayerlist.Visible or (previousBigPlayerList ~= nil) - container.BigPlayerlist.Parent = nil - if previousBigPlayerList ~= nil then - pcall(function() game.GuiService:RemoveCenterDialog(previousBigPlayerList) end) - previousBigPlayerList = nil - end - end - end - - local smallBoard, bigBoard = createBoardsFunction(boardType, numStats) - if smallBoard then - smallBoard.Visible = smallVisible - smallBoard.Parent = topRightTrayContainer - recalculateSmallPlayerListSize(smallBoard) - end - if bigBoard then - if bigVisible then - previousBigPlayerList = bigBoard - local centerDialogSupported, msg = pcall(function() game.GuiService:AddCenterDialog(previousBigPlayerList, Enum.CenterDialogType.PlayerInitiatedDialog, - function() - previousBigPlayerList.Visible = true - end) - end) - bigBoard.Visible = bigVisible - else - bigBoard.Visible = false - end - bigBoard.Parent = container - end - return container -end - -function recalculateSmallPlayerListSize(smallPlayerList) - waitForChild(smallPlayerList,"ScrollingArea") - waitForChild(smallPlayerList.ScrollingArea, "ScrollingFrame") - local scrollingFrame = smallPlayerList.ScrollingArea.ScrollingFrame - local playerLines = scrollingFrame:GetChildren() - - local totalPlayerListSize = 0 - for i = 1, #playerLines do - totalPlayerListSize = totalPlayerListSize + playerLines[i].AbsoluteSize.Y - end - - local yOffset = math.max(0,(smallPlayerList.Size.Y.Scale * smallPlayerList.Parent.AbsoluteSize.Y) - totalPlayerListSize - smallWindowHeaderYSize) - smallPlayerList.Size = UDim2.new(smallPlayerList.Size.X.Scale,smallPlayerList.Size.X.Offset,smallPlayerList.Size.Y.Scale,-yOffset) -end - - -local function showBigPlayerWindow() - if container:FindFirstChild("BigPlayerlist") then - if container.BigPlayerlist.Visible then - return - end - end - - bigWindowImposter.Visible = true - bigWindowImposter:TweenSizeAndPosition(bigWindowSize, bigWindowPosition, Enum.EasingDirection.Out, bigEasingStyle, 0.3, true, - function(state) - if state == Enum.TweenStatus.Completed then - bigWindowImposter.Visible = false - if container:FindFirstChild("BigPlayerlist") then - container.BigPlayerlist.Visible = true - end - end - end) -end - -local function hideBigPlayerWindow(completed) - if playerContextMenu then - playerContextMenu.Visible = false - end - - if container:FindFirstChild("BigPlayerlist") then - if container.BigPlayerlist.Visible == false and bigWindowImposter.Visible == false then - if completed then - completed() - end - --Already completely hidden - return - end - container.BigPlayerlist.Visible = false - end - - local completedFunction = completed - bigWindowImposter.Visible = true - bigWindowImposter:TweenSizeAndPosition(UDim2.new(0.4, 0, 0.4, 0), UDim2.new(0.3, 0, 0.3, 0), Enum.EasingDirection.In, Enum.EasingStyle.Quart, 0.15, true, - function(state) - if state == Enum.TweenStatus.Completed then - bigWindowImposter.Visible = false - if completedFunction then - completedFunction() - end - end - end) -end -local function hideSmallPlayerWindow(completed) - if playerContextMenu then - playerContextMenu.Visible = false - end - if topRightTrayContainer:FindFirstChild("SmallPlayerlist") then - local completedFunction = completed - if topRightTrayContainer.SmallPlayerlist.Visible then - topRightTrayContainer.SmallPlayerlist:TweenPosition(UDim2.new(1,0,smallWindowPosition.Y.Scale, smallWindowPosition.Y.Offset), Enum.EasingDirection.Out, smallEasingStyle, 0.3, true, - function(state) - if state == Enum.TweenStatus.Completed then - if topRightTrayContainer:FindFirstChild("SmallPlayerlist") then - topRightTrayContainer.SmallPlayerlist.Visible = false - end - if completedFunction then - completedFunction() - end - end - end) - return - end - end - if completed then - completed() - end -end - - -transitionWindowsFunction = function(desiredState) - if desiredState == "Big" then - minimizedState.Visible = false - hideSmallPlayerWindow() - - if previousBigPlayerList ~= nil then - if previousBigPlayerList ~= container:FindFirstChild("BigPlayerlist") then - pcall(function() game.GuiService:RemoveCenterDialog(previousBigPlayerList) end) - previousBigPlayerList = nil - previousBigPlayerList = container:FindFirstChild("BigPlayerlist") - end - else - previousBigPlayerList = container:FindFirstChild("BigPlayerlist") - end - - if previousBigPlayerList then - local firstShow = false - local centerDialogSupported, msg = pcall(function() game.GuiService:AddCenterDialog(previousBigPlayerList, Enum.CenterDialogType.PlayerInitiatedDialog, - function() - if not firstShow then - showBigPlayerWindow() - firstShow = true - else - previousBigPlayerList.Visible = true - end - end) - end) - if centerDialogSupported == false then - print("Exception", msg) - showBigPlayerWindow() - end - else - showBigPlayerWindow() - end - currentWindowState = "Big" - elseif desiredState == "Small" then - minimizedState.Visible = false - if previousBigPlayerList ~= nil then - pcall(function() game.GuiService:RemoveCenterDialog(previousBigPlayerList) end) - previousBigPlayerList = nil - end - - hideBigPlayerWindow() - if topRightTrayContainer:FindFirstChild("SmallPlayerlist") then - if not topRightTrayContainer.SmallPlayerlist.Visible or topRightTrayContainer.SmallPlayerlist.Position ~= smallWindowPosition then - topRightTrayContainer.SmallPlayerlist.Visible = true - topRightTrayContainer.SmallPlayerlist:TweenPosition(smallWindowPosition, Enum.EasingDirection.Out, smallEasingStyle, 0.3, true) - end - end - currentWindowState = "Small" - elseif desiredState == "None" then - if previousBigPlayerList ~= nil then - pcall(function() game.GuiService:RemoveCenterDialog(previousBigPlayerList) end) - previousBigPlayerList = nil - end - - local smallDone = false - local bigDone = false - hideSmallPlayerWindow( - function() - smallDone = true - if bigDone and smallDone then - minimizedState.Visible = true - end - end) - hideBigPlayerWindow( - function() - bigDone = true - if bigDone and smallDone then - minimizedState.Visible = true - end - end) - currentWindowState = "None" - end -end - -local function getStatValuesForPlayer(player) - local leaderstats = player:FindFirstChild("leaderstats") - if leaderstats then - local children = leaderstats:GetChildren() - if children then - local result = {} - --Just go based on position - for i, stat in ipairs(children) do - if stat:IsA("IntValue") then - table.insert(result, stat) - else - table.insert(result, 0) - end - end - - return result, leaderstats - end - end - return nil -end - ---ChildAdded on Player (if it's name is "leaderstats") - -if UserSettings and LoadLibrary then - - RbxGui,msg = RbxGuiLib - - local function createTeamName(name, color) - local fontHeight = 20 - local frame = Instance.new("Frame") - frame.Name = "Team-" .. name - frame.BorderSizePixel = 0 - frame.BackgroundTransparency = 0.5 - frame.BackgroundColor3 = Color3.new(1,1,1) - frame.Size = UDim2.new(1, 0, 0, fontHeight) - frame.Position = UDim2.new(0,0,0,0) - - local label = Instance.new("TextLabel") - label.Name = "NameLabel" - label.Text = " " .. name - label.Font = Enum.Font.ArialBold - label.FontSize = Enum.FontSize.Size18 - label.Position = UDim2.new(0,0,0,0) - label.Size = UDim2.new(1,0,1,0) - label.TextColor3 = Color3.new(1,1,1) - label.BackgroundTransparency = 0.5 - label.BackgroundColor3 = getColor(color) - label.BorderSizePixel = 0 - label.TextXAlignment = Enum.TextXAlignment.Left - label = RbxGui.AutoTruncateTextObject(label) - label.Parent = frame - - return frame - end - - local function getFriendStatusIcon(friendStatus) - if friendStatus == Enum.FriendStatus.Unknown or friendStatus == Enum.FriendStatus.NotFriend then - return nil - elseif friendStatus == Enum.FriendStatus.Friend then - return "rbxasset://textures/ui/PlayerlistFriendIcon.png" - elseif friendStatus == Enum.FriendStatus.FriendRequestSent then - return "rbxasset://textures/ui/PlayerlistFriendRequestSentIcon.png" - elseif friendStatus == Enum.FriendStatus.FriendRequestReceived then - return "rbxasset://textures/ui/PlayerlistFriendRequestReceivedIcon.png" - else - error("Unknown FriendStatus: " .. friendStatus) - end - end - - local function getMembershipTypeIcon(membershipType, playerName) - if membershipType == Enum.MembershipType.None then - plr = game.Players[playerName] - if plr:FindFirstChild("Appearance") then - waitForChild(plr.Appearance,"Icon") - if string.match(plr.Appearance.Icon.Value, "http") == "http" then - return plr.Appearance.Icon.Value - else - return "rbxasset://../../../shareddata/charcustom/custom/icons/"..playerName..".png" - end - else - return "rbxasset://../../../shareddata/charcustom/custom/icons/"..playerName..".png" - end - elseif membershipType == Enum.MembershipType.BuildersClub then - return "rbxasset://textures/ui/TinyBcIcon.png" - elseif membershipType == Enum.MembershipType.TurboBuildersClub then - return "rbxasset://textures/ui/TinyTbcIcon.png" - elseif membershipType == Enum.MembershipType.OutrageousBuildersClub then - return "rbxasset://textures/ui/TinyObcIcon.png" - else - error("Uknown membershipType" .. membershipType) - end - end - - local function updatePlayerFriendStatus(nameObject, friendStatus) - local fontHeight = 20 - - local friendIconImage = getFriendStatusIcon(friendStatus) - nameObject.MembershipTypeLabel.FriendStatusLabel.Visible = (friendIconImage ~= nil) - - if friendIconImage ~= nil then - --Show friend icon - nameObject.MembershipTypeLabel.FriendStatusLabel.Image = friendIconImage - nameObject.NameLabel.Position =UDim2.new(0,2*fontHeight,0,1) - nameObject.NameLabel.Size = UDim2.new(1,-2*fontHeight,1,-2) - else - --Hide the friend icon - nameObject.NameLabel.Position = UDim2.new(0,fontHeight+1,0,1) - nameObject.NameLabel.Size = UDim2.new(1,-(fontHeight+1),1,-2) - end - end - local function updatePlayerName(nameObject, membershipStatus, teamColor) - local fontHeight = 20 - - local playerName = nameObject.NameLabel.Text - - nameObject.Size = UDim2.new(1,0,0,fontHeight) - nameObject.MembershipTypeLabel.Image = getMembershipTypeIcon(membershipStatus, playerName) - end - - - local function updatePlayerNameColor(player, teamColor) - local function updatePlayerNameColorHelper(nameObject) - if teamColor ~= nil then - nameObject.NameLabel.TextColor3 = getColor(teamColor) - nameObject.NameLabel.FullNameLabel.TextColor3 = getColor(teamColor) - else - nameObject.NameLabel.TextColor3 = Color3.new(1,1,1) - nameObject.NameLabel.FullNameLabel.TextColor3 = Color3.new(1,1,1) - end - end - - updatePlayerNameColorHelper(playerTable[player].NameObjectSmall) - updatePlayerNameColorHelper(playerTable[player].NameObjectBig) - end - - - local function createPlayerName(name, membershipStatus, teamColor, friendStatus) - local frame = Instance.new("Frame") - frame.Name = "Player_" .. name - if lightBackground then - frame.BackgroundColor3 = Color3.new(1,1,1) - else - frame.BackgroundColor3 = Color3.new(1,1,1) - end - frame.BackgroundTransparency = 0.5 - frame.BorderSizePixel = 0 - - local membershipStatusLabel = Instance.new("ImageLabel") - membershipStatusLabel.Name = "MembershipTypeLabel" - membershipStatusLabel.BackgroundTransparency = 1 - membershipStatusLabel.Size = UDim2.new(1,0,1,0) - membershipStatusLabel.Position = UDim2.new(0,0,0,0) - membershipStatusLabel.SizeConstraint = Enum.SizeConstraint.RelativeYY - membershipStatusLabel.Parent = frame - - local friendStatusLabel = Instance.new("ImageLabel") - friendStatusLabel.Name = "FriendStatusLabel" - friendStatusLabel.Visible = false - friendStatusLabel.BackgroundTransparency = 1 - friendStatusLabel.Size = UDim2.new(1,0,1,0) - friendStatusLabel.Position = UDim2.new(1,0,0,0) - friendStatusLabel.Parent = membershipStatusLabel - - local changeNameFunction - local nameLabel = Instance.new("TextLabel") - nameLabel.Name = "NameLabel" - nameLabel.Text = name - nameLabel.Font = Enum.Font.ArialBold - nameLabel.FontSize = Enum.FontSize.Size14 - nameLabel.TextColor3 = Color3.new(1,1,1) - nameLabel.BackgroundTransparency = 1 - nameLabel.BackgroundColor3 = Color3.new(0,0,0) - nameLabel.TextXAlignment = Enum.TextXAlignment.Left - nameLabel, changeNameFunction = RbxGui.AutoTruncateTextObject(nameLabel) - nameLabel.Parent = frame - - updatePlayerName(frame, membershipStatus, teamColor) - if supportFriends then - updatePlayerFriendStatus(frame, friendStatus) - else - updatePlayerFriendStatus(frame, Enum.FriendStatus.NotFriend) - end - return frame, changeNameFunction - end - - local function createStatColumn(i, numColumns, isTeam, color3, isHeader) - local textLabel = Instance.new("TextLabel") - textLabel.Name = "Stat" .. i - textLabel.TextColor3 = Color3.new(1,1,1) - textLabel.TextXAlignment = Enum.TextXAlignment.Right - textLabel.TextYAlignment = Enum.TextYAlignment.Center - textLabel.FontSize = Enum.FontSize.Size14 - if isHeader then - textLabel.FontSize = Enum.FontSize.Size18 - else - textLabel.FontSize = Enum.FontSize.Size14 - end - if isHeader or isTeam then - textLabel.Font = Enum.Font.ArialBold - else - textLabel.Font = Enum.Font.Arial - end - - if isTeam then - textLabel.BackgroundColor3 = color3 - textLabel.Text = 0 - else - textLabel.BackgroundColor3 = Color3.new(0,0,0) - textLabel.Text = "" - end - textLabel.BackgroundTransparency = 1 - if i == numColumns then - textLabel.Size = UDim2.new(1/numColumns, -6, 1, 0) - else - textLabel.Size = UDim2.new(1/numColumns, -4, 1, 0) - end - - textLabel.Position = UDim2.new((i-1) * (1/numColumns), 0, 0, 0) - return RbxGui.AutoTruncateTextObject(textLabel) - end - - local function createStatHeaders(stats, numColumns, isBig) - local frame = Instance.new("Frame") - frame.Name = "Headers" - frame.BorderSizePixel = 0 - frame.BackgroundColor3 = Color3.new(0,0,0) - frame.BackgroundTransparency = 1 - - local nameSize - if isBig then - nameSize = 0.5 - elseif numColumns == 1 then - nameSize = 0.7 - elseif numColumns == 2 then - nameSize = 0.6 - else - nameSize = 0.45 - end - frame.Size = UDim2.new(1-nameSize, 0, 1,0) - if isBig then - frame.Position = UDim2.new(nameSize,-25, 0,0) - else - frame.Position = UDim2.new(nameSize,0, 0,0) - end - - local i = 1 - while i <= numColumns do - local headerColumn, changeText = createStatColumn(i, numColumns, false, nil, true) - changeText(stats[i]) - headerColumn.Parent = frame - i = i + 1 - end - return frame, textChangers - end - - local function createStatColumns(nameObject, numColumns, isTeam, isBig) - local frame = Instance.new("Frame") - frame.Name = nameObject.Name .. "_WithStats" - frame.BorderSizePixel = 0 - frame.BackgroundColor3 = nameObject.BackgroundColor3 - frame.BackgroundTransparency = nameObject.BackgroundTransparency - frame.Size = nameObject.Size - frame.Position = nameObject.Position - - nameObject.BackgroundTransparency = 1 - - if numColumns == 0 then - nameObject.Size = UDim2.new(1,0,1,0) - nameObject.Position = UDim2.new(0,0,0,0) - nameObject.Parent = frame - return frame - end - - local statFrame = Instance.new("Frame") - statFrame.Name = "Stats" - if isTeam then - statFrame.BorderSizePixel = 0 - statFrame.BackgroundColor3 = nameObject.NameLabel.BackgroundColor3 - statFrame.BackgroundTransparency = nameObject.NameLabel.BackgroundTransparency - else - statFrame.BackgroundTransparency = 1 - end - - local nameSize - if isBig then - nameSize = 0.5 - elseif numColumns == 1 then - nameSize = 0.7 - elseif numColumns == 2 then - nameSize = 0.6 - else - nameSize = 0.45 - end - nameObject.Size = UDim2.new(nameSize, 0, 1, 0) - nameObject.Position = UDim2.new(0, 0, 0, 0) - statFrame.Size = UDim2.new(1-nameSize,0, 1,0) - statFrame.Position = UDim2.new(nameSize,0, 0,0) - - nameObject.Parent = frame - statFrame.Parent = frame - - local textChangers = {} - local i = 1 - while i <= numColumns do - local statColumn, changeText = createStatColumn(i, numColumns, isTeam, statFrame.BackgroundColor3) - statColumn.Parent = statFrame - table.insert(textChangers, changeText) - - i = i + 1 - end - - return frame, statFrame, textChangers - end - - local function createAlternatingRows(objects) - for i, line in ipairs(objects) do - if i % 2 == 0 then - line.BackgroundTransparency = 1 - else - line.BackgroundTransparency = 0.95 - end - end - end - local removeFromTeam = nil - - local function clearTableEntry(obj, tableInfo) - if tableInfo.MainObjectSmall then - tableInfo.MainObjectSmall.Parent = nil - tableInfo.MainObjectSmall = nil - end - if tableInfo.MainObjectBig then - tableInfo.MainObjectBig.Parent = nil - tableInfo.MainObjectBig = nil - end - if tableInfo.Connections then - for i, connection in ipairs(tableInfo.Connections) do - connection:disconnect() - end - tableInfo.Connections = nil - end - if tableInfo.LeaderStatConnections then - for i, connection in ipairs(tableInfo.LeaderStatConnections) do - connection:disconnect() - end - tableInfo.LeaderStatConnections = nil - end - if tableInfo.CurrentTeam then - removeFromTeam(obj) - tableInfo.CurrentTeam = nil - end - if tableInfo.Players then - for i, player in ipairs(tableInfo.Players) do - playerTable[player].CurrentTeam = nil - end - tableInfo.Players = {} - end - if tableInfo.StatValues then - tableInfo.StatValues = nil - end - end - - local function resetPlayerTable() - for player, info in pairs(playerTable) do - clearTableEntry(player, info) - playerTable[player] = nil - end - playerTable = {} - end - - local function resetTeamTable() - for team, info in pairs(teamTable) do - clearTableEntry(team, info) - teamTable[team] = nil - end - teamTable = {} - teamColorTable = {} - end - - local function getBoardTypeInfo() - local isTeam = (currentBoardType == "TeamScore" or currentBoardType == "TeamList") - local isScore = (currentBoardType == "TeamScore" or currentBoardType == "PlayerScore") - return isTeam, isScore - end - - - local function recomputeTeamScore(team, column) - if not team or team == "Neutral" then - return - end - - local function recomputeScoreHelper(statChangers) - if statChangers and column <= #statChangers then - local sum = 0 - for i, p in ipairs(teamTable[team].Players) do - if playerTable[p].StatValues and column <= #playerTable[p].StatValues then - sum = sum + playerTable[p].StatValues[column].Value - end - end - statChangers[column](sum) - end - end - - recomputeScoreHelper(teamTable[team].StatChangersSmall) - recomputeScoreHelper(teamTable[team].StatChangersBig) - end - local function recomputeCompleteTeamScore(team) - local col = 1 - while col <= currentStatCount do - recomputeTeamScore(team, col) - col = col + 1 - end - end - removeFromTeam = function(player) - if playerTable[player].CurrentTeam ~= nil and teamTable[playerTable[player].CurrentTeam] ~= nil then - ArrayRemove(teamTable[playerTable[player].CurrentTeam].Players, player) - recomputeCompleteTeamScore(playerTable[player].CurrentTeam) - playerTable[player].CurrentTeam = nil - end - end - - local function assignToTeam(player) - local isTeam, isScore = getBoardTypeInfo() - - if isTeam then - local newTeam = nil - - if player.Neutral or teamColorTable[player.TeamColor.Name] == nil then - newTeam = "Neutral" - else - newTeam = teamColorTable[player.TeamColor.Name] - end - - if playerTable[player].CurrentTeam == newTeam then - return - end - - removeFromTeam(player) - - playerTable[player].CurrentTeam = newTeam - if teamTable[newTeam] then table.insert(teamTable[newTeam].Players, player) end - - if newTeam == "Neutral" then - updatePlayerNameColor(player, nil) - else - updatePlayerNameColor(player, player.TeamColor) - end - - recomputeCompleteTeamScore(newTeam) - - --Relayout - if sortPlayerListsFunction then - sortPlayerListsFunction() - end - end - end - - local function buildTeamObject(team, numStatColumns, suffix) - local isTeam, isScore = getBoardTypeInfo() - local teamObject = createTeamName(team.Name, team.TeamColor) - if not teamTable[team] then - teamTable[team] = {} - end - teamTable[team]["NameObject" .. suffix] = teamObject - if isScore then - local statObject - local textChangers - teamObject, statObject, textChangers = createStatColumns(teamObject, numStatColumns, true, suffix == "Big") - teamTable[team]["StatObject" .. suffix] = statObject - teamTable[team]["StatChangers" .. suffix] = textChangers - end - teamTable[team]["MainObject" .. suffix] = teamObject - if not teamTable[team].Players then - teamTable[team].Players = {} - end - return teamObject - end - - local currentContextMenuPlayer = nil - local function updatePlayerContextMenu(player) - currentContextMenuPlayer = player - local elementHeight = 20 - local function highlight(button) - button.TextColor3 = Color3.new(0,0,0) - button.BackgroundColor3 = Color3.new(0.8,0.8,0.8) - end - local function clearHighlight(button) - button.TextColor3 = Color3.new(1,1,1) - button.BackgroundColor3 = Color3.new(0,0,0) - end - if playerContextMenu == nil then - playerContextMenu = Instance.new("Frame") - playerContextMenu.Name = "PlayerListContextMenu" - playerContextMenu.BackgroundTransparency = 1 - playerContextMenu.Visible = false - - local playerContextMenuButton = Instance.new("TextButton") - playerContextMenuButton.Name = "PlayerListContextMenuButton" - playerContextMenuButton.Text = "" - playerContextMenuButton.Style = Enum.ButtonStyle.RobloxButtonDefault - playerContextMenuButton.ZIndex = 4 - playerContextMenuButton.Size = UDim2.new(1, 0, 1, -20) - playerContextMenuButton.Visible = true - playerContextMenuButton.Parent = playerContextMenu - - for i, contextElement in ipairs(contextMenuElements) do - local element = contextElement - if element.Type == "Button" then - local button = Instance.new("TextButton") - button.Name = "ContextButton" .. i - button.BackgroundColor3 = Color3.new(0,0,0) - button.BorderSizePixel = 0 - button.TextXAlignment = Enum.TextXAlignment.Left - button.Text = " " .. contextElement.Text - button.Font = Enum.Font.Arial - button.FontSize = Enum.FontSize.Size14 - button.Size = UDim2.new(1, 8, 0, elementHeight) - button.TextColor3 = Color3.new(1,1,1) - button.ZIndex = 4 - button.Parent = playerContextMenuButton - button.MouseButton1Click:connect(function() - if button.Active then - local success, result = pcall(function() element.DoIt(currentContextMenuPlayer) end) - playerContextMenu.Visible = false - end - end) - - button.MouseEnter:connect(function() - if button.Active then - highlight(button) - end - end) - button.MouseLeave:connect(function() - if button.Active then - clearHighlight(button) - end - end) - - contextElement.Button = button - contextElement.Element = button - elseif element.Type == "Label" then - local frame = Instance.new("Frame") - frame.Name = "ContextLabel" .. i - frame.BackgroundTransparency = 1 - frame.Size = UDim2.new(1, 8, 0, elementHeight) - - local label = Instance.new("TextLabel") - label.Name = "Text1" - label.BackgroundTransparency = 1 - label.BackgroundColor3 = Color3.new(1,1,1) - label.BorderSizePixel = 0 - label.TextXAlignment = Enum.TextXAlignment.Left - label.Font = Enum.Font.ArialBold - label.FontSize = Enum.FontSize.Size14 - label.Position = UDim2.new(0.0, 0, 0, 0) - label.Size = UDim2.new(0.5, 0, 1, 0) - label.TextColor3 = Color3.new(1,1,1) - label.ZIndex = 4 - label.Parent = frame - element.Label1 = label - - if element.GetText2 then - label = Instance.new("TextLabel") - label.Name = "Text2" - label.BackgroundTransparency = 1 - label.BackgroundColor3 = Color3.new(1,1,1) - label.BorderSizePixel = 0 - label.TextXAlignment = Enum.TextXAlignment.Right - label.Font = Enum.Font.Arial - label.FontSize = Enum.FontSize.Size14 - label.Position = UDim2.new(0.5, 0, 0, 0) - label.Size = UDim2.new(0.5, 0, 1, 0) - label.TextColor3 = Color3.new(1,1,1) - label.ZIndex = 4 - label.Parent = frame - element.Label2 = label - end - frame.Parent = playerContextMenuButton - element.Label = frame - element.Element = frame - end - end - - playerContextMenu.ZIndex = 4 - playerContextMenu.MouseLeave:connect(function() playerContextMenu.Visible = false end) - robloxLock(playerContextMenu) - playerContextMenu.Parent = game:GetService("CoreGui").RobloxGui - - end - - local elementPos = 0 - for i, contextElement in ipairs(contextMenuElements) do - local isVisible = false - - if contextElement.IsVisible then - local success, visible = pcall(function() return contextElement.IsVisible(currentContextMenuPlayer) end) - if success then - isVisible = visible - else - print("Error in IsVisible call: " .. visible) - end - end - - if contextElement.Type == "Button" then - contextElement.Button.Visible = isVisible - if contextElement.Button.Visible then - isVisible = true - clearHighlight(contextElement.Button) - if contextElement.IsActive then - local success, active = pcall(function() return contextElement.IsActive(currentContextMenuPlayer) end) - if success then - contextElement.Button.Active = active - else - print("Error in IsActive call: " .. active) - end - end - if contextElement.Button.Active then - contextElement.Button.TextColor3 = Color3.new(1,1,1) - else - contextElement.Button.TextColor3 = Color3.new(0.7,0.7,0.7) - end - end - elseif contextElement.Type == "Label" then - contextElement.Label.Visible = isVisible - if contextElement.Label.Visible then - local success, text = pcall(function() return contextElement.GetText1(currentContextMenuPlayer) end) - if success then - contextElement.Label1.Text = " " .. text - else - print("Error in GetText1 call: " .. text) - end - - if contextElement.GetText2 then - local success, text = pcall(function() return contextElement.GetText2(currentContextMenuPlayer) end) - if success then - contextElement.Label2.Text = " " .. text - else - print("Error in GetText2 call: " .. text) - end - end - end - end - if isVisible then - contextElement.Element.Position = UDim2.new(0,-4, 0, elementPos * elementHeight - 4) - elementPos = elementPos + 1 - end - end - playerContextMenu.Size = UDim2.new(0, 150, 0, elementPos*elementHeight + 13 + 20) - end - local function showPlayerMenu(player, x, y) - updatePlayerContextMenu(player) - x = x - (playerContextMenu.AbsoluteSize.X/2) - if x + playerContextMenu.AbsoluteSize.X >= game:GetService("CoreGui").RobloxGui.AbsoluteSize.X then - x = game:GetService("CoreGui").RobloxGui.AbsoluteSize.X - playerContextMenu.AbsoluteSize.X - end - playerContextMenu.Visible = true - playerContextMenu.Position = UDim2.new(0, x, 0, y-playerContextMenu.AbsoluteSize.Y) - end - - local function buildPlayerObject(player, numStatColumns, suffix) - if not player then return nil end - - local isTeam, isScore = getBoardTypeInfo() - - local playerObject = nil - local changePlayerNameFunction = nil - local currentColor = nil - if isTeam and not player.Neutral then - currentColor = player.TeamColor.Color - else - currentColor = Color3.new(1,1,1) - end - playerObject, changePlayerNameFunction = createPlayerName(player.Name, player.MembershipType, currentColor, getFriendStatus(player)) - - if not playerTable[player] then - playerTable[player] = {} - end - if not playerTable[player].Connections then - playerTable[player].Connections = {} - end - if not playerTable[player].CurrentTeam then - playerTable[player].CurrentTeam = nil - end - playerTable[player]["NameObject" .. suffix] = playerObject - playerTable[player]["ChangeName" .. suffix] = changePlayerNameFunction - - if isScore then - local statObject = nil - local textChangers = nil - playerObject, statObject, textChangers = createStatColumns(playerObject, numStatColumns, false, suffix == "Big") - playerTable[player]["StatObject" .. suffix]= statObject - playerTable[player]["StatChangers" .. suffix] = textChangers - - local statValues, leaderstats = getStatValuesForPlayer(player) - if not statValues or #statValues < numStatColumns then - if not playerTable[player].LeaderStatConnections then - playerTable[player].LeaderStatConnections = {} - end - --Setup a listener to see when this data gets filled in - if not leaderstats then - --We don't even have a leaderstats child, wait for one - table.insert(playerTable[player].LeaderStatConnections, - player.ChildAdded:connect( - function(child) - if child.Name == "leaderstats" then - --Connections will be torn down - recreatePlayerFunction(player) - else - table.insert(playerTable[player].LeaderStatConnections, - child.Changed:connect( - function(prop) - if prop == "Name" and child.Name == "leaderstats" then - --Connections will be torn down - recreatePlayerFunction(player) - end - end)) - end - end)) - else - --We have a leaderstats, but not enough children, recreate if we get them - table.insert(playerTable[player].LeaderStatConnections, - leaderstats.ChildAdded:connect( - function(child) - --TODO only look for IntValue - recreatePlayerFunction(player) - end) - ) - table.insert(playerTable[player].LeaderStatConnections, - leaderstats.AncestryChanged:connect( - function(child) - --We got deleted, try again - recreatePlayerFunction(player) - end) - ) - end - end - if statValues then - if not playerTable[player].StatValues then - playerTable[player].StatValues = {} - end - local pos = 1 - while pos <= numStatColumns and pos <= #statValues do - local currentColumn = pos - local statValue = statValues[pos] - local statChanger = textChangers[pos] - - local updateStat = function(val) - statChanger(val) - if playerTable[player] ~= nil then recomputeTeamScore(playerTable[player].CurrentTeam, currentColumn) end - end - if pos > #playerTable[player].StatValues then - table.insert(playerTable[player].StatValues, statValue) - end - - if type(statValue) ~= "number" and statValue["Changed"] then - table.insert(playerTable[player].Connections, - statValue.Changed:connect(updateStat) - ) - end - - table.insert(playerTable[player].Connections, - statValue.AncestryChanged:connect( - function() - recreatePlayerFunction(player) - end) - ) - updateStat(statValue.Value) - pos = pos + 1 - end - end - end - - if supportFriends and player ~= game.Players.LocalPlayer and player.userId > 0 and game.Players.LocalPlayer.userId > 0 then - local button = Instance.new("TextButton") - button.Name = playerObject.Name .. "Button" - button.Text = "" - button.Active = false - button.Size = playerObject.Size - button.Position = playerObject.Position - button.BackgroundColor3 = playerObject.BackgroundColor3 - - local secondButton = Instance.new("TextButton") - secondButton.Name = playerObject.Name .. "RealButton" - secondButton.Text = "" - secondButton.BackgroundTransparency = 1 - secondButton.BackgroundColor3 = playerObject.BackgroundColor3 - local theNameLabel = playerObject:findFirstChild("NameLabel",true) - if theNameLabel then - theNameLabel.TextColor3 = Color3.new(1,1,1) - secondButton.Parent = theNameLabel - end - secondButton.Parent.BackgroundTransparency = 1 - secondButton.Parent.Visible = true - secondButton.ZIndex = 2 - secondButton.Size = UDim2.new(1,0,1,0) - - local previousTransparency = nil - table.insert(playerTable[player].Connections, - secondButton.MouseEnter:connect( - function() - if previousTransparency == nil then - previousTransparency = secondButton.BackgroundTransparency - end - - if lightBackground then - secondButton.Parent.BackgroundTransparency = 0 - else - secondButton.Parent.BackgroundTransparency = 1 - end - end)) - table.insert(playerTable[player].Connections, - secondButton.MouseLeave:connect( - function() - if previousTransparency ~= nil then - previousTransparency = nil - end - secondButton.Parent.BackgroundTransparency = 1 - end)) - - local mouseDownX, mouseDownY - table.insert(playerTable[player].Connections, - secondButton.MouseButton1Down:connect(function(x,y) - mouseDownX = x - mouseDownY = y - end)) - table.insert(playerTable[player].Connections, - secondButton.MouseButton1Click:connect(function() - showPlayerMenu(player, mouseDownX, secondButton.AbsolutePosition.Y + secondButton.AbsoluteSize.Y ) - end)) - playerObject.BackgroundTransparency = 1 - playerObject.Size = UDim2.new(1,0,1,0) - playerObject.Position = UDim2.new(0,0,0,0) - playerObject.Parent = button - - playerTable[player]["MainObject" .. suffix] = button - - playerObject = button - else - playerTable[player]["MainObject" .. suffix] = playerObject - - if player == game.Players.LocalPlayer and supportFriends then - table.insert(playerTable[player].Connections, - player.FriendStatusChanged:connect( - function(otherPlayer, friendStatus) - if playerTable[otherPlayer] then - updatePlayerFriendStatus(playerTable[otherPlayer]["NameObject" .. suffix], friendStatus) - end - end) - ) - end - end - table.insert(playerTable[player].Connections, - player.Changed:connect( - function(prop) - if prop == "MembershipType" then - updatePlayerName(playerTable[player]["NameObject" .. suffix], player.MembershipType, currentColor) - elseif prop == "Name" then - playerTable[player]["ChangeName" .. suffix](player.Name) - elseif prop == "Neutral" or prop == "TeamColor" then - assignToTeam(player) - end - end) - ) - return playerObject - end - - local function orderScrollList(scrollOrder, objectName, scrollFrame) - local pos = 0 - local order = {} - local isTeam, isScore = getBoardTypeInfo() - for i, obj in ipairs(scrollOrder) do - order[obj] = 0 - end - - if isTeam then - local teams = getTeams() - for i, team in ipairs(teams) do - if teamTable[team][objectName] then order[teamTable[team][objectName]] = pos end - pos = pos + 1 - for i, player in ipairs(teamTable[team].Players) do - if playerTable[player] then - if playerTable[player][objectName] ~= nil then order[playerTable[player][objectName]] = pos end - pos = pos + 1 - end - end - end - - if #teamTable["Neutral"].Players > 0 then - teamTable["Neutral"][objectName].Parent = scrollFrame - order[teamTable["Neutral"][objectName]] = pos - pos = pos + 1 - for i, player in ipairs(teamTable["Neutral"].Players) do - if playerTable[player][objectName] ~= nil then order[playerTable[player][objectName]] = pos end - pos = pos + 1 - end - else - teamTable["Neutral"][objectName].Parent = nil - end - else - local players = getPlayers() - for i, player in ipairs(players) do - if playerTable[player] and playerTable[player][objectName] ~= nil then order[playerTable[player][objectName]] = pos end - pos = pos + 1 - end - end - - table.sort(scrollOrder, - function(a,b) - return order[a] < order[b] - end) - end - - local function createPlayerListBasics(frame, isBig) - local headerFrame = Instance.new("Frame") - headerFrame.Name = "Header" - headerFrame.BackgroundTransparency = 1 - headerFrame.Size = UDim2.new(1,-13,0,26) - headerFrame.Position = UDim2.new(0,0,0,0) - headerFrame.Parent = frame - - local lowerPaneFrame = Instance.new("Frame") - lowerPaneFrame.Name = "ScrollingArea" - lowerPaneFrame.BackgroundTransparency = 1 - lowerPaneFrame.Size = UDim2.new(1,-3,1,-26) - if not isBig then lowerPaneFrame.Size = UDim2.new(1,-3,1,-30) end - lowerPaneFrame.Position = UDim2.new(0,0,0,26) - lowerPaneFrame.Parent = frame - - local scrollOrder = {} - local scrollFrame, scrollUp, scrollDown, recalculateScroll = RbxGui.CreateScrollingFrame(scrollOrder) - - local scrollBar = Instance.new("Frame") - scrollBar.Name = "ScrollBar" - scrollBar.BackgroundTransparency = 0.9 - scrollBar.BackgroundColor3 = Color3.new(1,1,1) - scrollBar.BorderSizePixel = 0 - scrollBar.Size = UDim2.new(0, 17, 1, -36) - if isBig then scrollBar.Size = UDim2.new(0, 17, 1, -61) end - scrollBar.Parent = lowerPaneFrame - - scrollFrame.Parent = lowerPaneFrame - scrollUp.Parent = lowerPaneFrame - scrollDown.Parent = lowerPaneFrame - - if isBig then - scrollFrame.Position = UDim2.new(0,0,0,0) - scrollUp.Position = UDim2.new(1,-41,0,5) - scrollDown.Position = UDim2.new(1,-41,1,-35) - scrollBar.Position = UDim2.new(1, -41, 0, 24) - - scrollFrame.Size = UDim2.new(1,-48,1,-16) - headerFrame.Size = UDim2.new(1,-20,0,32) - - else - scrollBar.Position = UDim2.new(1, -15, 0, 14) - scrollBar.Size = UDim2.new(0,17,1,-36) - scrollFrame.Position = UDim2.new(0,1,0,0) - scrollUp.Position = UDim2.new(1,-15,0,-5) - scrollDown.Position = UDim2.new(1,-15,1,-20) - - lowerPaneFrame.Position = UDim2.new(0,0,0,30) - - local toggleScrollBar = function(visible) - if visible then - scrollFrame.Size = UDim2.new(1,-16,1,0) - headerFrame.Size = UDim2.new(1,-16,0,smallWindowHeaderYSize) - else - scrollFrame.Size = UDim2.new(1,0,1,0) - headerFrame.Size = UDim2.new(1,5,0,smallWindowHeaderYSize) - end - scrollUp.Visible = visible - scrollDown.Visible = visible - scrollBar.Visible = visible - end - scrollUp.Changed:connect(function(prop) - if prop == "Active" then - toggleScrollBar(scrollUp.Active or scrollDown.Active) - end - end) - - scrollDown.Changed:connect(function(prop) - if prop == "Active" then - toggleScrollBar(scrollUp.Active or scrollDown.Active) - end - end) - - toggleScrollBar(scrollUp.Active or scrollDown.Active) - end - return headerFrame, scrollFrame, recalculateScroll, scrollOrder - end - - createBoardsFunction = function (boardType, numStatColumns) - local smallFrame = Instance.new("Frame") - smallFrame.Name = "SmallPlayerlist" - smallFrame.Position = smallWindowPosition - smallFrame.Active = false - smallFrame.Size = smallWindowSize - smallFrame.BackgroundColor3 = Color3.new(0,0,0) - smallFrame.BackgroundTransparency = 0.7 - smallFrame.BorderSizePixel = 0 - - local bigFrame = Instance.new("Frame") - bigFrame.Name = "BigPlayerlist" - bigFrame.Size = bigWindowSize - bigFrame.Position = bigWindowPosition - bigFrame.BackgroundColor3 = Color3.new(0,0,0) - bigFrame.BackgroundTransparency = 0.7 - bigFrame.BorderSizePixel = 0 - bigFrame.Visible = false - - local bigFrameWrapper = Instance.new("Frame") - bigFrameWrapper.Name = "Expander" - bigFrameWrapper.Size = UDim2.new(1,21,1,16) - bigFrameWrapper.Position = UDim2.new(0, 0, 0,0) - bigFrameWrapper.BackgroundTransparency = 1 - bigFrameWrapper.Parent = bigFrame - - local smallHeaderFrame, scrollFrameSmall, recalculateScrollSmall, scrollOrderSmall = createPlayerListBasics(smallFrame, false) - local bigHeaderFrame, scrollFrameBig, recalculateScrollBig, scrollOrderBig = createPlayerListBasics(bigFrameWrapper, true) - - local playerListButton = Instance.new("ImageButton") - playerListButton.Name = "GoBigButton" - playerListButton.BackgroundTransparency = 1 - playerListButton.Image = "rbxasset://textures/ui/playerlist_small_maximize.png" - playerListButton.Size = UDim2.new(0.0, 35, 0, 29) - playerListButton.Position = UDim2.new(0, 0, 0, 0) - playerListButton.MouseButton1Click:connect( - function() - toggleBigWindow() - end) - playerListButton.Parent = smallHeaderFrame - - playerListButton = Instance.new("ImageButton") - playerListButton.Name = "CloseButton" - playerListButton.BackgroundTransparency = 1 - playerListButton.Image = "rbxasset://textures/ui/playerlist_small_hide.png" - playerListButton.Size = UDim2.new(0.0, 38, 0, 29) - playerListButton.Position = UDim2.new(0, 35, 0, 0) - playerListButton.MouseButton1Click:connect( - function() - transitionWindowsFunction("None") - end) - playerListButton.Parent = smallHeaderFrame - - playerListButton = Instance.new("ImageButton") - playerListButton.Name = "CloseButton" - playerListButton.Image = "rbxasset://textures/ui/playerlist_big_hide.png" - playerListButton.BackgroundTransparency = 1 - playerListButton.Size = UDim2.new(0.0, 29, 0, 29) - playerListButton.Position = UDim2.new(1, -30, 0.5, -15) - playerListButton.MouseButton1Click:connect( - function() - toggleBigWindow() - end) - playerListButton.Parent = bigHeaderFrame - - local placeName = Instance.new("TextLabel") - placeName.Name = "PlaceName" - placeName.Text = " Player List" - placeName.FontSize = Enum.FontSize.Size24 - placeName.TextXAlignment = Enum.TextXAlignment.Left - placeName.Font = Enum.Font.ArialBold - placeName.BackgroundTransparency = 1 - placeName.TextColor3 = Color3.new(1,1,1) - placeName.Size = UDim2.new(0.5, 0, 1, 0) - placeName.Position = UDim2.new(0, 0, 0.0, 0) - placeName = RbxGui.AutoTruncateTextObject(placeName) - placeName.Parent = bigHeaderFrame - - - currentBoardType = boardType - currentStatCount = numStatColumns - local isTeam, isScore = getBoardTypeInfo() - local players = getPlayers() - - if isScore then - local statColumns = getStatColumns(players) - numStatColumns = #statColumns - if numStatColumns > 3 then - numStatColumns = 3 - end - createStatHeaders(statColumns, numStatColumns, false).Parent = smallHeaderFrame - createStatHeaders(statColumns, currentStatCount, true).Parent = bigHeaderFrame - end - - --Clean up all old stuff - resetPlayerTable() - - for i, player in ipairs(players) do - local playerObject = buildPlayerObject(player, numStatColumns, "Small") - table.insert(scrollOrderSmall, playerObject) - playerObject.Parent = scrollFrameSmall - - playerObject = buildPlayerObject(player, currentStatCount, "Big") - table.insert(scrollOrderBig, playerObject) - playerObject.Parent = scrollFrameBig - end - - --Clean up old stuff - resetTeamTable() - - local teamStatObjects = {} - if isTeam then - local teams = getTeams() - local i = #teams - while i >= 1 do - --We go backwards so the "first" team color gets the team - local team = teams[i] - teamColorTable[team.TeamColor.Name] = team - i = i - 1 - end - - --Adding/Removing a Team causes a full invalidation of the board - for i, team in ipairs(teams) do - local teamObject = buildTeamObject(team, numStatColumns, "Small") - table.insert(scrollOrderSmall, teamObject) - teamObject.Parent = scrollFrameSmall - - teamObject = buildTeamObject(team, currentStatCount, "Big") - table.insert(scrollOrderBig, teamObject) - teamObject.Parent = scrollFrameBig - end - - teamTable["Neutral"] = {} - teamTable["Neutral"].Players = {} - - local neutralTeamObject = createTeamName("Neutral", BrickColor.palette(8)) - teamTable["Neutral"].NameObjectSmall = neutralTeamObject - teamTable["Neutral"].StatObjectSmall = nil - teamTable["Neutral"].MainObjectSmall = neutralTeamObject - table.insert(scrollOrderSmall, neutralTeamObject) - - neutralTeamObject = createTeamName("Neutral", BrickColor.palette(8)) - teamTable["Neutral"].NameObjectBig = neutralTeamObject - teamTable["Neutral"].StatObjectBig = nil - teamTable["Neutral"].MainObjectBig = neutralTeamObject - table.insert(scrollOrderBig, neutralTeamObject) - - local neutralPlayers = {} - for i, player in ipairs(players) do - assignToTeam(player) - end - end - - removePlayerFunction = function(player) - if playerTable[player] then - clearTableEntry(player, playerTable[player]) - - ArrayRemove(scrollOrderSmall, playerTable[player].MainObjectSmall) - ArrayRemove(scrollOrderBig, playerTable[player].MainObjectBig) - - playerTable[player] = nil - recalculateSmallPlayerListSize(smallFrame) - end - end - recreatePlayerFunction = function(player) - removePlayerFunction(player) - - local playerObject = buildPlayerObject(player, numStatColumns, "Small") - table.insert(scrollOrderSmall, playerObject) - robloxLock(playerObject) - playerObject.Parent = scrollFrameSmall - - playerObject = buildPlayerObject(player, currentStatCount, "Big") - table.insert(scrollOrderBig, playerObject) - robloxLock(playerObject) - playerObject.Parent = scrollFrameBig - - local isTeam, isScore = getBoardTypeInfo() - if isTeam then - assignToTeam(player) - end - - sortPlayerListsFunction() - recalculateSmallPlayerListSize(smallFrame) - end - - if screenResizeCon then screenResizeCon:disconnect() end - screenResizeCon = screen.Changed:connect( - function(prop) - if prop == "AbsoluteSize" then - wait() - recalculateSmallPlayerListSize(smallFrame) - end - end) - - sortPlayerListsFunction = function() - orderScrollList(scrollOrderSmall, "MainObjectSmall", scrollFrameSmall) - recalculateScrollSmall() - createAlternatingRows(scrollOrderSmall) - - orderScrollList(scrollOrderBig, "MainObjectBig", scrollFrameBig) - recalculateScrollBig() - createAlternatingRows(scrollOrderBig) - end - - sortPlayerListsFunction() - - robloxLock(smallFrame) - robloxLock(bigFrame) - return smallFrame, bigFrame - end - - --Teams changing invalidates the whole board - local function teamsChanged() - if debounceTeamsChanged then - return - end - - debounceTeamsChanged = true - wait() - rebuildBoard(game:GetService("CoreGui").RobloxGui, determineBoardType()) - debounceTeamsChanged = false - end - - - local checkIfBoardChanged = function() - local newBoardType, numStats = determineBoardType() - if newBoardType ~= currentBoardType or numStats ~= currentStatCount then - rebuildBoard(game:GetService("CoreGui").RobloxGui, newBoardType, numStats) - end - end - - local function buildPlayerList() - waitForChild(game, "Players") - waitForProperty(game.Players, "LocalPlayer") - - local playerListEnabled = testPlayerListPlaces[game.PlaceId] or enablePlayerListGlobally - if localTesting and (game.PlaceId == 0) or (game.PlaceId == -1) then - playerListEnabled = true - end - if not playerListEnabled then - --No playerlist - return - end - - supportFriends = testFriendingPlaces[game.PlaceId] or enableFriendingGlobally - if localTesting and (game.PlaceId == 0) or (game.PlaceId == -1) then - supportFriends = true - end - - local teams = game:GetService("Teams") - if teams then - local teamConnections = {} - - teams.ChildAdded:connect( - function(child) - if child:IsA("Team") then - teamsChanged() - teamConnections[child] = child.Changed:connect( - function(prop) - if prop == "TeamColor" or prop == "Name" then - --Rebuild when things change - teamsChanged() - end - end) - end - end) - teams.ChildRemoved:connect( - function(child) - if child:IsA("Team") then - if teamConnections[child] then - teamConnections[child]:disconnect() - teamConnections[child] = nil - end - teamsChanged() - end - end) - end - - game.Players.ChildAdded:connect( - function(player) - if player:IsA("Player") then - addPlayerFunction(player) - end - end) - - game.Players.ChildRemoved:connect( - function(player) - if player:IsA("Player") then - if removePlayerFunction then - removePlayerFunction(player) - end - end - end) - - rebuildBoard(screen, determineBoardType()) - game.GuiService.ShowLegacyPlayerList = false - - game.GuiService:AddKey("\t") - local lastTime = nil - game.GuiService.KeyPressed:connect( - function(key) - if key == "\t" then - local modalCheck, isModal = pcall(function() return game.GuiService.IsModalDialog end) - if modalCheck == false or (modalCheck and isModal == false) then - local currentTime = time() - if lastTime == nil or currentTime - lastTime > 0.4 then - lastTime = currentTime - toggleBigWindow() - end - end - end - end) - - delay(0, - function() - while true do - wait(5) - checkIfBoardChanged() - end - end) - end - - if game.CoreGui.Version >= 2 then - buildPlayerList() - end -end - -end) diff --git a/scripts/launcher/3DView/cores/StarterScript.lua b/scripts/launcher/3DView/cores/StarterScript.lua deleted file mode 100644 index f47beeb..0000000 --- a/scripts/launcher/3DView/cores/StarterScript.lua +++ /dev/null @@ -1,23 +0,0 @@ --- Creates all neccessary scripts for the gui on initial load, everything except build tools --- Created by Ben T. 10/29/10 --- Please note that these are loaded in a specific order to diminish errors/perceived load time by user - -delay(0, function() - -print("Accurate CS by Matt Brown.") - -local function waitForChild(instance, name) - while not instance:FindFirstChild(name) do - instance.ChildAdded:wait() - end -end -local function waitForProperty(instance, property) - while not instance[property] do - instance.Changed:wait() - end -end - -waitForChild(game:GetService("CoreGui"),"RobloxGui") - -dofile("rbxasset://scripts\\cores\\PlayerlistScript.lua") -end) \ No newline at end of file