Advertisement
matekaOSF2

Untitled

Jul 25th, 2020 (edited)
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.35 KB | None | 0 0
  1. local library = {
  2. windowcount = 0;
  3. }
  4.  
  5. function library:CreateWindow(text)
  6. library.windowcount = library.windowcount + 1
  7. local toggled = false
  8. local MADCITYX = Instance.new("ScreenGui")
  9. local Frame = Instance.new("Frame")
  10. local func = Instance.new("Frame")
  11. local TextLabel = Instance.new("TextLabel")
  12. local MinBtn = Instance.new("TextButton")
  13. local Diamond = Instance.new("ImageLabel")
  14. local Panel = Instance.new("Frame")
  15. local Strip = Instance.new("Frame")
  16. local BtnFrames = Instance.new("Frame")
  17. local UIListLayout = Instance.new("UIListLayout")
  18.  
  19. MADCITYX.Name = "InfernusLIB"
  20. MADCITYX.Parent = game.CoreGui
  21. MADCITYX.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  22. MADCITYX.ResetOnSpawn = false
  23.  
  24. func.Name = "func"
  25. func.Parent = MADCITYX
  26. func.Active = true
  27. func.BackgroundColor3 = Color3.fromRGB(47, 47, 47)
  28. func.BorderSizePixel = 0
  29. func.Position = UDim2.new(0, (15 + ((200 * library.windowcount) - 200)), 0, 15)
  30. func.Selectable = true
  31. func.Size = UDim2.new(0, 177, 0, 25)
  32. func.Selectable = true
  33. func.Active = true
  34. func.Draggable = true
  35.  
  36. TextLabel.Parent = func
  37. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  38. TextLabel.BackgroundTransparency = 1.000
  39. TextLabel.Position = UDim2.new(0.231792897, 0, 0.224843681, 0)
  40. TextLabel.Size = UDim2.new(0, 93, 0, 15)
  41. TextLabel.Font = Enum.Font.SourceSansBold
  42. TextLabel.Text = text
  43. TextLabel.TextColor3 = Color3.fromRGB(125, 255, 201)
  44. TextLabel.TextScaled = true
  45. TextLabel.TextSize = 14.000
  46. TextLabel.TextWrapped = true
  47.  
  48. MinBtn.Name = "MinBtn"
  49. MinBtn.Parent = func
  50. MinBtn.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  51. MinBtn.BackgroundTransparency = 1.000
  52. MinBtn.Position = UDim2.new(0.754991829, 0, -0.0223813951, 0)
  53. MinBtn.Size = UDim2.new(0, 54, 0, 34)
  54. MinBtn.Font = Enum.Font.SourceSansBold
  55. MinBtn.Text = "-"
  56. MinBtn.TextColor3 = Color3.fromRGB(125, 255, 201)
  57. MinBtn.TextScaled = true
  58. MinBtn.TextSize = 14.000
  59. MinBtn.TextWrapped = true
  60. MinBtn.MouseButton1Click:Connect(function()
  61. if toggled == false then
  62. toggled = true
  63. MinBtn.Text = "-"
  64. Panel.Visible = true
  65. else
  66. toggled = false
  67. MinBtn.Text = "+"
  68. Panel.Visible = false
  69. end
  70. end)
  71.  
  72. Panel.Name = "Panel"
  73. Panel.Parent = func
  74. Panel.BackgroundColor3 = Color3.fromRGB(47, 47, 47)
  75. Panel.BorderSizePixel = 0
  76. Panel.Position = UDim2.new(0, 0, 0.966999829, 0)
  77. Panel.Size = UDim2.new(0, 177, 0, 0)
  78.  
  79. Strip.Name = "Strip"
  80. Strip.Parent = func
  81. Strip.BackgroundColor3 = Color3.fromRGB(125, 255, 201)
  82. Strip.BorderSizePixel = 0
  83. Strip.Position = UDim2.new(-3.44831392e-07, 0, 0.768718243, 0)
  84. Strip.Size = UDim2.new(0.999999821, 0, 0.127149001, 0)
  85.  
  86. BtnFrames.Name = "BtnFrames"
  87. BtnFrames.Parent = Panel
  88. BtnFrames.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  89. BtnFrames.BackgroundTransparency = 1.000
  90. BtnFrames.Position = UDim2.new(0, 0, 0.014581793, 0)
  91. BtnFrames.Size = UDim2.new(0, 176, 0, 300)
  92.  
  93. spawn(function()
  94. while true do
  95. for i=0, 1, 1 / 300 do
  96. MinBtn.TextColor3 = Color3.fromHSV(i, 1, 1);
  97. Strip.BackgroundColor3 = Color3.fromHSV(i, 1, 1);
  98. TextLabel.TextColor3 = Color3.fromHSV(i, 1, 1);
  99. wait()
  100. end;
  101. end
  102. end)
  103.  
  104. function library:Create(class, data)
  105. local obj = Instance.new(class);
  106. for i, v in next, data do
  107. if i ~= 'Parent' then
  108.  
  109. if typeof(v) == "Instance" then
  110. v.Parent = obj;
  111. else
  112. obj[i] = v
  113. end
  114. end
  115. end
  116.  
  117. obj.Parent = data.Parent;
  118. return obj
  119. end
  120.  
  121. library:Create("UIListLayout", {
  122. Name = 'List';
  123. SortOrder = Enum.SortOrder.LayoutOrder;
  124. FillDirection = Enum.FillDirection.Vertical;
  125. HorizontalAlignment = Enum.HorizontalAlignment.Center;
  126. Parent = BtnFrames;
  127. Padding = UDim.new(0, 5)
  128. })
  129.  
  130. local epicLibrary = {}
  131.  
  132. function epicLibrary:CreateButton(text, callback)
  133. local Button = Instance.new("TextButton")
  134. Button.Name = text
  135. Button.Parent = BtnFrames
  136. Button.BackgroundColor3 = Color3.fromRGB(72, 72, 72)
  137. Button.BorderSizePixel = 0
  138. Button.Position = UDim2.new(0.00651116669, 0, -0.135416672, 0)
  139. Button.Size = UDim2.new(0, 165, 0, 38)
  140. Button.Font = Enum.Font.SourceSansBold
  141. Button.Text = text
  142. Button.TextColor3 = Color3.fromRGB(255, 255, 255)
  143. Button.TextSize = 14.000
  144.  
  145. Button.MouseButton1Click:Connect(callback)
  146. Panel.Size = Panel.Size + UDim2.new(0, 0, 0, 45)
  147. end
  148.  
  149. function epicLibrary:Toggle(text, callback)
  150. text = text or "New Toggle"
  151. callback = callback or function() end
  152. local s = false
  153. local Toggle = Instance.new("TextLabel")
  154. local OnOffToggle = Instance.new("TextButton")
  155. local UITextSizeConstraint = Instance.new("UITextSizeConstraint")
  156.  
  157. Toggle.Name = text
  158. Toggle.Parent = BtnFrames
  159. Toggle.BackgroundColor3 = Color3.new(1, 1, 1)
  160. Toggle.BackgroundTransparency = 1
  161. Toggle.BorderSizePixel = 0
  162. Toggle.Position = UDim2.new(0.193337187, 0, -0.00333333341, 0)
  163. Toggle.Size = UDim2.new(0, 140, 0, 25)
  164. Toggle.Font = Enum.Font.SourceSansBold
  165. Toggle.Text = text
  166. Toggle.TextColor3 = Color3.new(1, 1, 1)
  167. Toggle.TextScaled = true
  168. Toggle.TextSize = 14
  169. Toggle.TextWrapped = true
  170. Toggle.TextXAlignment = Enum.TextXAlignment.Right
  171.  
  172. OnOffToggle.Name = "OnOffToggle"
  173. OnOffToggle.Parent = Toggle
  174. OnOffToggle.BackgroundColor3 = Color3.new(0.211765, 0.211765, 0.211765)
  175. OnOffToggle.BorderSizePixel = 0
  176. OnOffToggle.Position = UDim2.new(-0.100907357, 0, 0.0279503129, 0)
  177. OnOffToggle.Size = UDim2.new(0, 23, 0, 24)
  178. OnOffToggle.Font = Enum.Font.SourceSans
  179. OnOffToggle.Text = ""
  180. OnOffToggle.TextColor3 = Color3.new(0, 0, 0)
  181. OnOffToggle.TextSize = 14
  182. OnOffToggle.MouseButton1Down:Connect(function()
  183. if s == false then
  184. s = true
  185. OnOffToggle.BackgroundColor3 = Color3.fromRGB(85, 255, 0)
  186. else
  187. s = false
  188. OnOffToggle.BackgroundColor3 = Color3.new(0.211765, 0.211765, 0.211765)
  189. end
  190. end)
  191.  
  192. OnOffToggle.MouseButton1Click:Connect(function()
  193. if s == true then
  194. s = false
  195. else
  196. s = true
  197. end
  198. end)
  199.  
  200. while wait() do
  201. if s then
  202. callback();
  203. end
  204. end
  205.  
  206. UITextSizeConstraint.Parent = Toggle
  207. UITextSizeConstraint.MaxTextSize = 16
  208.  
  209. Panel.Size = Panel.Size + UDim2.new(0, 0, 0, 24*2)
  210. end
  211.  
  212. return epicLibrary
  213. end
  214.  
  215. return library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement