Advertisement
joefromsansnite

Untitled

Oct 10th, 2021
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.69 KB | None | 0 0
  1. local library = {}
  2.  
  3. function library:NewWindow(title)
  4. title = (type(title) ~= "string") and "Title" or title
  5.  
  6. -- Variables
  7. local uis = game:GetService("UserInputService")
  8. local tweenService = game:GetService("TweenService")
  9. local marketPlaceService = game:GetService("MarketplaceService")
  10. local runService = game:GetService("RunService")
  11.  
  12. local player = game.Players.LocalPlayer
  13. local mouse = player:GetMouse()
  14.  
  15. local gameName = marketPlaceService:GetProductInfo(game.PlaceId).Name
  16.  
  17.  
  18. -- Gui
  19. local ScreenGui = Instance.new("ScreenGui")
  20. local Menu = Instance.new("Frame")
  21. local Exit = Instance.new("TextButton")
  22. local close = Instance.new("ImageButton")
  23. local Minimize = Instance.new("TextButton")
  24. local expand = Instance.new("ImageButton")
  25. local UICorner = Instance.new("UICorner")
  26. local Title = Instance.new("TextLabel")
  27. local Background = Instance.new("Frame")
  28. local Title_2 = Instance.new("TextLabel")
  29. local TabContainer = Instance.new("ScrollingFrame")
  30. local UIListLayout = Instance.new("UIListLayout")
  31. local FramesContainer = Instance.new("Frame")
  32. local UIStroke = Instance.new("UIStroke")
  33. local UIStroke_1 = Instance.new("UIStroke")
  34. local UIStroke_2 = Instance.new("UIStroke")
  35. local Pattern = Instance.new("ImageLabel")
  36.  
  37. ScreenGui.Parent = player.PlayerGui
  38. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  39. ScreenGui.ResetOnSpawn = false
  40.  
  41. Menu.Name = "Menu"
  42. Menu.Parent = ScreenGui
  43. Menu.Active = true
  44. Menu.AnchorPoint = Vector2.new(0.5, 0.5)
  45. Menu.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  46. Menu.Position = UDim2.new(0.483785242, 0, 0.333065808, 0)
  47. Menu.Size = UDim2.new(0, 485, 0, 15)
  48. Menu.ZIndex = 1
  49.  
  50. UIStroke.Parent = Menu
  51.  
  52. Exit.Name = "Exit"
  53. Exit.Parent = Menu
  54. Exit.AnchorPoint = Vector2.new(0.5, 0.5)
  55. Exit.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  56. Exit.BorderSizePixel = 0
  57. Exit.Position = UDim2.new(0.973371148, 0, 0.5, 0)
  58. Exit.Size = UDim2.new(0, 25, 0, 15)
  59. Exit.Font = Enum.Font.SourceSans
  60. Exit.Text = ""
  61. Exit.TextColor3 = Color3.fromRGB(0, 0, 0)
  62. Exit.TextSize = 14.000
  63. Exit.AutoButtonColor = false
  64.  
  65. close.Name = "close"
  66. close.Parent = Exit
  67. close.AnchorPoint = Vector2.new(0.5, 0.5)
  68. close.BackgroundTransparency = 1.000
  69. close.Position = UDim2.new(0.5, 0, 0.5, 0)
  70. close.Size = UDim2.new(0, 15, 0, 15)
  71. close.ZIndex = 0
  72. close.Image = "rbxassetid://3926305904"
  73. close.ImageRectOffset = Vector2.new(284, 4)
  74. close.ImageRectSize = Vector2.new(24, 24)
  75.  
  76. Minimize.Name = "Minimize"
  77. Minimize.Parent = Menu
  78. Minimize.AnchorPoint = Vector2.new(0.5, 0.5)
  79. Minimize.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  80. Minimize.BorderSizePixel = 0
  81. Minimize.Position = UDim2.new(0.93237114, 0, 0.5, 0)
  82. Minimize.Size = UDim2.new(0, 25, 0, 15)
  83. Minimize.Font = Enum.Font.SourceSans
  84. Minimize.Text = ""
  85. Minimize.TextColor3 = Color3.fromRGB(0, 0, 0)
  86. Minimize.TextSize = 14.000
  87. Minimize.AutoButtonColor = false
  88.  
  89. expand.Name = "expand"
  90. expand.Parent = Minimize
  91. expand.AnchorPoint = Vector2.new(0.5, 0.5)
  92. expand.BackgroundTransparency = 1.000
  93. expand.Position = UDim2.new(0.5, 0, 0.5, 0)
  94. expand.Size = UDim2.new(0, 15, 0, 15)
  95. expand.ZIndex = 0
  96. expand.Rotation = 180
  97. expand.Image = "rbxassetid://3926305904"
  98. expand.ImageRectOffset = Vector2.new(564, 284)
  99. expand.ImageRectSize = Vector2.new(36, 36)
  100.  
  101. UICorner.CornerRadius = UDim.new(0, 6)
  102. UICorner.Parent = Menu
  103.  
  104. Title.Name = "Title"
  105. Title.Parent = Menu
  106. Title.AnchorPoint = Vector2.new(0.5, 0.5)
  107. Title.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  108. Title.BackgroundTransparency = 1.000
  109. Title.BorderSizePixel = 0
  110. Title.Position = UDim2.new(0.453092545, 0, 0.5, 0)
  111. Title.Size = UDim2.new(0, 439, 0, 14)
  112. Title.Font = Enum.Font.Code
  113. Title.Text = title
  114. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  115. Title.TextSize = 14.000
  116.  
  117. Background.Name = "Background"
  118. Background.Parent = Menu
  119. Background.AnchorPoint = Vector2.new(0.5, 0.5)
  120. Background.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  121. Background.BorderSizePixel = 0
  122. Background.Position = UDim2.new(0.5, 0, 9.86166763, 0)
  123. Background.Size = UDim2.new(0, 485, 0, 269)
  124. Background.ClipsDescendants = true
  125.  
  126. UIStroke_1.Parent = Background
  127.  
  128. Pattern.Name = "Pattern"
  129. Pattern.Parent = Background
  130. Pattern.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  131. Pattern.BackgroundTransparency = 1.000
  132. Pattern.Position = UDim2.new(0.316494852, 0, 3.72110262e-05, 0)
  133. Pattern.Size = UDim2.new(0, 331, 1000, 409)
  134. Pattern.ZIndex = -1
  135. Pattern.Image = "rbxassetid://2151741365"
  136. Pattern.ScaleType = Enum.ScaleType.Tile
  137. Pattern.SliceCenter = Rect.new(0, 256, 0, 256)
  138. Pattern.TileSize = UDim2.new(0, 30, 0, 60)
  139.  
  140. Title_2.Name = "Title"
  141. Title_2.Parent = Background
  142. Title_2.AnchorPoint = Vector2.new(0.5, 0.5)
  143. Title_2.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  144. Title_2.BorderSizePixel = 0
  145. Title_2.Position = UDim2.new(0.158734515, 0, 0.0781041235, 0)
  146. Title_2.Size = UDim2.new(0, 154, 0, 42)
  147. Title_2.Font = Enum.Font.Code
  148. Title_2.Text = gameName
  149. Title_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  150. Title_2.TextSize = 14.000
  151. Title_2.TextScaled = true
  152.  
  153. TabContainer.Name = "TabContainer"
  154. TabContainer.Parent = Background
  155. TabContainer.Active = true
  156. TabContainer.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  157. TabContainer.BorderSizePixel = 0
  158. TabContainer.Position = UDim2.new(0, 0, 0.156208143, 0)
  159. TabContainer.Size = UDim2.new(0, 154, 0, 227)
  160. TabContainer.ScrollBarThickness = 8
  161.  
  162. UIStroke_2.Parent = TabContainer
  163.  
  164. UIListLayout.Parent = TabContainer
  165. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  166. UIListLayout.Padding = UDim.new(0, 0)
  167.  
  168. FramesContainer.Name = "FramesContainer"
  169. FramesContainer.Parent = Background
  170. FramesContainer.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  171. FramesContainer.BackgroundTransparency = 1.000
  172. FramesContainer.Position = UDim2.new(0.317525774, 0, 0, 0)
  173. FramesContainer.Size = UDim2.new(0, 331, 0, 268)
  174. FramesContainer.ZIndex = 0
  175.  
  176.  
  177. -- Local Functions
  178. local function createContainer(parent)
  179. local Container = Instance.new("Frame")
  180. local UICorner = Instance.new("UICorner")
  181. local UIStroke = Instance.new("UIStroke")
  182.  
  183. Container.Name = "Container"
  184. Container.Parent = parent
  185. Container.AnchorPoint = Vector2.new(0.5, 0.5)
  186. Container.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  187. Container.BorderSizePixel = 0
  188. Container.Position = UDim2.new(0.487915397, 0, 0.490423739, 0)
  189. Container.Size = UDim2.new(0, 323, 0, 40)
  190.  
  191. UICorner.Parent = Container
  192. UIStroke.Parent = Container
  193.  
  194. return Container
  195. end
  196. local function hideFrames()
  197. for i,v in pairs(FramesContainer:GetChildren()) do
  198. v.Visible = false
  199. end
  200. end
  201. local function resetTabColor()
  202. for i, v in pairs(TabContainer:GetChildren()) do
  203. if v:IsA("TextButton") then
  204. v.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  205. end
  206. end
  207. end
  208. local function buttonClickEffect(parent)
  209. parent.ClipsDescendants = true
  210.  
  211. local mouseLocation = uis:GetMouseLocation()
  212. local absolutePosition = parent.AbsolutePosition
  213.  
  214. local effectXPosition = UDim2.new(0, mouseLocation.X-absolutePosition.X, 0, (mouseLocation.Y-absolutePosition.Y)-36)
  215.  
  216. local ButtonEffect = Instance.new("ImageLabel")
  217.  
  218. ButtonEffect.Name = "ButtonEffect"
  219. ButtonEffect.Parent = parent
  220. ButtonEffect.AnchorPoint = Vector2.new(0.5, 0.5)
  221. ButtonEffect.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  222. ButtonEffect.BackgroundTransparency = 1.000
  223. ButtonEffect.BorderSizePixel = 0
  224. ButtonEffect.Position = UDim2.new(0, 0, 0, 0)
  225. ButtonEffect.Size = UDim2.new(0, 25, 0, 25)
  226. ButtonEffect.Image = "rbxassetid://7658630902"
  227. ButtonEffect.ImageTransparency = 0.500
  228. ButtonEffect.Position = effectXPosition
  229.  
  230. ButtonEffect:TweenSize(UDim2.new(0, 200, 0, 200))
  231.  
  232. spawn(function()
  233. for i = 0.5, 1.05, 0.05 do
  234. ButtonEffect.ImageTransparency = i
  235. if i >= 1 then
  236. ButtonEffect:Destroy()
  237. end
  238. wait()
  239. end
  240. end)
  241. end
  242. local function dropdownEffect(parent, ui, itemType, visible, rot1, rot2)
  243. if parent ~= nil and itemType ~= nil then
  244. task.spawn(function()
  245. for i, v in pairs(parent:GetChildren()) do
  246. if v:IsA(itemType) then
  247. v.Visible = visible
  248. task.wait()
  249. end
  250. end
  251. end)
  252. end
  253.  
  254. local properties = (visible == true) and {
  255. Rotation = rot1
  256. } or {
  257. Rotation = rot2
  258. }
  259.  
  260. local info = TweenInfo.new(0.5)
  261. local tween = tweenService:Create(ui, info, properties)
  262.  
  263. tween:Play()
  264. end
  265.  
  266. local visible = true
  267. local debounce = false
  268. local function minimize()
  269. if debounce == false then
  270. debounce = true
  271.  
  272. visible = not visible
  273.  
  274. local sizeAndPos = visible == true and {
  275. UDim2.new(0, 485, 0, 269),
  276. UDim2.new(0.5, 0, 9.86166763, 0)
  277. } or {
  278. UDim2.new(0, 485, 0, 0),
  279. UDim2.new(0.5, 0, 1, 0)
  280. }
  281. Background:TweenSizeAndPosition(sizeAndPos[1], sizeAndPos[2])
  282. dropdownEffect(nil, expand, nil, visible, 180, 0)
  283.  
  284. task.wait(1)
  285. debounce = false
  286. end
  287. end
  288. local function setDraggable()
  289. Menu.Active = true
  290. Menu.Draggable = true
  291. end
  292. local function exit()
  293. ScreenGui:Destroy()
  294. end
  295.  
  296.  
  297. -- Call Functions
  298. setDraggable()
  299. close.MouseButton1Down:Connect(exit)
  300. expand.MouseButton1Down:Connect(minimize)
  301.  
  302.  
  303. -- Tab
  304. local library2 = {}
  305.  
  306. function library2:NewTab(text)
  307. text = (type(text) ~= "string") and "Tab" or text
  308.  
  309. local Tab = Instance.new("TextButton")
  310. local ScrollingFrame = Instance.new("ScrollingFrame")
  311. local UIListLayout_2 = Instance.new("UIListLayout")
  312. local UIStroke = Instance.new("UIStroke")
  313.  
  314. Tab.Name = "Tab"
  315. Tab.Parent = TabContainer
  316. Tab.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  317. Tab.Size = UDim2.new(0, 147,0, 35)
  318. Tab.Font = Enum.Font.Code
  319. Tab.BorderSizePixel = 0
  320. Tab.Text = text
  321. Tab.TextColor3 = Color3.fromRGB(255, 255, 255)
  322. Tab.TextSize = 17.000
  323. Tab.AutoButtonColor = false
  324.  
  325. ScrollingFrame.Parent = FramesContainer
  326. ScrollingFrame.Active = true
  327. ScrollingFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  328. ScrollingFrame.BackgroundTransparency = 1.000
  329. ScrollingFrame.BorderSizePixel = 0
  330. ScrollingFrame.Size = UDim2.new(0, 331, 0, 268)
  331. ScrollingFrame.ScrollBarThickness = 8
  332. ScrollingFrame.AutomaticCanvasSize = Enum.AutomaticSize.Y
  333.  
  334. UIListLayout_2.Parent = ScrollingFrame
  335. UIListLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
  336. UIListLayout_2.Padding = UDim.new(0, 7)
  337.  
  338. hideFrames()
  339. Tab.MouseButton1Down:Connect(function()
  340. buttonClickEffect(Tab)
  341. resetTabColor()
  342. hideFrames()
  343.  
  344. ScrollingFrame.Visible = true
  345. Tab.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  346. end)
  347.  
  348. local library3 = {}
  349.  
  350. function library3:NewSection(text)
  351. text = (type(text) ~= "string") and "Section" or text
  352.  
  353. local Section = Instance.new("Frame")
  354. local SectionText = Instance.new("TextLabel")
  355. local UICorner_4 = Instance.new("UICorner")
  356. local expand_2 = Instance.new("ImageButton")
  357. local Frame = Instance.new("Frame")
  358. local UICorner_5 = Instance.new("UICorner")
  359. local UIListLayout_3 = Instance.new("UIListLayout")
  360. local UIStroke = Instance.new("UIStroke")
  361. local UIStroke_1 = Instance.new("UIStroke")
  362.  
  363. local visible = false
  364.  
  365. Section.Name = "Section"
  366. Section.Parent = ScrollingFrame
  367. Section.BackgroundColor3 = Color3.fromRGB(17, 17, 17)
  368. Section.BorderSizePixel = 0
  369. Section.Size = UDim2.new(0, 331, 0, 53)
  370. Section.AutomaticSize = Enum.AutomaticSize.Y
  371.  
  372. UIStroke.Parent = Section
  373.  
  374. SectionText.Name = "SectionText"
  375. SectionText.Parent = Section
  376. SectionText.BackgroundColor3 = Color3.fromRGB(15, 15, 15)
  377. SectionText.BorderSizePixel = 0
  378. SectionText.Size = UDim2.new(0, 323, 0, 40)
  379. SectionText.Font = Enum.Font.SourceSans
  380. SectionText.Text = text
  381. SectionText.TextColor3 = Color3.fromRGB(255, 255, 255)
  382. SectionText.TextSize = 25.000
  383.  
  384. UICorner_4.Parent = SectionText
  385.  
  386. expand_2.Name = "expand"
  387. expand_2.Parent = SectionText
  388. expand_2.AnchorPoint = Vector2.new(0.5, 0.5)
  389. expand_2.BackgroundTransparency = 1.000
  390. expand_2.Position = UDim2.new(0.0799999982, 0, 0.5, 0)
  391. expand_2.Size = UDim2.new(0, 25, 0, 25)
  392. expand_2.ZIndex = 2
  393. expand_2.Image = "rbxassetid://3926305904"
  394. expand_2.ImageRectOffset = Vector2.new(564, 284)
  395. expand_2.ImageRectSize = Vector2.new(36, 36)
  396. expand_2.Rotation = -180
  397.  
  398. Frame.Parent = SectionText
  399. Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  400. Frame.BackgroundTransparency = 1.000
  401. Frame.Size = UDim2.new(0, 322, 0, 40)
  402.  
  403. UICorner_5.Parent = Frame
  404. UIStroke_1.Parent = Frame
  405.  
  406. UIListLayout_3.Parent = Section
  407. UIListLayout_3.SortOrder = Enum.SortOrder.LayoutOrder
  408. UIListLayout_3.Padding = UDim.new(0, 7)
  409.  
  410. expand_2.MouseButton1Down:Connect(function()
  411. visible = not visible
  412. dropdownEffect(Section, expand_2, "Frame", visible, -180, -90)
  413. end)
  414.  
  415. local library4 = {}
  416.  
  417. function library4:NewButton(text, callback)
  418. text = (type(text) ~= "string") and "Button" or text
  419. callback = (type(callback) ~= "function") and function()
  420. print("Clicked!")
  421. end or callback
  422.  
  423. local TextButton = Instance.new("TextButton")
  424. local UICorner_9 = Instance.new("UICorner")
  425. local TextLabel_2 = Instance.new("TextLabel")
  426. local Container = createContainer(Section)
  427.  
  428. TextButton.Parent = Container
  429. TextButton.AnchorPoint = Vector2.new(0.5, 0.5)
  430. TextButton.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  431. TextButton.Position = UDim2.new(0.688, 0, 0.483, 0)
  432. TextButton.Size = UDim2.new(0, 195, 0, 36)
  433. TextButton.Font = Enum.Font.Code
  434. TextButton.Text = "Click"
  435. TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  436. TextButton.TextSize = 14.000
  437. TextButton.AutoButtonColor = false
  438.  
  439. UICorner_9.Parent = TextButton
  440.  
  441. TextLabel_2.Parent = Container
  442. TextLabel_2.AnchorPoint = Vector2.new(0.5, 0.5)
  443. TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  444. TextLabel_2.BackgroundTransparency = 1.000
  445. TextLabel_2.Position = UDim2.new(0.185, 0, 0.5, 0)
  446. TextLabel_2.Size = UDim2.new(0, 120, 0, 50)
  447. TextLabel_2.Font = Enum.Font.Code
  448. TextLabel_2.Text = text
  449. TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  450. TextLabel_2.TextSize = 14.000
  451.  
  452. TextButton.MouseButton1Down:Connect(function()
  453. buttonClickEffect(TextButton)
  454. callback()
  455. end)
  456. end
  457.  
  458. function library4:NewTextBox(text, callback)
  459. text = (type(text) ~= "string") and "TextBox" or text
  460. callback = (type(callback) ~= "function") and function()
  461. print("Lost Focus!")
  462. end or callback
  463.  
  464. local UICorner_6 = Instance.new("UICorner")
  465. local TextBox = Instance.new("TextBox")
  466. local UICorner_7 = Instance.new("UICorner")
  467. local TextLabel = Instance.new("TextLabel")
  468. local Container = createContainer(Section)
  469.  
  470. TextBox.Parent = Container
  471. TextBox.AnchorPoint = Vector2.new(0.5, 0.5)
  472. TextBox.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  473. TextBox.Position = UDim2.new(0.688, 0, 0.483, 0)
  474. TextBox.Size = UDim2.new(0, 195, 0, 36)
  475. TextBox.Font = Enum.Font.SourceSans
  476. TextBox.PlaceholderText = "TextBox"
  477. TextBox.Text = ""
  478. TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  479. TextBox.TextSize = 14.000
  480. TextBox.TextStrokeColor3 = Color3.fromRGB(255, 255, 255)
  481.  
  482. UICorner_7.Parent = TextBox
  483.  
  484. TextLabel.Parent = TextBox
  485. TextLabel.AnchorPoint = Vector2.new(0.5, 0.5)
  486. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  487. TextLabel.BackgroundTransparency = 1.000
  488. TextLabel.Position = UDim2.new(-0.326, 0, 0.5, 0)
  489. TextLabel.Size = UDim2.new(0, 120, 0, 50)
  490. TextLabel.Font = Enum.Font.Code
  491. TextLabel.Text = text
  492. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  493. TextLabel.TextSize = 14.000
  494.  
  495. TextBox.FocusLost:Connect(function()
  496. callback(TextBox.Text)
  497. end)
  498. end
  499.  
  500. function library4:NewToggle(text, callback)
  501. text = (type(text) ~= "string") and "Toggle" or text
  502. callback = (type(callback) ~= "function") and function()
  503. print("Toggled!")
  504. end or callback
  505.  
  506. local Toggle = Instance.new("Frame")
  507. local UICorner_15 = Instance.new("UICorner")
  508. local check = Instance.new("ImageButton")
  509. local TextLabel_5 = Instance.new("TextLabel")
  510. local Container = createContainer(Section)
  511.  
  512. local toggled = true
  513.  
  514. UICorner_15.CornerRadius = UDim.new(0, 8)
  515. UICorner_15.Parent = Toggle
  516.  
  517. Toggle.Name = "Toggle"
  518. Toggle.Parent = Container
  519. Toggle.AnchorPoint = Vector2.new(0.5, 0.5)
  520. Toggle.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  521. Toggle.Position = UDim2.new(0.88499999, 0, 0.5, 0)
  522. Toggle.Size = UDim2.new(0, 29, 0, 29)
  523.  
  524. check.Name = "check"
  525. check.Parent = Toggle
  526. check.AnchorPoint = Vector2.new(0.5, 0.5)
  527. check.BackgroundTransparency = 1.000
  528. check.Position = UDim2.new(0.5, 0, 0.5, 0)
  529. check.Size = UDim2.new(0, 26, 0, 26)
  530. check.ZIndex = 2
  531. check.Image = "rbxassetid://3926305904"
  532. check.ImageColor3 = Color3.fromRGB(255, 255, 0)
  533. check.ImageRectOffset = Vector2.new(312, 4)
  534. check.ImageRectSize = Vector2.new(24, 24)
  535.  
  536. TextLabel_5.Parent = Toggle
  537. TextLabel_5.AnchorPoint = Vector2.new(0.5, 0.5)
  538. TextLabel_5.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  539. TextLabel_5.BackgroundTransparency = 1.000
  540. TextLabel_5.Position = UDim2.new(-5, 0, 0.5, 0)
  541. TextLabel_5.Size = UDim2.new(0, 255, 0, 40)
  542. TextLabel_5.Font = Enum.Font.Code
  543. TextLabel_5.Text = text
  544. TextLabel_5.TextColor3 = Color3.fromRGB(255, 255, 255)
  545. TextLabel_5.TextSize = 14.000
  546. TextLabel_5.TextXAlignment = Enum.TextXAlignment.Right
  547.  
  548. check.MouseButton1Down:Connect(function()
  549. toggled = not toggled
  550. task.spawn(function()
  551. check.Size = UDim2.new(0, 30, 0, 30)
  552. task.wait(0.1)
  553. check.Size = UDim2.new(0, 26, 0, 26)
  554. end)
  555. check.ImageTransparency = (toggled == true) and 0 or 1
  556.  
  557. callback(toggled)
  558. end)
  559. end
  560.  
  561. function library4:NewSlider(text, min, max, callback)
  562. text = (type(text) ~= "string") and "Slider" or text
  563. min = (type(min) ~= "number") and 0 or min
  564. max = (type(max) ~= "number") and 10 or max
  565. callback = (type(callback) ~= "function") and function()
  566. print("Moved Slider!")
  567. end or callback
  568.  
  569. local Slider = Instance.new("Frame")
  570. local TextLabel_3 = Instance.new("TextLabel")
  571. local TextLabel_4 = Instance.new("TextLabel")
  572. local UICorner_10 = Instance.new("UICorner")
  573. local FillFrame = Instance.new("Frame")
  574. local UICorner_11 = Instance.new("UICorner")
  575. local SliderButton = Instance.new("TextButton")
  576. local UICorner_12 = Instance.new("UICorner")
  577. local UICorner_13 = Instance.new("UICorner")
  578. local UICorner_14 = Instance.new("UICorner")
  579. local Container = createContainer(Section)
  580.  
  581. local holding = false
  582.  
  583. Slider.Name = "Slider"
  584. Slider.Parent = Container
  585. Slider.AnchorPoint = Vector2.new(0.5, 0.5)
  586. Slider.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  587. Slider.Position = UDim2.new(0.672542334, 0, 0.50999999, 0)
  588. Slider.Size = UDim2.new(0, 175, 0, 7)
  589.  
  590. TextLabel_3.Parent = Slider
  591. TextLabel_3.AnchorPoint = Vector2.new(0.5, 0.5)
  592. TextLabel_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  593. TextLabel_3.BackgroundTransparency = 1.000
  594. TextLabel_3.Position = UDim2.new(-0.511904776, 0, 0.5, 0)
  595. TextLabel_3.Size = UDim2.new(0, 82, 0, 40)
  596. TextLabel_3.Font = Enum.Font.Code
  597. TextLabel_3.Text = text
  598. TextLabel_3.TextColor3 = Color3.fromRGB(255, 255, 255)
  599. TextLabel_3.TextSize = 14.000
  600.  
  601. TextLabel_4.Parent = Slider
  602. TextLabel_4.AnchorPoint = Vector2.new(0.5, 0.5)
  603. TextLabel_4.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  604. TextLabel_4.BackgroundTransparency = 1.000
  605. TextLabel_4.Position = UDim2.new(-0.145238101, 0, 0.5, 0)
  606. TextLabel_4.Size = UDim2.new(0, 50, 0, 40)
  607. TextLabel_4.Font = Enum.Font.Code
  608. TextLabel_4.Text = min
  609. TextLabel_4.TextColor3 = Color3.fromRGB(255, 255, 255)
  610. TextLabel_4.TextSize = 14.000
  611.  
  612. UICorner_10.Parent = Slider
  613.  
  614. FillFrame.Name = "FillFrame"
  615. FillFrame.Parent = Slider
  616. FillFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  617. FillFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 0)
  618. FillFrame.Position = UDim2.new(0, 0, 0.5, 0)
  619. FillFrame.Size = UDim2.new(0, 0, 0, 7)
  620. FillFrame.ZIndex = 0
  621.  
  622. UICorner_11.Parent = FillFrame
  623.  
  624. SliderButton.Name = "SliderButton"
  625. SliderButton.Parent = Slider
  626. SliderButton.AnchorPoint = Vector2.new(0.5, 0.5)
  627. SliderButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  628. SliderButton.Position = UDim2.new(0, 0, 0.5, 0)
  629. SliderButton.Size = UDim2.new(0, 7, 0, 7)
  630. SliderButton.Font = Enum.Font.SourceSans
  631. SliderButton.Text = ""
  632. SliderButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  633. SliderButton.TextSize = 14.000
  634. SliderButton.AutoButtonColor = false
  635.  
  636. UICorner_12.CornerRadius = UDim.new(1, 0)
  637. UICorner_12.Parent = SliderButton
  638.  
  639. SliderButton.MouseButton1Down:Connect(function()
  640. holding = true
  641. SliderButton.Size = UDim2.new(0, 9, 0, 9)
  642. end)
  643. SliderButton.MouseButton1Up:Connect(function()
  644. holding = false
  645. SliderButton.Size = UDim2.new(0, 7, 0, 7)
  646. end)
  647.  
  648. runService.Heartbeat:Connect(function()
  649. if holding then
  650. local mouseLocation = uis:GetMouseLocation()
  651.  
  652. local xPos = (mouseLocation.X-Slider.AbsolutePosition.X)/Slider.AbsoluteSize.X
  653. xPos = math.clamp(xPos, 0, 1)
  654.  
  655. local value = math.ceil( min + (xPos * (max-min)) )
  656.  
  657. TextLabel_4.Text = tostring(value)
  658.  
  659. FillFrame.Size = UDim2.new(xPos, 0, 0, 7)
  660. FillFrame.Position = UDim2.new(xPos/2, 0, 0.5, 0)
  661. SliderButton.Position = UDim2.new(xPos, 0, 0.5, 0)
  662.  
  663. callback(value)
  664. end
  665. end)
  666. end
  667.  
  668. function library4:NewDropdown(text, items, callback)
  669. text = (type(text) ~= "string") and "Dropdown" or text
  670. items = (type(items) ~= "table") and {} or items
  671. callback = (type(callback) ~= "function") and function()
  672. print("Selected Item!")
  673. end or callback
  674.  
  675. local UICorner = Instance.new("UICorner")
  676. local Dropdown = Instance.new("Frame")
  677. local expand = Instance.new("ImageButton")
  678. local TextLabel = Instance.new("TextLabel")
  679. local UIGridLayout = Instance.new("UIGridLayout")
  680. local Container = createContainer(Section)
  681. local TextLabel = Instance.new("TextLabel")
  682. local TextLabel_2 = Instance.new("TextLabel")
  683.  
  684. local visible = true
  685.  
  686. Container.AutomaticSize = Enum.AutomaticSize.Y
  687.  
  688. Dropdown.Name = "Dropdown"
  689. Dropdown.Parent = Container
  690. Dropdown.AnchorPoint = Vector2.new(0.5, 0.5)
  691. Dropdown.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  692. Dropdown.BackgroundTransparency = 1.000
  693. Dropdown.Position = UDim2.new(0.5, 0, 0.5, 0)
  694. Dropdown.Size = UDim2.new(0, 323, 0, 40)
  695.  
  696. expand.Name = "expand"
  697. expand.Parent = Dropdown
  698. expand.AnchorPoint = Vector2.new(0.5, 0.5)
  699. expand.BackgroundTransparency = 1.000
  700. expand.Position = UDim2.new(0.89009285, 0, 0.5, 0)
  701. expand.Size = UDim2.new(0, 25, 0, 25)
  702. expand.ZIndex = 2
  703. expand.Image = "rbxassetid://3926305904"
  704. expand.ImageRectOffset = Vector2.new(564, 284)
  705. expand.ImageRectSize = Vector2.new(36, 36)
  706. expand.Rotation = -180
  707.  
  708. TextLabel.Parent = Dropdown
  709. TextLabel.AnchorPoint = Vector2.new(0.5, 0.5)
  710. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  711. TextLabel.BackgroundTransparency = 1.000
  712. TextLabel.Position = UDim2.new(0.695404172, 0, 0.5, 0)
  713. TextLabel.Size = UDim2.new(0, 90, 0, 40)
  714. TextLabel.Font = Enum.Font.Code
  715. TextLabel.Text = text
  716. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  717. TextLabel.TextSize = 14.000
  718. TextLabel.TextWrapped = true
  719. TextLabel.TextXAlignment = Enum.TextXAlignment.Right
  720.  
  721. TextLabel_2.Parent = Dropdown
  722. TextLabel_2.AnchorPoint = Vector2.new(0.5, 0.5)
  723. TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  724. TextLabel_2.BackgroundTransparency = 1.000
  725. TextLabel_2.Position = UDim2.new(0.282865435, 0, 0.5, 0)
  726. TextLabel_2.Size = UDim2.new(0, 176, 0, 40)
  727. TextLabel_2.Font = Enum.Font.Code
  728. TextLabel_2.Text = "Selected: nil"
  729. TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  730. TextLabel_2.TextSize = 14.000
  731. TextLabel_2.TextWrapped = true
  732. TextLabel_2.TextXAlignment = Enum.TextXAlignment.Right
  733.  
  734. UIGridLayout.Parent = Container
  735. UIGridLayout.SortOrder = Enum.SortOrder.LayoutOrder
  736. UIGridLayout.CellSize = UDim2.new(0, 323, 0, 40)
  737.  
  738. for i, item in pairs(items) do
  739. item = (typeof(item) == "Instance") and item.Name or item
  740. print(item)
  741. local Item = Instance.new("TextButton")
  742.  
  743. Item.Name = "Item"
  744. Item.Parent = Container
  745. Item.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  746. Item.Size = UDim2.new(0, 200, 0, 50)
  747. Item.Font = Enum.Font.Code
  748. Item.Text = item
  749. Item.TextColor3 = Color3.fromRGB(255, 255, 255)
  750. Item.TextSize = 14.000
  751. Item.AutoButtonColor = false
  752. Item.BorderSizePixel = 0
  753.  
  754. Item.MouseButton1Down:Connect(function()
  755. visible = not visible
  756. TextLabel_2.Text = "Selected: "..item
  757. buttonClickEffect(Frame)
  758. dropdownEffect(Container, expand, "TextButton", visible, -180, -90)
  759. callback(item)
  760. end)
  761. end
  762.  
  763. expand.MouseButton1Down:Connect(function()
  764. visible = not visible
  765. dropdownEffect(Container, expand, "TextButton", visible, -180, -90)
  766. end)
  767. end
  768.  
  769. return library4
  770. end
  771.  
  772. return library3
  773. end
  774.  
  775. return library2
  776. end
  777.  
  778. return library
  779.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement