wghcbgfftgh

Untitled

May 9th, 2025 (edited)
1,127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 63.13 KB | None | 0 0
  1.  
  2. local UserInputService = game:GetService("UserInputService")
  3. local TweenService = game:GetService("TweenService")
  4. local RunService = game:GetService("RunService")
  5. local LocalPlayer = game:GetService("Players").LocalPlayer
  6. local Mouse = LocalPlayer:GetMouse()
  7. local HttpService = game:GetService("HttpService")
  8.  
  9. local OrionLib = {
  10. Elements = {},
  11. ThemeObjects = {},
  12. Connections = {},
  13. Flags = {},
  14. Themes = {
  15. Default = {
  16. Main = Color3.fromRGB(0, 0, 90),
  17. Second = Color3.fromRGB(1, 1, 1),
  18. Stroke = Color3.fromRGB(60, 60, 60),
  19. Divider = Color3.fromRGB(60, 60, 60),
  20. Text = Color3.fromRGB(240, 240, 240),
  21. TextDark = Color3.fromRGB(150, 150, 150)
  22. }
  23. },
  24. SelectedTheme = "Default",
  25. Folder = nil,
  26. SaveCfg = false
  27. }
  28.  
  29. --Feather Icons https://github.com/evoincorp/lucideblox/tree/master/src/modules/util - Created by 7kayoh
  30. local Icons = {}
  31.  
  32. local Success, Response = pcall(function()
  33. Icons = HttpService:JSONDecode(game:HttpGetAsync("https://raw.githubusercontent.com/evoincorp/lucideblox/master/src/modules/util/icons.json")).icons
  34. end)
  35.  
  36. if not Success then
  37. warn("\nOrion Library - Failed to load Feather Icons. Error code: " .. Response .. "\n")
  38. end
  39.  
  40. local function GetIcon(IconName)
  41. if Icons[IconName] ~= nil then
  42. return Icons[IconName]
  43. else
  44. return nil
  45. end
  46. end
  47.  
  48. local Orion = Instance.new("ScreenGui")
  49. Orion.Name = "Orion"
  50. if syn then
  51. syn.protect_gui(Orion)
  52. Orion.Parent = game.CoreGui
  53. else
  54. Orion.Parent = gethui() or game.CoreGui
  55. end
  56.  
  57. if gethui then
  58. for _, Interface in ipairs(gethui():GetChildren()) do
  59. if Interface.Name == Orion.Name and Interface ~= Orion then
  60. Interface:Destroy()
  61. end
  62. end
  63. else
  64. for _, Interface in ipairs(game.CoreGui:GetChildren()) do
  65. if Interface.Name == Orion.Name and Interface ~= Orion then
  66. Interface:Destroy()
  67. end
  68. end
  69. end
  70.  
  71. function OrionLib:IsRunning()
  72. if gethui then
  73. return Orion.Parent == gethui()
  74. else
  75. return Orion.Parent == game:GetService("CoreGui")
  76. end
  77.  
  78. end
  79.  
  80. local function AddConnection(Signal, Function)
  81. if (not OrionLib:IsRunning()) then
  82. return
  83. end
  84. local SignalConnect = Signal:Connect(Function)
  85. table.insert(OrionLib.Connections, SignalConnect)
  86. return SignalConnect
  87. end
  88.  
  89. task.spawn(function()
  90. while (OrionLib:IsRunning()) do
  91. wait()
  92. end
  93.  
  94. for _, Connection in next, OrionLib.Connections do
  95. Connection:Disconnect()
  96. end
  97. end)
  98.  
  99. local function AddDraggingFunctionality(DragPoint, Main)
  100. pcall(function()
  101. local Dragging, DragInput, MousePos, FramePos = false
  102. DragPoint.InputBegan:Connect(function(Input)
  103. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  104. Dragging = true
  105. MousePos = Input.Position
  106. FramePos = Main.Position
  107.  
  108. Input.Changed:Connect(function()
  109. if Input.UserInputState == Enum.UserInputState.End then
  110. Dragging = false
  111. end
  112. end)
  113. end
  114. end)
  115. DragPoint.InputChanged:Connect(function(Input)
  116. if Input.UserInputType == Enum.UserInputType.MouseMovement then
  117. DragInput = Input
  118. end
  119. end)
  120. UserInputService.InputChanged:Connect(function(Input)
  121. if Input == DragInput and Dragging then
  122. local Delta = Input.Position - MousePos
  123. TweenService:Create(Main, TweenInfo.new(0.45, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Position = UDim2.new(FramePos.X.Scale,FramePos.X.Offset + Delta.X, FramePos.Y.Scale, FramePos.Y.Offset + Delta.Y)}):Play()
  124. end
  125. end)
  126. end)
  127. end
  128.  
  129. local function Create(Name, Properties, Children)
  130. local Object = Instance.new(Name)
  131. for i, v in next, Properties or {} do
  132. Object[i] = v
  133. end
  134. for i, v in next, Children or {} do
  135. v.Parent = Object
  136. end
  137. return Object
  138. end
  139.  
  140. local function CreateElement(ElementName, ElementFunction)
  141. OrionLib.Elements[ElementName] = function(...)
  142. return ElementFunction(...)
  143. end
  144. end
  145.  
  146. local function MakeElement(ElementName, ...)
  147. local NewElement = OrionLib.Elements[ElementName](...)
  148. return NewElement
  149. end
  150.  
  151. local function SetProps(Element, Props)
  152. table.foreach(Props, function(Property, Value)
  153. Element[Property] = Value
  154. end)
  155. return Element
  156. end
  157.  
  158. local function SetChildren(Element, Children)
  159. table.foreach(Children, function(_, Child)
  160. Child.Parent = Element
  161. end)
  162. return Element
  163. end
  164.  
  165. local function Round(Number, Factor)
  166. local Result = math.floor(Number/Factor + (math.sign(Number) * 0.5)) * Factor
  167. if Result < 0 then Result = Result + Factor end
  168. return Result
  169. end
  170.  
  171. local function ReturnProperty(Object)
  172. if Object:IsA("Frame") or Object:IsA("TextButton") then
  173. return "BackgroundColor3"
  174. end
  175. if Object:IsA("ScrollingFrame") then
  176. return "ScrollBarImageColor3"
  177. end
  178. if Object:IsA("UIStroke") then
  179. return "Color"
  180. end
  181. if Object:IsA("TextLabel") or Object:IsA("TextBox") then
  182. return "TextColor3"
  183. end
  184. if Object:IsA("ImageLabel") or Object:IsA("ImageButton") then
  185. return "ImageColor3"
  186. end
  187. end
  188.  
  189. local function AddThemeObject(Object, Type)
  190. if not OrionLib.ThemeObjects[Type] then
  191. OrionLib.ThemeObjects[Type] = {}
  192. end
  193. table.insert(OrionLib.ThemeObjects[Type], Object)
  194. Object[ReturnProperty(Object)] = OrionLib.Themes[OrionLib.SelectedTheme][Type]
  195. return Object
  196. end
  197.  
  198. local function SetTheme()
  199. for Name, Type in pairs(OrionLib.ThemeObjects) do
  200. for _, Object in pairs(Type) do
  201. Object[ReturnProperty(Object)] = OrionLib.Themes[OrionLib.SelectedTheme][Name]
  202. end
  203. end
  204. end
  205.  
  206. local function PackColor(Color)
  207. return {R = Color.R * 255, G = Color.G * 255, B = Color.B * 255}
  208. end
  209.  
  210. local function UnpackColor(Color)
  211. return Color3.fromRGB(Color.R, Color.G, Color.B)
  212. end
  213.  
  214. local function LoadCfg(Config)
  215. local Data = HttpService:JSONDecode(Config)
  216. table.foreach(Data, function(a,b)
  217. if OrionLib.Flags[a] then
  218. spawn(function()
  219. if OrionLib.Flags[a].Type == "Colorpicker" then
  220. OrionLib.Flags[a]:Set(UnpackColor(b))
  221. else
  222. OrionLib.Flags[a]:Set(b)
  223. end
  224. end)
  225. else
  226. warn("Orion Library Config Loader - Could not find ", a ,b)
  227. end
  228. end)
  229. end
  230.  
  231. local function SaveCfg(Name)
  232. local Data = {}
  233. for i,v in pairs(OrionLib.Flags) do
  234. if v.Save then
  235. if v.Type == "Colorpicker" then
  236. Data[i] = PackColor(v.Value)
  237. else
  238. Data[i] = v.Value
  239. end
  240. end
  241. end
  242. writefile(OrionLib.Folder .. "/" .. Name .. ".txt", tostring(HttpService:JSONEncode(Data)))
  243. end
  244.  
  245. local WhitelistedMouse = {Enum.UserInputType.MouseButton1, Enum.UserInputType.MouseButton2,Enum.UserInputType.MouseButton3}
  246. local BlacklistedKeys = {Enum.KeyCode.Unknown,Enum.KeyCode.W,Enum.KeyCode.A,Enum.KeyCode.S,Enum.KeyCode.D,Enum.KeyCode.Up,Enum.KeyCode.Left,Enum.KeyCode.Down,Enum.KeyCode.Right,Enum.KeyCode.Slash,Enum.KeyCode.Tab,Enum.KeyCode.Backspace,Enum.KeyCode.Escape}
  247.  
  248. local function CheckKey(Table, Key)
  249. for _, v in next, Table do
  250. if v == Key then
  251. return true
  252. end
  253. end
  254. end
  255.  
  256. CreateElement("Corner", function(Scale, Offset)
  257. local Corner = Create("UICorner", {
  258. CornerRadius = UDim.new(Scale or 0, Offset or 10)
  259. })
  260. return Corner
  261. end)
  262.  
  263. CreateElement("Stroke", function(Color, Thickness)
  264. local Stroke = Create("UIStroke", {
  265. Color = Color or Color3.fromRGB(255, 255, 255),
  266. Thickness = Thickness or 1
  267. })
  268. return Stroke
  269. end)
  270.  
  271. CreateElement("List", function(Scale, Offset)
  272. local List = Create("UIListLayout", {
  273. SortOrder = Enum.SortOrder.LayoutOrder,
  274. Padding = UDim.new(Scale or 0, Offset or 0)
  275. })
  276. return List
  277. end)
  278.  
  279. CreateElement("Padding", function(Bottom, Left, Right, Top)
  280. local Padding = Create("UIPadding", {
  281. PaddingBottom = UDim.new(0, Bottom or 4),
  282. PaddingLeft = UDim.new(0, Left or 4),
  283. PaddingRight = UDim.new(0, Right or 4),
  284. PaddingTop = UDim.new(0, Top or 4)
  285. })
  286. return Padding
  287. end)
  288.  
  289. CreateElement("TFrame", function()
  290. local TFrame = Create("Frame", {
  291. BackgroundTransparency = 1
  292. })
  293. return TFrame
  294. end)
  295.  
  296. CreateElement("Frame", function(Color)
  297. local Frame = Create("Frame", {
  298. BackgroundColor3 = Color or Color3.fromRGB(255, 255, 255),
  299. BorderSizePixel = 0
  300. })
  301. return Frame
  302. end)
  303.  
  304. CreateElement("RoundFrame", function(Color, Scale, Offset)
  305. local Frame = Create("Frame", {
  306. BackgroundColor3 = Color or Color3.fromRGB(255, 255, 255),
  307. BorderSizePixel = 0
  308. }, {
  309. Create("UICorner", {
  310. CornerRadius = UDim.new(Scale, Offset)
  311. })
  312. })
  313. return Frame
  314. end)
  315.  
  316. CreateElement("Button", function()
  317. local Button = Create("TextButton", {
  318. Text = "",
  319. AutoButtonColor = false,
  320. BackgroundTransparency = 1,
  321. BorderSizePixel = 0
  322. })
  323. return Button
  324. end)
  325.  
  326. CreateElement("ScrollFrame", function(Color, Width)
  327. local ScrollFrame = Create("ScrollingFrame", {
  328. BackgroundTransparency = 1,
  329. MidImage = "rbxassetid://7445543667",
  330. BottomImage = "rbxassetid://7445543667",
  331. TopImage = "rbxassetid://7445543667",
  332. ScrollBarImageColor3 = Color,
  333. BorderSizePixel = 0,
  334. ScrollBarThickness = Width,
  335. CanvasSize = UDim2.new(0, 0, 0, 0)
  336. })
  337. return ScrollFrame
  338. end)
  339.  
  340. CreateElement("Image", function(ImageID)
  341. local ImageNew = Create("ImageLabel", {
  342. Image = ImageID,
  343. BackgroundTransparency = 1
  344. })
  345.  
  346. if GetIcon(ImageID) ~= nil then
  347. ImageNew.Image = GetIcon(ImageID)
  348. end
  349.  
  350. return ImageNew
  351. end)
  352.  
  353. CreateElement("ImageButton", function(ImageID)
  354. local Image = Create("ImageButton", {
  355. Image = ImageID,
  356. BackgroundTransparency = 1
  357. })
  358. return Image
  359. end)
  360.  
  361. CreateElement("Label", function(Text, TextSize, Transparency)
  362. local Label = Create("TextLabel", {
  363. Text = Text or "",
  364. TextColor3 = Color3.fromRGB(240, 240, 240),
  365. TextTransparency = Transparency or 0,
  366. TextSize = TextSize or 15,
  367. Font = Enum.Font.Gotham,
  368. RichText = true,
  369. BackgroundTransparency = 1,
  370. TextXAlignment = Enum.TextXAlignment.Left
  371. })
  372. return Label
  373. end)
  374.  
  375. local NotificationHolder = SetProps(SetChildren(MakeElement("TFrame"), {
  376. SetProps(MakeElement("List"), {
  377. HorizontalAlignment = Enum.HorizontalAlignment.Center,
  378. SortOrder = Enum.SortOrder.LayoutOrder,
  379. VerticalAlignment = Enum.VerticalAlignment.Bottom,
  380. Padding = UDim.new(0, 5)
  381. })
  382. }), {
  383. Position = UDim2.new(1, -25, 1, -25),
  384. Size = UDim2.new(0, 300, 1, -25),
  385. AnchorPoint = Vector2.new(1, 1),
  386. Parent = Orion
  387. })
  388.  
  389. function OrionLib:MakeNotification(NotificationConfig)
  390. spawn(function()
  391. NotificationConfig.Name = NotificationConfig.Name or "Notification"
  392. NotificationConfig.Content = NotificationConfig.Content or "Test"
  393. NotificationConfig.Image = NotificationConfig.Image or "rbxassetid://4384403532"
  394. NotificationConfig.Time = NotificationConfig.Time or 15
  395.  
  396. local NotificationParent = SetProps(MakeElement("TFrame"), {
  397. Size = UDim2.new(1, 0, 0, 0),
  398. AutomaticSize = Enum.AutomaticSize.Y,
  399. Parent = NotificationHolder
  400. })
  401.  
  402. local NotificationFrame = SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(25, 25, 25), 0, 10), {
  403. Parent = NotificationParent,
  404. Size = UDim2.new(1, 0, 0, 0),
  405. Position = UDim2.new(1, -55, 0, 0),
  406. BackgroundTransparency = 0,
  407. AutomaticSize = Enum.AutomaticSize.Y
  408. }), {
  409. MakeElement("Stroke", Color3.fromRGB(93, 93, 93), 1.2),
  410. MakeElement("Padding", 12, 12, 12, 12),
  411. SetProps(MakeElement("Image", NotificationConfig.Image), {
  412. Size = UDim2.new(0, 20, 0, 20),
  413. ImageColor3 = Color3.fromRGB(240, 240, 240),
  414. Name = "Icon"
  415. }),
  416. SetProps(MakeElement("Label", NotificationConfig.Name, 15), {
  417. Size = UDim2.new(1, -30, 0, 20),
  418. Position = UDim2.new(0, 30, 0, 0),
  419. Font = Enum.Font.GothamBold,
  420. Name = "Title"
  421. }),
  422. SetProps(MakeElement("Label", NotificationConfig.Content, 14), {
  423. Size = UDim2.new(1, 0, 0, 0),
  424. Position = UDim2.new(0, 0, 0, 25),
  425. Font = Enum.Font.GothamSemibold,
  426. Name = "Content",
  427. AutomaticSize = Enum.AutomaticSize.Y,
  428. TextColor3 = Color3.fromRGB(200, 200, 200),
  429. TextWrapped = true
  430. })
  431. })
  432.  
  433. TweenService:Create(NotificationFrame, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {Position = UDim2.new(0, 0, 0, 0)}):Play()
  434.  
  435. wait(NotificationConfig.Time - 0.88)
  436. TweenService:Create(NotificationFrame.Icon, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play()
  437. TweenService:Create(NotificationFrame, TweenInfo.new(0.8, Enum.EasingStyle.Quint), {BackgroundTransparency = 0.6}):Play()
  438. wait(0.3)
  439. TweenService:Create(NotificationFrame.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 0.9}):Play()
  440. TweenService:Create(NotificationFrame.Title, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {TextTransparency = 0.4}):Play()
  441. TweenService:Create(NotificationFrame.Content, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {TextTransparency = 0.5}):Play()
  442. wait(0.05)
  443.  
  444. NotificationFrame:TweenPosition(UDim2.new(1, 20, 0, 0),'In','Quint',0.8,true)
  445. wait(1.35)
  446. NotificationFrame:Destroy()
  447. end)
  448. end
  449.  
  450. function OrionLib:Init()
  451. if OrionLib.SaveCfg then
  452. pcall(function()
  453. if isfile(OrionLib.Folder .. "/" .. game.GameId .. ".txt") then
  454. LoadCfg(readfile(OrionLib.Folder .. "/" .. game.GameId .. ".txt"))
  455. OrionLib:MakeNotification({
  456. Name = "Configuration",
  457. Content = "Auto-loaded configuration for the game " .. game.GameId .. ".",
  458. Time = 5
  459. })
  460. end
  461. end)
  462. end
  463. end
  464.  
  465. function OrionLib:MakeWindow(WindowConfig)
  466. local FirstTab = true
  467. local Minimized = false
  468. local Loaded = false
  469. local UIHidden = false
  470.  
  471. WindowConfig = WindowConfig or {}
  472. WindowConfig.Name = WindowConfig.Name or "Orion Library"
  473. WindowConfig.ConfigFolder = WindowConfig.ConfigFolder or WindowConfig.Name
  474. WindowConfig.SaveConfig = WindowConfig.SaveConfig or false
  475. WindowConfig.HidePremium = WindowConfig.HidePremium or false
  476. if WindowConfig.IntroEnabled == nil then
  477. WindowConfig.IntroEnabled = true
  478. end
  479. WindowConfig.IntroText = WindowConfig.IntroText or "Orion Library"
  480. WindowConfig.CloseCallback = WindowConfig.CloseCallback or function() end
  481. WindowConfig.ShowIcon = WindowConfig.ShowIcon or false
  482. WindowConfig.Icon = WindowConfig.Icon or "rbxassetid://8834748103"
  483. WindowConfig.IntroIcon = WindowConfig.IntroIcon or "rbxassetid://8834748103"
  484. OrionLib.Folder = WindowConfig.ConfigFolder
  485. OrionLib.SaveCfg = WindowConfig.SaveConfig
  486.  
  487. if WindowConfig.SaveConfig then
  488. if not isfolder(WindowConfig.ConfigFolder) then
  489. makefolder(WindowConfig.ConfigFolder)
  490. end
  491. end
  492.  
  493. local TabHolder = AddThemeObject(SetChildren(SetProps(MakeElement("ScrollFrame", Color3.fromRGB(255, 255, 255), 4), {
  494. Size = UDim2.new(1, 0, 1, -50)
  495. }), {
  496. MakeElement("List"),
  497. MakeElement("Padding", 8, 0, 0, 8)
  498. }), "Divider")
  499.  
  500. AddConnection(TabHolder.UIListLayout:GetPropertyChangedSignal("AbsoluteContentSize"), function()
  501. TabHolder.CanvasSize = UDim2.new(0, 0, 0, TabHolder.UIListLayout.AbsoluteContentSize.Y + 16)
  502. end)
  503.  
  504. local CloseBtn = SetChildren(SetProps(MakeElement("Button"), {
  505. Size = UDim2.new(0.5, 0, 1, 0),
  506. Position = UDim2.new(0.5, 0, 0, 0),
  507. BackgroundTransparency = 1
  508. }), {
  509. AddThemeObject(SetProps(MakeElement("Image", "rbxassetid://7072725342"), {
  510. Position = UDim2.new(0, 9, 0, 6),
  511. Size = UDim2.new(0, 18, 0, 18)
  512. }), "Text")
  513. })
  514.  
  515. local MinimizeBtn = SetChildren(SetProps(MakeElement("Button"), {
  516. Size = UDim2.new(0.5, 0, 1, 0),
  517. BackgroundTransparency = 1
  518. }), {
  519. AddThemeObject(SetProps(MakeElement("Image", "rbxassetid://7072719338"), {
  520. Position = UDim2.new(0, 9, 0, 6),
  521. Size = UDim2.new(0, 18, 0, 18),
  522. Name = "Ico"
  523. }), "Text")
  524. })
  525.  
  526. local DragPoint = SetProps(MakeElement("TFrame"), {
  527. Size = UDim2.new(1, 0, 0, 50)
  528. })
  529.  
  530. local WindowStuff = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 10), {
  531. Size = UDim2.new(0, 150, 1, -50),
  532. Position = UDim2.new(0, 0, 0, 50)
  533. }), {
  534. AddThemeObject(SetProps(MakeElement("Frame"), {
  535. Size = UDim2.new(1, 0, 0, 10),
  536. Position = UDim2.new(0, 0, 0, 0)
  537. }), "Second"),
  538. AddThemeObject(SetProps(MakeElement("Frame"), {
  539. Size = UDim2.new(0, 10, 1, 0),
  540. Position = UDim2.new(1, -10, 0, 0)
  541. }), "Second"),
  542. AddThemeObject(SetProps(MakeElement("Frame"), {
  543. Size = UDim2.new(0, 1, 1, 0),
  544. Position = UDim2.new(1, -1, 0, 0)
  545. }), "Stroke"),
  546. TabHolder,
  547. SetChildren(SetProps(MakeElement("TFrame"), {
  548. Size = UDim2.new(1, 0, 0, 50),
  549. Position = UDim2.new(0, 0, 1, -50)
  550. }), {
  551. AddThemeObject(SetProps(MakeElement("Frame"), {
  552. Size = UDim2.new(1, 0, 0, 1)
  553. }), "Stroke"),
  554. AddThemeObject(SetChildren(SetProps(MakeElement("Frame"), {
  555. AnchorPoint = Vector2.new(0, 0.5),
  556. Size = UDim2.new(0, 32, 0, 32),
  557. Position = UDim2.new(0, 10, 0.5, 0)
  558. }), {
  559. SetProps(MakeElement("Image", "https://www.roblox.com/headshot-thumbnail/image?userId=".. LocalPlayer.UserId .."&width=420&height=420&format=png"), {
  560. Size = UDim2.new(1, 0, 1, 0)
  561. }),
  562. AddThemeObject(SetProps(MakeElement("Image", "rbxassetid://4031889928"), {
  563. Size = UDim2.new(1, 0, 1, 0),
  564. }), "Second"),
  565. MakeElement("Corner", 1)
  566. }), "Divider"),
  567. SetChildren(SetProps(MakeElement("TFrame"), {
  568. AnchorPoint = Vector2.new(0, 0.5),
  569. Size = UDim2.new(0, 32, 0, 32),
  570. Position = UDim2.new(0, 10, 0.5, 0)
  571. }), {
  572. AddThemeObject(MakeElement("Stroke"), "Stroke"),
  573. MakeElement("Corner", 1)
  574. }),
  575. AddThemeObject(SetProps(MakeElement("Label", LocalPlayer.DisplayName, WindowConfig.HidePremium and 14 or 13), {
  576. Size = UDim2.new(1, -60, 0, 13),
  577. Position = WindowConfig.HidePremium and UDim2.new(0, 50, 0, 19) or UDim2.new(0, 50, 0, 12),
  578. Font = Enum.Font.GothamBold,
  579. ClipsDescendants = true
  580. }), "Text"),
  581. AddThemeObject(SetProps(MakeElement("Label", "", 12), {
  582. Size = UDim2.new(1, -60, 0, 12),
  583. Position = UDim2.new(0, 50, 1, -25),
  584. Visible = not WindowConfig.HidePremium
  585. }), "TextDark")
  586. }),
  587. }), "Second")
  588.  
  589. local WindowName = AddThemeObject(SetProps(MakeElement("Label", WindowConfig.Name, 14), {
  590. Size = UDim2.new(1, -30, 2, 0),
  591. Position = UDim2.new(0, 25, 0, -24),
  592. Font = Enum.Font.GothamBlack,
  593. TextSize = 20
  594. }), "Text")
  595.  
  596. local WindowTopBarLine = AddThemeObject(SetProps(MakeElement("Frame"), {
  597. Size = UDim2.new(1, 0, 0, 1),
  598. Position = UDim2.new(0, 0, 1, -1)
  599. }), "Stroke")
  600.  
  601. local MainWindow = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 10), {
  602. Parent = Orion,
  603. Position = UDim2.new(0.5, -307, 0.5, -172),
  604. Size = UDim2.new(0, 615, 0, 344),
  605. ClipsDescendants = true
  606. }), {
  607. --SetProps(MakeElement("Image", "rbxassetid://3523728077"), {
  608. -- AnchorPoint = Vector2.new(0.5, 0.5),
  609. -- Position = UDim2.new(0.5, 0, 0.5, 0),
  610. -- Size = UDim2.new(1, 80, 1, 320),
  611. -- ImageColor3 = Color3.fromRGB(33, 33, 33),
  612. -- ImageTransparency = 0.7
  613. --}),
  614. SetChildren(SetProps(MakeElement("TFrame"), {
  615. Size = UDim2.new(1, 0, 0, 50),
  616. Name = "TopBar"
  617. }), {
  618. WindowName,
  619. WindowTopBarLine,
  620. AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 7), {
  621. Size = UDim2.new(0, 70, 0, 30),
  622. Position = UDim2.new(1, -90, 0, 10)
  623. }), {
  624. AddThemeObject(MakeElement("Stroke"), "Stroke"),
  625. AddThemeObject(SetProps(MakeElement("Frame"), {
  626. Size = UDim2.new(0, 1, 1, 0),
  627. Position = UDim2.new(0.5, 0, 0, 0)
  628. }), "Stroke"),
  629. CloseBtn,
  630. MinimizeBtn
  631. }), "Second"),
  632. }),
  633. DragPoint,
  634. WindowStuff
  635. }), "Main")
  636.  
  637. if WindowConfig.ShowIcon then
  638. WindowName.Position = UDim2.new(0, 50, 0, -24)
  639. local WindowIcon = SetProps(MakeElement("Image", WindowConfig.Icon), {
  640. Size = UDim2.new(0, 20, 0, 20),
  641. Position = UDim2.new(0, 25, 0, 15)
  642. })
  643. WindowIcon.Parent = MainWindow.TopBar
  644. end
  645.  
  646. AddDraggingFunctionality(DragPoint, MainWindow)
  647.  
  648. AddConnection(CloseBtn.MouseButton1Up, function()
  649. MainWindow.Visible = false
  650. UIHidden = true
  651. OrionLib:MakeNotification({
  652. Name = "Interface Hidden",
  653. Content = "Tap RightShift to reopen the interface",
  654. Time = 5
  655. })
  656. WindowConfig.CloseCallback()
  657. end)
  658.  
  659. AddConnection(UserInputService.InputBegan, function(Input)
  660. if Input.KeyCode == Enum.KeyCode.RightShift and UIHidden then
  661. MainWindow.Visible = true
  662. end
  663. end)
  664.  
  665. AddConnection(MinimizeBtn.MouseButton1Up, function()
  666. if Minimized then
  667. TweenService:Create(MainWindow, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Size = UDim2.new(0, 615, 0, 344)}):Play()
  668. MinimizeBtn.Ico.Image = "rbxassetid://7072719338"
  669. wait(.02)
  670. MainWindow.ClipsDescendants = false
  671. WindowStuff.Visible = true
  672. WindowTopBarLine.Visible = true
  673. else
  674. MainWindow.ClipsDescendants = true
  675. WindowTopBarLine.Visible = false
  676. MinimizeBtn.Ico.Image = "rbxassetid://7072720870"
  677.  
  678. TweenService:Create(MainWindow, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Size = UDim2.new(0, WindowName.TextBounds.X + 140, 0, 50)}):Play()
  679. wait(0.1)
  680. WindowStuff.Visible = false
  681. end
  682. Minimized = not Minimized
  683. end)
  684.  
  685. local function LoadSequence()
  686. MainWindow.Visible = false
  687. local LoadSequenceLogo = SetProps(MakeElement("Image", WindowConfig.IntroIcon), {
  688. Parent = Orion,
  689. AnchorPoint = Vector2.new(0.5, 0.5),
  690. Position = UDim2.new(0.5, 0, 0.4, 0),
  691. Size = UDim2.new(0, 28, 0, 28),
  692. ImageColor3 = Color3.fromRGB(255, 255, 255),
  693. ImageTransparency = 1
  694. })
  695.  
  696. local LoadSequenceText = SetProps(MakeElement("Label", WindowConfig.IntroText, 14), {
  697. Parent = Orion,
  698. Size = UDim2.new(1, 0, 1, 0),
  699. AnchorPoint = Vector2.new(0.5, 0.5),
  700. Position = UDim2.new(0.5, 19, 0.5, 0),
  701. TextXAlignment = Enum.TextXAlignment.Center,
  702. Font = Enum.Font.GothamBold,
  703. TextTransparency = 1
  704. })
  705.  
  706. TweenService:Create(LoadSequenceLogo, TweenInfo.new(.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageTransparency = 0, Position = UDim2.new(0.5, 0, 0.5, 0)}):Play()
  707. wait(0.8)
  708. TweenService:Create(LoadSequenceLogo, TweenInfo.new(.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Position = UDim2.new(0.5, -(LoadSequenceText.TextBounds.X/2), 0.5, 0)}):Play()
  709. wait(0.3)
  710. TweenService:Create(LoadSequenceText, TweenInfo.new(.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextTransparency = 0}):Play()
  711. wait(2)
  712. TweenService:Create(LoadSequenceText, TweenInfo.new(.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextTransparency = 1}):Play()
  713. MainWindow.Visible = true
  714. LoadSequenceLogo:Destroy()
  715. LoadSequenceText:Destroy()
  716. end
  717.  
  718. if WindowConfig.IntroEnabled then
  719. LoadSequence()
  720. end
  721.  
  722. local TabFunction = {}
  723. function TabFunction:MakeTab(TabConfig)
  724. TabConfig = TabConfig or {}
  725. TabConfig.Name = TabConfig.Name or "Tab"
  726. TabConfig.Icon = TabConfig.Icon or ""
  727. TabConfig.PremiumOnly = TabConfig.PremiumOnly or false
  728.  
  729. local TabFrame = SetChildren(SetProps(MakeElement("Button"), {
  730. Size = UDim2.new(1, 0, 0, 30),
  731. Parent = TabHolder
  732. }), {
  733. AddThemeObject(SetProps(MakeElement("Image", TabConfig.Icon), {
  734. AnchorPoint = Vector2.new(0, 0.5),
  735. Size = UDim2.new(0, 18, 0, 18),
  736. Position = UDim2.new(0, 10, 0.5, 0),
  737. ImageTransparency = 0.4,
  738. Name = "Ico"
  739. }), "Text"),
  740. AddThemeObject(SetProps(MakeElement("Label", TabConfig.Name, 14), {
  741. Size = UDim2.new(1, -35, 1, 0),
  742. Position = UDim2.new(0, 35, 0, 0),
  743. Font = Enum.Font.GothamSemibold,
  744. TextTransparency = 0.4,
  745. Name = "Title"
  746. }), "Text")
  747. })
  748.  
  749. if GetIcon(TabConfig.Icon) ~= nil then
  750. TabFrame.Ico.Image = GetIcon(TabConfig.Icon)
  751. end
  752.  
  753. local Container = AddThemeObject(SetChildren(SetProps(MakeElement("ScrollFrame", Color3.fromRGB(255, 255, 255), 5), {
  754. Size = UDim2.new(1, -150, 1, -50),
  755. Position = UDim2.new(0, 150, 0, 50),
  756. Parent = MainWindow,
  757. Visible = false,
  758. Name = "ItemContainer"
  759. }), {
  760. MakeElement("List", 0, 6),
  761. MakeElement("Padding", 15, 10, 10, 15)
  762. }), "Divider")
  763.  
  764. AddConnection(Container.UIListLayout:GetPropertyChangedSignal("AbsoluteContentSize"), function()
  765. Container.CanvasSize = UDim2.new(0, 0, 0, Container.UIListLayout.AbsoluteContentSize.Y + 30)
  766. end)
  767.  
  768. if FirstTab then
  769. FirstTab = false
  770. TabFrame.Ico.ImageTransparency = 0
  771. TabFrame.Title.TextTransparency = 0
  772. TabFrame.Title.Font = Enum.Font.GothamBlack
  773. Container.Visible = true
  774. end
  775.  
  776. AddConnection(TabFrame.MouseButton1Click, function()
  777. for _, Tab in next, TabHolder:GetChildren() do
  778. if Tab:IsA("TextButton") then
  779. Tab.Title.Font = Enum.Font.GothamSemibold
  780. TweenService:Create(Tab.Ico, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {ImageTransparency = 0.4}):Play()
  781. TweenService:Create(Tab.Title, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {TextTransparency = 0.4}):Play()
  782. end
  783. end
  784. for _, ItemContainer in next, MainWindow:GetChildren() do
  785. if ItemContainer.Name == "ItemContainer" then
  786. ItemContainer.Visible = false
  787. end
  788. end
  789. TweenService:Create(TabFrame.Ico, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {ImageTransparency = 0}):Play()
  790. TweenService:Create(TabFrame.Title, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {TextTransparency = 0}):Play()
  791. TabFrame.Title.Font = Enum.Font.GothamBlack
  792. Container.Visible = true
  793. end)
  794.  
  795. local function GetElements(ItemParent)
  796. local ElementFunction = {}
  797. function ElementFunction:AddLabel(Text)
  798. local LabelFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
  799. Size = UDim2.new(1, 0, 0, 30),
  800. BackgroundTransparency = 0.7,
  801. Parent = ItemParent
  802. }), {
  803. AddThemeObject(SetProps(MakeElement("Label", Text, 15), {
  804. Size = UDim2.new(1, -12, 1, 0),
  805. Position = UDim2.new(0, 12, 0, 0),
  806. Font = Enum.Font.GothamBold,
  807. Name = "Content"
  808. }), "Text"),
  809. AddThemeObject(MakeElement("Stroke"), "Stroke")
  810. }), "Second")
  811.  
  812. local LabelFunction = {}
  813. function LabelFunction:Set(ToChange)
  814. LabelFrame.Content.Text = ToChange
  815. end
  816. return LabelFunction
  817. end
  818. function ElementFunction:AddParagraph(Text, Content)
  819. Text = Text or "Text"
  820. Content = Content or "Content"
  821.  
  822. local ParagraphFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
  823. Size = UDim2.new(1, 0, 0, 30),
  824. BackgroundTransparency = 0.7,
  825. Parent = ItemParent
  826. }), {
  827. AddThemeObject(SetProps(MakeElement("Label", Text, 15), {
  828. Size = UDim2.new(1, -12, 0, 14),
  829. Position = UDim2.new(0, 12, 0, 10),
  830. Font = Enum.Font.GothamBold,
  831. Name = "Title"
  832. }), "Text"),
  833. AddThemeObject(SetProps(MakeElement("Label", "", 13), {
  834. Size = UDim2.new(1, -24, 0, 0),
  835. Position = UDim2.new(0, 12, 0, 26),
  836. Font = Enum.Font.GothamSemibold,
  837. Name = "Content",
  838. TextWrapped = true
  839. }), "TextDark"),
  840. AddThemeObject(MakeElement("Stroke"), "Stroke")
  841. }), "Second")
  842.  
  843. AddConnection(ParagraphFrame.Content:GetPropertyChangedSignal("Text"), function()
  844. ParagraphFrame.Content.Size = UDim2.new(1, -24, 0, ParagraphFrame.Content.TextBounds.Y)
  845. ParagraphFrame.Size = UDim2.new(1, 0, 0, ParagraphFrame.Content.TextBounds.Y + 35)
  846. end)
  847.  
  848. ParagraphFrame.Content.Text = Content
  849.  
  850. local ParagraphFunction = {}
  851. function ParagraphFunction:Set(ToChange)
  852. ParagraphFrame.Content.Text = ToChange
  853. end
  854. return ParagraphFunction
  855. end
  856. function ElementFunction:AddButton(ButtonConfig)
  857. ButtonConfig = ButtonConfig or {}
  858. ButtonConfig.Name = ButtonConfig.Name or "Button"
  859. ButtonConfig.Callback = ButtonConfig.Callback or function() end
  860. ButtonConfig.Icon = ButtonConfig.Icon or "rbxassetid://3944703587"
  861.  
  862. local Button = {}
  863.  
  864. local Click = SetProps(MakeElement("Button"), {
  865. Size = UDim2.new(1, 0, 1, 0)
  866. })
  867.  
  868. local ButtonFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
  869. Size = UDim2.new(1, 0, 0, 33),
  870. Parent = ItemParent
  871. }), {
  872. AddThemeObject(SetProps(MakeElement("Label", ButtonConfig.Name, 15), {
  873. Size = UDim2.new(1, -12, 1, 0),
  874. Position = UDim2.new(0, 12, 0, 0),
  875. Font = Enum.Font.GothamBold,
  876. Name = "Content"
  877. }), "Text"),
  878. AddThemeObject(SetProps(MakeElement("Image", ButtonConfig.Icon), {
  879. Size = UDim2.new(0, 20, 0, 20),
  880. Position = UDim2.new(1, -30, 0, 7),
  881. }), "TextDark"),
  882. AddThemeObject(MakeElement("Stroke"), "Stroke"),
  883. Click
  884. }), "Second")
  885.  
  886. AddConnection(Click.MouseEnter, function()
  887. TweenService:Create(ButtonFrame, 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()
  888. end)
  889.  
  890. AddConnection(Click.MouseLeave, function()
  891. TweenService:Create(ButtonFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Second}):Play()
  892. end)
  893.  
  894. AddConnection(Click.MouseButton1Up, function()
  895. TweenService:Create(ButtonFrame, 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()
  896. spawn(function()
  897. ButtonConfig.Callback()
  898. end)
  899. end)
  900.  
  901. AddConnection(Click.MouseButton1Down, function()
  902. TweenService:Create(ButtonFrame, 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()
  903. end)
  904.  
  905. function Button:Set(ButtonText)
  906. ButtonFrame.Content.Text = ButtonText
  907. end
  908.  
  909. return Button
  910. end
  911. function ElementFunction:AddToggle(ToggleConfig)
  912. ToggleConfig = ToggleConfig or {}
  913. ToggleConfig.Name = ToggleConfig.Name or "Toggle"
  914. ToggleConfig.Default = ToggleConfig.Default or false
  915. ToggleConfig.Callback = ToggleConfig.Callback or function() end
  916. ToggleConfig.Color = ToggleConfig.Color or Color3.fromRGB(9, 99, 195)
  917. ToggleConfig.Flag = ToggleConfig.Flag or nil
  918. ToggleConfig.Save = ToggleConfig.Save or false
  919.  
  920. local Toggle = {Value = ToggleConfig.Default, Save = ToggleConfig.Save}
  921.  
  922. local Click = SetProps(MakeElement("Button"), {
  923. Size = UDim2.new(1, 0, 1, 0)
  924. })
  925.  
  926. local ToggleBox = SetChildren(SetProps(MakeElement("RoundFrame", ToggleConfig.Color, 0, 4), {
  927. Size = UDim2.new(0, 24, 0, 24),
  928. Position = UDim2.new(1, -24, 0.5, 0),
  929. AnchorPoint = Vector2.new(0.5, 0.5)
  930. }), {
  931. SetProps(MakeElement("Stroke"), {
  932. Color = ToggleConfig.Color,
  933. Name = "Stroke",
  934. Transparency = 0.5
  935. }),
  936. SetProps(MakeElement("Image", "rbxassetid://3944680095"), {
  937. Size = UDim2.new(0, 20, 0, 20),
  938. AnchorPoint = Vector2.new(0.5, 0.5),
  939. Position = UDim2.new(0.5, 0, 0.5, 0),
  940. ImageColor3 = Color3.fromRGB(255, 255, 255),
  941. Name = "Ico"
  942. }),
  943. })
  944.  
  945. local ToggleFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
  946. Size = UDim2.new(1, 0, 0, 38),
  947. Parent = ItemParent
  948. }), {
  949. AddThemeObject(SetProps(MakeElement("Label", ToggleConfig.Name, 15), {
  950. Size = UDim2.new(1, -12, 1, 0),
  951. Position = UDim2.new(0, 12, 0, 0),
  952. Font = Enum.Font.GothamBold,
  953. Name = "Content"
  954. }), "Text"),
  955. AddThemeObject(MakeElement("Stroke"), "Stroke"),
  956. ToggleBox,
  957. Click
  958. }), "Second")
  959.  
  960. function Toggle:Set(Value)
  961. Toggle.Value = Value
  962. TweenService:Create(ToggleBox, TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = Toggle.Value and ToggleConfig.Color or OrionLib.Themes.Default.Divider}):Play()
  963. TweenService:Create(ToggleBox.Stroke, TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Color = Toggle.Value and ToggleConfig.Color or OrionLib.Themes.Default.Stroke}):Play()
  964. 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()
  965. ToggleConfig.Callback(Toggle.Value)
  966. end
  967.  
  968. Toggle:Set(Toggle.Value)
  969.  
  970. AddConnection(Click.MouseEnter, function()
  971. 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()
  972. end)
  973.  
  974. AddConnection(Click.MouseLeave, function()
  975. TweenService:Create(ToggleFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Second}):Play()
  976. end)
  977.  
  978. AddConnection(Click.MouseButton1Up, function()
  979. 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()
  980. SaveCfg(game.GameId)
  981. Toggle:Set(not Toggle.Value)
  982. end)
  983.  
  984. AddConnection(Click.MouseButton1Down, function()
  985. 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()
  986. end)
  987.  
  988. if ToggleConfig.Flag then
  989. OrionLib.Flags[ToggleConfig.Flag] = Toggle
  990. end
  991. return Toggle
  992. end
  993. function ElementFunction:AddSlider(SliderConfig)
  994. SliderConfig = SliderConfig or {}
  995. SliderConfig.Name = SliderConfig.Name or "Slider"
  996. SliderConfig.Min = SliderConfig.Min or 0
  997. SliderConfig.Max = SliderConfig.Max or 100
  998. SliderConfig.Increment = SliderConfig.Increment or 1
  999. SliderConfig.Default = SliderConfig.Default or 50
  1000. SliderConfig.Callback = SliderConfig.Callback or function() end
  1001. SliderConfig.ValueName = SliderConfig.ValueName or ""
  1002. SliderConfig.Color = SliderConfig.Color or Color3.fromRGB(9, 149, 98)
  1003. SliderConfig.Flag = SliderConfig.Flag or nil
  1004. SliderConfig.Save = SliderConfig.Save or false
  1005.  
  1006. local Slider = {Value = SliderConfig.Default, Save = SliderConfig.Save}
  1007. local Dragging = false
  1008.  
  1009. local SliderDrag = SetChildren(SetProps(MakeElement("RoundFrame", SliderConfig.Color, 0, 5), {
  1010. Size = UDim2.new(0, 0, 1, 0),
  1011. BackgroundTransparency = 0.3,
  1012. ClipsDescendants = true
  1013. }), {
  1014. AddThemeObject(SetProps(MakeElement("Label", "value", 13), {
  1015. Size = UDim2.new(1, -12, 0, 14),
  1016. Position = UDim2.new(0, 12, 0, 6),
  1017. Font = Enum.Font.GothamBold,
  1018. Name = "Value",
  1019. TextTransparency = 0
  1020. }), "Text")
  1021. })
  1022.  
  1023. local SliderBar = SetChildren(SetProps(MakeElement("RoundFrame", SliderConfig.Color, 0, 5), {
  1024. Size = UDim2.new(1, -24, 0, 26),
  1025. Position = UDim2.new(0, 12, 0, 30),
  1026. BackgroundTransparency = 0.9
  1027. }), {
  1028. SetProps(MakeElement("Stroke"), {
  1029. Color = SliderConfig.Color
  1030. }),
  1031. AddThemeObject(SetProps(MakeElement("Label", "value", 13), {
  1032. Size = UDim2.new(1, -12, 0, 14),
  1033. Position = UDim2.new(0, 12, 0, 6),
  1034. Font = Enum.Font.GothamBold,
  1035. Name = "Value",
  1036. TextTransparency = 0.8
  1037. }), "Text"),
  1038. SliderDrag
  1039. })
  1040.  
  1041. local SliderFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 4), {
  1042. Size = UDim2.new(1, 0, 0, 65),
  1043. Parent = ItemParent
  1044. }), {
  1045. AddThemeObject(SetProps(MakeElement("Label", SliderConfig.Name, 15), {
  1046. Size = UDim2.new(1, -12, 0, 14),
  1047. Position = UDim2.new(0, 12, 0, 10),
  1048. Font = Enum.Font.GothamBold,
  1049. Name = "Content"
  1050. }), "Text"),
  1051. AddThemeObject(MakeElement("Stroke"), "Stroke"),
  1052. SliderBar
  1053. }), "Second")
  1054.  
  1055. SliderBar.InputBegan:Connect(function(Input)
  1056. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  1057. Dragging = true
  1058. end
  1059. end)
  1060. SliderBar.InputEnded:Connect(function(Input)
  1061. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  1062. Dragging = false
  1063. end
  1064. end)
  1065.  
  1066. UserInputService.InputChanged:Connect(function(Input)
  1067. if Dragging and Input.UserInputType == Enum.UserInputType.MouseMovement then
  1068. local SizeScale = math.clamp((Input.Position.X - SliderBar.AbsolutePosition.X) / SliderBar.AbsoluteSize.X, 0, 1)
  1069. Slider:Set(SliderConfig.Min + ((SliderConfig.Max - SliderConfig.Min) * SizeScale))
  1070. SaveCfg(game.GameId)
  1071. end
  1072. end)
  1073.  
  1074. function Slider:Set(Value)
  1075. self.Value = math.clamp(Round(Value, SliderConfig.Increment), SliderConfig.Min, SliderConfig.Max)
  1076. 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()
  1077. SliderBar.Value.Text = tostring(self.Value) .. " " .. SliderConfig.ValueName
  1078. SliderDrag.Value.Text = tostring(self.Value) .. " " .. SliderConfig.ValueName
  1079. SliderConfig.Callback(self.Value)
  1080. end
  1081.  
  1082. Slider:Set(Slider.Value)
  1083. if SliderConfig.Flag then
  1084. OrionLib.Flags[SliderConfig.Flag] = Slider
  1085. end
  1086. return Slider
  1087. end
  1088. function ElementFunction:AddDropdown(DropdownConfig)
  1089. DropdownConfig = DropdownConfig or {}
  1090. DropdownConfig.Name = DropdownConfig.Name or "Dropdown"
  1091. DropdownConfig.Options = DropdownConfig.Options or {}
  1092. DropdownConfig.Default = DropdownConfig.Default or ""
  1093. DropdownConfig.Callback = DropdownConfig.Callback or function() end
  1094. DropdownConfig.Flag = DropdownConfig.Flag or nil
  1095. DropdownConfig.Save = DropdownConfig.Save or false
  1096.  
  1097. local Dropdown = {Value = DropdownConfig.Default, Options = DropdownConfig.Options, Buttons = {}, Toggled = false, Type = "Dropdown", Save = DropdownConfig.Save}
  1098. local MaxElements = 5
  1099.  
  1100. if not table.find(Dropdown.Options, Dropdown.Value) then
  1101. Dropdown.Value = "..."
  1102. end
  1103.  
  1104. local DropdownList = MakeElement("List")
  1105.  
  1106. local DropdownContainer = AddThemeObject(SetProps(SetChildren(MakeElement("ScrollFrame", Color3.fromRGB(40, 40, 40), 4), {
  1107. DropdownList
  1108. }), {
  1109. Parent = ItemParent,
  1110. Position = UDim2.new(0, 0, 0, 38),
  1111. Size = UDim2.new(1, 0, 1, -38),
  1112. ClipsDescendants = true
  1113. }), "Divider")
  1114.  
  1115. local Click = SetProps(MakeElement("Button"), {
  1116. Size = UDim2.new(1, 0, 1, 0)
  1117. })
  1118.  
  1119. local DropdownFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
  1120. Size = UDim2.new(1, 0, 0, 38),
  1121. Parent = ItemParent,
  1122. ClipsDescendants = true
  1123. }), {
  1124. DropdownContainer,
  1125. SetProps(SetChildren(MakeElement("TFrame"), {
  1126. AddThemeObject(SetProps(MakeElement("Label", DropdownConfig.Name, 15), {
  1127. Size = UDim2.new(1, -12, 1, 0),
  1128. Position = UDim2.new(0, 12, 0, 0),
  1129. Font = Enum.Font.GothamBold,
  1130. Name = "Content"
  1131. }), "Text"),
  1132. AddThemeObject(SetProps(MakeElement("Image", "rbxassetid://7072706796"), {
  1133. Size = UDim2.new(0, 20, 0, 20),
  1134. AnchorPoint = Vector2.new(0, 0.5),
  1135. Position = UDim2.new(1, -30, 0.5, 0),
  1136. ImageColor3 = Color3.fromRGB(240, 240, 240),
  1137. Name = "Ico"
  1138. }), "TextDark"),
  1139. AddThemeObject(SetProps(MakeElement("Label", "Selected", 13), {
  1140. Size = UDim2.new(1, -40, 1, 0),
  1141. Font = Enum.Font.Gotham,
  1142. Name = "Selected",
  1143. TextXAlignment = Enum.TextXAlignment.Right
  1144. }), "TextDark"),
  1145. AddThemeObject(SetProps(MakeElement("Frame"), {
  1146. Size = UDim2.new(1, 0, 0, 1),
  1147. Position = UDim2.new(0, 0, 1, -1),
  1148. Name = "Line",
  1149. Visible = false
  1150. }), "Stroke"),
  1151. Click
  1152. }), {
  1153. Size = UDim2.new(1, 0, 0, 38),
  1154. ClipsDescendants = true,
  1155. Name = "F"
  1156. }),
  1157. AddThemeObject(MakeElement("Stroke"), "Stroke"),
  1158. MakeElement("Corner")
  1159. }), "Second")
  1160.  
  1161. AddConnection(DropdownList:GetPropertyChangedSignal("AbsoluteContentSize"), function()
  1162. DropdownContainer.CanvasSize = UDim2.new(0, 0, 0, DropdownList.AbsoluteContentSize.Y)
  1163. end)
  1164.  
  1165. local function AddOptions(Options)
  1166. for _, Option in pairs(Options) do
  1167. local OptionBtn = AddThemeObject(SetProps(SetChildren(MakeElement("Button", Color3.fromRGB(40, 40, 40)), {
  1168. MakeElement("Corner", 0, 6),
  1169. AddThemeObject(SetProps(MakeElement("Label", Option, 13, 0.4), {
  1170. Position = UDim2.new(0, 8, 0, 0),
  1171. Size = UDim2.new(1, -8, 1, 0),
  1172. Name = "Title"
  1173. }), "Text")
  1174. }), {
  1175. Parent = DropdownContainer,
  1176. Size = UDim2.new(1, 0, 0, 28),
  1177. BackgroundTransparency = 1,
  1178. ClipsDescendants = true
  1179. }), "Divider")
  1180.  
  1181. AddConnection(OptionBtn.MouseButton1Click, function()
  1182. Dropdown:Set(Option)
  1183. SaveCfg(game.GameId)
  1184. end)
  1185.  
  1186. Dropdown.Buttons[Option] = OptionBtn
  1187. end
  1188. end
  1189.  
  1190. function Dropdown:Refresh(Options, Delete)
  1191. if Delete then
  1192. for _,v in pairs(Dropdown.Buttons) do
  1193. v:Destroy()
  1194. end
  1195. table.clear(Dropdown.Options)
  1196. table.clear(Dropdown.Buttons)
  1197. end
  1198. Dropdown.Options = Options
  1199. AddOptions(Dropdown.Options)
  1200. end
  1201.  
  1202. function Dropdown:Set(Value)
  1203. if not table.find(Dropdown.Options, Value) then
  1204. Dropdown.Value = "..."
  1205. DropdownFrame.F.Selected.Text = Dropdown.Value
  1206. for _, v in pairs(Dropdown.Buttons) do
  1207. TweenService:Create(v,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{BackgroundTransparency = 1}):Play()
  1208. TweenService:Create(v.Title,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{TextTransparency = 0.4}):Play()
  1209. end
  1210. return
  1211. end
  1212.  
  1213. Dropdown.Value = Value
  1214. DropdownFrame.F.Selected.Text = Dropdown.Value
  1215.  
  1216. for _, v in pairs(Dropdown.Buttons) do
  1217. TweenService:Create(v,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{BackgroundTransparency = 1}):Play()
  1218. TweenService:Create(v.Title,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{TextTransparency = 0.4}):Play()
  1219. end
  1220. TweenService:Create(Dropdown.Buttons[Value],TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{BackgroundTransparency = 0}):Play()
  1221. TweenService:Create(Dropdown.Buttons[Value].Title,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{TextTransparency = 0}):Play()
  1222. return DropdownConfig.Callback(Dropdown.Value)
  1223. end
  1224.  
  1225. AddConnection(Click.MouseButton1Click, function()
  1226. Dropdown.Toggled = not Dropdown.Toggled
  1227. DropdownFrame.F.Line.Visible = Dropdown.Toggled
  1228. TweenService:Create(DropdownFrame.F.Ico,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{Rotation = Dropdown.Toggled and 180 or 0}):Play()
  1229. if #Dropdown.Options > MaxElements then
  1230. 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()
  1231. else
  1232. 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()
  1233. end
  1234. end)
  1235.  
  1236. Dropdown:Refresh(Dropdown.Options, false)
  1237. Dropdown:Set(Dropdown.Value)
  1238. if DropdownConfig.Flag then
  1239. OrionLib.Flags[DropdownConfig.Flag] = Dropdown
  1240. end
  1241. return Dropdown
  1242. end
  1243. function ElementFunction:AddBind(BindConfig)
  1244. BindConfig.Name = BindConfig.Name or "Bind"
  1245. BindConfig.Default = BindConfig.Default or Enum.KeyCode.Unknown
  1246. BindConfig.Hold = BindConfig.Hold or false
  1247. BindConfig.Callback = BindConfig.Callback or function() end
  1248. BindConfig.Flag = BindConfig.Flag or nil
  1249. BindConfig.Save = BindConfig.Save or false
  1250.  
  1251. local Bind = {Value, Binding = false, Type = "Bind", Save = BindConfig.Save}
  1252. local Holding = false
  1253.  
  1254. local Click = SetProps(MakeElement("Button"), {
  1255. Size = UDim2.new(1, 0, 1, 0)
  1256. })
  1257.  
  1258. local BindBox = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 4), {
  1259. Size = UDim2.new(0, 24, 0, 24),
  1260. Position = UDim2.new(1, -12, 0.5, 0),
  1261. AnchorPoint = Vector2.new(1, 0.5)
  1262. }), {
  1263. AddThemeObject(MakeElement("Stroke"), "Stroke"),
  1264. AddThemeObject(SetProps(MakeElement("Label", BindConfig.Name, 14), {
  1265. Size = UDim2.new(1, 0, 1, 0),
  1266. Font = Enum.Font.GothamBold,
  1267. TextXAlignment = Enum.TextXAlignment.Center,
  1268. Name = "Value"
  1269. }), "Text")
  1270. }), "Main")
  1271.  
  1272. local BindFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
  1273. Size = UDim2.new(1, 0, 0, 38),
  1274. Parent = ItemParent
  1275. }), {
  1276. AddThemeObject(SetProps(MakeElement("Label", BindConfig.Name, 15), {
  1277. Size = UDim2.new(1, -12, 1, 0),
  1278. Position = UDim2.new(0, 12, 0, 0),
  1279. Font = Enum.Font.GothamBold,
  1280. Name = "Content"
  1281. }), "Text"),
  1282. AddThemeObject(MakeElement("Stroke"), "Stroke"),
  1283. BindBox,
  1284. Click
  1285. }), "Second")
  1286.  
  1287. AddConnection(BindBox.Value:GetPropertyChangedSignal("Text"), function()
  1288. --BindBox.Size = UDim2.new(0, BindBox.Value.TextBounds.X + 16, 0, 24)
  1289. 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()
  1290. end)
  1291.  
  1292. AddConnection(Click.InputEnded, function(Input)
  1293. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  1294. if Bind.Binding then return end
  1295. Bind.Binding = true
  1296. BindBox.Value.Text = ""
  1297. end
  1298. end)
  1299.  
  1300. AddConnection(UserInputService.InputBegan, function(Input)
  1301. if UserInputService:GetFocusedTextBox() then return end
  1302. if (Input.KeyCode.Name == Bind.Value or Input.UserInputType.Name == Bind.Value) and not Bind.Binding then
  1303. if BindConfig.Hold then
  1304. Holding = true
  1305. BindConfig.Callback(Holding)
  1306. else
  1307. BindConfig.Callback()
  1308. end
  1309. elseif Bind.Binding then
  1310. local Key
  1311. pcall(function()
  1312. if not CheckKey(BlacklistedKeys, Input.KeyCode) then
  1313. Key = Input.KeyCode
  1314. end
  1315. end)
  1316. pcall(function()
  1317. if CheckKey(WhitelistedMouse, Input.UserInputType) and not Key then
  1318. Key = Input.UserInputType
  1319. end
  1320. end)
  1321. Key = Key or Bind.Value
  1322. Bind:Set(Key)
  1323. SaveCfg(game.GameId)
  1324. end
  1325. end)
  1326.  
  1327. AddConnection(UserInputService.InputEnded, function(Input)
  1328. if Input.KeyCode.Name == Bind.Value or Input.UserInputType.Name == Bind.Value then
  1329. if BindConfig.Hold and Holding then
  1330. Holding = false
  1331. BindConfig.Callback(Holding)
  1332. end
  1333. end
  1334. end)
  1335.  
  1336. AddConnection(Click.MouseEnter, function()
  1337. 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()
  1338. end)
  1339.  
  1340. AddConnection(Click.MouseLeave, function()
  1341. TweenService:Create(BindFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Second}):Play()
  1342. end)
  1343.  
  1344. AddConnection(Click.MouseButton1Up, function()
  1345. 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()
  1346. end)
  1347.  
  1348. AddConnection(Click.MouseButton1Down, function()
  1349. 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()
  1350. end)
  1351.  
  1352. function Bind:Set(Key)
  1353. Bind.Binding = false
  1354. Bind.Value = Key or Bind.Value
  1355. Bind.Value = Bind.Value.Name or Bind.Value
  1356. BindBox.Value.Text = Bind.Value
  1357. end
  1358.  
  1359. Bind:Set(BindConfig.Default)
  1360. if BindConfig.Flag then
  1361. OrionLib.Flags[BindConfig.Flag] = Bind
  1362. end
  1363. return Bind
  1364. end
  1365. function ElementFunction:AddTextbox(TextboxConfig)
  1366. TextboxConfig = TextboxConfig or {}
  1367. TextboxConfig.Name = TextboxConfig.Name or "Textbox"
  1368. TextboxConfig.Default = TextboxConfig.Default or ""
  1369. TextboxConfig.TextDisappear = TextboxConfig.TextDisappear or false
  1370. TextboxConfig.Callback = TextboxConfig.Callback or function() end
  1371.  
  1372. local Click = SetProps(MakeElement("Button"), {
  1373. Size = UDim2.new(1, 0, 1, 0)
  1374. })
  1375.  
  1376. local TextboxActual = AddThemeObject(Create("TextBox", {
  1377. Size = UDim2.new(1, 0, 1, 0),
  1378. BackgroundTransparency = 1,
  1379. TextColor3 = Color3.fromRGB(255, 255, 255),
  1380. PlaceholderColor3 = Color3.fromRGB(210,210,210),
  1381. PlaceholderText = "Input",
  1382. Font = Enum.Font.GothamSemibold,
  1383. TextXAlignment = Enum.TextXAlignment.Center,
  1384. TextSize = 14,
  1385. ClearTextOnFocus = false
  1386. }), "Text")
  1387.  
  1388. local TextContainer = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 4), {
  1389. Size = UDim2.new(0, 24, 0, 24),
  1390. Position = UDim2.new(1, -12, 0.5, 0),
  1391. AnchorPoint = Vector2.new(1, 0.5)
  1392. }), {
  1393. AddThemeObject(MakeElement("Stroke"), "Stroke"),
  1394. TextboxActual
  1395. }), "Main")
  1396.  
  1397.  
  1398. local TextboxFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
  1399. Size = UDim2.new(1, 0, 0, 38),
  1400. Parent = ItemParent
  1401. }), {
  1402. AddThemeObject(SetProps(MakeElement("Label", TextboxConfig.Name, 15), {
  1403. Size = UDim2.new(1, -12, 1, 0),
  1404. Position = UDim2.new(0, 12, 0, 0),
  1405. Font = Enum.Font.GothamBold,
  1406. Name = "Content"
  1407. }), "Text"),
  1408. AddThemeObject(MakeElement("Stroke"), "Stroke"),
  1409. TextContainer,
  1410. Click
  1411. }), "Second")
  1412.  
  1413. AddConnection(TextboxActual:GetPropertyChangedSignal("Text"), function()
  1414. --TextContainer.Size = UDim2.new(0, TextboxActual.TextBounds.X + 16, 0, 24)
  1415. TweenService:Create(TextContainer, TweenInfo.new(0.45, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Size = UDim2.new(0, TextboxActual.TextBounds.X + 16, 0, 24)}):Play()
  1416. end)
  1417.  
  1418. AddConnection(TextboxActual.FocusLost, function()
  1419. TextboxConfig.Callback(TextboxActual.Text)
  1420. if TextboxConfig.TextDisappear then
  1421. TextboxActual.Text = ""
  1422. end
  1423. end)
  1424.  
  1425. TextboxActual.Text = TextboxConfig.Default
  1426.  
  1427. AddConnection(Click.MouseEnter, function()
  1428. 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()
  1429. end)
  1430.  
  1431. AddConnection(Click.MouseLeave, function()
  1432. TweenService:Create(TextboxFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Second}):Play()
  1433. end)
  1434.  
  1435. AddConnection(Click.MouseButton1Up, function()
  1436. 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()
  1437. TextboxActual:CaptureFocus()
  1438. end)
  1439.  
  1440. AddConnection(Click.MouseButton1Down, function()
  1441. 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()
  1442. end)
  1443. end
  1444. function ElementFunction:AddColorpicker(ColorpickerConfig)
  1445. ColorpickerConfig = ColorpickerConfig or {}
  1446. ColorpickerConfig.Name = ColorpickerConfig.Name or "Colorpicker"
  1447. ColorpickerConfig.Default = ColorpickerConfig.Default or Color3.fromRGB(255,255,255)
  1448. ColorpickerConfig.Callback = ColorpickerConfig.Callback or function() end
  1449. ColorpickerConfig.Flag = ColorpickerConfig.Flag or nil
  1450. ColorpickerConfig.Save = ColorpickerConfig.Save or false
  1451.  
  1452. local ColorH, ColorS, ColorV = 1, 1, 1
  1453. local Colorpicker = {Value = ColorpickerConfig.Default, Toggled = false, Type = "Colorpicker", Save = ColorpickerConfig.Save}
  1454.  
  1455. local ColorSelection = Create("ImageLabel", {
  1456. Size = UDim2.new(0, 18, 0, 18),
  1457. Position = UDim2.new(select(3, Color3.toHSV(Colorpicker.Value))),
  1458. ScaleType = Enum.ScaleType.Fit,
  1459. AnchorPoint = Vector2.new(0.5, 0.5),
  1460. BackgroundTransparency = 1,
  1461. Image = "http://www.roblox.com/asset/?id=4805639000"
  1462. })
  1463.  
  1464. local HueSelection = Create("ImageLabel", {
  1465. Size = UDim2.new(0, 18, 0, 18),
  1466. Position = UDim2.new(0.5, 0, 1 - select(1, Color3.toHSV(Colorpicker.Value))),
  1467. ScaleType = Enum.ScaleType.Fit,
  1468. AnchorPoint = Vector2.new(0.5, 0.5),
  1469. BackgroundTransparency = 1,
  1470. Image = "http://www.roblox.com/asset/?id=4805639000"
  1471. })
  1472.  
  1473. local Color = Create("ImageLabel", {
  1474. Size = UDim2.new(1, -25, 1, 0),
  1475. Visible = false,
  1476. Image = "rbxassetid://4155801252"
  1477. }, {
  1478. Create("UICorner", {CornerRadius = UDim.new(0, 5)}),
  1479. ColorSelection
  1480. })
  1481.  
  1482. local Hue = Create("Frame", {
  1483. Size = UDim2.new(0, 20, 1, 0),
  1484. Position = UDim2.new(1, -20, 0, 0),
  1485. Visible = false
  1486. }, {
  1487. 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))},}),
  1488. Create("UICorner", {CornerRadius = UDim.new(0, 5)}),
  1489. HueSelection
  1490. })
  1491.  
  1492. local ColorpickerContainer = Create("Frame", {
  1493. Position = UDim2.new(0, 0, 0, 32),
  1494. Size = UDim2.new(1, 0, 1, -32),
  1495. BackgroundTransparency = 1,
  1496. ClipsDescendants = true
  1497. }, {
  1498. Hue,
  1499. Color,
  1500. Create("UIPadding", {
  1501. PaddingLeft = UDim.new(0, 35),
  1502. PaddingRight = UDim.new(0, 35),
  1503. PaddingBottom = UDim.new(0, 10),
  1504. PaddingTop = UDim.new(0, 17)
  1505. })
  1506. })
  1507.  
  1508. local Click = SetProps(MakeElement("Button"), {
  1509. Size = UDim2.new(1, 0, 1, 0)
  1510. })
  1511.  
  1512. local ColorpickerBox = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 4), {
  1513. Size = UDim2.new(0, 24, 0, 24),
  1514. Position = UDim2.new(1, -12, 0.5, 0),
  1515. AnchorPoint = Vector2.new(1, 0.5)
  1516. }), {
  1517. AddThemeObject(MakeElement("Stroke"), "Stroke")
  1518. }), "Main")
  1519.  
  1520. local ColorpickerFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
  1521. Size = UDim2.new(1, 0, 0, 38),
  1522. Parent = ItemParent
  1523. }), {
  1524. SetProps(SetChildren(MakeElement("TFrame"), {
  1525. AddThemeObject(SetProps(MakeElement("Label", ColorpickerConfig.Name, 15), {
  1526. Size = UDim2.new(1, -12, 1, 0),
  1527. Position = UDim2.new(0, 12, 0, 0),
  1528. Font = Enum.Font.GothamBold,
  1529. Name = "Content"
  1530. }), "Text"),
  1531. ColorpickerBox,
  1532. Click,
  1533. AddThemeObject(SetProps(MakeElement("Frame"), {
  1534. Size = UDim2.new(1, 0, 0, 1),
  1535. Position = UDim2.new(0, 0, 1, -1),
  1536. Name = "Line",
  1537. Visible = false
  1538. }), "Stroke"),
  1539. }), {
  1540. Size = UDim2.new(1, 0, 0, 38),
  1541. ClipsDescendants = true,
  1542. Name = "F"
  1543. }),
  1544. ColorpickerContainer,
  1545. AddThemeObject(MakeElement("Stroke"), "Stroke"),
  1546. }), "Second")
  1547.  
  1548. AddConnection(Click.MouseButton1Click, function()
  1549. Colorpicker.Toggled = not Colorpicker.Toggled
  1550. TweenService:Create(ColorpickerFrame,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{Size = Colorpicker.Toggled and UDim2.new(1, 0, 0, 148) or UDim2.new(1, 0, 0, 38)}):Play()
  1551. Color.Visible = Colorpicker.Toggled
  1552. Hue.Visible = Colorpicker.Toggled
  1553. ColorpickerFrame.F.Line.Visible = Colorpicker.Toggled
  1554. end)
  1555.  
  1556. local function UpdateColorPicker()
  1557. ColorpickerBox.BackgroundColor3 = Color3.fromHSV(ColorH, ColorS, ColorV)
  1558. Color.BackgroundColor3 = Color3.fromHSV(ColorH, 1, 1)
  1559. Colorpicker:Set(ColorpickerBox.BackgroundColor3)
  1560. ColorpickerConfig.Callback(ColorpickerBox.BackgroundColor3)
  1561. SaveCfg(game.GameId)
  1562. end
  1563.  
  1564. ColorH = 1 - (math.clamp(HueSelection.AbsolutePosition.Y - Hue.AbsolutePosition.Y, 0, Hue.AbsoluteSize.Y) / Hue.AbsoluteSize.Y)
  1565. ColorS = (math.clamp(ColorSelection.AbsolutePosition.X - Color.AbsolutePosition.X, 0, Color.AbsoluteSize.X) / Color.AbsoluteSize.X)
  1566. ColorV = 1 - (math.clamp(ColorSelection.AbsolutePosition.Y - Color.AbsolutePosition.Y, 0, Color.AbsoluteSize.Y) / Color.AbsoluteSize.Y)
  1567.  
  1568. AddConnection(Color.InputBegan, function(input)
  1569. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1570. if ColorInput then
  1571. ColorInput:Disconnect()
  1572. end
  1573. ColorInput = AddConnection(RunService.RenderStepped, function()
  1574. local ColorX = (math.clamp(Mouse.X - Color.AbsolutePosition.X, 0, Color.AbsoluteSize.X) / Color.AbsoluteSize.X)
  1575. local ColorY = (math.clamp(Mouse.Y - Color.AbsolutePosition.Y, 0, Color.AbsoluteSize.Y) / Color.AbsoluteSize.Y)
  1576. ColorSelection.Position = UDim2.new(ColorX, 0, ColorY, 0)
  1577. ColorS = ColorX
  1578. ColorV = 1 - ColorY
  1579. UpdateColorPicker()
  1580. end)
  1581. end
  1582. end)
  1583.  
  1584. AddConnection(Color.InputEnded, function(input)
  1585. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1586. if ColorInput then
  1587. ColorInput:Disconnect()
  1588. end
  1589. end
  1590. end)
  1591.  
  1592. AddConnection(Hue.InputBegan, function(input)
  1593. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1594. if HueInput then
  1595. HueInput:Disconnect()
  1596. end;
  1597.  
  1598. HueInput = AddConnection(RunService.RenderStepped, function()
  1599. local HueY = (math.clamp(Mouse.Y - Hue.AbsolutePosition.Y, 0, Hue.AbsoluteSize.Y) / Hue.AbsoluteSize.Y)
  1600.  
  1601. HueSelection.Position = UDim2.new(0.5, 0, HueY, 0)
  1602. ColorH = 1 - HueY
  1603.  
  1604. UpdateColorPicker()
  1605. end)
  1606. end
  1607. end)
  1608.  
  1609. AddConnection(Hue.InputEnded, function(input)
  1610. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1611. if HueInput then
  1612. HueInput:Disconnect()
  1613. end
  1614. end
  1615. end)
  1616.  
  1617. function Colorpicker:Set(Value)
  1618. Colorpicker.Value = Value
  1619. ColorpickerBox.BackgroundColor3 = Colorpicker.Value
  1620. ColorpickerConfig.Callback(Colorpicker.Value)
  1621. end
  1622.  
  1623. Colorpicker:Set(Colorpicker.Value)
  1624. if ColorpickerConfig.Flag then
  1625. OrionLib.Flags[ColorpickerConfig.Flag] = Colorpicker
  1626. end
  1627. return Colorpicker
  1628. end
  1629. return ElementFunction
  1630. end
  1631.  
  1632. local ElementFunction = {}
  1633.  
  1634. function ElementFunction:AddSection(SectionConfig)
  1635. SectionConfig.Name = SectionConfig.Name or "Section"
  1636.  
  1637. local SectionFrame = SetChildren(SetProps(MakeElement("TFrame"), {
  1638. Size = UDim2.new(1, 0, 0, 26),
  1639. Parent = Container
  1640. }), {
  1641. AddThemeObject(SetProps(MakeElement("Label", SectionConfig.Name, 14), {
  1642. Size = UDim2.new(1, -12, 0, 16),
  1643. Position = UDim2.new(0, 0, 0, 3),
  1644. Font = Enum.Font.GothamSemibold
  1645. }), "TextDark"),
  1646. SetChildren(SetProps(MakeElement("TFrame"), {
  1647. AnchorPoint = Vector2.new(0, 0),
  1648. Size = UDim2.new(1, 0, 1, -24),
  1649. Position = UDim2.new(0, 0, 0, 23),
  1650. Name = "Holder"
  1651. }), {
  1652. MakeElement("List", 0, 6)
  1653. }),
  1654. })
  1655.  
  1656. AddConnection(SectionFrame.Holder.UIListLayout:GetPropertyChangedSignal("AbsoluteContentSize"), function()
  1657. SectionFrame.Size = UDim2.new(1, 0, 0, SectionFrame.Holder.UIListLayout.AbsoluteContentSize.Y + 31)
  1658. SectionFrame.Holder.Size = UDim2.new(1, 0, 0, SectionFrame.Holder.UIListLayout.AbsoluteContentSize.Y)
  1659. end)
  1660.  
  1661. local SectionFunction = {}
  1662. for i, v in next, GetElements(SectionFrame.Holder) do
  1663. SectionFunction[i] = v
  1664. end
  1665. return SectionFunction
  1666. end
  1667.  
  1668. for i, v in next, GetElements(Container) do
  1669. ElementFunction[i] = v
  1670. end
  1671.  
  1672. if TabConfig.PremiumOnly then
  1673. for i, v in next, ElementFunction do
  1674. ElementFunction[i] = function() end
  1675. end
  1676. Container:FindFirstChild("UIListLayout"):Destroy()
  1677. Container:FindFirstChild("UIPadding"):Destroy()
  1678. SetChildren(SetProps(MakeElement("TFrame"), {
  1679. Size = UDim2.new(1, 0, 1, 0),
  1680. Parent = ItemParent
  1681. }), {
  1682. AddThemeObject(SetProps(MakeElement("Image", "rbxassetid://3610239960"), {
  1683. Size = UDim2.new(0, 18, 0, 18),
  1684. Position = UDim2.new(0, 15, 0, 15),
  1685. ImageTransparency = 0.4
  1686. }), "Text"),
  1687. AddThemeObject(SetProps(MakeElement("Label", "Unauthorised Access", 14), {
  1688. Size = UDim2.new(1, -38, 0, 14),
  1689. Position = UDim2.new(0, 38, 0, 18),
  1690. TextTransparency = 0.4
  1691. }), "Text"),
  1692. AddThemeObject(SetProps(MakeElement("Image", "rbxassetid://4483345875"), {
  1693. Size = UDim2.new(0, 56, 0, 56),
  1694. Position = UDim2.new(0, 84, 0, 110),
  1695. }), "Text"),
  1696. AddThemeObject(SetProps(MakeElement("Label", "Premium Features", 14), {
  1697. Size = UDim2.new(1, -150, 0, 14),
  1698. Position = UDim2.new(0, 150, 0, 112),
  1699. Font = Enum.Font.GothamBold
  1700. }), "Text"),
  1701. 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), {
  1702. Size = UDim2.new(1, -200, 0, 14),
  1703. Position = UDim2.new(0, 150, 0, 138),
  1704. TextWrapped = true,
  1705. TextTransparency = 0.4
  1706. }), "Text")
  1707. })
  1708. end
  1709. return ElementFunction
  1710. end
  1711.  
  1712. OrionLib:MakeNotification({
  1713. Name = "UI Library Upgrade",
  1714. Content = "New UI Library Available at sirius.menu/discord and sirius.menu/rayfield",
  1715. Time = 5
  1716. })
  1717.  
  1718.  
  1719.  
  1720. return TabFunction
  1721. end
  1722.  
  1723. function OrionLib:Destroy()
  1724. Orion:Destroy()
  1725. end
  1726.  
  1727. return OrionLib
Advertisement
Add Comment
Please, Sign In to add comment