Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --!nocheck
- local Library = {}
- type Window = {Title: string, Scale: number, Draggable: boolean}
- type Tab = {Text: string, Icon: string}
- type Section = {Text: string}
- type Button = {Text: string, Description: string, Callback: any}
- type Input = {Text: string, Description: string, Placeholder: string, Callback: any}
- type Switch = {Text: string, Description: string, Callback: any}
- type Dropdown = {Text: string, Description: string, Items: any, Callback: any}
- type Slider = {Text: string, Description: string, Min: number, Max: number, Callback: any}
- function Library:CreateWindow(args: Window)
- -----<| DEFAULT VALUES |>-----
- args.Title = (args.Title == nil) and "Title" or args.Title
- args.Scale = (type(args.Scale) ~= "number") and 0.94 or args.Scale
- args.Draggable = (type(args.Draggable) ~= "boolean") and true or false
- -----<| SERVICES |>-----
- local TweenService = game:GetService("TweenService")
- local RunService = game:GetService("RunService")
- -----<| MODULES |>-----
- --local Notification = require(script:WaitForChild("Notification"))
- -----<| VARIABLES |>-----
- local pages = 0
- local highlighted = false
- -----<| GUI |>-----
- local ScreenGui = Instance.new("ScreenGui")
- local Menu = Instance.new("Frame")
- local Background = Instance.new("Frame")
- local UICorner = Instance.new("UICorner")
- local Tabs = Instance.new("ScrollingFrame")
- local UIListLayout = Instance.new("UIListLayout")
- local Pages = Instance.new("Frame")
- local UIPageLayout = Instance.new("UIPageLayout")
- local Seperator = Instance.new("Frame")
- local Title = Instance.new("TextLabel")
- local Exit = Instance.new("ImageButton")
- local Seperator_2 = Instance.new("Frame")
- local UIScale = Instance.new("UIScale")
- local shadowHolder = Instance.new("Frame")
- local umbraShadow = Instance.new("ImageLabel")
- local penumbraShadow = Instance.new("ImageLabel")
- local ambientShadow = Instance.new("ImageLabel")
- local SearchBar = Instance.new("Frame")
- local Input = Instance.new("TextBox")
- local UICorner_2 = Instance.new("UICorner")
- local UIStroke = Instance.new("UIStroke")
- local SearchIcon = Instance.new("ImageLabel")
- local UIScale_2 = Instance.new("UIScale")
- local TabShadow = Instance.new("Frame")
- local UIGradient = Instance.new("UIGradient")
- local PageShadow = Instance.new("Frame")
- local UIGradient_2 = Instance.new("UIGradient")
- --Properties:
- ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- ScreenGui.DisplayOrder = 999999
- ScreenGui.ResetOnSpawn = false
- Menu.Name = "Menu"
- Menu.Parent = ScreenGui
- Menu.AnchorPoint = Vector2.new(0.5, 0.5)
- Menu.BackgroundColor3 = Color3.fromRGB(25, 25, 30)
- Menu.BackgroundTransparency = 1.000
- Menu.BorderSizePixel = 0
- Menu.Position = UDim2.new(0.5, 0, 0.247191012, 0)
- Menu.Size = UDim2.new(0, 520, 0, 20)
- Background.Name = "Background"
- Background.Parent = Menu
- Background.AnchorPoint = Vector2.new(0.5, 0.5)
- Background.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
- Background.BorderSizePixel = 0
- Background.Position = UDim2.new(0.5, 0, 8.85, 0)
- Background.Size = UDim2.new(0, 520, 0, 355)
- UICorner.CornerRadius = UDim.new(0, 5)
- UICorner.Parent = Background
- SearchBar.Name = "SearchBar"
- SearchBar.Parent = Background
- SearchBar.AnchorPoint = Vector2.new(0.5, 0.5)
- SearchBar.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- SearchBar.Position = UDim2.new(0.147, 0, 0.12, 0)
- SearchBar.Size = UDim2.new(0, 140, 0, 20)
- UIScale_2.Parent = SearchBar
- UIScale_2.Scale = 1.035
- Input.Name = "Input"
- Input.Parent = SearchBar
- Input.AnchorPoint = Vector2.new(0.5, 0.5)
- Input.BackgroundTransparency = 1.000
- Input.Position = UDim2.new(0.464566827, 0, 0.5, 0)
- Input.Size = UDim2.new(0, 115, 0, 18)
- Input.ClearTextOnFocus = false
- Input.Font = Enum.Font.Arial
- Input.PlaceholderText = "Search Tab"
- Input.Text = ""
- Input.TextColor3 = Color3.fromRGB(255, 255, 255)
- Input.TextSize = 10.000
- Input.TextWrapped = true
- Input.TextXAlignment = Enum.TextXAlignment.Left
- UICorner_2.CornerRadius = UDim.new(0, 4)
- UICorner_2.Parent = SearchBar
- UIStroke.Color = Color3.fromRGB(100, 100, 100)
- UIStroke.Transparency = 0.5
- UIStroke.Parent = SearchBar
- SearchIcon.Name = "SearchIcon"
- SearchIcon.Parent = SearchBar
- SearchIcon.AnchorPoint = Vector2.new(0.5, 0.5)
- SearchIcon.BackgroundTransparency = 1.000
- SearchIcon.Position = UDim2.new(0.910000026, 0, 0.5, 0)
- SearchIcon.Size = UDim2.new(0, 12, 0, 12)
- SearchIcon.Image = "rbxassetid://7072721559"
- Tabs.Name = "Tabs"
- Tabs.Parent = Background
- Tabs.Active = true
- Tabs.AnchorPoint = Vector2.new(0.5, 0.5)
- Tabs.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Tabs.BackgroundTransparency = 1.000
- Tabs.BorderSizePixel = 0
- Tabs.Position = UDim2.new(0.144, 0, 0.593, 0)
- Tabs.Size = UDim2.new(0.096, 100, 0.815, 0)
- Tabs.ScrollBarThickness = 4
- UIListLayout.Parent = Tabs
- UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- Pages.Name = "Pages"
- Pages.Parent = Background
- Pages.AnchorPoint = Vector2.new(0.5, 0.5)
- Pages.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Pages.BackgroundTransparency = 1.000
- Pages.ClipsDescendants = true
- Pages.Position = UDim2.new(0.654, 0, 0.538, 0)
- Pages.Size = UDim2.new(0.5, 100, 0.922, 0)
- UIPageLayout.Parent = Pages
- UIPageLayout.SortOrder = Enum.SortOrder.LayoutOrder
- Seperator.Name = "Seperator"
- Seperator.Parent = Background
- Seperator.AnchorPoint = Vector2.new(0.5, 0.5)
- Seperator.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
- Seperator.BackgroundTransparency = 0.750
- Seperator.BorderSizePixel = 0
- Seperator.Position = UDim2.new(0.305, 0, 0.53, 0)
- Seperator.Size = UDim2.new(0, 1, 0, 335)
- Seperator.SizeConstraint = Enum.SizeConstraint.RelativeXX
- Title.Name = "Title"
- Title.Parent = Menu
- Title.AnchorPoint = Vector2.new(0.5, 0.5)
- Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Title.BackgroundTransparency = 1.000
- Title.Position = UDim2.new(0.479807705, 0, 0.5, 0)
- Title.Size = UDim2.new(0.924846172, 0, 1, -4)
- Title.Font = Enum.Font.SourceSansBold
- Title.Text = args.Title
- Title.TextColor3 = Color3.fromRGB(255, 255, 255)
- Title.TextScaled = true
- Title.TextSize = 14.000
- Title.TextWrapped = true
- Title.TextXAlignment = Enum.TextXAlignment.Left
- Exit.Name = "Exit"
- Exit.Parent = Menu
- Exit.AnchorPoint = Vector2.new(0.5, 0.5)
- Exit.BackgroundTransparency = 1.000
- Exit.Position = UDim2.new(0.982500017, 0, 0.5, 0)
- Exit.Size = UDim2.new(0, 16, 0, 16)
- Exit.Image = "rbxassetid://7072725342"
- Seperator_2.Name = "Seperator"
- Seperator_2.Parent = Menu
- Seperator_2.AnchorPoint = Vector2.new(0.5, 0.5)
- Seperator_2.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
- Seperator_2.BackgroundTransparency = 0.750
- Seperator_2.BorderSizePixel = 0
- Seperator_2.Position = UDim2.new(0.5, 0, 1, 0)
- Seperator_2.Size = UDim2.new(1, 0, 0, 1)
- Seperator_2.SizeConstraint = Enum.SizeConstraint.RelativeXX
- UIScale.Parent = Menu
- shadowHolder.Name = "shadowHolder"
- shadowHolder.Parent = Menu
- shadowHolder.AnchorPoint = Vector2.new(0.5, 0.5)
- shadowHolder.BackgroundTransparency = 1.000
- shadowHolder.Position = UDim2.new(0.5, 0, 8.625, 0)
- shadowHolder.Size = UDim2.new(1, 8, 17.3500004, 8)
- shadowHolder.ZIndex = -1
- umbraShadow.Name = "umbraShadow"
- umbraShadow.Parent = shadowHolder
- umbraShadow.AnchorPoint = Vector2.new(0.5, 0.5)
- umbraShadow.BackgroundTransparency = 1.000
- umbraShadow.Position = UDim2.new(0.5, 0, 0.5, 0)
- umbraShadow.Size = UDim2.new(1, 4, 1, 4)
- umbraShadow.ZIndex = -1
- umbraShadow.Image = "rbxassetid://1316045217"
- umbraShadow.ImageColor3 = Color3.fromRGB(0, 0, 0)
- umbraShadow.ImageTransparency = 0.860
- umbraShadow.ScaleType = Enum.ScaleType.Slice
- umbraShadow.SliceCenter = Rect.new(10, 10, 118, 118)
- penumbraShadow.Name = "penumbraShadow"
- penumbraShadow.Parent = shadowHolder
- penumbraShadow.AnchorPoint = Vector2.new(0.5, 0.5)
- penumbraShadow.BackgroundTransparency = 1.000
- penumbraShadow.Position = UDim2.new(0.5, 0, 0.5, 0)
- penumbraShadow.Size = UDim2.new(1, 4, 1, 4)
- penumbraShadow.ZIndex = -1
- penumbraShadow.Image = "rbxassetid://1316045217"
- penumbraShadow.ImageColor3 = Color3.fromRGB(0, 0, 0)
- penumbraShadow.ImageTransparency = 0.880
- penumbraShadow.ScaleType = Enum.ScaleType.Slice
- penumbraShadow.SliceCenter = Rect.new(10, 10, 118, 118)
- ambientShadow.Name = "ambientShadow"
- ambientShadow.Parent = shadowHolder
- ambientShadow.AnchorPoint = Vector2.new(0.5, 0.5)
- ambientShadow.BackgroundTransparency = 1.000
- ambientShadow.Position = UDim2.new(0.5, 0, 0.5, 0)
- ambientShadow.Size = UDim2.new(1, 4, 1, 4)
- ambientShadow.ZIndex = -1
- ambientShadow.Image = "rbxassetid://1316045217"
- ambientShadow.ImageColor3 = Color3.fromRGB(0, 0, 0)
- ambientShadow.ImageTransparency = 0.880
- ambientShadow.ScaleType = Enum.ScaleType.Slice
- ambientShadow.SliceCenter = Rect.new(10, 10, 118, 118)
- TabShadow.Name = "TabShadow"
- TabShadow.Parent = Background
- TabShadow.AnchorPoint = Vector2.new(0.5, 0.5)
- TabShadow.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
- TabShadow.BorderSizePixel = 0
- TabShadow.Position = UDim2.new(0.142, 0, 0.176, 0)
- TabShadow.Size = UDim2.new(0, 141, 0, 16)
- TabShadow.SizeConstraint = Enum.SizeConstraint.RelativeXX
- TabShadow.ZIndex = 2
- UIGradient.Rotation = 90
- UIGradient.Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0.00, 0.00), NumberSequenceKeypoint.new(0.57, 0.35), NumberSequenceKeypoint.new(1.00, 1.00)}
- UIGradient.Parent = TabShadow
- PageShadow.Name = "PageShadow"
- PageShadow.Parent = Background
- PageShadow.AnchorPoint = Vector2.new(0.5, 0.5)
- PageShadow.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
- PageShadow.BorderSizePixel = 0
- PageShadow.Position = UDim2.new(0.649, 0, 0.081, 0)
- PageShadow.Size = UDim2.new(0, 356, 0, 14)
- PageShadow.SizeConstraint = Enum.SizeConstraint.RelativeXX
- PageShadow.ZIndex = 2
- UIGradient_2.Rotation = 90
- UIGradient_2.Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0.00, 0.00), NumberSequenceKeypoint.new(0.57, 0.35), NumberSequenceKeypoint.new(1.00, 1.00)}
- UIGradient_2.Parent = PageShadow
- -----<| FUNCTIONS |>-----
- local function SetDraggable(draggable: boolean)
- Menu.Draggable = draggable
- Menu.Active = draggable
- end
- local function CreateContainer(parent: GuiObject, text: string, description: string)
- -----<| GUI |>-----
- local Container = Instance.new("Frame")
- local UICorner_2 = Instance.new("UICorner")
- local ContainerLabel = Instance.new("TextLabel")
- local InfoIcon = Instance.new("ImageButton")
- Container.Name = "Container"
- Container.Parent = parent
- Container.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- Container.Position = UDim2.new(0.116959065, 0, -0.916666687, 0)
- Container.Size = UDim2.new(1, 0, 0, 35)
- UICorner_2.CornerRadius = UDim.new(0, 6)
- UICorner_2.Parent = Container
- ContainerLabel.Name = "ContainerLabel"
- ContainerLabel.Parent = Container
- ContainerLabel.AnchorPoint = Vector2.new(0.5, 0.5)
- ContainerLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- ContainerLabel.BackgroundTransparency = 1.000
- ContainerLabel.Position = UDim2.new(0.241228074, 0, 0.5, 0)
- ContainerLabel.Size = UDim2.new(0, 105, 0, 16)
- ContainerLabel.Font = Enum.Font.SourceSansSemibold
- ContainerLabel.Text = text
- ContainerLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- ContainerLabel.TextScaled = true
- ContainerLabel.TextSize = 14.000
- ContainerLabel.TextWrapped = true
- ContainerLabel.TextXAlignment = Enum.TextXAlignment.Left
- InfoIcon.Name = "InfoIcon"
- InfoIcon.Parent = Container
- InfoIcon.AnchorPoint = Vector2.new(0.5, 0.5)
- InfoIcon.BackgroundTransparency = 1.000
- InfoIcon.Position = UDim2.new(0.0399999991, 0, 0.5, 0)
- InfoIcon.Size = UDim2.new(0, 16, 0, 16)
- InfoIcon.Image = "rbxassetid://7072717857"
- -----<| FUNCTIONS |>-----
- InfoIcon.MouseButton1Click:Connect(function()
- return
- --[[
- Notification:Notify({
- Title = text,
- Description = description,
- Button1 = true,
- Button2 = false,
- Callback1 = function()
- return
- end,
- Callback2 = function()
- return
- end,
- })
- ]]
- end)
- return Container
- end
- local function SetTabColor(tab, color: Color3, highlightColor: Color3)
- tab["tab"].ImageColor3 = color
- tab["TabLabel"].TextColor3 = color
- tab["Highlight"].BackgroundColor3 = highlightColor
- end
- local function OnHighlight(stroke: UIStroke, transparency: number, color: Color3)
- stroke.Transparency = transparency
- stroke.Color = color
- end
- local function Search(gui: GuiObject, text: string)
- for _, ui in ipairs(gui:GetChildren()) do
- if not ui:IsA("GuiObject") then
- continue
- end
- ui.Visible = (ui.Name:lower():find(text) or #text < 1) and true or false
- end
- end
- local function ResetTabs()
- for _, tab in pairs(Tabs:GetChildren()) do
- if not tab:IsA("GuiObject") then
- continue
- end
- if not tab["SelectedValue"].Value then
- SetTabColor(tab, Color3.fromRGB(100, 100, 100), Color3.fromRGB(20, 20, 20))
- end
- end
- end
- local function UnselectTabs()
- for _, tab in pairs(Tabs:GetChildren()) do
- if not tab:IsA("GuiObject") then
- continue
- end
- tab["SelectedValue"].Value = false
- end
- end
- local function ToggleEffect(toggled: boolean, toggle: Frame, innerToggle: Frame, uiStroke: UIStroke, positionStart: UDim2, strokeColorStart: Color3, strokeColorEnd: Color3, positionEnd, colorStart: Color3, colorEnd: Color3, innerToggleColorStart: Color3, innerToggleColorEnd: Color3)
- local properties = {
- ["Toggle"] = {
- ["UI"] = toggle,
- ["Properties"] = {
- BackgroundColor3 = (toggled == true) and colorEnd or colorStart,
- }
- },
- ["InnerToggle"] = {
- ["UI"] = innerToggle,
- ["Properties"] = {
- BackgroundColor3 = (toggled == true) and innerToggleColorEnd or innerToggleColorStart,
- Position = (toggled == true) and positionEnd or positionStart
- }
- },
- ["UIStroke"] = {
- ["UI"] = uiStroke,
- ["Properties"] = {
- Color = (toggled == true) and strokeColorEnd or strokeColorStart
- }
- }
- }
- for _, uiInfo in pairs(properties) do
- local info: TweenInfo = TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
- local tween: TweenBase = TweenService:Create(uiInfo["UI"], info, uiInfo["Properties"])
- tween:Play()
- end
- end
- -----<| CALL FUNCTIONS |>-----
- SetDraggable(true)
- Input:GetPropertyChangedSignal("Text"):Connect(function()
- Search(Tabs, Input.Text)
- end)
- Input.Focused:Connect(function()
- highlighted = true
- end)
- Input.FocusLost:Connect(function()
- highlighted = false
- OnHighlight(UIStroke, 0.5, Color3.fromRGB(100, 100, 100))
- end)
- Input.MouseEnter:Connect(function()
- OnHighlight(UIStroke, 0, Color3.fromRGB(0, 175, 255))
- end)
- Input.MouseLeave:Connect(function()
- if not highlighted then
- OnHighlight(UIStroke, 0.5, Color3.fromRGB(100, 100, 100))
- end
- end)
- -----<| TAB MODULE |>-----
- local TabModule = {}
- function TabModule:AddTab(args: Tab)
- -----<| DEFAULT VALUES |>-----
- args.Text = (args.Text == nil) and "Tab" or args.Text
- args.Icon = (args.Icon == nil) and "rbxassetid://3926305904" or args.Icon
- -----<| VARIABLES |>-----
- pages += 1
- -----<| GUI |>-----
- local Tab = Instance.new("TextButton")
- local TabLabel = Instance.new("TextLabel")
- local tab = Instance.new("ImageButton")
- local Selected = Instance.new("BoolValue")
- local Page = Instance.new("ScrollingFrame")
- local UIListLayout_2 = Instance.new("UIListLayout")
- local UIPadding = Instance.new("UIPadding")
- local Highlight = Instance.new("Frame")
- local UICorner = Instance.new("UICorner")
- Tab.Name = args.Text
- Tab.Parent = Tabs
- Tab.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Tab.BackgroundTransparency = 1.000
- Tab.Size = UDim2.new(0, 143, 0, 35)
- Tab.Font = Enum.Font.SourceSans
- Tab.Text = ""
- Tab.TextColor3 = Color3.fromRGB(0, 0, 0)
- Tab.TextSize = 14.000
- TabLabel.Name = "TabLabel"
- TabLabel.Parent = Tab
- TabLabel.AnchorPoint = Vector2.new(0.5, 0.5)
- TabLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TabLabel.BackgroundTransparency = 1.000
- TabLabel.Position = UDim2.new(0.631118894, 0, 0.5, 0)
- TabLabel.Size = UDim2.new(0.737999976, 0, 1, -20)
- TabLabel.Font = Enum.Font.SourceSansSemibold
- TabLabel.Text = args.Text
- TabLabel.TextColor3 = Color3.fromRGB(100, 100, 100)
- TabLabel.TextScaled = true
- TabLabel.TextSize = 14.000
- TabLabel.TextWrapped = true
- TabLabel.TextXAlignment = Enum.TextXAlignment.Left
- TabLabel.ZIndex = 2
- tab.Name = "tab"
- tab.Parent = Tab
- tab.AnchorPoint = Vector2.new(0.5, 0.5)
- tab.BackgroundTransparency = 1.000
- tab.Position = UDim2.new(0.12247552, 0, 0.5, 0)
- tab.Size = UDim2.new(0, 18, 0, 18)
- tab.ZIndex = 2
- tab.Image = args.Icon
- tab.ImageColor3 = Color3.fromRGB(100, 100, 100)
- tab.ImageRectOffset = (args.Icon ~= "rbxassetid://3926305904") and Vector2.new(0, 0) or Vector2.new(484, 484)
- tab.ImageRectSize = (args.Icon ~= "rbxassetid://3926305904") and Vector2.new(0, 0) or Vector2.new(36, 36)
- Highlight.Name = "Highlight"
- Highlight.Parent = Tab
- Highlight.AnchorPoint = Vector2.new(0.5, 0.5)
- Highlight.BackgroundTransparency = 0
- Highlight.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
- Highlight.Position = UDim2.new(0.51, 0, 0.5, 0)
- Highlight.Size = UDim2.new(1.021, -8, 1, -10)
- UICorner.CornerRadius = UDim.new(0, 5)
- UICorner.Parent = Highlight
- Selected.Name = "SelectedValue"
- Selected.Parent = Tab
- Selected.Value = false
- Page.Name = pages
- Page.Parent = Pages
- Page.Active = true
- Page.AnchorPoint = Vector2.new(0.5, 0.5)
- Page.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Page.BackgroundTransparency = 1.000
- Page.BorderSizePixel = 0
- Page.Position = UDim2.new(0.144230768, 0, 0.527611911, 0)
- Page.Size = UDim2.new(1, 0, 1, 0)
- Page.ScrollBarThickness = 4
- UIListLayout_2.Parent = Page
- UIListLayout_2.HorizontalAlignment = Enum.HorizontalAlignment.Center
- UIListLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
- UIListLayout_2.Padding = UDim.new(0, 10)
- UIPadding.Parent = Page
- UIPadding.PaddingTop = UDim.new(0, 5)
- -----<| FUNCTIONS |>-----
- Tab.MouseButton1Click:Connect(function()
- UIPageLayout:JumpToIndex(Page.Name-1)
- UnselectTabs()
- ResetTabs()
- Selected.Value = true
- SetTabColor(Tab, Color3.fromRGB(255, 255, 255), Color3.fromRGB(0, 175, 255))
- end)
- -----<| SECTION MODULE |>-----
- local SectionModule = {}
- function SectionModule:AddSection(args: Section)
- -----<| DEFAULT VALUES |>-----
- args.Text = (args.Text == nil) and "Section" or args.Text
- -----<| VARIABLES |>-----
- local toggled = false
- -----<| GUI |>-----
- local Section = Instance.new("Frame")
- local UIListLayout = Instance.new("UIListLayout")
- local SectionInfo = Instance.new("Frame")
- local SectionLabel = Instance.new("TextLabel")
- local SectionIcon = Instance.new("ImageButton")
- local Dropdown = Instance.new("ImageButton")
- Section.Name = "Section"
- Section.Parent = Page
- Section.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Section.BackgroundTransparency = 1.000
- Section.Position = UDim2.new(8.47522443e-08, 0, 0.0157940444, 0)
- Section.Size = UDim2.new(0, 342, 0, 0)
- Section.AutomaticSize = Enum.AutomaticSize.Y
- UIListLayout.Parent = Section
- UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- UIListLayout.Padding = UDim.new(0, 2)
- SectionInfo.Name = "SectionInfo"
- SectionInfo.Parent = Section
- SectionInfo.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- SectionInfo.BackgroundTransparency = 1.000
- SectionInfo.Size = UDim2.new(1, 0, 0, 35)
- SectionLabel.Name = "SectionLabel"
- SectionLabel.Parent = SectionInfo
- SectionLabel.AnchorPoint = Vector2.new(0.5, 0.5)
- SectionLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- SectionLabel.BackgroundTransparency = 1.000
- SectionLabel.BorderColor3 = Color3.fromRGB(27, 42, 53)
- SectionLabel.Position = UDim2.new(0.549079061, 0, 0.5, 0)
- SectionLabel.Size = UDim2.new(0.864239812, 0, 0, 30)
- SectionLabel.Font = Enum.Font.SourceSansBold
- SectionLabel.Text = args.Text
- SectionLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- SectionLabel.TextScaled = true
- SectionLabel.TextSize = 14.000
- SectionLabel.TextWrapped = true
- SectionLabel.TextXAlignment = Enum.TextXAlignment.Left
- SectionIcon.Name = "SectionIcon"
- SectionIcon.Parent = SectionInfo
- SectionIcon.AnchorPoint = Vector2.new(0.5, 0.5)
- SectionIcon.BackgroundTransparency = 1.000
- SectionIcon.LayoutOrder = 6
- SectionIcon.Position = UDim2.new(0.0508771986, 0, 0.5, 0)
- SectionIcon.Size = UDim2.new(0, 25, 0, 30)
- SectionIcon.ZIndex = 2
- SectionIcon.Image = "rbxassetid://3926305904"
- SectionIcon.ImageRectOffset = Vector2.new(644, 364)
- SectionIcon.ImageRectSize = Vector2.new(36, 36)
- Dropdown.Name = "Dropdown"
- Dropdown.Parent = SectionInfo
- Dropdown.AnchorPoint = Vector2.new(0.5, 0.5)
- Dropdown.BackgroundTransparency = 1.000
- Dropdown.Position = UDim2.new(0.949999988, 0, 0.5, 0)
- Dropdown.Size = UDim2.new(0, 20, 0, 20)
- Dropdown.Image = "rbxassetid://7072706796"
- -----<| FUNCTIONS |>-----
- Dropdown.MouseButton1Click:Connect(function()
- toggled = not toggled
- for _, container in ipairs(Section:GetChildren()) do
- if container.Name == "Container" then
- local properties = (toggled == true) and {Rotation = 0} or {Rotation = 180}
- local info: TweenInfo = TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
- local tween: TweenBase = TweenService:Create(Dropdown, info, properties)
- container.Visible = toggled
- tween:Play()
- end
- end
- end)
- -----<| MORE MODULES |>-----
- local MoreModules = {}
- function MoreModules:AddButton(args: Button)
- -----<| DEFAULT VALUES |>-----
- args.Text = (args.Text == nil) and "Button" or args.Text
- args.Description = (args.Description == nil) and "Description" or args.Description
- args.Callback = (type(args.Callback) ~= "function") and function()
- return
- end or args.Callback
- -----<| GUI |>-----
- local Button = Instance.new("TextButton")
- local Outline = Instance.new("Frame")
- local UICorner = Instance.new("UICorner")
- local UICorner_2 = Instance.new("UICorner")
- local UIStroke = Instance.new("UIStroke")
- local Icon = Instance.new("ImageLabel")
- local Container = CreateContainer(Section, args.Text, args.Description)
- Button.Name = "Button"
- Button.Parent = Container
- Button.AnchorPoint = Vector2.new(0.5, 0.5)
- Button.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- Button.Position = UDim2.new(0.834999979, 0, 0.5, 0)
- Button.Size = UDim2.new(0, 100, 0, 20)
- Button.Font = Enum.Font.SourceSans
- Button.Text = ""
- Button.TextColor3 = Color3.fromRGB(0, 0, 0)
- Button.TextSize = 14.000
- Button.AutoButtonColor = false
- Outline.Name = "Outline"
- Outline.Parent = Button
- Outline.AnchorPoint = Vector2.new(0.5, 0.5)
- Outline.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Outline.BackgroundTransparency = 1.000
- Outline.Position = UDim2.new(0.5, 0, 0.5, 0)
- Outline.Size = UDim2.new(1, 0, 1, 0)
- UICorner.CornerRadius = UDim.new(0, 4)
- UICorner.Parent = Outline
- UICorner_2.CornerRadius = UDim.new(0, 4)
- UICorner_2.Parent = Button
- UIStroke.Color = Color3.fromRGB(100, 100, 100)
- UIStroke.Transparency = 0.5
- UIStroke.Parent = Outline
- Icon.Name = "Icon"
- Icon.Parent = Button
- Icon.AnchorPoint = Vector2.new(0.5, 0.5)
- Icon.BackgroundTransparency = 1.000
- Icon.Position = UDim2.new(0.5, 0, 0.5, 0)
- Icon.Size = UDim2.new(0, 13, 0, 13)
- Icon.Image = "rbxassetid://7072719587"
- -----<| FUNCTIONS |>-----
- Button.MouseEnter:Connect(function()
- OnHighlight(UIStroke, 0, Color3.fromRGB(0, 175, 255))
- end)
- Button.MouseLeave:Connect(function()
- OnHighlight(UIStroke, 0.5, Color3.fromRGB(100, 100, 100))
- end)
- Button.MouseButton1Down:Connect(function()
- Button.BackgroundColor3 = Color3.fromRGB(0, 175, 255)
- end)
- Button.MouseButton1Up:Connect(function()
- Button.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- end)
- Button.MouseButton1Click:Connect(function(x)
- args.Callback()
- end)
- end
- function MoreModules:AddInput(args: Input)
- -----<| DEFAULT VALUES |>-----
- args.Text = (args.Text == nil) and "Button" or args.Text
- args.Description = (args.Description == nil) and "Description" or args.Description
- args.Placeholder = (args.Placeholder == nil) and "Placeholde" or args.Placeholder
- args.Callback = (type(args.Callback) ~= "function") and function()
- return
- end or args.Callback
- -----<| VARIABLES |>-----
- local highlighted = false
- -----<| GUI |>-----
- local Input = Instance.new("TextBox")
- local Clipboard = Instance.new("ImageButton")
- local Outline = Instance.new("Frame")
- local UICorner = Instance.new("UICorner")
- local UICorner_2 = Instance.new("UICorner")
- local UIStroke = Instance.new("UIStroke")
- local Container = CreateContainer(Section, args.Text, args.Description)
- Input.Name = "Input"
- Input.Parent = Container
- Input.AnchorPoint = Vector2.new(0.5, 0.5)
- Input.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- Input.Position = UDim2.new(0.834999979, 0, 0.5, 0)
- Input.Size = UDim2.new(0, 100, 0, 20)
- Input.Font = Enum.Font.Arial
- Input.PlaceholderText = args.Placeholder
- Input.Text = ""
- Input.TextColor3 = Color3.fromRGB(255, 255, 255)
- Input.TextSize = 10.000
- Input.TextWrapped = true
- Input.ClearTextOnFocus = false
- Clipboard.Name = "ClipboardIcon"
- Clipboard.Parent = Input
- Clipboard.AnchorPoint = Vector2.new(0.5, 0.5)
- Clipboard.BackgroundTransparency = 1.000
- Clipboard.Position = UDim2.new(0.920000017, 0, 0.449999988, 0)
- Clipboard.Size = UDim2.new(0, 12, 0, 12)
- Clipboard.Image = "rbxassetid://7072707198"
- Outline.Name = "Outline"
- Outline.Parent = Input
- Outline.AnchorPoint = Vector2.new(0.5, 0.5)
- Outline.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Outline.BackgroundTransparency = 1.000
- Outline.Position = UDim2.new(0.5, 0, 0.5, 0)
- Outline.Size = UDim2.new(1, 0, 1, 0)
- UICorner.CornerRadius = UDim.new(0, 4)
- UICorner.Parent = Outline
- UICorner_2.CornerRadius = UDim.new(0, 4)
- UICorner_2.Parent = Input
- UIStroke.Color = Color3.fromRGB(100, 100, 100)
- UIStroke.Transparency = 0.5
- UIStroke.Parent = Outline
- -----<| FUNCTIONS |>-----
- Clipboard.MouseButton1Click:Connect(function()
- xpcall(function()
- setclipboard(Input.Text)
- end, function()
- warn("Executor doesn't support '<void> setclipboard(<string> value)'")
- end)
- end)
- Input.Focused:Connect(function()
- highlighted = true
- end)
- Input.FocusLost:Connect(function()
- highlighted = false
- OnHighlight(UIStroke, 0.5, Color3.fromRGB(100, 100, 100))
- args.Callback(Input.Text)
- end)
- Input.MouseEnter:Connect(function()
- OnHighlight(UIStroke, 0, Color3.fromRGB(0, 175, 255))
- end)
- Input.MouseLeave:Connect(function()
- if not highlighted then
- OnHighlight(UIStroke, 0.5, Color3.fromRGB(100, 100, 100))
- end
- end)
- end
- function MoreModules:AddSwitch(args: Switch)
- -----<| DEFAULT VALUES |>-----
- args.Text = (args.Text == nil) and "Switch" or args.Text
- args.Description = (args.Description == nil) and "Description" or args.Description
- args.Callback = (type(args.Callback) ~= "function") and function()
- return
- end or args.Callback
- -----<| VARIABLES |>-----
- local toggled = false
- -----<| GUI |>-----
- local Switch = Instance.new("Frame")
- local UICorner = Instance.new("UICorner")
- local InnerSwitch = Instance.new("Frame")
- local UICorner_2 = Instance.new("UICorner")
- local SwitchButton = Instance.new("TextButton")
- local UIStroke = Instance.new("UIStroke")
- local Container = CreateContainer(Section, args.Text, args.Description)
- Switch.Name = "Switch"
- Switch.Parent = Container
- Switch.AnchorPoint = Vector2.new(0.5, 0.5)
- Switch.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- Switch.Position = UDim2.new(0.897000015, 0, 0.5, 0)
- Switch.Size = UDim2.new(0, 50, 0, 20)
- UICorner.CornerRadius = UDim.new(1, 0)
- UICorner.Parent = Switch
- InnerSwitch.Name = "InnerSwitch"
- InnerSwitch.Parent = Switch
- InnerSwitch.AnchorPoint = Vector2.new(0.5, 0.5)
- InnerSwitch.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
- InnerSwitch.Position = UDim2.new(0.200000003, 0, 0.5, 0)
- InnerSwitch.Size = UDim2.new(0, 12, 0, 12)
- UICorner_2.CornerRadius = UDim.new(1, 0)
- UICorner_2.Parent = InnerSwitch
- UIStroke.Parent = Switch
- UIStroke.Color = Color3.fromRGB(100, 100, 100)
- SwitchButton.Name = "SwitchButton"
- SwitchButton.Parent = Switch
- SwitchButton.AnchorPoint = Vector2.new(0.5, 0.5)
- SwitchButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- SwitchButton.BackgroundTransparency = 1.000
- SwitchButton.Position = UDim2.new(0.5, 0, 0.5, 0)
- SwitchButton.Size = UDim2.new(1, 0, 1, 0)
- SwitchButton.Font = Enum.Font.SourceSans
- SwitchButton.Text = ""
- SwitchButton.TextColor3 = Color3.fromRGB(0, 0, 0)
- SwitchButton.TextSize = 14.000
- SwitchButton.ZIndex = 2
- -----<| FUNCTIONS |>-----
- SwitchButton.MouseButton1Click:Connect(function()
- toggled = not toggled
- ToggleEffect(toggled, Switch, InnerSwitch, UIStroke, UDim2.new(0.2, 0, 0.5, 0), Color3.fromRGB(100, 100, 100), Color3.fromRGB(0, 175, 255), UDim2.new(0.8, 0, 0.5, 0), Color3.fromRGB(30, 30, 30), Color3.fromRGB(0, 175, 255), Color3.fromRGB(100, 100, 100), Color3.fromRGB(30, 30, 30))
- args.Callback(toggled)
- end)
- end
- function MoreModules:AddDropdown(args: Dropdown)
- -----<| DEFAULT VALUES |>-----
- args.Text = (args.Text == nil) and "Dropdown" or args.Text
- args.Items = (type(args.Items) ~= "table") and {} or args.Items
- args.Description = (args.Description == nil) and "Description" or args.Description
- args.Callback = (type(args.Callback) ~= "function") and function()
- return
- end or args.Callback
- -----<| VARIABLES |>-----
- local itemsAmount = 0
- local toggled = true
- -----<| GUI |>-----
- local Dropdown = Instance.new("Frame")
- local DropdownSearch = Instance.new("Frame")
- local UIStroke = Instance.new("UIStroke")
- local UIStroke_2 = Instance.new("UIStroke")
- local Input = Instance.new("TextBox")
- local UICorner = Instance.new("UICorner")
- local DropdownIcon = Instance.new("ImageButton")
- local Items = Instance.new("ScrollingFrame")
- local UIListLayout = Instance.new("UIListLayout")
- local Container = CreateContainer(Section, args.Text, args.Description)
- Dropdown.Name = "Dropdown"
- Dropdown.Parent = Container
- Dropdown.AnchorPoint = Vector2.new(0.5, 0.5)
- Dropdown.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Dropdown.BackgroundTransparency = 1.000
- Dropdown.Position = UDim2.new(0.811163664, 0, 0.5, 0)
- Dropdown.Size = UDim2.new(0, 116, 0, 18)
- DropdownSearch.Name = "DropdownSearch"
- DropdownSearch.Parent = Dropdown
- DropdownSearch.AnchorPoint = Vector2.new(0.5, 0.5)
- DropdownSearch.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- DropdownSearch.Position = UDim2.new(0.495999992, 0, 0.5, 0)
- DropdownSearch.Size = UDim2.new(1, 0, 1, 0)
- UIStroke.Color = Color3.fromRGB(100, 100, 100)
- UIStroke.Parent = DropdownSearch
- Input.Name = "Input"
- Input.Parent = DropdownSearch
- Input.AnchorPoint = Vector2.new(0.5, 0.5)
- Input.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- Input.BackgroundTransparency = 1.000
- Input.Position = UDim2.new(0.46952346, 0, 0.45256722, 0)
- Input.Size = UDim2.new(0.884559274, -10, 0.876954198, -5)
- Input.ClearTextOnFocus = false
- Input.Font = Enum.Font.Arial
- Input.Text = "Item"
- Input.TextColor3 = Color3.fromRGB(255, 255, 255)
- Input.TextSize = 10.000
- Input.TextWrapped = true
- Input.TextXAlignment = Enum.TextXAlignment.Left
- UICorner.CornerRadius = UDim.new(0, 4)
- UICorner.Parent = DropdownSearch
- DropdownIcon.Name = "DropdownIcon"
- DropdownIcon.Parent = Dropdown
- DropdownIcon.AnchorPoint = Vector2.new(0.5, 0.5)
- DropdownIcon.BackgroundTransparency = 1.000
- DropdownIcon.Position = UDim2.new(0.920000017, 0, 0.5, 0)
- DropdownIcon.Size = UDim2.new(0, 12, 0, 12)
- DropdownIcon.Image = "rbxassetid://7072706796"
- Items.Name = "Items"
- Items.Parent = Dropdown
- Items.Active = true
- Items.AnchorPoint = Vector2.new(0.5, 0.5)
- Items.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- Items.BorderSizePixel = 0
- Items.Position = UDim2.new(0.5, 0, 3.72000003, 0)
- Items.Size = UDim2.new(1, 0, 0, 100)
- Items.ZIndex = 6
- UIStroke_2.Color = Color3.fromRGB(100, 100, 100)
- UIStroke_2.Parent = Items
- UIListLayout.Parent = Items
- UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
- UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- UIListLayout.Padding = UDim.new(0, 1)
- for _, itemName: string|BasePart in ipairs(args.Items) do
- local Item = Instance.new("TextButton")
- local ItemLabel = Instance.new("TextLabel")
- itemsAmount += 1
- itemName = (typeof(itemName) == "Instance") and itemName.Name or itemName
- Item.Name = itemName
- Item.Parent = Items
- Item.AnchorPoint = Vector2.new(0.5, 0.5)
- Item.BackgroundColor3 = (itemsAmount % 2 == 0) and Color3.fromRGB(30, 30, 30) or Color3.fromRGB(35, 35, 35)
- Item.BorderSizePixel = 0
- Item.Position = UDim2.new(0.834999979, 0, 0.5, 0)
- Item.Size = UDim2.new(1, 0, 0, 16)
- Item.ZIndex = 7
- Item.Font = Enum.Font.SourceSans
- Item.Text = ""
- Item.TextColor3 = Color3.fromRGB(0, 0, 0)
- Item.TextSize = 14.000
- ItemLabel.Name = "ItemLabel"
- ItemLabel.Parent = Item
- ItemLabel.AnchorPoint = Vector2.new(0.5, 0.5)
- ItemLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- ItemLabel.BackgroundTransparency = 1.000
- ItemLabel.Position = UDim2.new(0.5, 0, 0.5, 0)
- ItemLabel.Size = UDim2.new(1, -12, 1, -4)
- ItemLabel.ZIndex = 7
- ItemLabel.Font = Enum.Font.SourceSansSemibold
- ItemLabel.Text = itemName
- ItemLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- ItemLabel.TextScaled = true
- ItemLabel.TextSize = 14.000
- ItemLabel.TextWrapped = true
- Item.MouseButton1Click:Connect(function()
- args.Callback(itemName)
- end)
- end
- DropdownIcon.MouseButton1Click:Connect(function()
- toggled = not toggled
- local properties = (toggled == true) and {Rotation = 0} or {Rotation = 180}
- local info: TweenInfo = TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
- local tween: TweenBase = TweenService:Create(DropdownIcon, info, properties)
- Items.Visible = toggled
- tween:Play()
- end)
- end
- return MoreModules
- end
- return SectionModule
- end
- return TabModule
- end
- return Library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement