joefromsansnite

Untitled

Oct 8th, 2021
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.07 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, 5)
  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(15, 15, 15)
  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(ui, visible, rot1, rot2)
  243. local properties = (visible == true) and {
  244. Rotation = rot1
  245. } or {
  246. Rotation = rot2
  247. }
  248.  
  249. local info = TweenInfo.new(0.5)
  250. local tween = tweenService:Create(ui, info, properties)
  251.  
  252. tween:Play()
  253. end
  254.  
  255. local visible = true
  256. local debounce = false
  257. local function minimize()
  258. if debounce == false then
  259. debounce = true
  260.  
  261. visible = not visible
  262.  
  263. local sizeAndPos = visible == true and {
  264. UDim2.new(0, 485, 0, 269),
  265. UDim2.new(0.5, 0, 9.86166763, 0)
  266. } or {
  267. UDim2.new(0, 485, 0, 0),
  268. UDim2.new(0.5, 0, 1, 0)
  269. }
  270. Background:TweenSizeAndPosition(sizeAndPos[1], sizeAndPos[2])
  271. dropdownEffect(expand, visible, 180, 0)
  272.  
  273. task.wait(1)
  274. debounce = false
  275. end
  276. end
  277. local function setDraggable()
  278. Menu.Active = true
  279. Menu.Draggable = true
  280. end
  281. local function exit()
  282. ScreenGui:Destroy()
  283. end
  284.  
  285.  
  286. -- Call Functions
  287. setDraggable()
  288. close.MouseButton1Down:Connect(exit)
  289. expand.MouseButton1Down:Connect(minimize)
  290.  
  291.  
  292. -- Tab
  293. local library2 = {}
  294.  
  295. function library2:NewTab(text)
  296. text = (type(text) ~= "string") and "Tab" or text
  297.  
  298. local Tab = Instance.new("TextButton")
  299. local UICorner_2 = Instance.new("UICorner")
  300. local TabOutline = Instance.new("Frame")
  301. local UICorner_3 = Instance.new("UICorner")
  302. local ScrollingFrame = Instance.new("ScrollingFrame")
  303. local UIListLayout_2 = Instance.new("UIListLayout")
  304. local UIStroke = Instance.new("UIStroke")
  305.  
  306. Tab.Name = "Tab"
  307. Tab.Parent = TabContainer
  308. Tab.BackgroundColor3 = Color3.fromRGB(15, 15, 15)
  309. Tab.Size = UDim2.new(0, 138, 0, 30)
  310. Tab.Font = Enum.Font.Code
  311. Tab.Text = text
  312. Tab.TextColor3 = Color3.fromRGB(255, 255, 255)
  313. Tab.TextSize = 17.000
  314. Tab.AutoButtonColor = false
  315.  
  316. UICorner_2.Parent = Tab
  317.  
  318. TabOutline.Name = "TabOutline"
  319. TabOutline.Parent = Tab
  320. TabOutline.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  321. TabOutline.BackgroundTransparency = 1.000
  322. TabOutline.Size = UDim2.new(0, 137, 0, 29)
  323.  
  324. UICorner_3.Parent = TabOutline
  325. UIStroke.Parent = TabOutline
  326.  
  327. ScrollingFrame.Parent = FramesContainer
  328. ScrollingFrame.Active = true
  329. ScrollingFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  330. ScrollingFrame.BackgroundTransparency = 1.000
  331. ScrollingFrame.BorderSizePixel = 0
  332. ScrollingFrame.Size = UDim2.new(0, 331, 0, 268)
  333. ScrollingFrame.ScrollBarThickness = 8
  334.  
  335. UIListLayout_2.Parent = ScrollingFrame
  336. UIListLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
  337. UIListLayout_2.Padding = UDim.new(0, 7)
  338.  
  339. hideFrames()
  340. Tab.MouseButton1Down:Connect(function()
  341. buttonClickEffect(Tab)
  342. resetTabColor()
  343. hideFrames()
  344.  
  345. ScrollingFrame.Visible = true
  346. Tab.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  347. end)
  348.  
  349. local library3 = {}
  350.  
  351. function library3:NewSection(text)
  352. text = (type(text) ~= "string") and "Section" or text
  353.  
  354. local Section = Instance.new("Frame")
  355. local SectionText = Instance.new("TextLabel")
  356. local UICorner_4 = Instance.new("UICorner")
  357. local expand_2 = Instance.new("ImageButton")
  358. local Frame = Instance.new("Frame")
  359. local UICorner_5 = Instance.new("UICorner")
  360. local UIListLayout_3 = Instance.new("UIListLayout")
  361. local UIStroke = Instance.new("UIStroke")
  362. local UIStroke_1 = Instance.new("UIStroke")
  363.  
  364. local visible = false
  365.  
  366. Section.Name = "Section"
  367. Section.Parent = ScrollingFrame
  368. Section.BackgroundColor3 = Color3.fromRGB(17, 17, 17)
  369. Section.BorderSizePixel = 0
  370. Section.Size = UDim2.new(0, 331, 0, 53)
  371. Section.AutomaticSize = Enum.AutomaticSize.Y
  372.  
  373. UIStroke.Parent = Section
  374.  
  375. SectionText.Name = "SectionText"
  376. SectionText.Parent = Section
  377. SectionText.BackgroundColor3 = Color3.fromRGB(15, 15, 15)
  378. SectionText.BorderSizePixel = 0
  379. SectionText.Size = UDim2.new(0, 323, 0, 40)
  380. SectionText.Font = Enum.Font.SourceSans
  381. SectionText.Text = text
  382. SectionText.TextColor3 = Color3.fromRGB(255, 255, 255)
  383. SectionText.TextSize = 25.000
  384.  
  385. UICorner_4.Parent = SectionText
  386.  
  387. expand_2.Name = "expand"
  388. expand_2.Parent = SectionText
  389. expand_2.AnchorPoint = Vector2.new(0.5, 0.5)
  390. expand_2.BackgroundTransparency = 1.000
  391. expand_2.Position = UDim2.new(0.0799999982, 0, 0.5, 0)
  392. expand_2.Size = UDim2.new(0, 25, 0, 25)
  393. expand_2.ZIndex = 2
  394. expand_2.Image = "rbxassetid://3926305904"
  395. expand_2.ImageRectOffset = Vector2.new(564, 284)
  396. expand_2.ImageRectSize = Vector2.new(36, 36)
  397. expand_2.Rotation = -180
  398.  
  399. Frame.Parent = SectionText
  400. Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  401. Frame.BackgroundTransparency = 1.000
  402. Frame.Size = UDim2.new(0, 322, 0, 40)
  403.  
  404. UICorner_5.Parent = Frame
  405. UIStroke_1.Parent = Frame
  406.  
  407. UIListLayout_3.Parent = Section
  408. UIListLayout_3.SortOrder = Enum.SortOrder.LayoutOrder
  409. UIListLayout_3.Padding = UDim.new(0, 7)
  410.  
  411. expand_2.MouseButton1Down:Connect(function()
  412. visible = not visible
  413.  
  414. task.spawn(function()
  415. for i, v in pairs(Section:GetChildren()) do
  416. if v:IsA("Frame") then
  417. v.Visible = visible
  418. task.wait()
  419. end
  420. end
  421. end)
  422.  
  423. dropdownEffect(expand_2, visible, -180, -90)
  424. end)
  425.  
  426. local library4 = {}
  427.  
  428. function library4:NewButton(text, callback)
  429. text = (type(text) ~= "string") and "Button" or text
  430. callback = (type(callback) ~= "function") and function()
  431. print("Clicked!")
  432. end or callback
  433.  
  434. local TextButton = Instance.new("TextButton")
  435. local UICorner_9 = Instance.new("UICorner")
  436. local TextLabel_2 = Instance.new("TextLabel")
  437. local Container = createContainer(Section)
  438.  
  439. TextButton.Parent = Container
  440. TextButton.AnchorPoint = Vector2.new(0.5, 0.5)
  441. TextButton.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  442. TextButton.Position = UDim2.new(0.666163146, 0, 0.483181775, 0)
  443. TextButton.Size = UDim2.new(0, 180, 0, 36)
  444. TextButton.Font = Enum.Font.Code
  445. TextButton.Text = "Click"
  446. TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  447. TextButton.TextSize = 14.000
  448. TextButton.AutoButtonColor = false
  449.  
  450. UICorner_9.Parent = TextButton
  451.  
  452. TextLabel_2.Parent = Container
  453. TextLabel_2.AnchorPoint = Vector2.new(0.5, 0.5)
  454. TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  455. TextLabel_2.BackgroundTransparency = 1.000
  456. TextLabel_2.Position = UDim2.new(0.18, 0, 0.49999994, 0)
  457. TextLabel_2.Size = UDim2.new(0, 128, 0, 50)
  458. TextLabel_2.Font = Enum.Font.Code
  459. TextLabel_2.Text = text
  460. TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  461. TextLabel_2.TextSize = 14.000
  462.  
  463. TextButton.MouseButton1Down:Connect(function()
  464. buttonClickEffect(TextButton)
  465. callback()
  466. end)
  467. end
  468.  
  469. function library4:NewTextBox(text, callback)
  470. text = (type(text) ~= "string") and "TextBox" or text
  471. callback = (type(callback) ~= "function") and function()
  472. print("Lost Focus!")
  473. end or callback
  474.  
  475. local UICorner_6 = Instance.new("UICorner")
  476. local TextBox = Instance.new("TextBox")
  477. local UICorner_7 = Instance.new("UICorner")
  478. local TextLabel = Instance.new("TextLabel")
  479. local Container = createContainer(Section)
  480.  
  481. TextBox.Parent = Container
  482. TextBox.AnchorPoint = Vector2.new(0.5, 0.5)
  483. TextBox.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  484. TextBox.Position = UDim2.new(0.666000009, 0, 0.48300001, 0)
  485. TextBox.Size = UDim2.new(0, 180, 0, 36)
  486. TextBox.Font = Enum.Font.SourceSans
  487. TextBox.PlaceholderText = "TextBox"
  488. TextBox.Text = ""
  489. TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  490. TextBox.TextSize = 14.000
  491. TextBox.TextStrokeColor3 = Color3.fromRGB(255, 255, 255)
  492.  
  493. UICorner_7.Parent = TextBox
  494.  
  495. TextLabel.Parent = Container
  496. TextLabel.AnchorPoint = Vector2.new(0.5, 0.5)
  497. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  498. TextLabel.BackgroundTransparency = 1.000
  499. TextLabel.Position = UDim2.new(0.18, 0, 0.49999994, 0)
  500. TextLabel.Size = UDim2.new(0, 128, 0, 50)
  501. TextLabel.Font = Enum.Font.Code
  502. TextLabel.Text = text
  503. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  504. TextLabel.TextSize = 14.000
  505.  
  506. TextBox.FocusLost:Connect(function()
  507. callback(TextBox.Text)
  508. end)
  509. end
  510.  
  511. function library4:NewToggle(text, callback)
  512. text = (type(text) ~= "string") and "Toggle" or text
  513. callback = (type(callback) ~= "function") and function()
  514. print("Toggled!")
  515. end or callback
  516.  
  517. local Toggle = Instance.new("Frame")
  518. local UICorner_15 = Instance.new("UICorner")
  519. local check = Instance.new("ImageButton")
  520. local TextLabel_5 = Instance.new("TextLabel")
  521. local Container = createContainer(Section)
  522.  
  523. local toggled = true
  524.  
  525. UICorner_15.CornerRadius = UDim.new(0, 10)
  526. UICorner_15.Parent = Toggle
  527.  
  528. Toggle.Name = "Toggle"
  529. Toggle.Parent = Container
  530. Toggle.AnchorPoint = Vector2.new(0.5, 0.5)
  531. Toggle.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  532. Toggle.Position = UDim2.new(0.88499999, 0, 0.5, 0)
  533. Toggle.Size = UDim2.new(0, 35, 0, 35)
  534.  
  535. check.Name = "check"
  536. check.Parent = Toggle
  537. check.AnchorPoint = Vector2.new(0.5, 0.5)
  538. check.BackgroundTransparency = 1.000
  539. check.Position = UDim2.new(0.5, 0, 0.5, 0)
  540. check.Size = UDim2.new(0, 30, 0, 30)
  541. check.ZIndex = 2
  542. check.Image = "rbxassetid://3926305904"
  543. check.ImageColor3 = Color3.fromRGB(255, 255, 0)
  544. check.ImageRectOffset = Vector2.new(312, 4)
  545. check.ImageRectSize = Vector2.new(24, 24)
  546.  
  547. TextLabel_5.Parent = Toggle
  548. TextLabel_5.AnchorPoint = Vector2.new(0.5, 0.5)
  549. TextLabel_5.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  550. TextLabel_5.BackgroundTransparency = 1.000
  551. TextLabel_5.Position = UDim2.new(-1.19761908, 0, 0.5, 0)
  552. TextLabel_5.Size = UDim2.new(0, 82, 0, 50)
  553. TextLabel_5.Font = Enum.Font.Code
  554. TextLabel_5.Text = text
  555. TextLabel_5.TextColor3 = Color3.fromRGB(255, 255, 255)
  556. TextLabel_5.TextSize = 14.000
  557.  
  558. check.MouseButton1Down:Connect(function()
  559. toggled = not toggled
  560. check.ImageTransparency = (toggled == true) and 0 or 1
  561.  
  562. callback(toggled)
  563. end)
  564. end
  565.  
  566. function library4:NewSlider(text, min, max, callback)
  567. text = (type(text) ~= "string") and "Slider" or text
  568. min = (type(min) ~= "number") and 0 or min
  569. max = (type(max) ~= "number") and 10 or max
  570. callback = (type(callback) ~= "function") and function()
  571. print("Moved Slider!")
  572. end or callback
  573.  
  574. local Slider = Instance.new("Frame")
  575. local TextLabel_3 = Instance.new("TextLabel")
  576. local TextLabel_4 = Instance.new("TextLabel")
  577. local UICorner_10 = Instance.new("UICorner")
  578. local FillFrame = Instance.new("Frame")
  579. local UICorner_11 = Instance.new("UICorner")
  580. local SliderButton = Instance.new("TextButton")
  581. local UICorner_12 = Instance.new("UICorner")
  582. local UICorner_13 = Instance.new("UICorner")
  583. local UICorner_14 = Instance.new("UICorner")
  584. local Container = createContainer(Section)
  585.  
  586. local holding = false
  587.  
  588. Slider.Name = "Slider"
  589. Slider.Parent = Container
  590. Slider.AnchorPoint = Vector2.new(0.5, 0.5)
  591. Slider.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  592. Slider.Position = UDim2.new(0.672542334, 0, 0.50999999, 0)
  593. Slider.Size = UDim2.new(0, 175, 0, 10)
  594.  
  595. TextLabel_3.Parent = Slider
  596. TextLabel_3.AnchorPoint = Vector2.new(0.5, 0.5)
  597. TextLabel_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  598. TextLabel_3.BackgroundTransparency = 1.000
  599. TextLabel_3.Position = UDim2.new(-0.511904776, 0, 0.5, 0)
  600. TextLabel_3.Size = UDim2.new(0, 82, 0, 50)
  601. TextLabel_3.Font = Enum.Font.Code
  602. TextLabel_3.Text = text
  603. TextLabel_3.TextColor3 = Color3.fromRGB(255, 255, 255)
  604. TextLabel_3.TextSize = 14.000
  605.  
  606. TextLabel_4.Parent = Slider
  607. TextLabel_4.AnchorPoint = Vector2.new(0.5, 0.5)
  608. TextLabel_4.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  609. TextLabel_4.BackgroundTransparency = 1.000
  610. TextLabel_4.Position = UDim2.new(-0.145238101, 0, 0.5, 0)
  611. TextLabel_4.Size = UDim2.new(0, 50, 0, 50)
  612. TextLabel_4.Font = Enum.Font.Code
  613. TextLabel_4.Text = min
  614. TextLabel_4.TextColor3 = Color3.fromRGB(255, 255, 255)
  615. TextLabel_4.TextSize = 14.000
  616.  
  617. UICorner_10.Parent = Slider
  618.  
  619. FillFrame.Name = "FillFrame"
  620. FillFrame.Parent = Slider
  621. FillFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  622. FillFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 0)
  623. FillFrame.Position = UDim2.new(0, 0, 0.5, 0)
  624. FillFrame.Size = UDim2.new(0, 0, 0, 10)
  625. FillFrame.ZIndex = 0
  626.  
  627. UICorner_11.Parent = FillFrame
  628.  
  629. SliderButton.Name = "SliderButton"
  630. SliderButton.Parent = Slider
  631. SliderButton.AnchorPoint = Vector2.new(0.5, 0.5)
  632. SliderButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  633. SliderButton.Position = UDim2.new(0, 0, 0.5, 0)
  634. SliderButton.Size = UDim2.new(0, 10, 0, 10)
  635. SliderButton.Font = Enum.Font.SourceSans
  636. SliderButton.Text = ""
  637. SliderButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  638. SliderButton.TextSize = 14.000
  639. SliderButton.AutoButtonColor = false
  640.  
  641. UICorner_12.CornerRadius = UDim.new(1, 0)
  642. UICorner_12.Parent = SliderButton
  643.  
  644. SliderButton.MouseButton1Down:Connect(function()
  645. holding = true
  646. SliderButton.Size = UDim2.new(0, 12, 0, 12)
  647. end)
  648. SliderButton.MouseButton1Up:Connect(function()
  649. holding = false
  650. SliderButton.Size = UDim2.new(0, 10, 0, 10)
  651. end)
  652.  
  653. runService.Heartbeat:Connect(function()
  654. if holding then
  655. local mouseLocation = uis:GetMouseLocation()
  656.  
  657. local xPos = (mouseLocation.X-Slider.AbsolutePosition.X)/Slider.AbsoluteSize.X
  658. xPos = math.clamp(xPos, 0, 1)
  659.  
  660. local value = math.ceil( min + (xPos * (max-min)) )
  661.  
  662. TextLabel_4.Text = tostring(value)
  663.  
  664. FillFrame.Size = UDim2.new(xPos, 0, 0, 10)
  665. FillFrame.Position = UDim2.new(xPos/2, 0, 0.5, 0)
  666. SliderButton.Position = UDim2.new(xPos, 0, 0.5, 0)
  667.  
  668. callback(value)
  669. end
  670. end)
  671. end
  672.  
  673. return library4
  674. end
  675.  
  676. return library3
  677. end
  678.  
  679. return library2
  680. end
  681.  
  682. return library
  683.  
Advertisement
Add Comment
Please, Sign In to add comment