LynXS_

not draggable orion lib

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