Advertisement
ARY106_7

Untitled

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