Be_Gone_Thot

YoungStar's Lib

Apr 18th, 2020 (edited)
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.66 KB | None | 0 0
  1. local library = {count = 0};
  2.  
  3. if game:GetService("CoreGui"):FindFirstChild("UI Library") then
  4. game:GetService("CoreGui"):FindFirstChild("UI Library"):Destroy()
  5. end
  6.  
  7. if game:GetService("CoreGui"):FindFirstChild("Circle") then
  8. game:GetService("CoreGui"):FindFirstChild("Circle"):Destroy()
  9. end
  10.  
  11. local UILibrary = Instance.new("ScreenGui")
  12. UILibrary.Name = "UI Library"
  13. UILibrary.Parent = game:GetService("CoreGui")
  14.  
  15. game:GetService("UserInputService").InputBegan:Connect(function(Input)
  16. if Input.KeyCode == Enum.KeyCode.RightShift then
  17. UILibrary.Enabled= not UILibrary.Enabled
  18. end
  19. end)
  20.  
  21.  
  22. function library:CreateWindow(WName)
  23. library.count = library.count + 1
  24. local ui = {};
  25. local Holder = Instance.new("ImageLabel")
  26. local WindowText = Instance.new("TextLabel")
  27. local Container = Instance.new("ImageLabel")
  28. local ToggleGUI = Instance.new("TextButton")
  29. local UIListLayout = Instance.new("UIListLayout")
  30. local UIPadding = Instance.new("UIPadding")
  31. local instances = 0
  32.  
  33. Holder.Name = WName
  34. Holder.Parent = UILibrary
  35. Holder.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  36. Holder.BackgroundTransparency = 1.000
  37. Holder.BorderSizePixel = 0
  38. Holder.Position = UDim2.new(0, (15 + (202 * library.count) - 200), 0.002, 0)
  39. Holder.Size = UDim2.new(0, 200, 0, 39)
  40. Holder.ZIndex = 5
  41. Holder.Image = "rbxassetid://3570695787"
  42. Holder.ImageColor3 = Color3.fromRGB(26, 26, 26)
  43. Holder.ScaleType = Enum.ScaleType.Slice
  44. Holder.SliceCenter = Rect.new(100, 100, 100, 100)
  45. Holder.SliceScale = 0.040
  46.  
  47. ToggleGUI.Name = "ToggleGUI"
  48. ToggleGUI.Parent = Holder
  49. ToggleGUI.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  50. ToggleGUI.BackgroundTransparency = 1.000
  51. ToggleGUI.BorderSizePixel = 0
  52. ToggleGUI.Position = UDim2.new(0.852380931, 0, 0, 0)
  53. ToggleGUI.Size = UDim2.new(0, 31, 0, 38)
  54. ToggleGUI.ZIndex = 6
  55. ToggleGUI.Font = Enum.Font.GothamBold
  56. ToggleGUI.Text = "▼"
  57. ToggleGUI.TextColor3 = Color3.fromRGB(255, 255, 255)
  58. ToggleGUI.TextSize = 17.000
  59.  
  60. Container.Name = "Container"
  61. Container.Parent = Holder
  62. Container.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  63. Container.BackgroundTransparency = 1.000
  64. Container.ClipsDescendants = true
  65. Container.Size = UDim2.new(0, 200, 0, 37)
  66. Container.ZIndex = 2
  67. Container.Image = "rbxassetid://3570695787"
  68. Container.ImageColor3 = Color3.fromRGB(35, 35, 35)
  69. Container.ScaleType = Enum.ScaleType.Slice
  70. Container.SliceCenter = Rect.new(100, 100, 100, 100)
  71. Container.SliceScale = 0.040
  72.  
  73. WindowText.Name = WName
  74. WindowText.Parent = Holder
  75. WindowText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  76. WindowText.BackgroundTransparency = 1.000
  77. WindowText.BorderSizePixel = 0
  78. WindowText.Position = UDim2.new(0.0399999991, 0, 0.15384616, 0)
  79. WindowText.Size = UDim2.new(0, 186, 0, 27)
  80. WindowText.ZIndex = 5
  81. WindowText.Font = Enum.Font.SourceSans
  82. WindowText.Text = WName
  83. WindowText.TextColor3 = Color3.fromRGB(255, 255, 255)
  84. WindowText.TextSize = 22.000
  85. WindowText.TextXAlignment = Enum.TextXAlignment.Left
  86.  
  87. UIListLayout.Parent = Container
  88. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  89. UIListLayout.Padding = UDim.new(0, 1)
  90.  
  91. UIPadding.Parent = Container
  92. UIPadding.PaddingTop = UDim.new(0, 40)
  93.  
  94. local NewWindow = Holder;
  95. --//ALL CREDITS GO TO Google Chrome\\--
  96.  
  97. local players = game:service('Players');
  98. local player = players.LocalPlayer;
  99. local mouse = player:GetMouse();
  100. local run = game:service('RunService');
  101. local stepped = run.Stepped;
  102. draggable = function(obj)
  103. spawn(function()
  104. obj.Active = true;
  105. local minitial;
  106. local initial;
  107. local isdragging;
  108. obj.InputBegan:Connect(function(input)
  109. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  110. isdragging = true;
  111. minitial = input.Position;
  112. initial = obj.Position;
  113. local con;
  114. con = stepped:Connect(function()
  115. if isdragging then
  116. local delta = Vector3.new(mouse.X, mouse.Y, 0) - minitial;
  117. obj.Position = UDim2.new(initial.X.Scale, initial.X.Offset + delta.X, initial.Y.Scale, initial.Y.Offset + delta.Y);
  118. else
  119. con:Disconnect();
  120. end;
  121. end);
  122. input.Changed:Connect(function()
  123. if input.UserInputState == Enum.UserInputState.End then
  124. isdragging = false;
  125. end;
  126. end);
  127. end;
  128. end);
  129. end)
  130. end;
  131.  
  132. draggable(Holder)
  133.  
  134. local TweenService = game:GetService("TweenService");
  135. local function Rotation(Object,RotateAMT,Delay)
  136. local ToTween = Object
  137. local tweenInfo = TweenInfo.new(Delay,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0)
  138. local Tweener = TweenService:Create(ToTween,tweenInfo,{Rotation = RotateAMT})
  139. Tweener:Play()
  140. end
  141.  
  142. local Enabled = false;
  143.  
  144.  
  145. local y = 37
  146. for i, v in pairs(Container:GetChildren()) do
  147. if (not v:IsA("UIPadding") and not v:IsA("UIListLayout")) then
  148. y = y + (v.AbsoluteSize.Y)
  149. end
  150. end
  151. Container.Size = UDim2.new(0, 200, 0, y+(2*instances) + 2)
  152.  
  153. NewWindow:FindFirstChild("ToggleGUI").MouseButton1Click:Connect(function()
  154. Enabled = not Enabled
  155. if Enabled then
  156. Rotation(NewWindow:FindFirstChild("ToggleGUI"),90,.2)
  157. else
  158. Rotation(NewWindow:FindFirstChild("ToggleGUI"),0,.2)
  159. end
  160. wait()
  161. local y = 37
  162. for i, v in pairs(Container:GetChildren()) do
  163. if (not v:IsA("UIPadding") and not v:IsA("UIListLayout")) then
  164. y = y + (v.AbsoluteSize.Y)
  165. end
  166. end
  167.  
  168. local targetSize = Enabled and UDim2.new(0, 200, 0, 37) or UDim2.new(0, 200, 0, y+(2*instances) + 2)
  169. local targetDirection = Enabled and "Out" or "In"
  170.  
  171. Container:TweenSize(targetSize, targetDirection, "Linear", 0.15, true)
  172. end)
  173. print("Some of wally's functions was used :)")
  174.  
  175. function ui:Resize()
  176. local y = 37
  177. for i, v in pairs(Container:GetChildren()) do
  178. if not v:IsA("UIPadding") and not v:IsA("UIListLayout") then
  179. y = y + (v.AbsoluteSize.Y)
  180. end
  181. end
  182. Container.Size = UDim2.new(0, 200, 0, y+(2*instances) + 2)
  183. end
  184.  
  185. function ui:Button(Name,callback)
  186. instances = instances + 1
  187. local ButtonHolder = Instance.new("Frame")
  188. local Button = Instance.new("TextButton")
  189. local Button_Roundify_5px = Instance.new("ImageLabel")
  190.  
  191. ButtonHolder.Name = "ButtonHolder"
  192. ButtonHolder.Parent = Container
  193. ButtonHolder.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  194. ButtonHolder.BackgroundTransparency = 1.000
  195. ButtonHolder.BorderSizePixel = 0
  196. ButtonHolder.Position = UDim2.new(0, 0, 0.519480586, 0)
  197. ButtonHolder.Size = UDim2.new(0, 200, 0, 37)
  198. ButtonHolder.ZIndex = 2
  199.  
  200. Button.Name = "Button"
  201. Button.Parent = ButtonHolder
  202. Button.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  203. Button.BackgroundTransparency = 1.000
  204. Button.BorderSizePixel = 0
  205. Button.Position = UDim2.new(0.0299999993, 0, 0.0810000002, 0)
  206. Button.Size = UDim2.new(0, 190, 0, 30)
  207. Button.ZIndex = 4
  208. Button.Font = Enum.Font.SourceSans
  209. Button.Text = Name
  210. Button.TextColor3 = Color3.fromRGB(255, 255, 255)
  211. Button.TextSize = 22.000
  212. Button.TextWrapped = true
  213. Button.ClipsDescendants = true;
  214.  
  215. Button_Roundify_5px.Name = "Button_Roundify_5px"
  216. Button_Roundify_5px.Parent = Button
  217. Button_Roundify_5px.Active = true
  218. Button_Roundify_5px.AnchorPoint = Vector2.new(0.5, 0.5)
  219. Button_Roundify_5px.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  220. Button_Roundify_5px.BackgroundTransparency = 1.000
  221. Button_Roundify_5px.Position = UDim2.new(0.5, 0, 0.5, 0)
  222. Button_Roundify_5px.Selectable = true
  223. Button_Roundify_5px.Size = UDim2.new(1, 0, 1, 0)
  224. Button_Roundify_5px.ZIndex = 3
  225. Button_Roundify_5px.Image = "rbxassetid://3570695787"
  226. Button_Roundify_5px.ImageColor3 = Color3.fromRGB(45, 45, 45)
  227. Button_Roundify_5px.ScaleType = Enum.ScaleType.Slice
  228. Button_Roundify_5px.SliceCenter = Rect.new(100, 100, 100, 100)
  229. Button_Roundify_5px.SliceScale = 0.050
  230.  
  231. local Circle = Instance.new("ImageLabel")
  232. Circle.Name = "Circle"
  233. Circle.Parent = game.CoreGui
  234. Circle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  235. Circle.BackgroundTransparency = 1.000
  236. Circle.ZIndex = 10
  237. Circle.Image = "http://www.roblox.com/asset/?id=33112574"
  238. Circle.ImageColor3 = Color3.fromRGB(126, 126, 126)
  239. Circle.ImageTransparency = 0.700
  240.  
  241. function CircleClick(Button, X, Y)
  242. coroutine.resume(coroutine.create(function()
  243. local Circle = game.CoreGui:WaitForChild("Circle"):Clone()
  244. Circle.Parent = Button
  245. local NewX = X - Circle.AbsolutePosition.X
  246. local NewY = Y - Circle.AbsolutePosition.Y
  247. Circle.Position = UDim2.new(0, NewX, 0, NewY)
  248.  
  249. local Size = 0
  250. if Button.AbsoluteSize.X > Button.AbsoluteSize.Y then
  251. Size = Button.AbsoluteSize.X*1.5
  252. elseif Button.AbsoluteSize.X < Button.AbsoluteSize.Y then
  253. Size = Button.AbsoluteSize.Y*1.5
  254. elseif Button.AbsoluteSize.X == Button.AbsoluteSize.Y then print("This place uses a model by Come0n.") --please do not remove!
  255. Size = Button.AbsoluteSize.X*1.5
  256. end
  257.  
  258. local Time = 0.5
  259. Circle:TweenSizeAndPosition(UDim2.new(0, Size, 0, Size), UDim2.new(0.5, -Size/2, 0.5, -Size/2), "Out", "Quad", Time, false, nil)
  260. for i=1,10 do
  261. Circle.ImageTransparency = Circle.ImageTransparency + 0.03
  262. wait(Time/10)
  263. end
  264. Circle:Destroy()
  265. end))
  266. end
  267. local Mouse = game.Players.LocalPlayer:GetMouse()
  268. Button.MouseButton1Click:Connect(function()
  269. callback()
  270. CircleClick(Button,Mouse.X,Mouse.Y)
  271. end)
  272. self:Resize()
  273. end
  274.  
  275. function ui:Slider(name,min,max,precise,callback)
  276. instances = instances + 1
  277. local PreciseValue = precise;
  278. local SliderHolder = Instance.new("Frame")
  279. local SliderTitle = Instance.new("TextLabel")
  280. local SliderFrame = Instance.new("TextButton")
  281. local Slider = Instance.new("Frame")
  282. local UIGradient = Instance.new("UIGradient")
  283. local ValueText = Instance.new("TextLabel")
  284.  
  285. SliderHolder.Name = "SliderHolder"
  286. SliderHolder.Parent = Container
  287. SliderHolder.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  288. SliderHolder.BackgroundTransparency = 1.000
  289. SliderHolder.BorderSizePixel = 0
  290. SliderHolder.Position = UDim2.new(0, 0, 0.519480586, 0)
  291. SliderHolder.Size = UDim2.new(0, 200, 0, 37)
  292. SliderHolder.ZIndex = 2
  293.  
  294. SliderTitle.Name = "SliderTitle"
  295. SliderTitle.Parent = SliderHolder
  296. SliderTitle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  297. SliderTitle.BackgroundTransparency = 1.000
  298. SliderTitle.BorderSizePixel = 0
  299. SliderTitle.Position = UDim2.new(0.0450000018, 0, 0.0810000449, 0)
  300. SliderTitle.Size = UDim2.new(0, 185, 0, 16)
  301. SliderTitle.ZIndex = 3
  302. SliderTitle.Font = Enum.Font.SourceSansSemibold
  303. SliderTitle.LineHeight = 1.200
  304. SliderTitle.Text = name
  305. SliderTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
  306. SliderTitle.TextSize = 15.000
  307. SliderTitle.TextXAlignment = Enum.TextXAlignment.Left
  308.  
  309. SliderFrame.Name = "SliderFrame"
  310. SliderFrame.Parent = SliderHolder
  311. SliderFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  312. SliderFrame.BorderSizePixel = 0
  313. SliderFrame.Position = UDim2.new(0.0450000018, 0, 0.540459514, 0)
  314. SliderFrame.Size = UDim2.new(0, 185, 0, 6)
  315. SliderFrame.ZIndex = 3
  316. SliderFrame.Font = Enum.Font.SourceSans
  317. SliderFrame.Text = ""
  318. SliderFrame.TextColor3 = Color3.fromRGB(0, 0, 0)
  319. SliderFrame.TextSize = 14.000
  320.  
  321. Slider.Name = "Slider"
  322. Slider.Parent = SliderFrame
  323. Slider.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  324. Slider.BorderSizePixel = 0
  325. Slider.Size = UDim2.new(0, 0, 0, 6)
  326. Slider.ZIndex = 4
  327.  
  328. UIGradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 0, 0)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(255, 116, 116))}
  329. UIGradient.Parent = Slider
  330.  
  331. ValueText.Name = "ValueText"
  332. ValueText.Parent = SliderHolder
  333. ValueText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  334. ValueText.BackgroundTransparency = 1.000
  335. ValueText.BorderSizePixel = 0
  336. ValueText.Position = UDim2.new(0.0450000018, 0, 0.0810000449, 0)
  337. ValueText.Size = UDim2.new(0, 185, 0, 16)
  338. ValueText.ZIndex = 3
  339. ValueText.Font = Enum.Font.SourceSansSemibold
  340. ValueText.LineHeight = 1.200
  341. ValueText.Text = "";
  342. ValueText.TextColor3 = Color3.fromRGB(255, 255, 255)
  343. ValueText.TextSize = 15.000
  344. ValueText.TextXAlignment = Enum.TextXAlignment.Right
  345.  
  346. local UserInputService = game:GetService("UserInputService")
  347. local RunService = game:GetService("RunService")
  348. local Connection;
  349.  
  350. local TweenService = game:GetService("TweenService")
  351. local function Fade(Object,FadeAmount,Delay)
  352. local ToTween = Object
  353.  
  354. local Tweener = TweenService:Create(ToTween,TweenInfo.new(Delay),{TextTransparency = FadeAmount})
  355. Tweener:Play()
  356. end
  357.  
  358.  
  359. UserInputService.InputEnded:Connect(function(Input)
  360. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  361. if Connection then
  362. Connection:Disconnect()
  363. Connection = nil
  364. Fade(ValueText,1,.2)
  365. end
  366. end
  367. end)
  368.  
  369. local Vals = {
  370. ["Min"] = min;
  371. ["Max"] = max;
  372. }
  373.  
  374. ValueText.Text = Vals.Min.."/"..Vals.Max
  375.  
  376. SliderFrame.MouseButton1Down:Connect(function()
  377. if Connection then
  378. Connection:Disconnect()
  379. end
  380. Connection = RunService.RenderStepped:Connect(function()
  381. local Mouse = game:GetService("UserInputService"):GetMouseLocation()
  382. local Percentage = math.clamp((Mouse.X - SliderFrame.AbsolutePosition.X)/(SliderFrame.AbsoluteSize.X),0,1)
  383. local GetValue = Vals.Min + (Vals.Max - Vals.Min) * Percentage
  384.  
  385. GetValue = math.floor(GetValue)
  386.  
  387. if PreciseValue then
  388. GetValue = string.format("%.2f",GetValue)
  389. end
  390.  
  391. Slider:TweenSize(UDim2.new(Percentage,0,0,6),"Out","Linear",.03,true)
  392. ValueText.Text = GetValue.."/"..Vals.Max
  393. Fade(ValueText,0,.2)
  394. callback(tonumber(GetValue))
  395. end)
  396. end)
  397. self:Resize()
  398. end
  399.  
  400. function ui:Box(Name,callback)
  401. instances = instances + 1
  402. local BoxHolder = Instance.new("Frame")
  403. local BoxText = Instance.new("TextLabel")
  404. local Box = Instance.new("TextBox")
  405. local Box_Roundify_4px = Instance.new("ImageLabel")
  406.  
  407. BoxHolder.Name = "BoxHolder"
  408. BoxHolder.Parent = Container
  409. BoxHolder.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  410. BoxHolder.BackgroundTransparency = 1.000
  411. BoxHolder.BorderSizePixel = 0
  412. BoxHolder.Position = UDim2.new(0, 0, 0.519480586, 0)
  413. BoxHolder.Size = UDim2.new(0, 200, 0, 37)
  414. BoxHolder.ZIndex = 2
  415.  
  416. BoxText.Name = "BoxText"
  417. BoxText.Parent = BoxHolder
  418. BoxText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  419. BoxText.BackgroundTransparency = 1.000
  420. BoxText.BorderSizePixel = 0
  421. BoxText.ClipsDescendants = true
  422. BoxText.Position = UDim2.new(0.0399999991, 0, 0.162162155, 0)
  423. BoxText.Size = UDim2.new(0, 94, 0, 23)
  424. BoxText.ZIndex = 3
  425. BoxText.Font = Enum.Font.SourceSansSemibold
  426. BoxText.LineHeight = 1.400
  427. BoxText.Text = Name
  428. BoxText.TextColor3 = Color3.fromRGB(255, 255, 255)
  429. BoxText.TextSize = 14.000
  430. BoxText.TextXAlignment = Enum.TextXAlignment.Left
  431.  
  432. Box.Name = "Box"
  433. Box.Parent = BoxHolder
  434. Box.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  435. Box.BackgroundTransparency = 1.000
  436. Box.BorderSizePixel = 0
  437. Box.Position = UDim2.new(0.540000081, 0, 0.243243247, 0)
  438. Box.Size = UDim2.new(0, 85, 0, 23)
  439. Box.ZIndex = 4
  440. Box.Font = Enum.Font.SourceSansSemibold
  441. Box.LineHeight = 1
  442. Box.PlaceholderColor3 = Color3.fromRGB(255, 255, 255)
  443. Box.Text = ""
  444. Box.TextColor3 = Color3.fromRGB(255, 255, 255)
  445. Box.TextSize = 12.000
  446. Box.TextXAlignment = Enum.TextXAlignment.Left
  447.  
  448. Box_Roundify_4px.Name = "Box_Roundify_4px"
  449. Box_Roundify_4px.Parent = Box
  450. Box_Roundify_4px.Active = true
  451. Box_Roundify_4px.AnchorPoint = Vector2.new(0.5, 0.5)
  452. Box_Roundify_4px.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  453. Box_Roundify_4px.BackgroundTransparency = 1.000
  454. Box_Roundify_4px.Position = UDim2.new(0.5, 0, 0.386363626, 0)
  455. Box_Roundify_4px.Selectable = true
  456. Box_Roundify_4px.Size = UDim2.new(1, 0, 1.04545462, 0)
  457. Box_Roundify_4px.ZIndex = 3
  458. Box_Roundify_4px.Image = "rbxassetid://3570695787"
  459. Box_Roundify_4px.ImageColor3 = Color3.fromRGB(43, 43, 43)
  460. Box_Roundify_4px.ScaleType = Enum.ScaleType.Slice
  461. Box_Roundify_4px.SliceCenter = Rect.new(100, 100, 100, 100)
  462. Box_Roundify_4px.SliceScale = 0.040
  463.  
  464. Box.FocusLost:Connect(function(Enter)
  465. if Enter then
  466. if Box.Text ~= "" and Box.Text ~= " " then
  467. callback(Box.Text)
  468. Box.Text = " " .. Box.Text
  469. end
  470. end
  471. end)
  472.  
  473. pcall(function()
  474. Box.Changed:connect(function()
  475. if #Box.Text < 15 then
  476. Box.TextScaled = true
  477. else
  478. Box.TextScaled = false
  479. end
  480. end)
  481. end)
  482. self:Resize()
  483. end
  484.  
  485. function ui:Toggle(Name,callback)
  486. local Enabled = false;
  487. instances = instances + 1
  488. local ToggleHolder = Instance.new("Frame")
  489. local ToggleImage = Instance.new("ImageLabel")
  490. local MainToggle = Instance.new("ImageButton")
  491. local ToggleText = Instance.new("TextLabel")
  492.  
  493. ToggleHolder.Name = "ToggleHolder"
  494. ToggleHolder.Parent = Container
  495. ToggleHolder.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  496. ToggleHolder.BackgroundTransparency = 1.000
  497. ToggleHolder.BorderSizePixel = 0
  498. ToggleHolder.Position = UDim2.new(0, 0, 0.519480586, 0)
  499. ToggleHolder.Size = UDim2.new(0, 200, 0, 37)
  500. ToggleHolder.ZIndex = 2
  501.  
  502. ToggleImage.Name = "ToggleImage"
  503. ToggleImage.Parent = ToggleHolder
  504. ToggleImage.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  505. ToggleImage.BackgroundTransparency = 1.000
  506. ToggleImage.BorderSizePixel = 0
  507. ToggleImage.Position = UDim2.new(0.829999983, 0, 0.0810000002, 0)
  508. ToggleImage.Size = UDim2.new(0, 30, 0, 30)
  509. ToggleImage.ZIndex = 2
  510. ToggleImage.Image = "http://www.roblox.com/asset/?id=4908273649"
  511.  
  512. MainToggle.Name = "MainToggle"
  513. MainToggle.Parent = ToggleHolder
  514. MainToggle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  515. MainToggle.BackgroundTransparency = 1.000
  516. MainToggle.BorderSizePixel = 0
  517. MainToggle.Position = UDim2.new(0.829999983, 0, 0.0810000002, 0)
  518. MainToggle.Size = UDim2.new(0, 30, 0, 30)
  519. MainToggle.ZIndex = 3
  520. MainToggle.Image = "http://www.roblox.com/asset/?id=4908257956"
  521. MainToggle.ImageColor3 = Color3.fromRGB(90, 255, 115)
  522. MainToggle.ImageTransparency = 1.000
  523.  
  524. ToggleText.Name = "ToggleText"
  525. ToggleText.Parent = ToggleHolder
  526. ToggleText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  527. ToggleText.BackgroundTransparency = 1.000
  528. ToggleText.BorderSizePixel = 0
  529. ToggleText.Position = UDim2.new(0.0450000018, 0, 0.0810000449, 0)
  530. ToggleText.Size = UDim2.new(0, 157, 0, 29)
  531. ToggleText.ZIndex = 3
  532. ToggleText.Font = Enum.Font.SourceSansSemibold
  533. ToggleText.Text = Name
  534. ToggleText.TextColor3 = Color3.fromRGB(255, 255, 255)
  535. ToggleText.TextSize = 14.000
  536. ToggleText.TextXAlignment = Enum.TextXAlignment.Left
  537.  
  538. local TweenService = game:GetService("TweenService")
  539.  
  540. local function Fade(Object,FadeAmount,Delay)
  541. local ToTween = Object
  542.  
  543. local Tweener = TweenService:Create(ToTween,TweenInfo.new(Delay),{ImageTransparency = FadeAmount})
  544. Tweener:Play()
  545. end
  546.  
  547. MainToggle.MouseButton1Click:Connect(function()
  548. Enabled = not Enabled
  549. callback(Enabled)
  550. if Enabled then
  551. Fade(MainToggle,0,.2)
  552. else
  553. Fade(MainToggle,1,.2)
  554. end
  555. end)
  556. self:Resize()
  557. end
  558. return ui
  559. end
  560.  
  561. return library
Add Comment
Please, Sign In to add comment