Parellel_X

Showerlib

Jul 16th, 2020
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.68 KB | None | 0 0
  1. --[[
  2. Documentation:
  3. -> CreateWindow(<string> Text)
  4. -> Window:AddToggle(<string> Text, <function> CallBack)
  5. -> Window:AddLabel(<string> Text)
  6. -> Window:AddButton(<string> Text, <function> CallBack)
  7. -> Window:AddBox(<string> Text, <function> CallBack)
  8. -> Window:AddSlider(<string> Text, <int> Min, <int> Max,<int> Position, <function> CallBack)
  9. -> Window:AddKeyBind(<string> Text, <int> Keycode, <function> CallBack)
  10. -> Window:AddDropDown(<string> DropDownName, <string> SelectedObject, <table> Objects, <function> CallBack)
  11. ]]
  12.  
  13.  
  14. local ShowerLib = {WindowCount = 0;GUIs = {};Defaults = {TextColor = Color3.fromRGB(255, 255, 255);Highlight = Color3.fromRGB(0, 255, 140);GUITopColor = Color3.fromRGB(50, 50, 50);GUIBgColor = Color3.fromRGB(40, 40, 40);}}
  15.  
  16. function ShowerLib:Create(InstanceClass, Properties)
  17. assert(InstanceClass, "Instance class must be specified")
  18. assert(Properties, "Properties must be specified")
  19. local Inst = Instance.new(InstanceClass)
  20. for k, v in pairs(Properties) do
  21. if k ~= "Parent" then Inst[k] = v end
  22. end
  23. Inst.Parent = Properties.Parent
  24. return Inst
  25. end
  26.  
  27.  
  28.  
  29. function ShowerLib:CreateWindow(Name)
  30.  
  31. self.WindowCount = self.WindowCount + 1;
  32. assert(Name, "stupid nigga")
  33. local GUI = {Enabled = false;Items = 0; Toggles = {}; Objects = {Toggles = {};Buttons = {};};}
  34.  
  35.  
  36. self.WindowCore = self.WindowCore or self:Create("ScreenGui", {
  37. Name = "nigga";
  38. Parent = game:GetService("CoreGui")
  39. });
  40.  
  41. GUI.Main = self:Create("ImageLabel", {
  42. Name = "nigga";
  43. Active = true;
  44. Draggable = true;
  45. Parent = self.WindowCore;
  46. BackgroundColor3 = Color3.fromRGB(31, 31, 31);
  47. Position = UDim2.new(0, (15 + ((215 * self.WindowCount) - 200)), 0, 15);
  48. Size = UDim2.new(0, 200, 0, 25);
  49. ScaleType = Enum.ScaleType.Slice;
  50. SliceScale = 0.04;
  51. SliceCenter = Rect.new(100, 100, 100, 100);
  52. ImageColor3 = Color3.fromRGB(31, 31, 31);
  53. BorderSizePixel = 0;
  54. });
  55. self:Create("Frame", {
  56. Name = "nigga";
  57. Parent = GUI.Main;
  58. Size = UDim2.new(1, 0, 0, 8);
  59. Position = UDim2.new(0, 0, 1, -8);
  60. BackgroundColor3 = Color3.fromRGB(31, 31, 31);
  61. BorderSizePixel = 0;
  62. })
  63. GUI.Background = self:Create("Frame", {
  64. Name = 'Container'..self.WindowCount;
  65. Parent = GUI.Main,
  66. BorderSizePixel = 0;
  67. BackgroundColor3 = Color3.fromRGB(23, 23, 23);
  68. Position = UDim2.new(0, 0, 1, 0),
  69. Size = UDim2.new(1, 0, 0, 25),
  70. ClipsDescendants = true;
  71. });
  72. self:Create("Frame", {
  73. Name = "nigga";
  74. Parent = GUI.Background;
  75. Size = UDim2.new(1, 0, 0, 8);
  76. BackgroundColor3 = Color3.fromRGB(23, 23, 23);
  77. BorderSizePixel = 0;
  78. });
  79. GUI.Container = self:Create("Frame", {
  80. Name ="nigga";
  81. Parent = GUI.Background;
  82. Size = UDim2.new(1, 0, 1, 0);
  83. BackgroundTransparency = 1;
  84. ClipsDescendants = true;
  85. });
  86. GUI.Sorter = self:Create("UIListLayout", {
  87. Name = "nigga";
  88. Parent = GUI.Container;
  89. Padding = UDim.new(0, 5);
  90. SortOrder = Enum.SortOrder.LayoutOrder;
  91. });
  92. GUI.Padding = self:Create("UIPadding", {
  93. Name = "nigga";
  94. Parent = GUI.Container;
  95. PaddingLeft = UDim.new(0, 10);
  96. PaddingTop = UDim.new(0, 5);
  97. });
  98. local State = self:Create("TextButton", {
  99. Name = "nigga";
  100. Parent = GUI.Main;
  101. AnchorPoint = Vector2.new(0, 0.5);
  102. BackgroundTransparency = 1;
  103. BorderSizePixel = 0;
  104. Position = UDim2.new(1, -30, 0.5, 0);
  105. Size = UDim2.new(0, 30, 0, 30);
  106. TextColor3 = Color3.new(255,255,255);
  107. Text = "+";
  108. Font = Enum.Font.GothamSemibold;
  109. TextSize = 17;
  110. });
  111. State.MouseButton1Click:Connect(function()
  112. GUI.Enabled = not GUI.Enabled
  113. if GUI.Enabled then
  114. GUI:Resize(true, UDim2.new(1, 0, 0, 0))
  115. game:GetService("TweenService"):Create(State, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {Rotation = -150}):Play()
  116. wait(0.2)
  117. game:GetService("TweenService"):Create(State, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {Rotation = 0}):Play()
  118. State.Text = "x"
  119. else
  120. GUI:Resize(true)
  121. game:GetService("TweenService"):Create(State, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {Rotation = -150}):Play()
  122. wait(0.2)
  123. game:GetService("TweenService"):Create(State, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {Rotation = 0}):Play()
  124. State.Text = "+"
  125. end
  126. end)
  127.  
  128. self:Create("TextLabel", {
  129. Name = "nigga";
  130. Parent = GUI.Main;
  131. BackgroundTransparency = 1;
  132. Size = UDim2.new(1, 0, 1, 0);
  133. Font = Enum.Font.GothamSemibold;
  134. TextColor3 = Color3.new(1, 1, 1);
  135. TextSize = 14;
  136. TextXAlignment = Enum.TextXAlignment.Left;
  137. Text =" "..Name;
  138. });
  139.  
  140.  
  141. local function GetSize()
  142. local YSize = 0
  143. local ObjCount = 0
  144. for k, v in pairs(GUI.Container:GetChildren()) do
  145. if (not v:IsA("UIListLayout")) and (not v:IsA("UIPadding")) then
  146. YSize = YSize + v.AbsoluteSize.Y
  147. ObjCount = ObjCount + 1
  148. end
  149. end
  150. YSize = YSize + (5 * ObjCount)
  151. return UDim2.new(1, 0, 0, YSize + 10)
  152. end
  153.  
  154.  
  155. function GUI:Resize(Tween, Change)
  156. local Size = Change or GetSize()
  157. self.Background.ClipsDescendants = true;
  158. if Tween then
  159. self.Background:TweenSize(Size, Enum.EasingDirection.Out, Enum.EasingStyle.Sine, 0.2, true)
  160. else
  161. self.Background.Size = Size
  162. end
  163. end
  164.  
  165. function GUI:AddToggle(Text, Callback)
  166. assert(Text,"stupid nigger")
  167. self.Items = self.Items + 1
  168. Callback = Callback or function() end
  169. local Label = ShowerLib:Create("TextLabel", {
  170. Name = Text;
  171. Parent = self.Container;
  172. BackgroundTransparency = 1;
  173. Size = UDim2.new(1, -10, 0, 25);
  174. Font = Enum.Font.Gotham;
  175. TextSize = 13;
  176. TextColor3 = Color3.fromRGB(179,179,179);
  177. TextXAlignment = Enum.TextXAlignment.Left;
  178. Text = Text;
  179. LayoutOrder = self.Items;
  180. });
  181.  
  182.  
  183. local ToggleButton = ShowerLib:Create("TextButton", {
  184. Name = "nigga";
  185. Parent = Label;
  186. Size = UDim2.new(0, 20, 0.8, 0);
  187. BorderSizePixel = 0;
  188. Position = UDim2.new(1, -17, 0.1, 0);
  189. BackgroundColor3 = Color3.fromRGB(255, 67, 92);
  190. Font = Enum.Font.SourceSans;
  191. Text = "";
  192. TextColor3 = Color3.fromRGB(0, 0, 0);
  193. TextSize = 14.000;
  194. ClipsDescendants = true;
  195. LayoutOrder = self.Items;
  196. });
  197.  
  198. ToggleButton.MouseButton1Click:Connect(function()
  199. self.Toggles[Text] = (not self.Toggles[Text])
  200. spawn(function()
  201. if self.Toggles[Text] then
  202. game:GetService("TweenService"):Create(ToggleButton, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {BackgroundColor3 = (Color3.fromRGB(0, 255, 127))}):Play()
  203. else
  204. game:GetService("TweenService"):Create(ToggleButton, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {BackgroundColor3 = (Color3.fromRGB(255, 67, 92))}):Play()
  205. end
  206. end)
  207. Callback(self.Toggles[Text])
  208. end)
  209.  
  210. self:Resize()
  211. table.insert(self.Objects.Toggles, ToggleButton)
  212. return ToggleButton
  213. end
  214.  
  215. function GUI:AddBox(Text, Callback)
  216. assert(Text, "stupid nigger")
  217. self.Items = self.Items + 1
  218. Callback = Callback or function() end
  219.  
  220. local Box = ShowerLib:Create("TextBox", {
  221. Name = "Box";
  222. Parent = self.Container;
  223. BorderSizePixel = 0;
  224. Size = UDim2.new(1, -5, 0, 27);
  225. Font = Enum.Font.GothamSemibold;
  226. TextSize = 13;
  227. TextWrapped = true;
  228. BackgroundColor3 = Color3.fromRGB(40, 40, 40);
  229. TextColor3 = Color3.fromRGB(255, 255, 255);
  230. PlaceholderColor3 = Color3.fromRGB(179,179,179);
  231. PlaceholderText = Text;
  232. Text = "";
  233. LayoutOrder = self.Items;
  234. })
  235.  
  236. Box.FocusLost:Connect(function(EnterPressed)
  237. if not EnterPressed then return end
  238. Callback(Box.Text)
  239. Box.Text = ""
  240. end)
  241.  
  242. self:Resize()
  243.  
  244. return Box
  245. end
  246.  
  247. function GUI:AddButton(Text, Callback)
  248. assert(Text, "stupid nigger")
  249. self.Items = self.Items + 1
  250. Callback = Callback or function() end
  251.  
  252. local Button = ShowerLib:Create("TextButton", {
  253. Name = Text;
  254. Parent = self.Container;
  255. Size = UDim2.new(1, -7, 0, 20);
  256. Font = Enum.Font.Gotham;
  257. TextSize = 14;
  258. BackgroundColor3 = Color3.fromRGB(27, 27, 27);
  259. BorderSizePixel = 0;
  260. TextColor3 = Color3.fromRGB(179,179,179);
  261. TextXAlignment = Enum.TextXAlignment.Center;
  262. Text = Text;
  263. LayoutOrder = self.Items;
  264. });
  265.  
  266. Button.MouseButton1Click:Connect(Callback)
  267. self:Resize()
  268. table.insert(self.Objects.Buttons, Img)
  269. return Button
  270. end
  271.  
  272. function GUI:AddSlider(Text, min, max, startPoint, callback)
  273. assert(Text, "stupid nigger")
  274. assert(min, "stupid nigger")
  275. assert(max, "stupid nigger")
  276. assert(startPoint, "stupid nigger")
  277. assert(callback, "stupid nigger")
  278. self.Items = self.Items + 1
  279. local dragging = false;
  280.  
  281. local label = ShowerLib:Create("TextLabel", {
  282.  
  283. Name = Text;
  284. Parent = self.Container;
  285. BackgroundTransparency = 1;
  286. Size = UDim2.new(1, -10, 0, 25);
  287. Font = Enum.Font.Gotham;
  288. TextSize = 13;
  289. TextColor3 = Color3.fromRGB(179,179,179);
  290. TextXAlignment = Enum.TextXAlignment.Left;
  291. Text = Text;
  292. LayoutOrder = self.Items;
  293.  
  294. });
  295.  
  296. local sliderFrame = ShowerLib:Create("ImageLabel", {
  297. Parent = label;
  298. BackgroundTransparency = 1;
  299. Position = UDim2.new(1, -65, 0.5, -3);
  300. Size = UDim2.new(0, 70, 0, 6);
  301. Image = "rbxassetid://3570695787";
  302. ImageColor3 = Color3.fromRGB(75, 75, 75);
  303. ScaleType = "Slice";
  304. SliceCenter = Rect.new(100, 100, 100, 100);
  305. });
  306.  
  307. local slidingFrame = ShowerLib:Create("ImageLabel", {
  308. Parent = sliderFrame;
  309. BackgroundTransparency = 1;
  310. Position = UDim2.new((startPoint or 0)/max, -6, 0.5, -5);
  311. Size = UDim2.new(0, 10, 0, 10);
  312. Image = "rbxassetid://3570695787";
  313. ScaleType = "Slice";
  314. SliceCenter = Rect.new(100, 100, 100, 100);
  315. ImageColor3 = Color3.fromRGB(255, 255, 255);
  316. });
  317.  
  318. local val = Instance.new("TextLabel", sliderFrame)
  319. val.BackgroundTransparency = 1
  320. val.Position = UDim2.new(0, 0, 1, 1)
  321. val.Size = UDim2.new(1, 0, 0, 10)
  322. val.Font = "GothamSemibold"
  323. val.TextColor3 = Color3.new(1, 1, 1)
  324. val.TextScaled = true
  325. val.TextTransparency = 1
  326. val.Text = tostring(startPoint and math.floor((startPoint / max) * (max - min) + min) or 0).."/"..tostring(max)
  327.  
  328. self:Resize()
  329.  
  330. local function move(input)
  331. local pos = UDim2.new(math.clamp((input.Position.X - sliderFrame.AbsolutePosition.X) / sliderFrame.AbsoluteSize.X, 0, 1), -6, 0.5, -5)
  332. slidingFrame:TweenPosition(pos, "Out", "Sine", 0.1, true);
  333. local value = math.floor(((pos.X.Scale * max) / max) * (max - min) + min)
  334. val.Text = tostring(value).."/"..tostring(max);
  335. callback(value)
  336. end
  337.  
  338. slidingFrame.InputBegan:Connect(function(input)
  339. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  340. dragging = true;
  341. local b = game:GetService("TweenService"):Create(val, TweenInfo.new(0.2), {TextTransparency = 0})
  342. b:Play()
  343. end
  344. end)
  345. slidingFrame.InputEnded:Connect(function(input)
  346. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  347. dragging = false;
  348. wait(1)
  349. local b = game:GetService("TweenService"):Create(val, TweenInfo.new(0.2), {TextTransparency = 1})
  350. b:Play()
  351. end
  352. end)
  353.  
  354. game:GetService("UserInputService").InputChanged:Connect(function(input)
  355. if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
  356. move(input)
  357. end
  358. end)
  359.  
  360. return label
  361. -----------------------
  362. end
  363.  
  364. function GUI:AddLabel(Text)
  365. assert(Text, "stupid nigger")
  366. self.Items = self.Items + 1
  367. local Label = ShowerLib:Create("TextLabel", {
  368. Parent = self.Container;
  369. Name = Text;
  370. BackgroundTransparency = 1;
  371. BorderSizePixel = 0;
  372. TextXAlignment = Enum.TextXAlignment.Left;
  373. Size = UDim2.new(1, -10, 0, 15);
  374. LayoutOrder = self.Items;
  375. Font = Enum.Font.Gotham;
  376. TextSize = 12;
  377. Text = Text;
  378. TextColor3 = Color3.fromRGB(179,179,179);
  379. })
  380. self:Resize()
  381. return Label
  382. end
  383.  
  384. function GUI:AddKeyBind(Text, Default, Callback)
  385. assert(Text,"stupid nigger tx")
  386. assert(Default,"stupid nigger Default")
  387. assert(Callback,"stupid nigger Callback")
  388. local Identify
  389. repeat
  390. wait()
  391. Identify = math.random(0,999999999)
  392. until shared["KeyBindName"..tostring(Identify)] == nil
  393. self.Items = self.Items + 1
  394. Callback = Callback or function() end
  395. local Label = ShowerLib:Create("TextLabel", {
  396. Name = Text;
  397. Parent = self.Container;
  398. BackgroundTransparency = 1;
  399. Size = UDim2.new(1, -10, 0, 25);
  400. Font = Enum.Font.Gotham;
  401. TextSize = 13;
  402. TextColor3 = Color3.fromRGB(179,179,179);
  403. TextXAlignment = Enum.TextXAlignment.Left;
  404. Text = Text;
  405. LayoutOrder = self.Items;
  406. });
  407. local TextButton = ShowerLib:Create("TextButton", {
  408. Name = "nigga";
  409. Parent = Label;
  410. Size = UDim2.new(0, 35, 0.8, 0);
  411. BorderSizePixel = 0;
  412. Position = UDim2.new(1, -32, 0.1, 0);
  413. BackgroundColor3 = Color3.fromRGB(27,27,27);
  414. Font = Enum.Font.SourceSans;
  415. Text = Default.Name;
  416. TextColor3 = Color3.fromRGB(179,179,179);
  417. TextSize = 12;
  418. ClipsDescendants = true;
  419. LayoutOrder = self.Items;
  420. });
  421. shared["KeyBindName"..tostring(Identify)] = Default.Name
  422. TextButton.MouseButton1Click:connect(function(e)
  423. TextButton.Text = "..."
  424. local a, b = game:GetService('UserInputService').InputBegan:wait();
  425. if a.KeyCode.Name ~= "Unknown" then
  426. TextButton.Text = a.KeyCode.Name
  427. shared["KeyBindName"..tostring(Identify)] = a.KeyCode.Name
  428. end
  429. end)
  430. game:GetService("UserInputService").InputBegan:connect(function(Nigger1, Nigger)
  431. if not Nigger then
  432. if Nigger1.KeyCode.Name == shared["KeyBindName"..tostring(Identify)] then
  433. Callback()
  434. end
  435. end
  436. end)
  437. self:Resize()
  438. return TextButton
  439.  
  440. end
  441.  
  442.  
  443.  
  444.  
  445. function GUI:AddDropDown(DropdownName, Default, Objects, Callback)
  446. assert(DropdownName, "stupid nigger")
  447. assert(Objects, "stupid nigger")
  448.  
  449.  
  450. local WindowCount = tostring(self.Container.Parent)
  451.  
  452. local CurrentWindow = WindowCount:gsub("Container", "")
  453. WindowCount = WindowCount:gsub("Container", "")
  454. local Main = ShowerLib:Create("ImageLabel", {
  455.  
  456. Visible = false;
  457. Name = "nigga";
  458. Active = true;
  459. Parent = self.Container.Parent.Parent.Parent;
  460. BackgroundColor3 = Color3.fromRGB(31, 31, 31);
  461. Position = UDim2.new(0, (15 + ((215 * WindowCount) - 200)), 0, self.Container.Parent.Parent.Position.Y.Offset + ( 55 + self.Container.Parent.Size.Y.Offset));
  462. Size = UDim2.new(0, 200, 0, 25);
  463. ScaleType = Enum.ScaleType.Slice;
  464. SliceScale = 0.04;
  465. SliceCenter = Rect.new(100, 100, 100, 100);
  466. ImageColor3 = Color3.fromRGB(31, 31, 31);
  467. BorderSizePixel = 0;
  468. });
  469.  
  470. ShowerLib:Create("Frame", {
  471. Name = "nigga";
  472. Parent = Main;
  473. Size = UDim2.new(1, 0, 0, 8);
  474. Position = UDim2.new(0, 0, 1, -8);
  475. BackgroundColor3 = Color3.fromRGB(31, 31, 31);
  476. BorderSizePixel = 0;
  477. })
  478.  
  479. local Background = ShowerLib:Create("Frame", {
  480. Name = 'Container';
  481. Parent = Main,
  482. BorderSizePixel = 0;
  483. BackgroundColor3 = Color3.fromRGB(23, 23, 23);
  484. Position = UDim2.new(0, 0, 1, 0),
  485. Size = UDim2.new(1, 0, 0, 25),
  486. ClipsDescendants = true;
  487. });
  488. ShowerLib:Create("Frame", {
  489. Name = "nigga";
  490. Parent = Background;
  491. Size = UDim2.new(1, 0, 0, 8);
  492. BackgroundColor3 = Color3.fromRGB(23, 23, 23);
  493. BorderSizePixel = 0;
  494. });
  495. local Container = ShowerLib:Create("Frame", {
  496. Name ="nigga";
  497. Parent = Background;
  498. Size = UDim2.new(1, 0, 1, 0);
  499. BackgroundTransparency = 1;
  500. ClipsDescendants = true;
  501. });
  502. local Sorter = ShowerLib:Create("UIListLayout", {
  503. Name = "nigga";
  504. Parent = Container;
  505. Padding = UDim.new(0, 5);
  506. SortOrder = Enum.SortOrder.LayoutOrder;
  507. });
  508. local Padding = ShowerLib:Create("UIPadding", {
  509. Name = "nigga";
  510. Parent = Container;
  511. PaddingLeft = UDim.new(0, 10);
  512. PaddingTop = UDim.new(0, 5);
  513. });
  514.  
  515. ShowerLib:Create("TextLabel", {
  516. Name = "nigga";
  517. Parent = Main;
  518. BackgroundTransparency = 1;
  519. Size = UDim2.new(1, 0, 1, 0);
  520. Font = Enum.Font.GothamSemibold;
  521. TextColor3 = Color3.new(1, 1, 1);
  522. TextSize = 14;
  523. TextXAlignment = Enum.TextXAlignment.Left;
  524. Text =" "..DropdownName;
  525. });
  526.  
  527. local Button
  528.  
  529. local function GetPerfectSize()
  530. local YSize = 0
  531. local ObjCount = 0
  532. for k, v in pairs(Container:GetChildren()) do
  533. if (not v:IsA("UIListLayout")) and (not v:IsA("UIPadding")) then
  534. YSize = YSize + v.AbsoluteSize.Y
  535. ObjCount = ObjCount + 1
  536. end
  537. end
  538. YSize = YSize + (5 * ObjCount)
  539. return UDim2.new(1, 0, 0, YSize + 10)
  540. end
  541.  
  542. for i,v in pairs(Objects) do
  543. local DropDownButton = ShowerLib:Create("TextButton", {
  544. Name = Text;
  545. Parent = Container;
  546. Size = UDim2.new(1, -7, 0, 15);
  547. Font = Enum.Font.Gotham;
  548. TextSize = 12;
  549. BackgroundColor3 = Color3.fromRGB(27, 27, 27);
  550. BorderSizePixel = 0;
  551. TextColor3 = Color3.fromRGB(179,179,179);
  552. TextXAlignment = Enum.TextXAlignment.Center;
  553. Text = tostring(v);
  554. LayoutOrder = self.Items;
  555. });
  556.  
  557. DropDownButton.MouseButton1Click:Connect(function()
  558. Button.Text = " "..tostring(v)
  559. Main:TweenPosition(UDim2.new(0, (15 + ((215 * WindowCount) - 200)), 0, self.Container.Parent.Parent.Position.Y.Offset + ( 55 + self.Container.Parent.Size.Y.Offset)), "Out", "Sine", 0.1, true);
  560. Main.Visible = false
  561. Callback(v)
  562. end)
  563.  
  564.  
  565. Background.Size = GetPerfectSize()
  566. end
  567.  
  568.  
  569. local Container = ShowerLib:Create("Frame", {
  570. Name = DropdownName;
  571. Parent = self.Container;
  572. Size = UDim2.new(1, -7, 0, 20);
  573. BackgroundColor3 = Color3.fromRGB(27, 27, 27);
  574. BorderSizePixel = 0;
  575. LayoutOrder = self.Items;
  576. });
  577.  
  578. ShowerLib:Create("TextButton", {
  579. Name = DropdownName;
  580. Parent = Container;
  581. Size = UDim2.new(1, -7, 0, 20);
  582. Font = Enum.Font.Gotham;
  583. TextSize = 14;
  584. BackgroundColor3 = Color3.fromRGB(27, 27, 27);
  585. BorderSizePixel = 0;
  586. TextColor3 = Color3.fromRGB(179,179,179);
  587. TextXAlignment = Enum.TextXAlignment.Right;
  588. Text = ">";
  589. AutoButtonColor = false;
  590. });
  591.  
  592. Button = ShowerLib:Create("TextButton", {
  593. Name = DropdownName;
  594. Parent = Container;
  595. Font = Enum.Font.Gotham;
  596. TextSize = 14;
  597.  
  598. Size = UDim2.new(1, -30, 0, 20);
  599. BackgroundColor3 = Color3.fromRGB(27, 27, 27);
  600. BorderSizePixel = 0;
  601. TextColor3 = Color3.fromRGB(179,179,179);
  602. TextXAlignment = Enum.TextXAlignment.Left;
  603. Text = " "..Default;
  604. AutoButtonColor = false;
  605. });
  606. local pos = Main.Position
  607. Button.MouseButton1Click:Connect(function()
  608. if Main.Visible then
  609. Main:TweenPosition(UDim2.new(0, (15 + ((215 * WindowCount) - 200)), 0, self.Container.Parent.Parent.Position.Y.Offset + ( 55 + self.Container.Parent.Size.Y.Offset)), "Out", "Sine", 0.1, true);
  610. Main.Visible = false
  611. else
  612.  
  613. Main:TweenPosition(pos, "Out", "Sine", 0.1, true);
  614. Main.Visible = true
  615. end
  616. end)
  617.  
  618.  
  619. self:Resize()
  620. return Main
  621. end
  622.  
  623.  
  624.  
  625.  
  626. return GUI
  627. end
  628.  
  629.  
  630. return ShowerLib
Add Comment
Please, Sign In to add comment