95 lines
3.2 KiB
Plaintext
95 lines
3.2 KiB
Plaintext
%1%
|
|
-- 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")
|
|
local touchEnabled = false
|
|
pcall(function() touchEnabled = game:GetService("UserInputService").TouchEnabled end)
|
|
|
|
-- 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(3, scriptContext, "CoreScripts/Sections")
|
|
|
|
waitForChild(game:GetService("CoreGui"),"RobloxGui")
|
|
local screenGui = game:GetService("CoreGui"):FindFirstChild("RobloxGui")
|
|
|
|
if not touchEnabled then
|
|
-- ToolTipper (creates tool tips for gui)
|
|
scriptContext:AddCoreScript(4,screenGui,"CoreScripts/ToolTip")
|
|
-- SettingsScript
|
|
scriptContext:AddCoreScript(5,screenGui,"CoreScripts/Settings")
|
|
end
|
|
|
|
-- For Deepak Testing
|
|
pcall(function()
|
|
waitForProperty(game,"PlaceId")
|
|
if game.PlaceId == deepakTestingPlace then
|
|
scriptContext:AddCoreScript(52177626,screenGui,"RBXStatusBuffsGUIScript")
|
|
end
|
|
end)
|
|
|
|
-- MainBotChatScript
|
|
scriptContext:AddCoreScript(6,screenGui,"CoreScripts/MainBotChatScript")
|
|
|
|
-- Popup Script
|
|
scriptContext:AddCoreScript(7,screenGui,"CoreScripts/PopupScript")
|
|
-- Friend Notification Script (probably can use this script to expand out to other notifications)
|
|
scriptContext:AddCoreScript(8,screenGui,"CoreScripts/NotificationScript")
|
|
-- Chat script
|
|
scriptContext:AddCoreScript(9, screenGui, "CoreScripts/ChatScript")
|
|
-- Purchase Prompt Script
|
|
scriptContext:AddCoreScript(10, screenGui, "CoreScripts/PurchasePromptScript")
|
|
|
|
if not touchEnabled then
|
|
-- New Player List
|
|
scriptContext:AddCoreScript(11,screenGui,"CoreScripts/PlayerListScript")
|
|
elseif screenGui.AbsoluteSize.Y > 600 then
|
|
-- New Player List
|
|
scriptContext:AddCoreScript(11,screenGui,"CoreScripts/PlayerListScript")
|
|
else
|
|
delay(5, function()
|
|
if screenGui.AbsoluteSize.Y >= 600 then
|
|
-- New Player List
|
|
scriptContext:AddCoreScript(11,screenGui,"CoreScripts/PlayerListScript")
|
|
end
|
|
end)
|
|
end
|
|
|
|
if game.CoreGui.Version >= 3 then
|
|
waitForProperty(game,"PlaceId")
|
|
local inRightPlace = true
|
|
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
|
|
scriptContext:AddCoreScript(12,screenGui,"BackpackBuilder")
|
|
waitForChild(screenGui,"CurrentLoadout")
|
|
waitForChild(screenGui.CurrentLoadout,"TempSlot")
|
|
waitForChild(screenGui.CurrentLoadout.TempSlot,"SlotNumber")
|
|
-- Backpack Script
|
|
scriptContext:AddCoreScript(13,screenGui.CurrentLoadout,"BackpackScript")
|
|
end |