Run it
Copy the script and paste it into your executor.
().gethui = () .CoreGui
success, result = (()
.firsttimeinjection
)
success
result
()
.firsttimeinjection =
player = .Players.LocalPlayer
playerGui = player:()
userInputService = :()
userInputService.MouseIconEnabled =
screenGui = playerGui:()
screenGui
screenGui = .()
screenGui.Name =
screenGui.Parent = playerGui
screenGui.ResetOnSpawn =
buttonmodal = .()
buttonmodal.Size = .(, , , )
buttonmodal.Position = .(, -, , -)
buttonmodal.BackgroundTransparency =
buttonmodal.Text =
buttonmodal.Parent = screenGui
buttonmodal.Modal =
UserInputService = :()
TweenService = :()
RunService = :()
HttpService = :()
CoreGui = :()
PlayerService = :()
UserService = :()
TextService = :()
LocalPlayer = PlayerService.LocalPlayer
TweenCache = {
UltraFast = TweenInfo.(, .EasingStyle.Quint, .EasingDirection.Out),
Fast = TweenInfo.(, .EasingStyle.Quint, .EasingDirection.Out),
Medium = TweenInfo.(, .EasingStyle.Quint, .EasingDirection.Out),
Smooth = TweenInfo.(, .EasingStyle.Exponential, .EasingDirection.Out),
Slow = TweenInfo.(, .EasingStyle.Exponential, .EasingDirection.Out),
Elastic = TweenInfo.(, .EasingStyle.Elastic, .EasingDirection.Out),
Bounce = TweenInfo.(, .EasingStyle.Bounce, .EasingDirection.Out),
Back = TweenInfo.(, .EasingStyle.Back, .EasingDirection.Out),
Cinematic = TweenInfo.(, .EasingStyle.Sine, .EasingDirection.InOut),
Buttery = TweenInfo.(, .EasingStyle.Quad, .EasingDirection.Out),
Spring = TweenInfo.(, .EasingStyle.Elastic, .EasingDirection.Out, , , )
}
(color)
(color) ~=
( * color.R + * color.G + * color.B)
(backgroundColor)
luminance = (backgroundColor)
luminance > .(, , ) .(, , )
(color, amount)
(color) ~= color
h, s, v = color:()
.(h, .(, s - (amount )), v)
Icons = {}
.(()
(()
result = :()
Icons = HttpService:(result).icons {}
)
)
(IconName)
Icons[IconName]
useStudio = RunService:()
Orion = .()
FocusDrag =
Orion.Name =
ProtectGui = protectgui ( .protect_gui) ()
GUIParent = gethui () (.CoreGui .Players.LocalPlayer:())
Orion.Parent = GUIParent
(Orion)
gethui
_, Interface (():())
Interface.Name == Orion.Name Interface ~= Orion
Interface:()
_, Interface (.CoreGui:())
Interface.Name == Orion.Name Interface ~= Orion
Interface:()
OrionLib = {
Flags = {},
Connections = {},
Elements = {},
ThemeObjects = {},
Themes = {
Default = {
Main = .(, , ),
Second = .(, , ),
Stroke = .(, , ),
Divider = .(, , ),
Text = .(, , ),
TextDark = .(, , )
}
},
SelectedTheme = ,
Folder = ,
SaveCfg = ,
CurrentLanguage =
}
OrionLib:()
gethui
Orion.Parent == ()
Orion.Parent == :()
(Signal, Function)
( OrionLib:())
SignalConnect = Signal:(Function)
.(OrionLib.Connections, SignalConnect)
SignalConnect
.(()
(OrionLib:())
()
_, Connection , OrionLib.Connections
Connection:()
)
(DragPoint, Main)
(()
Dragging, DragInput, MousePos, FramePos =
(DragPoint.InputBegan, (Input)
Input.UserInputType == .UserInputType.MouseButton1 Input.UserInputType == .UserInputType.Touch
Dragging =
MousePos = Input.Position
FramePos = Main.Position
Input.Changed:(()
Input.UserInputState == .UserInputState.End
Dragging =
)
)
(DragPoint.InputChanged, (Input)
Input.UserInputType == .UserInputType.MouseMovement Input.UserInputType == .UserInputType.Touch
DragInput = Input
)
(UserInputService.InputChanged, (Input)
Input == DragInput Dragging
Delta = Input.Position - MousePos
Main.Position = .(FramePos.X.Scale,FramePos.X.Offset + Delta.X, FramePos.Y.Scale, FramePos.Y.Offset + Delta.Y)
)
)
(Name, Properties, Children)
Object = .(Name)
i, v , Properties {}
Object[i] = v
i, v , Children {}
v.Parent = Object
Object
(ElementName, ElementFunction)
OrionLib.Elements[ElementName] = (...)
(...)
(ElementName, ...)
NewElement = OrionLib.Elements[ElementName](...)
NewElement
(Element, Props)
.(Props, (Property, Value)
Element[Property] = Value
)
Element
(Element, Children)
.(Children, (_, Child)
Child.Parent = Element
)
Element
(Number, Factor)
Result = .(Number/Factor + (.(Number) * )) * Factor
Result < Result = Result + Factor
Result
(Object)
Object:() Object:()
Object:()
Object:()
Object:() Object:()
Object:() Object:()
(Object, Type)
OrionLib.ThemeObjects[Type]
OrionLib.ThemeObjects[Type] = {}
.(OrionLib.ThemeObjects[Type], Object)
Object[(Object)] = OrionLib.Themes[OrionLib.SelectedTheme][Type]
Object
()
Name, Type (OrionLib.ThemeObjects)
_, Object (Type)
Object[(Object)] = OrionLib.Themes[OrionLib.SelectedTheme][Name]
(color)
((color) == , )
{
R = .(color.R * ),
G = .(color.G * ),
B = .(color.B * )
}
(color)
((color) == (color) == , )
(color) ==
(color.R color.G color.B, )
.(.(color.R, , ), .(color.G, , ), .(color.B, , ))
(color) ==
hex = color:()
(hex, )
r, g, b = (hex:(, ), ), (hex:(, ), ), (hex:(, ), )
.(r, g, b)
(Config)
success, Data = (()
HttpService:(Config)
)
success
loadedCount =
Data.Settings
Data.Settings.ThemeMain Data.Settings.ThemeMain.Value
OrionLib.Themes[OrionLib.SelectedTheme].Main = (Data.Settings.ThemeMain.Value)
loadedCount = loadedCount +
Data.Settings.ThemeSecond Data.Settings.ThemeSecond.Value
OrionLib.Themes[OrionLib.SelectedTheme].Second = (Data.Settings.ThemeSecond.Value)
loadedCount = loadedCount +
Data.Settings.ThemeStroke Data.Settings.ThemeStroke.Value
OrionLib.Themes[OrionLib.SelectedTheme].Stroke = (Data.Settings.ThemeStroke.Value)
loadedCount = loadedCount +
Data.Settings.ThemeDivider Data.Settings.ThemeDivider.Value
OrionLib.Themes[OrionLib.SelectedTheme].Divider = (Data.Settings.ThemeDivider.Value)
loadedCount = loadedCount +
Data.Settings.ThemeText Data.Settings.ThemeText.Value
OrionLib.Themes[OrionLib.SelectedTheme].Text = (Data.Settings.ThemeText.Value)
loadedCount = loadedCount +
Data.Settings.ThemeTextDark Data.Settings.ThemeTextDark.Value
OrionLib.Themes[OrionLib.SelectedTheme].TextDark = (Data.Settings.ThemeTextDark.Value)
loadedCount = loadedCount +
loadedCount >
()
Data.Globals
Data.Globals.Language
().OrionLanguage = Data.Globals.Language
loadedCount = loadedCount +
flagName, flagData (Data.Flags {})
OrionLib.Flags[flagName]
.(()
flagData.Type == flagData.Value
OrionLib.Flags[flagName]:((flagData.Value))
flagData.Value ~=
OrionLib.Flags[flagName]:(flagData.Value)
loadedCount = loadedCount +
)
loadedCount >
AUTO_SAVE_ENABLED =
CONFIG_FOLDER =
saveDebounceTime =
lastSaveTime =
saveScheduled =
saveConnection =
()
isfolder
(CONFIG_FOLDER)
(CONFIG_FOLDER)
(Name)
AUTO_SAVE_ENABLED writefile ()
currentTime = ()
currentTime - lastSaveTime < saveDebounceTime
saveScheduled
saveScheduled =
saveConnection
saveConnection:()
saveConnection = .(saveDebounceTime, ()
saveScheduled =
(Name)
)
lastSaveTime = currentTime
saveScheduled =
CompleteConfig = {
Flags = {},
Settings = {},
Globals = {},
SavedAt = .()
}
flagName, flagData (OrionLib.Flags)
flagData.Save
flagData.Type ==
CompleteConfig.Flags[flagName] = {
Type = ,
Value = (flagData.Value)
}
CompleteConfig.Flags[flagName] = {
Type = flagData.Type ,
Value = flagData.Value
}
CompleteConfig.Settings[] = {
Type = ,
Value = (OrionLib.Themes[OrionLib.SelectedTheme].Main)
}
CompleteConfig.Settings[] = {
Type = ,
Value = (OrionLib.Themes[OrionLib.SelectedTheme].Second)
}
CompleteConfig.Settings[] = {
Type = ,
Value = (OrionLib.Themes[OrionLib.SelectedTheme].Stroke)
}
CompleteConfig.Settings[] = {
Type = ,
Value = (OrionLib.Themes[OrionLib.SelectedTheme].Divider)
}
CompleteConfig.Settings[] = {
Type = ,
Value = (OrionLib.Themes[OrionLib.SelectedTheme].Text)
}
CompleteConfig.Settings[] = {
Type = ,
Value = (OrionLib.Themes[OrionLib.SelectedTheme].TextDark)
}
CompleteConfig.Globals = {
Language = ().OrionLanguage
}
.(()
configPath = CONFIG_FOLDER .. .. Name ..
success = (()
(configPath, HttpService:(CompleteConfig))
)
success
()
)
WhitelistedMouse = {.UserInputType.MouseButton1, .UserInputType.MouseButton2,.UserInputType.MouseButton3}
BlacklistedKeys = {.KeyCode.Unknown,.KeyCode.W,.KeyCode.A,.KeyCode.S,.KeyCode.D,.KeyCode.Up,.KeyCode.Left,.KeyCode.Down,.KeyCode.Right,.KeyCode.Slash,.KeyCode.Tab,.KeyCode.Backspace,.KeyCode.Escape}
freeMouse = (, {Name = , Size = .(,,,), BackgroundTransparency = , Text = , Position = .(,,,), Modal = , Parent = Orion, Visible = , ZIndex = , Active = })
mouselock =
(Value)
Value
mouselock =
UserInputService.MouseIconEnabled =
freeMouse.Visible =
.(()
mouselock
.()
UserInputService.MouseIconEnabled =
freeMouse.Visible =
)
mouselock =
UserInputService.MouseIconEnabled =
freeMouse.Visible =
(Table, Key)
_, v , Table
v == Key
(, (Scale, Offset)
Corner = (, {
CornerRadius = .(Scale , Offset )
})
Corner
)
(, ()
AspectRatio = ()
AspectRatio
)
(, (Color, Thickness)
Stroke = (, {
Color = Color .(, , ),
Thickness = Thickness
})
Stroke
)
(, (Scale, Offset)
List = (, {
SortOrder = .SortOrder.LayoutOrder,
Padding = .(Scale , Offset )
})
List
)
(, (Bottom, Left, Right, Top)
Padding = (, {
PaddingBottom = .(, Bottom ),
PaddingLeft = .(, Left ),
PaddingRight = .(, Right ),
PaddingTop = .(, Top )
})
Padding
)
(, ()
TFrame = (, {
BackgroundTransparency =
})
TFrame
)
(, (Color)
Frame = (, {
BackgroundColor3 = Color .(, , ),
BorderSizePixel =
})
Frame
)
(, (Color, Scale, Offset)
Frame = (, {
BackgroundColor3 = Color .(, , ),
BorderSizePixel =
}, {
(, {
CornerRadius = .(Scale, Offset)
})
})
Frame
)
(, ()
Button = (, {
Text = ,
AutoButtonColor = ,
BackgroundTransparency = ,
BorderSizePixel =
})
Button
)
(, (Color, Width)
ScrollFrame = (, {
BackgroundTransparency = ,
MidImage = ,
BottomImage = ,
TopImage = ,
ScrollBarImageColor3 = Color,
BorderSizePixel = ,
ScrollBarThickness = Width,
CanvasSize = .(, , , ),
ScrollingDirection = .ScrollingDirection.Y,
ScrollBarImageTransparency = ,
ElasticBehavior = .ElasticBehavior.Never
})
ScrollFrame
)
(, (ImageID)
ImageNew = (, {
Image = ImageID,
BackgroundTransparency =
})
(ImageID) ~=
ImageNew.Image = (ImageID)
ImageNew
)
(, (ImageID)
Image = (, {
Image = ImageID,
BackgroundTransparency =
})
Image
)
(, (Text, TextSize, Transparency)
Label = (, {
Text = Text ,
TextColor3 = .(, , ),
TextTransparency = Transparency ,
TextSize = TextSize ,
Font = .Font.Gotham,
RichText = ,
BackgroundTransparency = ,
TextXAlignment = .TextXAlignment.Left
})
Label
)
NotificationHolder = (((), {
((), {
HorizontalAlignment = .HorizontalAlignment.Center,
SortOrder = .SortOrder.LayoutOrder,
VerticalAlignment = .VerticalAlignment.Bottom,
Padding = .(, )
})
}), {
Position = .(, -, , -),
Size = .(, , , -),
AnchorPoint = .(, ),
Parent = Orion
})
OrionLib:(NotificationConfig)
(()
NotificationConfig.Name = NotificationConfig.Name
NotificationConfig.Content = NotificationConfig.Content
NotificationConfig.Image = NotificationConfig.Image
NotificationConfig.Time = NotificationConfig.Time
NotificationParent = ((), {
Size = .(, , , ),
AutomaticSize = .AutomaticSize.Y,
Parent = NotificationHolder
})
NotificationFrame = (((, OrionLib.Themes[OrionLib.SelectedTheme].Second, , ), {
Parent = NotificationParent,
Size = .(, , , ),
Position = .(, -, , ),
BackgroundTransparency = ,
AutomaticSize = .AutomaticSize.Y
}), {
(, OrionLib.Themes[OrionLib.SelectedTheme].Stroke, ),
(, , , , ),
((, NotificationConfig.Image), {
Size = .(, , , ),
ImageColor3 = .(, , ),
Name =
}),
((, NotificationConfig.Name, ), {
Size = .(, -, , ),
Position = .(, , , ),
Font = .Font.GothamBold,
Name =
}),
((, NotificationConfig.Content, ), {
Size = .(, , , ),
Position = .(, , , ),
Font = .Font.GothamSemibold,
Name = ,
AutomaticSize = .AutomaticSize.Y,
TextColor3 = .(, , ),
TextWrapped =
})
})
TweenService:(NotificationFrame, TweenInfo.(, .EasingStyle.Quint), {Position = .(, , , )}):()
(NotificationConfig.Time - )
TweenService:(NotificationFrame.Icon, TweenInfo.(, .EasingStyle.Quint), {ImageTransparency = }):()
TweenService:(NotificationFrame, TweenInfo.(, .EasingStyle.Quint), {BackgroundTransparency = }):()
()
TweenService:(NotificationFrame.UIStroke, TweenInfo.(, .EasingStyle.Quint), {Transparency = }):()
TweenService:(NotificationFrame.Title, TweenInfo.(, .EasingStyle.Quint), {TextTransparency = }):()
TweenService:(NotificationFrame.Content, TweenInfo.(, .EasingStyle.Quint), {TextTransparency = }):()
()
NotificationFrame:(.(, , , ),,,,)
()
NotificationFrame:()
)
OrionLib:(ThemeName)
OrionLib.Themes[ThemeName]
OrionLib.SelectedTheme = ThemeName
()
( .. ThemeName)
OrionLib:(Config)
(Config) ~=
()
updatedKeys = {}
key, value (Config)
OrionLib.Themes[OrionLib.SelectedTheme][key] ~=
(OrionLib.Themes[OrionLib.SelectedTheme][key]) == (value)
OrionLib.Themes[OrionLib.SelectedTheme][key] = value
.(updatedKeys, key)
(():(key))
( .. key .. )
#updatedKeys >
()
OrionLib:()
OrionLib.SaveCfg
(()
configFile = CONFIG_FOLDER .. .. .GameId ..
isfile (configFile)
((configFile))
)
OrionLib:(WindowConfig)
FirstTab =
Minimized =
Loaded =
UIHidden =
WindowConfig = WindowConfig {}
WindowConfig.Name = WindowConfig.Name
WindowConfig.ConfigFolder = WindowConfig.ConfigFolder WindowConfig.Name
WindowConfig.SaveConfig = WindowConfig.SaveConfig
WindowConfig.HidePremium = WindowConfig.HidePremium
WindowConfig.IntroEnabled ==
WindowConfig.IntroEnabled =
WindowConfig.FreeMouse = WindowConfig.FreeMouse
WindowConfig.KeyToOpenWindow = WindowConfig.KeyToOpenWindow
WindowConfig.IntroText = WindowConfig.IntroText
WindowConfig.CloseCallback = WindowConfig.CloseCallback ()
WindowConfig.ShowIcon = WindowConfig.ShowIcon
WindowConfig.Icon = WindowConfig.Icon
WindowConfig.IntroIcon = WindowConfig.IntroIcon
OrionLib.Folder = WindowConfig.ConfigFolder
OrionLib.SaveCfg = WindowConfig.SaveConfig
WindowConfig.SaveConfig
(WindowConfig.ConfigFolder)
(WindowConfig.ConfigFolder)
WindowConfig.FreeMouse
()
MobileOpenButton = (((),
{
BackgroundTransparency = ,
Parent = Orion,
Text = ,
TextScaled = ,
TextSize = ,
TextColor3 = .(, , ),
BackgroundColor = BrickColor.(, , ),
TextStrokeColor3 = .(, , ),
TextStrokeTransparency = ,
Size = .(, , , ),
AnchorPoint = .(, ),
Position = .(, , , ),
Visible = ,
Font = .Font.GothamBold
}), {(, ), ((), {DominantAxis = , AspectRatio = , AspectType = })})
(MobileOpenButton, MobileOpenButton)
Tabs = {}
TabHolder = ((((, .(, , ), ), {
Size = .(, , , -),
Position = .(, , , )
}), {
(),
(, , , , )
}), )
(TabHolder.UIListLayout:(), ()
TabHolder.CanvasSize = .(, , , TabHolder.UIListLayout.AbsoluteContentSize.Y + )
)
SearchBox = (, {
Size = .(, , , ),
BackgroundTransparency = ,
TextColor3 = .(, , ),
PlaceholderColor3 = .(, , ),
PlaceholderText = ,
Font = .Font.GothamBold,
TextWrapped = ,
Text = ,
TextXAlignment = .TextXAlignment.Center,
TextSize = ,
ClearTextOnFocus =
})
TextboxActual = (SearchBox, )
SearchBar = ((((, .(, , ), , ), {
Size = .(, -, , ),
Position = .(, , , ),
AnchorPoint = .(, )
}), {
((), ),
TextboxActual
}), )
()
Text = .(SearchBox.Text)
i, v (Tabs)
v:()
.(.(i), Text)
v.Visible =
v.Visible =
(TextboxActual:(), SearchHandle)
CloseBtn = (((), {
Size = .(, , , ),
Position = .(, , , ),
BackgroundTransparency =
}), {
(((, ), {
Position = .(, , , ),
Size = .(, , , )
}), )
})
MinimizeBtn = (((), {
Size = .(, , , ),
BackgroundTransparency =
}), {
(((, ), {
Position = .(, , , ),
Size = .(, , , ),
Name =
}), )
})
DragPoint = ((), {
Size = .(, , , )
})
WindowStuff = ((((, .(, , ), , ), {
Size = .(, , , -),
Position = .(, , , )
}), {
(((), {
Size = .(, , , ),
Position = .(, , , )
}), ),
(((), {
Size = .(, , , ),
Position = .(, -, , )
}), ),
SearchBar,
(((), {
Size = .(, , , ),
Position = .(, -, , ),
AnchorPoint = .(, ),
BackgroundTransparency = ,
Name = ,
ZIndex =
}), {
((((), {
Size = .(, , , ),
Position = .(, , , ),
BackgroundTransparency = ,
Name =
}), {
(, {CornerRadius = .(, )})
}), ),
((((), {
Size = .(, , , ),
Position = .(, , , ),
BackgroundTransparency = ,
Name =
}), {
(, {CornerRadius = .(, )})
}), ),
((((), {
Size = .(, , , ),
Position = .(, , , ),
BackgroundTransparency = ,
Name =
}), {
(, {CornerRadius = .(, )})
}), )
}),
TabHolder,
(((), {
Size = .(, , , ),
Position = .(, , , -)
}), {
(, {
AnchorPoint = .(, ),
Size = .(, , , ),
Position = .(, , , ),
Name = ,
BackgroundTransparency = ,
BorderSizePixel = ,
Image = .. LocalPlayer.UserId ..
}, {
(, ),
((), )
}),
(((, LocalPlayer.DisplayName, ), {
Size = .(, -, , ),
Position = .(, , , -),
TextXAlignment = .TextXAlignment.Center,
Name = ,
Font = .Font.GothamBold,
TextScaled =
}), ),
(((, , ), {
Size = .(, -, , ),
Position = .(, , , -),
Visible = WindowConfig.HidePremium
}), )
}),
}), )
WindowNameContainer = ((), {
Size = .(, , , ),
Position = .(, , , ),
BackgroundTransparency = ,
ClipsDescendants =
})
windowLetters = {}
windowText = WindowConfig.Name
letterX =
i = , #windowText
char = windowText:(i, i)
charWidth = char ==
letterLabel = (((, char, ), {
Parent = WindowNameContainer,
Size = .(, charWidth, , ),
Position = .(, letterX, , ),
Font = .Font.GothamBlack,
BackgroundTransparency = ,
TextXAlignment = .TextXAlignment.Left
}), )
.(windowLetters, letterLabel)
letterX = letterX + charWidth
WindowName = WindowNameContainer
fpsHistory = {}
fps =
RunService.RenderStepped:((deltaTime)
.(fpsHistory, / deltaTime)
#fpsHistory >
.(fpsHistory, )
sum =
_, v (fpsHistory)
sum = sum + v
fps = .(sum / #fpsHistory)
)
StatsLabel = (((, , ), {
Size = .(, , , ),
Position = .(, -, , ),
Font = .Font.GothamBold,
TextXAlignment = .TextXAlignment.Right
}), )
(()
()
StatsLabel StatsLabel.Parent
time = .()
dateStr = .(, time.day, time.month, time.year)
timeStr = .(, time.hour, time.min)
ping = .(:().Network.ServerStatsItem[]:())
StatsLabel.Text = .(, dateStr, timeStr, fps, ping)
)
WindowTopBarLine = (((), {
Size = .(, , , ),
Position = .(, , , -)
}), )
MainWindow = ((((, .(, , ), , ), {
Parent = Orion,
Position = .(, -, , -),
Size = .(, , , ),
ClipsDescendants = ,
BackgroundTransparency = ,
Active =
}), {
(, OrionLib.Themes[OrionLib.SelectedTheme].Stroke, ),
(((), {
Size = .(, , , ),
Name =
}), {
WindowName,
StatsLabel,
WindowTopBarLine,
((((, .(, , ), , ), {
Size = .(, , , ),
Position = .(, -, , )
}), {
((), ),
(((), {
Size = .(, , , ),
Position = .(, , , )
}), ),
CloseBtn,
MinimizeBtn
}), ),
}),
DragPoint,
WindowStuff,
(((), {
Size = .(, , , ),
Position = .(, , , -),
AnchorPoint = .(, ),
BackgroundTransparency = ,
Name =
}), {
((((), {
Size = .(, , , ),
Position = .(, , , ),
BackgroundTransparency = ,
Name =
}), {
(, {CornerRadius = .(, )})
}), ),
((((), {
Size = .(, , , ),
Position = .(, , , ),
BackgroundTransparency = ,
Name =
}), {
(, {CornerRadius = .(, )})
}), ),
((((), {
Size = .(, , , ),
Position = .(, , , ),
BackgroundTransparency = ,
Name =
}), {
(, {CornerRadius = .(, )})
}), )
}),
}), )
WindowNameContainer.Parent = MainWindow.TopBar
WindowConfig.ShowIcon
WindowName.Position = .(, , , -)
WindowIcon = ((, WindowConfig.Icon), {
Size = .(, , , ),
Position = .(, , , )
})
WindowIcon.Parent = MainWindow.TopBar
(DragPoint, MainWindow)
Resizing =
ResizeBtn = MainWindow:()
ResizeBtn
Dot1 = ResizeBtn:()
Dot2 = ResizeBtn:()
Dot3 = ResizeBtn:()
(ResizeBtn.MouseEnter, ()
Dot1 TweenService:(Dot1, TweenInfo.(), {BackgroundTransparency = }):()
Dot2 TweenService:(Dot2, TweenInfo.(), {BackgroundTransparency = }):()
Dot3 TweenService:(Dot3, TweenInfo.(), {BackgroundTransparency = }):()
)
(ResizeBtn.MouseLeave, ()
Dot1 TweenService:(Dot1, TweenInfo.(), {BackgroundTransparency = }):()
Dot2 TweenService:(Dot2, TweenInfo.(), {BackgroundTransparency = }):()
Dot3 TweenService:(Dot3, TweenInfo.(), {BackgroundTransparency = }):()
)
StartSize, StartPos
(ResizeBtn.InputBegan, (Input)
Input.UserInputType == .UserInputType.MouseButton1 Input.UserInputType == .UserInputType.Touch
Resizing =
StartSize = MainWindow.AbsoluteSize
StartPos = .(Input.Position.X, Input.Position.Y)
Dot1 TweenService:(Dot1, TweenInfo.(), {BackgroundTransparency = }):()
Dot2 TweenService:(Dot2, TweenInfo.(), {BackgroundTransparency = }):()
Dot3 TweenService:(Dot3, TweenInfo.(), {BackgroundTransparency = }):()
)
(UserInputService.InputChanged, (Input)
Resizing (Input.UserInputType == .UserInputType.MouseMovement Input.UserInputType == .UserInputType.Touch)
Delta = .(Input.Position.X - StartPos.X, Input.Position.Y - StartPos.Y)
NewWidth = .(, .(, StartSize.X + Delta.X))
NewHeight = .(, .(, StartSize.Y + Delta.Y))
MainWindow.Size = .(, NewWidth, , NewHeight)
OriginalSize = MainWindow.Size
currentSideWidth = WindowStuff.AbsoluteSize.X
maxAllowedWidth = NewWidth *
NewWidth < currentSideWidth > maxAllowedWidth currentSideWidth >
targetWidth = .(, maxAllowedWidth)
TweenService:(WindowStuff, TweenInfo.(, .EasingStyle.Quint, .EasingDirection.Out), {
Size = .(, targetWidth, , -)
}):()
_, ItemContainer (MainWindow:())
ItemContainer.Name ==
TweenService:(ItemContainer, TweenInfo.(, .EasingStyle.Quint, .EasingDirection.Out), {
Size = .(, -targetWidth, , -),
Position = .(, targetWidth, , )
}):()
)
(UserInputService.InputEnded, (Input)
Input.UserInputType == .UserInputType.MouseButton1 Input.UserInputType == .UserInputType.Touch
Resizing
Resizing =
Dot1 TweenService:(Dot1, TweenInfo.(), {BackgroundTransparency = }):()
Dot2 TweenService:(Dot2, TweenInfo.(), {BackgroundTransparency = }):()
Dot3 TweenService:(Dot3, TweenInfo.(), {BackgroundTransparency = }):()
)
SideResizing =
SideResizeBtn = WindowStuff:()
SideResizeBtn
Dot1 = SideResizeBtn:()
Dot2 = SideResizeBtn:()
Dot3 = SideResizeBtn:()
(SideResizeBtn.MouseEnter, ()
SideResizing
Dot1 TweenService:(Dot1, TweenInfo.(), {BackgroundTransparency = }):()
Dot2 TweenService:(Dot2, TweenInfo.(), {BackgroundTransparency = }):()
Dot3 TweenService:(Dot3, TweenInfo.(), {BackgroundTransparency = }):()
)
(SideResizeBtn.MouseLeave, ()
SideResizing
Dot1 TweenService:(Dot1, TweenInfo.(), {BackgroundTransparency = }):()
Dot2 TweenService:(Dot2, TweenInfo.(), {BackgroundTransparency = }):()
Dot3 TweenService:(Dot3, TweenInfo.(), {BackgroundTransparency = }):()
)
StartSize, StartPos
(SideResizeBtn.InputBegan, (Input)
Input.UserInputType == .UserInputType.MouseButton1 Input.UserInputType == .UserInputType.Touch
SideResizing =
StartSize = WindowStuff.AbsoluteSize
StartPos = .(Input.Position.X, Input.Position.Y)
Dot1 TweenService:(Dot1, TweenInfo.(), {BackgroundTransparency = }):()
Dot2 TweenService:(Dot2, TweenInfo.(), {BackgroundTransparency = }):()
Dot3 TweenService:(Dot3, TweenInfo.(), {BackgroundTransparency = }):()
)
(UserInputService.InputChanged, (Input)
SideResizing (Input.UserInputType == .UserInputType.MouseMovement Input.UserInputType == .UserInputType.Touch)
Delta = .(Input.Position.X - StartPos.X, )
MaxWidth = MainWindow.AbsoluteSize.X *
NewWidth = .(, .(MaxWidth, StartSize.X + Delta.X))
WindowStuff.Size = .(, NewWidth, , -)
_, ItemContainer (MainWindow:())
ItemContainer.Name ==
ItemContainer.Size = .(, -NewWidth, , -)
ItemContainer.Position = .(, NewWidth, , )
PlayerAvatar = WindowStuff:(, )
PlayerName = WindowStuff:(, )
SearchBox
NewWidth <
SearchBox.PlaceholderText =
SearchBox.Text = SearchBox.Text == SearchBox.Text
SearchBox.PlaceholderText =
_, Tab (TabHolder:())
Tab:()
TabTitle = Tab:()
TabTitle
NewWidth <
TabTitle.Visible =
TabTitle.Visible =
NewWidth <
PlayerAvatar PlayerAvatar.Visible =
PlayerName PlayerName.Visible =
NewWidth <
PlayerAvatar
PlayerAvatar.Visible =
PlayerName PlayerName.Visible =
PlayerAvatar
PlayerAvatar.Visible =
PlayerName
PlayerName.Visible =
)
(UserInputService.InputEnded, (Input)
Input.UserInputType == .UserInputType.MouseButton1 Input.UserInputType == .UserInputType.Touch
SideResizing
SideResizing =
Dot1 TweenService:(Dot1, TweenInfo.(), {BackgroundTransparency = }):()
Dot2 TweenService:(Dot2, TweenInfo.(), {BackgroundTransparency = }):()
Dot3 TweenService:(Dot3, TweenInfo.(), {BackgroundTransparency = }):()
)
(MobileOpenButton.MouseButton1Click, ()
MobileOpenButton.Visible =
MainWindow.Visible =
UIHidden =
freeMouse.Modal =
buttonmodal.Modal =
UserInputService.MouseIconEnabled =
freeMouse.Visible =
)
()
UserInputService.TouchEnabled UserInputService.KeyboardEnabled
UIHidden
MobileOpenButton.Visible =
MobileOpenButton.Visible =
(CloseBtn.MouseButton1Up, ()
MainWindow.Visible =
UIHidden =
mouselock =
freeMouse.Visible =
freeMouse.Modal =
buttonmodal.Modal =
UserInputService.MouseBehavior = .MouseBehavior.LockCenter
UserInputService.MouseIconEnabled =
WindowConfig.FreeMouse
()
OrionLib:({
Name = ,
Content = .. WindowConfig.KeyToOpenWindow .. ,
Time =
})
()
WindowConfig.()
)
(UserInputService.InputBegan, (Input, gameProcessed)
gameProcessed
Input.KeyCode == .KeyCode[WindowConfig.KeyToOpenWindow]
UIHidden
MainWindow.Visible =
UIHidden =
freeMouse.Visible =
freeMouse.Modal =
buttonmodal.Modal =
UserInputService.MouseBehavior = .MouseBehavior.Default
UserInputService.MouseIconEnabled =
WindowConfig.FreeMouse
()
()
MainWindow.Visible =
UIHidden =
mouselock =
freeMouse.Visible =
freeMouse.Modal =
buttonmodal.Modal =
UserInputService.MouseBehavior = .MouseBehavior.LockCenter
UserInputService.MouseIconEnabled =
WindowConfig.FreeMouse
()
()
WindowConfig.()
)
OriginalSize = .(, , , )
nameWidth = #WindowConfig.Name *
statsWidth =
buttonsWidth =
padding =
minimizedWidth = .(, nameWidth + statsWidth + buttonsWidth + padding)
MinimizedSize = .(, minimizedWidth, , )
savedVisibility = {}
savedSideWidth =
savedWindowSize =
letterAnimationLoop =
letterAnimationActive =
()
letterAnimationLoop
letterAnimationLoop = .(()
.()
letterAnimationActive
i = #windowLetters, , -
letterAnimationActive
letter = windowLetters[i]
TweenService:(letter, TweenInfo.(, .EasingStyle.Sine, .EasingDirection.InOut), {
TextTransparency =
}):()
.()
.()
i = , #windowLetters
letterAnimationActive
letter = windowLetters[i]
TweenService:(letter, TweenInfo.(, .EasingStyle.Sine, .EasingDirection.InOut), {
TextTransparency =
}):()
.()
.()
letterAnimationLoop =
)
()
(MinimizeBtn.MouseButton1Up, ()
Resizing
Minimized
Minimized =
MinimizeBtn.Ico.Image =
freeMouse.Visible =
freeMouse.Modal =
UserInputService.MouseBehavior = .MouseBehavior.Default
UserInputService.MouseIconEnabled =
WindowStuff.Visible =
WindowTopBarLine.Visible =
ResizeBtn ResizeBtn.Visible =
SideResizeBtn SideResizeBtn.Visible =
ClockLabel ClockLabel.Visible =
element, wasVisible (savedVisibility)
element element.Parent
element.Visible = wasVisible
savedSideWidth
WindowStuff.Size = .(, savedSideWidth, , -)
_, ItemContainer (MainWindow:())
ItemContainer.Name ==
ItemContainer.Size = .(, -savedSideWidth, , -)
ItemContainer.Position = .(, savedSideWidth, , )
savedWindowSize
OriginalSize = savedWindowSize
StatsLabel
StatsLabel.TextXAlignment = .TextXAlignment.Right
StatsLabel.Position = .(, -, , )
StatsLabel.Size = .(, , , )
MainWindow.ClipsDescendants =
restoreTween = TweenService:(MainWindow, TweenInfo.(, .EasingStyle.Quint, .EasingDirection.Out), {Size = OriginalSize})
restoreTween:()
restoreTween.Completed:(()
MainWindow.ClipsDescendants =
)
savedVisibility = {}
Minimized =
MinimizeBtn.Ico.Image =
savedSideWidth = WindowStuff.AbsoluteSize.X
savedWindowSize = MainWindow.Size
_, child (WindowStuff:())
child:()
savedVisibility[child] = child.Visible
StatsLabel
statsX = nameWidth +
StatsLabel.TextXAlignment = .TextXAlignment.Left
TweenService:(StatsLabel, TweenInfo.(, .EasingStyle.Quad, .EasingDirection.Out), {
Position = .(, statsX, , ),
Size = .(, statsWidth, , )
}):()
MainWindow.ClipsDescendants =
minimizeTween = TweenService:(MainWindow, TweenInfo.(, .EasingStyle.Quint, .EasingDirection.Out), {Size = MinimizedSize})
minimizeTween:()
.()
WindowStuff.Visible =
WindowTopBarLine.Visible =
ResizeBtn ResizeBtn.Visible =
SideResizeBtn SideResizeBtn.Visible =
ClockLabel ClockLabel.Visible =
)
()
MainWindow.Visible =
LoadBg = ((), {
Parent = Orion,
Size = .(, , , ),
BackgroundColor3 = .(, , ),
BackgroundTransparency = ,
ZIndex =
})
LoadSequenceLogo = ((, WindowConfig.IntroIcon), {
Parent = LoadBg,
AnchorPoint = .(, ),
Position = .(, , , ),
Size = .(, , , ),
ImageColor3 = .(, , ),
ImageTransparency = ,
ZIndex =
})
TextContainer = ((), {
Parent = LoadBg,
Size = .(, , , ),
AnchorPoint = .(, ),
Position = .(, , , ),
BackgroundTransparency = ,
ZIndex =
})
text = WindowConfig.IntroText
letters = {}
totalWidth =
i = , #text
char = text:(i, i)
charWidth = char ==
totalWidth = totalWidth + charWidth
currentX = -totalWidth /
i = , #text
char = text:(i, i)
charWidth = char ==
letterLabel = ((, char, ), {
Parent = TextContainer,
Size = .(, charWidth, , ),
Position = .(, currentX, , ),
Font = .Font.GothamBold,
TextTransparency = ,
TextColor3 = .(, , ),
BackgroundTransparency = ,
ZIndex =
})
.(letters, letterLabel)
currentX = currentX + charWidth
LoadingBar = (((), {
Parent = LoadBg,
AnchorPoint = .(, ),
Position = .(, , , ),
Size = .(, , , ),
BackgroundColor3 = .(, , ),
BackgroundTransparency = ,
ZIndex =
}), {
((), {
Size = .(, , , ),
BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Stroke,
Name = ,
ZIndex =
}),
(, {CornerRadius = .(, )})
})
TweenService:(LoadSequenceLogo, TweenInfo.(, .EasingStyle.Back, .EasingDirection.Out), {Size = .(, , , ), ImageTransparency = }):()
()
i, letter (letters)
.(()
(i * )
TweenService:(letter, TweenInfo.(, .EasingStyle.Quad, .EasingDirection.Out), {TextTransparency = }):()
)
( + #letters * )
TweenService:(LoadingBar.Fill, TweenInfo.(, .EasingStyle.Quad, .EasingDirection.Out), {Size = .(, , , )}):()
()
i = #letters, , -
letter = letters[i]
.(()
((#letters - i) * )
TweenService:(letter, TweenInfo.(, .EasingStyle.Quad, .EasingDirection.Out), {
TextTransparency = ,
Position = letter.Position + .(, , , -)
}):()
)
TweenService:(LoadBg, TweenInfo.(, .EasingStyle.Quad, .EasingDirection.Out), {BackgroundTransparency = }):()
TweenService:(LoadSequenceLogo, TweenInfo.(, .EasingStyle.Quad, .EasingDirection.Out), {ImageTransparency = }):()
TweenService:(LoadingBar, TweenInfo.(, .EasingStyle.Quad, .EasingDirection.Out), {BackgroundTransparency = }):()
TweenService:Create(LoadingBar.Fill, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundTransparency = 1}):Play()
MainWindow.Visible = true
freeMouse.Modal = true
buttonmodal.Modal = true
UserInputService.MouseIconEnabled = true
freeMouse.Visible = true
wait(0.5)
LoadBg:Destroy()
end
if WindowConfig.IntroEnabled then
LoadSequence()
end
-- Ativar freeMouse quando UI abre
freeMouse.Visible = true
if WindowConfig.FreeMouse then
-- Free mouse enabled silently
end
local TabFunction = {}
function TabFunction:MakeTab(TabConfig)
TabConfig = TabConfig or {}
TabConfig.Name = TabConfig.Name or "Tab"
TabConfig.Icon = TabConfig.Icon or ""
TabConfig.PremiumOnly = TabConfig.PremiumOnly or false
local TabFrame = SetChildren(SetProps(MakeElement("Button"), {
Size = UDim2.new(1, 0, 0, 30),
Parent = TabHolder
}), {
AddThemeObject(SetProps(MakeElement("Image", TabConfig.Icon), {
AnchorPoint = Vector2.new(0, 0.5),
Size = UDim2.new(0, 18, 0, 18),
Position = UDim2.new(0, 10, 0.5, 0),
ImageTransparency = 1,
Name = "Ico"
}), "Text"),
AddThemeObject(SetProps(MakeElement("Label", TabConfig.Name, 14), {
Size = UDim2.new(1, -35, 1, 0),
Position = UDim2.new(0, 35, 0, 0),
Font = Enum.Font.GothamSemibold,
TextTransparency = 1,
Name = "Title"
}), "Text")
})
if GetIcon(TabConfig.Icon) ~= nil then
TabFrame.Ico.Image = GetIcon(TabConfig.Icon)
end
-- Adicionar tab à tabela Tabs para o SearchBar
Tabs[TabConfig.Name] = TabFrame
-- Sem animação = mais rápido
TabFrame.Ico.ImageTransparency = 0.4
TabFrame.Title.TextTransparency = 0.4
local Container = AddThemeObject(SetChildren(SetProps(MakeElement("ScrollFrame", Color3.fromRGB(255, 255, 255), 5), {
Size = UDim2.new(1, -150, 1, -50),
Position = UDim2.new(0, 150, 0, 50),
Parent = MainWindow,
Visible = false,
Name = "ItemContainer",
ClipsDescendants = true,
BorderSizePixel = 0
}), {
MakeElement("List", 0, 6),
MakeElement("Padding", 15, 10, 10, 15)
}), "Divider")
AddConnection(Container.UIListLayout:GetPropertyChangedSignal("AbsoluteContentSize"), function()
Container.CanvasSize = UDim2.new(0, 0, 0, Container.UIListLayout.AbsoluteContentSize.Y + 30)
end)
if FirstTab then
FirstTab = false
TabFrame.Ico.ImageTransparency = 0
TabFrame.Title.TextTransparency = 0
TabFrame.Title.Font = Enum.Font.GothamBlack
Container.Visible = true
end
AddConnection(TabFrame.MouseButton1Click, function()
for _, Tab in next, TabHolder:GetChildren() do
if Tab:IsA("TextButton") then
Tab.Title.Font = Enum.Font.GothamSemibold
TweenService:Create(Tab.Ico, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {ImageTransparency = 0.4}):Play()
TweenService:Create(Tab.Title, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {TextTransparency = 0.4}):Play()
end
end
for _, ItemContainer in next, MainWindow:GetChildren() do
if ItemContainer.Name == "ItemContainer" then
ItemContainer.Visible = false
end
end
TweenService:Create(TabFrame.Ico, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {ImageTransparency = 0}):Play()
TweenService:Create(TabFrame.Title, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {TextTransparency = 0}):Play()
TabFrame.Title.Font = Enum.Font.GothamBlack
Container.Visible = true
end)
local function GetElements(ItemParent)
local ElementFunction = {}
function ElementFunction:AddLabel(Text)
local LabelContent = AddThemeObject(SetProps(MakeElement("Label", "", 15), {
Size = UDim2.new(1, -12, 1, 0),
Position = UDim2.new(0, 12, 0, 0),
Font = Enum.Font.GothamBold,
Name = "Content"
}), "Text")
local LabelFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
Size = UDim2.new(1, 0, 0, 30),
BackgroundTransparency = 0.7,
Parent = ItemParent
}), {
LabelContent,
AddThemeObject(MakeElement("Stroke"), "Stroke")
}), "Second")
LabelContent.Text = Text
local LabelFunction = {}
function LabelFunction:Set(ToChange)
LabelContent.Text = ToChange
end
return LabelFunction
end
function ElementFunction:AddPlayerParagraph(userId)
userId = userId or 0
local displayName = "Unknown"
local username = "Unknown"
local success, result = pcall(function()
return UserService:GetUserInfosByUserIdsAsync({userId})
end)
if success and result and result[1] then
displayName = result[1].DisplayName or "Unknown"
username = result[1].Username or "Unknown"
end
local ParagraphFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
Size = UDim2.new(1, 0, 0, 70),
BackgroundTransparency = 0.7,
Parent = ItemParent
}), {
SetProps(MakeElement("Image", "", 0), {
Name = "Avatar",
Size = UDim2.new(0, 60, 0, 60),
Position = UDim2.new(0, 5, 0, 5),
BackgroundTransparency = 1,
Image = "https://www.roblox.com/headshot-thumbnail/image?userId=" .. userId .. "&width=420&height=420&format=png"
}),
AddThemeObject(SetProps(MakeElement("Label", displayName, 15), {
Name = "DisplayName",
Size = UDim2.new(1, -70, 0, 20),
Position = UDim2.new(0, 70, 0, 10),
Font = Enum.Font.GothamBold,
TextXAlignment = Enum.TextXAlignment.Left
}), "Text"),
AddThemeObject(SetProps(MakeElement("Label", username, 13), {
Name = "Username",
Size = UDim2.new(1, -70, 0, 20),
Position = UDim2.new(0, 70, 0, 35),
Font = Enum.Font.GothamSemibold,
TextXAlignment = Enum.TextXAlignment.Left
}), "TextDark"),
AddThemeObject(MakeElement("Stroke"), "Stroke")
}), "Second")
local PlayerParagraph = {}
function PlayerParagraph:Set(newUserId)
newUserId = newUserId or 0
local dname = "Unknown"
local uname = "Unknown"
local ok, data = pcall(function()
return UserService:GetUserInfosByUserIdsAsync({newUserId})
end)
if ok and data and data[1] then
dname = data[1].DisplayName or "Unknown"
uname = data[1].Username or "Unknown"
end
ParagraphFrame.DisplayName.Text = dname
ParagraphFrame.DisplayName.Visible = true
ParagraphFrame.Username.Text = uname
ParagraphFrame.Username.Position = UDim2.new(0, 70, 0, 35)
ParagraphFrame.Avatar.Image = "https://www.roblox.com/headshot-thumbnail/image?userId=" .. newUserId .. "&width=420&height=420&format=png"
end
return PlayerParagraph
end
function ElementFunction:AddParagraph(Text, Content)
Text = Text or "Text"
Content = Content or "Content"
local ParagraphFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
Size = UDim2.new(1, 0, 0, 30),
BackgroundTransparency = 0.7,
Parent = ItemParent
}), {
AddThemeObject(SetProps(MakeElement("Label", Text, 15), {
Size = UDim2.new(1, -12, 0, 14),
Position = UDim2.new(0, 12, 0, 10),
Font = Enum.Font.GothamBold,
Name = "Title"
}), "Text"),
AddThemeObject(SetProps(MakeElement("Label", "", 13), {
Size = UDim2.new(1, -24, 0, 0),
Position = UDim2.new(0, 12, 0, 26),
Font = Enum.Font.GothamSemibold,
Name = "Content",
TextWrapped = true
}), "TextDark"),
AddThemeObject(MakeElement("Stroke"), "Stroke")
}), "Second")
AddConnection(ParagraphFrame.Content:GetPropertyChangedSignal("Text"), function()
ParagraphFrame.Content.Size = UDim2.new(1, -24, 0, ParagraphFrame.Content.TextBounds.Y)
ParagraphFrame.Size = UDim2.new(1, 0, 0, ParagraphFrame.Content.TextBounds.Y + 35)
end)
ParagraphFrame.Content.Text = Content
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"
local Button = {}
local Click = SetProps(MakeElement("Button"), {
Size = UDim2.new(1, 0, 1, 0)
})
local ButtonLabel = AddThemeObject(SetProps(MakeElement("Label", "", 15), {
Size = UDim2.new(1, -12, 1, 0),
Position = UDim2.new(0, 12, 0, 0),
Font = Enum.Font.GothamBold,
Name = "Content"
}), "Text")
local ButtonFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
Size = UDim2.new(1, 0, 0, 33),
Parent = ItemParent
}), {
ButtonLabel,
AddThemeObject(SetProps(MakeElement("Image", ButtonConfig.Icon), {
Size = UDim2.new(0, 20, 0, 20),
Position = UDim2.new(1, -30, 0, 7),
}), "TextDark"),
AddThemeObject(MakeElement("Stroke"), "Stroke"),
Click
}), "Second")
ButtonLabel.Text = ButtonConfig.Name
AddConnection(Click.MouseEnter, function()
TweenService:Create(ButtonFrame, TweenCache.Buttery, {BackgroundColor3 = Color3.fromRGB(OrionLib.Themes[OrionLib.SelectedTheme].Second.R * 255 + 8, OrionLib.Themes[OrionLib.SelectedTheme].Second.G * 255 + 8, OrionLib.Themes[OrionLib.SelectedTheme].Second.B * 255 + 8)}):Play()
end)
AddConnection(Click.MouseLeave, function()
TweenService:Create(ButtonFrame, TweenCache.Buttery, {BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Second}):Play()
end)
AddConnection(Click.MouseButton1Up, function()
TweenService:Create(ButtonFrame, TweenCache.Buttery, {BackgroundColor3 = Color3.fromRGB(OrionLib.Themes[OrionLib.SelectedTheme].Second.R * 255 + 8, OrionLib.Themes[OrionLib.SelectedTheme].Second.G * 255 + 8, OrionLib.Themes[OrionLib.SelectedTheme].Second.B * 255 + 8)}):Play()
spawn(function()
ButtonConfig.Callback()
end)
end)
AddConnection(Click.MouseButton1Down, function()
TweenService:Create(ButtonFrame, TweenCache.UltraFast, {BackgroundColor3 = Color3.fromRGB(OrionLib.Themes[OrionLib.SelectedTheme].Second.R * 255 + 12, OrionLib.Themes[OrionLib.SelectedTheme].Second.G * 255 + 12, OrionLib.Themes[OrionLib.SelectedTheme].Second.B * 255 + 12)}):Play()
end)
function Button:Set(ButtonText)
ButtonFrame.Content.Text = ButtonText
end
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.Color = ToggleConfig.Color or OrionLib.Themes[OrionLib.SelectedTheme].Stroke
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),
ZIndex = 5,
Active = true
})
local ToggleBox = SetChildren(SetProps(MakeElement("RoundFrame", ToggleConfig.Color, 0, 4), {
Size = UDim2.new(0, 24, 0, 24),
Position = UDim2.new(1, -24, 0.5, 0),
AnchorPoint = Vector2.new(0.5, 0.5)
}), {
SetProps(MakeElement("Stroke"), {
Color = ToggleConfig.Color,
Name = "Stroke",
Transparency = 0.5
}),
SetProps(MakeElement("Image", "rbxassetid://3944680095"), {
Size = UDim2.new(0, 20, 0, 20),
AnchorPoint = Vector2.new(0.5, 0.5),
Position = UDim2.new(0.5, 0, 0.5, 0),
ImageColor3 = Color3.fromRGB(255, 255, 255),
Name = "Ico"
}),
})
local ToggleFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
Size = UDim2.new(1, 0, 0, 38),
Parent = ItemParent
}), {
AddThemeObject(SetProps(MakeElement("Label", ToggleConfig.Name, 15), {
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"),
ToggleBox,
Click
}), "Second")
function Toggle:Set(Value)
Toggle.Value = Value
local currentColor = OrionLib.Themes[OrionLib.SelectedTheme].Stroke
local offColor = Color3.fromRGB(
math.clamp(OrionLib.Themes[OrionLib.SelectedTheme].Second.R * 255 - 10, 0, 255),
math.clamp(OrionLib.Themes[OrionLib.SelectedTheme].Second.G * 255 - 10, 0, 255),
math.clamp(OrionLib.Themes[OrionLib.SelectedTheme].Second.B * 255 - 10, 0, 255)
)
TweenService:Create(ToggleBox, TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = Toggle.Value and currentColor or offColor}):Play()
TweenService:Create(ToggleBox.Stroke, TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Color = Toggle.Value and currentColor or Color3.fromRGB(80, 80, 80), Transparency = Toggle.Value and 0.5 or 0.7}):Play()
TweenService:Create(ToggleBox.Ico, TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {ImageTransparency = Toggle.Value and 0 or 1, Size = Toggle.Value and UDim2.new(0, 20, 0, 20) or UDim2.new(0, 8, 0, 8)}):Play()
ToggleConfig.Callback(Toggle.Value)
end
-- Aplicar estado inicial do toggle
task.spawn(function()
Toggle:Set(Toggle.Value)
end)
AddConnection(Click.MouseEnter, function()
TweenService:Create(ToggleFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = Color3.fromRGB(OrionLib.Themes[OrionLib.SelectedTheme].Second.R * 255 + 3, OrionLib.Themes[OrionLib.SelectedTheme].Second.G * 255 + 3, OrionLib.Themes[OrionLib.SelectedTheme].Second.B * 255 + 3)}):Play()
end)
AddConnection(Click.MouseLeave, function()
TweenService:Create(ToggleFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Second}):Play()
end)
AddConnection(Click.Activated, function()
TweenService:Create(ToggleFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = Color3.fromRGB(OrionLib.Themes[OrionLib.SelectedTheme].Second.R * 255 + 3, OrionLib.Themes[OrionLib.SelectedTheme].Second.G * 255 + 3, OrionLib.Themes[OrionLib.SelectedTheme].Second.B * 255 + 3)}):Play()
SaveCfg(game.GameId)
Toggle:Set(not Toggle.Value)
end)
AddConnection(Click.MouseButton1Down, function()
TweenService:Create(ToggleFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = Color3.fromRGB(OrionLib.Themes[OrionLib.SelectedTheme].Second.R * 255 + 6, OrionLib.Themes[OrionLib.SelectedTheme].Second.G * 255 + 6, OrionLib.Themes[OrionLib.SelectedTheme].Second.B * 255 + 6)}):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.Color = SliderConfig.Color or OrionLib.Themes[OrionLib.SelectedTheme].Stroke
SliderConfig.Flag = SliderConfig.Flag or nil
SliderConfig.Save = SliderConfig.Save or false
local Slider = {Value = SliderConfig.Default, Save = SliderConfig.Save}
local Dragging = false
local SliderDrag = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", SliderConfig.Color, 0, 5), {
Size = UDim2.new(0, 0, 1, 0),
BackgroundTransparency = 0.3,
ClipsDescendants = true
}), {
AddThemeObject(SetProps(MakeElement("Label", "value", 13), {
Size = UDim2.new(1, -12, 0, 14),
Position = UDim2.new(0, 12, 0, 6),
Font = Enum.Font.GothamBold,
Name = "Value",
TextTransparency = 0
}), "Text")
}), "Stroke")
local SliderBar = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", SliderConfig.Color, 0, 5), {
Size = UDim2.new(1, -24, 0, 26),
Position = UDim2.new(0, 12, 0, 30),
BackgroundTransparency = 0.9
}), {
AddThemeObject(SetProps(MakeElement("Stroke"), {
Color = SliderConfig.Color
}), "Stroke"),
AddThemeObject(SetProps(MakeElement("Label", "value", 13), {
Size = UDim2.new(1, -12, 0, 14),
Position = UDim2.new(0, 12, 0, 6),
Font = Enum.Font.GothamBold,
Name = "Value",
TextTransparency = 0.8
}), "Text"),
SliderDrag
}), "Stroke")
local SliderFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 4), {
Size = UDim2.new(1, 0, 0, 65),
Parent = ItemParent
}), {
AddThemeObject(SetProps(MakeElement("Label", SliderConfig.Name, 15), {
Size = UDim2.new(1, -12, 0, 14),
Position = UDim2.new(0, 12, 0, 10),
Font = Enum.Font.GothamBold,
Name = "Content"
}), "Text"),
AddThemeObject(MakeElement("Stroke"), "Stroke"),
SliderBar
}), "Second")
local Dragging, DragInput, MousePos, FramePos = false
AddConnection(SliderBar.InputBegan, function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then
Dragging = true
MousePos = Input.Position
FramePos = SliderBar.Position
AddConnection(Input.Changed, function()
if Input.UserInputState == Enum.UserInputState.End then
Dragging = false
FocusDrag = nil
end
end)
end
end)
AddConnection(SliderBar.InputChanged, function(Input)
if Input.UserInputType == Enum.UserInputType.MouseMovement or Input.UserInputType == Enum.UserInputType.Touch and not FocusDrag then
DragInput = Input
FocusDrag = DragInput
end
end)
AddConnection(UserInputService.InputChanged, function(Input)
if Input == DragInput and Input == FocusDrag and Dragging then
local SizeScale = math.clamp((Input.Position.X - SliderBar.AbsolutePosition.X) / SliderBar.AbsoluteSize.X, 0, 1)
Slider:Set(SliderConfig.Min + ((SliderConfig.Max - SliderConfig.Min) * SizeScale))
SaveCfg(game.GameId)
end
end)
function Slider:Set(Value)
self.Value = math.clamp(Round(Value, SliderConfig.Increment), SliderConfig.Min, SliderConfig.Max)
TweenService:Create(SliderDrag,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{Size = UDim2.fromScale((self.Value - SliderConfig.Min) / (SliderConfig.Max - SliderConfig.Min), 1)}):Play()
SliderBar.Value.Text = tostring(self.Value) .. " " .. SliderConfig.ValueName
SliderDrag.Value.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:AddMultipleDropdown(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
if not table.find(Dropdown.Options, Dropdown.Value) then
Dropdown.Value = "..."
end
local SelectedValues = {}
local DropdownList = MakeElement("List")
local DropdownContainer = AddThemeObject(SetProps(SetChildren(MakeElement("ScrollFrame", Color3.fromRGB(40, 40, 40), 4), {
DropdownList
}), {
Parent = ItemParent,
Position = UDim2.new(0, 0, 0, 38),
Size = UDim2.new(1, 0, 1, -38),
ClipsDescendants = true
}), "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, 5), {
Size = UDim2.new(1, 0, 0, 38),
Parent = ItemParent,
ClipsDescendants = true
}), {
DropdownContainer,
SetProps(SetChildren(MakeElement("TFrame"), {
AddThemeObject(SetProps(MakeElement("Label", DropdownConfig.Name, 15), {
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, -40, 1, 0),
Font = Enum.Font.Gotham,
Name = "Selected",
TextXAlignment = Enum.TextXAlignment.Right
}), "TextDark"),
AddThemeObject(SetProps(MakeElement("Frame"), {
Size = UDim2.new(1, 0, 0, 1),
Position = UDim2.new(0, 0, 1, -1),
Name = "Line",
Visible = false
}), "Stroke"),
Click
}), {
Size = UDim2.new(1, 0, 0, 38),
ClipsDescendants = true,
Name = "F"
}),
AddThemeObject(MakeElement("Stroke"), "Stroke"),
MakeElement("Corner")
}), "Second")
AddConnection(DropdownList:GetPropertyChangedSignal("AbsoluteContentSize"), function()
DropdownContainer.CanvasSize = UDim2.new(0, 0, 0, DropdownList.AbsoluteContentSize.Y)
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, 8, 0, 0),
Size = UDim2.new(1, -8, 1, 0),
Name = "Title"
}), "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)
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)
local n = table.find(SelectedValues, Value)
local text = ""
if not n then
print("Adicionado")
table.insert(SelectedValues, Value)
DropdownFrame.F.Selected.Text = Dropdown.Value
TweenService:Create(Dropdown.Buttons[Value],TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{BackgroundTransparency = 0}):Play()
TweenService:Create(Dropdown.Buttons[Value].Title,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{TextTransparency = 0}):Play()
else
print("Removido")
table.remove(SelectedValues, n)
TweenService:Create(Dropdown.Buttons[Value],TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{BackgroundTransparency = 1}):Play()
TweenService:Create(Dropdown.Buttons[Value].Title,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{TextTransparency = 0.4}):Play()
end
for i, v in pairs(SelectedValues) do
if #SelectedValues == i then
text = text .. v
else
text = text .. v .. ", "
end
end
Dropdown.Value = Value
DropdownFrame.F.Selected.Text = text
return DropdownConfig.Callback(SelectedValues)
end
AddConnection(Click.MouseButton1Click, function()
Dropdown.Toggled = not Dropdown.Toggled
DropdownFrame.F.Line.Visible = Dropdown.Toggled
TweenService:Create(DropdownFrame.F.Ico,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{Rotation = Dropdown.Toggled and 180 or 0}):Play()
if #Dropdown.Options > MaxElements then
TweenService:Create(DropdownFrame,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{Size = Dropdown.Toggled and UDim2.new(1, 0, 0, 38 + (MaxElements * 28)) or UDim2.new(1, 0, 0, 38)}):Play()
else
TweenService:Create(DropdownFrame,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{Size = Dropdown.Toggled and UDim2.new(1, 0, 0, DropdownList.AbsoluteContentSize.Y + 38) or UDim2.new(1, 0, 0, 38)}):Play()
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:AddPlayersDropdown(DropdownConfig)
DropdownConfig = DropdownConfig or {}
DropdownConfig.Name = DropdownConfig.Name or "Dropdown"
DropdownConfig.Options = DropdownConfig.Options or {}
DropdownConfig.RemoveDp = DropdownConfig.RemoveDP or false
DropdownConfig.Default = DropdownConfig.Default or ""
DropdownConfig.Callback = DropdownConfig.Callback or function() end
DropdownConfig.Flag = DropdownConfig.Flag or nil
DropdownConfig.MultipleSelection = DropdownConfig.MultipleSelection or false
DropdownConfig.Save = DropdownConfig.Save or false
local Dropdown = {Value = DropdownConfig.Default, Options = DropdownConfig.Options, Buttons = {}, Toggled = false, Type = "Dropdown", Save = DropdownConfig.Save, MultipleSelection = DropdownConfig.MultipleSelection}
local MaxElements = 3
if not table.find(Dropdown.Options, Dropdown.Value) then
Dropdown.Value = "..."
end
local SelectedValues = {}
local Options = 0
local DropdownList = MakeElement("List")
local DropdownContainer = AddThemeObject(SetProps(SetChildren(MakeElement("ScrollFrame", Color3.fromRGB(40, 40, 40), 4), {
DropdownList
}), {
Parent = ItemParent,
Position = UDim2.new(0, 0, 0, 38),
Size = UDim2.new(1, 0, 1, -38),
ClipsDescendants = true
}), "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, 5), {
Size = UDim2.new(1, 0, 0, 38),
Parent = ItemParent,
ClipsDescendants = true
}), {
DropdownContainer,
SetProps(SetChildren(MakeElement("TFrame"), {
AddThemeObject(SetProps(MakeElement("Label", DropdownConfig.Name, 15), {
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, -40, 1, 0),
Font = Enum.Font.Gotham,
Name = "Selected",
TextXAlignment = Enum.TextXAlignment.Right
}), "TextDark"),
AddThemeObject(SetProps(MakeElement("Frame"), {
Size = UDim2.new(1, 0, 0, 1),
Position = UDim2.new(0, 0, 1, -1),
Name = "Line",
Visible = false
}), "Stroke"),
Click
}), {
Size = UDim2.new(1, 0, 0, 38),
ClipsDescendants = true,
Name = "F"
}),
AddThemeObject(MakeElement("Stroke"), "Stroke"),
MakeElement("Corner")
}), "Second")
AddConnection(DropdownList:GetPropertyChangedSignal("AbsoluteContentSize"), function()
DropdownContainer.CanvasSize = UDim2.new(0, 0, 0, DropdownList.AbsoluteContentSize.Y)
if Options <= MaxElements then
TweenService:Create(DropdownFrame,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Size = Dropdown.Toggled and UDim2.new(1, 0, 0, 38 + (Options * 45)) or UDim2.new(1, 0, 0, 38)}):Play()
end
end)
local function RemoveOption(Option)
if Dropdown.Buttons[Option] then
local n = table.find(SelectedValues, Option)
if n then
Dropdown.Buttons[Option].State.Visible = true
TweenService:Create(Dropdown.Buttons[Option],TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{BackgroundColor3 = Color3.fromRGB(200, 80, 80)}):Play()
else
Dropdown.Buttons[Option]:Destroy()
Dropdown.Buttons[Option] = nil
Options = Options - 1
end
end
end
local function AddOption(Option)
local Player_Name = Option.Name
local Player_Display = Option.DisplayName
local UId = Option.UserId
local Option = Player_Name
if not Dropdown.Buttons[Option] then
local OptionBtn = AddThemeObject(SetProps(SetChildren(MakeElement("Button", Color3.fromRGB(40, 40, 40)), {
MakeElement("Corner", 0, 6),
SetProps(MakeElement("Image", "https://www.roblox.com/headshot-thumbnail/image?userId=".. UId .."&width=420&height=420&format=png"), {
Size = UDim2.new(0, 40, 0, 40),
AnchorPoint = Vector2.new(0.5, 0.5),
Position = UDim2.new(0.05, 0, 0.5, 0),
ImageColor3 = Color3.fromRGB(240, 240, 240),
Name = "Icon"
}),
SetProps(MakeElement("Image", "rbxassetid://118759916599176"), {
Size = UDim2.new(0, 35, 0, 35),
AnchorPoint = Vector2.new(0.5, 0.5),
Position = UDim2.new(0.94, 0, 0.5, 0),
ImageColor3 = Color3.fromRGB(41, 0, 5),
Name = "State",
Visible = false
}),
AddThemeObject(SetProps(MakeElement("Label", "@" .. Option, 13, 0.4), {
Position = UDim2.new(0.135, 0, 0, 7),
Size = UDim2.new(1, -10, 1, 0),
Name = "Title"
}), "Text"),
AddThemeObject(SetProps(MakeElement("Label", Player_Display, 17, 0.4), {
Position = UDim2.new(0.135, 0, 0, -5),
Size = UDim2.new(1, -8, 1, 0),
Name = "Subtitle"
}), "Text"),
}), {
Parent = DropdownContainer,
Size = UDim2.new(1, 0, 0, 45),
BackgroundTransparency = 1,
ClipsDescendants = true
}), "Divider")
AddConnection(OptionBtn.MouseButton1Click, function()
Dropdown:Set(Option)
SaveCfg(game.GameId)
end)
Dropdown.Buttons[Option] = OptionBtn
Options = Options + 1
else
local n = table.find(SelectedValues, Option)
if n then
Dropdown.Buttons[Option].State.Visible = false
TweenService:Create(Dropdown.Buttons[Option],TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme]["Divider"]}):Play()
else
Dropdown.Buttons[Option]:Destroy()
Dropdown.Buttons[Option] = nil
Options = Options - 1
end
end
end
for _, p in pairs(PlayerService:GetPlayers()) do
AddOption(p)
end
PlayerService.PlayerAdded:Connect(function(p)
AddOption(p)
end)
PlayerService.PlayerRemoving:Connect(function(p)
RemoveOption(p.Name)
end)
local function DeleteAllDisconnectedPlayers()
for i, v in pairs(Dropdown.Buttons) do
if v and v:FindFirstChild("State") and v["State"].Visible then
Dropdown.Buttons[i]:Destroy()
Dropdown.Buttons[i] = nil
Options = Options - 1
end
end
end
function Dropdown:Refresh() end
function Dropdown:Set(Value, Once)
local n = table.find(SelectedValues, Value)
local text = ""
local Button = Dropdown.Buttons[Value]
if not Button then
for i = 0, 10 do
if Dropdown.Buttons[Value] then
Button = Dropdown.Buttons[Value]
break
end
wait(0.15)
end
end
if Button then
if Dropdown.MultipleSelection then
if not n then
print("Adicionado")
table.insert(SelectedValues, Value)
DropdownFrame.F.Selected.Text = Dropdown.Value
TweenService:Create(Dropdown.Buttons[Value],TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{BackgroundTransparency = 0.5}):Play()
TweenService:Create(Dropdown.Buttons[Value].Title,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{TextTransparency = 0}):Play()
elseif n and not Once then
print("Removido")
table.remove(SelectedValues, n)
if Dropdown.Buttons[Value].State.Visible then
Dropdown.Buttons[Value]:Destroy()
Dropdown.Buttons[Value] = nil
Options = Options - 1
else
TweenService:Create(Dropdown.Buttons[Value],TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{BackgroundTransparency = 1}):Play()
TweenService:Create(Dropdown.Buttons[Value].Title,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{TextTransparency = 0.4}):Play()
end
end
for i, v in pairs(SelectedValues) do
if #SelectedValues == 1 then
text = text .. v
elseif i > 3 then
text = text .. "..."
break
else
text = text .. v .. ", "
end
end
Dropdown.Value = Value
DropdownFrame.F.Selected.Text = text
return DropdownConfig.Callback(SelectedValues)
else
table.clear(SelectedValues); table.insert(SelectedValues, Value)
DeleteAllDisconnectedPlayers()
for _, v in pairs(Dropdown.Buttons) do
TweenService:Create(v,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{BackgroundTransparency = 1}):Play()
TweenService:Create(v.Title,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{TextTransparency = 0.4}):Play()
end
if Dropdown.Buttons[Value] then
TweenService:Create(Dropdown.Buttons[Value],TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{BackgroundTransparency = 0.5}):Play()
TweenService:Create(Dropdown.Buttons[Value].Title,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{TextTransparency = 0}):Play()
Dropdown.Value = Value
DropdownFrame.F.Selected.Text = Dropdown.Value
else
Dropdown.Value = nil
DropdownFrame.F.Selected.Text = ""
end
return DropdownConfig.Callback(Dropdown.Value)
end
end
end
AddConnection(Click.MouseButton1Click, function()
Dropdown.Toggled = not Dropdown.Toggled
DropdownFrame.F.Line.Visible = Dropdown.Toggled
TweenService:Create(DropdownFrame.F.Ico,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{Rotation = Dropdown.Toggled and 180 or 0}):Play()
if Options > MaxElements then
TweenService:Create(DropdownFrame,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Size = Dropdown.Toggled and UDim2.new(1, 0, 0, 38 + (MaxElements * 45)) or UDim2.new(1, 0, 0, 38)}):Play()
else
TweenService:Create(DropdownFrame,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Size = Dropdown.Toggled and UDim2.new(1, 0, 0, 38 + (Options * 45)) or UDim2.new(1, 0, 0, 38)}):Play()
end
end)
if DropdownConfig.Flag then
OrionLib.Flags[DropdownConfig.Flag] = Dropdown
end
return Dropdown
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
if not table.find(Dropdown.Options, Dropdown.Value) then
Dropdown.Value = "..."
end
local DropdownList = MakeElement("List")
local DropdownContainer = AddThemeObject(SetProps(SetChildren(MakeElement("ScrollFrame", Color3.fromRGB(40, 40, 40), 4), {
DropdownList
}), {
Parent = ItemParent,
Position = UDim2.new(0, 0, 0, 38),
Size = UDim2.new(1, 0, 1, -38),
ClipsDescendants = true
}), "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, 5), {
Size = UDim2.new(1, 0, 0, 38),
Parent = ItemParent,
ClipsDescendants = true
}), {
DropdownContainer,
SetProps(SetChildren(MakeElement("TFrame"), {
AddThemeObject(SetProps(MakeElement("Label", DropdownConfig.Name, 15), {
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, -40, 1, 0),
Font = Enum.Font.Gotham,
Name = "Selected",
TextXAlignment = Enum.TextXAlignment.Right
}), "TextDark"),
AddThemeObject(SetProps(MakeElement("Frame"), {
Size = UDim2.new(1, 0, 0, 1),
Position = UDim2.new(0, 0, 1, -1),
Name = "Line",
Visible = false
}), "Stroke"),
Click
}), {
Size = UDim2.new(1, 0, 0, 38),
ClipsDescendants = true,
Name = "F"
}),
AddThemeObject(MakeElement("Stroke"), "Stroke"),
MakeElement("Corner")
}), "Second")
AddConnection(DropdownList:GetPropertyChangedSignal("AbsoluteContentSize"), function()
DropdownContainer.CanvasSize = UDim2.new(0, 0, 0, DropdownList.AbsoluteContentSize.Y)
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, 8, 0, 0),
Size = UDim2.new(1, -8, 1, 0),
Name = "Title"
}), "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)
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)
if not table.find(Dropdown.Options, Value) then
Dropdown.Value = "..."
DropdownFrame.F.Selected.Text = Dropdown.Value
for _, v in pairs(Dropdown.Buttons) do
TweenService:Create(v,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{BackgroundTransparency = 1}):Play()
TweenService:Create(v.Title,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{TextTransparency = 0.4}):Play()
end
return
end
Dropdown.Value = Value
DropdownFrame.F.Selected.Text = Dropdown.Value
for _, v in pairs(Dropdown.Buttons) do
TweenService:Create(v,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{BackgroundTransparency = 1}):Play()
TweenService:Create(v.Title,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{TextTransparency = 0.4}):Play()
end
TweenService:Create(Dropdown.Buttons[Value],TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{BackgroundTransparency = 0}):Play()
TweenService:Create(Dropdown.Buttons[Value].Title,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{TextTransparency = 0}):Play()
return DropdownConfig.Callback(Dropdown.Value)
end
AddConnection(Click.MouseButton1Click, function()
Dropdown.Toggled = not Dropdown.Toggled
DropdownFrame.F.Line.Visible = Dropdown.Toggled
TweenService:Create(DropdownFrame.F.Ico,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{Rotation = Dropdown.Toggled and 180 or 0}):Play()
if #Dropdown.Options > MaxElements then
TweenService:Create(DropdownFrame,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{Size = Dropdown.Toggled and UDim2.new(1, 0, 0, 38 + (MaxElements * 28)) or UDim2.new(1, 0, 0, 38)}):Play()
else
TweenService:Create(DropdownFrame,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{Size = Dropdown.Toggled and UDim2.new(1, 0, 0, DropdownList.AbsoluteContentSize.Y + 38) or UDim2.new(1, 0, 0, 38)}):Play()
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:AddPlayerDropdown(Config)
Config = Config or {}
Config.Name = Config.Name or "PlayerDropdown"
Config.Default = Config.Default or nil
Config.Callback = Config.Callback or function() end
Config.Flag = Config.Flag or nil
Config.Save = Config.Save or false
local Dropdown = {
Value = Config.Default,
Buttons = {},
SelectedPlayers = {},
Toggled = false,
Type = "PlayerDropdown",
Save = Config.Save,
}
local MaxElements = 5
local ButtonColor = Color3.fromRGB(35, 0, 60)
local SelectedColor = Color3.fromRGB(55, 0, 95)
local DropdownList = MakeElement("List")
local DropdownContainer = AddThemeObject(
SetProps(
SetChildren(
MakeElement("ScrollFrame", Color3.fromRGB(40, 40, 40), 4),
{ DropdownList }
),
{
Parent = ItemParent,
Position = UDim2.new(0, 0, 0, 38),
Size = UDim2.new(1, 0, 1, -38),
ClipsDescendants = true,
}
),
"Divider"
)
local Click = SetProps(MakeElement("Button"), {
Size = UDim2.new(1, 0, 1, 0),
BackgroundTransparency = 1,
AutoButtonColor = false,
Name = "ClickRegion",
})
local DropdownFrame = AddThemeObject(
SetChildren(
SetProps(
MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5),
{ Size = UDim2.new(1, 0, 0, 38), Parent = ItemParent, ClipsDescendants = true }
),
{
DropdownContainer,
SetProps(
SetChildren(MakeElement("TFrame"), {
AddThemeObject(
SetProps(MakeElement("Label", Config.Name, 15), {
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", "Selecione", 13), {
Size = UDim2.new(1, -40, 1, 0),
Font = Enum.Font.Gotham,
Name = "Selected",
TextXAlignment = Enum.TextXAlignment.Right,
}),
"TextDark"
),
SetProps(MakeElement("Frame"), {
Size = UDim2.new(1, 0, 0, 1),
Position = UDim2.new(0, 0, 1, -1),
Name = "Line",
Visible = false,
}),
Click,
}),
{
Size = UDim2.new(1, 0, 0, 38),
ClipsDescendants = true,
Name = "F",
}
),
AddThemeObject(MakeElement("Stroke"), "Stroke"),
MakeElement("Corner"),
}
),
"Second"
)
AddConnection(DropdownList:GetPropertyChangedSignal("AbsoluteContentSize"), function()
DropdownContainer.CanvasSize = UDim2.new(0, 0, 0, DropdownList.AbsoluteContentSize.Y)
end)
AddConnection(Click.MouseButton1Click, function()
Dropdown.Toggled = not Dropdown.Toggled
DropdownFrame.F.Line.Visible = Dropdown.Toggled
TweenService:Create(
DropdownFrame.F.Ico,
TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{ Rotation = Dropdown.Toggled and 180 or 0 }
):Play()
local targetHeight = 38
if Dropdown.Toggled then
local listHeight = math.min(DropdownList.AbsoluteContentSize.Y, MaxElements * 40)
targetHeight = 38 + listHeight
end
TweenService:Create(
DropdownFrame,
TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{ Size = UDim2.new(1, 0, 0, targetHeight) }
):Play()
end)
local function AddOptions(playerList)
for _, player in ipairs(playerList) do
local OptionBtn = SetProps(
MakeElement("Button"),
{
Parent = DropdownContainer,
Size = UDim2.new(1, 0, 0, 40),
BackgroundColor3 = ButtonColor,
BackgroundTransparency = 0,
AutoButtonColor = false,
ClipsDescendants = true,
}
)
AddThemeObject(SetProps(Instance.new("UIStroke"), {
Parent = OptionBtn,
ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
Color = Color3.fromRGB(20, 20, 20),
Thickness = 1,
Transparency = 0.2,
}), "Divider")
MakeElement("Corner", 0, 6).Parent = OptionBtn
local thumbUrl = string.format(
"https://www.roblox.com/headshot-thumbnail/image?userId=%d&width=420&height=420&format=png",
player.UserId
)
SetProps(MakeElement("Image", thumbUrl), {
Parent = OptionBtn,
Size = UDim2.new(0, 30, 0, 30),
Position = UDim2.new(0, 5, 0, 5),
BackgroundTransparency = 1,
Name = "Thumb",
})
AddThemeObject(
SetProps(MakeElement("Label", player.DisplayName, 14), {
Parent = OptionBtn,
Position = UDim2.new(0, 42, 0, 5),
Size = UDim2.new(0.6, -10, 0, 18),
Font = Enum.Font.GothamBold,
TextXAlignment = Enum.TextXAlignment.Left,
Name = "DisplayName",
}),
"Text"
)
AddThemeObject(
SetProps(MakeElement("Label", player.Name, 12), {
Parent = OptionBtn,
Position = UDim2.new(0, 42, 0, 22),
Size = UDim2.new(0.6, -10, 0, 18),
Font = Enum.Font.Gotham,
TextXAlignment = Enum.TextXAlignment.Left,
Name = "UserName",
}),
"TextDark"
)
AddConnection(OptionBtn.MouseButton1Click, function()
if Dropdown.SelectedPlayers[player] then
Dropdown.SelectedPlayers[player] = nil
else
Dropdown.SelectedPlayers[player] = true
end
Dropdown:Set()
if Config.Save then SaveCfg(game.GameId) end
end)
Dropdown.Buttons[player] = OptionBtn
end
end
function Dropdown:Refresh(list, clear)
if clear then
for _, btn in pairs(self.Buttons) do btn:Destroy() end
table.clear(self.Buttons)
end
AddOptions(list)
end
function Dropdown:Set()
local selectedUsernames = {}
for p in pairs(self.SelectedPlayers) do
if PlayerService:FindFirstChild(p.Name) then
table.insert(selectedUsernames, p.Name)
else
self.SelectedPlayers[p] = nil
end
end
-- Atualiza texto do dropdown com os nomes selecionados
if #selectedUsernames > 0 then
DropdownFrame.F.Selected.Text = table.concat(selectedUsernames, ", ")
else
DropdownFrame.F.Selected.Text = "Selecione"
end
-- Atualiza as cores dos botões
for p, btn in pairs(self.Buttons) do
btn.BackgroundColor3 = self.SelectedPlayers[p] and SelectedColor or ButtonColor
end
return Config.Callback(selectedUsernames)
end
local function updateList()
local allPlayers = PlayerService:GetPlayers()
local filtered = {}
for _, p in ipairs(allPlayers) do
if p ~= PlayerService.LocalPlayer then
table.insert(filtered, p)
end
end
Dropdown:Refresh(filtered, true)
Dropdown:Set() -- Atualiza interface após recarregar
end
PlayerService.PlayerAdded:Connect(updateList)
PlayerService.PlayerRemoving:Connect(updateList)
updateList()
if Config.Flag then OrionLib.Flags[Config.Flag] = Dropdown end
return Dropdown
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, 4), {
Size = UDim2.new(0, 24, 0, 24),
Position = UDim2.new(1, -12, 0.5, 0),
AnchorPoint = Vector2.new(1, 0.5)
}), {
AddThemeObject(MakeElement("Stroke"), "Stroke"),
AddThemeObject(SetProps(MakeElement("Label", BindConfig.Name, 14), {
Size = UDim2.new(1, 0, 1, 0),
Font = Enum.Font.GothamBold,
TextXAlignment = Enum.TextXAlignment.Center,
Name = "Value"
}), "Text")
}), "Main")
local BindFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
Size = UDim2.new(1, 0, 0, 38),
Parent = ItemParent
}), {
AddThemeObject(SetProps(MakeElement("Label", BindConfig.Name, 15), {
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(BindBox.Value:GetPropertyChangedSignal("Text"), function()
--BindBox.Size = UDim2.new(0, BindBox.Value.TextBounds.X + 16, 0, 24)
TweenService:Create(BindBox, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Size = UDim2.new(0, BindBox.Value.TextBounds.X + 16, 0, 24)}):Play()
end)
AddConnection(Click.InputEnded, function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
if Bind.Binding then return end
Bind.Binding = true
BindBox.Value.Text = ""
end
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()
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)
AddConnection(Click.MouseEnter, function()
TweenService:Create(BindFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = Color3.fromRGB(OrionLib.Themes[OrionLib.SelectedTheme].Second.R * 255 + 3, OrionLib.Themes[OrionLib.SelectedTheme].Second.G * 255 + 3, OrionLib.Themes[OrionLib.SelectedTheme].Second.B * 255 + 3)}):Play()
end)
AddConnection(Click.MouseLeave, function()
TweenService:Create(BindFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Second}):Play()
end)
AddConnection(Click.MouseButton1Up, function()
TweenService:Create(BindFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = Color3.fromRGB(OrionLib.Themes[OrionLib.SelectedTheme].Second.R * 255 + 3, OrionLib.Themes[OrionLib.SelectedTheme].Second.G * 255 + 3, OrionLib.Themes[OrionLib.SelectedTheme].Second.B * 255 + 3)}):Play()
end)
AddConnection(Click.MouseButton1Down, function()
TweenService:Create(BindFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = Color3.fromRGB(OrionLib.Themes[OrionLib.SelectedTheme].Second.R * 255 + 6, OrionLib.Themes[OrionLib.SelectedTheme].Second.G * 255 + 6, OrionLib.Themes[OrionLib.SelectedTheme].Second.B * 255 + 6)}):Play()
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
end
Bind:Set(BindConfig.Default)
if BindConfig.Flag then
OrionLib.Flags[BindConfig.Flag] = Bind
end
return Bind
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(210,210,210),
PlaceholderText = "Input",
Font = Enum.Font.GothamSemibold,
TextXAlignment = Enum.TextXAlignment.Center,
TextSize = 14,
ClearTextOnFocus = false
}), "Text")
local TextContainer = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 4), {
Size = UDim2.new(0, 24, 0, 24),
Position = UDim2.new(1, -12, 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, 5), {
Size = UDim2.new(1, 0, 0, 38),
Parent = ItemParent
}), {
AddThemeObject(SetProps(MakeElement("Label", TextboxConfig.Name, 15), {
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()
--TextContainer.Size = UDim2.new(0, TextboxActual.TextBounds.X + 16, 0, 24)
TweenService:Create(TextContainer, TweenInfo.new(0.45, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Size = UDim2.new(0, TextboxActual.TextBounds.X + 16, 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.MouseEnter, function()
TweenService:Create(TextboxFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = Color3.fromRGB(OrionLib.Themes[OrionLib.SelectedTheme].Second.R * 255 + 3, OrionLib.Themes[OrionLib.SelectedTheme].Second.G * 255 + 3, OrionLib.Themes[OrionLib.SelectedTheme].Second.B * 255 + 3)}):Play()
end)
AddConnection(Click.MouseLeave, function()
TweenService:Create(TextboxFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Second}):Play()
end)
AddConnection(Click.MouseButton1Up, function()
TweenService:Create(TextboxFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = Color3.fromRGB(OrionLib.Themes[OrionLib.SelectedTheme].Second.R * 255 + 3, OrionLib.Themes[OrionLib.SelectedTheme].Second.G * 255 + 3, OrionLib.Themes[OrionLib.SelectedTheme].Second.B * 255 + 3)}):Play()
TextboxActual:CaptureFocus()
end)
AddConnection(Click.MouseButton1Down, function()
TweenService:Create(TextboxFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = Color3.fromRGB(OrionLib.Themes[OrionLib.SelectedTheme].Second.R * 255 + 6, OrionLib.Themes[OrionLib.SelectedTheme].Second.G * 255 + 6, OrionLib.Themes[OrionLib.SelectedTheme].Second.B * 255 + 6)}):Play()
end)
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
-- Inicializar HSV com a cor padrão
local H, S, V = Color3.toHSV(ColorpickerConfig.Default)
local ColorH, ColorS, ColorV = H, S, V
local Colorpicker = {Value = ColorpickerConfig.Default, Toggled = false, Type = "Colorpicker", Save = ColorpickerConfig.Save}
local ColorSelection = Create("ImageLabel", {
Size = UDim2.new(0, 18, 0, 18),
Position = UDim2.new(S, 0, 1 - V, 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.5, 0, 1 - H, 0),
ScaleType = Enum.ScaleType.Fit,
AnchorPoint = Vector2.new(0.5, 0.5),
BackgroundTransparency = 1,
Image = "http://www.roblox.com/asset/?id=4805639000"
})
local Color = Create("ImageLabel", {
Size = UDim2.new(1, -25, 1, 0),
Visible = false,
Image = "rbxassetid://4155801252"
}, {
Create("UICorner", {CornerRadius = UDim.new(0, 5)}),
ColorSelection
})
local Hue = 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, 5)}),
HueSelection
})
local ColorpickerContainer = Create("Frame", {
Position = UDim2.new(0, 0, 0, 32),
Size = UDim2.new(1, 0, 1, -32),
BackgroundTransparency = 1,
ClipsDescendants = true
}, {
Hue,
Color,
Create("UIPadding", {
PaddingLeft = UDim.new(0, 35),
PaddingRight = UDim.new(0, 35),
PaddingBottom = UDim.new(0, 10),
PaddingTop = UDim.new(0, 17)
})
})
local Click = SetProps(MakeElement("Button"), {
Size = UDim2.new(1, 0, 1, 0)
})
-- COLORPICKER BOX MELHORADO )
local ColorpickerBox = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 8), {
Size = UDim2.new(0, 28, 0, 28),
Position = UDim2.new(1, -16, 0.5, 0),
AnchorPoint = Vector2.new(1, 0.5)
}), {
AddThemeObject(SetProps(MakeElement("Stroke"), {
Thickness = 2.5,
Transparency = 0.3
}), "Stroke"),
-- Glow effect
Create("ImageLabel", {
Size = UDim2.new(1, 20, 1, 20),
Position = UDim2.new(0.5, 0, 0.5, 0),
AnchorPoint = Vector2.new(0.5, 0.5),
BackgroundTransparency = 1,
Image = "rbxassetid://5028857084",
ImageColor3 = Color3.fromRGB(255, 255, 255),
ImageTransparency = 0.7,
ZIndex = 0
})
}), "Main")
local ColorpickerFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
Size = UDim2.new(1, 0, 0, 38),
Parent = ItemParent
}), {
SetProps(SetChildren(MakeElement("TFrame"), {
AddThemeObject(SetProps(MakeElement("Label", ColorpickerConfig.Name, 15), {
Size = UDim2.new(1, -12, 1, 0),
Position = UDim2.new(0, 12, 0, 0),
Font = Enum.Font.GothamBold,
Name = "Content"
}), "Text"),
ColorpickerBox,
Click,
AddThemeObject(SetProps(MakeElement("Frame"), {
Size = UDim2.new(1, 0, 0, 1),
Position = UDim2.new(0, 0, 1, -1),
Name = "Line",
Visible = false
}), "Stroke"),
}), {
Size = UDim2.new(1, 0, 0, 38),
ClipsDescendants = true,
Name = "F"
}),
ColorpickerContainer,
AddThemeObject(MakeElement("Stroke"), "Stroke"),
}), "Second")
-- COLORPICKER ANIMATION
local isAnimating = false
AddConnection(Click.MouseButton1Click, function()
if isAnimating then return end
isAnimating = true
Colorpicker.Toggled = not Colorpicker.Toggled
if Colorpicker.Toggled then
-- Open
Color.Visible = true
Hue.Visible = true
ColorpickerFrame.F.Line.Visible = true
TweenService:Create(ColorpickerFrame, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
Size = UDim2.new(1, 0, 0, 160)
}):Play()
TweenService:Create(Color, TweenInfo.new(0.2, Enum.EasingStyle.Quad), {ImageTransparency = 0}):Play()
TweenService:Create(Hue, TweenInfo.new(0.2, Enum.EasingStyle.Quad), {BackgroundTransparency = 0}):Play()
task.wait(0.3)
else
-- Close
TweenService:Create(Color, TweenInfo.new(0.15, Enum.EasingStyle.Quad), {ImageTransparency = 1}):Play()
TweenService:Create(Hue, TweenInfo.new(0.15, Enum.EasingStyle.Quad), {BackgroundTransparency = 1}):Play()
TweenService:Create(ColorpickerFrame, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
Size = UDim2.new(1, 0, 0, 38)
}):Play()
task.wait(0.2)
Color.Visible = false
Hue.Visible = false
ColorpickerFrame.F.Line.Visible = false
end
isAnimating = false
end)
local lastUpdateTime = 0
local updateDebounce = 0.05 -- Update max 20 times per second
local function UpdateColorPicker()
local currentTime = tick()
if currentTime - lastUpdateTime < updateDebounce then
return
end
lastUpdateTime = currentTime
local newColor = Color3.fromHSV(ColorH, ColorS, ColorV)
Colorpicker.Value = newColor
ColorpickerBox.BackgroundColor3 = newColor
Color.BackgroundColor3 = Color3.fromHSV(ColorH, 1, 1)
ColorpickerConfig.Callback(newColor)
SaveCfg(game.GameId) -- Debounced automatically by SaveCfg
end
local Dragging, DragInput, MousePos, FramePos = false
AddConnection(Color.InputBegan, function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then
Dragging = true
MousePos = Input.Position
FramePos = ColorSelection.Position
AddConnection(Input.Changed, function()
if Input.UserInputState == Enum.UserInputState.End then
Dragging = false
FocusDrag = nil
end
end)
end
end)
AddConnection(Color.InputChanged, function(Input)
if Input.UserInputType == Enum.UserInputType.MouseMovement or Input.UserInputType == Enum.UserInputType.Touch and not FocusDrag then
DragInput = Input
FocusDrag = DragInput
end
end)
AddConnection(UserInputService.InputChanged, function(Input)
if Input == DragInput and Dragging and Input == FocusDrag then
local ColorX = (math.clamp(DragInput.Position.X - Color.AbsolutePosition.X, 0, Color.AbsoluteSize.X) / Color.AbsoluteSize.X)
local ColorY = (math.clamp(Input.Position.Y - Color.AbsolutePosition.Y, 0, Color.AbsoluteSize.Y) / Color.AbsoluteSize.Y)
ColorSelection.Position = UDim2.new(ColorX, 0, ColorY, 0)
ColorS = ColorX
ColorV = 1 - ColorY
UpdateColorPicker()
end
end)
-- Hue
local Dragging_1, DragInput_1, MousePos_1, FramePos_1 = false
AddConnection(Hue.InputBegan, function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then
Dragging_1 = true
MousePos_1 = Input.Position
FramePos_1 = HueSelection.Position
AddConnection(Input.Changed, function()
if Input.UserInputState == Enum.UserInputState.End then
Dragging_1 = false
FocusDrag = nil
end
end)
end
end)
AddConnection(Hue.InputChanged, function(Input)
if Input.UserInputType == Enum.UserInputType.MouseMovement or Input.UserInputType == Enum.UserInputType.Touch and not FocusDrag then
DragInput_1 = Input
FocusDrag = DragInput_1
end
end)
AddConnection(UserInputService.InputChanged, function(Input)
if Input == DragInput_1 and Dragging_1 and DragInput_1 == FocusDrag then
local HueY = (math.clamp(Input.Position.Y - Hue.AbsolutePosition.Y, 0, Hue.AbsoluteSize.Y) / Hue.AbsoluteSize.Y)
HueSelection.Position = UDim2.new(0.5, 0, HueY, 0)
ColorH = 1 - HueY
UpdateColorPicker()
end
end)
function Colorpicker:Set(Value)
Colorpicker.Value = Value
ColorpickerBox.BackgroundColor3 = Colorpicker.Value
-- 🔧 ATUALIZAR POSIÇÃO DAS BOLINHAS (CORRIGIDO)
local H, S, V = Color3.toHSV(Value)
ColorH, ColorS, ColorV = H, S, V
-- Atualizar posição da bolinha de cor
ColorSelection.Position = UDim2.new(S, 0, 1 - V, 0)
-- Atualizar posição da bolinha de matiz
HueSelection.Position = UDim2.new(0.5, 0, 1 - H, 0)
-- Atualizar cor de fundo do seletor
Color.BackgroundColor3 = Color3.fromHSV(H, 1, 1)
ColorpickerConfig.Callback(Colorpicker.Value)
end
-- Inicializar com cor padrão
Colorpicker:Set(ColorpickerConfig.Default)
if ColorpickerConfig.Flag then
OrionLib.Flags[ColorpickerConfig.Flag] = Colorpicker
end
return Colorpicker
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
}), {
AddThemeObject(SetProps(MakeElement("Label", SectionConfig.Name, 14), {
Size = UDim2.new(1, -12, 0, 16),
Position = UDim2.new(0, 0, 0, 3),
Font = Enum.Font.GothamSemibold
}), "TextDark"),
SetChildren(SetProps(MakeElement("TFrame"), {
AnchorPoint = Vector2.new(0, 0),
Size = UDim2.new(1, 0, 1, -24),
Position = UDim2.new(0, 0, 0, 23),
Name = "Holder"
}), {
MakeElement("List", 0, 6)
}),
})
AddConnection(SectionFrame.Holder.UIListLayout:GetPropertyChangedSignal("AbsoluteContentSize"), function()
SectionFrame.Size = UDim2.new(1, 0, 0, SectionFrame.Holder.UIListLayout.AbsoluteContentSize.Y + 31)
SectionFrame.Holder.Size = UDim2.new(1, 0, 0, SectionFrame.Holder.UIListLayout.AbsoluteContentSize.Y)
end)
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
if TabConfig.PremiumOnly then
for i, v in next, ElementFunction do
ElementFunction[i] = function() end
end
Container:FindFirstChild("UIListLayout"):Destroy()
Container:FindFirstChild("UIPadding"):Destroy()
SetChildren(SetProps(MakeElement("TFrame"), {
Size = UDim2.new(1, 0, 1, 0),
Parent = ItemParent
}), {
AddThemeObject(SetProps(MakeElement("Image", "rbxassetid://3610239960"), {
Size = UDim2.new(0, 18, 0, 18),
Position = UDim2.new(0, 15, 0, 15),
ImageTransparency = 0.4
}), "Text"),
AddThemeObject(SetProps(MakeElement("Label", "Unauthorised Access", 14), {
Size = UDim2.new(1, -38, 0, 14),
Position = UDim2.new(0, 38, 0, 18),
TextTransparency = 0.4
}), "Text"),
AddThemeObject(SetProps(MakeElement("Image", "rbxassetid://4483345875"), {
Size = UDim2.new(0, 56, 0, 56),
Position = UDim2.new(0, 84, 0, 110),
}), "Text"),
AddThemeObject(SetProps(MakeElement("Label", "Premium Features", 14), {
Size = UDim2.new(1, -150, 0, 14),
Position = UDim2.new(0, 150, 0, 112),
Font = Enum.Font.GothamBold
}), "Text"),
AddThemeObject(SetProps(MakeElement("Label", "This part of the script is locked to Sirius Premium users. Purchase Premium in the Discord server (discord.gg/sirius)", 12), {
Size = UDim2.new(1, -200, 0, 14),
Position = UDim2.new(0, 150, 0, 138),
TextWrapped = true,
TextTransparency = 0.4
}), "Text")
})
end
return ElementFunction
end
return TabFunction
end
return OrionLibLoads code from the internet. It downloads more code when it runs (loadstring + HttpGet), which can change after it was posted. From: raw.githubusercontent.com, www.roblox.com.
Orion Lib Gpt By Blus/Gpt https://discord.gg/6aN2v8dhDF

Universal