local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local RunService = game:GetService("RunService") local LocalPlayer = game:GetService("Players").LocalPlayer local Mouse = LocalPlayer:GetMouse() local HttpService = game:GetService("HttpService") local PARENT = (gethui and gethui()) or game:GetService('CoreGui') local OrionLib = { Elements = {}, ThemeObjects = {}, Connections = {}, Flags = {}, -- [NOVO] Evento de Favoritos FavoriteEvent = Instance.new("BindableEvent"), Themes = { Default = { Main = Color3.fromRGB(40, 42, 46), Second = Color3.fromRGB(50, 53, 58), Stroke = Color3.fromRGB(80, 85, 90), Divider = Color3.fromRGB(70, 75, 80), Text = Color3.fromRGB(230, 230, 230), TextDark = Color3.fromRGB(170, 175, 180), Third = Color3.fromRGB(65, 68, 75), Hover = Color3.fromRGB(60, 65, 70), Accent = Color3.fromRGB(0, 122, 204), AccentDark = Color3.fromRGB(0, 90, 158), ToggleOn = Color3.fromRGB(85, 170, 85), ToggleOff = Color3.fromRGB(120, 120, 120), Success = Color3.fromRGB(85, 185, 85), Warning = Color3.fromRGB(220, 165, 40), Error = Color3.fromRGB(210, 80, 80) } }, SelectedTheme = "Default", Folder = nil, SaveCfg = false } local Icons = {} local Success, Response = pcall(function() Icons = HttpService:JSONDecode(game:HttpGetAsync("https://raw.githubusercontent.com/evoincorp/lucideblox/master/src/modules/util/icons.json")).icons end) if not Success then warn("\nOrion Library - Failed to load Feather Icons. Error code: " .. Response .. "\n") end local function GetIcon(IconName) if Icons[IconName] ~= nil then return Icons[IconName] else return nil end end local Orion = Instance.new("ScreenGui") Orion.Name = "Orion" Orion.Parent = PARENT Orion.ZIndexBehavior = Enum.ZIndexBehavior.Sibling Orion.ResetOnSpawn = false for _, Interface in ipairs(PARENT:GetChildren()) do if Interface.Name == Orion.Name and Interface ~= Orion then Interface:Destroy() end end function OrionLib:IsRunning() return Orion.Parent == PARENT end local function AddConnection(Signal, Function) if (not OrionLib:IsRunning()) then return end local SignalConnect = Signal:Connect(Function) table.insert(OrionLib.Connections, SignalConnect) return SignalConnect end task.spawn(function() while (OrionLib:IsRunning()) do wait() end for _, Connection in next, OrionLib.Connections do Connection:Disconnect() end end) local function MakeDraggable(DragPoint, Main) local Dragging, DragInput, MousePos, FramePos = false AddConnection(DragPoint.InputBegan, function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then Dragging = true MousePos = Input.Position FramePos = Main.Position Input.Changed:Connect(function() if Input.UserInputState == Enum.UserInputState.End then Dragging = false end end) end end) AddConnection(DragPoint.InputChanged, function(Input) if Input.UserInputType == Enum.UserInputType.MouseMovement or Input.UserInputType == Enum.UserInputType.Touch then DragInput = Input end end) AddConnection(UserInputService.InputChanged, function(Input) if Input == DragInput and Dragging then local Delta = Input.Position - MousePos TweenService:Create(Main, TweenInfo.new(0.08, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Position = UDim2.new(FramePos.X.Scale, FramePos.X.Offset + Delta.X, FramePos.Y.Scale, FramePos.Y.Offset + Delta.Y) }):Play() end end) end local function Create(Name, Properties, Children) local Object = Instance.new(Name) for i, v in next, Properties or {} do Object[i] = v end for i, v in next, Children or {} do v.Parent = Object end return Object end local function CreateElement(ElementName, ElementFunction) OrionLib.Elements[ElementName] = function(...) return ElementFunction(...) end end local function AddItemTable(Table, Item, Value) local Item = tostring(Item) local Count = 1 while Table[Item] do Count = Count + 1 Item = string.format('%s-%d', Item, Count) end Table[Item] = Value end local function MakeElement(ElementName, ...) return OrionLib.Elements[ElementName](...) end local function SetProps(Element, Props) table.foreach(Props, function(Property, Value) Element[Property] = Value end) return Element end local function SetChildren(Element, Children) table.foreach(Children, function(_, Child) Child.Parent = Element end) return Element end local function Round(Number, Factor) local Result = math.floor(Number/Factor + (math.sign(Number) * 0.5)) * Factor if Result < 0 then Result = Result + Factor end return Result end local function ReturnProperty(Object) if Object:IsA("Frame") or Object:IsA("TextButton") then return "BackgroundColor3" end if Object:IsA("ScrollingFrame") then return "ScrollBarImageColor3" end if Object:IsA("UIStroke") then return "Color" end if Object:IsA("TextLabel") or Object:IsA("TextBox") then return "TextColor3" end if Object:IsA("ImageLabel") or Object:IsA("ImageButton") then return "ImageColor3" end end local function AddThemeObject(Object, Type) if not OrionLib.ThemeObjects[Type] then OrionLib.ThemeObjects[Type] = {} end table.insert(OrionLib.ThemeObjects[Type], Object) Object[ReturnProperty(Object)] = OrionLib.Themes[OrionLib.SelectedTheme][Type] return Object end local function SetTheme() for Name, Type in pairs(OrionLib.ThemeObjects) do for _, Object in pairs(Type) do Object[ReturnProperty(Object)] = OrionLib.Themes[OrionLib.SelectedTheme][Name] end end end local function PackColor(Color) return {R = Color.R * 255, G = Color.G * 255, B = Color.B * 255} end local function UnpackColor(Color) return Color3.fromRGB(Color.R, Color.G, Color.B) end local function LoadCfg(Config) local Data = HttpService:JSONDecode(Config) table.foreach(Data, function(a,b) if OrionLib.Flags[a] then spawn(function() if OrionLib.Flags[a].Type == "Colorpicker" then OrionLib.Flags[a]:Set(UnpackColor(b)) else OrionLib.Flags[a]:Set(b) end end) else warn("Orion Library Config Loader - Could not find ", a ,b) end end) end local function SaveCfg(Name) local Data = {} for i,v in pairs(OrionLib.Flags) do if v.Save then if v.Type == "Colorpicker" then Data[i] = PackColor(v.Value) else Data[i] = v.Value end end end if writefile then writefile(OrionLib.Folder .. "/" .. Name .. ".txt", tostring(HttpService:JSONEncode(Data))) end end local WhitelistedMouse = {Enum.UserInputType.MouseButton1, Enum.UserInputType.MouseButton2,Enum.UserInputType.MouseButton3} local BlacklistedKeys = {Enum.KeyCode.Unknown,Enum.KeyCode.W,Enum.KeyCode.A,Enum.KeyCode.S,Enum.KeyCode.D,Enum.KeyCode.Up,Enum.KeyCode.Left,Enum.KeyCode.Down,Enum.KeyCode.Right,Enum.KeyCode.Slash,Enum.KeyCode.Tab,Enum.KeyCode.Backspace,Enum.KeyCode.Escape} local function CheckKey(Table, Key) for _, v in next, Table do if v == Key then return true end end end -- Element Creators CreateElement("Corner", function(Scale, Offset) return Create("UICorner", { CornerRadius = UDim.new(Scale or 0, Offset or 8) }) end) CreateElement("Stroke", function(Color, Thickness, Transparency) return Create("UIStroke", { Color = Color or Color3.fromRGB(255, 255, 255), Thickness = Thickness or 1, Transparency = Transparency or 0 }) end) CreateElement("List", function(Scale, Offset) return Create("UIListLayout", { SortOrder = Enum.SortOrder.LayoutOrder, Padding = UDim.new(Scale or 0, Offset or 6) }) end) CreateElement("Padding", function(Bottom, Left, Right, Top) return Create("UIPadding", { PaddingBottom = UDim.new(0, Bottom or 4), PaddingLeft = UDim.new(0, Left or 4), PaddingRight = UDim.new(0, Right or 4), PaddingTop = UDim.new(0, Top or 4) }) end) CreateElement("TFrame", function() return Create("Frame", { BackgroundTransparency = 1 }) end) CreateElement("Frame", function(Color) return Create("Frame", { BackgroundColor3 = Color or Color3.fromRGB(255, 255, 255), BorderSizePixel = 0 }) end) CreateElement("RoundFrame", function(Color, Scale, Offset) return Create("Frame", { BackgroundColor3 = Color or Color3.fromRGB(255, 255, 255), BorderSizePixel = 0 }, { Create("UICorner", { CornerRadius = UDim.new(Scale or 0, Offset or 8) }) }) end) CreateElement("Button", function() return Create("TextButton", { Text = "", AutoButtonColor = false, BackgroundTransparency = 1, BorderSizePixel = 0 }) end) CreateElement("ScrollFrame", function(Color, Width) return Create("ScrollingFrame", { BackgroundTransparency = 1, MidImage = "rbxassetid://7445543667", BottomImage = "rbxassetid://7445543667", TopImage = "rbxassetid://7445543667", ScrollBarImageColor3 = Color, BorderSizePixel = 0, ScrollBarThickness = Width, CanvasSize = UDim2.new(0, 0, 0, 0), AutomaticCanvasSize = Enum.AutomaticSize.Y, ScrollingDirection = Enum.ScrollingDirection.Y }) end) CreateElement("Image", function(ImageID) local ImageNew = Create("ImageLabel", { Image = ImageID, BackgroundTransparency = 1 }) if GetIcon(ImageID) ~= nil then ImageNew.Image = GetIcon(ImageID) end return ImageNew end) CreateElement("ImageButton", function(ImageID) return Create("ImageButton", { Image = ImageID, BackgroundTransparency = 1 }) end) CreateElement("Label", function(Text, TextSize, Transparency) return Create("TextLabel", { Text = Text or "", TextColor3 = Color3.fromRGB(240, 240, 240), TextTransparency = Transparency or 0, TextSize = TextSize or 15, Font = Enum.Font.GothamMedium, RichText = true, BackgroundTransparency = 1, TextXAlignment = Enum.TextXAlignment.Left }) end) local NotificationHolder = SetProps(SetChildren(MakeElement("TFrame"), { SetProps(MakeElement("List"), { HorizontalAlignment = Enum.HorizontalAlignment.Center, SortOrder = Enum.SortOrder.LayoutOrder, VerticalAlignment = Enum.VerticalAlignment.Bottom, Padding = UDim.new(0, 10) }) }), { Position = UDim2.new(1, -25, 1, -25), Size = UDim2.new(0, 300, 1, -25), AnchorPoint = Vector2.new(1, 1), Parent = Orion }) function OrionLib:MakeNotification(NotificationConfig) spawn(function() NotificationConfig.Name = NotificationConfig.Name or "Notification" NotificationConfig.Content = NotificationConfig.Content or "Test" NotificationConfig.Image = NotificationConfig.Image or "rbxassetid://103928780885515" NotificationConfig.Time = NotificationConfig.Time or 15 local NotificationParent = SetProps(MakeElement("TFrame"), { Size = UDim2.new(1, 0, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, Parent = NotificationHolder }) local NotificationFrame = SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(25, 25, 25), 0, 10), { Parent = NotificationParent, Size = UDim2.new(1, 0, 0, 0), Position = UDim2.new(1, 50, 0, 0), BackgroundTransparency = 0.1, AutomaticSize = Enum.AutomaticSize.Y }), { MakeElement("Stroke", Color3.fromRGB(60, 60, 60), 1, 0.5), MakeElement("Padding", 12, 12, 12, 12), SetProps(MakeElement("Image", NotificationConfig.Image), { Size = UDim2.new(0, 24, 0, 24), ImageColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Accent, Name = "Icon" }), SetProps(MakeElement("Label", NotificationConfig.Name, 16), { Size = UDim2.new(1, -34, 0, 24), Position = UDim2.new(0, 34, 0, 0), Font = Enum.Font.GothamBold, Name = "Title", TextColor3 = Color3.fromRGB(255, 255, 255) }), SetProps(MakeElement("Label", NotificationConfig.Content, 14), { Size = UDim2.new(1, 0, 0, 0), Position = UDim2.new(0, 0, 0, 30), Font = Enum.Font.Gotham, Name = "Content", RichText = true, AutomaticSize = Enum.AutomaticSize.Y, TextColor3 = Color3.fromRGB(200, 200, 200), TextWrapped = true }) }) TweenService:Create(NotificationFrame, TweenInfo.new(0.6, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Position = UDim2.new(0, 0, 0, 0)}):Play() wait(NotificationConfig.Time - 0.8) TweenService:Create(NotificationFrame, TweenInfo.new(0.5, Enum.EasingStyle.Back, Enum.EasingDirection.In), {Position = UDim2.new(1, 50, 0, 0)}):Play() TweenService:Create(NotificationFrame, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundTransparency = 1}):Play() TweenService:Create(NotificationFrame.UIStroke, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Transparency = 1}):Play() TweenService:Create(NotificationFrame.Title, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextTransparency = 1}):Play() TweenService:Create(NotificationFrame.Content, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextTransparency = 1}):Play() TweenService:Create(NotificationFrame.Icon, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageTransparency = 1}):Play() wait(0.5) NotificationFrame:Destroy() end) end function OrionLib:Init() if OrionLib.SaveCfg and (isfile and readfile) then pcall(function() if isfile(OrionLib.Folder .. "/" .. game.GameId .. ".txt") then LoadCfg(readfile(OrionLib.Folder .. "/" .. game.GameId .. ".txt")) OrionLib:MakeNotification({ Name = "Configuration", Content = "Configuração carregada automaticamente.", Time = 5 }) end end) end end function OrionLib:MakeWindow(WindowConfig) local FirstTab = true local Minimized = false local UIHidden = false WindowConfig = WindowConfig or {} WindowConfig.Name = WindowConfig.Name or "ScriptCentral Universal" WindowConfig.ConfigFolder = WindowConfig.ConfigFolder or WindowConfig.Name WindowConfig.SaveConfig = WindowConfig.SaveConfig or false WindowConfig.HidePremium = WindowConfig.HidePremium or false if WindowConfig.IntroEnabled == nil then WindowConfig.IntroEnabled = true end WindowConfig.IntroText = WindowConfig.IntroText or "ScriptCentral Universal" WindowConfig.CloseCallback = WindowConfig.CloseCallback or function() end WindowConfig.ShowIcon = WindowConfig.ShowIcon or false WindowConfig.Icon = WindowConfig.Icon or "rbxassetid://103928780885515" WindowConfig.IntroIcon = WindowConfig.IntroIcon or "rbxassetid://103928780885515" WindowConfig.SearchBar = WindowConfig.SearchBar or nil OrionLib.Folder = WindowConfig.ConfigFolder OrionLib.SaveCfg = WindowConfig.SaveConfig if WindowConfig.SaveConfig then if (isfolder and makefolder) and not isfolder(WindowConfig.ConfigFolder) then makefolder(WindowConfig.ConfigFolder) end end local TabHolder = AddThemeObject(SetChildren(SetProps(MakeElement("ScrollFrame", Color3.fromRGB(255, 255, 255), 4), WindowConfig.SearchBar and { Size = UDim2.new(1, 0, 1, -90), Position = UDim2.new(0, 0, 0, 40) } or { Size = UDim2.new(1, 0, 1, -50) }), { MakeElement("List"), MakeElement("Padding", 8, 0, 0, 8) }), "Divider") local CloseBtn = SetChildren(SetProps(MakeElement("Button"), { Size = UDim2.new(0.5, 0, 1, 0), Position = UDim2.new(0.5, 0, 0, 0), BackgroundTransparency = 1 }), { AddThemeObject(SetProps(MakeElement("Image", "rbxassetid://7072725342"), { Position = UDim2.new(0, 9, 0, 6), Size = UDim2.new(0, 18, 0, 18) }), "Text") }) local MinimizeBtn = SetChildren(SetProps(MakeElement("Button"), { Size = UDim2.new(0.5, 0, 1, 0), BackgroundTransparency = 1 }), { AddThemeObject(SetProps(MakeElement("Image", "rbxassetid://7072719338"), { Position = UDim2.new(0, 9, 0, 6), Size = UDim2.new(0, 18, 0, 18), Name = "Ico" }), "Text") }) local DragPoint = SetProps(MakeElement("TFrame"), { Size = UDim2.new(1, 0, 0, 50) }) local WindowStuff = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 12), { Size = UDim2.new(0, 170, 1, -50), Position = UDim2.new(0, 0, 0, 50) }), { AddThemeObject(SetProps(MakeElement("Frame"), { Size = UDim2.new(1, 0, 0, 1), Position = UDim2.new(0, 0, 0, 0) }), "Second"), AddThemeObject(SetProps(MakeElement("Frame"), { Size = UDim2.new(0, 1, 1, 0), Position = UDim2.new(1, -1, 0, 0) }), "Divider"), TabHolder, SetChildren(SetProps(MakeElement("TFrame"), { Size = UDim2.new(1, 0, 0, 50), Position = UDim2.new(0, 0, 1, -50) }), { AddThemeObject(SetProps(MakeElement("Frame"), { Size = UDim2.new(1, 0, 0, 1) }), "Divider"), SetChildren(SetProps(MakeElement("TFrame"), { AnchorPoint = Vector2.new(0, 0.5), Size = UDim2.new(0, 32, 0, 32), Position = UDim2.new(0, 12, 0.5, 0) }), { SetChildren(SetProps(MakeElement("Image", "rbxthumb://type=AvatarHeadShot&id=" .. LocalPlayer.UserId .. "&w=150&h=150"), { Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, BorderSizePixel = 0, ImageColor3 = Color3.fromRGB(255, 255, 255), ZIndex = 5 }), { MakeElement("Corner", 1) }) }), AddThemeObject(SetProps(MakeElement("Label", LocalPlayer.DisplayName, WindowConfig.HidePremium and 14 or 13), { Size = UDim2.new(1, -60, 0, 13), Position = WindowConfig.HidePremium and UDim2.new(0, 54, 0, 19) or UDim2.new(0, 54, 0, 12), Font = Enum.Font.GothamBold, ClipsDescendants = true }), "Text"), AddThemeObject(SetProps(MakeElement("Label", "", 12), { Size = UDim2.new(1, -60, 0, 12), Position = UDim2.new(0, 54, 1, -25), Visible = not WindowConfig.HidePremium }), "TextDark") }), }), "Second") local Tabs = {} if WindowConfig.SearchBar then local SearchBox = Create("TextBox", { Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, TextColor3 = Color3.fromRGB(255, 255, 255), PlaceholderColor3 = Color3.fromRGB(180,180,180), PlaceholderText = WindowConfig.SearchBar.Default or "🔍 Buscar...", Font = Enum.Font.GothamMedium, TextWrapped = true, Text = '', TextXAlignment = Enum.TextXAlignment.Left, TextSize = 14, ClearTextOnFocus = WindowConfig.SearchBar.ClearTextOnFocus or true }) local TextboxActual = AddThemeObject(SearchBox, "Text") local SearchBar = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 8), { Parent = WindowStuff, Size = UDim2.new(0, 150, 0, 30), Position = UDim2.new(0, 10, 0, 10), }), { AddThemeObject(MakeElement("Stroke"), "Stroke"), MakeElement("Padding", 0, 8, 0, 0), TextboxActual }), "Main") local function SearchHandle() local Text = string.lower(SearchBox.Text) for i,v in pairs(Tabs) do if v:IsA('TextButton') then if string.find(string.lower(i), Text) then v.Visible = true else v.Visible = false end end end end AddConnection(TextboxActual:GetPropertyChangedSignal("Text"), SearchHandle) end local WindowName = AddThemeObject(SetProps(MakeElement("Label", WindowConfig.Name, 14), { Size = UDim2.new(1, -30, 2, 0), Position = UDim2.new(0, 25, 0, -24), Font = Enum.Font.GothamBlack, TextSize = 20 }), "Text") local MainWindow = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 12), { Parent = Orion, Position = UDim2.new(0.5, 0, 0.5, 0), AnchorPoint = Vector2.new(0.5, 0.5), Size = UDim2.new(0, 0, 0, 0), ClipsDescendants = true, Visible = false }), { SetChildren(SetProps(MakeElement("TFrame"), { Size = UDim2.new(1, 0, 0, 50), Name = "TopBar" }), { WindowName, AddThemeObject(SetProps(MakeElement("Frame"), { Size = UDim2.new(1, 0, 0, 1), Position = UDim2.new(0, 0, 1, -1) }), "Divider"), AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 8), { Size = UDim2.new(0, 70, 0, 30), Position = UDim2.new(1, -90, 0, 10) }), { AddThemeObject(MakeElement("Stroke"), "Stroke"), AddThemeObject(SetProps(MakeElement("Frame"), { Size = UDim2.new(0, 1, 1, 0), Position = UDim2.new(0.5, 0, 0, 0) }), "Divider"), CloseBtn, MinimizeBtn }), "Second"), }), DragPoint, WindowStuff, AddThemeObject(SetProps(MakeElement("Stroke", Color3.new(0,0,0), 3, 0.7),{}),"Stroke") }), "Main") -- Inicio aqui nEssa -- ============================================================= -- SISTEMA DE ESCALA AUTOMÁTICA INTEGRADO (AJUSTE DE TAMANHO) -- ============================================================= local UIScale = Instance.new("UIScale") UIScale.Name = "OrionScale" UIScale.Parent = MainWindow local function UpdateScale() local Camera = workspace.CurrentCamera local ViewportSize = Camera.ViewportSize -- Verifica se a tela é pequena (Mobile/Tablet) if ViewportSize.X < 900 or ViewportSize.Y < 600 then -- MODO MOBILE / TELA PEQUENA (AUMENTADO A PEDIDO) if ViewportSize.Y < 500 then -- Antes era 0.30, agora 0.45 para ficar maior UIScale.Scale = 0.75 else -- Antes era 0.35, agora 0.50 UIScale.Scale = 0.85 end else -- MODO PC / TELA GRANDE if ViewportSize.Y < 900 then UIScale.Scale = 0.85 else UIScale.Scale = 1.0 end end end UpdateScale() -- Garante a aplicação da escala em múltiplos frames task.spawn(function() for i = 1, 5 do UpdateScale() task.wait(0.5) end end) game:GetService("Workspace").CurrentCamera:GetPropertyChangedSignal("ViewportSize"):Connect(UpdateScale) -- ============================================================= if not WindowConfig.IntroEnabled then --- FINAL MainWindow.Visible = true TweenService:Create(MainWindow, TweenInfo.new(0.6, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Size = UDim2.new(0, 650, 0, 380) }):Play() end if WindowConfig.ShowIcon then WindowName.Position = UDim2.new(0, 50, 0, -24) local WindowIcon = SetProps(MakeElement("Image", WindowConfig.Icon), { Size = UDim2.new(0, 20, 0, 20), Position = UDim2.new(0, 25, 0, 15) }) WindowIcon.Parent = MainWindow.TopBar end MakeDraggable(DragPoint, MainWindow) local _currentKey = Enum.KeyCode.RightShift local OpenButton = SetChildren(SetProps(MakeElement("ImageButton", "http://www.roblox.com/asset/?id=103928780885515"), { Position = UDim2.new(0.01, 0, 0.5, 0), Size = UDim2.new(0, 45, 0, 45), Parent = Orion, Visible = false, BackgroundTransparency = 0.2, BackgroundColor3 = Color3.fromRGB(20, 20, 20) }), { MakeElement("Corner", 0, 12), MakeElement("Stroke", Color3.fromRGB(60,60,60), 1) }) local function MakeHubInteractable(Main) local Dragging, DragInput, MousePos, FramePos = false, nil, nil, nil local DragStart = Vector2.new() AddConnection(Main.InputBegan, function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then Dragging = true MousePos = Input.Position FramePos = Main.Position DragStart = Input.Position local Connection Connection = Input.Changed:Connect(function() if Input.UserInputState == Enum.UserInputState.End then Dragging = false Connection:Disconnect() if (Input.Position - DragStart).Magnitude < 5 then MainWindow.Visible = true Main.Visible = false Minimized = false WindowStuff.Visible = true MainWindow.ClipsDescendants = false MinimizeBtn.Ico.Image = "rbxassetid://7072719338" MainWindow.Size = UDim2.new(0,0,0,0) TweenService:Create(MainWindow, TweenInfo.new(0.5, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Size = UDim2.new(0, 650, 0, 380)}):Play() end end end) end end) AddConnection(Main.InputChanged, function(Input) if Input.UserInputType == Enum.UserInputType.MouseMovement or Input.UserInputType == Enum.UserInputType.Touch then DragInput = Input end end) AddConnection(UserInputService.InputChanged, function(Input) if Input == DragInput and Dragging then local Delta = Input.Position - MousePos TweenService:Create(Main, TweenInfo.new(0.05, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Position = UDim2.new(FramePos.X.Scale, FramePos.X.Offset + Delta.X, FramePos.Y.Scale, FramePos.Y.Offset + Delta.Y) }):Play() end end) end MakeHubInteractable(OpenButton) AddConnection(CloseBtn.MouseButton1Up, function() TweenService:Create(MainWindow, TweenInfo.new(0.4, Enum.EasingStyle.Back, Enum.EasingDirection.In), {Size = UDim2.new(0, 0, 0, 0)}):Play() wait(0.4) MainWindow.Visible = false UIHidden = true OpenButton.Visible = true WindowConfig.CloseCallback() end) AddConnection(UserInputService.InputBegan, function(Input) if Input.KeyCode == _currentKey then if MainWindow.Visible then TweenService:Create(MainWindow, TweenInfo.new(0.4, Enum.EasingStyle.Back, Enum.EasingDirection.In), {Size = UDim2.new(0, 0, 0, 0)}):Play() wait(0.4) MainWindow.Visible = false OpenButton.Visible = true else OpenButton.Visible = false MainWindow.Visible = true Minimized = false WindowStuff.Visible = true MinimizeBtn.Ico.Image = "rbxassetid://7072719338" TweenService:Create(MainWindow, TweenInfo.new(0.5, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Size = UDim2.new(0, 650, 0, 380)}):Play() end end end) AddConnection(MinimizeBtn.MouseButton1Up, function() if Minimized then TweenService:Create(MainWindow, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Size = UDim2.new(0, 650, 0, 380)}):Play() MinimizeBtn.Ico.Image = "rbxassetid://7072719338" wait(.02) MainWindow.ClipsDescendants = false WindowStuff.Visible = true else MainWindow.ClipsDescendants = true MinimizeBtn.Ico.Image = "rbxassetid://7072720870" TweenService:Create(MainWindow, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Size = UDim2.new(0, WindowName.TextBounds.X + 140, 0, 50)}):Play() wait(0.1) WindowStuff.Visible = false end Minimized = not Minimized end) local function LoadSequence() local IntroCard = SetChildren(Create("Frame", { Size = UDim2.new(0, 0, 0, 0), Position = UDim2.new(0.5, 0, 0.5, 0), AnchorPoint = Vector2.new(0.5, 0.5), Parent = Orion, BackgroundColor3 = Color3.fromRGB(25, 25, 25), BorderSizePixel = 0, ZIndex = 999 }), { MakeElement("Corner", 0, 16), MakeElement("Stroke", Color3.fromRGB(60,60,60), 1), SetProps(MakeElement("Image", "rbxassetid://6015897843"), { Size = UDim2.new(1, 40, 1, 40), Position = UDim2.new(0.5,0,0.5,0), AnchorPoint = Vector2.new(0.5,0.5), BackgroundTransparency = 1, ImageColor3 = Color3.new(0,0,0), ImageTransparency = 0.5, ZIndex = 998, ScaleType = Enum.ScaleType.Slice, SliceCenter = Rect.new(49, 49, 450, 450) }) }) local LoadSequenceLogo = SetProps(MakeElement("Image", WindowConfig.IntroIcon), { Parent = IntroCard, AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0.5, 0, 0.4, 0), Size = UDim2.new(0, 40, 0, 40), ImageColor3 = Color3.fromRGB(255, 255, 255), ImageTransparency = 1 }) local LoadSequenceText = SetProps(MakeElement("Label", WindowConfig.IntroText, 16), { Parent = IntroCard, Size = UDim2.new(1, 0, 0, 20), AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0.5, 0, 0.7, 0), TextXAlignment = Enum.TextXAlignment.Center, Font = Enum.Font.GothamBold, TextTransparency = 1 }) TweenService:Create(IntroCard, TweenInfo.new(0.5, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Size = UDim2.new(0, 220, 0, 100)}):Play() wait(0.3) TweenService:Create(LoadSequenceLogo, TweenInfo.new(0.5, Enum.EasingStyle.Quad), {ImageTransparency = 0, Position = UDim2.new(0.5, 0, 0.35, 0)}):Play() TweenService:Create(LoadSequenceText, TweenInfo.new(0.5, Enum.EasingStyle.Quad), {TextTransparency = 0, Position = UDim2.new(0.5, 0, 0.7, 0)}):Play() wait(1.5) TweenService:Create(LoadSequenceLogo, TweenInfo.new(0.4, Enum.EasingStyle.Quad), {ImageTransparency = 1}):Play() TweenService:Create(LoadSequenceText, TweenInfo.new(0.4, Enum.EasingStyle.Quad), {TextTransparency = 1}):Play() wait(0.2) TweenService:Create(IntroCard, TweenInfo.new(0.4, Enum.EasingStyle.Back, Enum.EasingDirection.In), {Size = UDim2.new(0, 0, 0, 0)}):Play() wait(0.4) IntroCard:Destroy() MainWindow.Visible = true TweenService:Create(MainWindow, TweenInfo.new(0.6, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Size = UDim2.new(0, 650, 0, 380) }):Play() end if WindowConfig.IntroEnabled then LoadSequence() end local Functions = {} function Functions:MakeTab(TabConfig) TabConfig = TabConfig or {} TabConfig.Name = TabConfig.Name or "Tab" TabConfig.Icon = TabConfig.Icon or "" local TabFrame = SetChildren(SetProps(MakeElement("Button"), { Size = UDim2.new(1, -12, 0, 36), Parent = TabHolder }), { MakeElement("Corner", 0, 6), AddThemeObject(SetProps(MakeElement("Image", TabConfig.Icon), { AnchorPoint = Vector2.new(0, 0.5), Size = UDim2.new(0, 20, 0, 20), Position = UDim2.new(0, 10, 0.5, 0), ImageTransparency = 0.5, Name = "Ico" }), "Text"), AddThemeObject(SetProps(MakeElement("Label", TabConfig.Name, 15), { Size = UDim2.new(1, -35, 1, 0), Position = UDim2.new(0, 40, 0, 0), Font = Enum.Font.GothamMedium, TextTransparency = 0.5, Name = "Title" }), "Text") }) AddItemTable(Tabs, TabConfig.Name, TabFrame) if GetIcon(TabConfig.Icon) ~= nil then TabFrame.Ico.Image = GetIcon(TabConfig.Icon) end local Container = AddThemeObject(SetChildren(SetProps(MakeElement("ScrollFrame", Color3.fromRGB(255, 255, 255), 5), { Size = UDim2.new(1, -170, 1, -50), Position = UDim2.new(0, 170, 0, 50), Parent = MainWindow, Visible = false, Name = "ItemContainer", BackgroundTransparency = 1 }), { MakeElement("List", 0, 8), MakeElement("Padding", 15, 15, 15, 15) }), "Divider") if FirstTab then FirstTab = false TabFrame.BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Second TabFrame.BackgroundTransparency = 0 TabFrame.Ico.ImageTransparency = 0 TabFrame.Title.TextTransparency = 0 TabFrame.Title.Font = Enum.Font.GothamBold Container.Visible = true end AddConnection(TabFrame.MouseButton1Click, function() for _, Tab in next, TabHolder:GetChildren() do if Tab:IsA("TextButton") then TweenService:Create(Tab, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundTransparency = 1}):Play() TweenService:Create(Tab.Ico, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageTransparency = 0.5}):Play() TweenService:Create(Tab.Title, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextTransparency = 0.5}):Play() Tab.Title.Font = Enum.Font.GothamMedium end end for _, ItemContainer in next, MainWindow:GetChildren() do if ItemContainer.Name == "ItemContainer" then ItemContainer.Visible = false end end TweenService:Create(TabFrame, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Second, BackgroundTransparency = 0}):Play() TweenService:Create(TabFrame.Ico, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageTransparency = 0}):Play() TweenService:Create(TabFrame.Title, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextTransparency = 0}):Play() TabFrame.Title.Font = Enum.Font.GothamBold Container.Visible = true Container.CanvasPosition = Vector2.new(0,0) Container.Position = UDim2.new(0, 170, 0, 60) TweenService:Create(Container, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Position = UDim2.new(0, 170, 0, 50)}):Play() end) local function GetElements(ItemParent) local ElementFunction = {} function ElementFunction:AddLog(Text) local Label = MakeElement("Label", Text, 15) local LogFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 8), { Size = UDim2.new(1, 0, 0, 0), BackgroundTransparency = 0.95, Parent = ItemParent }), { AddThemeObject(SetProps(Label, { Size = UDim2.new(1, -20, 1, 0), Position = UDim2.new(0, 10, 0, 0), TextXAlignment = Enum.TextXAlignment.Left, TextSize = 14, TextWrapped = true, Font = Enum.Font.Code, Name = "Content" }), "Text"), AddThemeObject(MakeElement("Stroke", nil, 1, 0.8), "Stroke") }), "Second") Label.AutomaticSize = Enum.AutomaticSize.Y LogFrame.AutomaticSize = Enum.AutomaticSize.Y local LogFunction = {} function LogFunction:Set(ToChange) LogFrame.Content.Text = ToChange end return LogFunction end function ElementFunction:AddLabel(Text) local LabelFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 6), { Size = UDim2.new(1, 0, 0, 26), BackgroundTransparency = 1, Parent = ItemParent }), { AddThemeObject(SetProps(MakeElement("Label", Text, 15), { Size = UDim2.new(1, -10, 1, 0), Position = UDim2.new(0, 5, 0, 0), Font = Enum.Font.GothamBold, Name = "Content" }), "Text") }), "Second") local LabelFunction = {} function LabelFunction:Set(ToChange) LabelFrame.Content.Text = ToChange end return LabelFunction end function ElementFunction:AddParagraph(Text, Content) local ParagraphFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 8), { Size = UDim2.new(1, 0, 0, 0), BackgroundTransparency = 0, Parent = ItemParent }), { AddThemeObject(SetProps(MakeElement("Label", Text, 15), { Size = UDim2.new(1, -24, 0, 16), Position = UDim2.new(0, 12, 0, 12), Font = Enum.Font.GothamBold, Name = "Title" }), "Text"), AddThemeObject(SetProps(MakeElement("Label", Content, 13), { Size = UDim2.new(1, -24, 0, 0), Position = UDim2.new(0, 12, 0, 32), Font = Enum.Font.Gotham, Name = "Content", TextWrapped = true, AutomaticSize = Enum.AutomaticSize.Y }), "TextDark"), AddThemeObject(MakeElement("Stroke"), "Stroke") }), "Second") ParagraphFrame.AutomaticSize = Enum.AutomaticSize.Y SetChildren(ParagraphFrame, {MakeElement("Padding", 12, 0, 0, 0)}) local ParagraphFunction = {} function ParagraphFunction:Set(ToChange) ParagraphFrame.Content.Text = ToChange end return ParagraphFunction end function ElementFunction:AddButton(ButtonConfig) ButtonConfig = ButtonConfig or {} ButtonConfig.Name = ButtonConfig.Name or "Button" ButtonConfig.Callback = ButtonConfig.Callback or function() end ButtonConfig.Icon = ButtonConfig.Icon or "rbxassetid://3944703587" ButtonConfig.OriginalName = ButtonConfig.OriginalName or tostring(ButtonConfig.Name or "") local Splitted = string.split(ButtonConfig.Name, " / ") local Script = Splitted and Splitted[2] if Script then ButtonConfig.Name = Script ButtonConfig.CanFavorite = true end local Button = {} local Click = SetProps(MakeElement("Button"), { Size = UDim2.new(1, 0, 1, 0) }) local FavoriteButton = ButtonConfig.CanFavorite and SetProps(MakeElement("ImageButton", "http://www.roblox.com/asset/?id=109586771228631"), { Size = UDim2.new(0, 20, 0, 20), Position = UDim2.new(1, -55, 0, 8), ZIndex = 25, Name = "Favorite", BackgroundTransparency = 1 }) local ButtonFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 8), { Size = UDim2.new(1, 0, 0, 36), Parent = ItemParent }), { AddThemeObject(SetProps(MakeElement("Label", ButtonConfig.Name, 14), { Size = UDim2.new(1, -40, 1, 0), Position = UDim2.new(0, 12, 0, 0), Font = Enum.Font.GothamBold, Name = "Content" }), "Text"), AddThemeObject(SetProps(MakeElement("Image", ButtonConfig.Icon), { Size = UDim2.new(0, 20, 0, 20), Position = UDim2.new(1, -30, 0, 8), }), "TextDark"), ButtonConfig.CanFavorite and AddThemeObject(FavoriteButton, "TextDark") or nil, AddThemeObject(MakeElement("Stroke"), "Stroke"), Click }), "Second") if FavoriteButton then AddConnection(FavoriteButton.MouseButton1Down, function() OrionLib.FavoriteEvent:Fire(ButtonConfig.OriginalName) end) end AddConnection(Click.MouseEnter, function() TweenService:Create(ButtonFrame, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Hover }):Play() TweenService:Create(ButtonFrame.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Color = OrionLib.Themes[OrionLib.SelectedTheme].Accent }):Play() end) AddConnection(Click.MouseLeave, function() TweenService:Create(ButtonFrame, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Second }):Play() TweenService:Create(ButtonFrame.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Color = OrionLib.Themes[OrionLib.SelectedTheme].Stroke }):Play() end) AddConnection(Click.MouseButton1Down, function() TweenService:Create(ButtonFrame, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Size = UDim2.new(1, -4, 0, 32), }):Play() end) AddConnection(Click.MouseButton1Up, function() TweenService:Create(ButtonFrame, TweenInfo.new(0.2, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), { Size = UDim2.new(1, 0, 0, 36) }):Play() spawn(function() ButtonConfig.Callback() end) end) function Button:Set(ButtonText) ButtonFrame.Content.Text = ButtonText end -- [FIX CRÍTICO] Expondo o Instance para permitir que ele seja destruído pelo Hub Button.Instance = ButtonFrame return Button end function ElementFunction:AddToggle(ToggleConfig) ToggleConfig = ToggleConfig or {} ToggleConfig.Name = ToggleConfig.Name or "Toggle" ToggleConfig.Default = ToggleConfig.Default or false ToggleConfig.Callback = ToggleConfig.Callback or function() end ToggleConfig.Flag = ToggleConfig.Flag or nil ToggleConfig.Save = ToggleConfig.Save or false local Toggle = {Value = ToggleConfig.Default, Save = ToggleConfig.Save} local Click = SetProps(MakeElement("Button"), { Size = UDim2.new(1, 0, 1, 0) }) local ToggleTrack = SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(50, 50, 50), 1, 0), { Size = UDim2.new(0, 42, 0, 22), Position = UDim2.new(1, -54, 0.5, 0), AnchorPoint = Vector2.new(0, 0.5) }), { SetProps(MakeElement("Stroke"), { Color = Color3.fromRGB(80,80,80), Thickness = 1 }), }) local ToggleDot = SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 1, 0), { Size = UDim2.new(0, 16, 0, 16), Position = UDim2.new(0, 3, 0.5, 0), AnchorPoint = Vector2.new(0, 0.5) }), {}) ToggleDot.Parent = ToggleTrack local ToggleFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 8), { Size = UDim2.new(1, 0, 0, 40), Parent = ItemParent }), { AddThemeObject(SetProps(MakeElement("Label", ToggleConfig.Name, 14), { Size = UDim2.new(1, -60, 1, 0), Position = UDim2.new(0, 12, 0, 0), Font = Enum.Font.GothamBold, Name = "Content" }), "Text"), AddThemeObject(MakeElement("Stroke"), "Stroke"), ToggleTrack, Click }), "Second") function Toggle:Set(Value) Toggle.Value = Value if Toggle.Value then TweenService:Create(ToggleTrack, TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), { BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Accent }):Play() TweenService:Create(ToggleTrack.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), { Color = OrionLib.Themes[OrionLib.SelectedTheme].Accent }):Play() TweenService:Create(ToggleDot, TweenInfo.new(0.3, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Position = UDim2.new(1, -19, 0.5, 0) }):Play() else TweenService:Create(ToggleTrack, TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), { BackgroundColor3 = Color3.fromRGB(50,50,50) }):Play() TweenService:Create(ToggleTrack.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), { Color = OrionLib.Themes[OrionLib.SelectedTheme].Stroke }):Play() TweenService:Create(ToggleDot, TweenInfo.new(0.3, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Position = UDim2.new(0, 3, 0.5, 0) }):Play() end ToggleConfig.Callback(Toggle.Value) end Toggle:Set(Toggle.Value) AddConnection(Click.MouseButton1Up, function() Toggle:Set(not Toggle.Value) SaveCfg(game.GameId) end) AddConnection(Click.MouseEnter, function() TweenService:Create(ToggleFrame, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Hover}):Play() end) AddConnection(Click.MouseLeave, function() TweenService:Create(ToggleFrame, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Second}):Play() end) if ToggleConfig.Flag then OrionLib.Flags[ToggleConfig.Flag] = Toggle end return Toggle end function ElementFunction:AddSlider(SliderConfig) SliderConfig = SliderConfig or {} SliderConfig.Name = SliderConfig.Name or "Slider" SliderConfig.Min = SliderConfig.Min or 0 SliderConfig.Max = SliderConfig.Max or 100 SliderConfig.Increment = SliderConfig.Increment or 1 SliderConfig.Default = SliderConfig.Default or 50 SliderConfig.Callback = SliderConfig.Callback or function() end SliderConfig.ValueName = SliderConfig.ValueName or "" SliderConfig.Flag = SliderConfig.Flag or nil SliderConfig.Save = SliderConfig.Save or false local Slider = {Value = SliderConfig.Default, Save = SliderConfig.Save} local Dragging = false local SliderBar = SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(40,40,40), 1, 0), { Size = UDim2.new(1, -24, 0, 6), Position = UDim2.new(0, 12, 0, 35), AnchorPoint = Vector2.new(0,0), ClipsDescendants = false }), {}) local SliderFill = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 1, 0), { Size = UDim2.new(0, 0, 1, 0), }), {}), "Accent") local SliderKnob = SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255,255,255), 1, 0), { Size = UDim2.new(0, 14, 0, 14), Position = UDim2.new(1, 0, 0.5, 0), AnchorPoint = Vector2.new(0.5, 0.5) }), { SetProps(MakeElement("Image", "rbxassetid://6015897843"), { Size = UDim2.new(1, 8, 1, 8), Position = UDim2.new(0.5,0,0.5,0), AnchorPoint = Vector2.new(0.5,0.5), BackgroundTransparency = 1, ImageColor3 = Color3.fromRGB(0,0,0), ImageTransparency = 0.6, ZIndex = 0 }) }) SliderKnob.Parent = SliderFill SliderFill.Parent = SliderBar local SliderFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 8), { Size = UDim2.new(1, 0, 0, 55), Parent = ItemParent }), { AddThemeObject(SetProps(MakeElement("Label", SliderConfig.Name, 14), { Size = UDim2.new(1, -12, 0, 20), Position = UDim2.new(0, 12, 0, 8), Font = Enum.Font.GothamBold, Name = "Content" }), "Text"), AddThemeObject(SetProps(MakeElement("Label", "0", 13), { Size = UDim2.new(0, 50, 0, 20), Position = UDim2.new(1, -12, 0, 8), AnchorPoint = Vector2.new(1, 0), Font = Enum.Font.Gotham, TextXAlignment = Enum.TextXAlignment.Right, Name = "ValueLabel" }), "Text"), AddThemeObject(MakeElement("Stroke"), "Stroke"), SliderBar }), "Second") local function UpdateSlider(Input) local SizeScale = math.clamp((Input.Position.X - SliderBar.AbsolutePosition.X) / SliderBar.AbsoluteSize.X, 0, 1) Slider:Set(SliderConfig.Min + ((SliderConfig.Max - SliderConfig.Min) * SizeScale)) end SliderBar.InputBegan:Connect(function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 then Dragging = true UpdateSlider(Input) TweenService:Create(SliderKnob, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Size = UDim2.new(0, 18, 0, 18)}):Play() end end) SliderBar.InputEnded:Connect(function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 then Dragging = false TweenService:Create(SliderKnob, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Size = UDim2.new(0, 14, 0, 14)}):Play() SaveCfg(game.GameId) end end) UserInputService.InputChanged:Connect(function(Input) if Dragging and Input.UserInputType == Enum.UserInputType.MouseMovement then UpdateSlider(Input) end end) function Slider:Set(Value) self.Value = math.clamp(Round(Value, SliderConfig.Increment), SliderConfig.Min, SliderConfig.Max) local Percent = (self.Value - SliderConfig.Min) / (SliderConfig.Max - SliderConfig.Min) TweenService:Create(SliderFill, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Size = UDim2.fromScale(Percent, 1)}):Play() SliderFrame.ValueLabel.Text = tostring(self.Value) .. " " .. SliderConfig.ValueName SliderConfig.Callback(self.Value) end Slider:Set(Slider.Value) if SliderConfig.Flag then OrionLib.Flags[SliderConfig.Flag] = Slider end return Slider end function ElementFunction:AddDropdown(DropdownConfig) DropdownConfig = DropdownConfig or {} DropdownConfig.Name = DropdownConfig.Name or "Dropdown" DropdownConfig.Options = DropdownConfig.Options or {} DropdownConfig.Default = DropdownConfig.Default or "" DropdownConfig.Callback = DropdownConfig.Callback or function() end DropdownConfig.Flag = DropdownConfig.Flag or nil DropdownConfig.Save = DropdownConfig.Save or false local Dropdown = {Value = DropdownConfig.Default, Options = DropdownConfig.Options, Buttons = {}, Toggled = false, Type = "Dropdown", Save = DropdownConfig.Save} local MaxElements = 5 local DropdownList = MakeElement("List") local DropdownContainer = AddThemeObject(SetProps(SetChildren(MakeElement("ScrollFrame", Color3.fromRGB(40, 40, 40), 2), { DropdownList }), { Parent = ItemParent, Position = UDim2.new(0, 10, 0, 40), Size = UDim2.new(1, -20, 1, -45), ClipsDescendants = true, BackgroundTransparency = 1, Visible = false }), "Divider") local Click = SetProps(MakeElement("Button"), { Size = UDim2.new(1, 0, 1, 0) }) local DropdownFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 8), { Size = UDim2.new(1, 0, 0, 40), Parent = ItemParent , ClipsDescendants = true }), { DropdownContainer, SetProps(SetChildren(MakeElement("TFrame"), { AddThemeObject(SetProps(MakeElement("Label", DropdownConfig.Name, 14), { Size = UDim2.new(1, -12, 1, 0), Position = UDim2.new(0, 12, 0, 0), Font = Enum.Font.GothamBold, Name = "Content" }), "Text"), AddThemeObject(SetProps(MakeElement("Image", "rbxassetid://7072706796"), { Size = UDim2.new(0, 20, 0, 20), AnchorPoint = Vector2.new(0, 0.5), Position = UDim2.new(1, -30, 0.5, 0), ImageColor3 = Color3.fromRGB(240, 240, 240), Name = "Ico" }), "TextDark"), AddThemeObject(SetProps(MakeElement("Label", "Selected", 13), { Size = UDim2.new(1, -55, 1, 0), Font = Enum.Font.Gotham, Name = "Selected", TextXAlignment = Enum.TextXAlignment.Right, TextColor3 = Color3.fromRGB(150,150,150) }), "TextDark"), Click }), { Size = UDim2.new(1, 0, 0, 40), ClipsDescendants = true, Name = "Header" }), AddThemeObject(MakeElement("Stroke"), "Stroke") }), "Second") AddConnection(DropdownList:GetPropertyChangedSignal("AbsoluteContentSize"), function() DropdownContainer.CanvasSize = UDim2.new(0, 0, 0, DropdownList.AbsoluteContentSize.Y + 5) end) local function AddOptions(Options) for _, Option in pairs(Options) do local OptionBtn = AddThemeObject(SetProps(SetChildren(MakeElement("Button", Color3.fromRGB(40, 40, 40)), { MakeElement("Corner", 0, 6), AddThemeObject(SetProps(MakeElement("Label", Option, 13, 0.4), { Position = UDim2.new(0, 10, 0, 0), Size = UDim2.new(1, -10, 1, 0), Name = "Title", Font = Enum.Font.Gotham }), "Text") }), { Parent = DropdownContainer, Size = UDim2.new(1, 0, 0, 28), BackgroundTransparency = 1, ClipsDescendants = true }), "Divider") AddConnection(OptionBtn.MouseButton1Click, function() Dropdown:Set(Option) SaveCfg(game.GameId) Dropdown.Toggled = false TweenService:Create(DropdownFrame.Header.Ico, TweenInfo.new(0.2, Enum.EasingStyle.Quad), {Rotation = 0}):Play() TweenService:Create(DropdownFrame, TweenInfo.new(0.2, Enum.EasingStyle.Quad), {Size = UDim2.new(1, 0, 0, 40)}):Play() DropdownContainer.Visible = false end) AddConnection(OptionBtn.MouseEnter, function() TweenService:Create(OptionBtn, TweenInfo.new(0.2), {BackgroundTransparency = 0.8}):Play() TweenService:Create(OptionBtn.Title, TweenInfo.new(0.2), {TextTransparency = 0}):Play() end) AddConnection(OptionBtn.MouseLeave, function() TweenService:Create(OptionBtn, TweenInfo.new(0.2), {BackgroundTransparency = 1}):Play() TweenService:Create(OptionBtn.Title, TweenInfo.new(0.2), {TextTransparency = 0.4}):Play() end) Dropdown.Buttons[Option] = OptionBtn end end function Dropdown:Refresh(Options, Delete) if Delete then for _,v in pairs(Dropdown.Buttons) do v:Destroy() end table.clear(Dropdown.Options) table.clear(Dropdown.Buttons) end Dropdown.Options = Options AddOptions(Dropdown.Options) end function Dropdown:Set(Value) Dropdown.Value = Value DropdownFrame.Header.Selected.Text = Dropdown.Value DropdownConfig.Callback(Dropdown.Value) end AddConnection(Click.MouseButton1Click, function() Dropdown.Toggled = not Dropdown.Toggled TweenService:Create(DropdownFrame.Header.Ico, TweenInfo.new(0.2, Enum.EasingStyle.Quad), {Rotation = Dropdown.Toggled and 180 or 0}):Play() if Dropdown.Toggled then DropdownContainer.Visible = true local ContentSize = DropdownList.AbsoluteContentSize.Y local Height = math.min(ContentSize + 10, (MaxElements * 28) + 10) TweenService:Create(DropdownFrame, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Size = UDim2.new(1, 0, 0, 40 + Height) }):Play() else TweenService:Create(DropdownFrame, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Size = UDim2.new(1, 0, 0, 40) }):Play() wait(0.3) if not Dropdown.Toggled then DropdownContainer.Visible = false end end end) Dropdown:Refresh(Dropdown.Options, false) Dropdown:Set(Dropdown.Value) if DropdownConfig.Flag then OrionLib.Flags[DropdownConfig.Flag] = Dropdown end return Dropdown end function ElementFunction:AddColorpicker(ColorpickerConfig) ColorpickerConfig = ColorpickerConfig or {} ColorpickerConfig.Name = ColorpickerConfig.Name or "Colorpicker" ColorpickerConfig.Default = ColorpickerConfig.Default or Color3.fromRGB(255,255,255) ColorpickerConfig.Callback = ColorpickerConfig.Callback or function() end ColorpickerConfig.Flag = ColorpickerConfig.Flag or nil ColorpickerConfig.Save = ColorpickerConfig.Save or false local ColorH, ColorS, ColorV = 1, 1, 1 local Colorpicker = {Value = ColorpickerConfig.Default, Toggled = false, Type = "Colorpicker", Save = ColorpickerConfig.Save} local ColorpickerBox = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 6), { Size = UDim2.new(0, 30, 0, 20), Position = UDim2.new(1, -45, 0.5, 0), AnchorPoint = Vector2.new(0, 0.5) }), { AddThemeObject(MakeElement("Stroke"), "Stroke") }), "Main") local ColorSelection = Create("ImageLabel", {Size = UDim2.new(0, 18, 0, 18), Position = UDim2.new(0,0,0,0), ScaleType = Enum.ScaleType.Fit, AnchorPoint = Vector2.new(0.5, 0.5), BackgroundTransparency = 1, Image = "http://www.roblox.com/asset/?id=4805639000"}) local HueSelection = Create("ImageLabel", {Size = UDim2.new(0, 18, 0, 18), Position = UDim2.new(0,0,0,0), ScaleType = Enum.ScaleType.Fit, AnchorPoint = Vector2.new(0.5, 0.5), BackgroundTransparency = 1, Image = "http://www.roblox.com/asset/?id=4805639000"}) local ColorMap = Create("ImageLabel", {Size = UDim2.new(1, -25, 1, 0), Visible = false, Image = "rbxassetid://4155801252"}, {Create("UICorner", {CornerRadius = UDim.new(0, 4)}), ColorSelection}) local HueMap = Create("Frame", {Size = UDim2.new(0, 20, 1, 0), Position = UDim2.new(1, -20, 0, 0), Visible = false}, {Create("UIGradient", {Rotation = 270, Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 0, 4)), ColorSequenceKeypoint.new(0.20, Color3.fromRGB(234, 255, 0)), ColorSequenceKeypoint.new(0.40, Color3.fromRGB(21, 255, 0)), ColorSequenceKeypoint.new(0.60, Color3.fromRGB(0, 255, 255)), ColorSequenceKeypoint.new(0.80, Color3.fromRGB(0, 17, 255)), ColorSequenceKeypoint.new(0.90, Color3.fromRGB(255, 0, 251)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(255, 0, 4))}}), Create("UICorner", {CornerRadius = UDim.new(0, 4)}), HueSelection}) local ColorpickerContainer = Create("Frame", { Position = UDim2.new(0, 0, 0, 40), Size = UDim2.new(1, 0, 1, -40), BackgroundTransparency = 1, ClipsDescendants = true }, {HueMap, ColorMap, Create("UIPadding", {PaddingLeft = UDim.new(0, 10), PaddingRight = UDim.new(0, 10), PaddingBottom = UDim.new(0, 10), PaddingTop = UDim.new(0, 10)})}) local Click = SetProps(MakeElement("Button"), {Size = UDim2.new(1, 0, 1, 0)}) local ColorpickerFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 8), { Size = UDim2.new(1, 0, 0, 40), Parent = ItemParent , ClipsDescendants = true }), { SetProps(SetChildren(MakeElement("TFrame"), { AddThemeObject(SetProps(MakeElement("Label", ColorpickerConfig.Name, 14), { Size = UDim2.new(1, -12, 1, 0), Position = UDim2.new(0, 12, 0, 0), Font = Enum.Font.GothamBold, Name = "Content" }), "Text"), ColorpickerBox, Click }), {Size = UDim2.new(1, 0, 0, 40)}), ColorpickerContainer, AddThemeObject(MakeElement("Stroke"), "Stroke") }), "Second") AddConnection(Click.MouseButton1Click, function() Colorpicker.Toggled = not Colorpicker.Toggled TweenService:Create(ColorpickerFrame,TweenInfo.new(.2, Enum.EasingStyle.Quad),{Size = Colorpicker.Toggled and UDim2.new(1, 0, 0, 150) or UDim2.new(1, 0, 0, 40)}):Play() ColorMap.Visible = Colorpicker.Toggled HueMap.Visible = Colorpicker.Toggled end) local function UpdateColorPicker() ColorpickerBox.BackgroundColor3 = Color3.fromHSV(ColorH, ColorS, ColorV) ColorMap.BackgroundColor3 = Color3.fromHSV(ColorH, 1, 1) Colorpicker:Set(ColorpickerBox.BackgroundColor3) end ColorH = 1 - (math.clamp(HueSelection.AbsolutePosition.Y - HueMap.AbsolutePosition.Y, 0, HueMap.AbsoluteSize.Y) / HueMap.AbsoluteSize.Y) ColorS = (math.clamp(ColorSelection.AbsolutePosition.X - ColorMap.AbsolutePosition.X, 0, ColorMap.AbsoluteSize.X) / ColorMap.AbsoluteSize.X) ColorV = 1 - (math.clamp(ColorSelection.AbsolutePosition.Y - ColorMap.AbsolutePosition.Y, 0, ColorMap.AbsoluteSize.Y) / ColorMap.AbsoluteSize.Y) AddConnection(ColorMap.InputBegan, function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then if ColorInput then ColorInput:Disconnect() end ColorInput = AddConnection(RunService.RenderStepped, function() local ColorX = (math.clamp(Mouse.X - ColorMap.AbsolutePosition.X, 0, ColorMap.AbsoluteSize.X) / ColorMap.AbsoluteSize.X) local ColorY = (math.clamp(Mouse.Y - ColorMap.AbsolutePosition.Y, 0, ColorMap.AbsoluteSize.Y) / ColorMap.AbsoluteSize.Y) ColorSelection.Position = UDim2.new(ColorX, 0, ColorY, 0) ColorS = ColorX ColorV = 1 - ColorY UpdateColorPicker() end) end end) AddConnection(ColorMap.InputEnded, function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 and ColorInput then ColorInput:Disconnect() SaveCfg(game.GameId) end end) AddConnection(HueMap.InputBegan, function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then if HueInput then HueInput:Disconnect() end HueInput = AddConnection(RunService.RenderStepped, function() local HueY = (math.clamp(Mouse.Y - HueMap.AbsolutePosition.Y, 0, HueMap.AbsoluteSize.Y) / HueMap.AbsoluteSize.Y) HueSelection.Position = UDim2.new(0.5, 0, HueY, 0) ColorH = 1 - HueY UpdateColorPicker() end) end end) AddConnection(HueMap.InputEnded, function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 and HueInput then HueInput:Disconnect() SaveCfg(game.GameId) end end) function Colorpicker:Set(Value) Colorpicker.Value = Value ColorpickerBox.BackgroundColor3 = Colorpicker.Value ColorpickerConfig.Callback(Colorpicker.Value) end Colorpicker:Set(Colorpicker.Value) if ColorpickerConfig.Flag then OrionLib.Flags[ColorpickerConfig.Flag] = Colorpicker end return Colorpicker end function ElementFunction:AddTextbox(TextboxConfig) TextboxConfig = TextboxConfig or {} TextboxConfig.Name = TextboxConfig.Name or "Textbox" TextboxConfig.Default = TextboxConfig.Default or "" TextboxConfig.TextDisappear = TextboxConfig.TextDisappear or false TextboxConfig.Callback = TextboxConfig.Callback or function() end local Click = SetProps(MakeElement("Button"), {Size = UDim2.new(1, 0, 1, 0)}) local TextboxActual = AddThemeObject(Create("TextBox", { Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, TextColor3 = Color3.fromRGB(255, 255, 255), PlaceholderColor3 = Color3.fromRGB(180,180,180), PlaceholderText = "...", Font = Enum.Font.Gotham, TextXAlignment = Enum.TextXAlignment.Center, TextSize = 13, ClearTextOnFocus = false }), "Text") local TextContainer = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 6), { Size = UDim2.new(0, 30, 0, 24), Position = UDim2.new(1, -10, 0.5, 0), AnchorPoint = Vector2.new(1, 0.5) }), { AddThemeObject(MakeElement("Stroke"), "Stroke"), TextboxActual }), "Main") local TextboxFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 8), { Size = UDim2.new(1, 0, 0, 40), Parent = ItemParent }), { AddThemeObject(SetProps(MakeElement("Label", TextboxConfig.Name, 14), { Size = UDim2.new(1, -12, 1, 0), Position = UDim2.new(0, 12, 0, 0), Font = Enum.Font.GothamBold, Name = "Content" }), "Text"), AddThemeObject(MakeElement("Stroke"), "Stroke"), TextContainer, Click }), "Second") AddConnection(TextboxActual:GetPropertyChangedSignal("Text"), function() TweenService:Create(TextContainer, TweenInfo.new(0.3, Enum.EasingStyle.Quad), {Size = UDim2.new(0, math.clamp(TextboxActual.TextBounds.X + 20, 50, 200), 0, 24)}):Play() end) AddConnection(TextboxActual.FocusLost, function() TextboxConfig.Callback(TextboxActual.Text) if TextboxConfig.TextDisappear then TextboxActual.Text = "" end end) TextboxActual.Text = TextboxConfig.Default AddConnection(Click.MouseButton1Up, function() TextboxActual:CaptureFocus() end) end function ElementFunction:AddBind(BindConfig) BindConfig.Name = BindConfig.Name or "Bind" BindConfig.Default = BindConfig.Default or Enum.KeyCode.Unknown BindConfig.Hold = BindConfig.Hold or false BindConfig.Callback = BindConfig.Callback or function() end BindConfig.Flag = BindConfig.Flag or nil BindConfig.Save = BindConfig.Save or false local Bind = {Value, Binding = false, Type = "Bind", Save = BindConfig.Save} local Holding = false local Click = SetProps(MakeElement("Button"), {Size = UDim2.new(1, 0, 1, 0)}) local BindBox = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 6), { Size = UDim2.new(0, 40, 0, 24), Position = UDim2.new(1, -10, 0.5, 0), AnchorPoint = Vector2.new(1, 0.5) }), { AddThemeObject(MakeElement("Stroke"), "Stroke"), AddThemeObject(SetProps(MakeElement("Label", BindConfig.Name, 13), { Size = UDim2.new(1, 0, 1, 0), Font = Enum.Font.Code, TextXAlignment = Enum.TextXAlignment.Center, Name = "Value" }), "Text") }), "Main") local BindFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 8), { Size = UDim2.new(1, 0, 0, 40), Parent = ItemParent }), { AddThemeObject(SetProps(MakeElement("Label", BindConfig.Name, 14), { Size = UDim2.new(1, -12, 1, 0), Position = UDim2.new(0, 12, 0, 0), Font = Enum.Font.GothamBold, Name = "Content" }), "Text"), AddThemeObject(MakeElement("Stroke"), "Stroke"), BindBox, Click }), "Second") AddConnection(Click.MouseButton1Click, function() if Bind.Binding then return end Bind.Binding = true BindBox.Value.Text = "..." end) AddConnection(UserInputService.InputBegan, function(Input) if UserInputService:GetFocusedTextBox() then return end if (Input.KeyCode.Name == Bind.Value or Input.UserInputType.Name == Bind.Value) and not Bind.Binding then if BindConfig.Hold then Holding = true BindConfig.Callback(Holding) else BindConfig.Callback(Input) end elseif Bind.Binding then local Key pcall(function() if not CheckKey(BlacklistedKeys, Input.KeyCode) then Key = Input.KeyCode end end) pcall(function() if CheckKey(WhitelistedMouse, Input.UserInputType) and not Key then Key = Input.UserInputType end end) Key = Key or Bind.Value Bind:Set(Key) SaveCfg(game.GameId) end end) AddConnection(UserInputService.InputEnded, function(Input) if Input.KeyCode.Name == Bind.Value or Input.UserInputType.Name == Bind.Value then if BindConfig.Hold and Holding then Holding = false BindConfig.Callback(Holding) end end end) function Bind:Set(Key) Bind.Binding = false Bind.Value = Key or Bind.Value Bind.Value = Bind.Value.Name or Bind.Value BindBox.Value.Text = Bind.Value TweenService:Create(BindBox, TweenInfo.new(0.3), {Size = UDim2.new(0, BindBox.Value.TextBounds.X + 20, 0, 24)}):Play() end Bind:Set(BindConfig.Default) if BindConfig.Flag then OrionLib.Flags[BindConfig.Flag] = Bind end return Bind end return ElementFunction end local ElementFunction = {} function ElementFunction:AddSection(SectionConfig) SectionConfig.Name = SectionConfig.Name or "Section" local SectionFrame = SetChildren(SetProps(MakeElement("TFrame"), { Size = UDim2.new(1, 0, 0, 26), Parent = Container, AutomaticSize = Enum.AutomaticSize.Y }), { AddThemeObject(SetProps(MakeElement("Label", SectionConfig.Name, 13), { Size = UDim2.new(1, -12, 0, 24), Position = UDim2.new(0, 5, 0, 0), Font = Enum.Font.GothamBold, TextColor3 = OrionLib.Themes[OrionLib.SelectedTheme].TextDark }), "TextDark"), SetChildren(SetProps(MakeElement("TFrame"), { AnchorPoint = Vector2.new(0, 0), Size = UDim2.new(1, 0, 0, 0), Position = UDim2.new(0, 0, 0, 24), Name = "Holder", AutomaticSize = Enum.AutomaticSize.Y }), { MakeElement("List", 0, 8) }), }) local SectionFunction = {} for i, v in next, GetElements(SectionFrame.Holder) do SectionFunction[i] = v end return SectionFunction end for i, v in next, GetElements(Container) do ElementFunction[i] = v end return ElementFunction end function Functions:ChangeKey(Keybind: Enum.KeyCode) _currentKey = Keybind end function Functions:Destroy() for _, Connection in next, OrionLib.Connections do Connection:Disconnect() end MainWindow:Destroy() end return Functions end function OrionLib:Destroy() Orion:Destroy() end return OrionLib