Advertisement
M0nkePr0

Untitled

Oct 29th, 2022 (edited)
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.12 KB | None | 0 0
  1. -- >>: Barbarossa
  2.  
  3. if game.CoreGui:FindFirstChild("Barbarossa") then
  4. game.CoreGui:FindFirstChild("Barbarossa"):Destroy()
  5. end
  6.  
  7. local ui = Instance.new("ScreenGui")
  8. ui.Name = "Barbarossa"
  9. ui.Parent = game:GetService("CoreGui")
  10.  
  11. local library = {}
  12.  
  13. local TweenService = game:GetService("TweenService")
  14. local uis = game:GetService("UserInputService")
  15. local tabcount = 0
  16. _G.breatherate = 0.005
  17. local color
  18. local buttoncount = {}
  19.  
  20. local function draggable(obj)
  21. local globals = {}
  22. globals.dragging=nil
  23. globals.uiorigin=nil
  24. globals.morigin=nil
  25. obj.InputBegan:Connect(function(input)
  26. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  27. globals.dragging = true
  28. globals.uiorigin = obj.Position
  29. globals.morigin = input.Position
  30. input.Changed:Connect(function()
  31. if input.UserInputState == Enum.UserInputState.End then
  32. globals.dragging = false
  33. end
  34. end)
  35. end
  36. end)
  37. uis.InputChanged:Connect(function(input)
  38. if input.UserInputType == Enum.UserInputType.MouseMovement and globals.dragging then
  39. local change = input.Position - globals.morigin
  40. obj.Position = UDim2.new(globals.uiorigin.X.Scale,globals.uiorigin.X.Offset+change.X,globals.uiorigin.Y.Scale,globals.uiorigin.Y.Offset+change.Y)
  41. end
  42. end)
  43. end
  44.  
  45. function library:Create(obj, data)
  46. obj = Instance.new(obj)
  47. for i, v in pairs(data) do
  48. if i ~= "Parent" then
  49. obj[i] = v
  50. end
  51. end
  52. obj.Parent = data.Parent
  53. return obj
  54. end
  55.  
  56. function library:CreateTab(name, color)
  57. tabcount = tabcount+1
  58. buttoncount[tabcount] = 0
  59. local tab = self:Create("Frame", {
  60. Name = tostring(tabcount),
  61. Parent = ui,
  62. Active = true,
  63. BackgroundColor3 = Color3.new(1, 1, 1),
  64. BackgroundTransparency = 1,
  65. Position = UDim2.new(0, (tabcount)*13+(tabcount-1)*200, 0.0128041022, 0),
  66. Size = UDim2.new(0, 200, 0, 40),
  67. })
  68. local top = self:Create("Frame", {
  69. Name = "Top",
  70. Parent = tab,
  71. BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647),
  72. BorderColor3 = Color3.new(0.0784314, 0.0784314, 0.0784314),
  73. BorderSizePixel = 0,
  74. Size = UDim2.new(1, 0, 1, -10),
  75. })
  76. local title = self:Create("TextLabel", {
  77. Parent = top,
  78. BackgroundTransparency = 1,
  79. Position = UDim2.new(0, 0, -0.006, 0),
  80. Size = UDim2.new(1, 0, 1, 0),
  81. Font = Enum.Font.SourceSansSemibold,
  82. Text = name,
  83. TextColor3 = Color3.new(1, 1, 1),
  84. TextSize = 25,
  85. })
  86. local minimize = self:Create("TextButton", {
  87. Parent = top,
  88. BackgroundTransparency = 1,
  89. Position = UDim2.new(0.855, 0, 0.181, 0),
  90. Size = UDim2.new(0, 18, 0, 19),
  91. Font = Enum.Font.SourceSansSemibold,
  92. Text = "-",
  93. TextColor3 = Color3.new(1, 1, 1),
  94. TextSize = 35,
  95. })
  96. local holder = self:Create("Frame", {
  97. Name = "ButtonHolder",
  98. Parent = tab,
  99. BackgroundTransparency = 1,
  100. ClipsDescendants = true,
  101. BorderSizePixel = 0,
  102. Position = UDim2.new(0, -3, 0.801999986, 0),
  103. Size = UDim2.new(0.0350000001, 200, 20, 0),
  104. })
  105. local holder2 = self:Create("Frame", {
  106. Name = "ButtonHolder",
  107. Parent = holder,
  108. BackgroundTransparency = 1,
  109. Position = UDim2.new(0, 3, 0, 0),
  110. Size = UDim2.new(0, 200, 0, 0),
  111. ZIndex = 0,
  112. })
  113. local holder3 = self:Create("Frame", {
  114. Parent = holder2,
  115. BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647),
  116. BorderColor3 = Color3.new(0.0784314, 0.0784314, 0.0784314),
  117. BorderSizePixel = 0,
  118. Position = UDim2.new(0, 0, 0, 0),
  119. Size = UDim2.new(0, 200, 0, 0),
  120. ZIndex = 0,
  121. })
  122. local debounce = false
  123. minimize.MouseButton1Click:Connect(function()
  124. if holder3.Visible then
  125. if debounce == false then
  126. debounce = true
  127. for i,v in pairs(holder3:GetChildren())do
  128. v.ZIndex=0
  129. end
  130. local tween = TweenService:Create(holder3,TweenInfo.new(.5),{["Position"]=UDim2.new(0, 0, 0, -1*(holder3.Size.Y.Offset+25))})
  131. tween:Play()
  132. tween.Completed:Connect(function()
  133. holder3.Visible = false
  134. debounce = false
  135. end)
  136. end
  137. else
  138. if debounce == false then
  139. debounce = true
  140. holder3.Visible = true
  141. local tween = TweenService:Create(holder3,TweenInfo.new(.5),{["Position"]=UDim2.new(0, 0, 0, 0)})
  142. tween:Play()
  143. tween.Completed:Connect(function()
  144. for i,v in pairs(holder3:GetChildren())do
  145. v.ZIndex=1
  146. debounce = false
  147. end
  148. end)
  149. end
  150. end
  151. end)
  152. draggable(tab)
  153. return tab
  154. end
  155.  
  156. function library:MakeToggle(tab,text,default,callback)
  157. buttoncount[tonumber(tab.Name)] = buttoncount[tonumber(tab.Name)]+1
  158. local discordid326801946230915102bestslave
  159. if default then
  160. discordid326801946230915102bestslave = {"ON",Color3.new(0, 1, 0)}
  161. else
  162. discordid326801946230915102bestslave = {"OFF",Color3.new(1, 0, 0)}
  163. end
  164. local button = self:Create("TextButton", {
  165. Parent = tab.ButtonHolder.ButtonHolder.Frame,
  166. BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647),
  167. BorderColor3 = Color3.new(0.0784314, 0.0784314, 0.0784314),
  168. BorderSizePixel = 0,
  169. Position = UDim2.new(0.744999945, 0, 0, (buttoncount[tonumber(tab.Name)]-1)*42+6-(buttoncount[tonumber(tab.Name)]-1)*6),
  170. Size = UDim2.new(0, 45, 0, 30),
  171. ZIndex = 2,
  172. Font = Enum.Font.SourceSansSemibold,
  173. Text = discordid326801946230915102bestslave[1],
  174. TextColor3 = discordid326801946230915102bestslave[2],
  175. TextSize = 25,
  176. })
  177. local description = self:Create("TextLabel", {
  178. Parent = button,
  179. BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647),
  180. BorderColor3 = Color3.new(0.0784314, 0.0784314, 0.0784314),
  181. BorderSizePixel = 0,
  182. Position = UDim2.new(-3.18383813, 0, 0, 0),
  183. Size = UDim2.new(0, 143, 0, 30),
  184. ZIndex = 0,
  185. Font = Enum.Font.SourceSansSemibold,
  186. Text = text,
  187. TextColor3 = Color3.new(1, 1, 1),
  188. TextSize = 25,
  189. })
  190. tab.ButtonHolder.ButtonHolder.Frame.BackgroundTransparency = 0
  191. tab.ButtonHolder.ButtonHolder.Frame.Size = UDim2.new(0, 200, 0, buttoncount[tonumber(tab.Name)]*42-(buttoncount[tonumber(tab.Name)]-1)*1)
  192. button.MouseButton1Click:Connect(function()
  193. if button.Text == "ON" then
  194. button.Text = "OFF"
  195. button.TextColor3 = Color3.new(1, 0, 0)
  196. callback(button)
  197. else
  198. button.Text = "ON"
  199. button.TextColor3 = Color3.new(0, 1, 0)
  200. callback(button)
  201. end
  202. end)
  203. return button
  204. end
  205. return library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement