IvesAwadi

Untitled

Jun 17th, 2020
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 50.75 KB | None | 0 0
  1. local library = {flags = {}, callbacks = {}, rainbowI = 0};
  2.  
  3. local GetService = game.GetService;
  4. local Players = GetService(game, "Players");
  5. local RunService = GetService(game, "RunService");
  6. local CoreGui = GetService(game, "CoreGui");
  7. local TweenService = GetService(game, "TweenService");
  8. local UserInputService = GetService(game, "UserInputService");
  9.  
  10. local LocalPlayer = Players.LocalPlayer;
  11.  
  12. do -- library funcs
  13. coroutine.wrap(function()
  14. while true do
  15. for i = 0, 359 do
  16. library.rainbowI = i / 359;
  17. library.rainbowVal = Color3.fromHSV(i / 359, 1, 1);
  18. wait();
  19. end;
  20. end;
  21. end)();
  22.  
  23. function library:Create(class, data)
  24. local obj = Instance.new(class);
  25. for i, v in next, data do
  26. if i ~= 'Parent' then
  27. if typeof(v) == "Instance" then
  28. v.Parent = obj;
  29. else
  30. obj[i] = v
  31. end
  32. end
  33. end
  34.  
  35. obj.Parent = data.Parent;
  36. return obj;
  37. end;
  38.  
  39. function library:Dragger(main2, second)
  40. local dragging;
  41. local dragInput;
  42. local dragStart;
  43. local startPos;
  44.  
  45. local function update(input)
  46. local delta = input.Position - dragStart;
  47. second:TweenPosition(UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y),'Out','Sine',0.01,true);
  48. end;
  49.  
  50. main2.InputBegan:Connect(function(input)
  51. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  52. dragging = true;
  53. dragStart = input.Position;
  54. startPos = second.Position;
  55.  
  56. repeat wait() until input.UserInputState == Enum.UserInputState.End;
  57. dragging = false;
  58. end;
  59. end);
  60.  
  61. main2.InputChanged:Connect(function(input)
  62. if input.UserInputType == Enum.UserInputType.MouseMovement then
  63. dragInput = input;
  64. end;
  65. end);
  66.  
  67. game:GetService("UserInputService").InputChanged:Connect(function(input)
  68. if input == dragInput and dragging then
  69. update(input);
  70. end;
  71. end);
  72. end;
  73.  
  74. function library:Tween(instance, properties, callback)
  75. local callback = callback or function() end;
  76. local time = properties.time;
  77. properties.time = nil;
  78. local anim = TweenService:Create(instance, TweenInfo.new(time), properties);
  79.  
  80. anim.Completed:Connect(callback);
  81. anim:Play();
  82. return anim;
  83. end;
  84.  
  85. local ui_Settings = {
  86. mainColor = Color3.fromRGB(36, 36, 36);
  87. bottomColor = Color3.fromRGB(34, 34, 34);
  88. borderColor = Color3.fromRGB(42, 42, 42);
  89. scrollingBarColor = Color3.fromRGB(115, 41, 255);
  90. toggleColor = Color3.fromRGB(34, 34, 34);
  91. toggleBorderColor = Color3.fromRGB(102, 41, 255);
  92. boxColor = Color3.fromRGB(32, 32, 32);
  93. boxBorderColor = Color3.fromRGB(102, 41, 255);
  94. gradientColorSection = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(102, 41, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(122, 41, 255))};
  95. gradientColor = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(102, 41, 255)), ColorSequenceKeypoint.new(0, Color3.fromRGB(142, 61, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(210, 74, 255))};
  96. shadowGradientColor = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(20, 20, 20)), ColorSequenceKeypoint.new(1, Color3.fromRGB(36, 36, 36))};
  97. };
  98.  
  99. UserInputService.InputBegan:Connect(function(input)
  100. for i, v in next, library.flags do
  101. if(v == input.KeyCode) then
  102. library.callbacks[i]();
  103. elseif(v == input.UserInputType) then
  104. library.callbacks[i]();
  105. end;
  106. end;
  107. end);
  108.  
  109. local gui = Instance.new("ScreenGui", CoreGui);
  110. gui.Name = "Mad-Lads"
  111. gui.Enabled = false;
  112. library.gui = gui;
  113.  
  114. local main = library:Create("Frame", {
  115. Name = "main";
  116. Parent = gui;
  117. Position = UDim2.new(0.5, -200, 0.5, -135);
  118. BorderSizePixel = 0;
  119. BackgroundColor3 = ui_Settings.mainColor; -- main color
  120. Size = UDim2.new(0, 350,0, 330);
  121. library:Create("ImageLabel", {
  122. Name = "Search";
  123. BackgroundTransparency = 1.000;
  124. Position = UDim2.new(0, 4, 0, 46);
  125. Size = UDim2.new(1, -8, 0, 26);
  126. Image = "rbxassetid://4641155515";
  127. ImageColor3 = Color3.fromRGB(30, 30, 30);
  128. ScaleType = Enum.ScaleType.Slice;
  129. SliceCenter = Rect.new(4, 4, 296, 296);
  130. library:Create("TextBox", {
  131. Name = "textbox";
  132. BackgroundTransparency = 1.000;
  133. Position = UDim2.new(1, -362, 0, 0);
  134. Size = UDim2.new(1, -30, 1, 0);
  135. Font = Enum.Font.Gotham;
  136. PlaceholderText = "Search";
  137. Text = "";
  138. TextColor3 = Color3.fromRGB(255, 255, 255);
  139. TextSize = 14.000;
  140. TextXAlignment = Enum.TextXAlignment.Left;
  141. });
  142. library:Create("ImageLabel", {
  143. Name = "icon";
  144. BackgroundTransparency = 1.000;
  145. Position = UDim2.new(0, 2, 0, 1);
  146. Size = UDim2.new(0, 24, 0, 24);
  147. Image = "http://www.roblox.com/asset/?id=4645651350";
  148. library:Create("UIGradient", {
  149. Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(39, 133, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(210, 74, 255))};
  150. Rotation = 45;
  151. });
  152. });
  153. });
  154.  
  155. library:Create("Frame", {
  156. Name = "border";
  157. BackgroundColor3 = ui_Settings.bottomColor;
  158. BorderColor3 = ui_Settings.borderColor;
  159. BorderSizePixel = 1;
  160. Position = UDim2.new(0, 5, 0, 78);
  161. Size = UDim2.new(0, 340, 0, 245);
  162. library:Create("Frame", {
  163. Name = "shadow";
  164. BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  165. BackgroundTransparency = 0.100;
  166. BorderSizePixel = 0;
  167. Position = UDim2.new(0, 0, 1, -8);
  168. Size = UDim2.new(1, 0, 0, 8);
  169. library:Create("UIGradient", {
  170. Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(20, 20, 20)), ColorSequenceKeypoint.new(1, Color3.fromRGB(36, 36, 36))};
  171. Rotation = 270;
  172. Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0.00, 0.00), NumberSequenceKeypoint.new(1.00, 1.00)};
  173. });
  174. });
  175. library:Create("Frame", {
  176. Name = "shadow";
  177. BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  178. BackgroundTransparency = 0.100;
  179. BorderSizePixel = 0;
  180. Size = UDim2.new(1, 0, 0, 8);
  181. library:Create("UIGradient", {
  182. Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(20, 20, 20)), ColorSequenceKeypoint.new(1, Color3.fromRGB(36, 36, 36))};
  183. Rotation = 90;
  184. Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0.00, 0.00), NumberSequenceKeypoint.new(1.00, 1.00)};
  185. });
  186. });
  187. });
  188. library:Create("Frame", {
  189. Name = "bar";
  190. BorderSizePixel = 0;
  191. BackgroundColor3 = Color3.fromRGB(255, 255, 255); -- bar color
  192. Size = UDim2.new(1, 0,0, 4);
  193. Position = UDim2.new(0, 0, 0, 0);
  194. library:Create("UIGradient", {
  195. Color = ui_Settings.gradientColor;
  196. });
  197. library:Create("Frame", {
  198. Name = "bottom";
  199. BorderSizePixel = 0;
  200. BackgroundColor3 = ui_Settings.bottomColor;
  201. Position = UDim2.new(0, 0, 0, 4);
  202. Size = UDim2.new(1, 0, 0, 34);
  203. library:Create("Frame", {
  204. BackgroundTransparency = 0.1;
  205. BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  206. BorderSizePixel = 0;
  207. Name = "shadow";
  208. Position = UDim2.new(0, 0, 1, 0);
  209. });
  210. library:Create("TextLabel", {
  211. Name = "Title";
  212. BackgroundTransparency = 1;
  213. Position = UDim2.new(0, 10, 0.5, -10);
  214. Size = UDim2.new(0, 70, 0, 24);
  215. TextColor3 = Color3.fromRGB(255, 255, 255);
  216. Text = "Mad-Lads";
  217. Font = "GothamSemibold";
  218. TextSize = 14;
  219. library:Create("UIGradient", {
  220. Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(39, 133, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(210, 74, 255))}
  221. });
  222. });
  223. library:Create("Frame", {
  224. Name = "topcontainer";
  225. BackgroundTransparency = 1;
  226. BorderSizePixel = 0;
  227. Position = UDim2.new(0, 88, 0, 9);
  228. Size = UDim2.new(1, -90, 0.73, 0);
  229. library:Create("UIListLayout", {
  230. Padding = UDim.new(0, 2);
  231. FillDirection = "Horizontal";
  232. HorizontalAlignment = "Left";
  233. SortOrder = "LayoutOrder";
  234. VerticalAlignment = "Top";
  235. });
  236. });
  237. });
  238. });
  239. });
  240. local modal = Instance.new("TextButton", main);
  241. modal.Modal = true;
  242. modal.BackgroundTransparency = 1;
  243. modal.Text = "";
  244.  
  245. main:WaitForChild("Search").textbox.Changed:Connect(function()
  246. local Entry = main:WaitForChild("Search").textbox.Text:lower();
  247.  
  248. if(Entry ~= "") then
  249. for i,v in next, library.currentSection:GetChildren() do
  250. if(not v:IsA("UIPadding") and not v:IsA("UIListLayout")) then
  251. local label = v:FindFirstChild("label");
  252. local button = v:FindFirstChild("button");
  253.  
  254. local find = false;
  255. if(label and label.Text:gsub("%s", ""):lower():sub(1, #Entry) == Entry) then
  256. v.Visible = true;
  257. find = true;
  258. end;
  259.  
  260. if(button and button:FindFirstChild("label") and button.label.Text:gsub("%s", ""):lower():sub(1, #Entry) == Entry) then
  261. v.Visible = true;
  262. find = true;
  263. end;
  264.  
  265. if(not find) then
  266. v.Visible = false;
  267. end;
  268. end;
  269. end;
  270. elseif library.currentSection then
  271. for i,v in next, library.currentSection:GetChildren() do
  272. if(not v:IsA("UIPadding") and not v:IsA("UIListLayout")) then
  273. v.Visible = true;
  274. end;
  275. end;
  276. end;
  277. end);
  278.  
  279. library:Dragger(main.bar.bottom, main);
  280. function library:Ready()
  281. gui.Enabled = true;
  282. end;
  283.  
  284. function library:CreateSection(name)
  285. local topContainer = gui.main.bar.bottom.topcontainer;
  286.  
  287. local sectionSelector = library:Create("ImageButton", {
  288. Parent = topContainer;
  289. BackgroundTransparency = 1;
  290. Size = UDim2.new(0, 60, 1, 0);
  291. Image = "rbxassetid://4641155773";
  292. ImageColor3 = Color3.fromRGB(255, 255, 255);
  293. ScaleType = "Slice";
  294. SliceCenter = Rect.new(4, 4, 296, 296);
  295. SliceScale = 1;
  296. Name = "back";
  297. library:Create("UIGradient", {
  298. Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(102, 41, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(132, 41, 255))}
  299. });
  300. library:Create("TextLabel", {
  301. BackgroundTransparency = 1;
  302. Text = name;
  303. Size = UDim2.new(1, 0, 1, 0);
  304. TextColor3 = Color3.fromRGB(255, 255, 255);
  305. });
  306. });
  307.  
  308. local boxContainer = library:Create("ScrollingFrame", {
  309. Name = "box";
  310. BorderSizePixel = 0;
  311. BackgroundColor3 = Color3.fromRGB(34, 34, 34);
  312. Parent = main.border;
  313. Position = UDim2.new(0, 1, 0, 1);
  314. Size = UDim2.new(1, -2, 1, -2);
  315. BottomImage = "rbxasset://textures/ui/Scroll/scroll-middle.png";
  316. TopImage = "rbxasset://textures/ui/Scroll/scroll-middle.png";
  317. ScrollBarThickness = 4;
  318. CanvasSize = UDim2.new(0, 0, 0, 0);
  319. library:Create("UIPadding", {
  320. PaddingTop = UDim.new(0, 2);
  321. PaddingLeft = UDim.new(0, 2);
  322. });
  323. library:Create("UIListLayout", {
  324. Padding = UDim.new(0, 5);
  325. FillDirection = "Vertical";
  326. HorizontalAlignment = "Left";
  327. VerticalAlignment = "Top";
  328. });
  329. });
  330.  
  331. local section = {};
  332.  
  333. boxContainer.ChildAdded:Connect(function(Obj)
  334. section:Update();
  335. end);
  336.  
  337. if(not library.currentSection) then
  338. library.currentSectionSelector = sectionSelector;
  339. library.currentSection = boxContainer;
  340. library.currentSectionObject = section;
  341.  
  342. library.currentSectionSelector.ImageColor3 = Color3.fromRGB(150, 150, 150);
  343. boxContainer.Visible = true;
  344. else
  345. boxContainer.Visible = false;
  346. end;
  347.  
  348. sectionSelector.MouseButton1Click:Connect(function()
  349. if(library.currentSection) then
  350. library.currentSectionSelector.ImageColor3 = Color3.fromRGB(255, 255, 255);
  351. library.currentSection.Visible = false;
  352. end;
  353.  
  354. sectionSelector.ImageColor3 = Color3.fromRGB(150, 150, 150);
  355. boxContainer.Visible = true;
  356. library.currentSectionSelector = sectionSelector;
  357. library.currentSection = boxContainer;
  358. end);
  359.  
  360. function section:Update()
  361. local CanvasSize = UDim2.new(0, 0, 0, 85)
  362. for i,v in next, boxContainer:GetChildren() do
  363. if(not v:IsA("UIListLayout") and not v:IsA("UIPadding") and v.Visible) then
  364. CanvasSize = CanvasSize + UDim2.new(0, 0, 0, v.AbsoluteSize.Y + 5);
  365. end;
  366. end;
  367.  
  368. library:Tween(boxContainer, {time = 0.1, CanvasSize = CanvasSize});
  369. end;
  370.  
  371. function section:Label(labelName)
  372. local holder = library:Create("Frame", {
  373. Name = "holder";
  374. Parent = boxContainer;
  375. BackgroundColor3 = Color3.fromRGB(25, 25, 25);
  376. BorderSizePixel = 0;
  377. Position = UDim2.new(0, 0, 0, 350);
  378. Size = UDim2.new(1, 0, 0, 18);
  379. library:Create("TextLabel", {
  380. Name = "label";
  381. BackgroundTransparency = 1.000;
  382. Size = UDim2.new(1, 0, 1, 0);
  383. Font = "Gotham";
  384. Text = labelName;
  385. TextColor3 = Color3.fromRGB(255, 255, 255);
  386. TextSize = 12.000;
  387. });
  388. });
  389. end;
  390.  
  391. function section:Toggle(toggleName, callback)
  392. local callback = callback or function() end;
  393. local toggle = false;
  394.  
  395. library.flags[toggleName] = toggle;
  396.  
  397. local holder = library:Create("Frame", {
  398. BackgroundTransparency = 1;
  399. Parent = boxContainer;
  400. Size = UDim2.new(1, -20, 0, 18);
  401. Name = "holder";
  402. library:Create("TextLabel", {
  403. Name = "label";
  404. BackgroundTransparency = 1;
  405. TextColor3 = Color3.fromRGB(255, 255, 255);
  406. Size = UDim2.new(1, -22, 1, 0);
  407. Font = "Gotham";
  408. TextXAlignment = "Left";
  409. TextSize = 12;
  410. Text = toggleName;
  411. });
  412. library:Create("TextButton", {
  413. Name = "toggle";
  414. AutoButtonColor = false;
  415. BackgroundColor3 = ui_Settings.toggleColor;
  416. BorderColor3 = ui_Settings.toggleBorderColor;
  417. BorderSizePixel = 1;
  418. Size = UDim2.new(0, 16, 0, 16);
  419. Position = UDim2.new(0, 100, 0, 0);
  420. Text = "";
  421. library:Create("Frame", {
  422. BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  423. Size = toggle and UDim2.new(1, 0, 1, 0) or UDim2.new(0, 0, 0, 0);
  424. Name = "fill";
  425. BorderSizePixel = 0;
  426. library:Create("UIGradient", {
  427. Color = ui_Settings.gradientColorSection;
  428. Rotation = 45;
  429. });
  430. });
  431. library:Create("UIListLayout", {
  432. FillDirection = "Vertical";
  433. HorizontalAlignment = "Center";
  434. VerticalAlignment = "Center";
  435. });
  436. library:Create("UIPadding", {
  437. PaddingBottom = UDim.new(0, 1);
  438. PaddingTop = UDim.new(0, 1);
  439. PaddingLeft = UDim.new(0, 1);
  440. PaddingRight = UDim.new(0, 1);
  441. });
  442. });
  443. });
  444.  
  445. local function onClick()
  446. toggle = not toggle;
  447. library:Tween(holder.toggle.fill, {time = 0.1, Size = toggle and UDim2.new(1, 0, 1, 0) or UDim2.new(0, 0, 0, 0)});
  448. library.flags[toggleName] = toggle;
  449. callback(toggle);
  450. end;
  451.  
  452. holder.toggle.MouseButton1Click:Connect(onClick);
  453. return holder;
  454. end;
  455.  
  456. function section:Box(boxName, callback)
  457. local holder = library:Create("Frame", {
  458. Size = UDim2.new(1, -20, 0, 18);
  459. BackgroundTransparency = 1;
  460. Name = "holder";
  461. Parent = boxContainer;
  462. library:Create("TextLabel", {
  463. BackgroundTransparency = 1;
  464. Name = "label";
  465. TextColor3 = Color3.fromRGB(255, 255, 255);
  466. Text = boxName;
  467. TextSize = 12;
  468. Font = "Gotham";
  469. Size = UDim2.new(1, 0, 1, 0);
  470. TextXAlignment = "Left";
  471. });
  472. library:Create("TextBox", {
  473. BackgroundColor3 = Color3.fromRGB(32, 32, 32);
  474. BorderColor3 = ui_Settings.boxBorderColor;
  475. BorderSizePixel = 1;
  476. Name = "textbox";
  477. TextSize = 14;
  478. Position = UDim2.new(1, -160, 0, 0);
  479. Size = UDim2.new(0, 160, 1, 0);
  480. PlaceholderColor3 = Color3.fromRGB(200, 200, 200);
  481. PlaceholderText = "Value";
  482. Text = "";
  483. TextColor3 = Color3.fromRGB(255, 255, 255);
  484. Font = "SourceSans";
  485. });
  486. });
  487.  
  488. holder.textbox.FocusLost:Connect(function(Enter)
  489. if(Enter) then
  490. library.flags[boxName] = holder.textbox.Text;
  491. callback(holder.textbox.Text);
  492. end;
  493. end);
  494. end;
  495.  
  496. function section:Slider(sliderName, properties, callback)
  497. local callback = callback or function() end;
  498. library.flags[sliderName] = properties.min;
  499.  
  500. local holder = library:Create("Frame", {
  501. Size = UDim2.new(1, -20, 0, 36);
  502. BackgroundTransparency = 1;
  503. Name = "holder";
  504. Parent = boxContainer;
  505. library:Create("TextLabel", {
  506. Name = "label";
  507. BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  508. BackgroundTransparency = 1.000;
  509. Size = UDim2.new(1, 0, 0, 17);
  510. Font = "Gotham";
  511. Text = sliderName;
  512. TextColor3 = Color3.fromRGB(255, 255, 255);
  513. TextSize = 12.000;
  514. TextXAlignment = "Left";
  515. });
  516. library:Create("TextButton", {
  517. Name = "slider";
  518. BackgroundColor3 = Color3.fromRGB(34, 34, 34);
  519. BorderColor3 = Color3.fromRGB(102, 41, 255);
  520. Position = UDim2.new(0, 0, 1, -19);
  521. Size = UDim2.new(1, 0, 0, 16);
  522. AutoButtonColor = false;
  523. Font = "SourceSans";
  524. Text = "";
  525. TextColor3 = Color3.fromRGB(0, 0, 0);
  526. TextSize = 14.000;
  527. library:Create("TextLabel", {
  528. Name = "value";
  529. BackgroundTransparency = 1;
  530. Size = UDim2.new(1, 0, 1, 0);
  531. Font = "SourceSans";
  532. Text = properties.default and tostring(properties.default) or tostring(properties.min);
  533. TextColor3 = Color3.fromRGB(255, 255, 255);
  534. TextSize = 14.000;
  535. ZIndex = 2;
  536. });
  537. library:Create("Frame", {
  538. BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  539. Position = UDim2.new(0, 1, 0, 1);
  540. Name = "fill";
  541. Size = UDim2.new(0, 0, 1, -2);
  542. BorderSizePixel = 0;
  543. library:Create("UIGradient", {
  544. Color = ui_Settings.gradientColorSection;
  545. Rotation = 90;
  546. });
  547. });
  548. });
  549. });
  550.  
  551. local Connection;
  552. UserInputService.InputEnded:Connect(function(input)
  553. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  554. if(Connection) then
  555. Connection:Disconnect();
  556. Connection = nil;
  557. end;
  558. end;
  559. end);
  560.  
  561. holder.slider.MouseButton1Down:Connect(function()
  562. if(Connection) then
  563. Connection:Disconnect();
  564. end;
  565.  
  566. Connection = RunService.Heartbeat:Connect(function()
  567. local mouse = UserInputService:GetMouseLocation();
  568. local percent = math.clamp((mouse.X - holder.slider.AbsolutePosition.X) / (holder.slider.AbsoluteSize.X), 0, 1);
  569. local Value = properties.min + (properties.max - properties.min) * percent;
  570.  
  571. if not properties.precise then
  572. Value = math.floor(Value);
  573. end;
  574.  
  575. Value = tonumber(string.format("%.2f", Value));
  576.  
  577. library:Tween(holder.slider.fill, {time = 0.1, Size = UDim2.new(percent, 0, 1, -2)})
  578. holder.slider.value.Text = tostring(Value);
  579. library.flags[sliderName] = Value;
  580.  
  581. callback(Value);
  582. end);
  583. end);
  584. end;
  585.  
  586. function section:Bind(bindName, defaultKey, callback)
  587. local callback = callback or function() end;
  588. local input = defaultKey and tostring(defaultKey):gsub("Enum.", ""):gsub("UserInputType.", ""):gsub("KeyCode.", "") or "None";
  589. library.callbacks[bindName] = callback;
  590. library.flags[bindName] = defaultKey;
  591.  
  592. local holder = library:Create("Frame", {
  593. Name = "holder";
  594. Parent = boxContainer;
  595. BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  596. BackgroundTransparency = 1.000;
  597. LayoutOrder = 2;
  598. Position = UDim2.new(0, 10, 0, 76);
  599. Size = UDim2.new(1, -20, 0, 18);
  600. library:Create("TextLabel", {
  601. Name = "label";
  602. BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  603. BackgroundTransparency = 1.000;
  604. Size = UDim2.new(1, 0, 1, 0);
  605. Font = "Gotham";
  606. Text = bindName;
  607. TextColor3 = Color3.fromRGB(255, 255, 255);
  608. TextSize = 12.000;
  609. TextXAlignment = "Left";
  610. });
  611. library:Create("TextButton", {
  612. Name = "keybind";
  613. BackgroundColor3 = Color3.fromRGB(34, 34, 34);
  614. BorderColor3 = Color3.fromRGB(102, 41, 255);
  615. ClipsDescendants = true;
  616. Position = UDim2.new(1, -80, 0, 0);
  617. Size = UDim2.new(0, 80, 1, 0);
  618. AutoButtonColor = false;
  619. Font = Enum.Font.SourceSans;
  620. Text = input;
  621. TextColor3 = Color3.fromRGB(255, 255, 255);
  622. TextSize = 14.000;
  623. });
  624. });
  625.  
  626. local whitelistedType = {
  627. [Enum.KeyCode.LeftShift] = "L-Shift",
  628. [Enum.KeyCode.RightShift] = "R-Shift",
  629. [Enum.KeyCode.LeftControl] = "L-Ctrl",
  630. [Enum.KeyCode.RightControl] = "R-Ctrl",
  631. [Enum.KeyCode.LeftAlt] = "L-Alt",
  632. [Enum.KeyCode.RightAlt] = "R-Alt",
  633. [Enum.KeyCode.CapsLock] = "CAPS",
  634. [Enum.KeyCode.One] = "1",
  635. [Enum.KeyCode.Two] = "2",
  636. [Enum.KeyCode.Three] = "3",
  637. [Enum.KeyCode.Four] = "4",
  638. [Enum.KeyCode.Five] = "5",
  639. [Enum.KeyCode.Six] = "6",
  640. [Enum.KeyCode.Seven] = "7",
  641. [Enum.KeyCode.Eight] = "8",
  642. [Enum.KeyCode.Nine] = "9",
  643. [Enum.KeyCode.Zero] = "0",
  644. [Enum.KeyCode.KeypadOne] = "Num-1",
  645. [Enum.KeyCode.KeypadTwo] = "Num-2",
  646. [Enum.KeyCode.KeypadThree] = "Num-3",
  647. [Enum.KeyCode.KeypadFour] = "Num-4",
  648. [Enum.KeyCode.KeypadFive] = "Num-5",
  649. [Enum.KeyCode.KeypadSix] = "Num-6",
  650. [Enum.KeyCode.KeypadSeven] = "Num-7",
  651. [Enum.KeyCode.KeypadEight] = "Num-8",
  652. [Enum.KeyCode.KeypadNine] = "Num-9",
  653. [Enum.KeyCode.KeypadZero] = "Num-0",
  654. [Enum.KeyCode.Minus] = "-",
  655. [Enum.KeyCode.Equals] = "=",
  656. [Enum.KeyCode.Tilde] = "~",
  657. [Enum.KeyCode.LeftBracket] = "[",
  658. [Enum.KeyCode.RightBracket] = "]",
  659. [Enum.KeyCode.RightParenthesis] = ")",
  660. [Enum.KeyCode.LeftParenthesis] = "(",
  661. [Enum.KeyCode.Semicolon] = ";",
  662. [Enum.KeyCode.Quote] = "'",
  663. [Enum.KeyCode.BackSlash] = "\\",
  664. [Enum.KeyCode.Comma] = ",",
  665. [Enum.KeyCode.Period] = ".",
  666. [Enum.KeyCode.Slash] = "/",
  667. [Enum.KeyCode.Asterisk] = "*",
  668. [Enum.KeyCode.Plus] = "+",
  669. [Enum.KeyCode.Period] = ".",
  670. [Enum.KeyCode.Backquote] = "`",
  671. [Enum.UserInputType.MouseButton1] = "Button-1",
  672. [Enum.UserInputType.MouseButton2] = "Button-2",
  673. [Enum.UserInputType.MouseButton3] = "Button-3",
  674. };
  675.  
  676.  
  677. holder.keybind.MouseButton1Click:Connect(function()
  678. holder.keybind.Text = "...";
  679. local connection;
  680. connection = UserInputService.InputBegan:Connect(function(input)
  681. connection:Disconnect();
  682. wait();
  683.  
  684. local KeyCodeName = whitelistedType[input.KeyCode] or whitelistedType[input.UserInputType];
  685.  
  686. holder.keybind.Text = KeyCodeName or tostring(input.KeyCode):gsub("Enum.KeyCode.", "");
  687. if(input.UserInputType == Enum.UserInputType.Keyboard) then
  688. library.flags[bindName] = input.KeyCode;
  689. else
  690. library.flags[bindName] = input.UserInputType;
  691. end;
  692. end);
  693. end);
  694. end;
  695.  
  696. function section:Button(buttonName, callback)
  697. local callback = callback or function() end;
  698. local holder = library:Create("Frame", {
  699. Name = "holder";
  700. Parent = boxContainer;
  701. BackgroundTransparency = 1.000;
  702. Position = UDim2.new(0, 10, 0, 148);
  703. Size = UDim2.new(1, -10, 0, 20);
  704. library:Create("TextButton", {
  705. BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  706. Size = UDim2.new(1, 0, 1, 0);
  707. BorderSizePixel = 0;
  708. TextColor3 = Color3.fromRGB(255, 255, 255);
  709. Text = "";
  710. Name = "button";
  711. AutoButtonColor = false;
  712. library:Create("TextLabel", {
  713. Name = "label";
  714. BackgroundTransparency = 1;
  715. Size = UDim2.new(1, 0, 1, 0);
  716. Font = "SourceSans";
  717. TextSize = 14;
  718. TextColor3 = Color3.fromRGB(255, 255, 255);
  719. Text = buttonName;
  720. });
  721. library:Create("UIGradient", {
  722. Rotation = 90;
  723. Color = ui_Settings.gradientColorSection;
  724. });
  725. });
  726. });
  727.  
  728. holder.button.MouseButton1Click:Connect(callback);
  729. end;
  730.  
  731. function section:Dropdown(name, list, callback)
  732. local callback = callback or function() end;
  733. local toggle = false;
  734.  
  735. local holder = library:Create("Frame", {
  736. Name = "holder";
  737. BackgroundTransparency = 1.000;
  738. LayoutOrder = 3;
  739. Position = UDim2.new(0, 10, 0, 98);
  740. Size = UDim2.new(1, -20, 0, 36);
  741. Parent = boxContainer;
  742. library:Create("TextLabel", {
  743. Name = "label";
  744. BackgroundTransparency = 1.000;
  745. Size = UDim2.new(1, 0, 0, 18);
  746. Font = Enum.Font.Gotham;
  747. Text = name;
  748. TextColor3 = Color3.fromRGB(255, 255, 255);
  749. TextSize = 12.000;
  750. TextXAlignment = Enum.TextXAlignment.Left;
  751. });
  752. library:Create("TextButton", {
  753. Name = "dropdown";
  754. BackgroundColor3 = Color3.fromRGB(102, 41, 255);
  755. BorderColor3 = Color3.fromRGB(102, 41, 255);
  756. Size = UDim2.new(1, 0, 0, 18);
  757. AutoButtonColor = false;
  758. Font = "SourceSans";
  759. Text = "";
  760. TextColor3 = Color3.fromRGB(0, 0, 0);
  761. TextSize = 14.000;
  762. Position = UDim2.new(0, 0, 0, 18);
  763. library:Create("ImageLabel", {
  764. Name = "icon";
  765. BackgroundTransparency = 1.000;
  766. Position = UDim2.new(1, -18, 0, 0);
  767. Size = UDim2.new(0, 18, 0, 16);
  768. Image = "http://www.roblox.com/asset/?id=4641587888";
  769. ZIndex = 2;
  770. });
  771. library:Create("TextLabel", {
  772. Name = "label";
  773. BackgroundTransparency = 1.000;
  774. Position = UDim2.new(0, 4, 0, 0);
  775. Size = UDim2.new(1, -4, 0, 18);
  776. Font = Enum.Font.Gotham;
  777. Text = "Drop value";
  778. TextColor3 = Color3.fromRGB(255, 255, 255);
  779. TextSize = 12.000;
  780. TextXAlignment = Enum.TextXAlignment.Left;
  781. ZIndex = 2;
  782. });
  783. library:Create("Frame", {
  784. Name = "dropframe";
  785. BackgroundColor3 = Color3.fromRGB(32, 32, 32);
  786. BorderColor3 = Color3.fromRGB(102, 41, 255);
  787. BorderSizePixel = 0;
  788. ClipsDescendants = true;
  789. Position = UDim2.new(0, -1, 1, 1);
  790. Size = UDim2.new(1, 2, 0, 0);
  791. library:Create("UIListLayout", {
  792. SortOrder = "LayoutOrder";
  793. Padding = UDim.new(0, 2);
  794. });
  795. });
  796. library:Create("Frame", {
  797. Name = "fill";
  798. BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  799. BorderSizePixel = 0;
  800. Position = UDim2.new(0, 1, 0, 1);
  801. Size = UDim2.new(1, 0, 1, 0);
  802. library:Create("UIGradient", {
  803. Rotation = 90;
  804. Color = ui_Settings.gradientColorSection;
  805. });
  806. });
  807. });
  808. });
  809.  
  810. for i, v in next, list do
  811. local button = library:Create("TextButton", {
  812. Name = "button";
  813. Text = v;
  814. Parent = holder.dropdown.dropframe;
  815. BackgroundColor3 = Color3.fromRGB(32, 32, 32);
  816. BorderColor3 = Color3.fromRGB(255, 255, 255);
  817. BorderSizePixel = 0;
  818. Size = UDim2.new(1, 0, 0, 16);
  819. Font = "SourceSans";
  820. TextColor3 = Color3.fromRGB(255, 255, 255);
  821. TextSize = 14.000;
  822. ZIndex = 1;
  823. });
  824.  
  825. button.MouseButton1Click:Connect(function()
  826. toggle = false;
  827. holder.dropdown.label.Text = v;
  828. library:Tween(holder.dropdown.icon, {time = 0.1, Rotation = 180});
  829. library:Tween(holder, {time = 0.1, Size = UDim2.new(1, -20, 0, 35)});
  830. library:Tween(holder.dropdown.dropframe, {time = 0.1, Size = UDim2.new(1, 2, 0, 0)}, self.Update);
  831. callback(button.Text);
  832. end);
  833. end;
  834.  
  835. holder.dropdown.MouseButton1Click:Connect(function()
  836. toggle = not toggle;
  837. local TotalY = 0;
  838. for i, v in next, holder.dropdown.dropframe:GetChildren() do
  839. if(v:IsA("TextButton")) then
  840. TotalY = TotalY + v.AbsoluteSize.Y + 2;
  841. end;
  842. end;
  843.  
  844. if(toggle) then
  845. library:Tween(holder.dropdown.icon, {time = 0.1, Rotation = 0});
  846. library:Tween(holder, {time = 0.1, Size = UDim2.new(1, -20, 0, TotalY + 50)});
  847. library:Tween(holder.dropdown.dropframe, {time = 0.1, Size = UDim2.new(1, 2, 0, TotalY)}, self.Update);
  848. else
  849. library:Tween(holder.dropdown.icon, {time = 0.1, Rotation = 180});
  850. library:Tween(holder, {time = 0.1, Size = UDim2.new(1, -20, 0, 36)});
  851. library:Tween(holder.dropdown.dropframe, {time = 0.1, Size = UDim2.new(1, 2, 0, 0)}, self.Update);
  852. end;
  853. end);
  854. end;
  855.  
  856. function section:ColorPicker(pickerName, defaultColor, callback)
  857. local callback = callback or function() end;
  858. local defaultColor = defaultColor or Color3.fromRGB(102, 41, 255);
  859. local rainbowToggle = false;
  860. local Mouse = Players.LocalPlayer:GetMouse();
  861.  
  862. local holder = library:Create("Frame", {
  863. Name = "holder";
  864. Parent = boxContainer;
  865. BackgroundTransparency = 1.000;
  866. Position = UDim2.new(0, 10, 0, 172);
  867. Size = UDim2.new(1, -20, 0, 18);
  868. library:Create("TextLabel", {
  869. Name = "label";
  870. BackgroundTransparency = 1.000;
  871. Size = UDim2.new(1, 0, 1, 0);
  872. Font = "Gotham";
  873. Text = pickerName;
  874. TextColor3 = Color3.fromRGB(255, 255, 255);
  875. TextSize = 12.000;
  876. TextXAlignment = Enum.TextXAlignment.Left;
  877. });
  878. library:Create("TextButton", {
  879. Name = "colorpicker";
  880. BackgroundColor3 = Color3.fromRGB(34, 34, 34);
  881. BorderColor3 = Color3.fromRGB(102, 41, 255);
  882. Position = UDim2.new(1, -16, 0, 0);
  883. Size = UDim2.new(0, 16, 0, 16);
  884. AutoButtonColor = false;
  885. Font = Enum.Font.SourceSans;
  886. Text = "";
  887. TextColor3 = Color3.fromRGB(0, 0, 0);
  888. TextSize = 14.000;
  889. library:Create("Frame", {
  890. Name = "colorframe";
  891. BackgroundColor3 = Color3.fromRGB(32, 32, 32);
  892. BorderColor3 = Color3.fromRGB(102, 41, 255);
  893. Position = UDim2.new(0, -148, 1, 6);
  894. Size = UDim2.new(0, 144, 0, 139);
  895. Visible = false;
  896. ZIndex = 2;
  897. library:Create("ImageButton", {
  898. Name = "satval";
  899. Image = "http://www.roblox.com/asset/?id=4650897272";
  900. BorderSizePixel = 0;
  901. AutoButtonColor = false;
  902. BackgroundColor3 = defaultColor;
  903. Position = UDim2.new(0, 4, 0, 3);
  904. Size = UDim2.new(0, 110, 0, 102);
  905. ZIndex = 2;
  906. library:Create("TextButton", {
  907. Name = "picker";
  908. BackgroundColor3 = Color3.fromRGB(53, 53, 53);
  909. BackgroundTransparency = 0.500;
  910. BorderSizePixel = 0;
  911. Position = UDim2.new(0.5, 0, 0.5, 0);
  912. Size = UDim2.new(0, 5, 0, 5);
  913. ZIndex = 2;
  914. Text = "";
  915. });
  916. });
  917. library:Create("TextButton", {
  918. Name = "rainbow";
  919. ZIndex = 2;
  920. BackgroundColor3 = Color3.fromRGB(255, 255, 255);
  921. BorderColor3 = Color3.fromRGB(255, 255, 255);
  922. ClipsDescendants = true;
  923. Position = UDim2.new(0, 5, 1, -25);
  924. Size = UDim2.new(0, 133, 0, 20);
  925. AutoButtonColor = false;
  926. Font = "SourceSans";
  927. Text = "";
  928. TextColor3 = Color3.fromRGB(255, 255, 255);
  929. TextSize = 14.000;
  930. library:Create("UIGradient", {
  931. Color = ui_Settings.gradientColorSection;
  932. Rotation = -90;
  933. });
  934. library:Create("TextLabel", {
  935. Name = "label";
  936. Parent = button;
  937. BackgroundTransparency = 1.000;
  938. Size = UDim2.new(1, 0, 1, 0);
  939. Font = "SourceSans";
  940. Text = "Rainbow: OFF";
  941. TextColor3 = Color3.fromRGB(255, 255, 255);
  942. TextSize = 14.000;
  943. ZIndex = 2;
  944. });
  945. });
  946. library:Create("ImageButton", {
  947. Name = "hue";
  948. AutoButtonColor = false;
  949. ZIndex = 2;
  950. Position = UDim2.new(0, 118, 0, 3);
  951. Size = UDim2.new(0, 18, 0, 102);
  952. Image = "http://www.roblox.com/asset/?id=4650897105";
  953. library:Create("TextButton", {
  954. Name = "selector";
  955. BackgroundColor3 = Color3.fromRGB(53, 53, 53);
  956. BorderSizePixel = 0;
  957. Size = UDim2.new(1, 0, 0, 5);
  958. Text = "";
  959. ZIndex = 2;
  960. });
  961. });
  962. });
  963. library:Create("Frame", {
  964. Name = "color";
  965. BackgroundColor3 = defaultColor;
  966. BorderSizePixel = 0;
  967. Position = UDim2.new(0, 1, 0, 1);
  968. Size = UDim2.new(0, 14, 0, 14);
  969. });
  970. });
  971. });
  972.  
  973.  
  974. local colorData = {
  975. H = 1;
  976. S = 1;
  977. V = 1;
  978. };
  979.  
  980. local Connection1;
  981. local Connection2;
  982.  
  983. local function getXY(frame)
  984. local x, y = Mouse.X - frame.AbsolutePosition.X, Mouse.Y - frame.AbsolutePosition.Y;
  985. local maxX, maxY = frame.AbsoluteSize.X,frame.AbsoluteSize.Y;
  986. x = math.clamp(x, 0, maxX);
  987. y = math.clamp(y, 0, maxY);
  988. return x / maxX, y / maxY;
  989. end;
  990.  
  991. local function Update()
  992. local Color = Color3.fromHSV(colorData.H, colorData.S, colorData.V);
  993. holder.colorpicker.color.BackgroundColor3 = Color;
  994. holder.colorpicker.colorframe.satval.BackgroundColor3 = Color3.fromHSV(colorData.H, 1, 1);
  995. callback(Color);
  996. end;
  997.  
  998. holder.colorpicker.MouseButton1Click:Connect(function()
  999. toggle = not toggle;
  1000. holder.colorpicker.colorframe.Visible = toggle;
  1001. end);
  1002.  
  1003. UserInputService.InputEnded:Connect(function(i)
  1004. if i.UserInputType == Enum.UserInputType.MouseButton1 then
  1005. if(Connection1) then
  1006. Connection1:Disconnect();
  1007. Connection1 = nil;
  1008. end;
  1009. if(Connection2) then
  1010. Connection2:Disconnect();
  1011. Connection2 = nil;
  1012. end;
  1013. isFocused = false;
  1014. end;
  1015. end);
  1016.  
  1017. holder.colorpicker.colorframe.rainbow.MouseButton1Click:Connect(function()
  1018. rainbowToggle = not rainbowToggle;
  1019. holder.colorpicker.colorframe.rainbow.label.Text = rainbowToggle and "Rainbow: ON" or "Rainbow: OFF";
  1020.  
  1021. if(rainbowToggle) then
  1022. repeat
  1023. library:Tween(holder.colorpicker.colorframe.hue.selector, {time = 0.1, Position = UDim2.new(0, 0, library.rainbowI, 0)});
  1024. holder.colorpicker.colorframe.satval.BackgroundColor3 = Color3.fromHSV(1 - library.rainbowI, 1, 1);
  1025. holder.colorpicker.color.BackgroundColor3 = library.rainbowVal;
  1026. callback(library.rainbowVal);
  1027. RunService.Heartbeat:Wait();
  1028. until not rainbowToggle;
  1029. end;
  1030. end);
  1031.  
  1032. holder.colorpicker.colorframe.satval.InputBegan:Connect(function(i)
  1033. if i.UserInputType == Enum.UserInputType.MouseButton1 then
  1034. if(Connection1) then
  1035. Connection1:Disconnect();
  1036. end;
  1037. Connection1 = RunService.Heartbeat:Connect(function()
  1038. local X, Y = getXY(holder.colorpicker.colorframe.satval);
  1039.  
  1040. holder.colorpicker.colorframe.satval.picker.Position = UDim2.new(X, 0, Y, 0);
  1041. colorData.S = X;
  1042. colorData.V = 1 - Y;
  1043. Update();
  1044. end);
  1045. end;
  1046. end);
  1047.  
  1048. local eeeee = true
  1049. local oldPos = main.Position;
  1050.  
  1051. game:GetService('UserInputService').InputBegan:connect(function(key)
  1052. if key.KeyCode == Enum.KeyCode.LeftControl then
  1053. eeeee = not eeeee;
  1054. if not eeeee then
  1055. oldPos = main.Position
  1056. end
  1057. local pos = (eeeee and oldPos or UDim2.new(-1, 0, 2,0))
  1058. main:TweenPosition(pos, (eeeee and 'Out' or 'In'), 'Quad', 0.5, true)
  1059. wait();
  1060. end
  1061. end)
  1062.  
  1063. holder.colorpicker.colorframe.hue.InputBegan:Connect(function(i)
  1064. if i.UserInputType == Enum.UserInputType.MouseButton1 then
  1065. if(Connection2) then
  1066. Connection2:Disconnect();
  1067. end;
  1068.  
  1069. Connection2 = RunService.Heartbeat:Connect(function()
  1070. local X, Y = getXY(holder.colorpicker.colorframe.hue);
  1071.  
  1072. colorData.H = 1 - Y;
  1073. holder.colorpicker.colorframe.hue.selector.Position = UDim2.new(0, 0, Y, 0);
  1074. Update();
  1075. end);
  1076. end;
  1077. end);
  1078. end;
  1079.  
  1080. return section;
  1081. end;
  1082. end;
  1083.  
  1084. return library;
  1085. end;
Advertisement
Add Comment
Please, Sign In to add comment