Add files via upload

This commit is contained in:
MuramasaM 2022-07-04 11:43:21 -07:00 committed by GitHub
parent 2fe61966e0
commit 4c3282f154
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 116 additions and 106 deletions

View File

@ -2,18 +2,12 @@
-- Creates all neccessary scripts for the gui on initial load, everything except build tools -- Creates all neccessary scripts for the gui on initial load, everything except build tools
-- Created by Ben T. 10/29/10 -- 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 -- Please note that these are loaded in a specific order to diminish errors/perceived load time by user
local scriptContext = game:GetService("ScriptContext")
local touchEnabled = false
pcall(function() touchEnabled = game:GetService("UserInputService").TouchEnabled end)
local deepakTestingPlace = 3569749 -- library registration
scriptContext:AddCoreScript(2, scriptContext,"/Libraries/LibraryRegistration/LibraryRegistration")
pcall(function()
local sc = game:GetService("ScriptContext")
sc:RegisterLibrary("RbxGui", "13")
sc:RegisterLibrary("RbxGear", "14")
if game.PlaceId == deepakTestingPlace then
sc:RegisterLibrary("RbxStatus", "52177566")
end
sc:LibraryRegistrationComplete()
end)
local function waitForChild(instance, name) local function waitForChild(instance, name)
while not instance:FindFirstChild(name) do while not instance:FindFirstChild(name) do
@ -26,50 +20,18 @@ local function waitForProperty(instance, property)
end end
end end
-- Responsible for tracking logging items
local backpackTestPlaces = {41324860,87241143,1818,65033,25415,14403,33913,21783593,17467963,3271,16184658} local scriptContext = game:GetService("ScriptContext")
scriptContext:AddCoreScript(3, scriptContext, "CoreScripts/Sections")
waitForChild(game:GetService("CoreGui"),"RobloxGui") waitForChild(game:GetService("CoreGui"),"RobloxGui")
local screenGui = game:GetService("CoreGui"):FindFirstChild("RobloxGui") local screenGui = game:GetService("CoreGui"):FindFirstChild("RobloxGui")
local scriptContext = game:GetService("ScriptContext") if not touchEnabled then
-- ToolTipper (creates tool tips for gui)
-- Resizer (dynamically resizes gui) scriptContext:AddCoreScript(4,screenGui,"CoreScripts/ToolTip")
scriptContext:AddCoreScript(2,screenGui,"Resizer") -- SettingsScript
scriptContext:AddCoreScript(5,screenGui,"CoreScripts/Settings")
-- Chat script
scriptContext:AddCoreScript(1000, screenGui, "CoreScripts/ChatScript")
-- SubMenuBuilder (builds out the material,surface and color panels)
scriptContext:AddCoreScript(3,screenGui,"SubMenuBuilder")
-- ToolTipper (creates tool tips for gui)
scriptContext:AddCoreScript(4,screenGui,"ToolTipper")
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
scriptContext:AddCoreScript(5,screenGui,"SettingsScript")
-- MainBotChatScript
scriptContext:AddCoreScript(6,screenGui,"MainBotChatScript")
if game.CoreGui.Version >= 2 then
-- New Player List
scriptContext:AddCoreScript(7,screenGui,"PlayerListScript")
-- Popup Script
scriptContext:AddCoreScript(8,screenGui,"PopupScript")
-- Friend Notification Script (probably can use this script to expand out to other notifications)
scriptContext:AddCoreScript(9,screenGui,"NotificationScript")
scriptContext:AddCoreScript(38037265,screenGui,"HealthScript 4.0")
end end
-- For Deepak Testing -- For Deepak Testing
@ -77,9 +39,37 @@ pcall(function()
waitForProperty(game,"PlaceId") waitForProperty(game,"PlaceId")
if game.PlaceId == deepakTestingPlace then if game.PlaceId == deepakTestingPlace then
scriptContext:AddCoreScript(52177626,screenGui,"RBXStatusBuffsGUIScript") scriptContext:AddCoreScript(52177626,screenGui,"RBXStatusBuffsGUIScript")
scriptContext:AddCoreScript(52177590,screenGui,"HealthScript v4.0")
end end
end) end)
-- MainBotChatScript
scriptContext:AddCoreScript(6,screenGui,"CoreScripts/MainBotChatScript")
-- Popup Script
scriptContext:AddCoreScript(8,screenGui,"CoreScripts/PopupScript")
-- Friend Notification Script (probably can use this script to expand out to other notifications)
scriptContext:AddCoreScript(9,screenGui,"CoreScripts/NotificationScript")
-- Chat script
scriptContext:AddCoreScript(1000, screenGui, "CoreScripts/ChatScript")
-- Purchase Prompt Script
scriptContext:AddCoreScript(10, screenGui, "CoreScripts/PurchasePromptScript")
if not touchEnabled then
-- New Player List
scriptContext:AddCoreScript(7,screenGui,"CoreScripts/PlayerListScript")
elseif screenGui.AbsoluteSize.Y > 600 then
-- New Player List
scriptContext:AddCoreScript(7,screenGui,"CoreScripts/PlayerListScript")
else
delay(5, function()
if screenGui.AbsoluteSize.Y >= 600 then
-- New Player List
scriptContext:AddCoreScript(7,screenGui,"CoreScripts/PlayerListScript")
end
end)
end
if game.CoreGui.Version >= 3 then if game.CoreGui.Version >= 3 then
waitForProperty(game,"PlaceId") waitForProperty(game,"PlaceId")
local inRightPlace = true local inRightPlace = true
@ -104,3 +94,23 @@ if game.CoreGui.Version >= 3 then
-- Backpack Script -- Backpack Script
scriptContext:AddCoreScript(12,screenGui.CurrentLoadout,"BackpackScript") scriptContext:AddCoreScript(12,screenGui.CurrentLoadout,"BackpackScript")
end end
local IsPersonalServer = not not game.Workspace:FindFirstChild("PSVariable")
if IsPersonalServer then
game:GetService("ScriptContext"):AddCoreScript(16,game.Players.LocalPlayer,"BuildToolManager")
end
game.Workspace.ChildAdded:connect(function(nchild)
if nchild.Name=='PSVariable' and nchild:IsA('BoolValue') then
IsPersonalServer = true
game:GetService("ScriptContext"):AddCoreScript(16,game.Players.LocalPlayer,"BuildToolManager")
end
end)
if touchEnabled then -- touch devices don't use same control frame
waitForChild(screenGui, 'ControlFrame')
waitForChild(screenGui.ControlFrame, 'BottomLeftControl')
screenGui.ControlFrame.BottomLeftControl.Visible = false
waitForChild(screenGui.ControlFrame, 'TopLeftControl')
screenGui.ControlFrame.TopLeftControl.Visible = false
end