Advertisement
joefromsansnite

Untitled

Oct 12th, 2021
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.57 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 = false
  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.TextScaled = true
  311.  
  312. UICorner.Parent = Container
  313. UIStroke.Parent = Container
  314.  
  315. expand.MouseButton1Down:Connect(function()
  316. visible = not visible
  317. dropdownEffect(nil, expand, nil, visible, -180, -90)
  318. Description.Parent = (visible ~= true) and game or Container
  319. end)
  320. return Container, description, TextLabel_2, expand
  321. end
  322.  
  323. local visible = true
  324. local debounce = false
  325. local function minimize()
  326. if debounce == false then
  327. debounce = true
  328.  
  329. visible = not visible
  330.  
  331. local sizeAndPos = visible == true and {
  332. UDim2.new(0, 485, 0, 269),
  333. UDim2.new(0.5, 0, 9.86166763, 0)
  334. } or {
  335. UDim2.new(0, 485, 0, 0),
  336. UDim2.new(0.5, 0, 1, 0)
  337. }
  338. Background:TweenSizeAndPosition(sizeAndPos[1], sizeAndPos[2])
  339. dropdownEffect(nil, expand, nil, visible, 180, 0)
  340.  
  341. task.wait(1)
  342. debounce = false
  343. end
  344. end
  345. local function setDraggable()
  346. Menu.Active = true
  347. Menu.Draggable = true
  348. end
  349. local function exit()
  350. ScreenGui:Destroy()
  351. end
  352.  
  353.  
  354. -- Call Functions
  355. setDraggable()
  356. close.MouseButton1Down:Connect(exit)
  357. expand.MouseButton1Down:Connect(minimize)
  358.  
  359.  
  360. -- Tab
  361. local library2 = {}
  362.  
  363. function library2:NewTab(text)
  364. text = (type(text) ~= "string") and "Tab" or text
  365.  
  366. local Tab = Instance.new("TextButton")
  367. local ScrollingFrame = Instance.new("ScrollingFrame")
  368. local UIListLayout_2 = Instance.new("UIListLayout")
  369. local UIStroke = Instance.new("UIStroke")
  370. local tabImage = Instance.new("ImageButton")
  371.  
  372. Tab.Name = "Tab"
  373. Tab.Parent = TabContainer
  374. Tab.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  375. Tab.Size = UDim2.new(0, 147,0, 35)
  376. Tab.Font = Enum.Font.Code
  377. Tab.BorderSizePixel = 0
  378. Tab.Text = text
  379. Tab.TextColor3 = Color3.fromRGB(255, 255, 255)
  380. Tab.TextSize = 17.000
  381. Tab.AutoButtonColor = false
  382.  
  383. tabImage.Name = "tab"
  384. tabImage.Parent = Tab
  385. tabImage.AnchorPoint = Vector2.new(0.5, 0.5)
  386. tabImage.BackgroundTransparency = 1.000
  387. tabImage.Position = UDim2.new(0.125, 0, 0.5, 0)
  388. tabImage.Size = UDim2.new(0, 15, 0, 15)
  389. tabImage.ZIndex = 2
  390. tabImage.Image = "rbxassetid://3926305904"
  391. tabImage.ImageRectOffset = Vector2.new(484, 484)
  392. tabImage.ImageRectSize = Vector2.new(36, 36)
  393.  
  394. ScrollingFrame.Parent = FramesContainer
  395. ScrollingFrame.Active = true
  396. ScrollingFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  397. ScrollingFrame.BackgroundTransparency = 1.000
  398. ScrollingFrame.BorderSizePixel = 0
  399. ScrollingFrame.Size = UDim2.new(0, 331, 0, 268)
  400. ScrollingFrame.ScrollBarThickness = 8
  401. ScrollingFrame.AutomaticCanvasSize = Enum.AutomaticSize.Y
  402.  
  403. UIListLayout_2.Parent = ScrollingFrame
  404. UIListLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
  405. UIListLayout_2.Padding = UDim.new(0, 7)
  406.  
  407. hideFrames()
  408. Tab.MouseButton1Down:Connect(function()
  409. buttonClickEffect(Tab)
  410. resetTabColor()
  411. hideFrames()
  412.  
  413. ScrollingFrame.Visible = true
  414. Tab.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  415. end)
  416.  
  417. local library3 = {}
  418.  
  419. function library3:NewSection(text)
  420. text = (type(text) ~= "string") and "Section" or text
  421.  
  422. local Section = Instance.new("Frame")
  423. local SectionText = Instance.new("TextLabel")
  424. local UICorner_4 = Instance.new("UICorner")
  425. local expand_2 = Instance.new("ImageButton")
  426. local Frame = Instance.new("Frame")
  427. local UICorner_5 = Instance.new("UICorner")
  428. local UIListLayout_3 = Instance.new("UIListLayout")
  429. local UIStroke = Instance.new("UIStroke")
  430. local UIStroke_1 = Instance.new("UIStroke")
  431.  
  432. local visible = false
  433.  
  434. Section.Name = "Section"
  435. Section.Parent = ScrollingFrame
  436. Section.BackgroundColor3 = Color3.fromRGB(17, 17, 17)
  437. Section.BorderSizePixel = 0
  438. Section.Size = UDim2.new(0, 331, 0, 53)
  439. Section.AutomaticSize = Enum.AutomaticSize.Y
  440.  
  441. UIStroke.Parent = Section
  442.  
  443. SectionText.Name = "SectionText"
  444. SectionText.Parent = Section
  445. SectionText.BackgroundColor3 = Color3.fromRGB(15, 15, 15)
  446. SectionText.BorderSizePixel = 0
  447. SectionText.Size = UDim2.new(0, 323, 0, 40)
  448. SectionText.Font = Enum.Font.SourceSans
  449. SectionText.Text = text
  450. SectionText.TextColor3 = Color3.fromRGB(255, 255, 255)
  451. SectionText.TextSize = 25.000
  452.  
  453. UICorner_4.Parent = SectionText
  454.  
  455. expand_2.Name = "expand"
  456. expand_2.Parent = SectionText
  457. expand_2.AnchorPoint = Vector2.new(0.5, 0.5)
  458. expand_2.BackgroundTransparency = 1.000
  459. expand_2.Position = UDim2.new(0.0799999982, 0, 0.5, 0)
  460. expand_2.Size = UDim2.new(0, 25, 0, 25)
  461. expand_2.ZIndex = 2
  462. expand_2.Image = "rbxassetid://3926305904"
  463. expand_2.ImageRectOffset = Vector2.new(564, 284)
  464. expand_2.ImageRectSize = Vector2.new(36, 36)
  465. expand_2.Rotation = -180
  466.  
  467. Frame.Parent = SectionText
  468. Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  469. Frame.BackgroundTransparency = 1.000
  470. Frame.Size = UDim2.new(0, 322, 0, 40)
  471.  
  472. UICorner_5.Parent = Frame
  473. UIStroke_1.Parent = Frame
  474.  
  475. UIListLayout_3.Parent = Section
  476. UIListLayout_3.SortOrder = Enum.SortOrder.LayoutOrder
  477. UIListLayout_3.Padding = UDim.new(0, 7)
  478.  
  479. expand_2.MouseButton1Down:Connect(function()
  480. visible = not visible
  481. dropdownEffect(Section, expand_2, "Frame", visible, -180, -90)
  482. end)
  483.  
  484. local library4 = {}
  485.  
  486. function library4:NewButton(text, description, callback)
  487. text = (type(text) ~= "string") and "Button" or text
  488. description = (type(description) ~= "string") and defaultDescription or description
  489. callback = (type(callback) ~= "function") and function()
  490. print("Clicked!")
  491. end or callback
  492.  
  493. local TextButton = Instance.new("TextButton")
  494. local UICorner_9 = Instance.new("UICorner")
  495. local Container = createContainer(Section, text, description)
  496.  
  497. TextButton.Parent = Container
  498. TextButton.AnchorPoint = Vector2.new(0.5, 0.5)
  499. TextButton.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  500. TextButton.Position = UDim2.new(0.688, 0, 0.5, 0)
  501. TextButton.Size = UDim2.new(0, 195, 0, 36)
  502. TextButton.Font = Enum.Font.Code
  503. TextButton.Text = "Click"
  504. TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  505. TextButton.TextSize = 14.000
  506. TextButton.AutoButtonColor = false
  507.  
  508. UICorner_9.Parent = TextButton
  509.  
  510. TextButton.MouseButton1Down:Connect(function()
  511. buttonClickEffect(TextButton)
  512. callback()
  513. end)
  514. end
  515.  
  516. function library4:NewTextBox(text, description, callback)
  517. text = (type(text) ~= "string") and "TextBox" or text
  518. description = (type(description) ~= "string") and defaultDescription or description
  519. callback = (type(callback) ~= "function") and function()
  520. print("Lost Focus!")
  521. end or callback
  522.  
  523. local UICorner_6 = Instance.new("UICorner")
  524. local TextBox = Instance.new("TextBox")
  525. local UICorner_7 = Instance.new("UICorner")
  526. local Container = createContainer(Section, text, description)
  527. local CopyToClipboard = Instance.new("ImageButton")
  528.  
  529. TextBox.Parent = Container
  530. TextBox.AnchorPoint = Vector2.new(0.5, 0.5)
  531. TextBox.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  532. TextBox.Position = UDim2.new(0.688, 0, 0.5, 0)
  533. TextBox.Size = UDim2.new(0, 195, 0, 36)
  534. TextBox.Font = Enum.Font.SourceSans
  535. TextBox.PlaceholderText = "TextBox"
  536. TextBox.Text = ""
  537. TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  538. TextBox.TextSize = 14.000
  539. TextBox.TextStrokeColor3 = Color3.fromRGB(255, 255, 255)
  540.  
  541. CopyToClipboard.Name = "CopyToClipboard"
  542. CopyToClipboard.Parent = TextBox
  543. CopyToClipboard.AnchorPoint = Vector2.new(0.5, 0.5)
  544. CopyToClipboard.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  545. CopyToClipboard.BackgroundTransparency = 1.000
  546. CopyToClipboard.Position = UDim2.new(0.920000017, 0, 0.400000006, 0)
  547. CopyToClipboard.Size = UDim2.new(0, 20, 0, 20)
  548. CopyToClipboard.Image = "rbxassetid://7715665843"
  549.  
  550. UICorner_7.Parent = TextBox
  551.  
  552. CopyToClipboard.MouseButton1Down:Connect(function()
  553. if runService:IsStudio() then
  554. print("Copied: "..TextBox.Text)
  555. return
  556. end
  557. setclipboard(TextBox.Text)
  558. end)
  559. TextBox.FocusLost:Connect(function()
  560. callback(TextBox.Text)
  561. end)
  562. end
  563.  
  564. function library4:NewToggle(text, description, callback)
  565. text = (type(text) ~= "string") and "Toggle" or text
  566. description = (type(description) ~= "string") and defaultDescription or description
  567. callback = (type(callback) ~= "function") and function()
  568. print("Toggled!")
  569. end or callback
  570.  
  571. local Toggle = Instance.new("Frame")
  572. local UICorner_15 = Instance.new("UICorner")
  573. local check = Instance.new("ImageLabel")
  574. local check2 = Instance.new("ImageButton")
  575. local Container = createContainer(Section, text, description)
  576.  
  577. local toggled = true
  578.  
  579. UICorner_15.CornerRadius = UDim.new(0, 8)
  580. UICorner_15.Parent = Toggle
  581.  
  582. Toggle.Name = "Toggle"
  583. Toggle.Parent = Container
  584. Toggle.AnchorPoint = Vector2.new(0.5, 0.5)
  585. Toggle.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  586. Toggle.Position = UDim2.new(0.88499999, 0, 0.5, 0)
  587. Toggle.Size = UDim2.new(0, 29, 0, 29)
  588.  
  589. check.Name = "check"
  590. check.Parent = Toggle
  591. check.AnchorPoint = Vector2.new(0.5, 0.5)
  592. check.BackgroundTransparency = 1.000
  593. check.Position = UDim2.new(0.5, 0, 0.5, 0)
  594. check.Size = UDim2.new(0, 26, 0, 26)
  595. check.ZIndex = 0
  596. check.Image = "rbxassetid://3926305904"
  597. check.ImageColor3 = Color3.fromRGB(255, 255, 0)
  598. check.ImageRectOffset = Vector2.new(312, 4)
  599. check.ImageRectSize = Vector2.new(24, 24)
  600.  
  601. check2.Parent = Toggle
  602. check2.AnchorPoint = Vector2.new(0.5, 0.5)
  603. check2.Size = UDim2.new(0, 29, 0, 29)
  604. check2.BackgroundTransparency = 1
  605. check2.ImageTransparency = 1
  606. check2.Position = UDim2.new(0.5, 0, 0.5, 0)
  607. check2.ZIndex = 10
  608.  
  609. check2.MouseButton1Down:Connect(function()
  610. toggled = not toggled
  611. task.spawn(function()
  612. local size = (toggled == true) and {
  613. Size = UDim2.new(0, 26, 0, 26)
  614. } or {
  615. Size = UDim2.new(0, 0, 0, 0)
  616. }
  617. local info = TweenInfo.new(0.1, Enum.EasingStyle.Elastic, Enum.EasingDirection.InOut)
  618. local tween = tweenService:Create(check, info, size)
  619.  
  620. tween:Play()
  621. end)
  622.  
  623. callback(toggled)
  624. end)
  625. end
  626.  
  627. function library4:NewSlider(text, description, min, max, callback)
  628. text = (type(text) ~= "string") and "Slider" or text
  629. description = (type(description) ~= "string") and defaultDescription or description
  630. min = (type(min) ~= "number") and 0 or min
  631. max = (type(max) ~= "number") and 10 or max
  632. callback = (type(callback) ~= "function") and function()
  633. print("Moved Slider!")
  634. end or callback
  635.  
  636. local Slider = Instance.new("Frame")
  637. local TextLabel_3 = Instance.new("TextLabel")
  638. local TextLabel_4 = Instance.new("TextLabel")
  639. local UICorner_10 = Instance.new("UICorner")
  640. local FillFrame = Instance.new("Frame")
  641. local UICorner_11 = Instance.new("UICorner")
  642. local SliderButton = Instance.new("TextButton")
  643. local UICorner_12 = Instance.new("UICorner")
  644. local UICorner_13 = Instance.new("UICorner")
  645. local UICorner_14 = Instance.new("UICorner")
  646. local Container = createContainer(Section, text, description)
  647.  
  648. local holding = false
  649.  
  650. Slider.Name = "Slider"
  651. Slider.Parent = Container
  652. Slider.AnchorPoint = Vector2.new(0.5, 0.5)
  653. Slider.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  654. Slider.Position = UDim2.new(0.672542334, 0, 0.5, 0)
  655. Slider.Size = UDim2.new(0, 175, 0, 7)
  656.  
  657. TextLabel_4.Parent = Slider
  658. TextLabel_4.AnchorPoint = Vector2.new(0.5, 0.5)
  659. TextLabel_4.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  660. TextLabel_4.BackgroundTransparency = 1.000
  661. TextLabel_4.Position = UDim2.new(-0.145238101, 0, 0.5, 0)
  662. TextLabel_4.Size = UDim2.new(0, 50, 0, 40)
  663. TextLabel_4.Font = Enum.Font.Code
  664. TextLabel_4.Text = min
  665. TextLabel_4.TextColor3 = Color3.fromRGB(255, 255, 255)
  666. TextLabel_4.TextSize = 14.000
  667.  
  668. UICorner_10.Parent = Slider
  669.  
  670. FillFrame.Name = "FillFrame"
  671. FillFrame.Parent = Slider
  672. FillFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  673. FillFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 0)
  674. FillFrame.Position = UDim2.new(0, 0, 0.5, 0)
  675. FillFrame.Size = UDim2.new(0, 0, 0, 7)
  676. FillFrame.ZIndex = 0
  677.  
  678. UICorner_11.Parent = FillFrame
  679.  
  680. SliderButton.Name = "SliderButton"
  681. SliderButton.Parent = Slider
  682. SliderButton.AnchorPoint = Vector2.new(0.5, 0.5)
  683. SliderButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  684. SliderButton.Position = UDim2.new(0, 0, 0.5, 0)
  685. SliderButton.Size = UDim2.new(0, 7, 0, 7)
  686. SliderButton.Font = Enum.Font.SourceSans
  687. SliderButton.Text = ""
  688. SliderButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  689. SliderButton.TextSize = 14.000
  690. SliderButton.AutoButtonColor = false
  691.  
  692. UICorner_12.CornerRadius = UDim.new(1, 0)
  693. UICorner_12.Parent = SliderButton
  694.  
  695. SliderButton.MouseButton1Down:Connect(function()
  696. holding = true
  697. SliderButton.Size = UDim2.new(0, 9, 0, 9)
  698. end)
  699. SliderButton.MouseButton1Up:Connect(function()
  700. holding = false
  701. SliderButton.Size = UDim2.new(0, 7, 0, 7)
  702. end)
  703.  
  704. runService.RenderStepped:Connect(function()
  705. if holding then
  706. local mouseLocation = uis:GetMouseLocation()
  707.  
  708. local xPos = (mouseLocation.X-Slider.AbsolutePosition.X)/Slider.AbsoluteSize.X
  709. xPos = math.clamp(xPos, 0, 1)
  710.  
  711. local value = math.ceil( min + (xPos * (max-min)) )
  712.  
  713. TextLabel_4.Text = tostring(value)
  714.  
  715. FillFrame.Size = UDim2.new(xPos, 0, 0, 7)
  716. FillFrame.Position = UDim2.new(xPos/2, 0, 0.5, 0)
  717. SliderButton.Position = UDim2.new(xPos, 0, 0.5, 0)
  718.  
  719. callback(value)
  720. end
  721. end)
  722. end
  723.  
  724. function library4:NewDropdown(text, items, callback)
  725. text = (type(text) ~= "string") and "Dropdown" or text
  726. items = (type(items) ~= "table") and {} or items
  727. callback = (type(callback) ~= "function") and function()
  728. print("Selected Item!")
  729. end or callback
  730.  
  731. local UICorner = Instance.new("UICorner")
  732. local Dropdown = Instance.new("Frame")
  733. local expand = Instance.new("ImageButton")
  734. local TextLabel = Instance.new("TextLabel")
  735. local UIGridLayout = Instance.new("UIGridLayout")
  736. local Container, x, y, z = createContainer(Section, "", "")
  737. local TextLabel = Instance.new("TextLabel")
  738. local TextLabel_2 = Instance.new("TextLabel")
  739.  
  740. local visible = true
  741.  
  742. Container.AutomaticSize = Enum.AutomaticSize.Y
  743.  
  744. y:Destroy()
  745. z:Destroy()
  746.  
  747. Dropdown.Name = "Dropdown"
  748. Dropdown.Parent = Container
  749. Dropdown.AnchorPoint = Vector2.new(0.5, 0.5)
  750. Dropdown.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  751. Dropdown.BackgroundTransparency = 1.000
  752. Dropdown.Position = UDim2.new(0.5, 0, 0.5, 0)
  753. Dropdown.Size = UDim2.new(0, 323, 0, 40)
  754.  
  755. expand.Name = "expand"
  756. expand.Parent = Dropdown
  757. expand.AnchorPoint = Vector2.new(0.5, 0.5)
  758. expand.BackgroundTransparency = 1.000
  759. expand.Position = UDim2.new(0.89009285, 0, 0.5, 0)
  760. expand.Size = UDim2.new(0, 25, 0, 25)
  761. expand.ZIndex = 2
  762. expand.Image = "rbxassetid://3926305904"
  763. expand.ImageRectOffset = Vector2.new(564, 284)
  764. expand.ImageRectSize = Vector2.new(36, 36)
  765. expand.Rotation = -180
  766.  
  767. TextLabel.Parent = Dropdown
  768. TextLabel.AnchorPoint = Vector2.new(0.5, 0.5)
  769. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  770. TextLabel.BackgroundTransparency = 1.000
  771. TextLabel.Position = UDim2.new(0.695404172, 0, 0.5, 0)
  772. TextLabel.Size = UDim2.new(0, 90, 0, 40)
  773. TextLabel.Font = Enum.Font.Code
  774. TextLabel.Text = text
  775. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  776. TextLabel.TextSize = 14.000
  777. TextLabel.TextWrapped = true
  778. TextLabel.TextXAlignment = Enum.TextXAlignment.Right
  779.  
  780. TextLabel_2.Parent = Dropdown
  781. TextLabel_2.AnchorPoint = Vector2.new(0.5, 0.5)
  782. TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  783. TextLabel_2.BackgroundTransparency = 1.000
  784. TextLabel_2.Position = UDim2.new(0.282865435, 0, 0.5, 0)
  785. TextLabel_2.Size = UDim2.new(0, 176, 0, 40)
  786. TextLabel_2.Font = Enum.Font.Code
  787. TextLabel_2.Text = "Selected: nil"
  788. TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  789. TextLabel_2.TextSize = 14.000
  790. TextLabel_2.TextWrapped = true
  791. TextLabel_2.TextXAlignment = Enum.TextXAlignment.Right
  792.  
  793. UIGridLayout.Parent = Container
  794. UIGridLayout.SortOrder = Enum.SortOrder.LayoutOrder
  795. UIGridLayout.CellSize = UDim2.new(0, 323, 0, 40)
  796.  
  797. for i, item in pairs(items) do
  798. item = (typeof(item) == "Instance") and item.Name or item
  799. print(item)
  800. local Item = Instance.new("TextButton")
  801.  
  802. Item.Name = "Item"
  803. Item.Parent = Container
  804. Item.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  805. Item.Size = UDim2.new(0, 200, 0, 50)
  806. Item.Font = Enum.Font.Code
  807. Item.Text = item
  808. Item.TextColor3 = Color3.fromRGB(255, 255, 255)
  809. Item.TextSize = 14.000
  810. Item.AutoButtonColor = false
  811. Item.BorderSizePixel = 0
  812.  
  813. Item.MouseButton1Down:Connect(function()
  814. visible = not visible
  815. TextLabel_2.Text = "Selected: "..item
  816. buttonClickEffect(Frame)
  817. dropdownEffect(Container, expand, "TextButton", visible, -180, -90)
  818. callback(item)
  819. end)
  820. end
  821.  
  822. expand.MouseButton1Down:Connect(function()
  823. visible = not visible
  824. dropdownEffect(Container, expand, "TextButton", visible, -180, -90)
  825. end)
  826. end
  827.  
  828. return library4
  829. end
  830.  
  831. return library3
  832. end
  833.  
  834. return library2
  835. end
  836.  
  837. return library
  838.  
  839. --[[
  840. library:NewWindow(string: title):NewTab(string: text):NewSection(string: text):NewButton(string: text, function: callback)
  841. NewTextBox(string: text, function: callback)
  842. NewToggle(string: text, function: callback)
  843. NewSlider(string: text, number: min, number: max, function: callback)
  844. NewDropdown(string: text, table: items, function: callback)
  845. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement