LynXS_

Untitled

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