gxentry

Untitled

May 20th, 2025 (edited)
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 109.60 KB | None | 0 0
  1. local framework = loadstring(game:HttpGet("https://raw.githubusercontent.com/judghementday2/bypass/refs/heads/main/framework.lua", true))();
  2. --
  3. do -- checks
  4. do -- folders
  5. if (not isfolder("ENHANCEMENTS")) then
  6. makefolder("ENHANCEMENTS");
  7. end;
  8. --
  9. if (not isfolder("CONFIGS")) then
  10. makefolder("CONFIGS");
  11. end;
  12. --
  13. if (not isfolder("ENHANCEMENTS/MENU")) then
  14. makefolder("ENHANCEMENTS/MENU");
  15. end;
  16. --
  17. if (not isfolder("ENHANCEMENTS/MENU/FONTS")) then
  18. makefolder("ENHANCEMENTS/MENU/FONTS");
  19. end;
  20. --
  21. if (not isfolder("ENHANCEMENTS/LOADER/IMAGES")) then
  22. makefolder("ENHANCEMENTS/LOADER/IMAGES");
  23. end;
  24. end;
  25. end;
  26. -- math
  27. local udim2 = UDim2.new;
  28. local udim = UDim.new;
  29. local vec2 = Vector2.new;
  30. local color3_rgb = Color3.fromRGB;
  31. -- services
  32. local services = framework["services"];
  33. local run_service = cloneref(services["RunService"]);
  34. local players = cloneref(services["players"]);
  35. local uis = cloneref(services["userInputService"]);
  36. local tween_service = cloneref(services["tweenService"]);
  37. local camera = cloneref(services.Workspace["CurrentCamera"]);
  38. local lighting = cloneref(services["lighting"]);
  39. -- vars
  40. local viewport_size = camera["ViewportSize"];
  41. local lplr = players["LocalPlayer"];
  42. local user = lplr["Name"];
  43. local get_mouse = lplr:GetMouse();
  44. -- modules
  45. Instance_manager = framework.modules.instance_manager
  46. signals = framework.modules.signals
  47. -- fonts
  48. local create_font
  49. local fonts = {
  50. smallest_pixel = create_font:register("ENHANCEMENTS/MENU/FONTS", {
  51. name = "smallest pixel",
  52. weight = "regular",
  53. style = "normal",
  54. link = "https://raw.githubusercontent.com/judghementday2/bypass/refs/heads/main/smallest_pixel-7.ttf",
  55. }),
  56. templeos = create_font:register("ENHANCEMENTS/MENU/FONTS", {
  57. name = "templeos",
  58. weight = "regular",
  59. style = "normal",
  60. link = "https://raw.githubusercontent.com/judghementday2/bypass/refs/heads/main/Templeos.ttf",
  61. }),
  62. proggytiny = create_font:register("ENHANCEMENTS/MENU/FONTS", {
  63. name = "proggytiny",
  64. weight = "regular",
  65. style = "normal",
  66. link = "https://raw.githubusercontent.com/judghementday2/bypass/refs/heads/main/ProggyTiny.ttf",
  67. }),
  68. medodica = create_font:register("ENHANCEMENTS/MENU/FONTS", {
  69. name = "medodica",
  70. weight = "regular",
  71. style = "normal",
  72. link = "https://raw.githubusercontent.com/judghementday2/bypass/refs/heads/main/MedodicaRegular.ttf",
  73. }),
  74. };
  75. --
  76. local UI = ({
  77. autoload = true,
  78. font = Font.new([[rbxassetid://12187365977]], Enum.FontWeight.SemiBold, Enum.FontStyle.Normal),
  79. font_size = 12;
  80. ui_key = Enum.KeyCode.Delete,
  81. menu_gui = nil,
  82. watermark_gui = nil,
  83. themes = ({ accent = color3_rgb(131,135,250), risky = color3_rgb(85, 0, 0), background = color3_rgb(7,7,8), outline = color3_rgb(15,15,16), inactive = color3_rgb(69,69,70) }),
  84. keys = {
  85. [Enum.KeyCode.LeftShift] = "L-SHIFT", [Enum.KeyCode.RightShift] = "R-SHIFT", [Enum.KeyCode.LeftControl] = "L-CTRL",
  86. [Enum.KeyCode.RightControl] = "R-CTRL", [Enum.KeyCode.LeftAlt] = "L-ALT", [Enum.KeyCode.RightAlt] = "R-ALT",
  87. [Enum.KeyCode.Insert] = "INSERT", [Enum.KeyCode.End] = "END", [Enum.KeyCode.PageUp] = "PGUP",
  88. [Enum.KeyCode.Delete] = "DELETE", [Enum.KeyCode.Home] = "HOME", [Enum.KeyCode.PageDown] = "PGDN",
  89. [Enum.UserInputType.MouseButton1] = "MB1", [Enum.UserInputType.MouseButton2] = "MB2",
  90. [Enum.UserInputType.MouseButton3] = "MB3",
  91. },
  92.  
  93. un_named_flags = 0,
  94. page_amount = 0,
  95. pages = {},
  96. sections = {},
  97. flags = {},
  98.  
  99. language = "English",
  100. user_data = {
  101. username = (user or "User"),
  102. uid = 1
  103. };
  104. shared = {
  105. initialized = false,
  106. fps = 0,
  107. ping = 0
  108. },
  109. });
  110. --
  111. local flags = {};
  112. UI.__index = UI;
  113. UI.pages.__index = UI.pages;
  114. UI.sections.__index = UI.sections;
  115. --
  116. local black_bg;
  117. local blur_effect;
  118. do -- other
  119. function UI.next_flag() -- flags
  120. UI.un_named_flags = UI.un_named_flags + 1;
  121. return string.format("%.14g", UI.un_named_flags);
  122. end;
  123. --
  124. function UI:RGBA(r, g, b, alpha)
  125. local rgb = Color3.fromRGB(r, g, b)
  126. local mt = table.clone(getrawmetatable(rgb))
  127.  
  128. setreadonly(mt, false)
  129. local old = mt.__index
  130.  
  131. mt.__index = newcclosure(function(self, key)
  132. if key:lower() == "transparency" then
  133. return alpha
  134. end
  135. return old(self, key)
  136. end)
  137.  
  138. setrawmetatable(rgb, mt)
  139. return rgb
  140. end
  141. --
  142. function UI:GetConfig()
  143. local Config = ""
  144. for Index, Value in pairs(self.flags) do
  145. if Index ~= "ConfigConfig_List" and Index ~= "ConfigConfig_Load" and Index ~= "ConfigConfig_Save" then
  146. local Value2 = Value
  147. local Final = ""
  148. --
  149. if typeof(Value2) == "Color3" then
  150. local hue, sat, val = Value2:ToHSV()
  151. --
  152. Final = ("rgb(%s,%s,%s,%s)"):format(hue, sat, val, 1)
  153. elseif typeof(Value2) == "table" and Value2.Color and Value2.Transparency then
  154. local hue, sat, val = Value2.Color:ToHSV()
  155. --
  156. Final = ("rgb(%s,%s,%s,%s)"):format(hue, sat, val, Value2.Transparency)
  157. elseif typeof(Value2) == "table" and Value.Mode then
  158. local Values = Value.current
  159. --
  160. Final = ("key(%s,%s,%s)"):format(Values[1] or "nil", Values[2] or "nil", Value.Mode)
  161. elseif Value2 ~= nil then
  162. if typeof(Value2) == "boolean" then
  163. Value2 = ("bool(%s)"):format(tostring(Value2))
  164. elseif typeof(Value2) == "table" then
  165. local New = "table("
  166. --
  167. for _, Value3 in pairs(Value2) do
  168. New = New .. Value3 .. ","
  169. end
  170. --
  171. if New:sub(#New) == "," then
  172. New = New:sub(0, #New - 1)
  173. end
  174. --
  175. Value2 = New .. ")"
  176. elseif typeof(Value2) == "string" then
  177. Value2 = ("string(%s)"):format(Value2)
  178. elseif typeof(Value2) == "number" then
  179. Value2 = ("number(%s)"):format(Value2)
  180. end
  181. --
  182. Final = Value2
  183. end
  184. --
  185. Config = Config .. Index .. ": " .. tostring(Final) .. "\n"
  186. end
  187. end
  188. --
  189. return Config;
  190. end;
  191. --
  192. function UI:LoadConfig(Config)
  193. local Table = string.split(Config, "\n")
  194. local Table2 = {}
  195. for _, Value in pairs(Table) do
  196. local Table3 = string.split(Value, ":")
  197. --
  198. if Table3[1] ~= "ConfigConfig_List" and #Table3 >= 2 then
  199. local Value = Table3[2]:sub(2, #Table3[2])
  200. --
  201. if Value:sub(1, 3) == "rgb" then
  202. local Table4 = string.split(Value:sub(5, #Value - 1), ",")
  203. --
  204. Value = Table4
  205. elseif Value:sub(1, 3) == "key" then
  206. local Table4 = string.split(Value:sub(5, #Value - 1), ",")
  207. --
  208. if Table4[1] == "nil" and Table4[2] == "nil" then
  209. Table4[1] = nil
  210. Table4[2] = nil
  211. end
  212. --
  213. Value = Table4
  214. elseif Value:sub(1, 4) == "bool" then
  215. local Bool = Value:sub(6, #Value - 1)
  216. --
  217. Value = Bool == "true"
  218. elseif Value:sub(1, 5) == "table" then
  219. local Table4 = string.split(Value:sub(7, #Value - 1), ",")
  220. --
  221. Value = Table4
  222. elseif Value:sub(1, 6) == "string" then
  223. local String = Value:sub(8, #Value - 1)
  224. --
  225. Value = String
  226. elseif Value:sub(1, 6) == "number" then
  227. local Number = tonumber(Value:sub(8, #Value - 1))
  228. --
  229. Value = Number
  230. end
  231. --
  232. Table2[Table3[1]] = Value
  233. end
  234. end
  235. --
  236. for i, v in pairs(Table2) do
  237. if flags[i] then
  238. if typeof(flags[i]) == "table" then
  239. flags[i]:Set(v)
  240. else
  241. flags[i](v)
  242. end
  243. end
  244. end
  245. end;
  246. --
  247. function UI:IsMouseOverFrame(Frame)
  248. local AbsPos, AbsSize = Frame.AbsolutePosition, Frame.AbsoluteSize;
  249. if get_mouse.X >= AbsPos.X and get_mouse.X <= AbsPos.X + AbsSize.X
  250. and get_mouse.Y >= AbsPos.Y and get_mouse.Y <= AbsPos.Y + AbsSize.Y then
  251. return true;
  252. end;
  253. end;
  254. --
  255. blur_effect = cloneref(Instance.new("BlurEffect", lighting));
  256. black_bg = Instance_manager.new("TextButton", {
  257. Name = "bg_effect";
  258. Text = "";
  259. AutoButtonColor = false;
  260. Size = udim2(9999, 0, 9999, 0);
  261. BorderColor3 = UI.themes.outline;
  262. Position = udim2(0, 0, 0, -100);
  263. ZIndex = -9999;
  264. BackgroundColor3 = color3_rgb(0, 0, 0);
  265. Visible = UI.autoload;
  266. BackgroundTransparency = 0.35;
  267. Parent = cloneref(Instance.new("ScreenGui", gethui()));
  268. });
  269. end
  270. --
  271. do -- menu
  272. function UI:watermark(properties)
  273. local watermark = {
  274. name = (properties.Name or properties.name or "watermark text | placeholder");
  275. };
  276. --
  277. local watermark_ui = Instance_manager.new("ScreenGui", {
  278. Name = "watermark";
  279. Parent = cloneref(gethui());
  280. IgnoreGuiInset = Enum.ScreenInsets.DeviceSafeInsets;
  281. ZIndexBehavior = Enum.ZIndexBehavior.Sibling;
  282. });
  283. UI.watermark_gui = watermark_ui;
  284.  
  285. local outline = Instance_manager.new("Frame", {
  286. Name = "watermark_outline";
  287. AutomaticSize = Enum.AutomaticSize.X;
  288. BackgroundColor3 = UI.themes.background;
  289. BorderColor3 = UI.themes.outline;
  290. Position = udim2(0.5, 0, 0.02, 0);
  291. BorderSizePixel = 1;
  292. AnchorPoint = vec2(0.5, 0);
  293. Size = udim2(0, 0, 0, 25);
  294. Visible = false;
  295. Parent = watermark_ui;
  296. });
  297.  
  298. local Inline = Instance_manager.new("Frame", {
  299. Name = "watermark_inline";
  300. BackgroundColor3 = UI.themes.background;
  301. BorderSizePixel = 0;
  302. Position = udim2(0, 1, 0, 1);
  303. Size = udim2(1, -2, 1, -2);
  304. Parent = outline;
  305. });
  306.  
  307. local Value = Instance_manager.new("TextLabel", {
  308. FontFace = UI.font;
  309. TextSize = UI.font_size;
  310. Name = "watermark_text";
  311. Text = watermark.name;
  312. TextColor3 = color3_rgb(255, 255, 255);
  313. RichText = true;
  314. TextStrokeTransparency = 0;
  315. TextXAlignment = Enum.TextXAlignment.Left;
  316. AutomaticSize = Enum.AutomaticSize.X;
  317. BackgroundColor3 = color3_rgb(20, 20, 20);
  318. BackgroundTransparency = 1;
  319. BorderColor3 = color3_rgb(0, 0, 0);
  320. BorderSizePixel = 0;
  321. Size = udim2(0, 0, 1, 0);
  322. Parent = Inline;
  323. });
  324.  
  325. local UIPadding = Instance_manager.new("UIPadding", {
  326. Name = "UIPadding";
  327. PaddingLeft = udim(0, 5);
  328. PaddingRight = udim(0, 5);
  329. Parent = Value;
  330. });
  331.  
  332. -- functions
  333. function watermark:update_text(NewText)
  334. Value.Text = NewText;
  335. end
  336.  
  337. function watermark:Position(NewPositionX, NewPositionY)
  338. if NewPositionX ~= nil then
  339. self.HorizontalPosition = NewPositionX
  340. end
  341. if NewPositionY ~= nil then
  342. self.VerticalPosition = NewPositionY
  343. end
  344. outline.Position = udim2(self.HorizontalPosition, 0, self.VerticalPosition, 0);
  345. end
  346.  
  347. function watermark:SetVisible(State)
  348. outline.Visible = State;
  349. end
  350.  
  351. return watermark;
  352. end
  353. --
  354. function UI:NewPicker(name, default, defaultalpha, parent, count, flag, callback)
  355. local Icon = Instance.new("TextButton", parent)
  356. local color_name = Instance.new("TextLabel")
  357. local Outline4 = Instance.new("Frame")
  358. local ColorWindow = Instance.new("Frame")
  359. local ColorInline = Instance.new("Frame")
  360. local Color = Instance.new("TextButton")
  361. local text_color = Instance.new("TextButton")
  362. local text_color2 = Instance.new("TextButton")
  363. local text_color_outline = Instance.new("Frame")
  364. local Sat = Instance.new("ImageLabel")
  365. local Val = Instance.new("ImageLabel")
  366. local Outline = Instance.new("Frame")
  367. local Alpha = Instance.new("ImageButton")
  368. local Outline1 = Instance.new("Frame")
  369. local Hue = Instance.new("ImageButton")
  370. local Outline2 = Instance.new("Frame")
  371. local Color_Circle = Instance.new("TextButton")
  372. local Alpha_Bg = Instance.new("ImageLabel")
  373.  
  374. do -- properties
  375. Icon.Name = "Icon_Colorpicker"
  376. Icon.AnchorPoint = Vector2.new(0, 0.5)
  377. Icon.BackgroundColor3 = default
  378. Icon.BorderColor3 = Color3.fromRGB(36, 36, 36)
  379. Icon.BorderSizePixel = 1
  380. local spacing = 3;
  381. if count == 1 then
  382. Icon.Position = UDim2.new(1, - (count * 18), 0.5, 0);
  383. else
  384. Icon.Position = UDim2.new(1, - (count * 16) - (count * spacing), 0.5, 0);
  385. end;
  386. Icon.Size = UDim2.new(0, 16, 0, 16)
  387. Icon.Text = ""
  388. Icon.ZIndex = 99
  389. Icon.AutoButtonColor = false
  390.  
  391. Instance_manager.new("UICorner", {
  392. Parent = Icon;
  393. CornerRadius = udim(1, 0);
  394. });
  395.  
  396. Outline4.Name = "Outline"
  397. Outline4.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  398. Outline4.BackgroundTransparency = 1
  399. Outline4.BorderColor3 = Color3.fromRGB(0, 0, 0)
  400. Outline4.BorderSizePixel = 0
  401. Outline4.Position = UDim2.new(0, -1, 0, -1)
  402. Outline4.Size = UDim2.new(1, 2, 1, 2)
  403. Outline4.ZIndex = 99
  404. Outline4.Parent = Icon
  405.  
  406. ColorWindow.Name = "ColorWindow"
  407. ColorWindow.AnchorPoint = Vector2.new(0.5, 0.5)
  408. ColorWindow.BackgroundColor3 = UI.themes.outline
  409. ColorWindow.BorderColor3 = Color3.fromRGB(0, 0, 0)
  410. ColorWindow.Parent = Icon
  411. ColorWindow.Position = UDim2.new(1, 0, 1, 2)
  412. ColorWindow.AnchorPoint = Vector2.new(1,0)
  413. ColorWindow.Size = UDim2.new(0, 180, 0, 220)
  414. ColorWindow.ZIndex = 99
  415. ColorWindow.Visible = false
  416.  
  417. Instance_manager.new("UICorner", {
  418. Parent = ColorWindow;
  419. CornerRadius = udim(0, 6);
  420. });
  421.  
  422. ColorInline.Name = "ColorInline"
  423. ColorInline.BackgroundColor3 = UI.themes.background
  424. ColorInline.BorderColor3 = Color3.fromRGB(0, 0, 0)
  425. ColorInline.BorderSizePixel = 0
  426. ColorInline.Position = UDim2.new(0, 1, 0, 1)
  427. ColorInline.Size = UDim2.new(1, -2, 1, -2)
  428.  
  429. Instance_manager.new("UICorner", {
  430. Parent = ColorInline;
  431. CornerRadius = udim(0, 6);
  432. });
  433.  
  434. color_name.BackgroundTransparency = 1
  435. color_name.Text = name
  436. color_name.TextXAlignment = Enum.TextXAlignment.Left
  437. color_name.TextColor3 = color3_rgb(255, 255, 255)
  438. color_name.Position = udim2(0,8,0,5)
  439. color_name.Size = udim2(1,-10,0,20)
  440. color_name.TextSize = UI.font_size
  441. color_name.FontFace = UI.font
  442. color_name.Parent = ColorInline
  443. color_name.TextStrokeTransparency = 0
  444.  
  445. text_color.Name = "Text Color"
  446. text_color.FontFace = UI.font
  447. text_color.TextColor3 = color3_rgb(155, 155, 155)
  448. text_color.Parent = ColorInline
  449. text_color.TextStrokeTransparency = 0
  450. text_color.TextSize = UI.font_size
  451. text_color.AutoButtonColor = false
  452. text_color.BackgroundColor3 = UI.themes.background
  453. text_color.BorderColor3 = UI.themes.outline
  454. text_color.Position = UDim2.new(0, 7, 1, -17)
  455. text_color.Size = UDim2.new(0, 76, 0, 12)
  456.  
  457. text_color2.Name = "Text Color 2"
  458. text_color2.FontFace = UI.font
  459. text_color2.TextColor3 = color3_rgb(155, 155, 155)
  460. text_color2.Parent = ColorInline
  461. text_color2.TextStrokeTransparency = 0
  462. text_color2.TextSize = UI.font_size
  463. text_color2.AutoButtonColor = false
  464. text_color2.BackgroundColor3 = UI.themes.background
  465. text_color2.BorderColor3 = UI.themes.outline
  466. text_color2.Position = UDim2.new(0, 90, 1, -17)
  467. text_color2.Size = UDim2.new(0, 80, 0, 12)
  468.  
  469. text_color_outline.Name = "Outline"
  470. text_color_outline.BackgroundTransparency = 1
  471. text_color_outline.BorderColor3 = Color3.fromRGB(0, 0, 0)
  472. text_color_outline.BorderSizePixel = 0
  473. text_color_outline.Position = UDim2.new(0, -1, 0, -1)
  474. text_color_outline.Size = UDim2.new(1, 2, 1, 2)
  475. text_color_outline.ZIndex = 99
  476. text_color_outline.Parent = text_color
  477. local text_color_outline2 = text_color_outline:Clone()
  478. text_color_outline2.Parent = text_color2
  479.  
  480. Color.Name = "Color"
  481. Color.FontFace = UI.font
  482. Color.Text = ""
  483. Color.TextColor3 = Color3.fromRGB(0, 0, 0)
  484. Color.TextSize = UI.font_size
  485. Color.AutoButtonColor = false
  486. Color.BackgroundColor3 = default
  487. Color.BorderColor3 = UI.themes.background
  488. Color.Position = UDim2.new(0, 6, 0, 30)
  489. Color.Size = UDim2.new(0, 145, 1, -74)
  490.  
  491. Instance_manager.new("UICorner", {
  492. Parent = Color;
  493. CornerRadius = udim(0, 7);
  494. });
  495.  
  496. Color_Circle.Name = "CircleButton"
  497. Color_Circle.FontFace = UI.font
  498. Color_Circle.Text = ""
  499. Color_Circle.TextColor3 = Color3.fromRGB(0, 0, 0)
  500. Color_Circle.TextSize = UI.font_size
  501. Color_Circle.AutoButtonColor = false
  502. Color_Circle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  503. Color_Circle.BorderColor3 = UI.themes.background
  504. Color_Circle.Position = UDim2.new(0.5, -25, 0.5, -25)
  505. Color_Circle.Size = UDim2.new(0, 7, 0, 7)
  506. Color_Circle.Parent = Color
  507. Color_Circle.ZIndex = 9
  508.  
  509. Instance_manager.new("UICorner", {
  510. Parent = Color_Circle;
  511. CornerRadius = UDim.new(1, 0);
  512. })
  513.  
  514. Sat.Name = "Sat"
  515. Sat.Image = "http://www.roblox.com/asset/?id=14684562507"
  516. Sat.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  517. Sat.BackgroundTransparency = 1
  518. Sat.BorderColor3 = Color3.fromRGB(0, 0, 0)
  519. Sat.BorderSizePixel = 0
  520. Sat.Size = UDim2.new(1, 0, 1, 0)
  521. Sat.Parent = Color
  522.  
  523. Instance_manager.new("UICorner", {
  524. Parent = Sat;
  525. CornerRadius = udim(0, 6);
  526. });
  527.  
  528. Val.Name = "Val"
  529. Val.Image = "http://www.roblox.com/asset/?id=14684563800"
  530. Val.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  531. Val.BackgroundTransparency = 1
  532. Val.BorderColor3 = Color3.fromRGB(0, 0, 0)
  533. Val.BorderSizePixel = 0
  534. Val.Size = UDim2.new(1, 0, 1, 0)
  535. Val.Parent = Color
  536.  
  537. Instance_manager.new("UICorner", {
  538. Parent = Val;
  539. CornerRadius = udim(0, 6);
  540. });
  541.  
  542. Outline.Name = "Outline"
  543. Outline.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  544. Outline.BackgroundTransparency = 1
  545. Outline.BorderColor3 = Color3.fromRGB(0, 0, 0)
  546. Outline.BorderSizePixel = 0
  547. Outline.Position = UDim2.new(0, -1, 0, -1)
  548. Outline.Size = UDim2.new(1, 2, 1, 2)
  549.  
  550. Outline.Parent = Color
  551. Color.Parent = ColorInline
  552.  
  553. Alpha.Name = "Alpha"
  554. Alpha.Image = "http://www.roblox.com/asset/?id=15486053510"
  555. Alpha.AutoButtonColor = false
  556. Alpha.BackgroundTransparency = 1
  557. Alpha.ImageTransparency = 0.03
  558. Alpha.BorderSizePixel = 0
  559. Alpha.Position = UDim2.new(1, -18, 0, 30)
  560. Alpha.Size = UDim2.new(0, 10, 1, -74)
  561. Alpha.Parent = ColorInline
  562.  
  563. Instance_manager.new("UICorner", {
  564. Parent = Alpha;
  565. CornerRadius = udim(0, 5);
  566. });
  567.  
  568. Alpha_Bg.Name = "alpha_bg"
  569. Alpha_Bg.ZIndex = -1
  570. Alpha_Bg.Image = "http://www.roblox.com/asset/?id=4879903999"
  571. Alpha_Bg.BackgroundTransparency = 1
  572. Alpha_Bg.ScaleType = Enum.ScaleType.Crop
  573. Alpha_Bg.ImageColor3 = Color3.fromRGB(255, 255, 255)
  574. Alpha_Bg.BorderSizePixel = 0
  575. Alpha_Bg.Position = UDim2.new(1, -18, 0, 68)
  576. Alpha_Bg.Size = UDim2.new(0, 10, 1, -114)
  577. Alpha_Bg.Parent = ColorInline
  578.  
  579. Instance_manager.new("UICorner", {
  580. Parent = Alpha_Bg;
  581. CornerRadius = udim(0, 5);
  582. });
  583.  
  584. Outline1.Name = "Outline"
  585. Outline1.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  586. Outline1.BackgroundTransparency = 1
  587. Outline1.BorderColor3 = Color3.fromRGB(0, 0, 0)
  588. Outline1.BorderSizePixel = 0
  589. Outline1.Position = UDim2.new(0, -1, 0, -1)
  590. Outline1.Size = UDim2.new(1, 2, 1, 2)
  591. Outline1.Parent = Alpha
  592.  
  593. Hue.Name = "Hue"
  594. Hue.Image = "http://www.roblox.com/asset/?id=138435236878653"
  595. Hue.AutoButtonColor = false
  596. Hue.BackgroundColor3 = Color3.fromRGB(200, 200, 200)
  597. Hue.BorderColor3 = Color3.fromRGB(17, 17, 17)
  598. Hue.Position = UDim2.new(0, 7, 1, -35)
  599. Hue.Size = UDim2.new(0, 164, 0, 10)
  600.  
  601. Instance_manager.new("UICorner", {
  602. Parent = Hue;
  603. CornerRadius = udim(0, 5);
  604. });
  605.  
  606. Outline2.Name = "Outline"
  607. Outline2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  608. Outline2.BackgroundTransparency = 1
  609. Outline2.BorderColor3 = Color3.fromRGB(0, 0, 0)
  610. Outline2.BorderSizePixel = 0
  611. Outline2.Position = UDim2.new(0, -1, 0, -1)
  612. Outline2.Size = UDim2.new(1, 2, 1, 2)
  613.  
  614. Outline2.Parent = Hue
  615. Hue.Parent = ColorInline
  616. ColorInline.Parent = ColorWindow
  617. end
  618.  
  619. --connections
  620. local mouseover = false
  621. local hue, sat, val = default:ToHSV()
  622. local hsv = default:ToHSV()
  623. local alpha = defaultalpha
  624. local oldcolor = hsv
  625. local slidingsaturation = false
  626. local slidinghue = false
  627. local slidingalpha = false
  628.  
  629. local function update()
  630. local real_pos = uis:GetMouseLocation()
  631. local mouse_position = Vector2.new(real_pos.X - 3, real_pos.Y - 55)
  632. local relative_palette = (mouse_position - Color.AbsolutePosition)
  633. local relative_hue = (mouse_position - Hue.AbsolutePosition)
  634. local relative_opacity = (mouse_position - Alpha.AbsolutePosition)
  635. --
  636. if slidingsaturation then
  637. sat = math.clamp(1 - relative_palette.X / Color.AbsoluteSize.X, 0, 1)
  638. val = math.clamp(1 - relative_palette.Y / Color.AbsoluteSize.Y, 0, 1)
  639. elseif slidinghue then
  640. hue = math.clamp(1 - (relative_hue.X / Hue.AbsoluteSize.X), 0, 1) -- Invert hue direction
  641. elseif slidingalpha then
  642. alpha = math.clamp(relative_opacity.X / Alpha.AbsoluteSize.X, 0, 1)
  643. end
  644.  
  645. hsv = Color3.fromHSV(hue, sat, val)
  646. Color.BackgroundColor3 = Color3.fromHSV(hue, 1, 1)
  647. Icon.BackgroundColor3 = hsv
  648. Color_Circle.Position = UDim2.new(1 - sat, 0, 1 - val, -5)
  649.  
  650. if flag then
  651. UI.flags[flag] = UI:RGBA(hsv.r * 255, hsv.g * 255, hsv.b * 255, alpha)
  652. end
  653.  
  654. local r, g, b = math.floor(hsv.r * 255), math.floor(hsv.g * 255), math.floor(hsv.b * 255)
  655. local rgbColor = Color3.fromRGB(r, g, b)
  656.  
  657. Alpha.ImageColor3 = rgbColor
  658. text_color.Text = string.format("#%02x%02x%02x", r, g, b)
  659. text_color2.Text = string.format("%d, %d, %d", r, g, b)
  660.  
  661. callback(UI:RGBA(hsv.r * 255, hsv.g * 255, hsv.b * 255, alpha))
  662. end
  663.  
  664. local function set(color, a)
  665. if type(color) == "table" then
  666. a = color[4]
  667. color = Color3.fromHSV(color[1], color[2], color[3])
  668. end
  669. if type(color) == "string" then
  670. color = Color3.fromHex(color)
  671. end
  672.  
  673. local oldcolor = hsv
  674. local oldalpha = alpha
  675.  
  676. hue, sat, val = color:ToHSV()
  677. alpha = a or 1
  678. hsv = Color3.fromHSV(hue, sat, val)
  679.  
  680. if hsv ~= oldcolor then
  681. Icon.BackgroundColor3 = hsv
  682. Color.BackgroundColor3 = Color3.fromHSV(hue, 1, 1)
  683.  
  684. local r, g, b = math.floor(hsv.r * 255), math.floor(hsv.g * 255), math.floor(hsv.b * 255)
  685. local rgbColor = Color3.fromRGB(r, g, b)
  686.  
  687. Alpha.ImageColor3 = rgbColor
  688. text_color.Text = string.format("#%02x%02x%02x", r, g, b)
  689. text_color2.Text = string.format("%d, %d, %d", r, g, b)
  690.  
  691. if flag then
  692. UI.flags[flag] = UI:RGBA(hsv.r * 255, hsv.g * 255, hsv.b * 255, alpha)
  693. end
  694.  
  695. callback(UI:RGBA(hsv.r * 255, hsv.g * 255, hsv.b * 255, alpha))
  696. end
  697. end
  698.  
  699. flags[flag] = set
  700. set(default, defaultalpha)
  701.  
  702. Sat.InputBegan:Connect(function(input)
  703. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  704. slidingsaturation = true
  705. update()
  706. end
  707. end)
  708.  
  709. Sat.InputEnded:Connect(function(input)
  710. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  711. slidingsaturation = false
  712. update()
  713. end
  714. end)
  715.  
  716. Hue.InputBegan:Connect(function(input)
  717. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  718. slidinghue = true
  719. update()
  720. end
  721. end)
  722.  
  723. Hue.InputEnded:Connect(function(input)
  724. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  725. slidinghue = false
  726. update()
  727. end
  728. end)
  729.  
  730. Alpha.InputBegan:Connect(function(input)
  731. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  732. slidingalpha = true
  733. update()
  734. end
  735. end)
  736.  
  737. Alpha.InputEnded:Connect(function(input)
  738. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  739. slidingalpha = false
  740. update()
  741. end
  742. end)
  743.  
  744. signals.connection(uis.InputChanged, function(input)
  745. if input.UserInputType == Enum.UserInputType.MouseMovement then
  746. if slidingalpha then
  747. update()
  748. end
  749.  
  750. if slidinghue then
  751. update()
  752. end
  753.  
  754. if slidingsaturation then
  755. update()
  756. end
  757. end
  758. end)
  759.  
  760. local colorpickertypes = {}
  761.  
  762. function colorpickertypes:Set(color, newalpha)
  763. set(color, newalpha)
  764. end
  765.  
  766. signals.connection(uis.InputBegan, function(Input)
  767. if ColorWindow.Visible and Input.UserInputType == Enum.UserInputType.MouseButton1 then
  768. if not UI:IsMouseOverFrame(ColorWindow) and not UI:IsMouseOverFrame(Icon) and not UI:IsMouseOverFrame(parent) then
  769. ColorWindow.Visible = false
  770. parent.ZIndex = 1
  771. end
  772. end
  773. end);
  774.  
  775. Icon.MouseButton1Down:Connect(function()
  776. ColorWindow.Visible = true
  777. parent.ZIndex = 5
  778.  
  779. if slidinghue then
  780. slidinghue = false
  781. end
  782.  
  783. if slidingsaturation then
  784. slidingsaturation = false
  785. end
  786.  
  787. if slidingalpha then
  788. slidingalpha = false
  789. end
  790. end)
  791.  
  792. return colorpickertypes, ColorWindow
  793. end
  794. -- menu
  795. local pages = UI.pages;
  796. local sections = UI.sections;
  797. --
  798. do -- window
  799. function UI:window(options)
  800. local window = {
  801. name = (options.Name or options.name or "visual enhancements");
  802. size = (options.Size or options.size or udim2(0, 750, 0, 500));
  803. position = (options.position == "left" and Enum.TextXAlignment.Left) or (options.position == "center" and Enum.TextXAlignment.Center) or (options.position == "right" and Enum.TextXAlignment.Right) or Enum.TextXAlignment.Left,
  804. dragging = { false, udim2(0, 0, 0, 0) };
  805. page_amount = options.Amount or options.amount or 5;
  806. elements = {};
  807. sections = {};
  808. pages = {};
  809. };
  810. --
  811. local menu = Instance_manager.new("ScreenGui", {
  812. Name = "menu";
  813. Parent = cloneref(gethui());
  814. IgnoreGuiInset = Enum.ScreenInsets.DeviceSafeInsets;
  815. ZIndexBehavior = Enum.ZIndexBehavior.Sibling;
  816. });
  817. UI.menu_gui = menu;
  818.  
  819. local background = Instance_manager.new("TextButton", {
  820. Name = "background";
  821. Parent = menu;
  822. Text = "";
  823. AutoButtonColor = false;
  824. AnchorPoint = vec2(0.5, 0.5);
  825. BackgroundColor3 = UI.themes.background;
  826. BorderColor3 = UI.themes.outline;
  827. Position = udim2(0.5, 0, 0.5, 0);
  828. BorderSizePixel = 1;
  829. Size = window.size;
  830. });
  831.  
  832. Instance_manager.new("Frame", {
  833. Name = "line";
  834. ZIndex = 10;
  835. BackgroundColor3 = UI.themes.accent;
  836. BackgroundTransparency = 1; -- later add checks
  837. BorderColor3 = color3_rgb(0, 0, 0);
  838. BorderSizePixel = 0;
  839. Position = udim2(0, 0, 0, 0);
  840. Size = udim2(1, 0, 0, 1);
  841. Parent = background;
  842. });
  843.  
  844. Instance_manager.new("Frame", {
  845. Name = "line";
  846. BackgroundColor3 = UI.themes.outline;
  847. BorderColor3 = color3_rgb(0, 0, 0);
  848. BorderSizePixel = 0;
  849. Position = udim2(0, 80, 0, 0);
  850. Size = udim2(0, 1, 1, 0);
  851. Parent = background;
  852. });
  853.  
  854. local tabs_holder = Instance_manager.new("Frame", {
  855. Name = "tabs_holder";
  856. BackgroundTransparency = 1;
  857. BackgroundColor3 = UI.themes.background;
  858. BorderColor3 = color3_rgb(0, 0, 0);
  859. BorderSizePixel = 0;
  860. Size = udim2(0, 80, 0, 500);
  861. Parent = background;
  862. });
  863. --
  864. local page_holder = Instance_manager.new("Frame", {
  865. Name = "page_holder";
  866. BackgroundColor3 = color3_rgb(255, 255, 255);
  867. BackgroundTransparency = 1.000;
  868. BorderColor3 = color3_rgb(255, 255, 255);
  869. BorderSizePixel = 0;
  870. Position = udim2(0.127, 0, 0, 13);
  871. Size = udim2(0, 640, 0, 470);
  872. Parent = background;
  873. });
  874. --
  875. window.elements = {
  876. tab_holder = tabs_holder,
  877. holder = page_holder,
  878. base = background,
  879. };
  880. --
  881. function window:update_tabs()
  882. for _, page in pairs(window.pages) do
  883. page:Turn(page.open);
  884. end;
  885. end;
  886. --
  887. do -- dragging
  888. signals.connection(background.InputBegan, function(input)
  889. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  890. window.dragging[1], window.dragging[2] = true, uis:GetMouseLocation();
  891. end
  892. end);
  893.  
  894. signals.connection(uis.InputEnded, function(input)
  895. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  896. window.dragging[1] = false;
  897. end
  898. end);
  899.  
  900. signals.connection(uis.InputChanged, function(input)
  901. if window.dragging[1] and input.UserInputType == Enum.UserInputType.MouseMovement then
  902. local mouse_pos = uis:GetMouseLocation()
  903.  
  904. local x_pos = math.clamp(background.Position.X.Offset + (mouse_pos.X - window.dragging[2].X), -viewport_size.X / 2 + background.AbsoluteSize.X / 2, viewport_size.X / 2 - background.AbsoluteSize.X / 2);
  905. local y_pos = math.clamp(background.Position.Y.Offset + (mouse_pos.Y - window.dragging[2].Y), -viewport_size.Y / 2 + background.AbsoluteSize.Y / 2, viewport_size.Y / 2 - background.AbsoluteSize.Y / 2);
  906.  
  907. background.Position = udim2(background.Position.X.Scale, x_pos, background.Position.Y.Scale, y_pos);
  908. window.dragging[2] = mouse_pos;
  909. end
  910. end);
  911. end
  912.  
  913. -- elements
  914. UI.holder = background;
  915. UI.page_amount = window.page_amount;
  916. return setmetatable(window, UI);
  917. end;
  918. end;
  919. --
  920. do -- pages
  921. function UI:tabs(properties)
  922. if not properties then properties = {} end;
  923. --
  924. local page = {
  925. name = properties.Name or properties.name or "page",
  926. window = self,
  927. open = false,
  928. sections = {},
  929. pages = {},
  930. elements = {},
  931. icon = properties.icon or properties.Icon or "",
  932. size = properties.size or properties.Size or udim2(0, 60, 0, 60),
  933. };
  934. --
  935. if (not page.window.elements.tab_holder:FindFirstChild("UIListLayout")) then
  936. Instance_manager.new("UIListLayout", {
  937. Name = "UIListLayout";
  938. Padding = udim(0, 0);
  939. SortOrder = Enum.SortOrder.LayoutOrder;
  940. Parent = page.window.elements.tab_holder;
  941. });
  942. end;
  943. --
  944. local tab_button = Instance_manager.new("TextButton", {
  945. Name = page.name;
  946. BackgroundColor3 = UI.themes.background;
  947. AutoButtonColor = false;
  948. BackgroundTransparency = 0;
  949. BorderSizePixel = 0;
  950. Position = udim2(0, 0, 0, 0);
  951. Size = udim2(1, 0, 0, 90);
  952. Text = "";
  953. Parent = page.window.elements.tab_holder;
  954. });
  955. --
  956. local image_button = Instance_manager.new("ImageLabel", {
  957. Name = page.name;
  958. Image = page.icon;
  959. BackgroundTransparency = 1;
  960. BorderSizePixel = 0;
  961. Position = udim2(0.5, -properties.size.X.Offset / 2, 0.5, -properties.size.Y.Offset / 2);
  962. Size = properties.size;
  963. ImageColor3 = UI.themes.inactive;
  964. Parent = tab_button;
  965. });
  966. --
  967. local text_button = Instance_manager.new("TextLabel", {
  968. Name = "Window_Name";
  969. Text = string.upper(page.name);
  970. FontFace = UI.font;
  971. TextSize = UI.font_size;
  972. TextColor3 = UI.themes.inactive;
  973. BackgroundTransparency = 1;
  974. TextStrokeTransparency = 0;
  975. BorderSizePixel = 0;
  976. Position = udim2(0, 0, 0, 25);
  977. Size = udim2(1, 0, 1, 0);
  978. Parent = tab_button;
  979. });
  980. --
  981. local new_page = Instance_manager.new("Frame", {
  982. Name = "new_page";
  983. BackgroundColor3 = color3_rgb(255, 255, 255);
  984. BackgroundTransparency = 1;
  985. BorderColor3 = color3_rgb(0, 0, 0);
  986. BorderSizePixel = 0;
  987. Position = udim2(0, -2, 0, 2);
  988. Size = udim2(1, 4, 1, 0);
  989. Visible = false;
  990. Parent = page.window.elements.holder;
  991. });
  992. --
  993. local left = Instance_manager.new("ScrollingFrame", {
  994. Name = "left";
  995. BackgroundColor3 = UI.themes.background;
  996. BorderColor3 = UI.themes.outline;
  997. Size = UDim2.new(0.33, -10, 1, 0);
  998. ScrollBarThickness = 0;
  999. AutomaticCanvasSize = Enum.AutomaticSize.Y;
  1000. Parent = new_page;
  1001. });
  1002.  
  1003. Instance_manager.new("UIListLayout", {
  1004. Name = "UIListLayout";
  1005. Padding = udim(0, 6);
  1006. SortOrder = Enum.SortOrder.LayoutOrder;
  1007. Parent = left;
  1008. });
  1009.  
  1010. local center = Instance_manager.new("ScrollingFrame", {
  1011. Name = "center";
  1012. BackgroundColor3 = UI.themes.background;
  1013. BorderColor3 = UI.themes.outline;
  1014. Position = udim2(0.333, 3, 0, 0);
  1015. Size = udim2(0.333, -12, 1, 0);
  1016. ScrollBarThickness = 0;
  1017. AutomaticCanvasSize = Enum.AutomaticSize.Y;
  1018. Parent = new_page;
  1019. });
  1020.  
  1021. Instance_manager.new("UIListLayout", {
  1022. Name = "UIListLayout";
  1023. Padding = udim(0, 6);
  1024. SortOrder = Enum.SortOrder.LayoutOrder;
  1025. Parent = center;
  1026. });
  1027.  
  1028. local right = Instance_manager.new("ScrollingFrame", {
  1029. Name = "right";
  1030. BackgroundColor3 = UI.themes.background;
  1031. BorderColor3 = UI.themes.outline;
  1032. Position = udim2(0.666, 6, 0, 0);
  1033. Size = udim2(0.333, -4, 1, 0);
  1034. ScrollBarThickness = 0;
  1035. AutomaticCanvasSize = Enum.AutomaticSize.Y;
  1036. Parent = new_page;
  1037. });
  1038.  
  1039. Instance_manager.new("UIListLayout", {
  1040. Name = "UIListLayout";
  1041. Padding = udim(0, 6);
  1042. SortOrder = Enum.SortOrder.LayoutOrder;
  1043. Parent = right;
  1044. });
  1045. --
  1046. do -- auto-sizer
  1047. local tabs = {};
  1048. for _, v in pairs(page.window.elements.tab_holder:GetChildren()) do
  1049. if v:IsA("GuiObject") and not v:IsA("UIListLayout") and not v:IsA("UIGridLayout") then
  1050. table.insert(tabs, v);
  1051. end
  1052. end
  1053.  
  1054. local tab_count = #tabs;
  1055. local holder_size = page.window.elements.tab_holder.Size.Y.Offset;
  1056. local adjusted_size = math.max(holder_size, 0);
  1057.  
  1058. if tab_count > 0 and adjusted_size > 0 then
  1059. local tab_height = adjusted_size / tab_count;
  1060.  
  1061. for _, tab in ipairs(tabs) do
  1062. tab.Size = udim2(1, 0, 0, tab_height);
  1063. end
  1064. end
  1065. end
  1066. --
  1067. function page:Turn(bool)
  1068. page.open = bool;
  1069. new_page.Visible = bool;
  1070.  
  1071. local tweens = {}
  1072. for _, v in pairs(UI.menu_gui:GetDescendants()) do
  1073. if table.find({ "toggle_bg", "accent_bg", "Slider_Inline", "Slider_Accent", "Slider_Circle", "List_Outline", "List_Inline", "Keybind_Outline", "Keybind_Inline", "button_outline", "button_inline", "textbox_outline", "textbox_inline", "ContentOutline", "ContentInline"}, v.Name) then
  1074. if bool then v.BackgroundTransparency = 1 end;
  1075. table.insert(tweens, tween_service:Create(v, TweenInfo.new(0.333, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), { BackgroundTransparency = bool and 0 or 1 }));
  1076. end;
  1077.  
  1078. if v:IsA("TextLabel") and v.Name ~= "Window_Name" then
  1079. if bool then v.TextTransparency = 1 end;
  1080. table.insert(tweens, tween_service:Create(v, TweenInfo.new(0.333, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), { TextTransparency = bool and 0 or 1 }));
  1081. end;
  1082. end;
  1083.  
  1084. for _, tween in ipairs(tweens) do
  1085. tween:Play()
  1086. end;
  1087.  
  1088. tween_service:Create(tab_button, TweenInfo.new(0.3, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
  1089. BackgroundColor3 = bool and UI.themes.outline or UI.themes.background,
  1090. }):Play()
  1091.  
  1092. tween_service:Create(image_button, TweenInfo.new(0.3, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
  1093. ImageColor3 = bool and UI.themes.accent or UI.themes.inactive,
  1094. }):Play()
  1095.  
  1096. tween_service:Create(text_button, TweenInfo.new(0.3, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
  1097. TextColor3 = bool and UI.themes.accent or UI.themes.inactive,
  1098. }):Play()
  1099. end;
  1100. --
  1101. tab_button.MouseEnter:Connect(function()
  1102. if (not page.open) then
  1103. tween_service:Create(tab_button, TweenInfo.new(0.3, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
  1104. BackgroundColor3 = UI.themes.outline,
  1105. }):Play()
  1106. end
  1107. end);
  1108.  
  1109. tab_button.MouseLeave:Connect(function()
  1110. if (not page.open) then
  1111. tween_service:Create(tab_button, TweenInfo.new(0.3, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
  1112. BackgroundColor3 = UI.themes.background,
  1113. }):Play()
  1114. end
  1115. end);
  1116. --
  1117. signals.connection(tab_button.MouseButton1Down, function()
  1118. if not page.open then
  1119. for _, v in pairs(page.window.pages) do
  1120. if v.open and v ~= page then
  1121. v:Turn(false);
  1122. end
  1123. end
  1124. page:Turn(true);
  1125. end
  1126. end)
  1127.  
  1128. -- elements
  1129. page.elements = {
  1130. left = left,
  1131. center = center,
  1132. right = right,
  1133. button = tab_button,
  1134. main = new_page,
  1135. };
  1136.  
  1137. if #page.window.pages == 0 then
  1138. page:Turn(true);
  1139. end
  1140. page.window.pages[#page.window.pages + 1] = page;
  1141. UI.pages[#UI.pages + 1] = page;
  1142. page.window:update_tabs();
  1143. return setmetatable(page, UI.pages);
  1144. end;
  1145. end;
  1146. --
  1147. function pages:section(properties)
  1148. if not properties then properties = {} end;
  1149. --
  1150. local section = {
  1151. name = (properties.name or properties.Name or "section"),
  1152. page = self,
  1153. side = (properties.side or properties.Side),
  1154. risky = (properties.risky or properties.Risky),
  1155. elements = {},
  1156. content = {},
  1157. sections = {},
  1158. };
  1159.  
  1160. local top_section = Instance_manager.new("Frame", {
  1161. Name = "top_section";
  1162. BackgroundTransparency = 1;
  1163. AutomaticSize = Enum.AutomaticSize.Y;
  1164. BackgroundColor3 = UI.themes.background;
  1165. BorderColor3 = color3_rgb(0, 0, 0);
  1166. Size = udim2(1, 0, 0, 20);
  1167. Parent = (section.side == "left" and section.page.elements.left) or (section.side == "center" and section.page.elements.center) or (section.side == "right" and section.page.elements.right);
  1168. ZIndex = 10 - #section.page.sections;
  1169. });
  1170.  
  1171. local title = Instance_manager.new("TextLabel", {
  1172. Name = section.name;
  1173. FontFace = UI.font;
  1174. Text = string.upper(section.name);
  1175. TextColor3 = section.risky and UI.themes.risky or UI.themes.inactive;
  1176. TextSize = UI.font_size;
  1177. TextStrokeTransparency = 0;
  1178. TextXAlignment = Enum.TextXAlignment.Left;
  1179. BackgroundTransparency = 1;
  1180. BorderColor3 = color3_rgb(0, 0, 0);
  1181. BorderSizePixel = 0;
  1182. Position = udim2(0, 15, 0, 12);
  1183. Size = udim2(0, 186, 0, 20);
  1184. Parent = top_section;
  1185. });
  1186.  
  1187. local section_content = Instance_manager.new("Frame", {
  1188. Name = "section_content";
  1189. AutomaticSize = Enum.AutomaticSize.Y;
  1190. BackgroundColor3 = color3_rgb(255, 255, 255);
  1191. BackgroundTransparency = 1;
  1192. BorderColor3 = color3_rgb(0, 0, 0);
  1193. BorderSizePixel = 0;
  1194. Position = udim2(0, 16, 0, 44);
  1195. Size = udim2(1, -32, 0, 30);
  1196. Parent = top_section;
  1197. });
  1198.  
  1199. Instance_manager.new("UIListLayout", {
  1200. Name = "UIListLayout";
  1201. Padding = udim(0, 22);
  1202. SortOrder = Enum.SortOrder.LayoutOrder;
  1203. Parent = section_content;
  1204. });
  1205.  
  1206. Instance_manager.new("UIPadding", {
  1207. Name = "UIPadding";
  1208. PaddingBottom = udim(0, 6);
  1209. Parent = section_content;
  1210. });
  1211.  
  1212. -- elements
  1213. section.elements = {
  1214. section_content = section_content
  1215. };
  1216.  
  1217. section.page.sections[#section.page.sections + 1] = section;
  1218. return setmetatable(section, UI.sections);
  1219. end
  1220. function sections:toggle(properties)
  1221. if not properties then properties = {} end;
  1222. --
  1223. local toggle = {
  1224. window = self.window,
  1225. page = self.page,
  1226. section = self,
  1227. risk = properties.Risk or properties.Risky or properties.risk or properties.risky or false,
  1228. name = properties.Name or properties.name or "Toggle",
  1229. description = properties.Description or properties.description or "Unknown",
  1230. State = (properties.state or properties.State or properties.def or properties.Def or properties.default or properties.Default or false),
  1231. callback = (properties.callback or properties.Callback or properties.callBack or properties.CallBack or function() end),
  1232. flag = (properties.flag or properties.Flag or properties.pointer or properties.Pointer or UI.next_flag()),
  1233. toggled = false,
  1234. Colorpickers = 0,
  1235. };
  1236. --
  1237. local new_toggle = Instance_manager.new("TextButton", {
  1238. Name = toggle.name;
  1239. Text = "";
  1240. AutoButtonColor = false;
  1241. BackgroundTransparency = 1;
  1242. Size = udim2(1, 0, 0, 18);
  1243. Parent = toggle.section.elements.section_content;
  1244. });
  1245.  
  1246. local toggle_bg = Instance_manager.new("Frame", {
  1247. Name = "toggle_bg";
  1248. BackgroundColor3 = UI.themes.outline;
  1249. Position = udim2(0.81, 0, 0, 0);
  1250. Size = udim2(0, 34, 0, 20);
  1251. Parent = new_toggle;
  1252. });
  1253.  
  1254. Instance_manager.new("UICorner", {
  1255. Parent = toggle_bg;
  1256. CornerRadius = udim(0, 10);
  1257. });
  1258.  
  1259. local accent_bg = Instance_manager.new("Frame", {
  1260. Name = "accent_bg";
  1261. BorderColor3 = UI.themes.outline;
  1262. BorderSizePixel = 1;
  1263. Position = udim2(0, 2, 0.5, -8);
  1264. Size = udim2(0, 16, 0, 16);
  1265. Parent = toggle_bg;
  1266. BackgroundColor3 = UI.themes.inactive;
  1267. });
  1268.  
  1269. Instance_manager.new("UICorner", {
  1270. Parent = accent_bg;
  1271. CornerRadius = udim(1, 0);
  1272. });
  1273.  
  1274. Instance_manager.new("TextLabel", {
  1275. Name = "title";
  1276. FontFace = UI.font;
  1277. TextSize = UI.font_size;
  1278. TextColor3 = toggle.risk and UI.themes.risky or color3_rgb(255, 255, 255);
  1279. TextStrokeTransparency = 0;
  1280. TextXAlignment = Enum.TextXAlignment.Left;
  1281. BackgroundColor3 = color3_rgb(255, 255, 255);
  1282. BackgroundTransparency = 1;
  1283. BorderColor3 = color3_rgb(0, 0, 0);
  1284. BorderSizePixel = 0;
  1285. Position = udim2(0, 0, 0, 0);
  1286. Size = udim2(1, 0, 1, 0);
  1287. Parent = new_toggle;
  1288. Text = toggle.name;
  1289. });
  1290.  
  1291. Instance_manager.new("TextLabel", {
  1292. Name = "description";
  1293. FontFace = UI.font;
  1294. TextSize = UI.font_size;
  1295. TextColor3 = UI.themes.inactive;
  1296. TextStrokeTransparency = 0;
  1297. TextXAlignment = Enum.TextXAlignment.Left;
  1298. BackgroundColor3 = color3_rgb(255, 255, 255);
  1299. BackgroundTransparency = 1;
  1300. BorderColor3 = color3_rgb(0, 0, 0);
  1301. BorderSizePixel = 0;
  1302. Position = udim2(0, 0, 0, 15);
  1303. Size = udim2(1, 0, 1, 0);
  1304. Parent = new_toggle;
  1305. Text = toggle.description;
  1306. });
  1307.  
  1308. -- functions
  1309. local function set_state()
  1310. toggle.toggled = not toggle.toggled;
  1311. UI.flags[toggle.flag] = toggle.toggled;
  1312. toggle.callback(toggle.toggled);
  1313. --
  1314. tween_service:Create(toggle_bg, TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), { BackgroundColor3 = toggle.toggled and UI.themes.accent or UI.themes.outline }):Play()
  1315. tween_service:Create(accent_bg, TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), { Position = toggle.toggled and udim2(1, -18, 0.5, -8) or udim2(0, 2, 0.5, -8) }):Play()
  1316. tween_service:Create(accent_bg, TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), { BackgroundColor3 = toggle.toggled and Color3.fromRGB(200, 200, 200) or UI.themes.inactive }):Play()
  1317. end
  1318. signals.connection(new_toggle.MouseButton1Down, set_state);
  1319.  
  1320. -- functions
  1321. function toggle.Set(bool)
  1322. bool = type(bool) == "boolean" and bool or false;
  1323. if toggle.toggled ~= bool then
  1324. set_state();
  1325. end
  1326. end
  1327. --
  1328. toggle.Set(toggle.State);
  1329. UI.flags[toggle.flag] = toggle.State;
  1330. flags[toggle.flag] = toggle.Set;
  1331.  
  1332. return toggle;
  1333. end
  1334. --
  1335. function sections:slider(properties)
  1336. if not properties then properties = {} end;
  1337. --
  1338. local slider = {
  1339. window = self.Window,
  1340. page = self.Page,
  1341. section = self,
  1342. Name = (properties.name or properties.Name or nil),
  1343. Min = (properties.min or properties.Min or properties.minimum or properties.Minimum or 0),
  1344. State = (properties.state or properties.State or properties.def or properties.Def or properties.default or properties.Default or 10),
  1345. Max = (properties.max or properties.Max or properties.maximum or properties.Maximum or 100),
  1346. Sub = (properties.suffix or properties.Suffix or properties.ending or properties.Ending or properties.prefix or properties.Prefix or properties.measurement or properties.Measurement or ""),
  1347. Decimals = (properties.decimals or properties.Decimals or 1),
  1348. Callback = (properties.callback or properties.Callback or properties.callBack or properties.CallBack or function() end),
  1349. Flag = (properties.flag or properties.Flag or properties.pointer or properties.Pointer or UI.next_flag()),
  1350. Disabled = (properties.Disabled or properties.disable or nil),
  1351. };
  1352. --
  1353. local slider_name = ("[value]" .. slider.Sub) -- for slider name
  1354. --
  1355. local new_slider = Instance_manager.new("Frame", {
  1356. Name = "new_slider",
  1357. BackgroundColor3 = color3_rgb(255, 255, 255),
  1358. BackgroundTransparency = 1,
  1359. BorderColor3 = color3_rgb(0, 0, 0),
  1360. BorderSizePixel = 0,
  1361. Size = udim2(1, 0, 0, slider.Name and 26 or 12),
  1362. Parent = slider.section.elements.section_content,
  1363. });
  1364.  
  1365. local Inline = Instance_manager.new("TextButton", {
  1366. Name = "Slider_Inline",
  1367. BackgroundColor3 = UI.themes.outline,
  1368. BorderColor3 = color3_rgb(0, 0, 0),
  1369. BorderSizePixel = 0,
  1370. Position = udim2(0, 0, 1, -2),
  1371. Size = udim2(1, 0, 0, 6),
  1372. FontFace = UI.font,
  1373. Text = "",
  1374. TextColor3 = color3_rgb(0, 0, 0),
  1375. TextSize = UI.font_size,
  1376. AutoButtonColor = false,
  1377. Parent = new_slider,
  1378. });
  1379.  
  1380. local Accent = Instance_manager.new("TextButton", {
  1381. Name = "Slider_Accent",
  1382. BackgroundColor3 = UI.themes.accent,
  1383. BorderColor3 = color3_rgb(0, 0, 0),
  1384. BorderSizePixel = 0,
  1385. Size = udim2(0, 0, 1, 0),
  1386. FontFace = UI.font,
  1387. Text = "",
  1388. TextColor3 = color3_rgb(0, 0, 0),
  1389. TextSize = UI.font_size,
  1390. AutoButtonColor = false,
  1391. Parent = Inline,
  1392. });
  1393.  
  1394. local SliderCircle = Instance_manager.new("Frame", {
  1395. Name = "Slider_Circle",
  1396. BackgroundColor3 = UI.themes.accent,
  1397. Size = udim2(0, 12, 0, 12),
  1398. AnchorPoint = vec2(0.5, 0.5),
  1399. Parent = Inline,
  1400. });
  1401.  
  1402. Instance_manager.new("UICorner", {
  1403. Parent = SliderCircle,
  1404. CornerRadius = udim(1, 0),
  1405. });
  1406.  
  1407. local Value = Instance_manager.new("TextLabel", {
  1408. Name = "Value",
  1409. FontFace = UI.font,
  1410. Text = "0",
  1411. TextColor3 = color3_rgb(255, 255, 255),
  1412. TextSize = UI.font_size,
  1413. TextStrokeTransparency = 0,
  1414. BackgroundColor3 = color3_rgb(255, 255, 255),
  1415. BackgroundTransparency = 1,
  1416. BorderColor3 = color3_rgb(0, 0, 0),
  1417. BorderSizePixel = 0,
  1418. Size = udim2(1, 0, 0, 10),
  1419. Position = udim2(0, 0, 0, 4),
  1420. TextXAlignment = Enum.TextXAlignment.Right,
  1421. Parent = new_slider,
  1422. });
  1423.  
  1424. local Title = Instance_manager.new("TextLabel", {
  1425. Name = "Title",
  1426. FontFace = UI.font,
  1427. TextColor3 = color3_rgb(255, 255, 255),
  1428. TextSize = UI.font_size,
  1429. TextStrokeTransparency = 0,
  1430. TextXAlignment = Enum.TextXAlignment.Left,
  1431. BackgroundColor3 = color3_rgb(255, 255, 255),
  1432. BackgroundTransparency = 1,
  1433. BorderColor3 = color3_rgb(0, 0, 0),
  1434. BorderSizePixel = 0,
  1435. Size = udim2(1, 0, 0, 10),
  1436. Position = udim2(0, 0, 0, 4),
  1437. Text = slider.Name or "",
  1438. Visible = slider.Name ~= nil,
  1439. Parent = new_slider,
  1440. });
  1441.  
  1442. -- functions
  1443. local Sliding = false;
  1444. local Val = slider.State;
  1445. local current_tween;
  1446. --
  1447. local function is_set(value)
  1448. value = math.clamp(math.floor(value * slider.Decimals + 0.5) / slider.Decimals, slider.Min, slider.Max);
  1449. local target_size = udim2((value - slider.Min) / (slider.Max - slider.Min), 0, 1, 0);
  1450.  
  1451. if current_tween then current_tween:Cancel() end;
  1452. current_tween = tween_service:Create(Accent, TweenInfo.new(0.1, Enum.EasingStyle.Linear), {Size = target_size});
  1453. current_tween:Play();
  1454.  
  1455. local inlineWidth = Inline.AbsoluteSize.X
  1456. local target_positionx = inlineWidth * target_size.X.Scale
  1457. local horizontalOffset = 5
  1458. local verticalOffset = 3
  1459.  
  1460. local pos = udim2( 0, target_positionx - SliderCircle.AbsoluteSize.X / 2 + horizontalOffset, 1, -SliderCircle.AbsoluteSize.Y / 2 + verticalOffset );
  1461. local circle_tween = tween_service:Create(SliderCircle, TweenInfo.new(0.1, Enum.EasingStyle.Linear), {Position = pos})
  1462. circle_tween:Play()
  1463.  
  1464. Value.Text = slider.Disabled and value == slider.Min and slider.Disabled or slider_name:gsub("%[value%]", string.format("%.14g", value));
  1465.  
  1466. Val = value
  1467. UI.flags[slider.Flag] = value
  1468. slider.Callback(value)
  1469. end
  1470. --
  1471. local function is_sliding(input)
  1472. is_set(((slider.Max - slider.Min) * ((input.Position.X - Inline.AbsolutePosition.X) / Inline.AbsoluteSize.X)) + slider.Min)
  1473. end
  1474. --
  1475. for _, obj in pairs({Inline, Accent}) do
  1476. signals.connection(obj.InputBegan, function(input)
  1477. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1478. Sliding = true;
  1479. is_sliding(input);
  1480. end
  1481. end)
  1482. signals.connection(obj.InputEnded, function(input)
  1483. if input.UserInputType == Enum.UserInputType.MouseButton1 then Sliding = false end;
  1484. end)
  1485. end
  1486. --
  1487. signals.connection(uis.InputChanged, function(input)
  1488. if input.UserInputType == Enum.UserInputType.MouseMovement and Sliding then
  1489. is_sliding(input);
  1490. end
  1491. end)
  1492. --
  1493. function slider:Set(value)
  1494. is_set(value);
  1495. end;
  1496. flags[slider.Flag] = is_set;
  1497. UI.flags[slider.Flag] = slider.State;
  1498. is_set(slider.State);
  1499. return slider;
  1500. end
  1501. --
  1502. function sections:button(properties)
  1503. local properties = properties or {}
  1504. local button = {
  1505. window = self.Window,
  1506. page = self.Page,
  1507. section = self,
  1508. name = (properties.name or properties.Name or "button"),
  1509. callback = (properties.callback or properties.Callback or properties.callBack or properties.CallBack or function() end),
  1510. };
  1511.  
  1512. local new_button = Instance_manager.new("Frame", {
  1513. Name = "new_button",
  1514. BackgroundTransparency = 1,
  1515. Size = udim2(1, 0, 0, 16),
  1516. Parent = button.section.elements.section_content,
  1517. });
  1518.  
  1519. local outline = Instance_manager.new("Frame", {
  1520. Name = "button_outline",
  1521. BackgroundColor3 = UI.themes.outline,
  1522. Position = udim2(0, 0, 1, -16),
  1523. Size = udim2(1, 0, 0, 22),
  1524. BorderSizePixel = 0,
  1525. Parent = new_button,
  1526. });
  1527.  
  1528. Instance_manager.new("UICorner", {
  1529. Parent = outline,
  1530. CornerRadius = udim(0, 4),
  1531. });
  1532.  
  1533. local inline = Instance_manager.new("TextButton", {
  1534. Name = "button_inline",
  1535. Text = "",
  1536. BackgroundColor3 = UI.themes.background,
  1537. Position = udim2(0, 1, 0, 1),
  1538. Size = udim2(1, -2, 1, -2),
  1539. FontFace = UI.font,
  1540. BorderSizePixel = 0,
  1541. TextSize = 11,
  1542. AutoButtonColor = false,
  1543. Parent = outline,
  1544. });
  1545.  
  1546. Instance_manager.new("UICorner", {
  1547. Parent = inline,
  1548. CornerRadius = udim(0, 4),
  1549. });
  1550.  
  1551. local text = Instance_manager.new("TextLabel", {
  1552. Name = "button_text",
  1553. FontFace = UI.font,
  1554. Text = string.upper(button.name),
  1555. TextColor3 = color3_rgb(255, 255, 255),
  1556. TextSize = UI.font_size,
  1557. BackgroundTransparency = 1,
  1558. Size = udim2(1, 0, 1, 0),
  1559. Parent = inline,
  1560. });
  1561.  
  1562. new_button.MouseEnter:Connect(function()
  1563. tween_service:Create(outline, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundColor3 = UI.themes.accent}):Play()
  1564. end)
  1565.  
  1566. new_button.MouseLeave:Connect(function()
  1567. tween_service:Create(outline, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundColor3 = UI.themes.outline}):Play()
  1568. end)
  1569.  
  1570. local confirm = false
  1571. signals.connection(inline.MouseButton1Down, function()
  1572. if (not confirm) then
  1573. confirm = true
  1574. text.Text = "ARE YOU SURE?"
  1575.  
  1576. delay(2, function()
  1577. if confirm then
  1578. confirm = false
  1579. text.Text = string.upper(button.name);
  1580. end
  1581. end)
  1582. else
  1583. confirm = false
  1584. button.callback()
  1585. text.Text = string.upper(button.name);
  1586. end
  1587. end);
  1588.  
  1589. return button;
  1590. end;
  1591. --
  1592. function sections:dropdown(Properties)
  1593. local Properties = Properties or {};
  1594. local Dropdown = {
  1595. Window = self.Window,
  1596. Page = self.Page,
  1597. Section = self,
  1598. Open = false,
  1599. description = (Properties.description or Properties.Description),
  1600. Name = Properties.Name or Properties.name or nil,
  1601. Options = (Properties.options or Properties.Options or Properties.values or Properties.Values or {"1", "2", "3",}),
  1602. Max = (Properties.Max or Properties.max or nil),
  1603. ScrollMax = (Properties.ScrollingMax or Properties.scrollingmax or nil),
  1604. State = (Properties.state or Properties.State or Properties.def or Properties.Def or Properties.default or Properties.Default or nil),
  1605. Callback = (Properties.callback or Properties.Callback or Properties.callBack or Properties.CallBack or function() end),
  1606. Flag = (Properties.flag or Properties.Flag or Properties.pointer or Properties.Pointer or UI.next_flag()),
  1607. OptionInsts = {},
  1608. };
  1609. --
  1610. local NewList = Instance_manager.new("Frame", {
  1611. Name = "NewList",
  1612. BackgroundColor3 = color3_rgb(255, 255, 255),
  1613. BackgroundTransparency = 1,
  1614. BorderColor3 = color3_rgb(0, 0, 0),
  1615. BorderSizePixel = 0,
  1616. Size = udim2(1, 0, 0, Dropdown.Name ~= nil and 20 or 16),
  1617. Parent = Dropdown.Section.elements.section_content
  1618. });
  1619.  
  1620. local Outline = Instance_manager.new("Frame", {
  1621. Name = "List_Outline",
  1622. BackgroundColor3 = UI.themes.outline,
  1623. BorderSizePixel = 0,
  1624. BorderColor3 = color3_rgb(0, 0, 0),
  1625. Position = udim2(0.5, 0, 0, -5),
  1626. Size = udim2(0.5, 0, 0, 18),
  1627. Parent = NewList
  1628. });
  1629.  
  1630. Instance_manager.new("UICorner", {
  1631. Parent = Outline,
  1632. CornerRadius = udim(0, 6),
  1633. });
  1634.  
  1635. local Inline = Instance_manager.new("TextButton", {
  1636. Name = "List_Inline",
  1637. BackgroundColor3 = UI.themes.background,
  1638. BorderColor3 = color3_rgb(0, 0, 0),
  1639. BorderSizePixel = 0,
  1640. Position = udim2(0, 1, 0, 1),
  1641. Size = udim2(1, -2, 1, -2),
  1642. FontFace = UI.font,
  1643. Text = "",
  1644. TextColor3 = color3_rgb(0, 0, 0),
  1645. TextSize = UI.font_size,
  1646. AutoButtonColor = false,
  1647. Parent = Outline
  1648. });
  1649.  
  1650. Instance_manager.new("UICorner", {
  1651. Parent = Inline,
  1652. CornerRadius = udim(0, 5),
  1653. });
  1654.  
  1655. local Value = Instance_manager.new("TextLabel", {
  1656. Name = "Value",
  1657. FontFace = UI.font,
  1658. Text = "None",
  1659. TextColor3 = color3_rgb(255, 255, 255),
  1660. TextSize = UI.font_size,
  1661. TextStrokeTransparency = 0,
  1662. TextXAlignment = Enum.TextXAlignment.Left,
  1663. BackgroundColor3 = color3_rgb(255, 255, 255),
  1664. BackgroundTransparency = 1,
  1665. BorderColor3 = color3_rgb(0, 0, 0),
  1666. BorderSizePixel = 0,
  1667. Position = udim2(0, 5, 0, 0),
  1668. Size = udim2(0.75, 0, 1, 0),
  1669. TextTruncate = Enum.TextTruncate.AtEnd,
  1670. Parent = Inline
  1671. });
  1672.  
  1673. local Icon = Instance_manager.new("ImageLabel", {
  1674. Name = "Dropdown_Icon",
  1675. Image = "http://www.roblox.com/asset/?id=13184099706",
  1676. BackgroundTransparency = 1,
  1677. BorderSizePixel = 0,
  1678. ImageColor3 = color3_rgb(98,98,98),
  1679. Size = udim2(0, 8, 0, 10),
  1680. Position = udim2(1, -5, 0.5, 0),
  1681. AnchorPoint = vec2(1, 0.5),
  1682. ScaleType = Enum.ScaleType.Fit,
  1683. Parent = Inline
  1684. });
  1685.  
  1686. local ContentOutline = Instance_manager.new("Frame", {
  1687. Name = "List_ContentOutline",
  1688. AutomaticSize = Enum.AutomaticSize.Y,
  1689. BackgroundColor3 = UI.themes.outline,
  1690. BorderSizePixel = 0,
  1691. Position = udim2(0, 1, 1, 2),
  1692. Size = udim2(1, -2, 0, 0),
  1693. Visible = false,
  1694. Parent = Outline
  1695. });
  1696.  
  1697. Instance_manager.new("UICorner", {
  1698. Parent = ContentOutline,
  1699. CornerRadius = udim(0, 6),
  1700. });
  1701.  
  1702. local ContentInline = Instance_manager.new("Frame", {
  1703. Name = "List_ContentInline",
  1704. BackgroundColor3 = UI.themes.background,
  1705. BorderColor3 = color3_rgb(0, 0, 0),
  1706. BorderSizePixel = 0,
  1707. Position = udim2(0, 2, 0, 1),
  1708. Size = udim2(1, -3, 1, 0),
  1709. Parent = ContentOutline
  1710. });
  1711.  
  1712. Instance_manager.new("UICorner", {
  1713. Parent = ContentInline,
  1714. CornerRadius = udim(0, 6),
  1715. });
  1716.  
  1717. local UIListLayout = Instance_manager.new("UIListLayout", {
  1718. Name = "UIListLayout",
  1719. Padding = udim(0, 2),
  1720. SortOrder = Enum.SortOrder.LayoutOrder,
  1721. Parent = ContentInline
  1722. });
  1723.  
  1724. local UIPadding = Instance_manager.new("UIPadding", {
  1725. Name = "UIPadding",
  1726. PaddingBottom = udim(0, 2),
  1727. PaddingTop = udim(0, 2),
  1728. Parent = ContentInline
  1729. });
  1730.  
  1731. local description = Instance_manager.new("TextLabel", {
  1732. Name = "description",
  1733. FontFace = UI.font,
  1734. TextColor3 = UI.themes.inactive,
  1735. TextSize = UI.font_size,
  1736. TextStrokeTransparency = 0,
  1737. TextXAlignment = Enum.TextXAlignment.Left,
  1738. BackgroundColor3 = color3_rgb(255, 255, 255),
  1739. BackgroundTransparency = 1,
  1740. BorderColor3 = color3_rgb(0, 0, 0),
  1741. BorderSizePixel = 0,
  1742. Size = udim2(1, 0, 0, 10),
  1743. Parent = NewList,
  1744. Position = udim2(0, 0, 0, 17),
  1745. Visible = Dropdown.Name ~= nil and true or false,
  1746. Text = Dropdown.description ~= nil and Dropdown.description or "",
  1747. ZIndex = -1
  1748. });
  1749.  
  1750. local title = Instance_manager.new("TextLabel", {
  1751. Name = "title",
  1752. FontFace = UI.font,
  1753. TextColor3 = color3_rgb(255, 255, 255),
  1754. TextSize = UI.font_size,
  1755. TextStrokeTransparency = 0,
  1756. TextXAlignment = Enum.TextXAlignment.Left,
  1757. BackgroundColor3 = color3_rgb(255, 255, 255),
  1758. BackgroundTransparency = 1,
  1759. BorderColor3 = color3_rgb(0, 0, 0),
  1760. BorderSizePixel = 0,
  1761. Size = udim2(1, 0, 0, 10),
  1762. Parent = NewList,
  1763. Visible = Dropdown.Name ~= nil and true or false,
  1764. Text = Dropdown.Name ~= nil and Dropdown.Name or ""
  1765. });
  1766.  
  1767. -- connections
  1768. signals.connection(Inline.MouseButton1Down, function()
  1769. ContentOutline.Visible = not ContentOutline.Visible
  1770. tween_service:Create(Icon, TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Rotation = ContentOutline.Visible and 180 or 0}):Play()
  1771. NewList.ZIndex = ContentOutline.Visible and 5 or 1
  1772. end)
  1773. signals.connection(uis.InputBegan, function(Input)
  1774. if ContentOutline.Visible and Input.UserInputType == Enum.UserInputType.MouseButton1 then
  1775. if not UI:IsMouseOverFrame(ContentOutline) and not UI:IsMouseOverFrame(Inline) then
  1776. ContentOutline.Visible = false
  1777. NewList.ZIndex = 1
  1778. tween_service:Create(Icon, TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Rotation = 0}):Play()
  1779. end
  1780. end
  1781. end)
  1782. --
  1783. local chosen = Dropdown.Max and {} or nil
  1784. local Count = 0
  1785. local previousAccentLine
  1786. local previousText
  1787. --
  1788. local function handleoptionclick(option, button, text, AccentLine)
  1789. button.MouseButton1Down:Connect(function()
  1790. if Dropdown.Max then
  1791. if table.find(chosen, option) then
  1792. table.remove(chosen, table.find(chosen, option))
  1793. text.TextColor3 = UI.themes.inactive
  1794. AccentLine.BackgroundTransparency = 1
  1795. else
  1796. if #chosen == Dropdown.Max then
  1797. local firstChosen = table.remove(chosen, 1)
  1798. Dropdown.OptionInsts[firstChosen].text.TextColor3 = UI.themes.inactive
  1799. Dropdown.OptionInsts[firstChosen].accent.BackgroundTransparency = 1
  1800. end
  1801. table.insert(chosen, option)
  1802. text.TextColor3 = UI.themes.accent
  1803. AccentLine.BackgroundTransparency = 0
  1804. end
  1805.  
  1806. local textchosen = {}
  1807. for _, opt in next, chosen do
  1808. table.insert(textchosen, opt)
  1809. end
  1810. Value.Text = #chosen == 0 and "" or table.concat(textchosen, ",")
  1811. UI.flags[Dropdown.Flag] = chosen
  1812. Dropdown.Callback(chosen)
  1813. else
  1814. if previousAccentLine then
  1815. previousAccentLine.BackgroundTransparency = 1
  1816. end
  1817. if previousText then
  1818. previousText.TextColor3 = UI.themes.inactive
  1819. end
  1820.  
  1821. for opt, tbl in next, Dropdown.OptionInsts do
  1822. tbl.text.TextColor3 = UI.themes.inactive
  1823. tbl.accent.BackgroundTransparency = 1
  1824. end
  1825.  
  1826. chosen = option
  1827. Value.Text = option
  1828. text.TextColor3 = UI.themes.accent
  1829. AccentLine.BackgroundTransparency = 0
  1830. previousAccentLine = AccentLine
  1831. previousText = text
  1832. ContentOutline.Visible = false
  1833. NewList.ZIndex = 1
  1834. tween_service:Create(Icon, TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Rotation = 0}):Play()
  1835. UI.flags[Dropdown.Flag] = option
  1836. Dropdown.Callback(option)
  1837. end
  1838. end)
  1839. end
  1840. --
  1841. local function createoptions(tbl)
  1842. for _, option in next, tbl do
  1843. Dropdown.OptionInsts[option] = {}
  1844. --
  1845. local NewOption = Instance_manager.new("TextButton", {
  1846. Name = "NewOption",
  1847. FontFace = UI.font,
  1848. Text = "",
  1849. TextColor3 = color3_rgb(255, 255, 255),
  1850. TextSize = UI.font_size,
  1851. TextStrokeTransparency = 0,
  1852. TextWrapped = true,
  1853. TextXAlignment = Enum.TextXAlignment.Left,
  1854. AutoButtonColor = false,
  1855. BackgroundTransparency = 1,
  1856. Size = udim2(1, 0, 0, 14),
  1857. Parent = ContentInline
  1858. });
  1859. local AccentLine = Instance_manager.new("Frame", {
  1860. Name = "AccentLine",
  1861. BackgroundColor3 = UI.themes.accent,
  1862. Size = udim2(0, 1, 1, 0),
  1863. BackgroundTransparency = 1,
  1864. Parent = NewOption
  1865. });
  1866. local OptionLabel = Instance_manager.new("TextLabel", {
  1867. Name = "OptionLabel",
  1868. FontFace = UI.font,
  1869. Text = option,
  1870. TextColor3 = color3_rgb(145, 145, 145),
  1871. TextSize = UI.font_size,
  1872. TextStrokeTransparency = 0,
  1873. TextXAlignment = Enum.TextXAlignment.Left,
  1874. BackgroundTransparency = 1,
  1875. Position = udim2(0, 4, 0, 0),
  1876. Size = udim2(1, 0, 1, 0),
  1877. Parent = NewOption
  1878. });
  1879.  
  1880. Count = Count + 1
  1881. Dropdown.OptionInsts[option].text = OptionLabel
  1882. Dropdown.OptionInsts[option].accent = AccentLine
  1883. handleoptionclick(option, NewOption, OptionLabel, AccentLine)
  1884. end
  1885. end
  1886. createoptions(Dropdown.Options)
  1887. --
  1888. local set
  1889. set = function(option)
  1890. if Dropdown.Max then
  1891. table.clear(chosen)
  1892. option = type(option) == "table" and option or {}
  1893.  
  1894. for opt, tbl in next, Dropdown.OptionInsts do
  1895. if not table.find(option, opt) then
  1896. tbl.text.TextColor3 = UI.themes.inactive
  1897. tbl.accent.BackgroundTransparency = 1
  1898. end
  1899. end
  1900.  
  1901. for _, opt in next, option do
  1902. if table.find(Dropdown.Options, opt) and #chosen < Dropdown.Max then
  1903. table.insert(chosen, opt)
  1904. Dropdown.OptionInsts[opt].text.TextColor3 = UI.themes.accent
  1905. Dropdown.OptionInsts[opt].accent.BackgroundTransparency = 0
  1906. end
  1907. end
  1908.  
  1909. local textchosen = {}
  1910. local cutobject = false
  1911.  
  1912. for _, opt in next, chosen do
  1913. table.insert(textchosen, opt)
  1914. end
  1915.  
  1916. Value.Text = #chosen == 0 and "" or table.concat(textchosen, ",") .. (cutobject and ", ..." or "")
  1917.  
  1918. UI.flags[Dropdown.Flag] = chosen
  1919. Dropdown.Callback(chosen)
  1920. end
  1921. end
  1922. --
  1923. function Dropdown:Set(option)
  1924. if Dropdown.Max then
  1925. set(option)
  1926. else
  1927. for opt, tbl in next, Dropdown.OptionInsts do
  1928. if opt ~= option then
  1929. tbl.text.TextColor3 = UI.themes.inactive
  1930. tbl.accent.BackgroundTransparency = 1
  1931. end
  1932. end
  1933. if table.find(Dropdown.Options, option) then
  1934. chosen = option
  1935. Dropdown.OptionInsts[option].text.TextColor3 = UI.themes.accent
  1936. Dropdown.OptionInsts[option].accent.BackgroundTransparency = 0
  1937. Value.Text = option
  1938. UI.flags[Dropdown.Flag] = chosen
  1939. Dropdown.Callback(chosen)
  1940. else
  1941. chosen = nil
  1942. Value.Text = "None"
  1943. UI.flags[Dropdown.Flag] = chosen
  1944. Dropdown.Callback(chosen)
  1945. end
  1946. end
  1947. end
  1948. --
  1949. function Dropdown:Refresh(tbl)
  1950. for _, opt in next, Dropdown.OptionInsts do
  1951. coroutine.wrap(function()
  1952. pcall(function()
  1953. opt.button:Destroy()
  1954. end)
  1955. end)()
  1956. end
  1957. table.clear(Dropdown.OptionInsts)
  1958.  
  1959. createoptions(tbl)
  1960.  
  1961. if Dropdown.Max then
  1962. table.clear(chosen)
  1963. else
  1964. chosen = nil
  1965. end
  1966.  
  1967. UI.flags[Dropdown.Flag] = chosen
  1968. Dropdown.Callback(chosen)
  1969. end
  1970.  
  1971. if Dropdown.Max then
  1972. flags[Dropdown.Flag] = set
  1973. else
  1974. flags[Dropdown.Flag] = Dropdown
  1975. end
  1976. Dropdown:Set(Dropdown.State)
  1977. return Dropdown
  1978. end
  1979. --
  1980. function sections:textbox(Properties)
  1981. local Properties = Properties or {};
  1982. local textbox = {
  1983. Window = self.Window,
  1984. Page = self.Page,
  1985. Section = self,
  1986. Name = (Properties.Name or Properties.name or nil),
  1987. Placeholder = (Properties.placeholder or Properties.Placeholder or Properties.holder or Properties.Holder or ""),
  1988. State = (Properties.state or Properties.State or Properties.def or Properties.Def or Properties.default or Properties.Default or ""),
  1989. Callback = (Properties.callback or Properties.Callback or Properties.callBack or Properties.CallBack or function() end),
  1990. Flag = (Properties.flag or Properties.Flag or Properties.pointer or Properties.Pointer or UI.next_flag()),
  1991. };
  1992. --
  1993. local NewBox = Instance_manager.new("TextButton", {
  1994. Name = "NewBox",
  1995. FontFace = UI.font,
  1996. Text = "",
  1997. TextColor3 = color3_rgb(0, 0, 0),
  1998. TextSize = UI.font_size,
  1999. AutoButtonColor = false,
  2000. BackgroundColor3 = color3_rgb(255, 255, 255),
  2001. BackgroundTransparency = 1,
  2002. BorderColor3 = color3_rgb(0, 0, 0),
  2003. BorderSizePixel = 0,
  2004. Size = udim2(1, 0, 0, textbox.Name ~= nil and 30 or 20),
  2005. Parent = textbox.Section.elements.section_content
  2006. });
  2007.  
  2008. local Outline = Instance_manager.new("Frame", {
  2009. Name = "textbox_outline",
  2010. BackgroundColor3 = UI.themes.outline,
  2011. BorderColor3 = color3_rgb(0, 0, 0),
  2012. BorderSizePixel = 0,
  2013. Position = udim2(0, 0, 1, -16),
  2014. Size = udim2(1, 0, 0, 20),
  2015. Parent = NewBox
  2016. });
  2017.  
  2018. Instance_manager.new("UICorner", {
  2019. Parent = Outline,
  2020. CornerRadius = udim(0, 4),
  2021. });
  2022.  
  2023. local Inline = Instance_manager.new("Frame", {
  2024. Name = "textbox_inline",
  2025. BackgroundColor3 = UI.themes.background,
  2026. BorderColor3 = color3_rgb(0, 0, 0),
  2027. BorderSizePixel = 0,
  2028. Position = udim2(0, 1, 0, 1),
  2029. Size = udim2(1, -2, 1, -2),
  2030. Parent = Outline
  2031. });
  2032.  
  2033. Instance_manager.new("UICorner", {
  2034. Parent = Inline,
  2035. CornerRadius = udim(0, 4),
  2036. });
  2037.  
  2038. local Value = Instance_manager.new("TextBox", {
  2039. Name = "text",
  2040. FontFace = UI.font,
  2041. Text = textbox.State,
  2042. PlaceholderText = textbox.Placeholder,
  2043. TextColor3 = color3_rgb(255, 255, 255),
  2044. PlaceholderColor3 = UI.themes.inactive,
  2045. TextSize = UI.font_size,
  2046. TextStrokeTransparency = 0,
  2047. TextXAlignment = Enum.TextXAlignment.Left,
  2048. BackgroundColor3 = color3_rgb(255, 255, 255),
  2049. BackgroundTransparency = 1,
  2050. BorderColor3 = color3_rgb(0, 0, 0),
  2051. BorderSizePixel = 0,
  2052. Position = udim2(0, 4, 0, 0),
  2053. Size = udim2(1, 0, 1, 0),
  2054. Parent = Inline,
  2055. ClearTextOnFocus = false
  2056. });
  2057.  
  2058. local Title = Instance_manager.new("TextLabel", {
  2059. Name = "title",
  2060. FontFace = UI.font,
  2061. TextColor3 = color3_rgb(255, 255, 255),
  2062. TextSize = UI.font_size,
  2063. TextStrokeTransparency = 0,
  2064. TextXAlignment = Enum.TextXAlignment.Left,
  2065. BackgroundColor3 = color3_rgb(255, 255, 255),
  2066. BackgroundTransparency = 1,
  2067. BorderColor3 = color3_rgb(0, 0, 0),
  2068. BorderSizePixel = 0,
  2069. Size = udim2(1, 0, 0, 10),
  2070. Parent = NewBox,
  2071. Position = udim2(0, 2, 0, 0),
  2072. Text = textbox.Name ~= nil and textbox.Name or "",
  2073. Visible = textbox.Name ~= nil and true or false
  2074. });
  2075. --
  2076. Value.FocusLost:Connect(function()
  2077. textbox.Callback(Value.Text);
  2078. UI.flags[textbox.Flag] = Value.Text;
  2079. end)
  2080. --
  2081. local function set(str)
  2082. Value.Text = str;
  2083. UI.flags[textbox.Flag] = str;
  2084. textbox.Callback(str);
  2085. end
  2086.  
  2087. flags[textbox.Flag] = set;
  2088. return textbox;
  2089. end;
  2090. --
  2091. function sections:listbox(Properties)
  2092. local Dropdown = {
  2093. Window = self.Window,
  2094. Page = self.Page,
  2095. Section = self,
  2096. Open = Properties.open or false,
  2097. Options = Properties.options or Properties.Options or Properties.values or Properties.Values or {"1", "2", "3"},
  2098. Max = Properties.Max or Properties.max or nil,
  2099. ScrollMax = Properties.ScrollingMax or Properties.scrollingmax or nil,
  2100. State = Properties.state or Properties.State or Properties.def or Properties.Def or Properties.default or Properties.Default or nil,
  2101. Callback = Properties.callback or Properties.Callback or Properties.callBack or Properties.CallBack or function() end,
  2102. Flag = Properties.flag or Properties.Flag or Properties.pointer or Properties.Pointer or UI.next_flag(),
  2103. OptionInsts = {}
  2104. };
  2105.  
  2106. local NewList = Instance_manager.new("TextButton", {
  2107. Name = "NewList",
  2108. FontFace = UI.font,
  2109. Text = "",
  2110. TextColor3 = color3_rgb(0, 0, 0),
  2111. TextSize = UI.font_size,
  2112. AutoButtonColor = false,
  2113. BackgroundColor3 = UI.themes.outline,
  2114. BackgroundTransparency = 0,
  2115. BorderColor3 = color3_rgb(0, 0, 0),
  2116. BorderSizePixel = 0,
  2117. Size = udim2(1, 0, 0, (14 * (Dropdown.ScrollMax or #Dropdown.Options)) + (2 * (Dropdown.ScrollMax or #Dropdown.Options)) + 4),
  2118. Parent = Dropdown.Section.elements.section_content
  2119. });
  2120.  
  2121. NewList.MouseEnter:Connect(function()
  2122. tween_service:Create(NewList, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {BackgroundColor3 = UI.themes.accent}):Play();
  2123. end);
  2124.  
  2125. NewList.MouseLeave:Connect(function()
  2126. tween_service:Create(NewList, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {BackgroundColor3 = UI.themes.outline}):Play();
  2127. end);
  2128.  
  2129. local ContentOutline = Instance_manager.new("Frame", {
  2130. Name = "ContentOutline",
  2131. AutomaticSize = Enum.AutomaticSize.Y,
  2132. BackgroundColor3 = UI.themes.outline,
  2133. BorderColor3 = color3_rgb(0, 0, 0),
  2134. Size = udim2(1, 0, 1, 0),
  2135. Parent = NewList
  2136. });
  2137.  
  2138. Instance_manager.new("UICorner", {
  2139. Parent = ContentOutline,
  2140. CornerRadius = udim(0, 8),
  2141. });
  2142.  
  2143. local ContentInline = Instance_manager.new("ScrollingFrame", {
  2144. Name = "ContentInline",
  2145. AutomaticCanvasSize = Enum.AutomaticSize.Y,
  2146. BottomImage = "rbxassetid://7783554086",
  2147. CanvasSize = udim2(),
  2148. MidImage = "rbxassetid://7783554086",
  2149. ScrollBarImageColor3 = UI.themes.accent,
  2150. ScrollBarThickness = 4,
  2151. Active = true,
  2152. BackgroundColor3 = UI.themes.background,
  2153. BorderColor3 = color3_rgb(0, 0, 0),
  2154. BorderSizePixel = 0,
  2155. Position = udim2(0, 1, 0, 1),
  2156. Size = udim2(1, -2, 1, -2),
  2157. Parent = ContentOutline
  2158. });
  2159.  
  2160. Instance_manager.new("UICorner", {
  2161. Parent = ContentInline,
  2162. CornerRadius = udim(0, 8),
  2163. });
  2164.  
  2165. Instance_manager.new("UIListLayout", {
  2166. Name = "UIListLayout",
  2167. Padding = udim(0, 2),
  2168. SortOrder = Enum.SortOrder.LayoutOrder,
  2169. Parent = ContentInline
  2170. });
  2171.  
  2172. Instance_manager.new("UIPadding", {
  2173. Name = "UIPadding",
  2174. PaddingBottom = udim(0, 2),
  2175. PaddingTop = udim(0, 2),
  2176. Parent = ContentInline
  2177. });
  2178.  
  2179. local function handleOptionClick(option, button, label)
  2180. button.MouseButton1Down:Connect(function()
  2181. for _, opt in pairs(Dropdown.OptionInsts) do
  2182. tween_service:Create(opt.label, TweenInfo.new(0.33), { TextColor3 = UI.themes.inactive }):Play()
  2183. end
  2184. tween_service:Create(label, TweenInfo.new(0.33), { TextColor3 = UI.themes.accent }):Play()
  2185. UI.flags[Dropdown.Flag] = option
  2186. Dropdown.Callback(option)
  2187. end);
  2188. end;
  2189.  
  2190. for _, option in ipairs(Dropdown.Options) do
  2191. local button = Instance_manager.new("TextButton", {
  2192. Name = "Option",
  2193. Text = "",
  2194. Size = udim2(1, 0, 0, 14),
  2195. BackgroundTransparency = 1,
  2196. Parent = ContentInline
  2197. });
  2198.  
  2199. local label = Instance_manager.new("TextLabel", {
  2200. Text = option,
  2201. TextColor3 = UI.themes.inactive,
  2202. BackgroundTransparency = 1,
  2203. Size = udim2(1, 0, 1, 0),
  2204. FontFace = UI.font,
  2205. TextSize = UI.font_size,
  2206. TextXAlignment = Enum.TextXAlignment.Left,
  2207. Position = udim2(0, 5, 0, 0),
  2208. Parent = button
  2209. });
  2210.  
  2211. Dropdown.OptionInsts[option] = { label = label };
  2212. handleOptionClick(option, button, label);
  2213. end;
  2214.  
  2215. function Dropdown:Set(option)
  2216. UI.flags[Dropdown.Flag] = option
  2217. Dropdown.Callback(option)
  2218. end;
  2219.  
  2220. function Dropdown:Refresh(options)
  2221. for _, opt in pairs(Dropdown.OptionInsts) do opt.label.Parent:Destroy() end;
  2222. Dropdown.OptionInsts = {}
  2223. for _, option in ipairs(options) do
  2224. local button = Instance_manager.new("TextButton", {
  2225. Name = "Option",
  2226. Text = "",
  2227. Size = udim2(1, 0, 0, 14),
  2228. BackgroundTransparency = 1,
  2229. Parent = ContentInline
  2230. });
  2231.  
  2232. local label = Instance_manager.new("TextLabel", {
  2233. Text = option,
  2234. TextColor3 = UI.themes.inactive,
  2235. BackgroundTransparency = 1,
  2236. Size = udim2(1, 0, 1, 0),
  2237. FontFace = UI.font,
  2238. TextSize = UI.font_size,
  2239. TextXAlignment = Enum.TextXAlignment.Left,
  2240. Position = udim2(0, 5, 0, 0),
  2241. Parent = button
  2242. });
  2243.  
  2244. Dropdown.OptionInsts[option] = { label = label }
  2245. handleOptionClick(option, button, label)
  2246. end;
  2247. Dropdown:Set(Dropdown.State)
  2248. end;
  2249.  
  2250. Dropdown:Set(Dropdown.State);
  2251. return Dropdown;
  2252. end;
  2253. --
  2254. function sections:colorpicker(Properties)
  2255. local Properties = Properties or {};
  2256. local Colorpicker = {
  2257. Window = self.Window,
  2258. Page = self.Page,
  2259. Section = self,
  2260. Name = (Properties.Name or Properties.name or "Colorpicker"),
  2261. Description = (Properties.Description or Properties.description),
  2262. State = (Properties.state or Properties.State or Properties.def or Properties.Def or Properties.default or Properties.Default or Color3.fromRGB(255, 0, 0)),
  2263. Alpha = (Properties.alpha or Properties.Alpha or Properties.transparency or Properties.Transparency or 1),
  2264. Callback = (Properties.callback or Properties.Callback or Properties.callBack or Properties.CallBack or function() end),
  2265. Flag = (Properties.flag or Properties.Flag or Properties.pointer or Properties.Pointer or UI.next_flag()),
  2266. Colorpickers = 0,
  2267. };
  2268. --
  2269. local NewColor = Instance.new("TextButton");
  2270. local Title = Instance.new("TextLabel");
  2271. local Description = Instance.new("TextLabel");
  2272.  
  2273. do -- properties
  2274. NewColor.Name = "NewColor"
  2275. NewColor.FontFace = UI.font
  2276. NewColor.Text = ""
  2277. NewColor.TextColor3 = Color3.fromRGB(0, 0, 0)
  2278. NewColor.TextSize = UI.font_size
  2279. NewColor.AutoButtonColor = false
  2280. NewColor.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  2281. NewColor.BackgroundTransparency = 1
  2282. NewColor.BorderColor3 = Color3.fromRGB(0, 0, 0)
  2283. NewColor.BorderSizePixel = 0
  2284. NewColor.Size = UDim2.new(1, 0, 0, 20)
  2285. NewColor.Parent = Colorpicker.Section.elements.section_content
  2286.  
  2287. Instance_manager.new("UICorner", {
  2288. Parent = NewColor;
  2289. CornerRadius = udim(0, 4);
  2290. });
  2291.  
  2292. Title.Name = "Title"
  2293. Title.FontFace = UI.font
  2294. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  2295. Title.TextSize = UI.font_size
  2296. Title.TextStrokeTransparency = 0
  2297. Title.TextXAlignment = Enum.TextXAlignment.Left
  2298. Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  2299. Title.BackgroundTransparency = 1
  2300. Title.BorderColor3 = Color3.fromRGB(0, 0, 0)
  2301. Title.BorderSizePixel = 0
  2302. Title.Size = UDim2.new(1, 0, 1, 0)
  2303. Title.Parent = NewColor
  2304. Title.Text = Colorpicker.Name
  2305.  
  2306. Description.Name = "Description"
  2307. Description.FontFace = UI.font
  2308. Description.TextColor3 = UI.themes.inactive
  2309. Description.TextSize = UI.font_size
  2310. Description.TextStrokeTransparency = 0
  2311. Description.TextXAlignment = Enum.TextXAlignment.Left
  2312. Description.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  2313. Description.BackgroundTransparency = 1
  2314. Description.BorderColor3 = Color3.fromRGB(0, 0, 0)
  2315. Description.BorderSizePixel = 0
  2316. Description.Size = UDim2.new(1, 0, 1, 0)
  2317. Description.Position = udim2(0, 0, 0, 15)
  2318. Description.Parent = NewColor
  2319. Description.Text = Colorpicker.Description
  2320. end;
  2321. --
  2322. Colorpicker.Colorpickers = Colorpicker.Colorpickers + 1
  2323. local colorpickertypes = UI:NewPicker(
  2324. Colorpicker.Name,
  2325. Colorpicker.State,
  2326. Colorpicker.Alpha,
  2327. NewColor,
  2328. Colorpicker.Colorpickers,
  2329. Colorpicker.Flag,
  2330. Colorpicker.Callback
  2331. );
  2332.  
  2333. function Colorpicker:Set(color)
  2334. colorpickertypes:set(color, false, true);
  2335. end;
  2336.  
  2337. function Colorpicker:colorpicker(Properties)
  2338. local Properties = Properties or {};
  2339. local NewColorpicker = {
  2340. State = (Properties.state or Properties.State or Properties.def or Properties.Def or Properties.default or Properties.Default or Color3.fromRGB(255, 0, 0)),
  2341. Alpha = (Properties.alpha or Properties.Alpha or Properties.transparency or Properties.Transparency or 1),
  2342. Callback = (Properties.callback or Properties.Callback or Properties.callBack or Properties.CallBack or function() end),
  2343. Flag = (Properties.flag or Properties.Flag or Properties.pointer or Properties.Pointer or UI.next_flag()),
  2344. };
  2345. --
  2346. Colorpicker.Colorpickers = Colorpicker.Colorpickers + 1
  2347. local Newcolorpickertypes = UI:NewPicker(
  2348. "",
  2349. NewColorpicker.State,
  2350. NewColorpicker.Alpha,
  2351. NewColor,
  2352. Colorpicker.Colorpickers,
  2353. NewColorpicker.Flag,
  2354. NewColorpicker.Callback
  2355. );
  2356.  
  2357. function NewColorpicker:Set(color)
  2358. Newcolorpickertypes:Set(color);
  2359. end;
  2360.  
  2361. return NewColorpicker;
  2362. end
  2363. return Colorpicker;
  2364. end
  2365. --
  2366. function sections:keybind(Properties)
  2367. local Properties = Properties or {}
  2368. local Keybind = {
  2369. Section = self,
  2370. Name = (Properties.name or Properties.Name or "Keybind"),
  2371. description = (Properties.description or Properties.Description or ""),
  2372. State = (Properties.state or Properties.State or Properties.def or Properties.Def or Properties.default or Properties.Default or nil),
  2373. Mode = (Properties.mode or Properties.Mode or "Toggle"),
  2374. UseKey = (Properties.UseKey or Properties.usekey or false),
  2375. Ignore = (Properties.ignore or Properties.Ignore or false),
  2376. Callback = (Properties.callback or Properties.Callback or Properties.callBack or Properties.CallBack or function() end),
  2377. Flag = (Properties.flag or Properties.Flag or Properties.pointer or Properties.Pointer or UI.next_flag()),
  2378. Binding = nil,
  2379. };
  2380. local State, Key = false
  2381. --[[local ListValue;
  2382. if not Keybind.Ignore then
  2383. ListValue = library.keybind_list:NewKey(Keybind.State, Keybind.Name)
  2384. end]]
  2385. --
  2386. local NewBind = Instance_manager.new("Frame", {
  2387. Name = "NewBind",
  2388. BackgroundTransparency = 1,
  2389. Size = udim2(1, 0, 0, 15),
  2390. Parent = Keybind.Section.elements.section_content
  2391. });
  2392.  
  2393. local Title = Instance_manager.new("TextLabel", {
  2394. Name = "Title",
  2395. FontFace = UI.font,
  2396. TextColor3 = color3_rgb(255, 255, 255),
  2397. TextSize = UI.font_size,
  2398. TextStrokeTransparency = 0,
  2399. TextXAlignment = Enum.TextXAlignment.Left,
  2400. BackgroundTransparency = 1,
  2401. Size = udim2(1, 0, 1, 0),
  2402. Parent = NewBind,
  2403. Text = Keybind.Name
  2404. });
  2405.  
  2406. local description = Instance_manager.new("TextLabel", {
  2407. Name = "description",
  2408. FontFace = UI.font,
  2409. TextColor3 = UI.themes.inactive,
  2410. TextSize = UI.font_size,
  2411. TextStrokeTransparency = 0,
  2412. TextXAlignment = Enum.TextXAlignment.Left,
  2413. BackgroundTransparency = 1,
  2414. Size = udim2(1, 0, 1, 0),
  2415. Parent = NewBind,
  2416. Position = udim2(0, 0, 0, 15),
  2417. Text = Keybind.description
  2418. });
  2419.  
  2420. local Outline = Instance_manager.new("Frame", {
  2421. Name = "Keybind_Outline",
  2422. AnchorPoint = vec2(1, 0.5),
  2423. BackgroundColor3 = UI.themes.outline,
  2424. Position = udim2(1, -1, 0.85, 0),
  2425. Size = udim2(0, 65, 1.75, 0),
  2426. Parent = NewBind
  2427. });
  2428.  
  2429. Instance_manager.new("UICorner", {
  2430. Parent = Outline,
  2431. CornerRadius = udim(0, 3)
  2432. });
  2433.  
  2434. local Inline = Instance_manager.new("TextButton", {
  2435. Name = "Keybind_Inline",
  2436. BackgroundColor3 = UI.themes.background,
  2437. Position = udim2(0, 1, 0, 1),
  2438. Size = udim2(1, -2, 1, -2),
  2439. FontFace = UI.font,
  2440. Text = "",
  2441. TextColor3 = color3_rgb(0, 0, 0),
  2442. TextSize = UI.font_size,
  2443. AutoButtonColor = false,
  2444. Parent = Outline
  2445. });
  2446.  
  2447. Instance_manager.new("UICorner", {
  2448. Parent = Inline,
  2449. CornerRadius = udim(0, 3)
  2450. });
  2451.  
  2452. local Container = Instance_manager.new("Frame", {
  2453. Name = "Container",
  2454. BackgroundTransparency = 1,
  2455. AnchorPoint = vec2(0.5, 0.5),
  2456. Position = udim2(0.47, 0, 0.5, 0),
  2457. Size = udim2(0, 0, 1, 0),
  2458. AutomaticSize = Enum.AutomaticSize.X,
  2459. Parent = Inline
  2460. });
  2461.  
  2462. local Icon = Instance_manager.new("ImageLabel", {
  2463. Name = "Bind_Icon",
  2464. Image = "http://www.roblox.com/asset/?id=16081386298",
  2465. BackgroundTransparency = 1,
  2466. ImageColor3 = UI.themes.inactive,
  2467. AnchorPoint = vec2(0, 0.5),
  2468. Position = udim2(0, 1, 0.5, 0),
  2469. Size = udim2(0, 20, 0, 20),
  2470. Parent = Container
  2471. });
  2472.  
  2473. local Value = Instance_manager.new("TextLabel", {
  2474. Name = "Value",
  2475. FontFace = UI.font,
  2476. Text = "None",
  2477. TextColor3 = color3_rgb(100, 100, 100),
  2478. TextSize = UI.font_size,
  2479. TextStrokeTransparency = 0,
  2480. BackgroundTransparency = 1,
  2481. AnchorPoint = vec2(0, 0.5),
  2482. Position = udim2(0, 23, 0.5, 0),
  2483. Size = udim2(0, 0, 1, 0),
  2484. AutomaticSize = Enum.AutomaticSize.X,
  2485. TextXAlignment = Enum.TextXAlignment.Left,
  2486. Parent = Container
  2487. });
  2488. Inline.Size = udim2(1, -2, 1, -2);
  2489.  
  2490. Inline.MouseEnter:Connect(function()
  2491. tween_service:Create(Inline, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundColor3 = UI.themes.accent}):Play()
  2492. end)
  2493.  
  2494. Inline.MouseLeave:Connect(function()
  2495. tween_service:Create(Inline, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundColor3 = UI.themes.background}):Play()
  2496. end)
  2497.  
  2498. Inline.MouseEnter:Connect(function()
  2499. tween_service:Create(Value, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextColor3 = color3_rgb(200, 200, 200)}):Play()
  2500. end)
  2501.  
  2502. Inline.MouseLeave:Connect(function()
  2503. tween_service:Create(Value, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextColor3 = color3_rgb(100, 100, 100)}):Play()
  2504. end)
  2505.  
  2506. local ModeBox = Instance_manager.new("Frame", {
  2507. Name = "ModeBox",
  2508. Parent = Outline,
  2509. AnchorPoint = vec2(0,0.5),
  2510. BackgroundColor3 = UI.themes.background,
  2511. BorderColor3 = UI.themes.outline,
  2512. BorderSizePixel = 1,
  2513. Size = udim2(0, 65, 0, 60),
  2514. Position = udim2(0,-70,3,0),
  2515. Visible = false,
  2516. ZIndex = 99999
  2517. });
  2518.  
  2519. local Hold = Instance_manager.new("TextButton", {
  2520. Name = "Hold",
  2521. Parent = ModeBox,
  2522. BackgroundTransparency = 1,
  2523. Size = udim2(1, 0, 0.333, 0),
  2524. ZIndex = 2,
  2525. FontFace = UI.font,
  2526. Text = "Hold",
  2527. TextColor3 = Keybind.Mode == "Hold" and color3_rgb(255,255,255) or color3_rgb(145,145,145),
  2528. TextSize = UI.font_size,
  2529. TextStrokeTransparency = 0
  2530. });
  2531.  
  2532. local Toggle = Instance_manager.new("TextButton", {
  2533. Name = "Toggle",
  2534. Parent = ModeBox,
  2535. BackgroundTransparency = 1,
  2536. Position = udim2(0, 0, 0.333, 0),
  2537. Size = udim2(1, 0, 0.333, 0),
  2538. ZIndex = 2,
  2539. FontFace = UI.font,
  2540. Text = "Toggle",
  2541. TextColor3 = Keybind.Mode == "Toggle" and color3_rgb(255,255,255) or color3_rgb(145,145,145),
  2542. TextSize = UI.font_size,
  2543. TextStrokeTransparency = 0
  2544. });
  2545.  
  2546. local Always = Instance_manager.new("TextButton", {
  2547. Name = "Always",
  2548. Parent = ModeBox,
  2549. BackgroundTransparency = 1,
  2550. Position = udim2(0, 0, 0.667, 0),
  2551. Size = udim2(1, 0, 0.333, 0),
  2552. ZIndex = 2,
  2553. FontFace = UI.font,
  2554. Text = "Always",
  2555. TextColor3 = Keybind.Mode == "Always" and color3_rgb(255,255,255) or color3_rgb(145,145,145),
  2556. TextSize = UI.font_size,
  2557. TextStrokeTransparency = 0
  2558. });
  2559.  
  2560. -- functions
  2561. local function set(newkey)
  2562. if string.find(tostring(newkey), "Enum") then
  2563. if c then
  2564. c:Disconnect()
  2565. if Keybind.Flag then
  2566. UI.flags[Keybind.Flag] = false
  2567. end
  2568. Keybind.Callback(false)
  2569. end
  2570. if tostring(newkey):find("Enum.KeyCode.") then
  2571. newkey = Enum.KeyCode[tostring(newkey):gsub("Enum.KeyCode.", "")]
  2572. elseif tostring(newkey):find("Enum.UserInputType.") then
  2573. newkey = Enum.UserInputType[tostring(newkey):gsub("Enum.UserInputType.", "")]
  2574. end
  2575. if newkey == Enum.KeyCode.Backspace then
  2576. Key = nil
  2577. if Keybind.UseKey then
  2578. if Keybind.Flag then
  2579. UI.flags[Keybind.Flag] = Key
  2580. end
  2581. Keybind.Callback(Key)
  2582. end
  2583. local text = "None"
  2584. Value.Text = text
  2585. --[[if not Keybind.Ignore then
  2586. ListValue:Update(text, Keybind.Name)
  2587. end]]
  2588. --Outline.Size = udim2(0, Value.TextBounds.X + 10, 1.9, 0)
  2589. elseif newkey ~= nil then
  2590. Key = newkey
  2591. if Keybind.UseKey then
  2592. if Keybind.Flag then
  2593. UI.flags[Keybind.Flag] = Key
  2594. end
  2595. Keybind.Callback(Key)
  2596. end
  2597. local text = (UI.keys[newkey] or tostring(newkey):gsub("Enum.KeyCode.", ""))
  2598.  
  2599. Value.Text = text
  2600. --[[if not Keybind.Ignore then
  2601. ListValue:Update(text, Keybind.Name)
  2602. end]]
  2603. --Outline.Size = udim2(0, Value.TextBounds.X + 10, 1.9, 0)
  2604. end
  2605. UI.flags[Keybind.Flag .. "_KEY"] = newkey
  2606. elseif table.find({ "Always", "Toggle", "Hold" }, newkey) then
  2607. if not Keybind.UseKey then
  2608. UI.flags[Keybind.Flag .. "_KEY STATE"] = newkey
  2609. Keybind.Mode = newkey
  2610. --[[if not Keybind.Ignore then
  2611. ListValue:Update((UI.keys[Key] or tostring(Key):gsub("Enum.KeyCode.", "")), Keybind.Name)
  2612. end]]
  2613. if Keybind.Mode == "Always" then
  2614. State = true
  2615. if Keybind.Flag then
  2616. UI.flags[Keybind.Flag] = State
  2617. end
  2618. Keybind.Callback(true)
  2619. --ListValue:SetVisible(true)
  2620. end
  2621. end
  2622. else
  2623. State = newkey
  2624. if Keybind.Flag then
  2625. UI.flags[Keybind.Flag] = newkey
  2626. end
  2627. Keybind.Callback(newkey)
  2628. end
  2629. end
  2630. --
  2631. set(Keybind.State)
  2632. set(Keybind.Mode)
  2633. Inline.MouseButton1Click:Connect(function()
  2634. if (not Keybind.Binding) then
  2635. Value.Text = "..."
  2636.  
  2637. Keybind.Binding = signals.connection(uis.InputBegan, function(input, gpe)
  2638. set( input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode or input.UserInputType )
  2639. Keybind.Binding:Disconnect()
  2640. task.wait()
  2641. Keybind.Binding = nil
  2642. end);
  2643. end
  2644. end)
  2645. --
  2646. signals.connection(uis.InputBegan, function(inp)
  2647. if (inp.KeyCode == Key or inp.UserInputType == Key) and not Keybind.Binding and not Keybind.UseKey then
  2648. if Keybind.Mode == "Hold" then
  2649. if Keybind.Flag then
  2650. UI.flags[Keybind.Flag] = true
  2651. end
  2652. signals.connection(run_service.RenderStepped, function()
  2653. if Keybind.Callback then
  2654. Keybind.Callback(true)
  2655. end
  2656. end)
  2657. --[[if not Keybind.Ignore then
  2658. ListValue:SetVisible(true)
  2659. end]]
  2660. elseif Keybind.Mode == "Toggle" then
  2661. State = not State
  2662. if Keybind.Flag then
  2663. UI.flags[Keybind.Flag] = State
  2664. end
  2665. Keybind.Callback(State)
  2666. --[[if not Keybind.Ignore then
  2667. ListValue:SetVisible(State)
  2668. end]]
  2669. end
  2670. end
  2671. end)
  2672. --
  2673. signals.connection(uis.InputEnded, function(inp)
  2674. if Keybind.Mode == "Hold" and not Keybind.UseKey then
  2675. if Key ~= "" or Key ~= nil then
  2676. if inp.KeyCode == Key or inp.UserInputType == Key then
  2677. if c then
  2678. c:Disconnect()
  2679. if Keybind.Flag then
  2680. UI.flags[Keybind.Flag] = false
  2681. end
  2682. if Keybind.Callback then
  2683. Keybind.Callback(false)
  2684. end
  2685. --[[if not Keybind.Ignore then
  2686. ListValue:SetVisible(false)
  2687. end]]
  2688. end
  2689. end
  2690. end
  2691. end
  2692. end)
  2693. --
  2694. signals.connection(Inline.MouseButton2Down, function()
  2695. ModeBox.Visible = true
  2696. NewBind.ZIndex = 5
  2697. end)
  2698. --
  2699. signals.connection(Hold.MouseButton1Down, function()
  2700. set("Hold")
  2701. Hold.TextColor3 = color3_rgb(255,255,255)
  2702. Toggle.TextColor3 = color3_rgb(145,145,145)
  2703. Always.TextColor3 = color3_rgb(145,145,145)
  2704. ModeBox.Visible = false
  2705. NewBind.ZIndex = 1
  2706. end)
  2707. --
  2708. signals.connection(Toggle.MouseButton1Down, function()
  2709. set("Toggle")
  2710. Hold.TextColor3 = color3_rgb(145,145,145)
  2711. Toggle.TextColor3 = color3_rgb(255,255,255)
  2712. Always.TextColor3 = color3_rgb(145,145,145)
  2713. ModeBox.Visible = false
  2714. NewBind.ZIndex = 1
  2715. end)
  2716. --
  2717. signals.connection(Always.MouseButton1Down, function()
  2718. set("Always")
  2719. Hold.TextColor3 = color3_rgb(145,145,145)
  2720. Toggle.TextColor3 = color3_rgb(145,145,145)
  2721. Always.TextColor3 = color3_rgb(255,255,255)
  2722. ModeBox.Visible = false
  2723. NewBind.ZIndex = 1
  2724. end)
  2725. --
  2726. signals.connection(uis.InputBegan, function(Input)
  2727. if ModeBox.Visible and Input.UserInputType == Enum.UserInputType.MouseButton1 then
  2728. local pos, size, mouse = ModeBox.AbsolutePosition, ModeBox.AbsoluteSize, get_mouse
  2729. if not (mouse.X >= pos.X and mouse.X <= pos.X + size.X and mouse.Y >= pos.Y and mouse.Y <= pos.Y + size.Y) then
  2730. ModeBox.Visible = false
  2731. NewBind.ZIndex = 1
  2732. end
  2733. end
  2734. end)
  2735. --
  2736. UI.flags[Keybind.Flag .. "_KEY"] = Keybind.State
  2737. UI.flags[Keybind.Flag .. "_KEY STATE"] = Keybind.Mode
  2738. flags[Keybind.Flag] = set
  2739. flags[Keybind.Flag .. "_KEY"] = set
  2740. flags[Keybind.Flag .. "_KEY STATE"] = set
  2741. --
  2742. function Keybind:Set(key)
  2743. set(key);
  2744. end;
  2745.  
  2746. return Keybind;
  2747. end;
  2748. end;
  2749. do -- open/close
  2750. signals.connection(uis.InputBegan, function(input)
  2751. if input.KeyCode == UI.ui_key then
  2752. pcall(function()
  2753. UI.autoload = not UI.autoload
  2754. UI.menu_gui.Enabled = UI.autoload
  2755. black_bg.Visible = UI.autoload
  2756. blur_effect.Size = UI.autoload and 20 or 0
  2757. end);
  2758. end;
  2759. end);
  2760. end;
  2761.  
  2762. return {UI, framework, fonts, black_bg, blur_effect};
Advertisement
Add Comment
Please, Sign In to add comment