Advertisement
matekaOSF2

Untitled

Jul 17th, 2020 (edited)
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.73 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.0650496334, 0, 0.0970371962, 0)
  30. func.Selectable = true
  31. func.Size = UDim2.new(0, 177, 0, 43)
  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. Diamond.Name = "Diamond"
  73. Diamond.Parent = func
  74. Diamond.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  75. Diamond.BackgroundTransparency = 1.000
  76. Diamond.Position = UDim2.new(0.0254812501, 0, 0.0999122635, 0)
  77. Diamond.Size = UDim2.new(0.172413319, 0, 0.141544059, 0)
  78. Diamond.SizeConstraint = Enum.SizeConstraint.RelativeXX
  79. Diamond.Image = "rbxassetid://4851247883"
  80. Diamond.ScaleType = Enum.ScaleType.Fit
  81.  
  82. Panel.Name = "Panel"
  83. Panel.Parent = func
  84. Panel.BackgroundColor3 = Color3.fromRGB(47, 47, 47)
  85. Panel.BorderSizePixel = 0
  86. Panel.Position = UDim2.new(0, 0, 0.966999829, 0)
  87. Panel.Size = UDim2.new(0, 177, 0, 0)
  88.  
  89. Strip.Name = "Strip"
  90. Strip.Parent = func
  91. Strip.BackgroundColor3 = Color3.fromRGB(125, 255, 201)
  92. Strip.BorderSizePixel = 0
  93. Strip.Position = UDim2.new(-3.44831392e-07, 0, 0.768718243, 0)
  94. Strip.Size = UDim2.new(0.999999821, 0, 0.127149001, 0)
  95.  
  96. BtnFrames.Name = "BtnFrames"
  97. BtnFrames.Parent = Panel
  98. BtnFrames.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  99. BtnFrames.BackgroundTransparency = 1.000
  100. BtnFrames.Position = UDim2.new(0, 0, 0.014581793, 0)
  101. BtnFrames.Size = UDim2.new(0, 176, 0, 300)
  102.  
  103. spawn(function()
  104. while true do
  105. for i=0, 1, 1 / 300 do
  106. MinBtn.TextColor3 = Color3.fromHSV(i, 1, 1);
  107. Strip.BackgroundColor3 = Color3.fromHSV(i, 1, 1);
  108. TextLabel.TextColor3 = Color3.fromHSV(i, 1, 1);
  109. wait()
  110. end;
  111. end
  112. end)
  113.  
  114. function library:Create(class, data)
  115. local obj = Instance.new(class);
  116. for i, v in next, data do
  117. if i ~= 'Parent' then
  118.  
  119. if typeof(v) == "Instance" then
  120. v.Parent = obj;
  121. else
  122. obj[i] = v
  123. end
  124. end
  125. end
  126.  
  127. obj.Parent = data.Parent;
  128. return obj
  129. end
  130.  
  131. library:Create("UIListLayout", {
  132. Name = 'List';
  133. SortOrder = Enum.SortOrder.LayoutOrder;
  134. FillDirection = Enum.FillDirection.Vertical;
  135. HorizontalAlignment = Enum.HorizontalAlignment.Center;
  136. Parent = BtnFrames;
  137. Padding = UDim.new(0, 5)
  138. })
  139.  
  140. local epicLibrary = {}
  141.  
  142. function epicLibrary:Button(text, callback)
  143. local Button = Instance.new("TextButton")
  144. Button.Name = text
  145. Button.Parent = BtnFrames
  146. Button.BackgroundColor3 = Color3.fromRGB(72, 72, 72)
  147. Button.BorderSizePixel = 0
  148. Button.Position = UDim2.new(0.00651116669, 0, -0.135416672, 0)
  149. Button.Size = UDim2.new(0, 165, 0, 38)
  150. Button.Font = Enum.Font.SourceSansBold
  151. Button.Text = text
  152. Button.TextColor3 = Color3.fromRGB(255, 255, 255)
  153. Button.TextSize = 14.000
  154.  
  155. Button.MouseButton1Click:Connect(callback)
  156. Panel.Size = Panel.Size + UDim2.new(0, 0, 0, 43.5)
  157. end
  158.  
  159. function epicLibrary:Toggle(text, callback)
  160. text = text or "New Toggle"
  161. callback = callback or function() end
  162. local flag = false
  163. local Toggle = Instance.new("TextLabel")
  164. local OnOffToggle = Instance.new("TextButton")
  165. local UITextSizeConstraint = Instance.new("UITextSizeConstraint")
  166.  
  167. Toggle.Name = text
  168. Toggle.Parent = BtnFrames
  169. Toggle.BackgroundColor3 = Color3.new(1, 1, 1)
  170. Toggle.BackgroundTransparency = 1
  171. Toggle.BorderSizePixel = 0
  172. Toggle.Position = UDim2.new(0.193337187, 0, -0.00333333341, 0)
  173. Toggle.Size = UDim2.new(0, 140, 0, 25)
  174. Toggle.Font = Enum.Font.SourceSansBold
  175. Toggle.Text = text
  176. Toggle.TextColor3 = Color3.new(1, 1, 1)
  177. Toggle.TextScaled = true
  178. Toggle.TextSize = 14
  179. Toggle.TextWrapped = true
  180. Toggle.TextXAlignment = Enum.TextXAlignment.Right
  181.  
  182. OnOffToggle.Name = "OnOffToggle"
  183. OnOffToggle.Parent = Toggle
  184. OnOffToggle.BackgroundColor3 = Color3.new(0.211765, 0.211765, 0.211765)
  185. OnOffToggle.BorderSizePixel = 0
  186. OnOffToggle.Position = UDim2.new(-0.100907357, 0, 0.0279503129, 0)
  187. OnOffToggle.Size = UDim2.new(0, 23, 0, 24)
  188. OnOffToggle.Font = Enum.Font.SourceSans
  189. OnOffToggle.Text = ""
  190. OnOffToggle.TextColor3 = Color3.new(0, 0, 0)
  191. OnOffToggle.TextSize = 14
  192. OnOffToggle.MouseButton1Down:Connect(function()
  193. if flag == false then
  194. flag = true
  195. OnOffToggle.BackgroundColor3 = Color3.fromRGB(85, 255, 0)
  196. else
  197. flag = false
  198. OnOffToggle.BackgroundColor3 = Color3.new(0.211765, 0.211765, 0.211765)
  199. end
  200. end)
  201.  
  202. while wait() do
  203. if flag then
  204. callback()
  205. end
  206. end
  207.  
  208. UITextSizeConstraint.Parent = Toggle
  209. UITextSizeConstraint.MaxTextSize = 16
  210.  
  211. BtnFrames.Size = BtnFrames.Size + UDim2.new(0, 0, 0, 29.5)
  212. end
  213.  
  214. return epicLibrary
  215. end
  216.  
  217. return library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement