Advertisement
joefromsansnite

Untitled

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