tomoneko

orion test

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