63 lines
2.3 KiB
Plaintext
63 lines
2.3 KiB
Plaintext
-- 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
|
|
local scriptContext = game:GetService("ScriptContext")
|
|
|
|
-- library registration
|
|
scriptContext:AddCoreScript(2, scriptContext,"/Libraries/LibraryRegistration/LibraryRegistration")
|
|
|
|
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
|
|
|
|
-- Responsible for tracking logging items
|
|
local scriptContext = game:GetService("ScriptContext")
|
|
scriptContext:AddCoreScript(8, scriptContext, "CoreScripts/Sections")
|
|
|
|
waitForChild(game:GetService("CoreGui"),"RobloxGui")
|
|
local screenGui = game:GetService("CoreGui"):FindFirstChild("RobloxGui")
|
|
|
|
-- ToolTipper (creates tool tips for gui)
|
|
scriptContext:AddCoreScript(9,screenGui,"CoreScripts/ToolTip")
|
|
|
|
-- SettingsScript
|
|
scriptContext:AddCoreScript(10,screenGui,"CoreScripts/Settings")
|
|
|
|
-- MainBotChatScript
|
|
scriptContext:AddCoreScript(11,screenGui,"CoreScripts/MainBotChatScript")
|
|
|
|
if game.CoreGui.Version >= 2 then
|
|
-- New Player List
|
|
scriptContext:AddCoreScript(12,screenGui,"CoreScripts/PlayerListScript")
|
|
-- Popup Script
|
|
scriptContext:AddCoreScript(13,screenGui,"CoreScripts/PopupScript")
|
|
-- Friend Notification Script (probably can use this script to expand out to other notifications)
|
|
scriptContext:AddCoreScript(14,screenGui,"CoreScripts/NotificationScript")
|
|
end
|
|
|
|
-- For Deepak Testing
|
|
pcall(function()
|
|
waitForProperty(game,"PlaceId")
|
|
if game.PlaceId == deepakTestingPlace then
|
|
scriptContext:AddCoreScript(15,screenGui,"CoreScripts/RBXStatusBuffsGUIScript")
|
|
scriptContext:AddCoreScript(16,screenGui,"CoreScripts/HealthScript v4.0")
|
|
end
|
|
end)
|
|
|
|
if game.CoreGui.Version >= 3 then
|
|
-- Backpack Builder
|
|
scriptContext:AddCoreScript(17,screenGui,"CoreScripts/BackpackScripts/BackpackBuilder")
|
|
-- todo: gross, waitforchilds should be in backpackscript
|
|
waitForChild(screenGui,"CurrentLoadout")
|
|
waitForChild(screenGui.CurrentLoadout,"TempSlot")
|
|
waitForChild(screenGui.CurrentLoadout.TempSlot,"SlotNumber")
|
|
-- Backpack Script
|
|
scriptContext:AddCoreScript(19,screenGui.CurrentLoadout,"CoreScripts/BackpackScripts/LoadoutScript")
|
|
end |