Advertisement
HEHEJ

Untitled

Mar 25th, 2020
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.10 KB | None | 0 0
  1. function randomName()
  2. local data = ""
  3. for i=0,20,1 do
  4. data = data .. tostring(string.char(math.ceil(math.random() * 254)))
  5. end
  6. return data
  7. end
  8.  
  9.  
  10. local DaUiLib = Instance.new("ScreenGui")
  11. DaUiLib.Name = randomName()
  12. DaUiLib.Parent = game:GetService("CoreGui")
  13. DaUiLib.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  14.  
  15.  
  16. local library = {}
  17.  
  18. local TweenService = game:GetService("TweenService")
  19. local uis = game:GetService("UserInputService")
  20. local tabcount = 0
  21. local rainbow = 0
  22. _G.breatherate = 0.005
  23. local color
  24. local rainbows = {}
  25. local buttoncount = {}
  26.  
  27. function library:CreateTab(name)
  28.  
  29. tabcount = tabcount+1
  30. buttoncount[tabcount] = 0
  31.  
  32. local topbar = Instance.new("Frame")
  33. local rgbbar = Instance.new("Frame")
  34. local title = Instance.new("TextLabel")
  35. local OpenClose = Instance.new("TextButton")
  36. local container = Instance.new("Frame")
  37. local UIListLayout = Instance.new("UIListLayout")
  38.  
  39. topbar.Name = "topbar"
  40. topbar.Parent = DaUiLib
  41. topbar.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  42. topbar.BorderSizePixel = 0
  43. topbar.Position = UDim2.new(0, (tabcount)*13+(tabcount-1)*200, 0.0128041022, -500)
  44. wait(0.3)
  45. topbar:TweenPosition(UDim2.new(0, (tabcount)*13+(tabcount-1)*200, 0.0128041022, 0))
  46.  
  47. topbar.Size = UDim2.new(0, 200, 0, 30)
  48.  
  49. rgbbar.Name = "rgbbar"
  50. rgbbar.Parent = topbar
  51. rgbbar.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  52. rgbbar.BorderSizePixel = 0
  53. rgbbar.Position = UDim2.new(0, 0, 1, -3)
  54. rgbbar.Size = UDim2.new(1, 0, 0, 3)
  55.  
  56. title.Name = "title"
  57. title.Parent = topbar
  58. title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  59. title.BackgroundTransparency = 1.000
  60. title.BorderSizePixel = 0
  61. title.Position = UDim2.new(0, 5, 0, 0)
  62. title.Size = UDim2.new(1, -40, 1, 0)
  63. title.Font = Enum.Font.GothamBold
  64. title.Text = name
  65. title.TextColor3 = Color3.fromRGB(255, 255, 255)
  66. title.TextSize = 16.000
  67. title.TextXAlignment = Enum.TextXAlignment.Left
  68.  
  69. OpenClose.Name = "OpenClose"
  70. OpenClose.Parent = topbar
  71. OpenClose.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  72. OpenClose.BackgroundTransparency = 1.000
  73. OpenClose.Position = UDim2.new(0.861656487, 0, 0.0666666701, 0)
  74. OpenClose.Size = UDim2.new(0, 27, 0, 25)
  75. OpenClose.Font = Enum.Font.GothamBold
  76. OpenClose.Text = "+"
  77. OpenClose.TextColor3 = Color3.fromRGB(255, 255, 255)
  78. OpenClose.TextSize = 20.000
  79.  
  80.  
  81. container.Name = "container"
  82. container.Parent = topbar
  83. container.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  84. container.BackgroundTransparency = 1.000
  85. container.BorderSizePixel = 0
  86. container.Position = UDim2.new(0, 2, 1, 0)
  87. container.Size = UDim2.new(1, -4, 0, 0)
  88. container.Visible = true
  89.  
  90. UIListLayout.Parent = container
  91. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  92.  
  93.  
  94. local uis = game:GetService("UserInputService")
  95. local dragthing = topbar
  96. dragthing.Active = true
  97.  
  98. local dragging
  99. local draginput
  100. local dragstart
  101. local startpos
  102.  
  103. local function update(input)
  104. local delta = input.Position - dragstart
  105. game:GetService("TweenService"):Create(dragthing, TweenInfo.new(.15), {Position = UDim2.new(startpos.X.Scale, startpos.X.Offset + delta.X, startpos.Y.Scale, startpos.Y.Offset + delta.Y)}):Play()
  106. end
  107.  
  108. dragthing.InputBegan:Connect(function(input)
  109. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  110. dragging = true
  111. dragstart = input.Position
  112. startpos = dragthing.Position
  113.  
  114. input.Changed:Connect(function()
  115. if input.UserInputState == Enum.UserInputState.End then
  116. dragging = false
  117. end
  118. end)
  119. end
  120. end)
  121.  
  122. dragthing.InputChanged:Connect(function(input)
  123. if input.UserInputType == Enum.UserInputType.MouseMovement then
  124. draginput = input
  125. end
  126. end)
  127.  
  128. uis.InputChanged:Connect(function(input)
  129. if input == draginput and dragging then
  130. update(input)
  131. end
  132. end)
  133.  
  134. local enabled = false
  135. OpenClose.MouseButton1Click:Connect(function()
  136. if enabled == false then
  137. enabled = true
  138. container:TweenSize(UDim2.new(1, -4, 0, 175), Enum.EasingDirection.In, Enum.EasingStyle.Sine, 0.3,true);
  139. wait(0.3)
  140. OpenClose.Text = "-"
  141. elseif enabled == true then
  142. enabled = false
  143.  
  144. container:TweenSize(UDim2.new(1, -4, 0, 0), Enum.EasingDirection.In, Enum.EasingStyle.Sine, 0.3,true);
  145. wait(0.3)
  146. OpenClose.Text = "+"
  147. end
  148. end)
  149.  
  150. local GamerLibrary = {}
  151.  
  152.  
  153. function GamerLibrary:CreateButton(name,func)
  154. local ButtonFrame = Instance.new("Frame")
  155. local Button = Instance.new("TextButton")
  156.  
  157. ButtonFrame.Name = "ButtonFrame"
  158. ButtonFrame.Parent = container
  159. ButtonFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  160. ButtonFrame.BorderColor3 = Color3.fromRGB(27, 42, 53)
  161. ButtonFrame.BorderSizePixel = 0
  162. ButtonFrame.Size = UDim2.new(0, 196, 0, 25)
  163.  
  164. Button.Name = "Button"
  165. Button.Parent = ButtonFrame
  166. Button.BackgroundColor3 = Color3.fromRGB(21, 21, 21)
  167. Button.BorderSizePixel = 0
  168. Button.Position = UDim2.new(0.0430000164, 0, 0.170000002, 0)
  169. Button.Size = UDim2.new(0, 180, 0, 18)
  170. Button.Font = Enum.Font.GothamBold
  171. Button.TextColor3 = Color3.fromRGB(255, 255, 255)
  172. Button.TextSize = 12.000
  173. Button.TextWrapped = true
  174. Button.Text = name
  175.  
  176. Button.MouseButton1Click:Connect(func);
  177.  
  178.  
  179. end
  180.  
  181. return GamerLibrary;
  182.  
  183. end
  184.  
  185. return library;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement