Advertisement
joefromsansnite

Untitled

Oct 7th, 2021
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.77 KB | None | 0 0
  1. local library = {}
  2.  
  3. function library:NewWindow(title, outlineColor)
  4. title = (type(title) ~= "string") and "Title" or title
  5. outlineColor = (typeof(outlineColor) ~= "Color3") and Color3.fromRGB(255, 255, 0) or outlineColor
  6.  
  7. local userInputService = game:GetService("UserInputService")
  8. local runService = game:GetService("RunService")
  9.  
  10. local player = game.Players.LocalPlayer
  11. local mouse = player:GetMouse()
  12.  
  13. local X2 = Instance.new("ScreenGui")
  14. local Menu = Instance.new("Frame")
  15. local Background = Instance.new("Frame")
  16. local UICorner = Instance.new("UICorner")
  17. local Tabs = Instance.new("ScrollingFrame")
  18. local UICorner_3 = Instance.new("UICorner")
  19. local UIListLayout = Instance.new("UIListLayout")
  20. local Frames = Instance.new("Frame")
  21. local Title = Instance.new("TextLabel")
  22. local Exit = Instance.new("TextButton")
  23. local UICorner_8 = Instance.new("UICorner")
  24. local UICorner_9 = Instance.new("UICorner")
  25. local UIStroke = Instance.new("UIStroke")
  26. local UIStroke_2 = Instance.new("UIStroke")
  27. local UIStroke_3 = Instance.new("UIStroke")
  28. local UIStroke_4 = Instance.new("UIStroke")
  29.  
  30. X2.Name = "X2"
  31. X2.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  32. X2.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  33.  
  34. Menu.Name = "Menu"
  35. Menu.Parent = X2
  36. Menu.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  37. Menu.Position = UDim2.new(0.254218221, 0, 0.356340319, 0)
  38. Menu.Size = UDim2.new(0, 436, 0, 21)
  39.  
  40. UIStroke.Parent = Menu
  41. UIStroke.Color = outlineColor
  42.  
  43. Background.Name = "Background"
  44. Background.Parent = Menu
  45. Background.BackgroundColor3 = Color3.fromRGB(1, 1, 1)
  46. Background.BackgroundTransparency = 0.500
  47. Background.Position = UDim2.new(0, 0, 1.37705326, 0)
  48. Background.Size = UDim2.new(0, 436, 0, 252)
  49.  
  50. UIStroke_2.Parent = Background
  51. UIStroke_2.Color = outlineColor
  52.  
  53. UICorner.CornerRadius = UDim.new(0, 6)
  54. UICorner.Parent = Background
  55.  
  56. Tabs.Name = "Tabs"
  57. Tabs.Parent = Background
  58. Tabs.Active = true
  59. Tabs.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  60. Tabs.BorderSizePixel = 0
  61. Tabs.Position = UDim2.new(0.128440365, 0, 0.0595238097, 0)
  62. Tabs.Size = UDim2.new(0, 324, 0, 32)
  63. Tabs.CanvasSize = UDim2.new(0, 2, 0, 0)
  64. Tabs.ScrollBarThickness = 6
  65. Tabs.AutomaticCanvasSize = Enum.AutomaticSize.X
  66.  
  67. UIStroke_3.Parent = Tabs
  68. UIStroke_3.Color = outlineColor
  69.  
  70. UICorner_9.Parent = Tabs
  71.  
  72. UIListLayout.Parent = Tabs
  73. UIListLayout.FillDirection = Enum.FillDirection.Horizontal
  74. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  75. UIListLayout.Padding = UDim.new(0, 5)
  76.  
  77. Frames.Name = "Frames"
  78. Frames.Parent = Background
  79. Frames.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  80. Frames.BackgroundTransparency = 0
  81. Frames.Position = UDim2.new(0.128440365, 0, 0.222222224, 0)
  82. Frames.Size = UDim2.new(0, 324, 0, 175)
  83.  
  84. UIStroke_4.Parent = Frames
  85. UIStroke_4.Color = outlineColor
  86.  
  87. Title.Name = "Title"
  88. Title.Parent = Menu
  89. Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  90. Title.BackgroundTransparency = 1.000
  91. Title.Position = UDim2.new(0, 0, 0.0357140452, 0)
  92. Title.Size = UDim2.new(0, 408, 0, 21)
  93. Title.Font = Enum.Font.Code
  94. Title.Text = title
  95. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  96. Title.TextScaled = true
  97. Title.TextSize = 14.000
  98. Title.TextWrapped = true
  99.  
  100. Exit.Parent = Menu
  101. Exit.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  102. Exit.BackgroundTransparency = 1.000
  103. Exit.Position = UDim2.new(0.954128444, 0, 0.0317461938, 0)
  104. Exit.Size = UDim2.new(0, 21, 0, 21)
  105. Exit.Font = Enum.Font.SourceSans
  106. Exit.Text = "X"
  107. Exit.TextColor3 = Color3.fromRGB(255, 255, 255)
  108. Exit.TextSize = 19.000
  109.  
  110. UICorner_8.CornerRadius = UDim.new(0, 6)
  111. UICorner_8.Parent = Menu
  112.  
  113.  
  114. -- Local functions
  115. local function setDraggable()
  116. Menu.Active = true
  117. Menu.Draggable = true
  118. end
  119. local function exitButton()
  120. X2:Destroy()
  121. end
  122.  
  123. local function buttonClickEffect(button)
  124. if button == nil then
  125. return
  126. end
  127. local uis = game:GetService("UserInputService")
  128.  
  129. local mouseLocation = uis:GetMouseLocation()
  130. local absolutePosition = button.AbsolutePosition
  131.  
  132. local effectXPosition = UDim2.new(0, mouseLocation.X-absolutePosition.X, 0, (mouseLocation.Y-absolutePosition.Y)-36)
  133.  
  134. local ButtonEffect = Instance.new("ImageLabel")
  135.  
  136. button.ClipsDescendants = true
  137.  
  138. ButtonEffect.Name = "ButtonEffect"
  139. ButtonEffect.Parent = button
  140. ButtonEffect.AnchorPoint = Vector2.new(0.5, 0.5)
  141. ButtonEffect.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  142. ButtonEffect.BackgroundTransparency = 1.000
  143. ButtonEffect.BorderSizePixel = 0
  144. ButtonEffect.Position = UDim2.new(0, 0, 0, 0)
  145. ButtonEffect.Size = UDim2.new(0, 25, 0, 25)
  146. ButtonEffect.Image = "rbxassetid://7658630902"
  147. ButtonEffect.ImageTransparency = 0.500
  148. ButtonEffect.Position = effectXPosition
  149.  
  150. ButtonEffect:TweenSize(UDim2.new(0, 175, 0, 175))
  151. spawn(function()
  152. for i = 0.5, 1.05, 0.05 do
  153. ButtonEffect.ImageTransparency = i
  154. if i >= 1 then
  155. ButtonEffect:Destroy()
  156. end
  157. wait()
  158. end
  159. end)
  160. end
  161. local function createContainer(parent)
  162. local Container = Instance.new("Frame")
  163.  
  164. Container.Name = "Container"
  165. Container.Parent = parent
  166. Container.BackgroundColor3 = Color3.fromRGB(15, 15, 15)
  167. Container.BackgroundTransparency = 1.000
  168. Container.BorderSizePixel = 0
  169. Container.Position = UDim2.new(0, 0, 0.200000003, 0)
  170. Container.Size = UDim2.new(0, 380, 0, 42)
  171.  
  172. return Container
  173. end
  174. local function createSeperator(parent)
  175. local Seperator2_3 = Instance.new("Frame")
  176. local Seperator_3 = Instance.new("Frame")
  177.  
  178. Seperator2_3.Name = "Seperator2"
  179. Seperator2_3.AnchorPoint = Vector2.new(0.5, 0.5)
  180. Seperator2_3.Parent = parent
  181. Seperator2_3.BackgroundColor3 = Color3.fromRGB(215, 215, 215)
  182. Seperator2_3.Position = UDim2.new(0.43, 0, 1, 0)
  183. Seperator2_3.Size = UDim2.new(0, 435, 0, 1)
  184.  
  185. Seperator_3.Name = "Seperator"
  186. Seperator_3.AnchorPoint = Vector2.new(0.5, 0.5)
  187. Seperator_3.Parent = parent
  188. Seperator_3.BackgroundColor3 = Color3.fromRGB(215, 215, 215)
  189. Seperator_3.Position = UDim2.new(0.43, 0, 0, 0)
  190. Seperator_3.Size = UDim2.new(0, 435, 0, 1)
  191. end
  192. local function hideFrames()
  193. for _, frame in pairs(Frames:GetChildren()) do
  194. if frame:IsA("ScrollingFrame") then
  195. frame.Visible = false
  196. end
  197. end
  198. end
  199.  
  200. local library2 = {}
  201.  
  202. function library2:SetOutlineColor(color)
  203. for _, v in pairs(X2:GetDescendants()) do
  204. if v:IsA("UIStroke") then
  205. v.Color = color
  206. elseif v.Name == "ToggleButton" or v.Name == "FillFrame" then
  207. v.BackgroundColor3 = color
  208. end
  209. end
  210. end
  211. function library2:Rainbow()
  212. spawn(function()
  213. local i = 0
  214. while true do
  215. i += 1
  216. local color = Color3.fromHSV(i/360, 1, 1)
  217. library2:SetOutlineColor(color)
  218.  
  219. if i >= 360 then
  220. i = 0
  221. end
  222. wait()
  223. end
  224. end)
  225. end
  226.  
  227. function library2:NewTab(text)
  228. text = (type(text) ~= "string") and "Tab" or text
  229.  
  230. local TabButton = Instance.new("TextButton")
  231. local UICorner_2 = Instance.new("UICorner")
  232. local UICorner_3 = Instance.new("UICorner")
  233. local UIStroke = Instance.new("UIStroke")
  234. local UIStroke2 = Instance.new("UIStroke")
  235. local Frame = Instance.new("Frame")
  236. local MainFrame = Instance.new("ScrollingFrame")
  237. local UIListLayout_2 = Instance.new("UIListLayout")
  238.  
  239. TabButton.Name = "TabButton"
  240. TabButton.Parent = Tabs
  241. TabButton.BackgroundColor3 = Color3.fromRGB(15, 15, 15)
  242. TabButton.BackgroundTransparency = 1.000
  243. TabButton.BorderSizePixel = 0
  244. TabButton.Size = UDim2.new(0, 90, 0, 20)
  245. TabButton.Font = Enum.Font.Code
  246. TabButton.Text = text
  247. TabButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  248. TabButton.TextSize = 14.000
  249.  
  250. Frame.Parent = TabButton
  251. Frame.AnchorPoint = Vector2.new(0.5, 0.5)
  252. Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  253. Frame.BackgroundTransparency = 1.000
  254. Frame.Position = UDim2.new(0.5, 0, 0.590740979, 0)
  255. Frame.Size = UDim2.new(0, 90, 0, 20)
  256.  
  257. UICorner_2.Parent = Frame
  258.  
  259. UIStroke.Parent = Frame
  260. UIStroke.Color = outlineColor
  261.  
  262. MainFrame.Name = "MainFrame"
  263. MainFrame.Parent = Frames
  264. MainFrame.Active = true
  265. MainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  266. MainFrame.BorderSizePixel = 0
  267. MainFrame.Position = UDim2.new(-0.00118926167, 0, -0.000634923577, 0)
  268. MainFrame.Size = UDim2.new(0, 324, 0, 175)
  269. MainFrame.ScrollBarThickness = 6
  270. MainFrame.AutomaticCanvasSize = Enum.AutomaticSize.Y
  271.  
  272. UICorner_3.Parent = MainFrame
  273.  
  274. UIStroke2.Parent = MainFrame
  275. UIStroke2.Color = outlineColor
  276.  
  277. UIListLayout_2.Parent = MainFrame
  278.  
  279. hideFrames()
  280. TabButton.MouseButton1Down:Connect(function()
  281. buttonClickEffect(Frame)
  282. hideFrames()
  283. MainFrame.Visible = true
  284. end)
  285.  
  286. local library3 = {}
  287.  
  288. function library3:NewButton(text, callback)
  289. text = (type(text) ~= "string") and "Button" or text
  290. callback = (type(callback) ~= "function") and function()
  291. print("Clicked!")
  292. end or callback
  293.  
  294. local TextButton = Instance.new("TextButton")
  295. local Frame_3 = Instance.new("Frame")
  296. local UICorner_7 = Instance.new("UICorner")
  297. local UIStroke = Instance.new("UIStroke")
  298. local Container = createContainer(MainFrame)
  299. local Seperator = createSeperator(Container)
  300.  
  301. TextButton.Parent = Container
  302. TextButton.AnchorPoint = Vector2.new(0.5, 0.5)
  303. TextButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  304. TextButton.BackgroundTransparency = 1.000
  305. TextButton.Position = UDim2.new(0.43, 0, 0.5, 0)
  306. TextButton.Size = UDim2.new(0, 300, 0, 28)
  307. TextButton.Font = Enum.Font.Code
  308. TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  309. TextButton.TextSize = 14.000
  310. TextButton.Text = text
  311.  
  312. Frame_3.Parent = TextButton
  313. Frame_3.AnchorPoint = Vector2.new(0.5, 0.5)
  314. Frame_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  315. Frame_3.BackgroundTransparency = 1.000
  316. Frame_3.Position = UDim2.new(0.5, 0, 0.481481493, 0)
  317. Frame_3.Size = UDim2.new(0, 300, 0, 28)
  318.  
  319. UICorner_7.Parent = Frame_3
  320. UIStroke.Parent = Frame_3
  321. UIStroke.Color = outlineColor
  322.  
  323. TextButton.MouseButton1Down:Connect(function()
  324. buttonClickEffect(Frame_3)
  325. callback()
  326. end)
  327. end
  328. function library3:NewTextBox(text, callback)
  329. text = (type(text) ~= "string") and "Placeholder" or text
  330. callback = (type(callback) ~= "function") and function()
  331. print("Lost Focus!")
  332. end or callback
  333.  
  334. local TextBox = Instance.new("TextBox")
  335. local Frame_2 = Instance.new("Frame")
  336. local UICorner_4 = Instance.new("UICorner")
  337. local Seperator2 = Instance.new("Frame")
  338. local Seperator = Instance.new("Frame")
  339. local UIStroke = Instance.new("UIStroke")
  340. local Container = createContainer(MainFrame)
  341. local Seperator = createSeperator(Container)
  342.  
  343. TextBox.Parent = Container
  344. TextBox.AnchorPoint = Vector2.new(0.5, 0.5)
  345. TextBox.BackgroundColor3 = Color3.fromRGB(5, 5, 5)
  346. TextBox.BackgroundTransparency = 1.000
  347. TextBox.Position = UDim2.new(0.43, 0, 0.5, 0)
  348. TextBox.Size = UDim2.new(0, 300, 0, 28)
  349. TextBox.Font = Enum.Font.Code
  350. TextBox.PlaceholderText = "Textbox"
  351. TextBox.Text = text
  352. TextBox.PlaceholderText = text
  353. TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  354. TextBox.TextSize = 14.000
  355. TextBox.TextStrokeColor3 = Color3.fromRGB(255, 255, 255)
  356.  
  357. Frame_2.Parent = TextBox
  358. Frame_2.AnchorPoint = Vector2.new(0.5, 0.5)
  359. Frame_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  360. Frame_2.BackgroundTransparency = 1.000
  361. Frame_2.Position = UDim2.new(0.5, 0, 0.481481493, 0)
  362. Frame_2.Size = UDim2.new(0, 300, 0, 28)
  363.  
  364. UICorner_4.Parent = Frame_2
  365. UIStroke.Parent = Frame_2
  366. UIStroke.Color = outlineColor
  367.  
  368. TextBox.FocusLost:Connect(function()
  369. callback(TextBox.Text)
  370. end)
  371. end
  372. function library3:NewToggle(text, callback)
  373. text = (type(text) ~= "string") and "Toggle" or text
  374. callback = (type(callback) ~= "function") and function()
  375. print("Toggled!")
  376. end or callback
  377.  
  378. local Toggle = Instance.new("Frame")
  379. local UICorner_5 = Instance.new("UICorner")
  380. local ToggleButton = Instance.new("TextButton")
  381. local UICorner_6 = Instance.new("UICorner")
  382. local TextLabel = Instance.new("TextLabel")
  383. local Seperator2_2 = Instance.new("Frame")
  384. local Seperator_2 = Instance.new("Frame")
  385. local UIStroke = Instance.new("UIStroke")
  386. local Container = createContainer(MainFrame)
  387. local Seperator = createSeperator(Container)
  388.  
  389. local toggled = true
  390.  
  391. Toggle.Name = "Toggle"
  392. Toggle.Parent = Container
  393. Toggle.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  394. Toggle.BackgroundTransparency = 1.000
  395. Toggle.BorderSizePixel = 0
  396. Toggle.Position = UDim2.new(0.03, 0, 0.22, 0)
  397. Toggle.Size = UDim2.new(0, 25, 0, 25)
  398.  
  399. UICorner_5.CornerRadius = UDim.new(1, 0)
  400. UICorner_5.Parent = Toggle
  401.  
  402. ToggleButton.Name = "ToggleButton"
  403. ToggleButton.Parent = Toggle
  404. ToggleButton.AnchorPoint = Vector2.new(0.5, 0.5)
  405. ToggleButton.BackgroundColor3 = outlineColor
  406. ToggleButton.Position = UDim2.new(0.5, 0, 0.5, 0)
  407. ToggleButton.Size = UDim2.new(0, 15, 0, 15)
  408. ToggleButton.AutoButtonColor = false
  409. ToggleButton.Font = Enum.Font.SourceSans
  410. ToggleButton.Text = ""
  411. ToggleButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  412. ToggleButton.TextSize = 14.000
  413.  
  414. UICorner_6.CornerRadius = UDim.new(1, 0)
  415. UICorner_6.Parent = ToggleButton
  416.  
  417. UIStroke.Parent = Toggle
  418. UIStroke.Color = outlineColor
  419.  
  420. TextLabel.Parent = Toggle
  421. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  422. TextLabel.BackgroundTransparency = 1.000
  423. TextLabel.Position = UDim2.new(1.293, 0, -0.153, 0)
  424. TextLabel.Size = UDim2.new(0, 267, 0, 31)
  425. TextLabel.Font = Enum.Font.Code
  426. TextLabel.Text = text
  427. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  428. TextLabel.TextSize = 14.000
  429. TextLabel.TextXAlignment = Enum.TextXAlignment.Left
  430.  
  431. ToggleButton.MouseButton1Down:Connect(function()
  432. toggled = not toggled
  433. ToggleButton.BackgroundTransparency = (toggled == true) and 0 or 1
  434.  
  435. spawn(function()
  436. ToggleButton.Size = UDim2.new(0, 18, 0, 18)
  437. wait(.05)
  438. ToggleButton.Size = UDim2.new(0, 15, 0, 15)
  439. end)
  440. callback(toggled)
  441. end)
  442. end
  443. function library3:NewSlider(text, min, max, callback)
  444. text = (type(text) ~= "string") and "Slider" or text
  445. min = (type(min) ~= "number") and 0 or min
  446. max = (type(max) ~= "number") and 10 or max
  447. callback = (type(callback) ~= "function") and function()
  448. print("Slider")
  449. end or callback
  450.  
  451. local Slider = Instance.new("Frame")
  452. local UICorner = Instance.new("UICorner")
  453. local FillFrame = Instance.new("Frame")
  454. local UICorner_2 = Instance.new("UICorner")
  455. local TextLabel = Instance.new("TextLabel")
  456. local MoveButton = Instance.new("TextButton")
  457. local UICorner_3 = Instance.new("UICorner")
  458. local TextLabel_2 = Instance.new("TextLabel")
  459. local UIStroke = Instance.new("UIStroke")
  460. local Container = createContainer(MainFrame)
  461. local Seperator = createSeperator(Container)
  462.  
  463. Slider.Name = "Slider"
  464. Slider.Parent = Container
  465. Slider.AnchorPoint = Vector2.new(0.5, 0.5)
  466. Slider.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  467. Slider.BackgroundTransparency = 1.000
  468. Slider.Position = UDim2.new(0.3000002, 0, 0.600000024, 0)
  469. Slider.Size = UDim2.new(0, 200, 0, 10)
  470.  
  471. UICorner.Parent = Slider
  472. UIStroke.Parent = Slider
  473. UIStroke.Color = outlineColor
  474.  
  475. FillFrame.Name = "FillFrame"
  476. FillFrame.Parent = Slider
  477. FillFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  478. FillFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 0)
  479. FillFrame.Position = UDim2.new(0.00100000005, 0, 0.5, 0)
  480. FillFrame.Size = UDim2.new(0, 0, 0, 10)
  481.  
  482. UICorner_2.Parent = FillFrame
  483.  
  484. TextLabel.Parent = Slider
  485. TextLabel.AnchorPoint = Vector2.new(0.5, 0.5)
  486. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  487. TextLabel.BackgroundTransparency = 1.000
  488. TextLabel.Position = UDim2.new(1.2852447, 0, 0.5, 0)
  489. TextLabel.Size = UDim2.new(0, 104, 0, 15)
  490. TextLabel.Font = Enum.Font.Code
  491. TextLabel.Text = min
  492. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  493. TextLabel.TextScaled = true
  494. TextLabel.TextSize = 14.000
  495. TextLabel.TextWrapped = true
  496. TextLabel.TextXAlignment = Enum.TextXAlignment.Left
  497.  
  498. MoveButton.Name = "MoveButton"
  499. MoveButton.Parent = Slider
  500. MoveButton.AnchorPoint = Vector2.new(0.5, 0.5)
  501. MoveButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  502. MoveButton.Position = UDim2.new(0, 0, 0.5, 0)
  503. MoveButton.Size = UDim2.new(0, 10, 0, 10)
  504. MoveButton.Font = Enum.Font.SourceSans
  505. MoveButton.Text = ""
  506. MoveButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  507. MoveButton.TextSize = 14.000
  508. MoveButton.AutoButtonColor = false
  509.  
  510. UICorner_3.CornerRadius = UDim.new(1, 0)
  511. UICorner_3.Parent = MoveButton
  512.  
  513. TextLabel_2.Parent = Slider
  514. TextLabel_2.AnchorPoint = Vector2.new(0.5, 0.5)
  515. TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  516. TextLabel_2.BackgroundTransparency = 1.000
  517. TextLabel_2.Position = UDim2.new(0.524688601, 0, -0.9, 0)
  518. TextLabel_2.Size = UDim2.new(0, 200, 0, 15)
  519. TextLabel_2.Font = Enum.Font.Code
  520. TextLabel_2.Text = text
  521. TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  522. TextLabel_2.TextScaled = true
  523. TextLabel_2.TextSize = 14.000
  524. TextLabel_2.TextWrapped = true
  525. TextLabel_2.TextXAlignment = Enum.TextXAlignment.Left
  526.  
  527. local holding = false
  528.  
  529. MoveButton.MouseButton1Down:Connect(function()
  530. holding = true
  531. end)
  532. MoveButton.MouseButton1Up:Connect(function()
  533. holding = false
  534. MoveButton.Size = UDim2.new(0, 10, 0, 10)
  535. end)
  536. mouse.Button1Up:Connect(function()
  537. holding = false
  538. MoveButton.Size = UDim2.new(0, 10, 0, 10)
  539. end)
  540. runService.RenderStepped:Connect(function()
  541. if holding then
  542. local mousePosition = userInputService:GetMouseLocation()
  543.  
  544. local xPos = (mousePosition.X-Slider.AbsolutePosition.X)/Slider.AbsoluteSize.X
  545. xPos = math.clamp(xPos, 0, 1)
  546.  
  547. local value = (max - min) * xPos + min
  548.  
  549. TextLabel.Text = tostring(math.round(value))
  550.  
  551. MoveButton.Size = UDim2.new(0, 12, 0, 12)
  552. FillFrame.Size = UDim2.new(xPos, 0, 0, 10)
  553. FillFrame.Position = UDim2.new(xPos/2, 0, 0.5, 0)
  554. MoveButton.Position = UDim2.new(xPos, 0, 0.5, 0)
  555.  
  556. callback(value)
  557. end
  558. end)
  559. end
  560. return library3
  561. end
  562.  
  563.  
  564. -- Call local functions
  565. setDraggable()
  566. Exit.MouseButton1Down:Connect(function()
  567. exitButton()
  568. end)
  569.  
  570. return library2
  571. end
  572.  
  573. -- Library:NewWindow(string: title):NewTab(string: text):NewButton(string: text, function: callback)
  574. -- NewTextBox(string: text, function: callback)
  575. -- NewSlider(string: text, number: min, number: max, function: callback)
  576. -- NewToggle(string: text, function: callback)
  577. -- SetOutlineColor(Color3: color)
  578. -- Rainbow()
  579. return library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement