joefromsansnite

Untitled

Oct 8th, 2021
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.05 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.  
  152. TabContainer.Name = "TabContainer"
  153. TabContainer.Parent = Background
  154. TabContainer.Active = true
  155. TabContainer.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  156. TabContainer.BorderSizePixel = 0
  157. TabContainer.Position = UDim2.new(0, 0, 0.156208143, 0)
  158. TabContainer.Size = UDim2.new(0, 154, 0, 227)
  159. TabContainer.ScrollBarThickness = 8
  160.  
  161. UIStroke_2.Parent = TabContainer
  162.  
  163. UIListLayout.Parent = TabContainer
  164. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  165. UIListLayout.Padding = UDim.new(0, 5)
  166.  
  167. FramesContainer.Name = "FramesContainer"
  168. FramesContainer.Parent = Background
  169. FramesContainer.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  170. FramesContainer.BackgroundTransparency = 1.000
  171. FramesContainer.Position = UDim2.new(0.317525774, 0, 0, 0)
  172. FramesContainer.Size = UDim2.new(0, 331, 0, 268)
  173. FramesContainer.ZIndex = 0
  174.  
  175.  
  176. -- Local Functions
  177. local function createContainer(parent)
  178. local Container = Instance.new("Frame")
  179. local UICorner = Instance.new("UICorner")
  180. local UIStroke = Instance.new("UIStroke")
  181.  
  182. Container.Name = "Container"
  183. Container.Parent = parent
  184. Container.AnchorPoint = Vector2.new(0.5, 0.5)
  185. Container.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  186. Container.BorderSizePixel = 0
  187. Container.Position = UDim2.new(0.487915397, 0, 0.490423739, 0)
  188. Container.Size = UDim2.new(0, 323, 0, 40)
  189.  
  190. UICorner.Parent = Container
  191. UIStroke.Parent = Container
  192.  
  193. return Container
  194. end
  195. local function hideFrames()
  196. for i,v in pairs(FramesContainer:GetChildren()) do
  197. v.Visible = false
  198. end
  199. end
  200. local function resetTabColor()
  201. for i, v in pairs(TabContainer:GetChildren()) do
  202. if v:IsA("TextButton") then
  203. v.BackgroundColor3 = Color3.fromRGB(15, 15, 15)
  204. end
  205. end
  206. end
  207. local function buttonClickEffect(parent)
  208. parent.ClipsDescendants = true
  209.  
  210. local mouseLocation = uis:GetMouseLocation()
  211. local absolutePosition = parent.AbsolutePosition
  212.  
  213. local effectXPosition = UDim2.new(0, mouseLocation.X-absolutePosition.X, 0, (mouseLocation.Y-absolutePosition.Y)-36)
  214.  
  215. local ButtonEffect = Instance.new("ImageLabel")
  216.  
  217. ButtonEffect.Name = "ButtonEffect"
  218. ButtonEffect.Parent = parent
  219. ButtonEffect.AnchorPoint = Vector2.new(0.5, 0.5)
  220. ButtonEffect.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  221. ButtonEffect.BackgroundTransparency = 1.000
  222. ButtonEffect.BorderSizePixel = 0
  223. ButtonEffect.Position = UDim2.new(0, 0, 0, 0)
  224. ButtonEffect.Size = UDim2.new(0, 25, 0, 25)
  225. ButtonEffect.Image = "rbxassetid://7658630902"
  226. ButtonEffect.ImageTransparency = 0.500
  227. ButtonEffect.Position = effectXPosition
  228.  
  229. ButtonEffect:TweenSize(UDim2.new(0, 200, 0, 200))
  230.  
  231. spawn(function()
  232. for i = 0.5, 1.05, 0.05 do
  233. ButtonEffect.ImageTransparency = i
  234. if i >= 1 then
  235. ButtonEffect:Destroy()
  236. end
  237. wait()
  238. end
  239. end)
  240. end
  241. local function dropdownEffect(ui, visible, rot1, rot2)
  242. local properties = (visible == true) and {
  243. Rotation = rot1
  244. } or {
  245. Rotation = rot2
  246. }
  247.  
  248. local info = TweenInfo.new(0.5)
  249. local tween = tweenService:Create(ui, info, properties)
  250.  
  251. tween:Play()
  252. end
  253.  
  254. local visible = true
  255. local debounce = false
  256. local function minimize()
  257. if debounce == false then
  258. debounce = true
  259.  
  260. visible = not visible
  261.  
  262. local sizeAndPos = visible == true and {
  263. UDim2.new(0, 485, 0, 269),
  264. UDim2.new(0.5, 0, 9.86166763, 0)
  265. } or {
  266. UDim2.new(0, 485, 0, 0),
  267. UDim2.new(0.5, 0, 1, 0)
  268. }
  269. Background:TweenSizeAndPosition(sizeAndPos[1], sizeAndPos[2])
  270. dropdownEffect(expand, visible, 180, 0)
  271.  
  272. task.wait(1)
  273. debounce = false
  274. end
  275. end
  276. local function setDraggable()
  277. Menu.Active = true
  278. Menu.Draggable = true
  279. end
  280. local function exit()
  281. ScreenGui:Destroy()
  282. end
  283.  
  284.  
  285. -- Call Functions
  286. setDraggable()
  287. close.MouseButton1Down:Connect(exit)
  288. expand.MouseButton1Down:Connect(minimize)
  289.  
  290.  
  291. -- Tab
  292. local library2 = {}
  293.  
  294. function library2:NewTab(text)
  295. text = (type(text) ~= "string") and "Tab" or text
  296.  
  297. local Tab = Instance.new("TextButton")
  298. local UICorner_2 = Instance.new("UICorner")
  299. local TabOutline = Instance.new("Frame")
  300. local UICorner_3 = Instance.new("UICorner")
  301. local ScrollingFrame = Instance.new("ScrollingFrame")
  302. local UIListLayout_2 = Instance.new("UIListLayout")
  303. local UIStroke = Instance.new("UIStroke")
  304.  
  305. Tab.Name = "Tab"
  306. Tab.Parent = TabContainer
  307. Tab.BackgroundColor3 = Color3.fromRGB(15, 15, 15)
  308. Tab.Size = UDim2.new(0, 138, 0, 30)
  309. Tab.Font = Enum.Font.Code
  310. Tab.Text = text
  311. Tab.TextColor3 = Color3.fromRGB(255, 255, 255)
  312. Tab.TextSize = 17.000
  313. Tab.AutoButtonColor = false
  314.  
  315. UICorner_2.Parent = Tab
  316.  
  317. TabOutline.Name = "TabOutline"
  318. TabOutline.Parent = Tab
  319. TabOutline.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  320. TabOutline.BackgroundTransparency = 1.000
  321. TabOutline.Size = UDim2.new(0, 137, 0, 29)
  322.  
  323. UICorner_3.Parent = TabOutline
  324. UIStroke.Parent = TabOutline
  325.  
  326. ScrollingFrame.Parent = FramesContainer
  327. ScrollingFrame.Active = true
  328. ScrollingFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  329. ScrollingFrame.BackgroundTransparency = 1.000
  330. ScrollingFrame.BorderSizePixel = 0
  331. ScrollingFrame.Size = UDim2.new(0, 331, 0, 268)
  332. ScrollingFrame.ScrollBarThickness = 8
  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.  
  413. task.spawn(function()
  414. for i, v in pairs(Section:GetChildren()) do
  415. if v:IsA("Frame") then
  416. v.Visible = visible
  417. task.wait()
  418. end
  419. end
  420. end)
  421.  
  422. dropdownEffect(expand_2, visible, -180, -90)
  423. end)
  424.  
  425. local library4 = {}
  426.  
  427. function library4:NewButton(text, callback)
  428. text = (type(text) ~= "string") and "Button" or text
  429. callback = (type(callback) ~= "function") and function()
  430. print("Clicked!")
  431. end or callback
  432.  
  433. local TextButton = Instance.new("TextButton")
  434. local UICorner_9 = Instance.new("UICorner")
  435. local TextLabel_2 = Instance.new("TextLabel")
  436. local Container = createContainer(Section)
  437.  
  438. TextButton.Parent = Container
  439. TextButton.AnchorPoint = Vector2.new(0.5, 0.5)
  440. TextButton.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  441. TextButton.Position = UDim2.new(0.666163146, 0, 0.483181775, 0)
  442. TextButton.Size = UDim2.new(0, 180, 0, 36)
  443. TextButton.Font = Enum.Font.Code
  444. TextButton.Text = "Click"
  445. TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  446. TextButton.TextSize = 14.000
  447. TextButton.AutoButtonColor = false
  448.  
  449. UICorner_9.Parent = TextButton
  450.  
  451. TextLabel_2.Parent = Container
  452. TextLabel_2.AnchorPoint = Vector2.new(0.5, 0.5)
  453. TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  454. TextLabel_2.BackgroundTransparency = 1.000
  455. TextLabel_2.Position = UDim2.new(0.18, 0, 0.49999994, 0)
  456. TextLabel_2.Size = UDim2.new(0, 128, 0, 50)
  457. TextLabel_2.Font = Enum.Font.Code
  458. TextLabel_2.Text = text
  459. TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  460. TextLabel_2.TextSize = 14.000
  461.  
  462. TextButton.MouseButton1Down:Connect(function()
  463. buttonClickEffect(TextButton)
  464. callback()
  465. end)
  466. end
  467.  
  468. function library4:NewTextBox(text, callback)
  469. text = (type(text) ~= "string") and "TextBox" or text
  470. callback = (type(callback) ~= "function") and function()
  471. print("Lost Focus!")
  472. end or callback
  473.  
  474. local UICorner_6 = Instance.new("UICorner")
  475. local TextBox = Instance.new("TextBox")
  476. local UICorner_7 = Instance.new("UICorner")
  477. local TextLabel = Instance.new("TextLabel")
  478. local Container = createContainer(Section)
  479.  
  480. TextBox.Parent = Container
  481. TextBox.AnchorPoint = Vector2.new(0.5, 0.5)
  482. TextBox.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  483. TextBox.Position = UDim2.new(0.666000009, 0, 0.48300001, 0)
  484. TextBox.Size = UDim2.new(0, 180, 0, 36)
  485. TextBox.Font = Enum.Font.SourceSans
  486. TextBox.PlaceholderText = "TextBox"
  487. TextBox.Text = ""
  488. TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  489. TextBox.TextSize = 14.000
  490. TextBox.TextStrokeColor3 = Color3.fromRGB(255, 255, 255)
  491.  
  492. UICorner_7.Parent = TextBox
  493.  
  494. TextLabel.Parent = Container
  495. TextLabel.AnchorPoint = Vector2.new(0.5, 0.5)
  496. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  497. TextLabel.BackgroundTransparency = 1.000
  498. TextLabel.Position = UDim2.new(0.18, 0, 0.49999994, 0)
  499. TextLabel.Size = UDim2.new(0, 128, 0, 50)
  500. TextLabel.Font = Enum.Font.Code
  501. TextLabel.Text = text
  502. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  503. TextLabel.TextSize = 14.000
  504.  
  505. TextBox.FocusLost:Connect(function()
  506. callback(TextBox.Text)
  507. end)
  508. end
  509.  
  510. function library4:NewToggle(text, callback)
  511. text = (type(text) ~= "string") and "Toggle" or text
  512. callback = (type(callback) ~= "function") and function()
  513. print("Toggled!")
  514. end or callback
  515.  
  516. local Toggle = Instance.new("Frame")
  517. local UICorner_15 = Instance.new("UICorner")
  518. local check = Instance.new("ImageButton")
  519. local TextLabel_5 = Instance.new("TextLabel")
  520. local Container = createContainer(Section)
  521.  
  522. local toggled = true
  523.  
  524. UICorner_15.CornerRadius = UDim.new(0, 10)
  525. UICorner_15.Parent = Toggle
  526.  
  527. Toggle.Name = "Toggle"
  528. Toggle.Parent = Container
  529. Toggle.AnchorPoint = Vector2.new(0.5, 0.5)
  530. Toggle.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  531. Toggle.Position = UDim2.new(0.88499999, 0, 0.5, 0)
  532. Toggle.Size = UDim2.new(0, 35, 0, 35)
  533.  
  534. check.Name = "check"
  535. check.Parent = Toggle
  536. check.AnchorPoint = Vector2.new(0.5, 0.5)
  537. check.BackgroundTransparency = 1.000
  538. check.Position = UDim2.new(0.5, 0, 0.5, 0)
  539. check.Size = UDim2.new(0, 30, 0, 30)
  540. check.ZIndex = 2
  541. check.Image = "rbxassetid://3926305904"
  542. check.ImageColor3 = Color3.fromRGB(255, 255, 0)
  543. check.ImageRectOffset = Vector2.new(312, 4)
  544. check.ImageRectSize = Vector2.new(24, 24)
  545.  
  546. TextLabel_5.Parent = Toggle
  547. TextLabel_5.AnchorPoint = Vector2.new(0.5, 0.5)
  548. TextLabel_5.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  549. TextLabel_5.BackgroundTransparency = 1.000
  550. TextLabel_5.Position = UDim2.new(-1.19761908, 0, 0.5, 0)
  551. TextLabel_5.Size = UDim2.new(0, 82, 0, 50)
  552. TextLabel_5.Font = Enum.Font.Code
  553. TextLabel_5.Text = text
  554. TextLabel_5.TextColor3 = Color3.fromRGB(255, 255, 255)
  555. TextLabel_5.TextSize = 14.000
  556.  
  557. check.MouseButton1Down:Connect(function()
  558. toggled = not toggled
  559. check.ImageTransparency = (toggled == true) and 0 or 1
  560.  
  561. callback(toggled)
  562. end)
  563. end
  564.  
  565. function library4:NewSlider(text, min, max, callback)
  566. text = (type(text) ~= "string") and "Slider" or text
  567. min = (type(min) ~= "number") and 0 or min
  568. max = (type(max) ~= "number") and 10 or max
  569. callback = (type(callback) ~= "function") and function()
  570. print("Moved Slider!")
  571. end or callback
  572.  
  573. local Slider = Instance.new("Frame")
  574. local TextLabel_3 = Instance.new("TextLabel")
  575. local TextLabel_4 = Instance.new("TextLabel")
  576. local UICorner_10 = Instance.new("UICorner")
  577. local FillFrame = Instance.new("Frame")
  578. local UICorner_11 = Instance.new("UICorner")
  579. local SliderButton = Instance.new("TextButton")
  580. local UICorner_12 = Instance.new("UICorner")
  581. local UICorner_13 = Instance.new("UICorner")
  582. local UICorner_14 = Instance.new("UICorner")
  583. local Container = createContainer(Section)
  584.  
  585. local holding = false
  586.  
  587. Slider.Name = "Slider"
  588. Slider.Parent = Container
  589. Slider.AnchorPoint = Vector2.new(0.5, 0.5)
  590. Slider.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  591. Slider.Position = UDim2.new(0.672542334, 0, 0.50999999, 0)
  592. Slider.Size = UDim2.new(0, 175, 0, 10)
  593.  
  594. TextLabel_3.Parent = Slider
  595. TextLabel_3.AnchorPoint = Vector2.new(0.5, 0.5)
  596. TextLabel_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  597. TextLabel_3.BackgroundTransparency = 1.000
  598. TextLabel_3.Position = UDim2.new(-0.511904776, 0, 0.5, 0)
  599. TextLabel_3.Size = UDim2.new(0, 82, 0, 50)
  600. TextLabel_3.Font = Enum.Font.Code
  601. TextLabel_3.Text = text
  602. TextLabel_3.TextColor3 = Color3.fromRGB(255, 255, 255)
  603. TextLabel_3.TextSize = 14.000
  604.  
  605. TextLabel_4.Parent = Slider
  606. TextLabel_4.AnchorPoint = Vector2.new(0.5, 0.5)
  607. TextLabel_4.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  608. TextLabel_4.BackgroundTransparency = 1.000
  609. TextLabel_4.Position = UDim2.new(-0.145238101, 0, 0.5, 0)
  610. TextLabel_4.Size = UDim2.new(0, 50, 0, 50)
  611. TextLabel_4.Font = Enum.Font.Code
  612. TextLabel_4.Text = min
  613. TextLabel_4.TextColor3 = Color3.fromRGB(255, 255, 255)
  614. TextLabel_4.TextSize = 14.000
  615.  
  616. UICorner_10.Parent = Slider
  617.  
  618. FillFrame.Name = "FillFrame"
  619. FillFrame.Parent = Slider
  620. FillFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  621. FillFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 0)
  622. FillFrame.Position = UDim2.new(0, 0, 0.5, 0)
  623. FillFrame.Size = UDim2.new(0, 0, 0, 10)
  624. FillFrame.ZIndex = 0
  625.  
  626. UICorner_11.Parent = FillFrame
  627.  
  628. SliderButton.Name = "SliderButton"
  629. SliderButton.Parent = Slider
  630. SliderButton.AnchorPoint = Vector2.new(0.5, 0.5)
  631. SliderButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  632. SliderButton.Position = UDim2.new(0, 0, 0.5, 0)
  633. SliderButton.Size = UDim2.new(0, 10, 0, 10)
  634. SliderButton.Font = Enum.Font.SourceSans
  635. SliderButton.Text = ""
  636. SliderButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  637. SliderButton.TextSize = 14.000
  638. SliderButton.AutoButtonColor = false
  639.  
  640. UICorner_12.CornerRadius = UDim.new(1, 0)
  641. UICorner_12.Parent = SliderButton
  642.  
  643. SliderButton.MouseButton1Down:Connect(function()
  644. holding = true
  645. SliderButton.Size = UDim2.new(0, 12, 0, 12)
  646. end)
  647. SliderButton.MouseButton1Up:Connect(function()
  648. holding = false
  649. SliderButton.Size = UDim2.new(0, 10, 0, 10)
  650. end)
  651.  
  652. runService.Heartbeat:Connect(function()
  653. if holding then
  654. local mouseLocation = uis:GetMouseLocation()
  655.  
  656. local xPos = (mouseLocation.X-Slider.AbsolutePosition.X)/Slider.AbsoluteSize.X
  657. xPos = math.clamp(xPos, 0, 1)
  658.  
  659. local value = math.ceil( min + (xPos * (max-min)) )
  660.  
  661. TextLabel_4.Text = tostring(value)
  662.  
  663. FillFrame.Size = UDim2.new(xPos, 0, 0, 10)
  664. FillFrame.Position = UDim2.new(xPos/2, 0, 0.5, 0)
  665. SliderButton.Position = UDim2.new(xPos, 0, 0.5, 0)
  666.  
  667. callback(value)
  668. end
  669. end)
  670. end
  671.  
  672. return library4
  673. end
  674.  
  675. return library3
  676. end
  677.  
  678. return library2
  679. end
  680.  
  681. return library
  682.  
Advertisement
Add Comment
Please, Sign In to add comment