-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCore.lua
More file actions
36 lines (27 loc) · 921 Bytes
/
Core.lua
File metadata and controls
36 lines (27 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
-- FIXED: CustomUR/Core.lua
local ComponentsFolder = script:WaitForChild("Components")
local Components = {
Button = require(ComponentsFolder:WaitForChild("Button")),
Toggle = require(ComponentsFolder:WaitForChild("Toggle")),
Slider = require(ComponentsFolder:WaitForChild("Slider")),
Checkbox = require(ComponentsFolder:WaitForChild("Checkbox"))
}
local CustomUR = {}
function CustomUR.CreateWindow(options)
local Window = Instance.new("Window")
Window.Parent = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui")
local Tab = Instance.new("Tab")
Tab.Parent = Window
Tab.Position = UDim2.new(0.5, -200, 0.5, -150)
local self = {
Window = Window,
Tab = Tab
}
for name, module in pairs(Components) do
self[name] = function(_, config)
return module(Tab, config)
end
end
return self
end
return CustomUR