Advertisement
NightGolden

Untitled

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