BoneTheScripter

BoneLib

Sep 3rd, 2022 (edited)
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.40 KB | None | 0 0
  1. local Library = {}
  2.  
  3. local TS = game:GetService("TweenService")
  4. local UIS = game:GetService("UserInputService")
  5. local mouse = game.Players.LocalPlayer:GetMouse()
  6.  
  7. function Library:Create(hubname, gamename)
  8.  
  9. local Hub = Instance.new("ScreenGui")
  10. local MainFrame = Instance.new("Frame")
  11. local TabHolder = Instance.new("ScrollingFrame")
  12. local UICorner = Instance.new("UICorner")
  13.  
  14. local UIListLayout = Instance.new("UIListLayout")
  15. local UICorner_4 = Instance.new("UICorner")
  16. local CloseButton = Instance.new("ImageButton")
  17. local Hubname = Instance.new("TextLabel")
  18. local Gamename = Instance.new("TextLabel")
  19. local Pages = Instance.new("Folder")
  20.  
  21. Hub.Name = "Hub"
  22. Hub.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  23.  
  24. MainFrame.Name = "MainFrame"
  25. MainFrame.Parent = Hub
  26. MainFrame.Active = true
  27. MainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  28. MainFrame.BorderSizePixel = 0
  29. MainFrame.Position = UDim2.new(0.396880418, 0, 0.423832923, 0)
  30. MainFrame.Size = UDim2.new(0, 638, 0, 435)
  31. MainFrame.Draggable = true
  32.  
  33. TabHolder.Name = "TabHolder"
  34. TabHolder.Parent = MainFrame
  35. TabHolder.Active = true
  36. TabHolder.BackgroundColor3 = Color3.fromRGB(27, 27, 27)
  37. TabHolder.BorderSizePixel = 0
  38. TabHolder.Position = UDim2.new(0.015673982, 0, 0.181609198, 0)
  39. TabHolder.Size = UDim2.new(0, 147, 0, 349)
  40. TabHolder.CanvasSize = UDim2.new(0, 0, 0.600000024, 0)
  41. TabHolder.ScrollBarThickness = 2
  42.  
  43. UICorner.Parent = TabHolder
  44.  
  45. UIListLayout.Parent = TabHolder
  46. UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  47. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  48. UIListLayout.Padding = UDim.new(0, 4)
  49.  
  50. UICorner_4.CornerRadius = UDim.new(0, 5)
  51. UICorner_4.Parent = MainFrame
  52.  
  53. CloseButton.Name = "CloseButton"
  54. CloseButton.Parent = MainFrame
  55. CloseButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  56. CloseButton.BackgroundTransparency = 1.000
  57. CloseButton.BorderSizePixel = 0
  58. CloseButton.Position = UDim2.new(0.949843228, 0, 0.016091954, 0)
  59. CloseButton.Size = UDim2.new(0, 25, 0, 25)
  60. CloseButton.Image = "rbxassetid://6236220207"
  61.  
  62. Hubname.Name = "Hubname"
  63. Hubname.Parent = MainFrame
  64. Hubname.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  65. Hubname.BackgroundTransparency = 1.000
  66. Hubname.BorderSizePixel = 0
  67. Hubname.Position = UDim2.new(0.015673982, 0, 0, 0)
  68. Hubname.Size = UDim2.new(0, 255, 0, 32)
  69. Hubname.Font = Enum.Font.SourceSansLight
  70. Hubname.Text = hubname or "Hub-name"
  71. Hubname.TextColor3 = Color3.fromRGB(255, 255, 255)
  72. Hubname.TextSize = 28.000
  73. Hubname.TextStrokeColor3 = Color3.fromRGB(255, 255, 255)
  74. Hubname.TextStrokeTransparency = 0.740
  75. Hubname.TextXAlignment = Enum.TextXAlignment.Left
  76.  
  77. Gamename.Name = "Gamename"
  78. Gamename.Parent = MainFrame
  79. Gamename.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  80. Gamename.BackgroundTransparency = 1.000
  81. Gamename.BorderSizePixel = 0
  82. Gamename.Position = UDim2.new(0.015673982, 0, 0.0436781608, 0)
  83. Gamename.Size = UDim2.new(0, 235, 0, 32)
  84. Gamename.Font = Enum.Font.SourceSansLight
  85. Gamename.Text = gamename or "Game-name"
  86. Gamename.TextColor3 = Color3.fromRGB(209, 209, 209)
  87. Gamename.TextSize = 16.000
  88. Gamename.TextStrokeColor3 = Color3.fromRGB(255, 255, 255)
  89. Gamename.TextStrokeTransparency = 0.900
  90. Gamename.TextXAlignment = Enum.TextXAlignment.Left
  91.  
  92. CloseButton.MouseButton1Click:connect(function() Hub:Destroy() end)
  93.  
  94. Pages.Name = "Pages"
  95. Pages.Parent = MainFrame
  96.  
  97. local Win = {}
  98.  
  99. function Win:Page(pagename, mainpage)
  100.  
  101. local Page = Instance.new("ScrollingFrame")
  102. local UICorner_5 = Instance.new("UICorner")
  103. local PageButton = Instance.new("TextButton")
  104. local UICorner_2 = Instance.new("UICorner")
  105. local UIListLayout_2 = Instance.new("UIListLayout")
  106.  
  107. PageButton.Name = pagename or "PageButton"
  108. PageButton.Parent = TabHolder
  109. PageButton.BackgroundColor3 = Color3.fromRGB(22, 22, 22)
  110. PageButton.BorderSizePixel = 0
  111. PageButton.Position = UDim2.new(0.0408163257, 0, 0.0229226369, 0)
  112. PageButton.Size = UDim2.new(0, 135, 0, 46)
  113. PageButton.AutoButtonColor = false
  114. PageButton.Font = Enum.Font.SourceSansLight
  115. PageButton.Text = pagename or "Page"
  116. PageButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  117. PageButton.TextSize = 22.000
  118. PageButton.TextTransparency = 0.74
  119. PageButton.TextStrokeColor3 = Color3.fromRGB(255, 255, 255)
  120. PageButton.TextStrokeTransparency = 0.960
  121.  
  122. UICorner_2.Parent = PageButton
  123.  
  124. Page.Name = pagename or "Page"
  125. Page.Parent = Pages
  126. Page.Active = true
  127. Page.BackgroundColor3 = Color3.fromRGB(27, 27, 27)
  128. Page.BorderSizePixel = 0
  129. Page.Position = UDim2.new(0.260188073, 0, 0.181609198, 0)
  130. Page.Size = UDim2.new(0, 465, 0, 349)
  131. Page.Visible = false
  132. Page.CanvasSize = UDim2.new(0, 0, 0.600000024, 0)
  133. Page.ScrollBarThickness = 2
  134.  
  135. UIListLayout_2.Parent = Page
  136. UIListLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
  137. UIListLayout_2.Padding = UDim.new(0, 6)
  138.  
  139. UICorner_5.Parent = Page
  140.  
  141. if mainpage then
  142. Page.Visible = true
  143. PageButton.TextTransparency = 0
  144. end
  145.  
  146. local PageItems = {}
  147.  
  148. function PageItems:Button(buttonname, callback)
  149.  
  150. local callback = callback or function() end
  151.  
  152. local Button = Instance.new("Frame")
  153. local TextButton = Instance.new("TextButton")
  154. local UICorner_6 = Instance.new("UICorner")
  155.  
  156. Button.Name = "Button"
  157. Button.Parent = Page
  158. Button.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  159. Button.BackgroundTransparency = 1.000
  160. Button.BorderSizePixel = 0
  161. Button.Size = UDim2.new(0, 465, 0, 46)
  162.  
  163. TextButton.Parent = Button
  164. TextButton.BackgroundColor3 = Color3.fromRGB(21, 21, 21)
  165. TextButton.BorderSizePixel = 0
  166. TextButton.Size = UDim2.new(0, 465, 0, 46)
  167. TextButton.Font = Enum.Font.SourceSans
  168. TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  169. TextButton.TextSize = 18.000
  170. TextButton.Text = buttonname or "Button"
  171.  
  172. UICorner_6.Parent = TextButton
  173.  
  174. TextButton.MouseButton1Click:Connect(function()
  175. pcall(callback)
  176. end)
  177.  
  178. Page.CanvasSize = Page.CanvasSize + UDim2.new(0,0,0,UIListLayout_2.AbsoluteContentSize.Y)
  179.  
  180. end
  181.  
  182. function PageItems:Toggle(togglename, callback)
  183.  
  184. local callback = callback or function() end
  185.  
  186. local Toggle = Instance.new("Frame")
  187. local TextLabel_2 = Instance.new("TextLabel")
  188. local UICorner_8 = Instance.new("UICorner")
  189. local TextButton_2 = Instance.new("TextButton")
  190. local TextButton_Roundify_8px = Instance.new("ImageLabel")
  191. local TextButton_3 = Instance.new("TextButton")
  192. local TextButton_Roundify_8px_2 = Instance.new("ImageLabel")
  193. local ToggleFire = Instance.new("TextButton")
  194.  
  195. Toggle.Name = "Toggle"
  196. Toggle.Parent = Page
  197. Toggle.BackgroundColor3 = Color3.fromRGB(21, 21, 21)
  198. Toggle.BorderSizePixel = 0
  199. Toggle.Size = UDim2.new(0, 465, 0, 44)
  200.  
  201. TextLabel_2.Parent = Toggle
  202. TextLabel_2.BackgroundColor3 = Color3.fromRGB(21, 21, 21)
  203. TextLabel_2.BorderSizePixel = 0
  204. TextLabel_2.Position = UDim2.new(0.0430107526, 0, 0, 0)
  205. TextLabel_2.Size = UDim2.new(0, 354, 0, 44)
  206. TextLabel_2.Font = Enum.Font.SourceSans
  207. TextLabel_2.Text = togglename or "Toggle"
  208. TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  209. TextLabel_2.TextSize = 18.000
  210. TextLabel_2.TextXAlignment = Enum.TextXAlignment.Left
  211.  
  212. UICorner_8.Parent = Toggle
  213.  
  214. TextButton_2.Parent = Toggle
  215. TextButton_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  216. TextButton_2.BackgroundTransparency = 1.000
  217. TextButton_2.BorderSizePixel = 0
  218. TextButton_2.Position = UDim2.new(0.374193549, 0, 0.363636374, 0)
  219. TextButton_2.Size = UDim2.new(0, 200, 0, 50)
  220. TextButton_2.Font = Enum.Font.SourceSans
  221. TextButton_2.Text = ""
  222. TextButton_2.TextColor3 = Color3.fromRGB(0, 0, 0)
  223. TextButton_2.TextSize = 14.000
  224.  
  225. TextButton_Roundify_8px.Name = "TextButton_Roundify_8px"
  226. TextButton_Roundify_8px.Parent = TextButton_2
  227. TextButton_Roundify_8px.Active = true
  228. TextButton_Roundify_8px.AnchorPoint = Vector2.new(0.5, 0.5)
  229. TextButton_Roundify_8px.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  230. TextButton_Roundify_8px.BackgroundTransparency = 1.000
  231. TextButton_Roundify_8px.Position = UDim2.new(1.27250004, 0, 0.109999999, 0)
  232. TextButton_Roundify_8px.Selectable = true
  233. TextButton_Roundify_8px.Size = UDim2.new(0.264999986, 0, 0.5, 0)
  234. TextButton_Roundify_8px.Image = "rbxassetid://3570695787"
  235. TextButton_Roundify_8px.ImageColor3 = Color3.fromRGB(27, 27, 27)
  236. TextButton_Roundify_8px.ScaleType = Enum.ScaleType.Slice
  237. TextButton_Roundify_8px.SliceCenter = Rect.new(100, 100, 100, 100)
  238. TextButton_Roundify_8px.SliceScale = 0.667
  239.  
  240. ToggleFire.Name = "ToggleFire"
  241. ToggleFire.Parent = Toggle
  242. ToggleFire.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  243. ToggleFire.BackgroundTransparency = 1.000
  244. ToggleFire.Size = UDim2.new(0, 464, 0, 44)
  245. ToggleFire.Font = Enum.Font.SourceSans
  246. ToggleFire.Text = ""
  247. ToggleFire.TextColor3 = Color3.fromRGB(0, 0, 0)
  248. ToggleFire.TextSize = 14.000
  249.  
  250. TextButton_3.Parent = TextButton_Roundify_8px
  251. TextButton_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  252. TextButton_3.BackgroundTransparency = 1.000
  253. TextButton_3.BorderSizePixel = 0
  254. TextButton_3.Position = UDim2.new(0.490566254, 0, 0.280000091, 0)
  255. TextButton_3.Size = UDim2.new(0, 20, 0, 21)
  256. TextButton_3.Font = Enum.Font.SourceSans
  257. TextButton_3.Text = ""
  258. TextButton_3.TextColor3 = Color3.fromRGB(0, 0, 0)
  259. TextButton_3.TextSize = 14.000
  260.  
  261. TextButton_Roundify_8px_2.Name = "TextButton_Roundify_8px"
  262. TextButton_Roundify_8px_2.Parent = TextButton_3
  263. TextButton_Roundify_8px_2.Active = true
  264. TextButton_Roundify_8px_2.AnchorPoint = Vector2.new(0.5, 0.5)
  265. TextButton_Roundify_8px_2.BackgroundColor3 = Color3.fromRGB(148, 148, 148)
  266. TextButton_Roundify_8px_2.BackgroundTransparency = 1.000
  267. TextButton_Roundify_8px_2.Position = UDim2.new(-0.649999976, 0, 0.285714298, 0)
  268. TextButton_Roundify_8px_2.Selectable = true
  269. TextButton_Roundify_8px_2.Size = UDim2.new(0.699999988, 0, 0.666666687, 0)
  270. TextButton_Roundify_8px_2.Image = "rbxassetid://3570695787"
  271. TextButton_Roundify_8px_2.ScaleType = Enum.ScaleType.Slice
  272. TextButton_Roundify_8px_2.SliceCenter = Rect.new(100, 100, 100, 100)
  273. TextButton_Roundify_8px_2.SliceScale = 0.667
  274.  
  275. local toggled = false
  276.  
  277. ToggleFire.MouseButton1Down:Connect(function()
  278.  
  279. if toggled == false then
  280.  
  281. TS:Create(TextButton_Roundify_8px_2, TweenInfo.new(0.2), {Position = UDim2.new(0.65, 0,0.286, 0)}):Play()
  282. TS:Create(TextButton_Roundify_8px, TweenInfo.new(0.2), {ImageColor3 = presetColor}):Play()
  283.  
  284. else
  285.  
  286. TS:Create(TextButton_Roundify_8px_2, TweenInfo.new(0.2), {Position = UDim2.new(-0.65, 0, 0.286, 0)}):Play()
  287. TS:Create(TextButton_Roundify_8px, TweenInfo.new(0.2), {ImageColor3 = Color3.fromRGB(27, 27, 27)}):Play()
  288.  
  289. end
  290.  
  291. toggled = not toggled
  292. pcall(callback, toggled)
  293.  
  294. end)
  295.  
  296. Page.CanvasSize = Page.CanvasSize + UDim2.new(0,0,0,UIListLayout_2.AbsoluteContentSize.Y)
  297.  
  298. end
  299.  
  300. function PageItems:Slider(slidername, minvalue, maxvalue, callback)
  301.  
  302. local callback = callback or function() end
  303. local Value
  304.  
  305. local Slider = Instance.new("Frame")
  306. local TextLabel_5 = Instance.new("TextLabel")
  307. local UICorner_11 = Instance.new("UICorner")
  308. local TextLabel_6 = Instance.new("TextLabel")
  309. local OuterSlider = Instance.new("Frame")
  310. local UICorner = Instance.new("UICorner")
  311. local InnerSlider = Instance.new("Frame")
  312. local UICorner_2 = Instance.new("UICorner")
  313. local SliderFire = Instance.new("TextButton")
  314.  
  315. Slider.Name = "Slider"
  316. Slider.Parent = Page
  317. Slider.BackgroundColor3 = Color3.fromRGB(21, 21, 21)
  318. Slider.BorderSizePixel = 0
  319. Slider.Size = UDim2.new(0, 465, 0, 44)
  320.  
  321. TextLabel_5.Parent = Slider
  322. TextLabel_5.BackgroundColor3 = Color3.fromRGB(21, 21, 21)
  323. TextLabel_5.BorderSizePixel = 0
  324. TextLabel_5.Position = UDim2.new(0.0430107526, 0, 0, 0)
  325. TextLabel_5.Size = UDim2.new(0, 354, 0, 25)
  326. TextLabel_5.Font = Enum.Font.SourceSans
  327. TextLabel_5.Text = slidername or "Slider"
  328. TextLabel_5.TextColor3 = Color3.fromRGB(255, 255, 255)
  329. TextLabel_5.TextSize = 18.000
  330. TextLabel_5.TextXAlignment = Enum.TextXAlignment.Left
  331.  
  332. UICorner_11.Parent = Slider
  333.  
  334. TextLabel_6.Parent = Slider
  335. TextLabel_6.BackgroundColor3 = Color3.fromRGB(21, 21, 21)
  336. TextLabel_6.BorderSizePixel = 0
  337. TextLabel_6.Position = UDim2.new(0.752688169, 0, 0, 0)
  338. TextLabel_6.Size = UDim2.new(0, 98, 0, 25)
  339. TextLabel_6.Font = Enum.Font.SourceSans
  340. TextLabel_6.Text = minvalue or "0"
  341. TextLabel_6.TextColor3 = Color3.fromRGB(255, 255, 255)
  342. TextLabel_6.TextSize = 18.000
  343. TextLabel_6.TextXAlignment = Enum.TextXAlignment.Right
  344.  
  345. OuterSlider.Name = "OuterSlider"
  346. OuterSlider.Parent = Slider
  347. OuterSlider.BackgroundColor3 = Color3.fromRGB(27, 27, 27)
  348. OuterSlider.Position = UDim2.new(0.0215053763, 0, 0.568181813, 0)
  349. OuterSlider.Size = UDim2.new(0, 444, 0, 9)
  350.  
  351. UICorner.Parent = OuterSlider
  352.  
  353. InnerSlider.Name = "InnerSlider"
  354. InnerSlider.Parent = OuterSlider
  355. InnerSlider.BackgroundColor3 = presetColor
  356. InnerSlider.Size = UDim2.new(0, 0, 0, 9)
  357. InnerSlider.BorderSizePixel = 0
  358.  
  359. UICorner_2.Parent = InnerSlider
  360.  
  361. SliderFire.Name = "SliderFire"
  362. SliderFire.Parent = OuterSlider
  363. SliderFire.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  364. SliderFire.BackgroundTransparency = 1.000
  365. SliderFire.Size = UDim2.new(0, 444, 0, 9)
  366. SliderFire.Font = Enum.Font.SourceSans
  367. SliderFire.Text = ""
  368. SliderFire.TextColor3 = Color3.fromRGB(0, 0, 0)
  369. SliderFire.TextSize = 14.000
  370.  
  371. SliderFire.MouseButton1Down:Connect(function()
  372. Value = math.floor((((tonumber(maxvalue) - tonumber(minvalue)) / 444) *InnerSlider.AbsoluteSize.X) + tonumber(minvalue)) or 0
  373. pcall(function()
  374. callback(Value)
  375. end)
  376. InnerSlider.Size = UDim2.new(0, math.clamp(mouse.X -InnerSlider.AbsolutePosition.X, 0, 444), 0, 9)
  377. moveconnection = mouse.Move:Connect(function()
  378. TextLabel_6.Text = Value
  379. Value = math.floor((((tonumber(maxvalue) - tonumber(minvalue)) / 444) *InnerSlider.AbsoluteSize.X) + tonumber(minvalue))
  380. pcall(function()
  381. callback(Value)
  382. end)
  383. InnerSlider.Size = UDim2.new(0, math.clamp(mouse.X -InnerSlider.AbsolutePosition.X, 0, 444), 0, 9)
  384. end)
  385. releaseconnection = UIS.InputEnded:Connect(function(Mouse)
  386. if Mouse.UserInputType == Enum.UserInputType.MouseButton1 then
  387. Value = math.floor((((tonumber(maxvalue) - tonumber(minvalue)) / 444) *InnerSlider.AbsoluteSize.X) + tonumber(minvalue))
  388. TextLabel_6.Text = Value
  389. pcall(function()
  390. callback(Value)
  391. end)
  392. InnerSlider.Size = UDim2.new(0, math.clamp(mouse.X -InnerSlider.AbsolutePosition.X, 0, 444), 0, 9)
  393. moveconnection:Disconnect()
  394. releaseconnection:Disconnect()
  395. end
  396. end)
  397. end)
  398.  
  399. Page.CanvasSize = Page.CanvasSize + UDim2.new(0,0,0,UIListLayout_2.AbsoluteContentSize.Y)
  400.  
  401. end
  402.  
  403. function PageItems:Dropdown(dropdownname, itemlist, callback)
  404.  
  405. local callback = callback or function() end
  406.  
  407. local Dropdown = Instance.new("Frame")
  408. local TextLabel_4 = Instance.new("TextLabel")
  409. local UICorner_10 = Instance.new("UICorner")
  410. local ImageButton = Instance.new("ImageButton")
  411.  
  412. Dropdown.Name = "Toggle2"
  413. Dropdown.Parent = Page
  414. Dropdown.BackgroundColor3 = Color3.fromRGB(21, 21, 21)
  415. Dropdown.BorderSizePixel = 0
  416. Dropdown.Size = UDim2.new(0, 465, 0, 44)
  417.  
  418. TextLabel_4.Parent = Dropdown
  419. TextLabel_4.BackgroundColor3 = Color3.fromRGB(21, 21, 21)
  420. TextLabel_4.BorderSizePixel = 0
  421. TextLabel_4.Position = UDim2.new(0.0430107526, 0, 0, 0)
  422. TextLabel_4.Size = UDim2.new(0, 354, 0, 44)
  423. TextLabel_4.Font = Enum.Font.SourceSans
  424. TextLabel_4.Text = "Dropdown"
  425. TextLabel_4.TextColor3 = Color3.fromRGB(255, 255, 255)
  426. TextLabel_4.TextSize = 18.000
  427. TextLabel_4.TextXAlignment = Enum.TextXAlignment.Left
  428.  
  429. UICorner_10.Parent = Dropdown
  430.  
  431. ImageButton.Parent = Dropdown
  432. ImageButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  433. ImageButton.BackgroundTransparency = 1.000
  434. ImageButton.BorderSizePixel = 0
  435. ImageButton.Position = UDim2.new(0.922580659, 0, 0.204545453, 0)
  436. ImageButton.Size = UDim2.new(0, 26, 0, 26)
  437. ImageButton.AutoButtonColor = false
  438. ImageButton.Image = "rbxassetid://4430382116"
  439.  
  440. Page.CanvasSize = Page.CanvasSize + UDim2.new(0,0,0,UIListLayout_2.AbsoluteContentSize.Y)
  441.  
  442. end
  443.  
  444. return PageItems
  445.  
  446. end
  447.  
  448. return Win
  449.  
  450. end
  451.  
  452. return Library
  453.  
Advertisement
Add Comment
Please, Sign In to add comment