Advertisement
NightGolden

55

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