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

@ -1,106 +1,116 @@
%1% %1%
-- 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 deepakTestingPlace = 3569749 local touchEnabled = false
pcall(function() touchEnabled = game:GetService("UserInputService").TouchEnabled end)
pcall(function()
local sc = game:GetService("ScriptContext") -- library registration
sc:RegisterLibrary("RbxGui", "13") scriptContext:AddCoreScript(2, scriptContext,"/Libraries/LibraryRegistration/LibraryRegistration")
sc:RegisterLibrary("RbxGear", "14")
if game.PlaceId == deepakTestingPlace then local function waitForChild(instance, name)
sc:RegisterLibrary("RbxStatus", "52177566") while not instance:FindFirstChild(name) do
end instance.ChildAdded:wait()
sc:LibraryRegistrationComplete() end
end) end
local function waitForProperty(instance, property)
local function waitForChild(instance, name) while not instance[property] do
while not instance:FindFirstChild(name) do instance.Changed:wait()
instance.ChildAdded:wait() end
end end
end
local function waitForProperty(instance, property) -- Responsible for tracking logging items
while not instance[property] do local scriptContext = game:GetService("ScriptContext")
instance.Changed:wait() scriptContext:AddCoreScript(3, scriptContext, "CoreScripts/Sections")
end
end waitForChild(game:GetService("CoreGui"),"RobloxGui")
local screenGui = game:GetService("CoreGui"):FindFirstChild("RobloxGui")
local backpackTestPlaces = {41324860,87241143,1818,65033,25415,14403,33913,21783593,17467963,3271,16184658} if not touchEnabled then
-- ToolTipper (creates tool tips for gui)
waitForChild(game:GetService("CoreGui"),"RobloxGui") scriptContext:AddCoreScript(4,screenGui,"CoreScripts/ToolTip")
local screenGui = game:GetService("CoreGui"):FindFirstChild("RobloxGui") -- SettingsScript
scriptContext:AddCoreScript(5,screenGui,"CoreScripts/Settings")
local scriptContext = game:GetService("ScriptContext") end
-- Resizer (dynamically resizes gui) -- For Deepak Testing
scriptContext:AddCoreScript(2,screenGui,"Resizer") pcall(function()
waitForProperty(game,"PlaceId")
-- Chat script if game.PlaceId == deepakTestingPlace then
scriptContext:AddCoreScript(1000, screenGui, "CoreScripts/ChatScript") scriptContext:AddCoreScript(52177626,screenGui,"RBXStatusBuffsGUIScript")
scriptContext:AddCoreScript(52177590,screenGui,"HealthScript v4.0")
-- SubMenuBuilder (builds out the material,surface and color panels) end
scriptContext:AddCoreScript(3,screenGui,"SubMenuBuilder") end)
-- ToolTipper (creates tool tips for gui) -- MainBotChatScript
scriptContext:AddCoreScript(4,screenGui,"ToolTipper") scriptContext:AddCoreScript(6,screenGui,"CoreScripts/MainBotChatScript")
if game.CoreGui.Version < 2 then -- Popup Script
-- (controls the movement and selection of sub panels) scriptContext:AddCoreScript(8,screenGui,"CoreScripts/PopupScript")
-- PaintMenuMover -- Friend Notification Script (probably can use this script to expand out to other notifications)
scriptContext:AddCoreScript(36040464,screenGui.BuildTools.Frame.PropertyTools.PaintTool,"PaintMenuMover") scriptContext:AddCoreScript(9,screenGui,"CoreScripts/NotificationScript")
-- MaterialMenuMover -- Chat script
scriptContext:AddCoreScript(36040495,screenGui.BuildTools.Frame.PropertyTools.MaterialSelector,"MaterialMenuMover") scriptContext:AddCoreScript(1000, screenGui, "CoreScripts/ChatScript")
-- InputMenuMover -- Purchase Prompt Script
scriptContext:AddCoreScript(36040483,screenGui.BuildTools.Frame.PropertyTools.InputSelector,"InputMenuMover") scriptContext:AddCoreScript(10, screenGui, "CoreScripts/PurchasePromptScript")
end
if not touchEnabled then
-- SettingsScript -- New Player List
scriptContext:AddCoreScript(5,screenGui,"SettingsScript") scriptContext:AddCoreScript(7,screenGui,"CoreScripts/PlayerListScript")
elseif screenGui.AbsoluteSize.Y > 600 then
-- MainBotChatScript -- New Player List
scriptContext:AddCoreScript(6,screenGui,"MainBotChatScript") scriptContext:AddCoreScript(7,screenGui,"CoreScripts/PlayerListScript")
else
if game.CoreGui.Version >= 2 then delay(5, function()
-- New Player List if screenGui.AbsoluteSize.Y >= 600 then
scriptContext:AddCoreScript(7,screenGui,"PlayerListScript") -- New Player List
-- Popup Script scriptContext:AddCoreScript(7,screenGui,"CoreScripts/PlayerListScript")
scriptContext:AddCoreScript(8,screenGui,"PopupScript") end
-- Friend Notification Script (probably can use this script to expand out to other notifications) end)
scriptContext:AddCoreScript(9,screenGui,"NotificationScript") end
scriptContext:AddCoreScript(38037265,screenGui,"HealthScript 4.0")
end if game.CoreGui.Version >= 3 then
waitForProperty(game,"PlaceId")
-- For Deepak Testing local inRightPlace = true
pcall(function() for i,v in ipairs(backpackTestPlaces) do
waitForProperty(game,"PlaceId") if v == game.PlaceId then
if game.PlaceId == deepakTestingPlace then inRightPlace = true
scriptContext:AddCoreScript(52177626,screenGui,"RBXStatusBuffsGUIScript") break
end end
end) end
if game.CoreGui.Version >= 3 then waitForChild(game,"Players")
waitForProperty(game,"PlaceId") waitForProperty(game.Players,"LocalPlayer")
local inRightPlace = true if game.Players.LocalPlayer.userId == 7210880 or game.Players.LocalPlayer.userId == 0 then inRightPlace = true end
for i,v in ipairs(backpackTestPlaces) do
if v == game.PlaceId then if not inRightPlace then return end -- restricting availability of backpack
inRightPlace = true
break -- Backpack Builder
end scriptContext:AddCoreScript(10,screenGui,"BackpackBuilder")
end waitForChild(screenGui,"CurrentLoadout")
waitForChild(screenGui.CurrentLoadout,"TempSlot")
waitForChild(game,"Players") waitForChild(screenGui.CurrentLoadout.TempSlot,"SlotNumber")
waitForProperty(game.Players,"LocalPlayer") -- Backpack Script
if game.Players.LocalPlayer.userId == 7210880 or game.Players.LocalPlayer.userId == 0 then inRightPlace = true end scriptContext:AddCoreScript(12,screenGui.CurrentLoadout,"BackpackScript")
end
if not inRightPlace then return end -- restricting availability of backpack
local IsPersonalServer = not not game.Workspace:FindFirstChild("PSVariable")
-- Backpack Builder if IsPersonalServer then
scriptContext:AddCoreScript(10,screenGui,"BackpackBuilder") game:GetService("ScriptContext"):AddCoreScript(16,game.Players.LocalPlayer,"BuildToolManager")
waitForChild(screenGui,"CurrentLoadout") end
waitForChild(screenGui.CurrentLoadout,"TempSlot") game.Workspace.ChildAdded:connect(function(nchild)
waitForChild(screenGui.CurrentLoadout.TempSlot,"SlotNumber") if nchild.Name=='PSVariable' and nchild:IsA('BoolValue') then
-- Backpack Script IsPersonalServer = true
scriptContext:AddCoreScript(12,screenGui.CurrentLoadout,"BackpackScript") game:GetService("ScriptContext"):AddCoreScript(16,game.Players.LocalPlayer,"BuildToolManager")
end 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