Advertisement
B1239999

B123's hub 2

Dec 19th, 2022
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.78 KB | None | 0 0
  1. local lib = {}
  2.  
  3. function lib:CreateWindow()
  4. local CCUILib = Instance.new("ScreenGui")
  5. local MainFrame = Instance.new("Frame")
  6. local ButtonMenu = Instance.new("Frame")
  7. local TFrame2 = Instance.new("ScrollingFrame")
  8. local UIListLayout = Instance.new("UIListLayout")
  9. local UICorner = Instance.new("UICorner")
  10. local SearchBox = Instance.new("TextBox")
  11. local UICorner_2 = Instance.new("UICorner")
  12. local TFrame3 = Instance.new("ScrollingFrame")
  13. local UIListLayout_2 = Instance.new("UIListLayout")
  14. local UICorner_3 = Instance.new("UICorner")
  15. local TFrame1 = Instance.new("ScrollingFrame")
  16. local UIListLayout_3 = Instance.new("UIListLayout")
  17. local SideBar = Instance.new("Frame")
  18. local SBFrame = Instance.new("ScrollingFrame")
  19. local UIListLayout_4 = Instance.new("UIListLayout")
  20. local Button1 = Instance.new("TextButton")
  21. local UICorner_5 = Instance.new("UICorner")
  22. local Button2 = Instance.new("TextButton")
  23. local UICorner_6 = Instance.new("UICorner")
  24. local Button3 = Instance.new("TextButton")
  25. local UICorner_7 = Instance.new("UICorner")
  26. local CocoLogo = Instance.new("ImageLabel")
  27. local MinimizeBTN = Instance.new("ImageButton")
  28.  
  29. CCUILib.Name = "CCUILib"
  30. CCUILib.Parent = game.CoreGui
  31. CCUILib.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  32.  
  33. MainFrame.Name = "MainFrame"
  34. MainFrame.Parent = CCUILib
  35. MainFrame.Active = true
  36. MainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  37. MainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  38. MainFrame.BorderSizePixel = 0
  39. MainFrame.ClipsDescendants = true
  40. MainFrame.Position = UDim2.new(0.5, 0, 1.5, 0)
  41. MainFrame.Selectable = true
  42. MainFrame.Size = UDim2.new(0, 561, 0, 305)
  43.  
  44. ButtonMenu.Name = "ButtonMenu"
  45. ButtonMenu.Parent = MainFrame
  46. ButtonMenu.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  47. ButtonMenu.BackgroundTransparency = 1.000
  48. ButtonMenu.BorderSizePixel = 0
  49. ButtonMenu.ClipsDescendants = true
  50. ButtonMenu.Position = UDim2.new(0.34799999, 0, 0, 0)
  51. ButtonMenu.Size = UDim2.new(0.65200001, 0, 1, 0)
  52.  
  53. TFrame2.Name = "TFrame2"
  54. TFrame2.Parent = ButtonMenu
  55. TFrame2.Active = true
  56. TFrame2.AnchorPoint = Vector2.new(0.5, 0)
  57. TFrame2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  58. TFrame2.BackgroundTransparency = 1.000
  59. TFrame2.BorderSizePixel = 0
  60. TFrame2.Position = UDim2.new(1.5, 0, 0.166999996, 0)
  61. TFrame2.Size = UDim2.new(1, 0, 0.781967223, 0)
  62. TFrame2.ScrollBarThickness = 6
  63. TFrame2.CanvasSize = UDim2.new(0, 0, 5, 0)
  64.  
  65. UIListLayout.Parent = TFrame2
  66. UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  67. UIListLayout.Padding = UDim.new(0.00499999989, 0)
  68.  
  69. SearchBox.Name = "SearchBox"
  70. SearchBox.Parent = ButtonMenu
  71. SearchBox.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
  72. SearchBox.ClipsDescendants = true
  73. SearchBox.Position = UDim2.new(0.0355412662, 0, 0.0459016375, 0)
  74. SearchBox.Size = UDim2.new(0, 339, 0, 29)
  75. SearchBox.Font = Enum.Font.GothamBold
  76. SearchBox.PlaceholderText = "Zoeken:"
  77. SearchBox.Text = ""
  78. SearchBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  79. SearchBox.TextSize = 14.000
  80.  
  81. UICorner_2.CornerRadius = UDim.new(0, 5)
  82. UICorner_2.Parent = SearchBox
  83.  
  84. TFrame3.Name = "TFrame3"
  85. TFrame3.Parent = ButtonMenu
  86. TFrame3.Active = true
  87. TFrame3.AnchorPoint = Vector2.new(0.5, 0)
  88. TFrame3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  89. TFrame3.BackgroundTransparency = 1.000
  90. TFrame3.BorderSizePixel = 0
  91. TFrame3.Position = UDim2.new(1.5, 0, 0.166999996, 0)
  92. TFrame3.Size = UDim2.new(1, 0, 0.781967223, 0)
  93. TFrame3.ScrollBarThickness = 6
  94. TFrame3.CanvasSize = UDim2.new(0, 0, 5, 0)
  95.  
  96. UIListLayout_2.Parent = TFrame3
  97. UIListLayout_2.HorizontalAlignment = Enum.HorizontalAlignment.Center
  98. UIListLayout_2.Padding = UDim.new(0.00499999989, 0)
  99.  
  100. TFrame1.Name = "TFrame1"
  101. TFrame1.Parent = ButtonMenu
  102. TFrame1.Active = true
  103. TFrame1.AnchorPoint = Vector2.new(0.5, 0)
  104. TFrame1.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  105. TFrame1.BackgroundTransparency = 1.000
  106. TFrame1.BorderSizePixel = 0
  107. TFrame1.Position = UDim2.new(0.49999997, 0, 0.167032808, 0)
  108. TFrame1.Size = UDim2.new(1, 0, 0.781967223, 0)
  109. TFrame1.ScrollBarThickness = 6
  110. TFrame1.CanvasSize = UDim2.new(0, 0, 10, 0)
  111.  
  112. UIListLayout_3.Parent = TFrame1
  113. UIListLayout_3.HorizontalAlignment = Enum.HorizontalAlignment.Center
  114. UIListLayout_3.SortOrder = Enum.SortOrder.Name
  115. UIListLayout_3.Padding = UDim.new(0.0025, 0)
  116.  
  117. SideBar.Name = "SideBar"
  118. SideBar.Parent = MainFrame
  119. SideBar.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  120. SideBar.BorderSizePixel = 0
  121. SideBar.ClipsDescendants = true
  122. SideBar.Size = UDim2.new(0.347593576, 0, 1, 0)
  123.  
  124. SBFrame.Name = "SBFrame"
  125. SBFrame.Parent = SideBar
  126. SBFrame.Active = true
  127. SBFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  128. SBFrame.BackgroundTransparency = 1.000
  129. SBFrame.BorderSizePixel = 0
  130. SBFrame.Position = UDim2.new(0, 0, 0.167032808, 0)
  131. SBFrame.Size = UDim2.new(1, 0, 0.79996711, 0)
  132. SBFrame.ScrollBarThickness = 6
  133.  
  134. UIListLayout_4.Parent = SBFrame
  135. UIListLayout_4.HorizontalAlignment = Enum.HorizontalAlignment.Center
  136. UIListLayout_4.SortOrder = Enum.SortOrder.LayoutOrder
  137. UIListLayout_4.Padding = UDim.new(0.00999999978, 0)
  138.  
  139. Button1.Name = "Button1"
  140. Button1.Parent = SBFrame
  141. Button1.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  142. Button1.BorderSizePixel = 0
  143. Button1.ClipsDescendants = true
  144. Button1.Position = UDim2.new(0.0670000091, 0, 0, 0)
  145. Button1.Size = UDim2.new(0.865999997, 0, 0.0619739033, 0)
  146. Button1.Selected = true
  147. Button1.Font = Enum.Font.GothamBold
  148. Button1.Text = "Spellen"
  149. Button1.TextColor3 = Color3.fromRGB(255, 255, 255)
  150. Button1.TextSize = 18.000
  151.  
  152. UICorner_5.CornerRadius = UDim.new(0, 5)
  153. UICorner_5.Parent = Button1
  154.  
  155. Button2.Name = "Button2"
  156. Button2.Parent = SBFrame
  157. Button2.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  158. Button2.BorderSizePixel = 0
  159. Button2.ClipsDescendants = true
  160. Button2.Position = UDim2.new(0.0670000091, 0, 0, 0)
  161. Button2.Size = UDim2.new(0.865999997, 0, 0.0619739033, 0)
  162. Button2.Selected = true
  163. Button2.Font = Enum.Font.GothamBold
  164. Button2.Text = "Meer Hubs"
  165. Button2.TextColor3 = Color3.fromRGB(255, 255, 255)
  166. Button2.TextSize = 18.000
  167.  
  168. UICorner_6.CornerRadius = UDim.new(0, 5)
  169. UICorner_6.Parent = Button2
  170.  
  171. Button3.Name = "Button3"
  172. Button3.Parent = SBFrame
  173. Button3.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  174. Button3.BorderSizePixel = 0
  175. Button3.ClipsDescendants = true
  176. Button3.Position = UDim2.new(0.0670000091, 0, 0, 0)
  177. Button3.Size = UDim2.new(0.865999997, 0, 0.0619739033, 0)
  178. Button3.Selected = true
  179. Button3.Font = Enum.Font.GothamBold
  180. Button3.Text = "Voor (Bijna) Alle games"
  181. Button3.TextColor3 = Color3.fromRGB(255, 255, 255)
  182. Button3.TextSize = 18.000
  183.  
  184. UICorner_7.CornerRadius = UDim.new(0, 5)
  185. UICorner_7.Parent = Button3
  186.  
  187. CocoLogo.Name = "CocoLogo"
  188. CocoLogo.Parent = SideBar
  189. CocoLogo.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  190. CocoLogo.BackgroundTransparency = 1.000
  191. CocoLogo.BorderSizePixel = 0
  192. CocoLogo.ClipsDescendants = true
  193. CocoLogo.Position = UDim2.new(0.0312820822, 0, 0.02000002, 0)
  194. CocoLogo.Size = UDim2.new(0, 30, 0, 30)
  195. CocoLogo.Image = "http://www.roblox.com/asset/?id=11864617766"
  196.  
  197. MinimizeBTN.Name = "MinimizeBTN"
  198. MinimizeBTN.Parent = SideBar
  199. MinimizeBTN.BackgroundTransparency = 1.000
  200. MinimizeBTN.BorderSizePixel = 0
  201. MinimizeBTN.ClipsDescendants = true
  202. MinimizeBTN.Position = UDim2.new(0.812820554, 0, 0.0196721312, 0)
  203. MinimizeBTN.Size = UDim2.new(0, 30, 0, 30)
  204. MinimizeBTN.ZIndex = 2
  205. MinimizeBTN.Image = "rbxassetid://11864617766"
  206. MinimizeBTN.ImageRectOffset = Vector2.new(884, 284)
  207. MinimizeBTN.ImageRectSize = Vector2.new(36, 36)
  208.  
  209. -- Scripts:
  210.  
  211. local function BCYGOT_fake_script() -- MainFrame.MainScript
  212. local script = Instance.new('LocalScript', MainFrame)
  213.  
  214. local searchBar = script.Parent.ButtonMenu.SearchBox
  215. local buttonmenu = script.Parent.ButtonMenu
  216. local Minimized = false
  217.  
  218. wait(0.5)
  219. script.Parent:TweenPosition(UDim2.new(0.5,0,0.5,0), "Out", "Quad", 0.5, true)
  220.  
  221. function UpdateResults()
  222. local search = string.lower(searchBar.Text)
  223. for i, v in pairs(buttonmenu.TFrame1:GetChildren()) do
  224. if v:IsA("GuiButton") then
  225. if search ~= "" then
  226. local item = string.lower(v.Text)
  227. if string.find(item, search) then
  228. v.Visible = true
  229. else
  230. v.Visible = false
  231. end
  232. else
  233. v.Visible = true
  234. end
  235. end
  236. end
  237. for i, v in pairs(buttonmenu.TFrame2:GetChildren()) do
  238. if v:IsA("GuiButton") then
  239. if search ~= "" then
  240. local item = string.lower(v.Text)
  241. if string.find(item, search) then
  242. v.Visible = true
  243. else
  244. v.Visible = false
  245. end
  246. else
  247. v.Visible = true
  248. end
  249. end
  250. end
  251. for i, v in pairs(buttonmenu.TFrame3:GetChildren()) do
  252. if v:IsA("GuiButton") then
  253. if search ~= "" then
  254. local item = string.lower(v.Text)
  255. if string.find(item, search) then
  256. v.Visible = true
  257. else
  258. v.Visible = false
  259. end
  260. else
  261. v.Visible = true
  262. end
  263. end
  264. end
  265. end
  266.  
  267. searchBar.Changed:Connect(UpdateResults)
  268.  
  269. local UserInputService = game:GetService("UserInputService")
  270.  
  271. local gui = script.Parent
  272.  
  273. local dragging
  274. local dragInput
  275. local dragStart
  276. local startPos
  277.  
  278. local function update(input)
  279. local delta = input.Position - dragStart
  280. gui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  281. end
  282.  
  283. gui.SideBar.InputBegan:Connect(function(input)
  284. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  285. dragging = true
  286. dragStart = input.Position
  287. startPos = gui.Position
  288.  
  289. input.Changed:Connect(function()
  290. if input.UserInputState == Enum.UserInputState.End then
  291. dragging = false
  292. end
  293. end)
  294. end
  295. end)
  296.  
  297. gui.InputChanged:Connect(function(input)
  298. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  299. dragInput = input
  300. end
  301. end)
  302.  
  303. UserInputService.InputChanged:Connect(function(input)
  304. if input == dragInput and dragging then
  305. update(input)
  306. end
  307. end)
  308.  
  309. local TweenService = game:GetService("TweenService")
  310. local time = 0.5
  311. local CocoLogoFade = TweenService:Create(script.Parent.SideBar.CocoLogo, TweenInfo.new(time), {ImageTransparency = 0})
  312. local CocoLogoFadeOut = TweenService:Create(script.Parent.SideBar.CocoLogo, TweenInfo.new(time), {ImageTransparency = 1})
  313.  
  314. script.Parent.SideBar.MinimizeBTN.MouseButton1Click:connect(function()
  315. if Minimized == false then
  316. Minimized = true
  317. script.Parent.SideBar.SBFrame:TweenPosition(UDim2.new(-1,0,0.167,0), "Out", "Quad", 0.5, true)
  318. script.Parent.ButtonMenu:TweenPosition(UDim2.new(1.348,0,0,0), "Out", "Quad", 0.5, true)
  319. wait(0.8)
  320. script.Parent:TweenSize(UDim2.new(0,561, 0, 30), "Out", "Quad", 0.5, true)
  321. wait(0.5)
  322. CocoLogoFadeOut:Play()
  323. script.Parent.SideBar.MinimizeBTN:TweenPosition(UDim2.new(0.031,0,0.02,0), "Out", "Quad", 0.5, true)
  324. else
  325. Minimized = false
  326. CocoLogoFade:Play()
  327. script.Parent.SideBar.MinimizeBTN:TweenPosition(UDim2.new(0.813,0,0.02,0), "Out", "Quad", 0.5, true)
  328. wait(0.5)
  329. script.Parent:TweenSize(UDim2.new(0,561,0,305), "Out", "Quad", 0.5, true)
  330. wait(0.8)
  331. script.Parent.SideBar.SBFrame:TweenPosition(UDim2.new(0,0,0.167,0), "Out", "Quad", 0.5, true)
  332. script.Parent.ButtonMenu:TweenPosition(UDim2.new(0.348,0,0,0), "Out", "Quad", 0.5, true)
  333. end
  334. end)
  335.  
  336. script.Parent.SideBar.SBFrame.Button1.MouseButton1Click:Connect(function()
  337. script.Parent.ButtonMenu.TFrame2:TweenPosition(UDim2.new(1.5,0,0.167,0), "Out", "Quad", 0.5, true)
  338. script.Parent.ButtonMenu.TFrame3:TweenPosition(UDim2.new(1.5,0,0.167,0), "Out", "Quad", 0.5, true)
  339. wait(0.8)
  340. script.Parent.ButtonMenu.TFrame1:TweenPosition(UDim2.new(0.5,0,0.167,0), "Out", "Quad", 0.5, true)
  341. end)
  342.  
  343. script.Parent.SideBar.SBFrame.Button2.MouseButton1Click:Connect(function()
  344. script.Parent.ButtonMenu.TFrame1:TweenPosition(UDim2.new(1.5,0,0.167,0), "Out", "Quad", 0.5, true)
  345. script.Parent.ButtonMenu.TFrame3:TweenPosition(UDim2.new(1.5,0,0.167,0), "Out", "Quad", 0.5, true)
  346. wait(0.8)
  347. script.Parent.ButtonMenu.TFrame2:TweenPosition(UDim2.new(0.5,0,0.167,0), "Out", "Quad", 0.5, true)
  348. end)
  349.  
  350. script.Parent.SideBar.SBFrame.Button3.MouseButton1Click:Connect(function()
  351. script.Parent.ButtonMenu.TFrame1:TweenPosition(UDim2.new(1.5,0,0.167,0), "Out", "Quad", 0.5, true)
  352. script.Parent.ButtonMenu.TFrame2:TweenPosition(UDim2.new(1.5,0,0.167,0), "Out", "Quad", 0.5, true)
  353. wait(0.8)
  354. script.Parent.ButtonMenu.TFrame3:TweenPosition(UDim2.new(0.5,0,0.167,0), "Out", "Quad", 0.5, true)
  355. end)
  356. end
  357. coroutine.wrap(BCYGOT_fake_script)()
  358.  
  359. local ButtonSys = {}
  360.  
  361. function ButtonSys:CreateButtonF1 (text, callback)
  362. local callback = callback or function() end
  363. local T1Button = Instance.new("TextButton")
  364. local UICorner_4 = Instance.new("UICorner")
  365.  
  366. T1Button.Name = text.."T1BTN"
  367. T1Button.Parent = TFrame1
  368. T1Button.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  369. T1Button.BorderSizePixel = 0
  370. T1Button.Position = UDim2.new(0.0174999218, 0, 0, 0)
  371. T1Button.Size = UDim2.new(0.927999973, 0, 0, 28)
  372. T1Button.Selected = true
  373. T1Button.Font = Enum.Font.Gotham
  374. T1Button.Text = text
  375. T1Button.TextColor3 = Color3.fromRGB(255, 255, 255)
  376. T1Button.TextSize = 14.000
  377. T1Button.MouseButton1Click:Connect(function()
  378. pcall(callback)
  379. end)
  380.  
  381. UICorner_4.CornerRadius = UDim.new(0, 5)
  382. UICorner_4.Parent = T1Button
  383. end
  384.  
  385. function ButtonSys:CreateButtonF2 (text, callback)
  386. local callback = callback or function() end
  387. local T2Button = Instance.new("TextButton")
  388. local UICorner_6 = Instance.new("UICorner")
  389.  
  390. T2Button.Name = text.."T2BTN"
  391. T2Button.Parent = TFrame2
  392. T2Button.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  393. T2Button.BorderSizePixel = 0
  394. T2Button.Position = UDim2.new(0.0174999218, 0, 0, 0)
  395. T2Button.Size = UDim2.new(0.927999973, 0, 0, 28)
  396. T2Button.Selected = true
  397. T2Button.Font = Enum.Font.Gotham
  398. T2Button.Text = text
  399. T2Button.TextColor3 = Color3.fromRGB(255, 255, 255)
  400. T2Button.TextSize = 14.000
  401. T2Button.MouseButton1Click:Connect(function()
  402. pcall(callback)
  403. end)
  404.  
  405. UICorner_6.CornerRadius = UDim.new(0, 5)
  406. UICorner_6.Parent = T2Button
  407. end
  408.  
  409. function ButtonSys:CreateButtonF3 (text, callback)
  410. local callback = callback or function() end
  411. local T3Button = Instance.new("TextButton")
  412. local UICorner_7 = Instance.new("UICorner")
  413.  
  414. T3Button.Name = text.."T3BTN"
  415. T3Button.Parent = TFrame3
  416. T3Button.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  417. T3Button.BorderSizePixel = 0
  418. T3Button.Position = UDim2.new(0.0174999218, 0, 0, 0)
  419. T3Button.Size = UDim2.new(0.927999973, 0, 0, 28)
  420. T3Button.Selected = true
  421. T3Button.Font = Enum.Font.Gotham
  422. T3Button.Text = text
  423. T3Button.TextColor3 = Color3.fromRGB(255, 255, 255)
  424. T3Button.TextSize = 14.000
  425. T3Button.MouseButton1Click:Connect(function()
  426. pcall(callback)
  427. end)
  428.  
  429. UICorner_7.CornerRadius = UDim.new(0, 5)
  430. UICorner_7.Parent = T3Button
  431. end
  432. return ButtonSys
  433. end
  434. return lib
Tags: B123
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement