marcelslibrary

MainUI3

Oct 14th, 2019
1,127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.12 KB | None | 0 0
  1. local going = false
  2. local uis = game:GetService("UserInputService")
  3. local TS = game:GetService("TweenService")
  4. local info = TweenInfo.new(0.5,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut)
  5. local library = {
  6. double = false,
  7. count = 0,
  8. tween = {},
  9. version = "1",
  10. name = "Aurora",
  11. status = {
  12. active = {},
  13. },
  14. }
  15. local dragger = {}
  16.  
  17. local function ResizeSlider (part,new,_delay)
  18. _delay = _delay or 0.5
  19. local tweenInfo = TweenInfo.new(_delay, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
  20. local tween = TS:Create(part, tweenInfo, new)
  21. tween:Play()
  22. end
  23.  
  24.  
  25.  
  26. do
  27. local mouse = game:GetService("Players").LocalPlayer:GetMouse();
  28. local inputService = game:GetService('UserInputService');
  29. local heartbeat = game:GetService("RunService").Heartbeat;
  30. function dragger.new(frame)
  31. local s, event = pcall(function()
  32. return frame.MouseEnter
  33. end)
  34.  
  35. if s then
  36. frame.Active = true;
  37.  
  38. event:connect(function()
  39. local input = frame.InputBegan:connect(function(key)
  40. if key.UserInputType == Enum.UserInputType.MouseButton1 then
  41. local objectPosition = Vector2.new(mouse.X - frame.AbsolutePosition.X, mouse.Y - frame.AbsolutePosition.Y);
  42. while heartbeat:wait() and inputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) do
  43. frame:TweenPosition(UDim2.new(0, mouse.X - objectPosition.X + (frame.Size.X.Offset * frame.AnchorPoint.X), 0, mouse.Y - objectPosition.Y + (frame.Size.Y.Offset * frame.AnchorPoint.Y)), 'Out', 'Quad', 0.1, true);
  44. end
  45. end
  46. end)
  47.  
  48. local leave;
  49. leave = frame.MouseLeave:connect(function()
  50. input:disconnect();
  51. leave:disconnect();
  52. end)
  53. end)
  54. end
  55. end
  56.  
  57. end
  58.  
  59.  
  60.  
  61. function library:Create(class, props)
  62. local object = Instance.new(class);
  63.  
  64. for i, prop in next, props do
  65. if i ~= "Parent" then
  66. object[i] = prop;
  67. end
  68. end
  69.  
  70. object.Parent = props.Parent;
  71. return object;
  72. end
  73.  
  74. function library.status:Create(name)
  75. if not self.frame and library.screengui then
  76. local Active = Instance.new("Frame")
  77. Active.Name = "Active"
  78. Active.Visible = false
  79. Active.Parent = library.screengui
  80. Active.BackgroundColor3 = Color3.new(1, 1, 1)
  81. Active.BackgroundTransparency = 1
  82. Active.Position = UDim2.new(0.901666641, 0, 0.0896805972, 0)
  83. Active.Size = UDim2.new(0, 190, 0, 460)
  84.  
  85. local UIListLayout = Instance.new("UIListLayout")
  86. UIListLayout.Parent = Active
  87. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  88. self.frame = Active
  89. end
  90.  
  91.  
  92. if not self.active[name] then
  93. local TextLabel = Instance.new("TextLabel")
  94. TextLabel.Parent = self.frame
  95. TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  96. TextLabel.BackgroundTransparency = 1
  97. TextLabel.Size = UDim2.new(0, 190, 0, 25)
  98. TextLabel.Font = Enum.Font.Code
  99. TextLabel.Text = "> "..name
  100. TextLabel.TextColor3 = Color3.fromRGB(170, 0, 255)
  101. TextLabel.TextSize = 20
  102. TextLabel.TextXAlignment = Enum.TextXAlignment.Right
  103. self.active[name] = TextLabel
  104. end
  105.  
  106. end
  107.  
  108. function library.status:Remove(name)
  109. if self.active[name] then
  110. self.active[name]:Destroy()
  111. self.active[name] = nil
  112. end
  113. end
  114.  
  115.  
  116.  
  117. function library:CreateWindow(textt)
  118. local window = {
  119. count = 0,
  120. toggles = {},
  121. Frame = Instance.new("ImageLabel"),
  122. Background = Instance.new("Frame"),
  123. Minimize = Instance.new("TextButton"),
  124. }
  125.  
  126. self.count = self.count + 1
  127. library.screengui = library.screengui or self:Create("ScreenGui", {Name = "AuroraUI", Parent = game:GetService("CoreGui")})
  128. if library.logo == nil then
  129. local text = Instance.new("TextLabel")
  130. local version = Instance.new("TextLabel")
  131.  
  132. text.Name = "Logo"
  133. text.Parent = library.screengui
  134. text.BackgroundColor3 = Color3.new(1, 1, 1)
  135. text.BackgroundTransparency = 1
  136. text.Position = UDim2.new(-0.0756458254, 0, -0.0577395558, 0)
  137. text.Size = UDim2.new(0, 551, 0, 232)
  138. text.Font = Enum.Font.SourceSans
  139. text.Text = library.name
  140. text.TextColor3 = Color3.fromRGB(170, 0, 255)
  141. text.TextSize = 100
  142.  
  143. version.Name = "version"
  144. version.Parent = text
  145. version.BackgroundColor3 = Color3.new(1, 1, 1)
  146. version.BackgroundTransparency = 1
  147. version.BorderSizePixel = 0
  148. version.Position = UDim2.new(0.535390198, 0, 0.517241418, 0)
  149. version.Size = UDim2.new(0, 200, 0, 50)
  150. version.Font = Enum.Font.SourceSansBold
  151. version.Text = "V"..library.version
  152. version.TextColor3 = Color3.fromRGB(170, 0, 255)
  153. version.TextSize = 14
  154. end
  155. local ScreenGui = Instance.new("ScreenGui")
  156. local Top = Instance.new("Frame")
  157. local text = Instance.new("TextLabel")
  158. local bar = Instance.new("Frame")
  159. local UIListLayout = Instance.new("UIListLayout")
  160.  
  161. Top.Name = "Top"
  162. Top.Parent = self.screengui
  163. Top.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  164. Top.BorderSizePixel = 0
  165. Top.Size = UDim2.new(0, 190, 0, 30)
  166.  
  167. if self.count <= 10 and not self.double then
  168. Top.Position = UDim2.new(0, (15 + ((200 * self.count) - 200)), 0, 130)
  169. if self.count == 10 then
  170. self.double = true
  171. self.count = 1
  172. end
  173. end
  174.  
  175. if self.double then
  176. if self.count <=10 then
  177. Top.Position = UDim2.new(0, (15 + ((200 * self.count) - 200)), 0, 500)
  178. end
  179. end
  180.  
  181.  
  182.  
  183.  
  184. text.Name = "text"
  185. text.Parent = Top
  186. text.BackgroundColor3 = Color3.new(1, 1, 1)
  187. text.BackgroundTransparency = 1
  188. text.BorderSizePixel = 0
  189. text.Size = UDim2.new(0, 190, 0, 30)
  190. text.Font = Enum.Font.Code
  191. text.Text = textt
  192. text.TextColor3 = Color3.new(1, 1, 1)
  193. text.TextSize = 20
  194. text.TextWrapped = true
  195.  
  196. window.Minimize.Name = "Minimize"
  197. window.Minimize.Parent = Top
  198. window.Minimize.BackgroundColor3 = Color3.new(1, 1, 1)
  199. window.Minimize.BackgroundTransparency = 1
  200. window.Minimize.BorderSizePixel = 0
  201. window.Minimize.Position = UDim2.new(0.842105269, 0, 0, 0)
  202. window.Minimize.Size = UDim2.new(0, 30, 0, 30)
  203. window.Minimize.Font = Enum.Font.Code
  204. window.Minimize.Text = "-"
  205. window.Minimize.TextColor3 = Color3.new(1, 1, 1)
  206. window.Minimize.TextSize = 20
  207. window.Minimize.TextWrapped = true
  208.  
  209. bar.Name = "bar"
  210. bar.Parent = Top
  211. bar.BackgroundColor3 = Color3.fromRGB(170, 0, 255)
  212. bar.BorderSizePixel = 0
  213. bar.Position = UDim2.new(0, 0, 0.899999976, 0)
  214. bar.Size = UDim2.new(0, 190, 0, 2)
  215.  
  216. window.Background.Name = "background"
  217. window.Background.Parent = Top
  218. window.Background.BackgroundColor3 = Color3.new(0.137255, 0.137255, 0.137255)
  219. window.Background.BorderSizePixel = 0
  220. window.Background.ClipsDescendants = true
  221. window.Background.Position = UDim2.new(0, 0, 1, 0)
  222. window.Background.Size = UDim2.new(0, 190, 0, 0+(20*window.count))
  223.  
  224. window.Frame.Name = "Image"
  225. window.Frame.Parent = window.Background
  226. window.Frame.BackgroundColor3 = Color3.new(1, 1, 1)
  227. window.Frame.BackgroundTransparency = 1
  228. window.Frame.Size = UDim2.new(0, 604, 0, 604)
  229. window.Frame.Image = "rbxassetid://3343671401"
  230. window.Frame.ImageTransparency = 0.89999997615814
  231.  
  232. UIListLayout.Parent = window.Frame
  233. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  234.  
  235. function resize()
  236. window.Background.Size = UDim2.new(0, 190, 0, 0+(20*window.count))
  237. end
  238.  
  239. local wclosed = false
  240. window.Minimize.MouseButton1Click:connect(function()
  241. wclosed = not wclosed
  242. if wclosed then
  243. local info = TweenInfo.new(0.25,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)
  244. local tw = TS:Create(window.Background,info,{Size = UDim2.new(0, 190, 0, 0)})
  245. local tw1 = TS:Create(window.Minimize,info,{Rotation = 180})
  246. window.Minimize.Text = "+"
  247. tw1:Play()
  248. tw:Play()
  249. else
  250. local info = TweenInfo.new(0.25,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)
  251. local tw = TS:Create(window.Background,info,{Size = UDim2.new(0, 190, 0, 0+(20*window.count))})
  252. local tw1 = TS:Create(window.Minimize,info,{Rotation = -180})
  253. window.Minimize.Text = "-"
  254. tw1:Play()
  255. tw:Play()
  256. window.Minimize.Rotation = 0
  257. end
  258. end)
  259.  
  260. do
  261. dragger.new(Top)
  262. end
  263.  
  264. function window:AddButton(text,callback)
  265. self.count = self.count+1
  266. callback = callback or function() end
  267. local ButtonFrame = Instance.new("Frame")
  268. local Button = Instance.new("TextButton")
  269. ButtonFrame.Name = "ButtonFrame"
  270. ButtonFrame.Parent = self.Frame
  271. ButtonFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  272. ButtonFrame.BackgroundTransparency = 1
  273. ButtonFrame.BorderSizePixel = 0
  274. ButtonFrame.Size = UDim2.new(0.331125826, -10, 0, 20)
  275.  
  276. Button.Name = "Button"
  277. Button.Parent = ButtonFrame
  278. Button.BackgroundColor3 = Color3.new(1, 1, 1)
  279. Button.BackgroundTransparency = 1
  280. Button.Position = UDim2.new(0.0526315793, 0, 0, 0)
  281. Button.Size = UDim2.new(0, 170, 0, 20)
  282. Button.Text = text
  283. Button.Font = Enum.Font.Code
  284. Button.TextColor3 = Color3.new(1, 1, 1)
  285. Button.TextSize = 14
  286. Button.TextXAlignment = Enum.TextXAlignment.Left
  287.  
  288. Button.MouseButton1Click:connect(callback)
  289. resize()
  290. return Button
  291. end
  292.  
  293. function window:AddText(text,sizey)
  294. self.count = self.count+ (sizey/20)
  295. callback = callback or function() end
  296. local ButtonFrame = Instance.new("Frame")
  297. local Text = Instance.new("TextLabel")
  298. ButtonFrame.Name = "ButtonFrame"
  299. ButtonFrame.Parent = self.Frame
  300. ButtonFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  301. ButtonFrame.BackgroundTransparency = 1
  302. ButtonFrame.BorderSizePixel = 0
  303. ButtonFrame.Size = UDim2.new(0.331125826, -10, 0, 20)
  304.  
  305. Text.Name = "Button"
  306. Text.Parent = ButtonFrame
  307. Text.BackgroundColor3 = Color3.new(1, 1, 1)
  308. Text.BackgroundTransparency = 1
  309. Text.Position = UDim2.new(0.0526315793, 0, 0, 0)
  310. Text.Size = UDim2.new(0, 170, 0, sizey)
  311. Text.Text = text
  312. Text.Font = Enum.Font.Code
  313. Text.TextColor3 = Color3.new(1, 1, 1)
  314. Text.TextSize = 14
  315. Text.TextXAlignment = Enum.TextXAlignment.Left
  316.  
  317. resize()
  318. return Text
  319. end
  320.  
  321. function window:AddStatusFrame(text,color)
  322. self.count = self.count + 2
  323. local StatusFrame = Instance.new("Frame")
  324. local Text = Instance.new("TextLabel")
  325. local Status = Instance.new("Frame")
  326.  
  327. StatusFrame.Name = "StatusFrame"
  328. StatusFrame.Parent = self.Frame
  329. StatusFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  330. StatusFrame.BackgroundTransparency = 1
  331. StatusFrame.BorderSizePixel = 0
  332. StatusFrame.Size = UDim2.new(0.331125826, -10, 0.0331125818, 20)
  333.  
  334. Text.Name = "Text"
  335. Text.Parent = StatusFrame
  336. Text.BackgroundColor3 = Color3.new(1, 1, 1)
  337. Text.BackgroundTransparency = 1
  338. Text.Position = UDim2.new(0.278947383, 0, 0, 0)
  339. Text.Size = UDim2.new(0, 137, 0, 40)
  340. Text.Font = Enum.Font.Code
  341. Text.TextColor3 = Color3.new(1, 1, 1)
  342. Text.Text = text
  343. Text.TextSize = 14
  344. Text.TextXAlignment = Enum.TextXAlignment.Left
  345.  
  346. Status.Name = "Status"
  347. Status.Parent = StatusFrame
  348. Status.BackgroundColor3 = color
  349. Status.BorderSizePixel = 0
  350. Status.Position = UDim2.new(0.0789473653, 0, 0.125, 0)
  351. Status.Size = UDim2.new(0, 30, 0, 30)
  352. resize()
  353. return Text,Status
  354. end
  355.  
  356. function window:AddToggle(text,callback,statustt,startmode)
  357. self.count = self.count+1
  358. callback = callback or function() end
  359. local ToggleFrame = Instance.new("Frame")
  360. local button = Instance.new("TextButton")
  361. local status = Instance.new("TextLabel")
  362.  
  363. ToggleFrame.Name = "ToggleFrame"
  364. ToggleFrame.Parent = self.Frame
  365. ToggleFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  366. ToggleFrame.BackgroundTransparency = 1
  367. ToggleFrame.BorderSizePixel = 0
  368. ToggleFrame.Size = UDim2.new(0.331125826, -10, 0, 20)
  369.  
  370. button.Name = "button"
  371. button.Parent = ToggleFrame
  372. button.BackgroundColor3 = Color3.new(1, 1, 1)
  373. button.BackgroundTransparency = 1
  374. button.Position = UDim2.new(0.105263159, 0, 0, 0)
  375. button.Size = UDim2.new(0, 170, 0, 20)
  376. button.Font = Enum.Font.Code
  377. button.Text = text
  378. button.TextSize = 14
  379. button.TextXAlignment = Enum.TextXAlignment.Left
  380.  
  381. status.Name = "status"
  382. status.Parent = ToggleFrame
  383. status.BackgroundColor3 = Color3.new(1, 1, 1)
  384. status.BackgroundTransparency = 1
  385. status.Size = UDim2.new(0, 20, 0, 20)
  386. status.Font = Enum.Font.Code
  387. status.Text = ">"
  388. status.TextSize = 14
  389. local TS = game:GetService("TweenService")
  390. local info = TweenInfo.new(0.5,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut)
  391.  
  392. if startmode then
  393. button.TextColor3 = Color3.fromRGB(155, 67, 170)
  394. status.TextColor3 = Color3.fromRGB(155, 67, 170)
  395. self.toggles[text] = true
  396. else
  397. self.toggles[text] = false
  398. button.TextColor3 = Color3.fromRGB(255,255,255)
  399. status.TextColor3 = Color3.fromRGB(255,255,255)
  400. end
  401.  
  402. resize()
  403. button.MouseButton1Click:connect(function()
  404. self.toggles[text] = (not self.toggles[text])
  405. if self.toggles[text] then
  406. local a = TS:Create(button,info,{TextColor3 = Color3.fromRGB(155, 67, 170)})
  407. local b = TS:Create(status,info,{TextColor3 = Color3.fromRGB(155, 67, 170)})
  408. a:Play()
  409. b:Play()
  410. if statustt then
  411. library.status:Create(text)
  412. end
  413. else
  414. local a = TS:Create(button,info,{TextColor3 = Color3.fromRGB(255,255,255)})
  415. local b = TS:Create(status,info,{TextColor3 = Color3.fromRGB(255,255,255)})
  416. a:Play()
  417. b:Play()
  418. if statustt then
  419. library.status:Remove(text)
  420. end
  421. end
  422.  
  423. callback(self.toggles[text])
  424. end)
  425. end
  426.  
  427. function window:AddDevider(text)
  428. self.count = self.count+1
  429. local text = text or ""
  430. local Devider = Instance.new("Frame")
  431. local text_3 = Instance.new("TextLabel")
  432.  
  433. Devider.Name = "Devider"
  434. Devider.Parent = self.Frame
  435. Devider.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  436. Devider.BackgroundTransparency = 0.5
  437. Devider.BorderSizePixel = 0
  438. Devider.Size = UDim2.new(0.331125826, -10, 0, 20)
  439.  
  440. text_3.Name = "text"
  441. text_3.Parent = Devider
  442. text_3.BackgroundColor3 = Color3.new(1, 1, 1)
  443. text_3.BackgroundTransparency = 1
  444. text_3.BorderSizePixel = 0
  445. text_3.Size = UDim2.new(0, 190, 0, 20)
  446. text_3.Font = Enum.Font.Code
  447. text_3.Text = text
  448. text_3.TextColor3 = Color3.new(1, 1, 1)
  449. text_3.TextSize = 14
  450. resize()
  451. end
  452.  
  453. function window:AddBox(text,callback)
  454. self.count = self.count+1
  455. local BoxFrame = Instance.new("Frame")
  456. local Box = Instance.new("TextBox")
  457.  
  458. BoxFrame.Name = "BoxFrame"
  459. BoxFrame.Parent = self.Frame
  460. BoxFrame.BackgroundColor3 = Color3.new(0.0823529, 0.0823529, 0.0823529)
  461. BoxFrame.BackgroundTransparency = 1
  462. BoxFrame.BorderSizePixel = 0
  463. BoxFrame.Size = UDim2.new(0.331125826, -10, 0, 20)
  464.  
  465. Box.Name = "Box"
  466. Box.Parent = BoxFrame
  467. Box.BackgroundColor3 = Color3.new(0.247059, 0.247059, 0.247059)
  468. Box.BorderSizePixel = 0
  469. Box.BackgroundTransparency = 0.4
  470. Box.Position = UDim2.new(0.0789473653, 0, 0, 0)
  471. Box.Size = UDim2.new(0.894736826, -10, 0, 20)
  472. Box.Font = Enum.Font.SourceSans
  473. Box.Text = text
  474. Box.TextColor3 = Color3.new(1, 1, 1)
  475. Box.TextSize = 14
  476. Box.TextTransparency = 0.30000001192093
  477.  
  478. resize()
  479. Box.FocusLost:connect(function(...)
  480. callback(Box, ...)
  481. end)
  482. end
  483.  
  484. function window:AddToggleDropdown(text,callback,statust,startmode)
  485. local DROPINFO = TweenInfo.new(0.5,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)
  486. self.count = self.count+1
  487. local dropdown = {
  488. count = 0,
  489. toggles = {},
  490. }
  491.  
  492. local DropFrame = Instance.new("Frame")
  493. local buttonn = Instance.new("TextButton")
  494. local status = Instance.new("TextLabel")
  495. local drop = Instance.new("TextButton")
  496.  
  497. local DropdownFrame = Instance.new("Frame")
  498. local UIListLayout = Instance.new("UIListLayout")
  499. local Bar = Instance.new("Frame")
  500.  
  501. DropFrame.Name = "DropFrame"
  502. DropFrame.Parent = self.Frame
  503. DropFrame.BackgroundColor3 = Color3.new(0.0470588, 0.0470588, 0.0470588)
  504. DropFrame.BackgroundTransparency = 0.5
  505. DropFrame.BorderSizePixel = 0
  506. DropFrame.Size = UDim2.new(0.331125826, -10, 0, 20)
  507.  
  508. buttonn.Name = "button"
  509. buttonn.Parent = DropFrame
  510. buttonn.BackgroundColor3 = Color3.new(0.0470588, 0.0470588, 0.0470588)
  511. buttonn.BackgroundTransparency = 1
  512. buttonn.Position = UDim2.new(0.105263159, 0, 0, 0)
  513. buttonn.Size = UDim2.new(0, 170, 0, 20)
  514. buttonn.Font = Enum.Font.Code
  515. buttonn.Text = text
  516. buttonn.TextSize = 14
  517. buttonn.TextXAlignment = Enum.TextXAlignment.Left
  518.  
  519. status.Name = "status"
  520. status.Parent = DropFrame
  521. status.BackgroundColor3 = Color3.new(1, 1, 1)
  522. status.BackgroundTransparency = 1
  523. status.Size = UDim2.new(0, 20, 0, 20)
  524. status.Font = Enum.Font.Code
  525. status.Text = ">"
  526. status.TextSize = 14
  527.  
  528. drop.Name = "drop"
  529. drop.Parent = DropFrame
  530. drop.BackgroundColor3 = Color3.new(1, 1, 1)
  531. drop.BackgroundTransparency = 1
  532. drop.Position = UDim2.new(0.894736826, 0, 0, 0)
  533. drop.Size = UDim2.new(0, 20, 0, 20)
  534. drop.Font = Enum.Font.Code
  535. drop.Text = "v"
  536. drop.TextColor3 = Color3.new(1, 1, 1)
  537. drop.TextSize = 15
  538.  
  539. DropdownFrame.Name = "DropdownFrame"
  540. DropdownFrame.Parent = self.Frame
  541. DropdownFrame.BackgroundColor3 = Color3.new(0.0588235, 0.0588235, 0.0588235)
  542. DropdownFrame.BackgroundTransparency = 0.40000000596046
  543. DropdownFrame.BorderSizePixel = 0
  544. DropdownFrame.Position = UDim2.new(0, 0, 0.165562913, 0)
  545. DropdownFrame.Size = UDim2.new(0, 190, 0, 0)
  546. DropdownFrame.Visible = false
  547. DropdownFrame.ClipsDescendants = true
  548.  
  549. UIListLayout.Parent = DropdownFrame
  550. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  551.  
  552. Bar.Name = "Bar"
  553. Bar.Parent = DropdownFrame
  554. Bar.BackgroundColor3 = Color3.fromRGB(114, 49, 126)
  555. Bar.BorderSizePixel = 0
  556. Bar.Position = UDim2.new(0, 0, 0.0714285746, 0)
  557. Bar.Size = UDim2.new(0, 190, 0, 2)
  558. Bar.Visible = false
  559.  
  560. if startmode then
  561. buttonn.TextColor3 = Color3.fromRGB(155, 67, 170)
  562. status.TextColor3 = Color3.fromRGB(155, 67, 170)
  563. self.toggles[text] = true
  564. else
  565. self.toggles[text] = false
  566. buttonn.TextColor3 = Color3.fromRGB(255,255,255)
  567. status.TextColor3 = Color3.fromRGB(255,255,255)
  568. end
  569.  
  570.  
  571. buttonn.MouseButton1Click:connect(function()
  572. self.toggles[text] = (not self.toggles[text])
  573. if self.toggles[text] then
  574. local a = TS:Create(buttonn,info,{TextColor3 = Color3.fromRGB(155, 67, 170)})
  575. local b = TS:Create(status,info,{TextColor3 = Color3.fromRGB(155, 67, 170)})
  576. a:Play()
  577. b:Play()
  578. if statust then
  579. library.status:Create(text)
  580. end
  581. else
  582. local a = TS:Create(buttonn,info,{TextColor3 = Color3.fromRGB(255,255,255)})
  583. local b = TS:Create(status,info,{TextColor3 = Color3.fromRGB(255,255,255)})
  584. a:Play()
  585. b:Play()
  586. if statust then
  587. library.status:Remove(text)
  588. end
  589. end
  590.  
  591. callback(self.toggles[text])
  592. end)
  593. local db = false
  594. drop.MouseButton1Click:connect(function()
  595. if going then return end
  596.  
  597. db = not db
  598. if db then
  599. going = true
  600. drop.Text = "^"
  601. DropdownFrame.Visible = true
  602. Bar.Visible = true
  603. for i,v in pairs(DropdownFrame:GetChildren()) do
  604. if v:isA("Frame") and v.Name ~= "Bar" then
  605. v.Visible = true
  606. end
  607. end
  608. local tw = TS:Create(DropdownFrame,DROPINFO,{Size = DropdownFrame.Size + UDim2.new(0,0,0,dropdown.count*20)})
  609. local tw1 = TS:Create(self.Background,DROPINFO,{Size = self.Background.Size + UDim2.new(0,0,0,dropdown.count*20)})
  610. tw1:Play()
  611. tw:Play()
  612. tw.Completed:wait()
  613. going = false
  614.  
  615. else
  616. going = true
  617. drop.Text = "v"
  618. local tw = TS:Create(DropdownFrame,DROPINFO,{Size = DropdownFrame.Size + UDim2.new(0,0,0,-(dropdown.count*20))})
  619. local tw1 = TS:Create(self.Background,DROPINFO,{Size = self.Background.Size + UDim2.new(0,0,0,-(dropdown.count*20))})
  620. tw1:Play()
  621. tw:Play()
  622. tw.Completed:wait()
  623. for i,v in pairs(DropdownFrame:GetChildren()) do
  624. if v:isA("Frame") and v.Name ~= "Bar" then
  625. v.Visible = false
  626. end
  627. end
  628. going = false
  629. Bar.Visible = false
  630. DropdownFrame.Visible = false
  631.  
  632.  
  633. end
  634.  
  635. end)
  636.  
  637.  
  638.  
  639.  
  640.  
  641. function dropdown:AddButton(name,callback)
  642. self.count = self.count +1
  643. local ButtonFrame = Instance.new("Frame")
  644. local Button = Instance.new("TextButton")
  645. ButtonFrame.Name = "ButtonFrame"
  646. ButtonFrame.Parent = DropdownFrame
  647. ButtonFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  648. ButtonFrame.BackgroundTransparency = 1
  649. ButtonFrame.BorderSizePixel = 0
  650. ButtonFrame.Size = UDim2.new(1.0526315, -10, 0, 20)
  651. ButtonFrame.Visible = false
  652.  
  653. Button.Name = "Button"
  654. Button.Parent = ButtonFrame
  655. Button.BackgroundColor3 = Color3.new(1, 1, 1)
  656. Button.BackgroundTransparency = 1
  657. Button.Position = UDim2.new(0.053342998, 0, 0, 0)
  658. Button.Size = UDim2.new(0, 170, 0, 20)
  659. Button.Font = Enum.Font.Code
  660. Button.TextColor3 = Color3.new(1, 1, 1)
  661. Button.TextSize = 14
  662. Button.TextXAlignment = Enum.TextXAlignment.Left
  663. Button.Text = name
  664. Button.MouseButton1Click:connect(callback)
  665. end
  666.  
  667. function dropdown:AddToggle(text,callback,statustoggle,startmode)
  668. self.count = self.count+1
  669. callback = callback or function() end
  670. local ToggleFrame = Instance.new("Frame")
  671. local buttonnnnn = Instance.new("TextButton")
  672. local statusss = Instance.new("TextLabel")
  673.  
  674. ToggleFrame.Name = "ToggleFrame"
  675. ToggleFrame.Parent = DropdownFrame
  676. ToggleFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  677. ToggleFrame.BackgroundTransparency = 1
  678. ToggleFrame.BorderSizePixel = 0
  679. ToggleFrame.Size = UDim2.new(0.331125826, -10, 0, 20)
  680. ToggleFrame.Visible = false
  681.  
  682. buttonnnnn.Name = "button"
  683. buttonnnnn.Parent = ToggleFrame
  684. buttonnnnn.BackgroundColor3 = Color3.new(1, 1, 1)
  685. buttonnnnn.BackgroundTransparency = 1
  686. buttonnnnn.Position = UDim2.new(0.4, 0, 0, 0)
  687. buttonnnnn.Size = UDim2.new(0, 170, 0, 20)
  688. buttonnnnn.Font = Enum.Font.Code
  689. buttonnnnn.Text = text
  690. buttonnnnn.TextSize = 14
  691. buttonnnnn.TextXAlignment = Enum.TextXAlignment.Left
  692.  
  693. statusss.Name = "status"
  694. statusss.Parent = ToggleFrame
  695. statusss.BackgroundColor3 = Color3.new(1, 1, 1)
  696. statusss.BackgroundTransparency = 1
  697. statusss.Size = UDim2.new(0, 20, 0, 20)
  698. statusss.Font = Enum.Font.Code
  699. statusss.Text = ">"
  700. statusss.TextSize = 14
  701.  
  702. if startmode then
  703. buttonnnnn.TextColor3 = Color3.fromRGB(155, 67, 170)
  704. statusss.TextColor3 = Color3.fromRGB(155, 67, 170)
  705. self.toggles[text] = true
  706. else
  707. self.toggles[text] = false
  708. buttonnnnn.TextColor3 = Color3.fromRGB(255,255,255)
  709. statusss.TextColor3 = Color3.fromRGB(255,255,255)
  710. end
  711.  
  712.  
  713. buttonnnnn.MouseButton1Click:connect(function()
  714. self.toggles[text] = (not self.toggles[text])
  715. if self.toggles[text] then
  716. local a = TS:Create(buttonnnnn,info,{TextColor3 = Color3.fromRGB(155, 67, 170)})
  717. local b = TS:Create(statusss,info,{TextColor3 = Color3.fromRGB(155, 67, 170)})
  718. a:Play()
  719. b:Play()
  720. if statustoggle then
  721. library.status:Create(text)
  722. end
  723. else
  724. local a = TS:Create(buttonnnnn,info,{TextColor3 = Color3.fromRGB(255,255,255)})
  725. local b = TS:Create(statusss,info,{TextColor3 = Color3.fromRGB(255,255,255)})
  726. a:Play()
  727. b:Play()
  728. if statustoggle then
  729. library.status:Remove(text)
  730. end
  731. end
  732.  
  733. callback(self.toggles[text])
  734. end)
  735. end
  736.  
  737. function dropdown:AddSlider(text,min,max,callback)
  738. self.count = self.count+1
  739. local Slider = Instance.new("Frame")
  740. local SliderFrame = Instance.new("Frame")
  741. local SliderBar = Instance.new("Frame")
  742. local SliderPart = Instance.new("TextButton")
  743. local count = Instance.new("TextLabel")
  744. local text_2 = Instance.new("TextLabel")
  745.  
  746. local slideractions = {}
  747. local minvalue = min or 0
  748. local maxvalue = max or 100
  749. callback = callback or function() end
  750.  
  751.  
  752. Slider.Name = "Slider"
  753. Slider.Parent = DropdownFrame
  754. Slider.BackgroundColor3 = Color3.new(0, 0, 0)
  755. Slider.BackgroundTransparency = 1
  756. Slider.BorderSizePixel = 0
  757. Slider.Position = UDim2.new(0.4, 0, 0, 0)
  758. Slider.Size = UDim2.new(0.331125826, -10, 0, 20)
  759.  
  760. SliderFrame.Name = "SliderFrame"
  761. SliderFrame.Parent = Slider
  762. SliderFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  763. SliderFrame.BackgroundTransparency = 1
  764. SliderFrame.BorderSizePixel = 0
  765. SliderFrame.Position = UDim2.new(1.71, 0, 0, 0)
  766. SliderFrame.Size = UDim2.new(0, 81, 0, 20)
  767.  
  768. SliderBar.Name = "SliderBar"
  769. SliderBar.Parent = SliderFrame
  770. SliderBar.BackgroundColor3 = Color3.new(0.607843, 0.262745, 0.666667)
  771. SliderBar.BorderSizePixel = 0
  772. SliderBar.Position = UDim2.new(0, 0, 0.449999988, 0)
  773. SliderBar.Size = UDim2.new(0, 81, 0, 2)
  774.  
  775. SliderPart.Name = "SliderPart"
  776. SliderPart.Parent = SliderBar
  777. SliderPart.BackgroundColor3 = Color3.new(0.666667, 0, 1)
  778. SliderPart.BorderSizePixel = 0
  779. SliderPart.Position = UDim2.new(0, 0, -4, 0)
  780. SliderPart.Size = UDim2.new(0, 5, 0, 17)
  781. SliderPart.Font = Enum.Font.SourceSans
  782. SliderPart.Text = ""
  783. SliderPart.TextColor3 = Color3.new(0, 0, 0)
  784. SliderPart.TextSize = 14
  785.  
  786. count.Name = "count"
  787. count.Parent = SliderFrame
  788. count.BackgroundColor3 = Color3.new(1, 1, 1)
  789. count.BackgroundTransparency = 1
  790. count.Position = UDim2.new(0.32100001, 0, 0, 0)
  791. count.Size = UDim2.new(0, 27, 0, 18)
  792. count.Font = Enum.Font.SourceSans
  793. count.Text = tostring(minvalue)
  794. count.TextColor3 = Color3.new(1, 1, 1)
  795. count.TextSize = 14
  796.  
  797. text_2.Name = "Text"
  798. text_2.Parent = Slider
  799. text_2.BackgroundColor3 = Color3.new(1, 1, 1)
  800. text_2.BackgroundTransparency = 1
  801. text_2.BorderSizePixel = 0
  802. text_2.Position = UDim2.new(0.2, 0, 0, 0)
  803. text_2.Size = UDim2.new(0, 83, 0, 20)
  804. text_2.Font = Enum.Font.Code
  805. text_2.Text = text
  806. text_2.TextColor3 = Color3.new(1, 1, 1)
  807. text_2.TextSize = 14
  808. text_2.TextXAlignment = Enum.TextXAlignment.Left
  809.  
  810. do -- Slider math
  811.  
  812. local currentvalue = minvalue
  813.  
  814. local Dragging
  815. SliderPart.MouseButton1Down:connect(function()
  816. Dragging = true
  817. end)
  818. uis.InputEnded:Connect(function(inputObject)
  819. if inputObject.UserInputType == Enum.UserInputType.MouseButton1 then
  820. Dragging = false
  821. end
  822. end)
  823.  
  824. local originalpos = SliderPart.Position
  825.  
  826. local function GetValue ()
  827. local maxval = SliderFrame.AbsoluteSize.X
  828. local currentval = SliderPart.Position.X.Offset
  829. return math.floor((currentval / maxval) * (maxvalue - minvalue) + minvalue)
  830. end
  831.  
  832. local function SetValue (x)
  833. local newposition = UDim2.new(
  834. UDim.new(
  835. 0,
  836. math.clamp(x, 0, SliderFrame.AbsoluteSize.X)
  837. ),
  838. originalpos.Y
  839. )
  840. ResizeSlider(SliderPart, {Position = newposition}, 0.14)
  841. count.Text = tostring(GetValue())
  842. end
  843.  
  844. uis.InputChanged:connect(function(InputObject, GameProcessedEvent)
  845. if ((not GameProcessedEvent) and Dragging) then
  846. if (InputObject.UserInputType == Enum.UserInputType.MouseMovement) then
  847. local set = InputObject.Position.X - SliderFrame.AbsolutePosition.X
  848. SetValue(set)
  849. end
  850. end
  851. end)
  852.  
  853. count:GetPropertyChangedSignal("Text"):Connect(function()
  854. pcall(callback, GetValue())
  855. end)
  856. end
  857.  
  858. return count
  859. end
  860.  
  861.  
  862. resize()
  863. return dropdown
  864. end
  865.  
  866.  
  867. function window:AddDropdown(text)
  868. local DROPINFO = TweenInfo.new(0.5,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)
  869. self.count = self.count+1
  870. local dropdown = {
  871. count = 0,
  872. toggles = {},
  873. }
  874.  
  875. local DropFrame = Instance.new("Frame")
  876. local buttonn = Instance.new("TextButton")
  877. local drop = Instance.new("TextButton")
  878.  
  879. local DropdownFrame = Instance.new("Frame")
  880. local UIListLayout = Instance.new("UIListLayout")
  881. local Bar = Instance.new("Frame")
  882.  
  883. DropFrame.Name = "DropFrame"
  884. DropFrame.Parent = self.Frame
  885. DropFrame.BackgroundColor3 = Color3.new(0.0470588, 0.0470588, 0.0470588)
  886. DropFrame.BackgroundTransparency = 0.5
  887. DropFrame.BorderSizePixel = 0
  888. DropFrame.Size = UDim2.new(0.331125826, -10, 0, 20)
  889.  
  890. buttonn.Name = "button"
  891. buttonn.Parent = DropFrame
  892. buttonn.BackgroundColor3 = Color3.new(0.0470588, 0.0470588, 0.0470588)
  893. buttonn.BackgroundTransparency = 1
  894. buttonn.Position = UDim2.new(0.053342998, 0, 0, 0)
  895. buttonn.Size = UDim2.new(0, 170, 0, 20)
  896. buttonn.Font = Enum.Font.Code
  897. buttonn.Text = text
  898. buttonn.TextColor3 = Color3.new(1, 1, 1)
  899. buttonn.TextSize = 14
  900. buttonn.TextXAlignment = Enum.TextXAlignment.Left
  901.  
  902. drop.Name = "drop"
  903. drop.Parent = DropFrame
  904. drop.BackgroundColor3 = Color3.new(1, 1, 1)
  905. drop.BackgroundTransparency = 1
  906. drop.Position = UDim2.new(0.894736826, 0, 0, 0)
  907. drop.Size = UDim2.new(0, 20, 0, 20)
  908. drop.Font = Enum.Font.Code
  909. drop.Text = "v"
  910. drop.TextColor3 = Color3.new(1, 1, 1)
  911. drop.TextSize = 15
  912.  
  913. DropdownFrame.Name = "DropdownFrame"
  914. DropdownFrame.Parent = self.Frame
  915. DropdownFrame.BackgroundColor3 = Color3.new(0.0588235, 0.0588235, 0.0588235)
  916. DropdownFrame.BackgroundTransparency = 0.40000000596046
  917. DropdownFrame.BorderSizePixel = 0
  918. DropdownFrame.Position = UDim2.new(0, 0, 0.165562913, 0)
  919. DropdownFrame.Size = UDim2.new(0, 190, 0, 0)
  920. DropdownFrame.Visible = false
  921. DropdownFrame.ClipsDescendants = true
  922.  
  923. UIListLayout.Parent = DropdownFrame
  924. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  925.  
  926. Bar.Name = "Bar"
  927. Bar.Parent = DropdownFrame
  928. Bar.BackgroundColor3 = Color3.fromRGB(114, 49, 126)
  929. Bar.BorderSizePixel = 0
  930. Bar.Position = UDim2.new(0, 0, 0.0714285746, 0)
  931. Bar.Size = UDim2.new(0, 190, 0, 2)
  932. Bar.Visible = false
  933.  
  934. local db = false
  935. drop.MouseButton1Click:connect(function()
  936. if going then return end
  937.  
  938. db = not db
  939. if db then
  940. going = true
  941. Bar.Visible = true
  942. drop.Text = "^"
  943. DropdownFrame.Visible = true
  944. for i,v in pairs(DropdownFrame:GetChildren()) do
  945. if v:isA("Frame") and v.Name ~= "Bar" then
  946. v.Visible = true
  947. end
  948. end
  949. local tw = TS:Create(DropdownFrame,DROPINFO,{Size = DropdownFrame.Size + UDim2.new(0,0,0,dropdown.count*20)})
  950. local tw1 = TS:Create(self.Background,DROPINFO,{Size = self.Background.Size + UDim2.new(0,0,0,dropdown.count*20)})
  951. tw1:Play()
  952. tw:Play()
  953. tw.Completed:wait()
  954. going = false
  955.  
  956. else
  957. going = true
  958. drop.Text = "v"
  959. local tw = TS:Create(DropdownFrame,DROPINFO,{Size = DropdownFrame.Size + UDim2.new(0,0,0,-(dropdown.count*20))})
  960. local tw1 = TS:Create(self.Background,DROPINFO,{Size = self.Background.Size + UDim2.new(0,0,0,-(dropdown.count*20))})
  961. tw1:Play()
  962. tw:Play()
  963. tw.Completed:wait()
  964. for i,v in pairs(DropdownFrame:GetChildren()) do
  965. if v:isA("Frame") and v.Name ~= "Bar" then
  966. v.Visible = false
  967. end
  968. end
  969. going = false
  970. Bar.Visible = false
  971. DropdownFrame.Visible = false
  972.  
  973.  
  974. end
  975.  
  976. end)
  977.  
  978.  
  979.  
  980.  
  981.  
  982. function dropdown:AddButton(name,callback)
  983. self.count = self.count +1
  984. local ButtonFrame = Instance.new("Frame")
  985. local Button = Instance.new("TextButton")
  986. ButtonFrame.Name = "ButtonFrame"
  987. ButtonFrame.Parent = DropdownFrame
  988. ButtonFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  989. ButtonFrame.BackgroundTransparency = 1
  990. ButtonFrame.BorderSizePixel = 0
  991. ButtonFrame.Size = UDim2.new(1.0526315, -10, 0, 20)
  992. ButtonFrame.Visible = false
  993.  
  994. Button.Name = "Button"
  995. Button.Parent = ButtonFrame
  996. Button.BackgroundColor3 = Color3.new(1, 1, 1)
  997. Button.BackgroundTransparency = 1
  998. Button.Position = UDim2.new(0.053342998, 0, 0, 0)
  999. Button.Size = UDim2.new(0, 170, 0, 20)
  1000. Button.Font = Enum.Font.Code
  1001. Button.TextColor3 = Color3.new(1, 1, 1)
  1002. Button.TextSize = 14
  1003. Button.TextXAlignment = Enum.TextXAlignment.Left
  1004. Button.Text = name
  1005. Button.MouseButton1Click:connect(callback)
  1006. end
  1007.  
  1008. function dropdown:AddToggle(text,callback,statustoggle,startmode)
  1009. self.count = self.count+1
  1010. callback = callback or function() end
  1011. local ToggleFrame = Instance.new("Frame")
  1012. local buttonnnnn = Instance.new("TextButton")
  1013. local statusss = Instance.new("TextLabel")
  1014.  
  1015. ToggleFrame.Name = "ToggleFrame"
  1016. ToggleFrame.Parent = DropdownFrame
  1017. ToggleFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  1018. ToggleFrame.BackgroundTransparency = 1
  1019. ToggleFrame.BorderSizePixel = 0
  1020. ToggleFrame.Size = UDim2.new(0.331125826, -10, 0, 20)
  1021. ToggleFrame.Visible = false
  1022.  
  1023. buttonnnnn.Name = "button"
  1024. buttonnnnn.Parent = ToggleFrame
  1025. buttonnnnn.BackgroundColor3 = Color3.new(1, 1, 1)
  1026. buttonnnnn.BackgroundTransparency = 1
  1027. buttonnnnn.Position = UDim2.new(0.4, 0, 0, 0)
  1028. buttonnnnn.Size = UDim2.new(0, 170, 0, 20)
  1029. buttonnnnn.Font = Enum.Font.Code
  1030. buttonnnnn.Text = text
  1031. buttonnnnn.TextSize = 14
  1032. buttonnnnn.TextXAlignment = Enum.TextXAlignment.Left
  1033.  
  1034. statusss.Name = "status"
  1035. statusss.Parent = ToggleFrame
  1036. statusss.BackgroundColor3 = Color3.new(1, 1, 1)
  1037. statusss.BackgroundTransparency = 1
  1038. statusss.Size = UDim2.new(0, 20, 0, 20)
  1039. statusss.Font = Enum.Font.Code
  1040. statusss.Text = ">"
  1041. statusss.TextSize = 14
  1042.  
  1043. if startmode then
  1044. buttonnnnn.TextColor3 = Color3.fromRGB(155, 67, 170)
  1045. statusss.TextColor3 = Color3.fromRGB(155, 67, 170)
  1046. self.toggles[text] = true
  1047. else
  1048. self.toggles[text] = false
  1049. buttonnnnn.TextColor3 = Color3.fromRGB(255,255,255)
  1050. statusss.TextColor3 = Color3.fromRGB(255,255,255)
  1051. end
  1052.  
  1053.  
  1054. buttonnnnn.MouseButton1Click:connect(function()
  1055. self.toggles[text] = (not self.toggles[text])
  1056. if self.toggles[text] then
  1057. local a = TS:Create(buttonnnnn,info,{TextColor3 = Color3.fromRGB(155, 67, 170)})
  1058. local b = TS:Create(statusss,info,{TextColor3 = Color3.fromRGB(155, 67, 170)})
  1059. a:Play()
  1060. b:Play()
  1061. if statustoggle then
  1062. library.status:Create(text)
  1063. end
  1064. else
  1065. local a = TS:Create(buttonnnnn,info,{TextColor3 = Color3.fromRGB(255,255,255)})
  1066. local b = TS:Create(statusss,info,{TextColor3 = Color3.fromRGB(255,255,255)})
  1067. a:Play()
  1068. b:Play()
  1069. if statustoggle then
  1070. library.status:Remove(text)
  1071. end
  1072. end
  1073.  
  1074. callback(self.toggles[text])
  1075. end)
  1076. end
  1077.  
  1078. function dropdown:AddSlider(text,min,max,callback)
  1079. self.count = self.count+1
  1080. local Slider = Instance.new("Frame")
  1081. local SliderFrame = Instance.new("Frame")
  1082. local SliderBar = Instance.new("Frame")
  1083. local SliderPart = Instance.new("TextButton")
  1084. local count = Instance.new("TextLabel")
  1085. local text_2 = Instance.new("TextLabel")
  1086.  
  1087. local slideractions = {}
  1088. local minvalue = min or 0
  1089. local maxvalue = max or 100
  1090. callback = callback or function() end
  1091.  
  1092.  
  1093. Slider.Name = "Slider"
  1094. Slider.Parent = DropdownFrame
  1095. Slider.BackgroundColor3 = Color3.new(0, 0, 0)
  1096. Slider.BackgroundTransparency = 1
  1097. Slider.BorderSizePixel = 0
  1098. Slider.Position = UDim2.new(0.4, 0, 0, 0)
  1099. Slider.Size = UDim2.new(0.331125826, -10, 0, 20)
  1100.  
  1101. SliderFrame.Name = "SliderFrame"
  1102. SliderFrame.Parent = Slider
  1103. SliderFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  1104. SliderFrame.BackgroundTransparency = 1
  1105. SliderFrame.BorderSizePixel = 0
  1106. SliderFrame.Position = UDim2.new(1.71, 0, 0, 0)
  1107. SliderFrame.Size = UDim2.new(0, 81, 0, 20)
  1108.  
  1109. SliderBar.Name = "SliderBar"
  1110. SliderBar.Parent = SliderFrame
  1111. SliderBar.BackgroundColor3 = Color3.new(0.607843, 0.262745, 0.666667)
  1112. SliderBar.BorderSizePixel = 0
  1113. SliderBar.Position = UDim2.new(0, 0, 0.449999988, 0)
  1114. SliderBar.Size = UDim2.new(0, 81, 0, 2)
  1115.  
  1116. SliderPart.Name = "SliderPart"
  1117. SliderPart.Parent = SliderBar
  1118. SliderPart.BackgroundColor3 = Color3.new(0.666667, 0, 1)
  1119. SliderPart.BorderSizePixel = 0
  1120. SliderPart.Position = UDim2.new(0, 0, -4, 0)
  1121. SliderPart.Size = UDim2.new(0, 5, 0, 17)
  1122. SliderPart.Font = Enum.Font.SourceSans
  1123. SliderPart.Text = ""
  1124. SliderPart.TextColor3 = Color3.new(0, 0, 0)
  1125. SliderPart.TextSize = 14
  1126.  
  1127. count.Name = "count"
  1128. count.Parent = SliderFrame
  1129. count.BackgroundColor3 = Color3.new(1, 1, 1)
  1130. count.BackgroundTransparency = 1
  1131. count.Position = UDim2.new(0.32100001, 0, 0, 0)
  1132. count.Size = UDim2.new(0, 27, 0, 18)
  1133. count.Font = Enum.Font.SourceSans
  1134. count.Text = tostring(minvalue)
  1135. count.TextColor3 = Color3.new(1, 1, 1)
  1136. count.TextSize = 14
  1137.  
  1138. text_2.Name = "Text"
  1139. text_2.Parent = Slider
  1140. text_2.BackgroundColor3 = Color3.new(1, 1, 1)
  1141. text_2.BackgroundTransparency = 1
  1142. text_2.BorderSizePixel = 0
  1143. text_2.Position = UDim2.new(0.2, 0, 0, 0)
  1144. text_2.Size = UDim2.new(0, 83, 0, 20)
  1145. text_2.Font = Enum.Font.Code
  1146. text_2.Text = text
  1147. text_2.TextColor3 = Color3.new(1, 1, 1)
  1148. text_2.TextSize = 14
  1149. text_2.TextXAlignment = Enum.TextXAlignment.Left
  1150.  
  1151. do -- Slider math
  1152.  
  1153. local currentvalue = minvalue
  1154.  
  1155. local Dragging
  1156. SliderPart.MouseButton1Down:connect(function()
  1157. Dragging = true
  1158. end)
  1159. uis.InputEnded:Connect(function(inputObject)
  1160. if inputObject.UserInputType == Enum.UserInputType.MouseButton1 then
  1161. Dragging = false
  1162. end
  1163. end)
  1164.  
  1165. local originalpos = SliderPart.Position
  1166.  
  1167. local function GetValue ()
  1168. local maxval = SliderFrame.AbsoluteSize.X
  1169. local currentval = SliderPart.Position.X.Offset
  1170. return math.floor((currentval / maxval) * (maxvalue - minvalue) + minvalue)
  1171. end
  1172.  
  1173. local function SetValue (x)
  1174. local newposition = UDim2.new(
  1175. UDim.new(
  1176. 0,
  1177. math.clamp(x, 0, SliderFrame.AbsoluteSize.X)
  1178. ),
  1179. originalpos.Y
  1180. )
  1181. ResizeSlider(SliderPart, {Position = newposition}, 0.14)
  1182. count.Text = tostring(GetValue())
  1183. end
  1184.  
  1185. uis.InputChanged:connect(function(InputObject, GameProcessedEvent)
  1186. if ((not GameProcessedEvent) and Dragging) then
  1187. if (InputObject.UserInputType == Enum.UserInputType.MouseMovement) then
  1188. local set = InputObject.Position.X - SliderFrame.AbsolutePosition.X
  1189. SetValue(set)
  1190. end
  1191. end
  1192. end)
  1193.  
  1194. count:GetPropertyChangedSignal("Text"):Connect(function()
  1195. pcall(callback, GetValue())
  1196. end)
  1197. end
  1198.  
  1199. return count
  1200. end
  1201.  
  1202.  
  1203. resize()
  1204. return dropdown
  1205. end
  1206.  
  1207.  
  1208. function window:AddSlider(text,min,max,callback)
  1209. self.count = self.count+1
  1210. local Slider = Instance.new("Frame")
  1211. local SliderFrame = Instance.new("Frame")
  1212. local SliderBar = Instance.new("Frame")
  1213. local SliderPart = Instance.new("TextButton")
  1214. local count = Instance.new("TextLabel")
  1215. local text_2 = Instance.new("TextLabel")
  1216.  
  1217. local slideractions = {}
  1218. local minvalue = min or 0
  1219. local maxvalue = max or 100
  1220. callback = callback or function() end
  1221.  
  1222.  
  1223. Slider.Name = "Slider"
  1224. Slider.Parent = self.Frame
  1225. Slider.BackgroundColor3 = Color3.new(0, 0, 0)
  1226. Slider.BackgroundTransparency = 1
  1227. Slider.BorderSizePixel = 0
  1228. Slider.Position = UDim2.new(0, 0, 0.0662251636, 0)
  1229. Slider.Size = UDim2.new(0.331125826, -10, 0, 20)
  1230.  
  1231. SliderFrame.Name = "SliderFrame"
  1232. SliderFrame.Parent = Slider
  1233. SliderFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  1234. SliderFrame.BackgroundTransparency = 1
  1235. SliderFrame.BorderSizePixel = 0
  1236. SliderFrame.Position = UDim2.new(0.489783347, 0, 0, 0)
  1237. SliderFrame.Size = UDim2.new(0, 81, 0, 20)
  1238.  
  1239. SliderBar.Name = "SliderBar"
  1240. SliderBar.Parent = SliderFrame
  1241. SliderBar.BackgroundColor3 = Color3.new(0.607843, 0.262745, 0.666667)
  1242. SliderBar.BorderSizePixel = 0
  1243. SliderBar.Position = UDim2.new(-0.000612894713, 0, 0.449999988, 0)
  1244. SliderBar.Size = UDim2.new(0, 81, 0, 2)
  1245.  
  1246. SliderPart.Name = "SliderPart"
  1247. SliderPart.Parent = SliderBar
  1248. SliderPart.BackgroundColor3 = Color3.new(0.666667, 0, 1)
  1249. SliderPart.BorderSizePixel = 0
  1250. SliderPart.Position = UDim2.new(0, 0, -4, 0)
  1251. SliderPart.Size = UDim2.new(0, 5, 0, 17)
  1252. SliderPart.Font = Enum.Font.SourceSans
  1253. SliderPart.Text = ""
  1254. SliderPart.TextColor3 = Color3.new(0, 0, 0)
  1255. SliderPart.TextSize = 14
  1256.  
  1257. count.Name = "count"
  1258. count.Parent = SliderFrame
  1259. count.BackgroundColor3 = Color3.new(1, 1, 1)
  1260. count.BackgroundTransparency = 1
  1261. count.Position = UDim2.new(0.32100001, 0, 0, 0)
  1262. count.Size = UDim2.new(0, 27, 0, 18)
  1263. count.Font = Enum.Font.SourceSans
  1264. count.Text = tostring(minvalue)
  1265. count.TextColor3 = Color3.new(1, 1, 1)
  1266. count.TextSize = 14
  1267.  
  1268. text_2.Name = "Text"
  1269. text_2.Parent = Slider
  1270. text_2.BackgroundColor3 = Color3.new(1, 1, 1)
  1271. text_2.BackgroundTransparency = 1
  1272. text_2.BorderSizePixel = 0
  1273. text_2.Position = UDim2.new(0.0526315793, 0, 0, 0)
  1274. text_2.Size = UDim2.new(0, 83, 0, 20)
  1275. text_2.Font = Enum.Font.Code
  1276. text_2.Text = text
  1277. text_2.TextColor3 = Color3.new(1, 1, 1)
  1278. text_2.TextSize = 14
  1279. text_2.TextXAlignment = Enum.TextXAlignment.Left
  1280.  
  1281. do -- Slider math
  1282.  
  1283. local currentvalue = minvalue
  1284.  
  1285. local Dragging
  1286. SliderPart.MouseButton1Down:connect(function()
  1287. Dragging = true
  1288. end)
  1289. uis.InputEnded:Connect(function(inputObject)
  1290. if inputObject.UserInputType == Enum.UserInputType.MouseButton1 then
  1291. Dragging = false
  1292. end
  1293. end)
  1294.  
  1295. local originalpos = SliderPart.Position
  1296.  
  1297. local function GetValue ()
  1298. local maxval = SliderFrame.AbsoluteSize.X
  1299. local currentval = SliderPart.Position.X.Offset
  1300. return math.floor((currentval / maxval) * (maxvalue - minvalue) + minvalue)
  1301. end
  1302.  
  1303. local function SetValue (x)
  1304. local newposition = UDim2.new(
  1305. UDim.new(
  1306. 0,
  1307. math.clamp(x, 0, SliderFrame.AbsoluteSize.X)
  1308. ),
  1309. originalpos.Y
  1310. )
  1311. ResizeSlider(SliderPart, {Position = newposition}, 0.14)
  1312. count.Text = tostring(GetValue())
  1313. end
  1314.  
  1315. uis.InputChanged:connect(function(InputObject, GameProcessedEvent)
  1316. if ((not GameProcessedEvent) and Dragging) then
  1317. if (InputObject.UserInputType == Enum.UserInputType.MouseMovement) then
  1318. local set = InputObject.Position.X - SliderFrame.AbsolutePosition.X
  1319. SetValue(set)
  1320. end
  1321. end
  1322. end)
  1323.  
  1324. count:GetPropertyChangedSignal("Text"):Connect(function()
  1325. pcall(callback, GetValue())
  1326. end)
  1327. end
  1328.  
  1329. resize()
  1330. return count
  1331. end
  1332.  
  1333.  
  1334.  
  1335. return window
  1336. end
  1337.  
  1338.  
  1339. local guitoggle = false
  1340. function onKeyPress(actionName, userInputState, inputObject)
  1341. if userInputState == Enum.UserInputState.Begin then
  1342. if guitoggle == false then
  1343. guitoggle = true
  1344. if library.screengui then
  1345. for i,v in pairs(library.screengui:GetChildren()) do
  1346. if v.Name == "Top" or v.Name == "Logo" then
  1347. v.Visible = false
  1348. end
  1349. end
  1350. if library.status.frame then
  1351. library.status.frame.Visible = true
  1352. end
  1353. end
  1354. else
  1355. guitoggle = false
  1356. if library.screengui then
  1357. for i,v in pairs(library.screengui:GetChildren()) do
  1358. if v.Name == "Top" or v.Name == "Logo" then
  1359. v.Visible = true
  1360. end
  1361. end
  1362. if library.status.frame then
  1363. library.status.frame.Visible = false
  1364. end
  1365. end
  1366. end
  1367. end
  1368. end
  1369.  
  1370. game.ContextActionService:BindAction("keyPress", onKeyPress, false, Enum.KeyCode.RightShift)
  1371.  
  1372.  
  1373. return library
Add Comment
Please, Sign In to add comment