LynXS_

Untitled

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