Nghientapgym

Untitled

Feb 22nd, 2021 (edited)
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.63 KB | None | 0 0
  1. --[[
  2.  
  3. __ ____ __ __ ____ ____
  4. /__\ (_ )( )( )( _ \( ___)
  5. /(__)\ / /_ )(__)( ) / )__)
  6. (__)(__)(____)(______)(_)\_)(____)
  7.  
  8. Remake by egoD
  9.  
  10. ]]--
  11.  
  12. --light theme
  13. local theme = {
  14. Tab_Color = Color3.fromRGB(255, 255, 255),
  15. Tab_Text_Color = Color3.fromRGB(0, 0, 0),
  16. Description_Color = Color3.fromRGB(255, 255, 255),
  17. Description_Text_Color = Color3.fromRGB(0, 0, 0),
  18. Container_Color = Color3.fromRGB(255, 255, 255),
  19. Container_Text_Color = Color3.fromRGB(0, 0, 0),
  20. Button_Text_Color = Color3.fromRGB(0, 0, 0),
  21. Label_Text_Color = Color3.fromRGB(0, 0, 0),
  22. Toggle_Box_Color = Color3.fromRGB(243, 243, 243),
  23. Toggle_Inner_Color = Color3.fromRGB(94, 255, 180),
  24. Toggle_Text_Color = Color3.fromRGB(0, 0, 0),
  25. Toggle_Border_Color = Color3.fromRGB(225, 225, 225),
  26. Slider_Bar_Color = Color3.fromRGB(243, 243, 243),
  27. Slider_Inner_Color = Color3.fromRGB(94, 255, 180),
  28. Slider_Text_Color = Color3.fromRGB(0, 0, 0),
  29. Slider_Border_Color = Color3.fromRGB(255, 255, 255),
  30. Dropdown_Text_Color = Color3.fromRGB(0, 0, 0),
  31. Dropdown_Option_BorderSize = 1,
  32. Dropdown_Option_BorderColor = Color3.fromRGB(235, 235, 235),
  33. Dropdown_Option_Color = Color3.fromRGB(255, 255, 255),
  34. Dropdown_Option_Text_Color = Color3.fromRGB(0, 0, 0),
  35. TextBox_Text_Color = Color3.fromRGB(0, 0, 0),
  36. TextBox_Color = Color3.fromRGB(255, 255, 255),
  37. TextBox_Underline_Color = Color3.fromRGB(94, 255, 180)
  38. }
  39.  
  40. --dark theme
  41. local dark_theme = {
  42. Tab_Color = Color3.fromRGB(31, 32, 33),
  43. Tab_Text_Color = Color3.fromRGB(255, 255, 255),
  44. Description_Color = Color3.fromRGB(31, 32, 33),
  45. Description_Text_Color = Color3.fromRGB(255, 255, 255),
  46. Container_Color = Color3.fromRGB(31, 32, 33),
  47. Container_Text_Color = Color3.fromRGB(255, 255, 255),
  48. Button_Text_Color = Color3.fromRGB(255, 255, 255),
  49. Label_Text_Color = Color3.fromRGB(255, 255, 255),
  50. Toggle_Box_Color = Color3.fromRGB(31, 32, 33),
  51. Toggle_Inner_Color = Color3.fromRGB(255, 92, 92),
  52. Toggle_Text_Color = Color3.fromRGB(255, 255, 255),
  53. Toggle_Border_Color = Color3.fromRGB(50, 49, 50),
  54. Slider_Bar_Color = Color3.fromRGB(31, 32, 33),
  55. Slider_Inner_Color = Color3.fromRGB(255, 92, 92),
  56. Slider_Text_Color = Color3.fromRGB(255, 255, 255),
  57. Slider_Border_Color = Color3.fromRGB(50, 49, 50),
  58. Dropdown_Text_Color = Color3.fromRGB(255, 255, 255),
  59. Dropdown_Option_BorderSize = 1,
  60. Dropdown_Option_BorderColor = Color3.fromRGB(49, 50, 51),
  61. Dropdown_Option_Color = Color3.fromRGB(31, 32, 33),
  62. Dropdown_Option_Text_Color = Color3.fromRGB(255, 255, 255),
  63. TextBox_Text_Color = Color3.fromRGB(255, 255, 255),
  64. TextBox_Color = Color3.fromRGB(31, 32, 33),
  65. TextBox_Underline_Color = Color3.fromRGB(255, 92, 92)
  66. }
  67.  
  68. local destroyed
  69. if game.CoreGui:FindFirstChild('uiui') then
  70. game.CoreGui:FindFirstChild('uiui'):Destroy()
  71. destroyed = true
  72. end
  73.  
  74. local function protect_gui(obj)
  75. if destroyed then
  76. obj.Parent = game.CoreGui
  77. return
  78. end
  79. if syn and syn.protect_gui then
  80. syn.protect_gui(obj)
  81. obj.Parent = game.CoreGui
  82. elseif PROTOSMASHER_LOADED then
  83. obj.Parent = get_hidden_gui()
  84. else
  85. obj.Parent = game.CoreGui
  86. end
  87. end
  88.  
  89. local library = {}
  90. local uiui = Instance.new("ScreenGui")
  91. local background = Instance.new("Frame")
  92. local UIListLayout = Instance.new("UIListLayout")
  93. local UIPadding = Instance.new("UIPadding")
  94.  
  95. local TweenService = game:GetService("TweenService")
  96.  
  97. uiui.Name = "uiui"
  98. uiui.Parent = game:GetService("CoreGui")
  99. uiui.DisplayOrder = 1
  100.  
  101. protect_gui(uiui)
  102.  
  103. background.Name = "background"
  104. background.Parent = uiui
  105. background.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  106. background.BackgroundTransparency = 1.000
  107. background.Size = UDim2.new(0, 1234, 0, 664)
  108.  
  109. UIListLayout.Parent = background
  110. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  111. UIListLayout.Padding = UDim.new(0, 10)
  112.  
  113. UIPadding.Parent = background
  114. UIPadding.PaddingLeft = UDim.new(0, 10)
  115. UIPadding.PaddingTop = UDim.new(0, 10)
  116.  
  117. local keybindConnection
  118. if keybindConnection then
  119. keybindConnection:Disconnect()
  120. end
  121. local uis = game:GetService("UserInputService")
  122. game:GetService("UserInputService").InputBegan:Connect(function(input, gpe)
  123. keybindConnection = uis.InputBegan:Connect(function(input, gp)
  124. if not gp and input.KeyCode == Enum.KeyCode.P then
  125. uiui.Enabled = not uiui.Enabled
  126. end
  127. end)
  128. end)
  129.  
  130. function library:CreateTab(text, desc, mode)
  131. text = text.." Rác" or ""
  132. desc = "Cái hub ngu lồn này đã bị crack bởi CyberH" or ""
  133. mode = mode or false
  134.  
  135. if mode then
  136. theme = dark_theme
  137. elseif mode == nil then
  138. theme = _G.CustomTheme
  139. end
  140. local Tab = Instance.new("ImageButton")
  141. local tabtext = Instance.new("TextLabel")
  142. local description = Instance.new("ImageLabel")
  143. local descriptionText = Instance.new("TextLabel")
  144. local container = Instance.new("ImageLabel")
  145. local MainPadder = Instance.new("UIListLayout")
  146. local MainLiser = Instance.new("UIListLayout")
  147.  
  148. MainPadder.Name = "MainPadder"
  149. MainPadder.Parent = container
  150. MainPadder.SortOrder = Enum.SortOrder.LayoutOrder
  151.  
  152. MainLiser.Name = "MainLiser"
  153. MainLiser.Parent = container
  154. MainLiser.SortOrder = Enum.SortOrder.LayoutOrder
  155.  
  156. local TextBounds =
  157. game:GetService("TextService"):GetTextSize(
  158. desc,
  159. 14,
  160. Enum.Font.SourceSansLight,
  161. Vector2.new(math.huge, math.huge)
  162. )
  163.  
  164. Tab.Name = math.random(1, 15) .. text .. " Tab"
  165. Tab.Parent = background
  166. Tab.ImageColor3 = theme.Tab_Color
  167. Tab.BackgroundTransparency = 1.000
  168. Tab.Size = UDim2.new(0, 155, 0, 30)
  169. Tab.Image = "rbxassetid://3570695787"
  170. Tab.ScaleType = Enum.ScaleType.Slice
  171. Tab.SliceCenter = Rect.new(100, 100, 100, 100)
  172. Tab.SliceScale = 0.030
  173. local HoverEffect = true
  174. local IsOpen = false
  175. Tab.MouseEnter:Connect(
  176. function()
  177. if HoverEffect and IsOpen == false then
  178. TweenService:Create(
  179. description,
  180. TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
  181. {Size = UDim2.new(0, TextBounds.X + 20, 0, 30)}
  182. ):Play()
  183. else
  184. TweenService:Create(
  185. description,
  186. TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
  187. {Size = UDim2.new(0, 0, 0, 30)}
  188. ):Play()
  189. end
  190. end
  191. )
  192. Tab.MouseLeave:Connect(
  193. function()
  194. TweenService:Create(
  195. description,
  196. TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
  197. {Size = UDim2.new(0, 0, 0, 30)}
  198. ):Play()
  199. end
  200. )
  201. tabtext.Name = "tabtext"
  202. tabtext.Parent = Tab
  203. tabtext.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  204. tabtext.BackgroundTransparency = 1.000
  205. tabtext.Size = UDim2.new(0, 155, 0, 30)
  206. tabtext.Font = Enum.Font.SourceSansLight
  207. tabtext.Text = text
  208. tabtext.TextColor3 = theme.Tab_Text_Color
  209. tabtext.TextSize = 16.000
  210.  
  211. description.Name = "description"
  212. description.Parent = Tab
  213. description.ImageColor3 = theme.Description_Color
  214. description.BackgroundTransparency = 1.000
  215. description.BorderSizePixel = 0
  216. description.ClipsDescendants = true
  217. description.Position = UDim2.new(1.04969442, 0, -0.022590382, 0)
  218. description.Size = UDim2.new(0, 0, 0, 30)
  219. description.Image = "rbxassetid://3570695787"
  220. description.ScaleType = Enum.ScaleType.Slice
  221. description.SliceCenter = Rect.new(100, 100, 100, 100)
  222. description.SliceScale = 0.030
  223.  
  224. descriptionText.Name = "descriptionText"
  225. descriptionText.Parent = description
  226. descriptionText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  227. descriptionText.BackgroundTransparency = 1.000
  228. descriptionText.Position = UDim2.new(0, 0, 0.022590382, 0)
  229. descriptionText.Size = UDim2.new(0, TextBounds.X + 20, 0, 30)
  230. descriptionText.Font = Enum.Font.SourceSansLight
  231. descriptionText.Text = desc
  232. descriptionText.TextColor3 = theme.Description_Text_Color
  233. descriptionText.TextSize = 14.000
  234.  
  235. local BodyYSize = 0
  236.  
  237. container.Name = "container"
  238. container.Parent = Tab
  239. container.ImageColor3 = theme.Container_Color
  240. container.BackgroundTransparency = 1.000
  241. container.BorderSizePixel = 0
  242. container.ClipsDescendants = true
  243. container.Position = UDim2.new(1.04969442, 0, -0.022590382, 0)
  244. container.Size = UDim2.new(0, 185, 0, 0)
  245. container.Image = "rbxassetid://3570695787"
  246. container.ScaleType = Enum.ScaleType.Slice
  247. container.SliceCenter = Rect.new(100, 100, 100, 100)
  248. container.SliceScale = 0.030
  249. local HoverEffect = true
  250. Tab.MouseButton1Click:Connect(
  251. function()
  252. for i, v in next, background:GetChildren() do
  253. for i, v in next, v:GetChildren() do
  254. if v.Name == "container" and v.Name ~= Tab.Name then
  255. IsOpen = false
  256. TweenService:Create(
  257. v,
  258. TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),
  259. {Size = UDim2.new(0, 185, 0, 0)}
  260. ):Play()
  261. HoverEffect = false
  262. end
  263. IsOpen = true
  264. TweenService:Create(
  265. container,
  266. TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),
  267. {Size = UDim2.new(0, 185, 0, BodyYSize)}
  268. ):Play()
  269. HoverEffect = true
  270. end
  271. end
  272. if container.Size == UDim2.new(0, 185, 0, BodyYSize) then
  273. IsOpen = false
  274. TweenService:Create(
  275. container,
  276. TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),
  277. {Size = UDim2.new(0, 185, 0, 0)}
  278. ):Play()
  279.  
  280. TweenService:Create(
  281. description,
  282. TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
  283. {Size = UDim2.new(0, TextBounds.X + 20, 0, 30)}
  284. ):Play()
  285. HoverEffect = true
  286. elseif container.Size == UDim2.new(0, 185, 0, 0) then
  287. IsOpen = true
  288. TweenService:Create(
  289. container,
  290. TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),
  291. {Size = UDim2.new(0, 185, 0, BodyYSize)}
  292. ):Play()
  293.  
  294. TweenService:Create(
  295. description,
  296. TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
  297. {Size = UDim2.new(0, 0, 0, 30)}
  298. ):Play()
  299. HoverEffect = false
  300. end
  301. end
  302. )
  303.  
  304. local function resize(value)
  305. BodyYSize = BodyYSize + value
  306. end
  307.  
  308. local s = {}
  309.  
  310. function s:CreateToggle(text, callback)
  311. text = text or ""
  312. callback = callback or function()
  313. end
  314. local Toggle = Instance.new("TextButton")
  315. local ToggleBox = Instance.new("Frame")
  316. local ToggleInner = Instance.new("Frame")
  317. local ToggleText = Instance.new("TextLabel")
  318.  
  319. Toggle.Name = "Toggle"
  320. Toggle.Parent = container
  321. Toggle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  322. Toggle.BackgroundTransparency = 1.000
  323. Toggle.Size = UDim2.new(0, 185, 0, 30)
  324. Toggle.Font = Enum.Font.SourceSans
  325. Toggle.Text = ""
  326. Toggle.TextColor3 = Color3.fromRGB(0, 0, 0)
  327. Toggle.TextSize = 14.000
  328.  
  329. ToggleBox.Name = "ToggleBox"
  330. ToggleBox.Parent = Toggle
  331. ToggleBox.BackgroundColor3 = theme.Toggle_Box_Color
  332. ToggleBox.BorderColor3 = theme.Toggle_Border_Color
  333. ToggleBox.Position = UDim2.new(0.0416216031, 0, 0.166666672, 0)
  334. ToggleBox.Size = UDim2.new(0, 20, 0, 20)
  335.  
  336. ToggleInner.Name = "ToggleInner"
  337. ToggleInner.Parent = Toggle
  338. ToggleInner.AnchorPoint = Vector2.new(0.5, 0.5)
  339. ToggleInner.BackgroundColor3 = theme.Toggle_Inner_Color
  340. ToggleInner.BorderSizePixel = 0
  341. ToggleInner.Position = UDim2.new(0.096, 0, 0.5, 0)
  342.  
  343. ToggleText.Name = "ToggleText"
  344. ToggleText.Parent = Toggle
  345. ToggleText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  346. ToggleText.BackgroundTransparency = 1.000
  347. ToggleText.Position = UDim2.new(0.149729788, 0, 0, 0)
  348. ToggleText.Size = UDim2.new(0, 157, 0, 30)
  349. ToggleText.Font = Enum.Font.SourceSansLight
  350. ToggleText.Text = " " .. text
  351. ToggleText.TextColor3 = theme.Toggle_Text_Color
  352. ToggleText.TextSize = 16.000
  353. ToggleText.TextXAlignment = Enum.TextXAlignment.Left
  354.  
  355. local Toggled = false
  356.  
  357. Toggle.MouseButton1Click:Connect(
  358. function()
  359. Toggled = not Toggled
  360.  
  361. if Toggled then
  362. TweenService:Create(
  363. ToggleInner,
  364. TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  365. {Size = UDim2.new(0, 20, 0, 20)}
  366. ):Play()
  367. elseif not Toggled then
  368. TweenService:Create(
  369. ToggleInner,
  370. TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  371. {Size = UDim2.new(0, 0, 0, 0)}
  372. ):Play()
  373. end
  374.  
  375. callback(Toggled)
  376. end
  377. )
  378.  
  379.  
  380. local aa = {}
  381.  
  382. function aa:Set(bool)
  383. if bool then
  384. Toggled = true
  385. TweenService:Create(
  386. ToggleInner,
  387. TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  388. {Size = UDim2.new(0, 20, 0, 20)}
  389. ):Play()
  390. else
  391. Toggled = false
  392. TweenService:Create(
  393. ToggleInner,
  394. TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  395. {Size = UDim2.new(0, 0, 0, 0)}
  396. ):Play()
  397. end
  398. end
  399.  
  400. resize(30)
  401.  
  402. return aa;
  403. end
  404. function s:CreateSlider(text, minvalue, maxvalue, callback)
  405. text = text or ""
  406. callback = callback or function()
  407. end
  408. minvalue = minvalue or 0
  409. maxvalue = maxvalue or 0
  410. local Slider = Instance.new("TextButton")
  411. local SliderText = Instance.new("TextLabel")
  412. local Slider_2 = Instance.new("Frame")
  413. local SliderInner = Instance.new("Frame")
  414.  
  415. Slider.Name = "Slider"
  416. Slider.Parent = container
  417. Slider.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  418. Slider.BackgroundTransparency = 1.000
  419. Slider.Position = UDim2.new(0, 0, 0.410958916, 0)
  420. Slider.Size = UDim2.new(0, 185, 0, 45)
  421. Slider.Font = Enum.Font.SourceSans
  422. Slider.Text = ""
  423. Slider.TextColor3 = Color3.fromRGB(0, 0, 0)
  424. Slider.TextSize = 14.000
  425.  
  426. SliderText.Name = "SliderText"
  427. SliderText.Parent = Slider
  428. SliderText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  429. SliderText.BackgroundTransparency = 1.000
  430. SliderText.Position = UDim2.new(0.0362162739, 0, -0.0666666701, 0)
  431. SliderText.Size = UDim2.new(0, 157, 0, 30)
  432. SliderText.Font = Enum.Font.SourceSansLight
  433. SliderText.Text = text .. " / " .. minvalue
  434. SliderText.TextColor3 = theme.Slider_Text_Color
  435. SliderText.TextSize = 16.000
  436. SliderText.TextXAlignment = Enum.TextXAlignment.Left
  437.  
  438. Slider_2.Name = "Slider"
  439. Slider_2.Parent = Slider
  440. Slider_2.BackgroundColor3 = theme.Slider_Bar_Color
  441. Slider_2.BorderColor3 = theme.Slider_Border_Color
  442. Slider_2.Position = UDim2.new(0.0319999084, 0, 0.588888884, 0)
  443. Slider_2.Size = UDim2.new(0, 172, 0, 9)
  444. SliderInner.Name = "SliderInner"
  445. SliderInner.Parent = Slider_2
  446. SliderInner.BackgroundColor3 = theme.Slider_Inner_Color
  447. SliderInner.BorderSizePixel = 0
  448. SliderInner.Position = UDim2.new(0, 0, 0.055555556, 0)
  449. SliderInner.Size = UDim2.new(0, 0, 0, 9)
  450.  
  451. local mouse = game.Players.LocalPlayer:GetMouse()
  452. local uis = game:GetService("UserInputService")
  453. local Value
  454. local down = false
  455.  
  456. Slider.MouseButton1Down:Connect(function()
  457. down = true
  458. Value = math.floor((((tonumber(maxvalue) - tonumber(minvalue)) / 172) * SliderInner.AbsoluteSize.X) +tonumber(minvalue)) or 0
  459. SliderText.Text = text .. " / " .. Value
  460. pcall(callback, Value)
  461. SliderInner:TweenSize(UDim2.new(0, math.clamp(mouse.X - SliderInner.AbsolutePosition.X, 0, 172), 0, 9), Enum.EasingDirection.InOut, Enum.EasingStyle.Linear, .07)
  462. while game:GetService("RunService").RenderStepped:wait() and down do
  463. Value = math.floor((((tonumber(maxvalue) - tonumber(minvalue)) / 172) * SliderInner.AbsoluteSize.X) +tonumber(minvalue)) or 0
  464. SliderText.Text = text .. " / " .. Value
  465. pcall(callback, Value)
  466. SliderInner:TweenSize(UDim2.new(0, math.clamp(mouse.X - SliderInner.AbsolutePosition.X, 0, 172), 0, 9), Enum.EasingDirection.InOut, Enum.EasingStyle.Linear, .07)
  467. end
  468. end)
  469.  
  470. uis.InputEnded:connect(function(key)
  471. if key.UserInputType == Enum.UserInputType.MouseButton1 and down then
  472. down = false
  473. Value = math.floor((((tonumber(maxvalue) - tonumber(minvalue)) / 172) * SliderInner.AbsoluteSize.X) +tonumber(minvalue)) or 0
  474. SliderText.Text = text .. " / " .. Value
  475. pcall(callback, Value)
  476. SliderInner:TweenSize(UDim2.new(0, math.clamp(mouse.X - SliderInner.AbsolutePosition.X, 0, 172), 0, 9), Enum.EasingDirection.InOut, Enum.EasingStyle.Linear, 0.1)
  477. end
  478. end)
  479.  
  480. local ss = {}
  481.  
  482. function ss:Set(SliderAmount)
  483. SliderAmount = tonumber(SliderAmount) or 0
  484. SliderAmount = (((SliderAmount >= 0 and SliderAmount <= 100) and SliderAmount) / 100)
  485. TweenService:Create(
  486. SliderInner,
  487. TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  488. {Size = UDim2.new(SliderAmount or 0, 0, 0, 9)}
  489. ):Play()
  490. local p = math.floor((SliderAmount or 0) * 100)
  491.  
  492. local difference = maxvalue - minvalue
  493.  
  494. local Value = math.floor(((difference / 100) * p) + minvalue)
  495.  
  496. SliderText.Text = text .. " / " .. Value
  497. pcall(callback, Value)
  498. end
  499.  
  500.  
  501. resize(45)
  502.  
  503. return ss
  504. end
  505. function s:CreateDropDown(text, list, callback)
  506. callback = callback or function() end
  507. text = text or ""
  508. list = list or {}
  509. resize(30)
  510. local IsDropped = false
  511. local DropYSize = 0
  512.  
  513. local DropdownButton = Instance.new("TextButton")
  514. local DropdownText = Instance.new("TextLabel")
  515. local DropdownOpen = Instance.new("TextButton")
  516. local UIListLayout_2 = Instance.new("UIListLayout")
  517. local Dropdown = Instance.new("Frame")
  518.  
  519. Dropdown.Name = "Dropdown"
  520. Dropdown.Parent = container
  521. Dropdown.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  522. Dropdown.BackgroundTransparency = 1.000
  523. Dropdown.ClipsDescendants = true
  524. Dropdown.Position = UDim2.new(0, 0, 0.205479458, 0)
  525. Dropdown.Size = UDim2.new(0, 184, 0, 30)
  526.  
  527. DropdownButton.Name = "DropdownButton"
  528. DropdownButton.Parent = Dropdown
  529. DropdownButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  530. DropdownButton.BackgroundTransparency = 1.000
  531. DropdownButton.Size = UDim2.new(0, 185, 0, 30)
  532. DropdownButton.Font = Enum.Font.SourceSans
  533. DropdownButton.Text = ""
  534. DropdownButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  535. DropdownButton.TextSize = 17.000
  536.  
  537. DropdownText.Name = "DropdownText"
  538. DropdownText.Parent = DropdownButton
  539. DropdownText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  540. DropdownText.BackgroundTransparency = 1.000
  541. DropdownText.Size = UDim2.new(0, 155, 0, 30)
  542. DropdownText.Font = Enum.Font.SourceSansLight
  543. DropdownText.Text = " " .. text .. " / " .. ""
  544. DropdownText.TextColor3 = theme.Dropdown_Text_Color
  545. DropdownText.TextSize = 16.000
  546. DropdownText.TextXAlignment = Enum.TextXAlignment.Left
  547.  
  548. DropdownOpen.Name = "DropdownOpen"
  549. DropdownOpen.Parent = DropdownButton
  550. DropdownOpen.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  551. DropdownOpen.BackgroundTransparency = 1.000
  552. DropdownOpen.Position = UDim2.new(0.838, 0, 0, 0)
  553. DropdownOpen.Size = UDim2.new(0, 30, 0, 30)
  554. DropdownOpen.Font = Enum.Font.SourceSans
  555. DropdownOpen.Text = "+"
  556. DropdownOpen.TextColor3 = theme.Dropdown_Text_Color
  557. DropdownOpen.TextSize = 14.000
  558.  
  559. UIListLayout_2.Parent = Dropdown
  560. UIListLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
  561.  
  562. for i, v in next, list do
  563. local Option1 = Instance.new("TextButton")
  564. Option1.Name = "Option1"
  565. Option1.Parent = Dropdown
  566. Option1.BackgroundColor3 = theme.Dropdown_Option_Color
  567. Option1.BorderColor3 = theme.Dropdown_Option_BorderColor
  568. Option1.BorderSizePixel = theme.Dropdown_Option_BorderSize
  569. Option1.BackgroundTransparency = 0
  570. Option1.Position = UDim2.new(0, 0, 0.5, 0)
  571. Option1.Size = UDim2.new(0, 184, 0, 30)
  572. Option1.Font = Enum.Font.SourceSansLight
  573. Option1.Text = v
  574. Option1.TextColor3 = theme.Dropdown_Option_Text_Color
  575. Option1.TextSize = 16.000
  576. Option1.AutoButtonColor = false
  577. DropYSize = DropYSize + 30
  578.  
  579. Option1.MouseButton1Click:Connect(
  580. function()
  581. callback(v)
  582. DropdownText.Text = " " .. text .. " / " .. v
  583. TweenService:Create(
  584. Dropdown,
  585. TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  586. {Size = UDim2.new(0, 184, 0, 30)}
  587. ):Play()
  588. TweenService:Create(
  589. container,
  590. TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  591. {Size = UDim2.new(0, 185, 0, BodyYSize)}
  592. ):Play()
  593. IsDropped = false
  594. DropdownOpen.Text = "+"
  595. end
  596. )
  597. end
  598. DropdownButton.MouseButton1Click:Connect(
  599. function()
  600. if IsDropped then
  601. IsDropped = false
  602. DropdownOpen.Text = "+"
  603. TweenService:Create(
  604. Dropdown,
  605. TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  606. {Size = UDim2.new(0, 184, 0, 30)}
  607. ):Play()
  608.  
  609. TweenService:Create(
  610. container,
  611. TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  612. {Size = UDim2.new(0, 185, 0, BodyYSize)}
  613. ):Play()
  614. else
  615. IsDropped = true
  616. DropdownOpen.Text = "-"
  617. DropdownText.Text = " " .. text .. " / "
  618. TweenService:Create(
  619. Dropdown,
  620. TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  621. {Size = UDim2.new(0, 184, 0, DropYSize + 30)}
  622. ):Play()
  623. TweenService:Create(
  624. container,
  625. TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  626. {Size = UDim2.new(0, 185, 0, BodyYSize + DropYSize + 1)}
  627. ):Play()
  628. end
  629. end
  630. )
  631.  
  632. Tab.MouseButton1Click:Connect(
  633. function()
  634. IsDropped = false
  635. DropdownOpen.Text = "+"
  636. TweenService:Create(
  637. Dropdown,
  638. TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  639. {Size = UDim2.new(0, 184, 0, 30)}
  640. ):Play()
  641. TweenService:Create(
  642. container,
  643. TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  644. {Size = UDim2.new(0, 185, 0, 0)}
  645. ):Play()
  646. end
  647. )
  648.  
  649. --[[local ssss = {}
  650.  
  651. function ssss:Add(name)
  652. local Option1 = Dropdown:FindFirstChild("Option1"):Clone()
  653. Option1.Name = "Option1"
  654. Option1.Parent = Dropdown
  655. Option1.BackgroundColor3 = theme.Dropdown_Option_Color
  656. Option1.BorderColor3 = theme.Dropdown_Option_BorderColor
  657. Option1.BorderSizePixel = theme.Dropdown_Option_BorderSize
  658. Option1.BackgroundTransparency = 0
  659. Option1.Position = UDim2.new(0, 0, 0.5, 0)
  660. Option1.Size = UDim2.new(0, 184, 0, 30)
  661. Option1.Font = Enum.Font.SourceSansLight
  662. Option1.Text = name
  663. Option1.TextColor3 = theme.Dropdown_Option_Text_Color
  664. Option1.TextSize = 16.000
  665. Option1.AutoButtonColor = false
  666. DropYSize = DropYSize + 30
  667.  
  668. Option1.MouseButton1Click:Connect(
  669. function()
  670. callback(name)
  671. DropdownText.Text = " " .. text .. " / " .. name
  672. TweenService:Create(
  673. Dropdown,
  674. TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  675. {Size = UDim2.new(0, 184, 0, 30)}
  676. ):Play()
  677. TweenService:Create(
  678. container,
  679. TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  680. {Size = UDim2.new(0, 185, 0, BodyYSize)}
  681. ):Play()
  682. IsDropped = false
  683. DropdownOpen.Text = "+"
  684. end
  685. )
  686. if IsDropped then
  687. TweenService:Create(
  688. Dropdown,
  689. TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  690. {Size = UDim2.new(0, 184, 0, DropYSize + 30)}
  691. ):Play()
  692. TweenService:Create(
  693. container,
  694. TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  695. {Size = UDim2.new(0, 184, 0, BodyYSize + DropYSize)}
  696. ):Play()
  697. end
  698. local s2 = {}
  699.  
  700. function s2:Remove()
  701. Option1:Destroy()
  702. end
  703. end
  704.  
  705. return ssss;]]
  706. end
  707. function s:CreateButton(text, callback)
  708. text = text or ""
  709. callback = callback or function()
  710. end
  711. local Button = Instance.new("TextButton")
  712. Button.Name = text
  713. Button.Parent = container
  714. Button.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  715. Button.BackgroundTransparency = 1.000
  716. Button.Position = UDim2.new(0, 0, 0.777777851, 0)
  717. Button.Size = UDim2.new(0, 185, 0, 30)
  718. Button.Font = Enum.Font.SourceSansLight
  719. Button.Text = text
  720. Button.TextColor3 = theme.Button_Text_Color
  721. Button.TextSize = 16.000
  722. Button.MouseButton1Down:Connect(
  723. function()
  724. Button.TextSize = 14
  725. end
  726. )
  727. Button.MouseButton1Up:Connect(
  728. function()
  729. pcall(callback)
  730. Button.TextSize = 16
  731. end
  732. )
  733. resize(30)
  734. end
  735.  
  736. function s:CreateTextBox(string, callback)
  737. resize(30)
  738. string = string or ""
  739. callback = callback or function() end
  740. local TextBox = Instance.new("TextBox")
  741. local TextboxUnderline = Instance.new("Frame")
  742.  
  743. TextBox.Parent = container
  744. TextBox.BackgroundColor3 = theme.TextBox_Color
  745. TextBox.BorderSizePixel = 0
  746. TextBox.Position = UDim2.new(0, 0, 0.818181813, 0)
  747. TextBox.Size = UDim2.new(0, 185, 0, 30)
  748. TextBox.ClearTextOnFocus = false
  749. TextBox.Font = Enum.Font.SourceSansLight
  750. TextBox.PlaceholderColor3 = theme.TextBox_Text_Color
  751. TextBox.PlaceholderText = string
  752. TextBox.Text = ""
  753. TextBox.TextColor3 = theme.TextBox_Text_Color
  754. TextBox.TextSize = 15.000
  755. TextBox.Focused:Connect(function()
  756. TextboxUnderline:TweenSize(UDim2.new(0,185,0,2), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.1)
  757. end)
  758. TextBox.FocusLost:Connect(function(enterpressed)
  759. if enterpressed then
  760. TextboxUnderline:TweenSize(UDim2.new(0,0,0,2), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.1)
  761. callback(TextBox.Text)
  762. TextBox.Text = ""
  763. else
  764. TextboxUnderline:TweenSize(UDim2.new(0,0,0,2), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.1)
  765. end
  766. end)
  767.  
  768. TextboxUnderline.Name = "TextboxUnderline"
  769. TextboxUnderline.Parent = TextBox
  770. TextboxUnderline.AnchorPoint = Vector2.new(0.5, 0.5)
  771. TextboxUnderline.BackgroundColor3 = theme.TextBox_Underline_Color
  772. TextboxUnderline.BorderSizePixel = 0
  773. TextboxUnderline.Position = UDim2.new(0.50075686, 0, 0.966666639, 0)
  774. TextboxUnderline.Size = UDim2.new(0, 0, 0, 2)
  775.  
  776. local TextBoxInfo = {}
  777.  
  778. function TextBoxInfo:Edit(text)
  779. TextBox.Text = text
  780. end
  781.  
  782. return TextBoxInfo
  783. end
  784.  
  785. function s:CreateLabel(text)
  786. text = text or ""
  787. callback = callback or function()
  788. end
  789. local Label = Instance.new("TextLabel")
  790. Label.Name = text
  791. Label.Parent = container
  792. Label.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  793. Label.BackgroundTransparency = 1.000
  794. Label.Position = UDim2.new(0, 0, 0.777777851, 0)
  795. Label.Size = UDim2.new(0, 185, 0, 30)
  796. Label.Font = Enum.Font.SourceSansLight
  797. Label.Text = text
  798. Label.TextColor3 = theme.Label_Text_Color
  799. Label.TextSize = 16.000
  800. resize(30)
  801. end
  802.  
  803. return s
  804. end
  805. return library
Advertisement
Add Comment
Please, Sign In to add comment