wghcbgfftgh

Untitled

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