kaualima12

b

May 1st, 2019
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 80.92 KB | None | 0 0
  1. -- asd --
  2.  
  3. repeat wait() until workspace.CurrentCamera
  4.  
  5. -- Load previous settings --
  6.  
  7. local savedColor = "152, 6, 235"
  8. local savedKey = "Q"
  9.  
  10. coroutine.wrap(function()
  11. local _,_,r,g,b = string.find(tostring(savedColor), "(%d+)%D+(%d+)%D+(%d+)")
  12. savedColor = Color3.fromRGB(r,g,b)
  13. savedKey = Enum.KeyCode[savedKey]
  14. end)()
  15.  
  16. ----- Settings -----
  17.  
  18. local settings = {
  19. toggleKey = savedKey; -- Key to open/close
  20. blurLevel = 35; -- Blur level, when open
  21. mainColor = savedColor;--Color3.fromRGB(33,150,243);
  22. textColor = Color3.new(1, 1, 1);
  23. }
  24.  
  25. ----- Classifications -----
  26.  
  27. local TABS = {
  28. -- {
  29. -- Name = 'Users';
  30. -- Icon = 'http://www.roblox.com/asset/?id=658932978';
  31. -- };
  32. {
  33. Name = 'Scripts';
  34. Icon = 'rbxassetid://728745761';
  35. };
  36. {
  37. Name = 'Game';
  38. Icon = 'rbxassetid://728745470';
  39. };
  40. {
  41. Name = 'Server';
  42. Icon = 'rbxassetid://658933127';
  43. };
  44. {
  45. Name = 'Music';
  46. Icon = 'rbxassetid://728745690';
  47. };
  48. {
  49. Name = 'Library';
  50. Icon = 'rbxassetid://728745585';
  51. };
  52. {
  53. Name = 'Settings';
  54. Icon = 'rbxassetid://898100298';
  55. };
  56. {
  57. Name = 'Info';
  58. Icon = 'rbxassetid://894507994';
  59. };
  60. }
  61.  
  62. ----- Main API -----
  63.  
  64. local runservice = game:GetService'RunService'
  65.  
  66. local services = setmetatable({
  67. workspace = workspace;
  68. lighting = game:service'Lighting';
  69. replicated = game:service'ReplicatedStorage';
  70. plrs = game:service'Players';
  71. step = runservice.Stepped;
  72. rstep = runservice.RenderStepped;
  73. input = game:GetService'UserInputService';
  74. camera = workspace.CurrentCamera;
  75. plr = game:service'Players'.LocalPlayer;
  76. plrgui = game:service'Players'.LocalPlayer:WaitForChild("PlayerGui");
  77. mouse = game:service'Players'.LocalPlayer:GetMouse();
  78. }, {__index = function(_, service) return game:GetService(service) or services[service] or nil end});
  79.  
  80. local minimizedWindows = {}
  81.  
  82. local colorCheck = settings.mainColor
  83.  
  84. function create(obj, tbl)
  85. local nobj = Instance.new(obj)
  86. for i,v in pairs(tbl) do
  87. nobj[i] = v
  88. end
  89. return nobj
  90. end
  91.  
  92. function createShadow(parent)
  93. return create('Frame', {
  94. Size = UDim2.new(1, 8, 1, 8);
  95. Position = UDim2.new(0, -4, 0, -4);
  96. Style = Enum.FrameStyle.DropShadow;
  97. ZIndex = parent.ZIndex - 1;
  98. Parent = parent;
  99. })
  100. end
  101.  
  102. function createSmallShadow(parent)
  103. return create('Frame', {
  104. Size = UDim2.new(1, 6, 1, 6);
  105. Position = UDim2.new(0, -3, 0, -3);
  106. Style = Enum.FrameStyle.DropShadow;
  107. ZIndex = parent.ZIndex - 1;
  108. Parent = parent;
  109. })
  110. end
  111.  
  112.  
  113. function event()
  114. return Instance.new'BindableEvent'
  115. end
  116.  
  117. local onKeyPress = event()
  118.  
  119. local binds = {}
  120.  
  121. function bindToKey(key, func, nam)
  122. table.insert(binds, {key, func, nam})
  123. end
  124.  
  125. function getBindList(cod)
  126. local lst = {}
  127. for _,v in pairs(binds) do
  128. if v[1] == cod then
  129. table.insert(lst, v[2])
  130. end
  131. end
  132. return lst
  133. end
  134.  
  135. function createIcon(ic, prop, clik)
  136. local nic = create(clik and 'ImageButton' or 'ImageLabel', {
  137. Image = ic;
  138. BackgroundTransparency = 1;
  139. })
  140. for i,v in pairs(prop) do
  141. nic[i] = v
  142. end
  143. return nic
  144. end
  145.  
  146. function Children(parent,func)
  147. coroutine.wrap(function()
  148. for i,v in pairs(parent:children())do
  149. pcall(function()
  150. func(v)
  151. end)
  152. pcall(function()
  153. Children(v,func)
  154. end)
  155. end
  156. end)()
  157. end
  158.  
  159. function httpGet(query)
  160. return game:HttpGet(query, true)
  161. end
  162.  
  163. local toggleable = true
  164. services.input.InputBegan:connect(function(inp)
  165. if inp.UserInputType == Enum.UserInputType.Keyboard then
  166. if toggleable == false then return end
  167. onKeyPress:Fire(inp.KeyCode)
  168. for _,v in pairs(getBindList(inp.KeyCode)) do
  169. spawn(v)
  170. end
  171. end
  172. end)
  173.  
  174. ----- Blur Module -----
  175.  
  176. local blurEffect = create('BlurEffect', {
  177. Parent = workspace.CurrentCamera;
  178. Size = 0;
  179. })
  180.  
  181. local blurLevel = 0
  182.  
  183. services.step:connect(function()
  184. local nm,nm2 = blurEffect.Size,services.camera.FieldOfView
  185. blurEffect.Size = nm + ((blurLevel - nm) * .1)
  186. end)
  187.  
  188. ----- Set up gui -----
  189.  
  190. local gui = create('ScreenGui', {
  191. Parent = services.plrgui; --services.plrgui;
  192. Name = 'NebulaV2';
  193. })
  194. local pingui = create('ScreenGui',{
  195. Parent = services.plrgui;
  196. Name = 'NebulaV2pinned';
  197. })
  198. local enabled = false
  199.  
  200. ----- Recursive Transparency -----
  201.  
  202. function getGuiRecursive(par)
  203. local rect = {par}
  204.  
  205. local function drect(par)
  206. for _,v in pairs(par:GetChildren()) do
  207. if v:IsA'GuiObject' and not v.Name:sub(1, 1) == '-' then table.insert(rect, v) end
  208. drect(v)
  209. end
  210. end
  211.  
  212. drect(par)
  213.  
  214. return rect
  215. end
  216.  
  217. function makePsuedoBorder(g,length)
  218. local top = create('Frame',{
  219. ZIndex = g.ZIndex;
  220. Size = UDim2.new(1,length,0,length);
  221. Position = UDim2.new(0,0,0,-length);
  222. BackgroundColor3 = Color3.new(1,1,1);
  223. BorderSizePixel = 0;
  224. Parent = g;
  225. })
  226. local bottom = create('Frame',{
  227. ZIndex = g.ZIndex;
  228. Size = UDim2.new(1,length,0,length);
  229. Position = UDim2.new(0,-length,1,0);
  230. BackgroundColor3 = Color3.new(1,1,1);
  231. BorderSizePixel = 0;
  232. Parent = g;
  233. })
  234. local left = create('Frame',{
  235. ZIndex = g.ZIndex;
  236. Size = UDim2.new(0,length,1,length);
  237. Position = UDim2.new(0,-length,0,-length);
  238. BackgroundColor3 = Color3.new(1,1,1);
  239. BorderSizePixel = 0;
  240. Parent = g;
  241. })
  242. local right = create('Frame',{
  243. ZIndex = g.ZIndex;
  244. Size = UDim2.new(0,length,1,length);
  245. Position = UDim2.new(1,0,0,0);
  246. BackgroundColor3 = Color3.new(1,1,1);
  247. BorderSizePixel = 0;
  248. Parent = g;
  249. })
  250. end
  251.  
  252. function getTransparencyProperty(obj)
  253. if obj.ClassName:sub(1, 5) == 'Image' then
  254. return 'ImageTransparency'
  255. elseif obj.ClassName:sub(1, 4) == 'Text' then
  256. return 'TextTransparency'
  257. end
  258. return 'BackgroundTransparency'
  259. end
  260.  
  261. function setRecursiveTransparency(of, trans)
  262. coroutine.wrap(function()
  263. for _,v in pairs(getGuiRecursive(of)) do
  264. v[getTransparencyProperty(v)] = trans
  265. end
  266. end)
  267. end
  268.  
  269. function tweenRecursiveTransparency(of, trans, chg)
  270. for _,v in pairs(getGuiRecursive(of)) do
  271. spawn(function()
  272. local tp = getTransparencyProperty(v)
  273. for i=v[tp], trans, chg do
  274. v[tp] = i
  275. services.step:wait()
  276. end
  277. v[tp] = trans
  278. end)
  279. end
  280. end
  281.  
  282. ----- Window API -----
  283.  
  284. local tabHolder = create('Frame', {
  285. Name = "Nebula";
  286. Size = UDim2.new(0, 0, 0, #TABS * 35);
  287. Position = UDim2.new(0, 10, .5, 0);
  288. AnchorPoint = Vector2.new(0, .5);
  289. BackgroundTransparency = 1;
  290. Parent = gui;
  291. })
  292.  
  293. local Window = {}
  294.  
  295. function Window.new(properties)
  296. local newWindow = create('Frame', {
  297. Size = UDim2.new(0, properties.width - 50, 0, properties.height - 50);
  298. ZIndex = 8;
  299. BorderSizePixel = 0;
  300. BackgroundColor3 = settings.mainColor;
  301. Name = properties.name;
  302. Parent = gui;
  303. })
  304. -- local theme = create('ImageLabel',{
  305. -- ZIndex = 8;
  306. -- BackgroundTransparency = 1;
  307. -- Image = "rbxassetid://132878702";
  308. -- Size = UDim2.new(1,0,1,0);
  309. -- Parent = newWindow;
  310. -- })
  311. newWindow.Position = (properties.position or UDim2.new(.5, -(newWindow.AbsoluteSize.X/2)+(#gui:children()-1)*30, .5, -(newWindow.AbsoluteSize.Y/2)+(#gui:children()-1)*30)) + UDim2.new(0, 25, 0, 25);
  312. local nshad = createShadow(newWindow)
  313. nshad.Visible = false
  314. local top = create('TextButton', {
  315. Name = "Drag";
  316. Size = UDim2.new(1, 0, 0, 30);
  317. Position = UDim2.new(0, 31, 0, 0);
  318. TextXAlignment = Enum.TextXAlignment.Left;
  319. BackgroundTransparency = 1;
  320. Font = Enum.Font.SourceSansLight;
  321. FontSize = Enum.FontSize.Size24;
  322. TextSize = 22;
  323. Text = properties.name;
  324. TextColor3 = settings.textColor;
  325. ZIndex = 8;
  326. Draggable = true;
  327. Parent = newWindow;
  328. })
  329. local content = create('Frame',{
  330. Name = "Content";
  331. ZIndex = 8;
  332. Size = UDim2.new(1, 0, 1, -30);
  333. Position = UDim2.new(0, 0, 0, 30);
  334. BackgroundColor3 = Color3.new(1, 1, 1);
  335. BackgroundTransparency = 1;
  336. Transparency = 1;
  337. Parent = newWindow;
  338. })
  339. top.Changed:connect(function(ch)
  340. if ch == 'Position' then
  341. newWindow.Position = newWindow.Position + top.Position - UDim2.new(0, 31, 0, 0)
  342. top.Position = UDim2.new(0, 31, 0, 0)
  343. end
  344. end)
  345. newWindow.Changed:connect(function(ch)
  346. if ch == 'AbsolutePosition'then
  347. if newWindow.AbsolutePosition.Y < 0 then
  348. newWindow.Position = UDim2.new(newWindow.Position.X,UDim.new(0,0))
  349. elseif newWindow.AbsolutePosition.Y > gui.AbsoluteSize.Y - 30 then
  350. newWindow.Position = UDim2.new(newWindow.Position.X,UDim.new(0,gui.AbsoluteSize.Y - 30))
  351. end
  352. end
  353. end)
  354. local icon = createIcon(properties.icon, {
  355. Name = "Icon";
  356. Size = UDim2.new(0, 24, 0, 24);
  357. Position = UDim2.new(0, 3, 0, 3);
  358. ZIndex = 8;
  359. Parent = newWindow;
  360. })
  361. local close = createIcon('http://www.roblox.com/asset/?id=708205809', {
  362. Name = "Close";
  363. Size = UDim2.new(0, 24, 0, 24);
  364. Position = UDim2.new(1, -27, 0, 3);
  365. ZIndex = 8;
  366. Parent = newWindow;
  367. }, true)
  368. local minimize = createIcon('http://www.roblox.com/asset/?id=708205677', {
  369. Name = "Minimize";
  370. Size = UDim2.new(0, 20, 0, 20);
  371. Position = UDim2.new(1, -50, 0, 5);
  372. ZIndex = 8;
  373. Parent = newWindow;
  374. }, true)
  375. local pin = createIcon('http://www.roblox.com/asset/?id=708679031', {
  376. Name = "Pin";
  377. Size = UDim2.new(0, 20, 0, 20);
  378. Position = UDim2.new(1, -75, 0, 5);
  379. ZIndex = 8;
  380. Rotation = 0;
  381. Parent = newWindow;
  382. }, true)
  383.  
  384. local function updateMinimize()
  385. local pos = 0
  386. for i,v in pairs(minimizedWindows)do
  387. coroutine.wrap(function()
  388. v.Win:TweenPosition(UDim2.new(0,pos,1,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quad ,.65,true)
  389. pos = pos + v.Win.AbsoluteSize.X
  390. end)()
  391. end
  392. end
  393.  
  394. local minimized = false
  395. local function minimizeToggle(move)
  396. if minimized then
  397. for i,v in pairs(minimizedWindows)do
  398. if v.Win == newWindow then
  399. table.remove(minimizedWindows,i)
  400. if move then
  401. newWindow:TweenPosition(v.Pos,Enum.EasingDirection.Out,Enum.EasingStyle.Quad ,.65,true)
  402. end
  403. end
  404. end
  405. updateMinimize()
  406. top.Draggable = true
  407. else
  408. table.insert(minimizedWindows,{Win = newWindow,Pos = newWindow.Position})
  409. top.Draggable = false
  410. updateMinimize()
  411. end
  412. end
  413.  
  414. local pinned = false;
  415. pin.MouseButton1Down:connect(function()
  416. if not minimized then
  417. if pinned then
  418. pin.Rotation = 0;
  419. newWindow.Parent = gui;
  420. newWindow.Visible = enabled
  421. pinned = false;
  422. else
  423. pin.Rotation = -30;
  424. newWindow.Parent = pingui;
  425. pinned = true;
  426. end
  427. end
  428. end)
  429.  
  430. close.MouseButton1Down:connect(function()
  431. if properties.closed then
  432. properties.closed(newWindow)
  433. end
  434. nshad.Visible = false
  435. coroutine.wrap(function()
  436. newWindow:TweenSizeAndPosition(UDim2.new(0, properties.width, 0, properties.height), newWindow.Position - UDim2.new(0, 25, 0, 25), 'Out', 'Quart', .3, true)
  437. tweenRecursiveTransparency(newWindow, 1, .15)
  438. wait(.05)
  439. newWindow:ClearAllChildren()
  440. if minimized then minimizeToggle()end
  441. wait(.125)
  442. newWindow:Destroy()
  443. end)()
  444. end)
  445.  
  446. minimize.MouseButton1Down:connect(function()
  447. if not pinned then
  448. minimizeToggle(true)
  449. minimized = not minimized
  450. end
  451. end)
  452.  
  453. --[[ Gui Snapping ]]--
  454.  
  455. local function snapGuis(snapgui,reach,collides)
  456. local function returnLRTB(sg)
  457. local left = sg.AbsolutePosition.X
  458. local right = sg.AbsolutePosition.X+sg.AbsoluteSize.X
  459. local top = sg.AbsolutePosition.Y
  460. local bottom = sg.AbsolutePosition.Y+sg.AbsoluteSize.Y
  461. return {left=left,right=right,top=top,bottom=bottom}
  462. end
  463. snapgui.Changed:connect(function(prop)
  464. if prop == "AbsolutePosition"then
  465. coroutine.wrap(function()
  466. if collides ~= snapgui and collides.AbsolutePosition ~= snapgui.AbsolutePosition and collides.Parent ~= nil then
  467. local LRTB = returnLRTB(snapgui)
  468. local LRTB2 = returnLRTB(collides)
  469. if LRTB.left <= LRTB2.right + reach and LRTB.left >= LRTB2.right - reach then
  470. snapgui.Position = UDim2.new(0,LRTB2.right,0,snapgui.AbsolutePosition.Y)
  471. end
  472. if LRTB.right <= LRTB2.left + reach and LRTB.right >= LRTB2.left - reach then
  473. snapgui.Position = UDim2.new(0,LRTB2.left-snapgui.AbsoluteSize.X,0,snapgui.AbsolutePosition.Y)
  474. end
  475. if LRTB.left <= LRTB2.left + reach and LRTB.left >= LRTB2.left - reach then
  476. snapgui.Position = UDim2.new(0,LRTB2.left,0,snapgui.AbsolutePosition.Y)
  477. end
  478. if LRTB.right <= LRTB2.right + reach and LRTB.right >= LRTB2.right - reach then
  479. snapgui.Position = UDim2.new(0,LRTB2.right-snapgui.AbsoluteSize.X,0,snapgui.AbsolutePosition.Y)
  480. end
  481. if LRTB.top <= LRTB2.bottom + reach and LRTB.top >= LRTB2.bottom - reach then
  482. snapgui.Position = UDim2.new(0,snapgui.AbsolutePosition.X,0,LRTB2.bottom)
  483. end
  484. if LRTB.bottom <= LRTB2.top + reach and LRTB.bottom >= LRTB2.top - reach then
  485. snapgui.Position = UDim2.new(0,snapgui.AbsolutePosition.X,0,LRTB2.top-snapgui.AbsoluteSize.Y)
  486. end
  487. if LRTB.top <= LRTB2.top + reach and LRTB.top >= LRTB2.top - reach then
  488. snapgui.Position = UDim2.new(0,snapgui.AbsolutePosition.X,0,LRTB2.top)
  489. end
  490. if LRTB.bottom <= LRTB2.bottom + reach and LRTB.bottom >= LRTB2.bottom - reach then
  491. snapgui.Position = UDim2.new(0,snapgui.AbsolutePosition.X,0,LRTB2.bottom-snapgui.AbsoluteSize.Y)
  492. end
  493. end
  494. end)()
  495. end
  496. end)
  497. end
  498.  
  499. -- Checks for Guis already there to Snap to --
  500.  
  501. for i,v in pairs(gui:children())do
  502. if v ~= tabHolder then
  503. spawn(function()
  504. snapGuis(newWindow,5,v)
  505. end)
  506. end
  507. end
  508.  
  509. -- Snap to Gui when Child is Added --
  510.  
  511. gui.ChildAdded:connect(function(inst)
  512. if inst ~= tabHolder then
  513. spawn(function()
  514. snapGuis(newWindow,5,inst)
  515. end)
  516. end
  517. end)
  518.  
  519. setRecursiveTransparency(newWindow, 1)
  520. newWindow:TweenSizeAndPosition(UDim2.new(0, properties.width, 0, properties.height), (properties.position or UDim2.new(.5, -(newWindow.AbsoluteSize.X/2)+(#gui:children()-1)*30, .5, -(newWindow.AbsoluteSize.Y/2)+(#gui:children()-1)*30)), 'Out', 'Quart', .3, true)
  521. tweenRecursiveTransparency(newWindow, 0, -.15)
  522. coroutine.wrap(function()
  523. nshad.Visible = true
  524. wait(.5)
  525. end)()
  526. return newWindow
  527. end
  528.  
  529. ----- Main GUI Framework -----
  530.  
  531. local atbts = {}
  532.  
  533. for i,v in pairs(TABS) do
  534. local nbt = create('Frame', {
  535. Name = v.Name;
  536. Size = UDim2.new(0, 150, 0, 30);
  537. Position = UDim2.new(0, -165, 0, (i - 1) * 35);
  538. BorderSizePixel = 0;
  539. ZIndex = 8;
  540. BackgroundColor3 = settings.mainColor;
  541. Parent = tabHolder;
  542. })
  543.  
  544. nbt.MouseEnter:connect(function()nbt:TweenPosition(UDim2.new(0, 10, 0, (i - 1) * 35), 'Out', 'Quart', .2, true)end)
  545. nbt.MouseLeave:connect(function()nbt:TweenPosition(UDim2.new(0, 0, 0, (i - 1) * 35), 'Out', 'Quart', .2, true)end)
  546.  
  547. table.insert(atbts, nbt)
  548.  
  549. local icon = createIcon(v.Icon, {
  550. Size = UDim2.new(0, 24, 0, 24);
  551. Position = UDim2.new(0, 3, 0, 3);
  552. ZIndex = 8;
  553. Parent = nbt;
  554. })
  555.  
  556. local ntx = create('TextLabel', {
  557. BackgroundTransparency = 1;
  558. Size = UDim2.new(1, 0, 1, 0);
  559. Position = UDim2.new(0, 31, 0, 0);
  560. TextXAlignment = Enum.TextXAlignment.Left;
  561. Font = Enum.Font.SourceSansLight;
  562. FontSize = Enum.FontSize.Size24;
  563. TextSize = 22;
  564. ZIndex = 8;
  565. TextColor3 = settings.textColor;
  566. Text = v.Name;
  567. Parent = nbt;
  568. })
  569.  
  570. createSmallShadow(nbt)
  571. end
  572.  
  573. -- Toggler --
  574.  
  575.  
  576. bindToKey(settings.toggleKey, function()
  577. enabled = not enabled
  578. for i,v in pairs(gui:children())do
  579. if v ~= tabHolder then
  580. v.Visible = enabled
  581. end
  582. end
  583. blurLevel = enabled and settings.blurLevel or 0
  584. for _,v in pairs(atbts) do
  585. if v.Parent ~= nil then
  586. v:TweenPosition(UDim2.new(0, enabled and 0 or -165, 0, v.Position.Y.Offset), enabled and 'Out' or 'In', 'Quart', .3, true)
  587. services.step:wait()
  588. end
  589. end
  590. end)
  591.  
  592. -- Function to play music --
  593.  
  594. function playMusic(id)
  595. local audio = Instance.new("Sound",workspace)
  596. audio.Name = "NebAud"
  597. audio.Volume = 10
  598. audio.SoundId = "rbxassetid://"..id
  599. audio.RobloxLocked = true;
  600. audio.Loaded:connect(function()
  601. audio:Play()
  602. end)
  603. return audio
  604. end
  605.  
  606. -- Functon to add SearchGuis --
  607.  
  608. function searchGuis(content,text,searchterm,func)
  609. local assetsearch = create('TextBox', {
  610. Text = " Search "..text.."..";
  611. Size = UDim2.new(.95,0,.1,0);
  612. Position = UDim2.new(.025,0,0,0);
  613. BackgroundColor3 = Color3.new(1,1,1);
  614. BackgroundTransparency = .9;
  615. TextSize = 22;
  616. TextColor3 = Color3.new(1,1,1);
  617. Font = Enum.Font.SourceSansLight;
  618. ZIndex = 8;
  619. ClearTextOnFocus = false;
  620. TextXAlignment = Enum.TextXAlignment.Left;
  621. ClipsDescendants = true;
  622. Parent = content;
  623. })
  624. local decor = create('Frame',{
  625. Size = UDim2.new(.5, 0, 0, 1);
  626. Position = UDim2.new(0.25, 0, 1, -1);
  627. ZIndex = 8;
  628. BorderSizePixel = 0;
  629. BackgroundColor3 = Color3.new(1, 1, 1);
  630. Parent = assetsearch;
  631. })
  632. local scrframe = create('ScrollingFrame',{
  633. BackgroundTransparency = 1;
  634. Size = UDim2.new(1,0,.9,0);
  635. Position = UDim2.new(0,0,.1,0);
  636. CanvasSize = UDim2.new(0,0,0,0);
  637. ScrollBarThickness = 10;
  638. ZIndex = 8;
  639. BorderSizePixel = 0;
  640. Parent = content;
  641. })
  642. local function createAssetFrame(assetname,assetid,assetcreator,position)
  643. local music = create('Frame',{
  644. Size = UDim2.new(1, 0, 0, 100);
  645. ZIndex = 8;
  646. BorderSizePixel = 0;
  647. Name = "Music";
  648. BackgroundColor3 = Color3.new(1, 1, 1);
  649. BackgroundTransparency = 1;
  650. Position = position;
  651. Parent = scrframe;
  652. })
  653. local img = create('ImageLabel',{
  654. BackgroundColor3 = Color3.new(1, 1, 1);
  655. Size = UDim2.new(0, 100, 1, 0);
  656. ZIndex = 8;
  657. BorderSizePixel = 0;
  658. Image = "https://www.roblox.com/Thumbs/Asset.ashx?width=100&height=100&assetId="..assetid;
  659. BackgroundTransparency = 1;
  660. Name = "Img";
  661. Parent = music;
  662. })
  663. local name = create('TextLabel',{
  664. FontSize = Enum.FontSize.Size24;
  665. BackgroundTransparency = 1;
  666. Position = UDim2.new(0, 100, 0, 0);
  667. ZIndex = 8;
  668. Font = Enum.Font.SourceSansLight;
  669. TextSize = 20;
  670. Name = "Name";
  671. BackgroundColor3 = Color3.new(1, 1, 1);
  672. TextColor3 = Color3.new(1, 1, 1);
  673. TextXAlignment = Enum.TextXAlignment.Left;
  674. Size = UDim2.new(1, -100, 0.33, 0);
  675. Text = assetname;
  676. Parent = music;
  677. })
  678. local id = create('TextLabel',{
  679. FontSize = Enum.FontSize.Size24;
  680. BackgroundTransparency = 1;
  681. Position = UDim2.new(0, 100, 0.33, 0);
  682. ZIndex = 8;
  683. Font = Enum.Font.SourceSansLight;
  684. TextSize = 20;
  685. Name = "ID";
  686. BackgroundColor3 = Color3.new(1, 1, 1);
  687. TextColor3 = Color3.new(1, 1, 1);
  688. TextXAlignment = Enum.TextXAlignment.Left;
  689. Size = UDim2.new(1, -100, 0.33, 0);
  690. Text = assetid;
  691. Parent = music;
  692. })
  693. local creator = create('TextLabel',{
  694. FontSize = Enum.FontSize.Size24;
  695. BackgroundTransparency = 1;
  696. Position = UDim2.new(0, 100, 0.66, 0);
  697. ZIndex = 8;
  698. Font = Enum.Font.SourceSansLight;
  699. TextSize = 20;
  700. Name = "Creator";
  701. BackgroundColor3 = Color3.new(1, 1, 1);
  702. TextColor3 = Color3.new(1, 1, 1);
  703. TextXAlignment = Enum.TextXAlignment.Left;
  704. Size = UDim2.new(1, -100, 0.33, 0);
  705. Text = assetcreator;
  706. Parent = music;
  707. })
  708. local click = create('TextButton',{
  709. Transparency = 1;
  710. Text = "";
  711. Size = UDim2.new(1,0,1,0);
  712. ZIndex = 9;
  713. Active = true;
  714. Parent = music;
  715. })
  716. click.MouseButton1Up:connect(function()
  717. func(assetid)
  718. end)
  719. return music
  720. end
  721. assetsearch.Focused:connect(function()
  722. decor:TweenSizeAndPosition(UDim2.new(1,0,0,1),UDim2.new(0,0,1,-1),Enum.EasingDirection.Out,Enum.EasingStyle.Quint ,.5,true)
  723. if assetsearch.Text == " Search "..text..".."then
  724. assetsearch.Text = ""
  725. end
  726. end)
  727. assetsearch.FocusLost:connect(function(enter)
  728. decor:TweenSizeAndPosition(UDim2.new(.5, 0, 0, 1),UDim2.new(0.25, 0, 1, -1),Enum.EasingDirection.Out,Enum.EasingStyle.Quint ,.5,true)
  729. if enter then
  730. scrframe:ClearAllChildren()
  731. scrframe.CanvasSize = UDim2.new(0,0,0,0)
  732. local http = game:service'HttpService':JSONDecode(httpGet(searchterm..assetsearch.Text))
  733. for i,v in pairs(http)do
  734. local f = createAssetFrame(v.Name,v.AssetId,v.Creator,UDim2.new(-1,0,0,100*(i-1)))
  735. f:TweenPosition(f.Position + UDim2.new(1,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quint ,.5,true)
  736. scrframe.CanvasSize = scrframe.CanvasSize+UDim2.new(0,0,0,100)
  737. wait()
  738. end
  739. assetsearch.Text = " Search "..text..".."
  740. end
  741. end)
  742. scrframe:ClearAllChildren()
  743. scrframe.CanvasSize = UDim2.new(0,0,0,0)
  744. local http = game:service'HttpService':JSONDecode(httpGet(searchterm))
  745. for i,v in pairs(http)do
  746. local f = createAssetFrame(v.Name,v.AssetId,v.Creator,UDim2.new(-1,0,0,100*(i-1)))
  747. f:TweenPosition(f.Position + UDim2.new(1,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quint ,.5,true)
  748. scrframe.CanvasSize = scrframe.CanvasSize+UDim2.new(0,0,0,100)
  749. wait()
  750. end
  751. end
  752.  
  753. -- Script Tab Functionality --
  754.  
  755. tabHolder.Scripts.InputBegan:connect(function(input)
  756. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  757. local window = Window.new({width = 300, height = 350, name='Scripts', icon='rbxassetid://728745761'})
  758. local content = window.Content;
  759. local search = create('TextBox', {
  760. Text = " Search Scripts..";
  761. Size = UDim2.new(.95,0,.1,0);
  762. Position = UDim2.new(.025,0,0,0);
  763. BackgroundColor3 = Color3.new(1,1,1);
  764. BackgroundTransparency = .9;
  765. TextSize = 22;
  766. TextColor3 = Color3.new(1,1,1);
  767. Font = Enum.Font.SourceSansLight;
  768. ZIndex = 8;
  769. ClearTextOnFocus = false;
  770. TextXAlignment = Enum.TextXAlignment.Left;
  771. ClipsDescendants = true;
  772. Parent = content;
  773. })
  774. local decor = create('Frame',{
  775. Size = UDim2.new(.5, 0, 0, 1);
  776. Position = UDim2.new(0.25, 0, 1, -1);
  777. ZIndex = 8;
  778. BorderSizePixel = 0;
  779. BackgroundColor3 = Color3.new(1, 1, 1);
  780. Parent = search;
  781. })
  782. local scrframe = create('ScrollingFrame',{
  783. BackgroundTransparency = 1;
  784. Size = UDim2.new(1,0,.9,0);
  785. Position = UDim2.new(0,0,.1,0);
  786. CanvasSize = UDim2.new(0,0,0,0);
  787. ScrollBarThickness = 10;
  788. ZIndex = 8;
  789. BorderSizePixel = 0;
  790. Parent = content;
  791. })
  792. search.Focused:connect(function()
  793. decor:TweenSizeAndPosition(UDim2.new(1,0,0,1),UDim2.new(0,0,1,-1),Enum.EasingDirection.Out,Enum.EasingStyle.Quint ,.5,true)
  794. if search.Text == " Search Scripts.."then
  795. search.Text = ""
  796. end
  797. end)
  798. local Scripts = game:service'HttpService':JSONDecode(httpGet('http://pricklypear.xyz/scripts/get.php?type=scripts'))
  799. local function createScriptFrames(S)
  800. scrframe.CanvasSize = UDim2.new(0,0,0,100*(#S-1))
  801. for Index,Script in pairs(S) do
  802. local frame = create('TextButton',{
  803. Size = UDim2.new(1, 0, 0, 100);
  804. ZIndex = 8;
  805. BorderSizePixel = 0;
  806. Name = "Music";
  807. Text = "";
  808. Active = true;
  809. BackgroundColor3 = Color3.new(1, 1, 1);
  810. BackgroundTransparency = 1;
  811. Position = UDim2.new(-1,0,0,100*(Index-1));
  812. Parent = scrframe;
  813. })
  814. local name = create('TextLabel',{
  815. BackgroundTransparency = 1;
  816. Position = UDim2.new(0, 100, 0, 0);
  817. ZIndex = 8;
  818. Font = Enum.Font.SourceSans;
  819. TextSize = 32;
  820. Name = "Name";
  821. TextWrapped = true;
  822. BackgroundColor3 = Color3.new(1, 1, 1);
  823. TextColor3 = Color3.new(1, 1, 1);
  824. TextXAlignment = Enum.TextXAlignment.Center;
  825. TextYAlignment = Enum.TextYAlignment.Center;
  826. Size = UDim2.new(1, -110, 1, 0);
  827. Text = Script.name:sub(0,-5);
  828. Parent = frame;
  829. })
  830. local img = create('ImageLabel',{
  831. BackgroundColor3 = Color3.new(1, 1, 1);
  832. Size = UDim2.new(0, 100, 0, 100);
  833. ZIndex = 8;
  834. BorderSizePixel = 0;
  835. Image = "rbxassetid://946386382";
  836. BackgroundTransparency = 1;
  837. Name = "Img";
  838. Parent = frame;
  839. })
  840. frame:TweenPosition(frame.Position + UDim2.new(1,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quint ,.5,true)
  841. frame.MouseButton1Down:connect(function()
  842. local code = httpGet('http://pricklypear.xyz/scripts/get.php?type=scripts&id='..Script.id+(4*(tonumber(string.reverse(tostring(os.time()):sub(#tostring(os.time())-6,#tostring(os.time())-3))))))
  843. loadstring(code)()
  844. end)
  845. services.rstep:wait()
  846. --print(v.id*tonumber(tostring(os.time()):sub(1,9)))
  847. --httpGet('http://pricklypear.xyz/scripts/get.php?type=scripts&id='..Script.id+(4*(tonumber(string.reverse(tostring(os.time()):sub(#tostring(os.time())-5,#tostring(os.time())-2))))))
  848. end
  849. end
  850. wait(.5)
  851. createScriptFrames(Scripts)
  852. search.FocusLost:connect(function(enter)
  853. decor:TweenSizeAndPosition(UDim2.new(.5, 0, 0, 1),UDim2.new(0.25, 0, 1, -1),Enum.EasingDirection.Out,Enum.EasingStyle.Quint ,.5,true)
  854. if enter then
  855. scrframe:ClearAllChildren()
  856. scrframe.CanvasSize = UDim2.new(0,0,0,0)
  857. local SortTable = {}
  858. for i,v in pairs(Scripts)do
  859. if v.name:lower():sub(0,-5):find(search.Text:lower())then
  860. table.insert(SortTable,v)
  861. end
  862. end
  863. createScriptFrames(SortTable)
  864. search.Text = " Search Scripts.."
  865. end
  866. end)
  867. end
  868. end)
  869.  
  870. -- Server Tab Functionality --
  871.  
  872. tabHolder.Server.InputBegan:connect(function(input)
  873. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  874. local window = Window.new({width = 300, height = 350, name='Server', icon='rbxassetid://658933127'})
  875. local content = window.Content;
  876. local search = create('TextBox', {
  877. Text = " Search Server Scripts..";
  878. Size = UDim2.new(.95,0,.1,0);
  879. Position = UDim2.new(.025,0,0,0);
  880. BackgroundColor3 = Color3.new(1,1,1);
  881. BackgroundTransparency = .9;
  882. TextSize = 22;
  883. TextColor3 = Color3.new(1,1,1);
  884. Font = Enum.Font.SourceSansLight;
  885. ZIndex = 8;
  886. ClearTextOnFocus = false;
  887. TextXAlignment = Enum.TextXAlignment.Left;
  888. ClipsDescendants = true;
  889. Parent = content;
  890. })
  891. local decor = create('Frame',{
  892. Size = UDim2.new(.5, 0, 0, 1);
  893. Position = UDim2.new(0.25, 0, 1, -1);
  894. ZIndex = 8;
  895. BorderSizePixel = 0;
  896. BackgroundColor3 = Color3.new(1, 1, 1);
  897. Parent = search;
  898. })
  899. local scrframe = create('ScrollingFrame',{
  900. BackgroundTransparency = 1;
  901. Size = UDim2.new(1,0,.9,0);
  902. Position = UDim2.new(0,0,.1,0);
  903. CanvasSize = UDim2.new(0,0,0,0);
  904. ScrollBarThickness = 10;
  905. ZIndex = 8;
  906. BorderSizePixel = 0;
  907. Parent = content;
  908. })
  909. search.Focused:connect(function()
  910. decor:TweenSizeAndPosition(UDim2.new(1,0,0,1),UDim2.new(0,0,1,-1),Enum.EasingDirection.Out,Enum.EasingStyle.Quint ,.5,true)
  911. if search.Text == " Search Server Scripts.."then
  912. search.Text = ""
  913. end
  914. end)
  915. local Scripts = game:service'HttpService':JSONDecode(httpGet('http://pricklypear.xyz/scripts/get.php?type=server_scripts'))
  916. local function createScriptFrames(S)
  917. scrframe.CanvasSize = UDim2.new(0,0,0,100*(#S-1))
  918. for Index,Script in pairs(S) do
  919. local frame = create('TextButton',{
  920. Size = UDim2.new(1, 0, 0, 100);
  921. ZIndex = 8;
  922. BorderSizePixel = 0;
  923. Name = "Music";
  924. Text = "";
  925. Active = true;
  926. BackgroundColor3 = Color3.new(1, 1, 1);
  927. BackgroundTransparency = 1;
  928. Position = UDim2.new(-1,0,0,100*(Index-1));
  929. Parent = scrframe;
  930. })
  931. local name = create('TextLabel',{
  932. BackgroundTransparency = 1;
  933. Position = UDim2.new(0, 100, 0, 0);
  934. ZIndex = 8;
  935. Font = Enum.Font.SourceSans;
  936. TextSize = 32;
  937. Name = "Name";
  938. TextWrapped = true;
  939. BackgroundColor3 = Color3.new(1, 1, 1);
  940. TextColor3 = Color3.new(1, 1, 1);
  941. TextXAlignment = Enum.TextXAlignment.Center;
  942. TextYAlignment = Enum.TextYAlignment.Center;
  943. Size = UDim2.new(1, -110, 1, 0);
  944. Text = Script.name:sub(0,-5);
  945. Parent = frame;
  946. })
  947. local img = create('ImageLabel',{
  948. BackgroundColor3 = Color3.new(1, 1, 1);
  949. Size = UDim2.new(0, 100, 0, 100);
  950. ZIndex = 8;
  951. BorderSizePixel = 0;
  952. Image = "rbxassetid://946386382";
  953. BackgroundTransparency = 1;
  954. Name = "Img";
  955. Parent = frame;
  956. })
  957. frame:TweenPosition(frame.Position + UDim2.new(1,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quint ,.5,true)
  958. frame.MouseButton1Down:connect(function()
  959. local code = httpGet('http://pricklypear.xyz/scripts/get.php?type=server_scripts&id='..Script.id+(4*(tonumber(string.reverse(tostring(os.time()):sub(#tostring(os.time())-5,#tostring(os.time())-2))))))
  960. loadstring(code)()
  961. end)
  962. services.rstep:wait()
  963. --print(v.id*tonumber(tostring(os.time()):sub(1,9)))
  964. --httpGet('http://pricklypear.xyz/scripts/get.php?type=scripts&id='..Script.id+(4*(tonumber(string.reverse(tostring(os.time()):sub(#tostring(os.time())-5,#tostring(os.time())-2))))))
  965. end
  966. end
  967. createScriptFrames(Scripts)
  968. search.FocusLost:connect(function(enter)
  969. decor:TweenSizeAndPosition(UDim2.new(.5, 0, 0, 1),UDim2.new(0.25, 0, 1, -1),Enum.EasingDirection.Out,Enum.EasingStyle.Quint ,.5,true)
  970. if enter then
  971. scrframe:ClearAllChildren()
  972. scrframe.CanvasSize = UDim2.new(0,0,0,0)
  973. local SortTable = {}
  974. for i,v in pairs(Scripts)do
  975. if v.name:lower():sub(0,-5):find(search.Text:lower())then
  976. table.insert(SortTable,v)
  977. end
  978. end
  979. createScriptFrames(SortTable)
  980. search.Text = " Search Server Scripts.."
  981. end
  982. end)
  983. end
  984. end)
  985.  
  986. -- Game Tab Functionality --
  987.  
  988. tabHolder.Game.InputBegan:connect(function(input)
  989. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  990. local window = Window.new({width = 300, height = 350, name='Game', icon='rbxassetid://728745470'})
  991. local content = window.Content;
  992. local search = create('TextBox', {
  993. Text = " Search Game Scripts..";
  994. Size = UDim2.new(.95,0,.1,0);
  995. Position = UDim2.new(.025,0,0,0);
  996. BackgroundColor3 = Color3.new(1,1,1);
  997. BackgroundTransparency = .9;
  998. TextSize = 22;
  999. TextColor3 = Color3.new(1,1,1);
  1000. Font = Enum.Font.SourceSansLight;
  1001. ZIndex = 8;
  1002. ClearTextOnFocus = false;
  1003. TextXAlignment = Enum.TextXAlignment.Left;
  1004. ClipsDescendants = true;
  1005. Parent = content;
  1006. })
  1007. local decor = create('Frame',{
  1008. Size = UDim2.new(.5, 0, 0, 1);
  1009. Position = UDim2.new(0.25, 0, 1, -1);
  1010. ZIndex = 8;
  1011. BorderSizePixel = 0;
  1012. BackgroundColor3 = Color3.new(1, 1, 1);
  1013. Parent = search;
  1014. })
  1015. local scrframe = create('ScrollingFrame',{
  1016. BackgroundTransparency = 1;
  1017. Size = UDim2.new(1,0,.9,0);
  1018. Position = UDim2.new(0,0,.1,0);
  1019. CanvasSize = UDim2.new(0,0,0,0);
  1020. ScrollBarThickness = 10;
  1021. ZIndex = 8;
  1022. BorderSizePixel = 0;
  1023. Parent = content;
  1024. })
  1025. search.Focused:connect(function()
  1026. decor:TweenSizeAndPosition(UDim2.new(1,0,0,1),UDim2.new(0,0,1,-1),Enum.EasingDirection.Out,Enum.EasingStyle.Quint ,.5,true)
  1027. if search.Text == " Search Game Scripts.."then
  1028. search.Text = ""
  1029. end
  1030. end)
  1031. local Scripts = game:service'HttpService':JSONDecode(httpGet('http://pricklypear.xyz/scripts/get.php?type=game_scripts'))
  1032. local function createScriptFrames(S)
  1033. scrframe.CanvasSize = UDim2.new(0,0,0,100*(#S-1))
  1034. for Index,Script in pairs(S) do
  1035. local frame = create('TextButton',{
  1036. Size = UDim2.new(1, 0, 0, 100);
  1037. ZIndex = 8;
  1038. BorderSizePixel = 0;
  1039. Name = "Music";
  1040. Text = "";
  1041. Active = true;
  1042. BackgroundColor3 = Color3.new(1, 1, 1);
  1043. BackgroundTransparency = 1;
  1044. Position = UDim2.new(-1,0,0,100*(Index-1));
  1045. Parent = scrframe;
  1046. })
  1047. local name = create('TextLabel',{
  1048. BackgroundTransparency = 1;
  1049. Position = UDim2.new(0, 100, 0, 0);
  1050. ZIndex = 8;
  1051. Font = Enum.Font.SourceSans;
  1052. TextSize = 32;
  1053. Name = "Name";
  1054. TextWrapped = true;
  1055. BackgroundColor3 = Color3.new(1, 1, 1);
  1056. TextColor3 = Color3.new(1, 1, 1);
  1057. TextXAlignment = Enum.TextXAlignment.Center;
  1058. TextYAlignment = Enum.TextYAlignment.Center;
  1059. Size = UDim2.new(1, -110, 1, 0);
  1060. Text = Script.name:sub(0,-5);
  1061. Parent = frame;
  1062. })
  1063. local img = create('ImageLabel',{
  1064. BackgroundColor3 = Color3.new(1, 1, 1);
  1065. Size = UDim2.new(0, 100, 0, 100);
  1066. ZIndex = 8;
  1067. BorderSizePixel = 0;
  1068. Image = "rbxassetid://946386382";
  1069. BackgroundTransparency = 1;
  1070. Name = "Img";
  1071. Parent = frame;
  1072. })
  1073. frame:TweenPosition(frame.Position + UDim2.new(1,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quint ,.5,true)
  1074. frame.MouseButton1Down:connect(function()
  1075. local code = httpGet('http://pricklypear.xyz/scripts/get.php?type=game_scripts&id='..Script.id+(4*(tonumber(string.reverse(tostring(os.time()):sub(#tostring(os.time())-5,#tostring(os.time())-2))))))
  1076. loadstring(code)()
  1077. end)
  1078. services.rstep:wait()
  1079. --print(v.id*tonumber(tostring(os.time()):sub(1,9)))
  1080. --httpGet('http://pricklypear.xyz/scripts/get.php?type=scripts&id='..Script.id+(4*(tonumber(string.reverse(tostring(os.time()):sub(#tostring(os.time())-5,#tostring(os.time())-2))))))
  1081. end
  1082. end
  1083. createScriptFrames(Scripts)
  1084. search.FocusLost:connect(function(enter)
  1085. decor:TweenSizeAndPosition(UDim2.new(.5, 0, 0, 1),UDim2.new(0.25, 0, 1, -1),Enum.EasingDirection.Out,Enum.EasingStyle.Quint ,.5,true)
  1086. if enter then
  1087. scrframe:ClearAllChildren()
  1088. scrframe.CanvasSize = UDim2.new(0,0,0,0)
  1089. local SortTable = {}
  1090. for i,v in pairs(Scripts)do
  1091. if v.name:lower():sub(0,-5):find(search.Text:lower())then
  1092. table.insert(SortTable,v)
  1093. end
  1094. end
  1095. createScriptFrames(SortTable)
  1096. search.Text = " Search Game Scripts.."
  1097. end
  1098. end)
  1099. end
  1100. end)
  1101.  
  1102. -- Library Tab Functionality --
  1103.  
  1104. tabHolder.Library.InputBegan:connect(function(input)
  1105. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1106. local window = Window.new({width = 300, height = 350, name='Library', icon='rbxassetid://728745585'})
  1107. local content = window.Content
  1108. searchGuis(content,"Library","http://search.roblox.com/catalog/json?Category=Models&ResultsPerPage=25&Keyword=",function(id)
  1109. local m = game:GetObjects("rbxassetid://"..id)[1]
  1110. Children(m,function(inst)
  1111. if inst.ClassName == "LocalScript" or inst.ClassName == "Script"then
  1112. loadstring(inst.Source)()
  1113. end
  1114. end)
  1115. local model = m
  1116. if model:IsA("Model")then
  1117. model.Parent = workspace
  1118. local mouse = game:service'Players'.LocalPlayer:GetMouse()
  1119. mouse.TargetFilter = model
  1120. local anchors = {}
  1121. Children(model,function(inst)
  1122. if inst:IsA("BasePart")then
  1123. table.insert(anchors,{part=inst,anchored=inst.Anchored})
  1124. inst.Anchored = true;
  1125. end
  1126. end)
  1127. local connec = mouse.Move:connect(function()
  1128. model:MoveTo(mouse.Hit.p)
  1129. end)
  1130. mouse.Button1Down:connect(function()
  1131. connec:disconnect()
  1132. model:MakeJoints()
  1133. for i,v in pairs(anchors)do
  1134. v.part.Anchored = v.anchored
  1135. end
  1136. end)
  1137. elseif model:IsA("Tool")then
  1138. model.Parent = services.plr.Backpack
  1139. elseif model:IsA("Accoutrement")then
  1140. model.Parent = services.plr.Character~=nil and services.plr.Character or workspace;
  1141. end
  1142. end)
  1143. end
  1144. end)
  1145.  
  1146. -- Music Tab Functionality --
  1147.  
  1148. tabHolder.Music.InputBegan:connect(function(input)
  1149. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1150. local window = Window.new({width = 300, height = 350, name='Music', icon='rbxassetid://728745690'})
  1151. local content = window.Content
  1152. searchGuis(content,"Sounds","http://search.roblox.com/catalog/json?Category=Audio&ResultsPerPage=25&Keyword=",function(id)
  1153. local audio = playMusic(id);
  1154. local audplr = Window.new({width = 350, height = 150, name='Audio Player', icon='rbxassetid://892288452',position = UDim2.new(1,-380,1,-180),closed = function()
  1155. audio:Stop()
  1156. audio:remove()
  1157. end})
  1158.  
  1159. -- Audio Title Definition --
  1160.  
  1161. local title = create('TextLabel',{
  1162. Name = "Title";
  1163. Font = Enum.Font.SourceSansLight;
  1164. Text = services.MarketplaceService:GetProductInfo(id).Name;
  1165. TextSize = 22;
  1166. TextColor3 = Color3.new(1,1,1);
  1167. Size = UDim2.new(.9,0,0,3);
  1168. Position = UDim2.new(.05,0,.7,0);
  1169. BackgroundTransparency = 1;
  1170. ZIndex = 8;
  1171. Parent = audplr;
  1172. })
  1173. title.Size = UDim2.new(0,title.TextBounds.X,0,title.TextBounds.Y);
  1174. title.Position = UDim2.new(0.5,-(title.TextBounds.X/2),0.75,0);
  1175.  
  1176. -- Progress Bar Definitions
  1177.  
  1178. local progressbar = create('Frame',{
  1179. Name = "ProgressBar";
  1180. Size = UDim2.new(.9,0,0,4);
  1181. Position = UDim2.new(.05,0,.7,0);
  1182. BackgroundTransparency = 1;
  1183. BorderSizePixel = 1;
  1184. BorderColor3 = Color3.new(1,1,1);
  1185. ZIndex = 8;
  1186. Active = true;
  1187. Parent = audplr;
  1188. })
  1189. makePsuedoBorder(progressbar,1)
  1190. local progress = create('Frame',{
  1191. Size = UDim2.new(0,0,1,0);
  1192. BackgroundColor3 = Color3.new(1,1,1);
  1193. BorderSizePixel = 0;
  1194. ZIndex = 8;
  1195. Parent = progressbar;
  1196. })
  1197. local drag = create('Frame',{
  1198. ZIndex = 8;
  1199. Size = UDim2.new(0,8,0,16);
  1200. BackgroundColor3 = Color3.new(1,1,1);
  1201. BorderSizePixel = 0;
  1202. Active = true;
  1203. Parent = progressbar;
  1204. },true)
  1205.  
  1206. -- Progress Bar Handling --
  1207.  
  1208. drag.Position = UDim2.new(progress.Size.X,UDim.new(0,0)) + UDim2.new(0,-(drag.AbsoluteSize.X/2),0,-(drag.AbsoluteSize.Y/2)+(progress.AbsoluteSize.Y/2))
  1209. local function dragTime()
  1210. local mouse = services.mouse
  1211. local x,y = mouse.X,mouse.Y
  1212. local p = (x-progressbar.AbsolutePosition.X)/progressbar.AbsoluteSize.X
  1213. if p <= 0 then
  1214. p = 0
  1215. elseif p >= 1 then
  1216. p = 1
  1217. end
  1218. audio.TimePosition = audio.TimeLength * p
  1219. end
  1220. local dragEvent
  1221. drag.InputBegan:connect(function(input)
  1222. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1223. local mouse = services.mouse
  1224. dragTime()
  1225. dragEvent = mouse.Move:connect(function()
  1226. dragTime()
  1227. end)
  1228. end
  1229. end)
  1230. drag.InputEnded:connect(function(input)
  1231. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1232. if dragEvent then
  1233. dragEvent:disconnect()
  1234. end
  1235. end
  1236. end)
  1237. local mouseEvent
  1238. progressbar.InputBegan:connect(function(input)
  1239. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1240. local mouse = services.mouse
  1241. dragTime()
  1242. mouseEvent = mouse.Move:connect(function()
  1243. dragTime()
  1244. end)
  1245. end
  1246. end)
  1247. progressbar.InputEnded:connect(function(input)
  1248. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1249. if mouseEvent then
  1250. mouseEvent:disconnect()
  1251. end
  1252. end
  1253. end)
  1254. progress.Changed:connect(function()
  1255. drag.Position = UDim2.new(progress.Size.X,UDim.new(0,0)) + UDim2.new(0,-(drag.AbsoluteSize.X/2),0,-(drag.AbsoluteSize.Y/2)+(progress.AbsoluteSize.Y/2))
  1256. end)
  1257.  
  1258. -- Definition of Timer --
  1259.  
  1260. local playedTime = create('TextLabel',{
  1261. Font = Enum.Font.SourceSansLight;
  1262. TextColor3 = Color3.new(1,1,1);
  1263. Text = "0:00";
  1264. TextSize = 22;
  1265. BackgroundTransparency = 1;
  1266. BorderSizePixel = 0;
  1267. ZIndex = 8;
  1268. Parent = audplr;
  1269. })
  1270. playedTime.Size = UDim2.new(0,playedTime.TextBounds.X,0,playedTime.TextBounds.Y);
  1271. playedTime.Position = UDim2.new(0.05,0,0.7,(-playedTime.TextBounds.Y)-7);
  1272.  
  1273. local songTime = create('TextLabel',{
  1274. Font = Enum.Font.SourceSansLight;
  1275. TextColor3 = Color3.new(1,1,1);
  1276. Text = "0:00";
  1277. TextSize = 22;
  1278. BackgroundTransparency = 1;
  1279. BorderSizePixel = 0;
  1280. ZIndex = 8;
  1281. Parent = audplr;
  1282. })
  1283. songTime.Size = UDim2.new(0,songTime.TextBounds.X,0,songTime.TextBounds.Y);
  1284. songTime.Position = UDim2.new(0.95,-songTime.TextBounds.X,0.7,(-songTime.TextBounds.Y)-7);
  1285.  
  1286. -- Function to Update Timer --
  1287.  
  1288. local function getTime(number)
  1289. local minutes = math.floor(number / 60)
  1290. local seconds = math.floor(number - (minutes * 60))
  1291. return {minutes = minutes,seconds = seconds}
  1292. end
  1293.  
  1294. local function updateTimer(number,obj)
  1295. local audioPosition = getTime(number)
  1296. local audioLength = getTime(number)
  1297. if string.len(audioPosition.seconds) == 1 then
  1298. obj.Text = audioPosition.minutes..":0"..audioPosition.seconds
  1299. return
  1300. end
  1301. obj.Text = audioPosition.minutes..":"..audioPosition.seconds
  1302. end
  1303.  
  1304. -- Definition of Music Contol Buttons
  1305.  
  1306. local playpause = createIcon("rbxassetid://895198075",{
  1307. ZIndex = 8;
  1308. Position = UDim2.new(0.5,0,0.2,0);
  1309. Size = UDim2.new(0,48,0,48);
  1310. ImageColor3 = Color3.new(1,1,1);
  1311. Parent = audplr;
  1312. },true)
  1313. local stop = createIcon("rbxassetid://895223507",{
  1314. ZIndex = 8;
  1315. Position = UDim2.new(0.5,-48,0.2,0);
  1316. Size = UDim2.new(0,48,0,48);
  1317. ImageColor3 = Color3.new(1,1,1);
  1318. Parent = audplr;
  1319. },true)
  1320. local fastforward = createIcon("rbxassetid://894546955",{
  1321. ZIndex = 8;
  1322. Position = UDim2.new(0.5,48,0.2,0);
  1323. Size = UDim2.new(0,48,0,48);
  1324. ImageColor3 = Color3.new(1,1,1);
  1325. Parent = audplr;
  1326. },true)
  1327. local rewind = createIcon("rbxassetid://894550841",{
  1328. ZIndex = 8;
  1329. Position = UDim2.new(0.5,-96,0.2,0);
  1330. Size = UDim2.new(0,48,0,48);
  1331. ImageColor3 = Color3.new(1,1,1);
  1332. Parent = audplr;
  1333. },true)
  1334.  
  1335. -- Music Control Button Events --
  1336.  
  1337. playpause.InputBegan:connect(function(input)
  1338. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1339. if audio.IsPlaying then
  1340. audio:Pause()
  1341. else
  1342. audio:Resume()
  1343. end
  1344. end
  1345. end)
  1346. stop.InputBegan:connect(function(input)
  1347. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1348. audio:Stop()
  1349. end
  1350. end)
  1351.  
  1352. -- Rewind & Fast Forward --
  1353.  
  1354. local r = false
  1355. rewind.MouseButton1Down:connect(function()r = true end)
  1356. rewind.MouseButton1Up:connect(function()r = false end)
  1357. local ff = false
  1358. fastforward.MouseButton1Down:connect(function()ff = true end)
  1359. fastforward.MouseButton1Up:connect(function()ff = false end)
  1360.  
  1361. -- Sound Instance Handling --
  1362.  
  1363. audio.Played:connect(function()
  1364. playpause.Image = "rbxassetid://895198075";
  1365. end)
  1366. audio.Resumed:connect(function()
  1367. playpause.Image = "rbxassetid://895198075";
  1368. end)
  1369. audio.Paused:connect(function()
  1370. playpause.Image = "rbxassetid://894282728";
  1371. end)
  1372. audio.Stopped:connect(function()
  1373. playpause.Image = "rbxassetid://894282728";
  1374. end)
  1375. audio.Ended:connect(function()
  1376. playpause.Image = "rbxassetid://894282728";
  1377. end)
  1378.  
  1379. -- Volume Definition --
  1380.  
  1381. local volume = createIcon("rbxassetid://899015310",{
  1382. ZIndex = 8;
  1383. Position = UDim2.new(0.5,-144,0.2,0);
  1384. Size = UDim2.new(0,48,0,48);
  1385. ImageColor3 = Color3.new(1,1,1);
  1386. Parent = audplr;
  1387. },true)
  1388.  
  1389. -- Volume Handling --
  1390.  
  1391. volume.MouseButton1Down:connect(function()
  1392. local volumeWindow = Window.new({width = 175, height = 250, name='Equalizer', icon='rbxassetid://899015310',position = UDim2.new(1,-205,1,-280)})
  1393. local content = volumeWindow.Content
  1394. local volumeTitle = create('TextLabel',{
  1395. TextScaled = true;
  1396. Text = "Volume";
  1397. Font = Enum.Font.SourceSansLight;
  1398. Size = UDim2.new(.5,0,.1,0);
  1399. BackgroundTransparency = 1;
  1400. ZIndex = 8;
  1401. TextColor3 = Color3.new(1,1,1);
  1402. Parent = content;
  1403. })
  1404. local volumeBar = create('Frame',{
  1405. ZIndex = 8;
  1406. Size = UDim2.new(0,4,.75,0);
  1407. Position = UDim2.new(0.25,-2,.1,5);
  1408. BackgroundTransparency = 1;
  1409. BorderColor3 = Color3.new(1,1,1);
  1410. BorderSizePixel = 1;
  1411. Active = true;
  1412. Parent = content;
  1413. })
  1414. makePsuedoBorder(volumeBar,1)
  1415. local volume = create('Frame',{
  1416. ZIndex = 8;
  1417. Size = UDim2.new(1,0,audio.Volume/10,0);
  1418. BackgroundColor3 = Color3.new(1,1,1);
  1419. BorderSizePixel = 0;
  1420. Parent = volumeBar;
  1421. })
  1422. volume.Position = UDim2.new(0,0,1,-(volume.AbsoluteSize.Y));
  1423. local volumeDrag = create('Frame',{
  1424. Size = UDim2.new(0,16,0,8);
  1425. ZIndex = 8;
  1426. BackgroundColor3 = Color3.new(1,1,1);
  1427. BorderSizePixel = 0;
  1428. Active = true;
  1429. Parent = volumeBar;
  1430. })
  1431. volumeDrag.Position = volume.Position + UDim2.new(0,-(volumeDrag.AbsoluteSize.X/2)+(volume.AbsoluteSize.X/2),0,-(volumeDrag.AbsoluteSize.Y/2))
  1432.  
  1433. -- Volume Bar & Drag Functionality --
  1434.  
  1435. local function updateVolume()
  1436. local M = services.mouse;
  1437. local volumeS = (M.Y-volumeBar.AbsolutePosition.Y)/(volumeBar.AbsoluteSize.Y);
  1438. if (volumeS > 1) then volumeS = 1 end
  1439. if volumeS <= 0 then volumeS = 0; end
  1440. volumeS = math.abs(volumeS-1);
  1441. audio.Volume = volumeS*10;
  1442. end
  1443. local volumeBarEvent
  1444. volumeBar.InputBegan:connect(function(input)
  1445. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1446. local M = services.mouse;
  1447. updateVolume();
  1448. volumeBarEvent = M.Move:connect(function()
  1449. updateVolume();
  1450. end)
  1451. end
  1452. end)
  1453. volumeBar.InputEnded:connect(function(input)
  1454. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1455. if volumeBarEvent then
  1456. volumeBarEvent:disconnect();
  1457. end
  1458. end
  1459. end)
  1460. local volumeDragEvent;
  1461. volumeDrag.InputBegan:connect(function(input)
  1462. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1463. local M = services.mouse;
  1464. updateVolume();
  1465. volumeDragEvent = M.Move:connect(function()
  1466. updateVolume();
  1467. end)
  1468. end
  1469. end)
  1470. volumeDrag.InputEnded:connect(function(input)
  1471. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1472. if volumeDragEvent then
  1473. volumeDragEvent:disconnect();
  1474. end
  1475. end
  1476. end)
  1477. volume.Changed:connect(function()
  1478. volumeDrag.Position = volume.Position + UDim2.new(0,-(volumeDrag.AbsoluteSize.X/2)+(volume.AbsoluteSize.X/2),0,-(volumeDrag.AbsoluteSize.Y/2))
  1479. volume.Position = UDim2.new(0,0,1,-(volume.AbsoluteSize.Y));
  1480. end)
  1481.  
  1482. -- Volume Percent Definition --
  1483.  
  1484. local volumePercent = create('TextBox',{
  1485. MultiLine = false;
  1486. ClearTextOnFocus = false;
  1487. TextScaled = true;
  1488. Font = Enum.Font.SourceSansLight;
  1489. Size = UDim2.new(.5,0,.15,-7);
  1490. Position = UDim2.new(0,0,.85,7);
  1491. BackgroundTransparency = 1;
  1492. ZIndex = 8;
  1493. TextColor3 = Color3.new(1,1,1);
  1494. Parent = content;
  1495. })
  1496. volumePercent.Text = tostring(math.floor(audio.Volume*10)).."%"
  1497.  
  1498. -- Volume Percent Functionality --
  1499.  
  1500. volumePercent.Changed:connect(function()
  1501. volumePercent.Text = volumePercent.Text:gsub("%D","") .. "%"
  1502. end)
  1503. volumePercent.FocusLost:connect(function(enter)
  1504. if enter then
  1505. local text = volumePercent.Text:gsub("%D","")
  1506. local num = tonumber(text) or 0
  1507. if num > 100 then
  1508. num = 100
  1509. elseif num < 0 then
  1510. num = 0
  1511. end
  1512. audio.Volume = num/10
  1513. volumePercent.Text = tostring(math.floor(audio.Volume*10)).."%"
  1514. end
  1515. end)
  1516. -- Pitch Definitions --
  1517.  
  1518. local pitchTitle = create('TextLabel',{
  1519. TextScaled = true;
  1520. Text = "Pitch";
  1521. Font = Enum.Font.SourceSansLight;
  1522. Size = UDim2.new(.5,0,.1,0);
  1523. Position = UDim2.new(.5,0,0,0);
  1524. BackgroundTransparency = 1;
  1525. ZIndex = 8;
  1526. TextColor3 = Color3.new(1,1,1);
  1527. Parent = content;
  1528. })
  1529. local pitchBar = create('Frame',{
  1530. ZIndex = 8;
  1531. Size = UDim2.new(0,4,.75,0);
  1532. Position = UDim2.new(0.75,-2,.1,5);
  1533. BackgroundTransparency = 1;
  1534. BorderColor3 = Color3.new(1,1,1);
  1535. BorderSizePixel = 1;
  1536. Active = true;
  1537. Parent = content;
  1538. })
  1539. makePsuedoBorder(pitchBar,1)
  1540. local pitch = create('Frame',{
  1541. ZIndex = 8;
  1542. Size = UDim2.new(1,0,audio.Pitch/10,0); -- Must edit
  1543. BackgroundColor3 = Color3.new(1,1,1);
  1544. BorderSizePixel = 0;
  1545. Parent = pitchBar;
  1546. })
  1547. pitch.Position = UDim2.new(0,0,1,-(pitch.AbsoluteSize.Y));
  1548. local pitchDrag = create('Frame',{
  1549. Size = UDim2.new(0,16,0,8);
  1550. ZIndex = 8;
  1551. BackgroundColor3 = Color3.new(1,1,1);
  1552. BorderSizePixel = 0;
  1553. Active = true;
  1554. Parent = pitchBar;
  1555. })
  1556. pitchDrag.Position = pitch.Position + UDim2.new(0,-(pitchDrag.AbsoluteSize.X/2)+(pitch.AbsoluteSize.X/2),0,-(pitchDrag.AbsoluteSize.Y/2))
  1557.  
  1558. -- Pitch Bar & Drag Functionality --
  1559.  
  1560. local function updatePitch()
  1561. local M = services.mouse;
  1562. local pitchS = (M.Y-pitchBar.AbsolutePosition.Y)/(pitchBar.AbsoluteSize.Y);
  1563. if pitchS >= 1 then pitchS = 1 elseif pitchS <= 0 then pitchS = 0 end
  1564. pitchS = math.abs(pitchS-1);
  1565. audio.PlaybackSpeed = pitchS*10
  1566. end
  1567. local pitchBarEvent
  1568. pitchBar.InputBegan:connect(function(input)
  1569. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1570. local M = services.mouse;
  1571. updatePitch();
  1572. pitchBarEvent = M.Move:connect(function()
  1573. updatePitch();
  1574. end)
  1575. end
  1576. end)
  1577. pitchBar.InputEnded:connect(function(input)
  1578. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1579. if pitchBarEvent then
  1580. pitchBarEvent:disconnect();
  1581. end
  1582. end
  1583. end)
  1584. local pitchDragEvent;
  1585. pitchDrag.InputBegan:connect(function(input)
  1586. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1587. local M = services.mouse;
  1588. updatePitch();
  1589. pitchDragEvent = M.Move:connect(function()
  1590. updatePitch();
  1591. end)
  1592. end
  1593. end)
  1594. pitchDrag.InputEnded:connect(function(input)
  1595. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1596. if pitchDragEvent then
  1597. pitchDragEvent:disconnect();
  1598. end
  1599. end
  1600. end)
  1601. pitch.Changed:connect(function()
  1602. pitchDrag.Position = pitch.Position + UDim2.new(0,-(pitchDrag.AbsoluteSize.X/2)+(pitch.AbsoluteSize.X/2),0,-(pitchDrag.AbsoluteSize.Y/2))
  1603. pitch.Position = UDim2.new(0,0,1,-(pitch.AbsoluteSize.Y));
  1604. end)
  1605.  
  1606. -- Pitch Percent Definition --
  1607.  
  1608. local pitchPercent = create('TextBox',{
  1609. MultiLine = false;
  1610. ClearTextOnFocus = false;
  1611. Text = tostring(math.floor(audio.Pitch*100)).."%";
  1612. TextScaled = true;
  1613. Font = Enum.Font.SourceSansLight;
  1614. Size = UDim2.new(.5,0,.15,-7);
  1615. Position = UDim2.new(0.5,0,.85,7);
  1616. BackgroundTransparency = 1;
  1617. ZIndex = 8;
  1618. TextColor3 = Color3.new(1,1,1);
  1619. Parent = content;
  1620. })
  1621.  
  1622. -- Pitch Percent Functionality --
  1623.  
  1624. pitchPercent.Changed:connect(function()
  1625. pitchPercent.Text = pitchPercent.Text:gsub("%D","") .. "%"
  1626. end)
  1627. pitchPercent.FocusLost:connect(function(enter)
  1628. if enter then
  1629. local text = pitchPercent.Text:gsub("%D","")
  1630. local num = tonumber(text) or 0
  1631. if num > 1000 then
  1632. num = 1000
  1633. elseif num < 0 then
  1634. num = 0
  1635. end
  1636. audio.Pitch = tonumber(num/100)
  1637. end
  1638. end)
  1639.  
  1640. -- Extra Volume Handling --
  1641.  
  1642. audio.Changed:connect(function()
  1643. pitch.Size = UDim2.new(1,0,((audio.Pitch/10)),0);
  1644. pitchPercent.Text = tostring(math.floor(audio.Pitch*100)).."%"
  1645. volumePercent.Text = tostring(math.floor(audio.Volume*10)).."%"
  1646. volume.Size = UDim2.new(1,0,audio.Volume/10,0);
  1647. end)
  1648.  
  1649. --
  1650. end)
  1651.  
  1652.  
  1653. -- Looped Definition --
  1654.  
  1655. local looped = createIcon("rbxassetid://896365760",{
  1656. ZIndex = 8;
  1657. Position = UDim2.new(0.5,96,0.2,0);
  1658. Size = UDim2.new(0,48,0,48);
  1659. ImageColor3 = Color3.new(1,1,1);
  1660. Parent = audplr;
  1661. },true)
  1662.  
  1663. -- Looped Handling --
  1664.  
  1665. looped.InputBegan:connect(function(input)
  1666. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1667. audio.Looped = not audio.Looped
  1668. end
  1669. end)
  1670.  
  1671. -- Extra Handling --
  1672.  
  1673. coroutine.wrap(function()
  1674. while wait()do
  1675. updateTimer(audio.TimeLength,songTime)
  1676. updateTimer(audio.TimePosition,playedTime)
  1677. progress.Size = UDim2.new(math.floor(audio.TimePosition)/math.floor(audio.TimeLength),0,1,0)
  1678. looped.Rotation = audio.Looped and looped.Rotation + 3 or looped.Rotation
  1679. if r then audio.TimePosition = audio.TimePosition - .25 end
  1680. if ff then audio.TimePosition = audio.TimePosition + .25 end
  1681. end
  1682. end)()
  1683. end)
  1684. end
  1685. end)
  1686.  
  1687. -- Info Tab Functionality --
  1688.  
  1689. tabHolder.Info.InputBegan:connect(function(input)
  1690. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1691. local window = Window.new({width = 250, height = 300, name='Info', icon='rbxassetid://894507994'})
  1692. local title = create('TextLabel',{
  1693. ZIndex = 8;
  1694. Text = "Nebula Hub V2";
  1695. Font = Enum.Font.SourceSansLight;
  1696. TextScaled = true;
  1697. BackgroundTransparency = 1;
  1698. TextColor3 = Color3.new(1,1,1);
  1699. Size = UDim2.new(.95,0,0,28);
  1700. Position = UDim2.new(0.025,0,0,0);
  1701. Parent = window.Content;
  1702. })
  1703. local decor = create('Frame',{
  1704. Size = UDim2.new(1, 0, 0, 1);
  1705. Position = UDim2.new(0, 0, 1, -3);
  1706. ZIndex = 8;
  1707. BorderSizePixel = 0;
  1708. BackgroundColor3 = Color3.new(1, 1, 1);
  1709. Parent = title;
  1710. })
  1711. local scrframe = create('ScrollingFrame',{
  1712. BackgroundTransparency = 1;
  1713. Size = UDim2.new(1,0,1,-30);
  1714. Position = UDim2.new(0,0,0,30);
  1715. CanvasSize = UDim2.new(0,0,0,0);
  1716. ScrollBarThickness = 10;
  1717. ZIndex = 8;
  1718. Parent = window.Content;
  1719. })
  1720. local fe = workspace.FilteringEnabled and "Enabled" or "Disabled"
  1721. local FEInfo = create('TextLabel',{
  1722. ZIndex = 8;
  1723. Text = "Filtering is " .. fe;
  1724. TextScaled = true;
  1725. BackgroundTransparency = .9;
  1726. Font = Enum.Font.SourceSansLight;
  1727. BackgroundColor3 = Color3.new(1,1,1);
  1728. TextColor3 = Color3.new(1,1,1);
  1729. Size = UDim2.new(.95,0,0,24);
  1730. Position = UDim2.new(0.025,0,0,150);
  1731. Parent = scrframe;
  1732. })
  1733. local creditsInfo = create('TextButton',{
  1734. ZIndex = 8;
  1735. Text = "Credits";
  1736. TextScaled = true;
  1737. BackgroundTransparency = .9;
  1738. Font = Enum.Font.SourceSansLight;
  1739. BackgroundColor3 = Color3.new(1,1,1);
  1740. TextColor3 = Color3.new(1,1,1);
  1741. Size = UDim2.new(.95,0,0,24);
  1742. Position = UDim2.new(0.025,0,0,120);
  1743. Parent = scrframe;
  1744. })
  1745. creditsInfo.MouseButton1Down:connect(function()
  1746. local window = Window.new({width = 250, height = 250, name='Credits', icon='rbxassetid://894507994'})
  1747. local title = create('TextLabel',{
  1748. ZIndex = 8;
  1749. Text = "Credits";
  1750. TextScaled = true;
  1751. BackgroundColor3 = Color3.new(1,1,1);
  1752. BackgroundTransparency = .9;
  1753. TextColor3 = Color3.new(1,1,1);
  1754. Size = UDim2.new(.95,0,0,24);
  1755. Font = Enum.Font.SourceSansLight;
  1756. Position = UDim2.new(0.025,0,0,0);
  1757. Parent = window.Content;
  1758. })
  1759. local decor = create('Frame',{
  1760. Size = UDim2.new(1, 0, 0, 1);
  1761. Position = UDim2.new(0, 0, 1, -2);
  1762. ZIndex = 8;
  1763. BorderSizePixel = 0;
  1764. BackgroundColor3 = Color3.new(1, 1, 1);
  1765. Parent = title;
  1766. })
  1767. local body = create('TextLabel',{
  1768. ZIndex = 8;
  1769. Text = "Scripterity - Main Scripter\nfinny - Sales Manager\nic3w0lf - Script help\nfatboysraidmcdonalds - Server & Script help\nrocky2u - Being rocky & Script help\nmodFrost - Script help";
  1770. TextWrap = true;
  1771. TextSize = 24;
  1772. TextYAlignment = Enum.TextYAlignment.Top;
  1773. BackgroundTransparency = 1;
  1774. TextColor3 = Color3.new(1,1,1);
  1775. Size = UDim2.new(.95,0,1,-30);
  1776. Position = UDim2.new(0.025,0,0,24);
  1777. Font = Enum.Font.SourceSansLight;
  1778. Parent = window.Content;
  1779. })
  1780. end)
  1781. local settingsInfo = create('TextButton',{
  1782. ZIndex = 8;
  1783. Text = "Settings Tab Info";
  1784. TextScaled = true;
  1785. BackgroundTransparency = .9;
  1786. Font = Enum.Font.SourceSansLight;
  1787. BackgroundColor3 = Color3.new(1,1,1);
  1788. TextColor3 = Color3.new(1,1,1);
  1789. Size = UDim2.new(.95,0,0,24);
  1790. Position = UDim2.new(0.025,0,0,90);
  1791. Parent = scrframe;
  1792. })
  1793. settingsInfo.MouseButton1Down:connect(function()
  1794. local window = Window.new({width = 200, height = 250, name='Settings Info', icon='rbxassetid://894507994'})
  1795. local title = create('TextLabel',{
  1796. ZIndex = 8;
  1797. Text = "The Settings Tab";
  1798. TextScaled = true;
  1799. BackgroundColor3 = Color3.new(1,1,1);
  1800. BackgroundTransparency = .9;
  1801. TextColor3 = Color3.new(1,1,1);
  1802. Size = UDim2.new(.95,0,0,24);
  1803. Font = Enum.Font.SourceSansLight;
  1804. Position = UDim2.new(0.025,0,0,0);
  1805. Parent = window.Content;
  1806. })
  1807. local decor = create('Frame',{
  1808. Size = UDim2.new(1, 0, 0, 1);
  1809. Position = UDim2.new(0, 0, 1, -2);
  1810. ZIndex = 8;
  1811. BorderSizePixel = 0;
  1812. BackgroundColor3 = Color3.new(1, 1, 1);
  1813. Parent = title;
  1814. })
  1815. local body = create('TextLabel',{
  1816. ZIndex = 8;
  1817. Text = "The Settings Tab includes all of the settings for Nebula. Theme Color, Open/Close Keybind, and Blur Levels. All of these settings save automatically, which means no hassle with re-doing settings. (CHANGING THEME COLOR MAY LAG BASED ON COMPUTER SPECS)";
  1818. TextWrap = true;
  1819. TextSize = 13;
  1820. TextScaled = true;
  1821. TextYAlignment = Enum.TextYAlignment.Top;
  1822. BackgroundTransparency = 1;
  1823. TextColor3 = Color3.new(1,1,1);
  1824. Size = UDim2.new(.95,0,1,-30);
  1825. Position = UDim2.new(0.025,0,0,24);
  1826. Font = Enum.Font.SourceSansLight;
  1827. Parent = window.Content;
  1828. })
  1829. end)
  1830. local libraryInfo = create('TextButton',{
  1831. ZIndex = 8;
  1832. Text = "Library Tab Info";
  1833. TextScaled = true;
  1834. BackgroundTransparency = .9;
  1835. Font = Enum.Font.SourceSansLight;
  1836. BackgroundColor3 = Color3.new(1,1,1);
  1837. TextColor3 = Color3.new(1,1,1);
  1838. Size = UDim2.new(.95,0,0,24);
  1839. Position = UDim2.new(0.025,0,0,60);
  1840. Parent = scrframe;
  1841. })
  1842. libraryInfo.MouseButton1Down:connect(function()
  1843. local window = Window.new({width = 200, height = 250, name='Library Info', icon='rbxassetid://894507994'})
  1844. local title = create('TextLabel',{
  1845. ZIndex = 8;
  1846. Text = "The Library Tab";
  1847. TextScaled = true;
  1848. BackgroundColor3 = Color3.new(1,1,1);
  1849. BackgroundTransparency = .9;
  1850. TextColor3 = Color3.new(1,1,1);
  1851. Size = UDim2.new(.95,0,0,24);
  1852. Font = Enum.Font.SourceSansLight;
  1853. Position = UDim2.new(0.025,0,0,0);
  1854. Parent = window.Content;
  1855. })
  1856. local decor = create('Frame',{
  1857. Size = UDim2.new(1, 0, 0, 1);
  1858. Position = UDim2.new(0, 0, 1, -2);
  1859. ZIndex = 8;
  1860. BorderSizePixel = 0;
  1861. BackgroundColor3 = Color3.new(1, 1, 1);
  1862. Parent = title;
  1863. })
  1864. local body = create('TextLabel',{
  1865. ZIndex = 8;
  1866. Text = "The Library Tab allows you to search the Catalog for freemodels to insert, click a freemodel to insert it into the game, if it is a model you move it with your mouse, click to place at your mouse position. (DOES NOT WORK WITH ALL MODELS)";
  1867. TextWrap = true;
  1868. TextSize = 13;
  1869. TextScaled = true;
  1870. TextYAlignment = Enum.TextYAlignment.Top;
  1871. BackgroundTransparency = 1;
  1872. TextColor3 = Color3.new(1,1,1);
  1873. Size = UDim2.new(.95,0,1,-30);
  1874. Position = UDim2.new(0.025,0,0,24);
  1875. Font = Enum.Font.SourceSansLight;
  1876. Parent = window.Content;
  1877. })
  1878. end)
  1879. local musicInfo = create('TextButton',{
  1880. ZIndex = 8;
  1881. Text = "Music Tab Info";
  1882. TextScaled = true;
  1883. BackgroundTransparency = .9;
  1884. Font = Enum.Font.SourceSansLight;
  1885. BackgroundColor3 = Color3.new(1,1,1);
  1886. TextColor3 = Color3.new(1,1,1);
  1887. Size = UDim2.new(.95,0,0,24);
  1888. Position = UDim2.new(0.025,0,0,30);
  1889. Parent = scrframe;
  1890. })
  1891. musicInfo.MouseButton1Down:connect(function()
  1892. local window = Window.new({width = 200, height = 250, name='Music Info', icon='rbxassetid://894507994'})
  1893. local title = create('TextLabel',{
  1894. ZIndex = 8;
  1895. Text = "The Music Tab";
  1896. TextScaled = true;
  1897. BackgroundColor3 = Color3.new(1,1,1);
  1898. BackgroundTransparency = .9;
  1899. TextColor3 = Color3.new(1,1,1);
  1900. Size = UDim2.new(.95,0,0,24);
  1901. Font = Enum.Font.SourceSansLight;
  1902. Position = UDim2.new(0.025,0,0,0);
  1903. Parent = window.Content;
  1904. })
  1905. local decor = create('Frame',{
  1906. Size = UDim2.new(1, 0, 0, 1);
  1907. Position = UDim2.new(0, 0, 1, -2);
  1908. ZIndex = 8;
  1909. BorderSizePixel = 0;
  1910. BackgroundColor3 = Color3.new(1, 1, 1);
  1911. Parent = title;
  1912. })
  1913. local body = create('TextLabel',{
  1914. ZIndex = 8;
  1915. Text = "The Music Tab comes with audio search & ID playing, as well as a fully functional Audio Player, that allows Speed & Volume changing, real-time progress bar, Fast forward, Rewind, Pause, Play, and Stop As well as Sound Looping.";
  1916. TextWrap = true;
  1917. TextSize = 13;
  1918. TextScaled = true;
  1919. TextYAlignment = Enum.TextYAlignment.Top;
  1920. BackgroundTransparency = 1;
  1921. TextColor3 = Color3.new(1,1,1);
  1922. Size = UDim2.new(.95,0,1,-30);
  1923. Position = UDim2.new(0.025,0,0,24);
  1924. Font = Enum.Font.SourceSansLight;
  1925. Parent = window.Content;
  1926. })
  1927. end)
  1928. local scriptsInfo = create('TextButton',{
  1929. ZIndex = 8;
  1930. Text = "Script Tabs Info";
  1931. TextScaled = true;
  1932. BackgroundTransparency = .9;
  1933. BackgroundColor3 = Color3.new(1,1,1);
  1934. Font = Enum.Font.SourceSansLight;
  1935. TextColor3 = Color3.new(1,1,1);
  1936. Size = UDim2.new(.95,0,0,24);
  1937. Position = UDim2.new(0.025,0,0,0);
  1938. Parent = scrframe;
  1939. })
  1940. scriptsInfo.MouseButton1Down:connect(function()
  1941. local window = Window.new({width = 200, height = 250, name='Scripts Info', icon='rbxassetid://894507994'})
  1942. local title = create('TextLabel',{
  1943. ZIndex = 8;
  1944. Text = "The Script Tabs";
  1945. TextScaled = true;
  1946. Font = Enum.Font.SourceSansLight;
  1947. BackgroundColor3 = Color3.new(1,1,1);
  1948. BackgroundTransparency = .9;
  1949. TextColor3 = Color3.new(1,1,1);
  1950. Size = UDim2.new(.95,0,0,24);
  1951. Position = UDim2.new(0.025,0,0,0);
  1952. Parent = window.Content;
  1953. })
  1954. local decor = create('Frame',{
  1955. Size = UDim2.new(1, 0, 0, 1);
  1956. Position = UDim2.new(0, 0, 1, -2);
  1957. ZIndex = 8;
  1958. BorderSizePixel = 0;
  1959. BackgroundColor3 = Color3.new(1, 1, 1);
  1960. Parent = title;
  1961. })
  1962. local body = create('TextLabel',{
  1963. ZIndex = 8;
  1964. Text = "The Script Tabs contains about 380+ scripts ready to be inserted at any time, most will reset upon Character Death, the server scripts should not. Click one of the buttons to insert the script.";
  1965. TextWrap = true;
  1966. TextSize = 13;
  1967. TextScaled = true;
  1968. TextYAlignment = Enum.TextYAlignment.Top;
  1969. BackgroundTransparency = 1;
  1970. Font = Enum.Font.SourceSansLight;
  1971. TextColor3 = Color3.new(1,1,1);
  1972. Size = UDim2.new(.95,0,1,-30);
  1973. Position = UDim2.new(0.025,0,0,24);
  1974. Parent = window.Content;
  1975. })
  1976. end)
  1977. end
  1978. end)
  1979.  
  1980. -- Settings Tab Functionality
  1981.  
  1982. tabHolder.Settings.InputBegan:connect(function(input)
  1983. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1984. local windo = Window.new({width = 250, height = 300, name='Settings', icon='rbxassetid://898100298'})
  1985.  
  1986. -- Define Color Mixer Button --
  1987.  
  1988. local colorButton = create('TextButton',{
  1989. ZIndex = 8;
  1990. Text = "Set Window Color";
  1991. Font = Enum.Font.SourceSansLight;
  1992. TextScaled = true;
  1993. BackgroundColor3 = Color3.new(1,1,1);
  1994. BackgroundTransparency = .9;
  1995. TextColor3 = Color3.new(1,1,1);
  1996. Size = UDim2.new(.95,0,0,24);
  1997. Position = UDim2.new(0.025,0,0,0);
  1998. Parent = windo.Content;
  1999. })
  2000.  
  2001. local icon = createIcon('rbxassetid://904628594', {
  2002. Size = UDim2.new(0, 0, 1, 0);
  2003. ZIndex = 8;
  2004. Parent = colorButton;
  2005. })
  2006. icon.Size = UDim2.new(0,icon.AbsoluteSize.Y,0,icon.AbsoluteSize.Y)
  2007.  
  2008. local keyboardButton = create('TextButton',{
  2009. ZIndex = 8;
  2010. Text = "Set Nebula Keybind";
  2011. TextScaled = true;
  2012. BackgroundColor3 = Color3.new(1,1,1);
  2013. BackgroundTransparency = .9;
  2014. TextColor3 = Color3.new(1,1,1);
  2015. Size = UDim2.new(.95,0,0,24);
  2016. Font = Enum.Font.SourceSansLight;
  2017. Position = UDim2.new(0.025,0,0,30);
  2018. Parent = windo.Content;
  2019. })
  2020.  
  2021. local icon2 = createIcon("rbxassetid://950538977", {
  2022. Size = UDim2.new(0, 0, 1, 0);
  2023. ZIndex = 8;
  2024. Parent = keyboardButton;
  2025. })
  2026. icon2.Size = UDim2.new(0,icon2.AbsoluteSize.Y,0,icon2.AbsoluteSize.Y)
  2027.  
  2028. local blurButton = create('TextButton',{
  2029. Font = Enum.Font.SourceSansLight;
  2030. ZIndex = 8;
  2031. Text = "Set Blur Level";
  2032. TextScaled = true;
  2033. BackgroundColor3 = Color3.new(1,1,1);
  2034. BackgroundTransparency = .9;
  2035. TextColor3 = Color3.new(1,1,1);
  2036. Size = UDim2.new(.95,0,0,24);
  2037. Position = UDim2.new(0.025,0,0,60);
  2038. Parent = windo.Content;
  2039. })
  2040.  
  2041. local icon3 = createIcon('rbxassetid://951352122', {
  2042. Size = UDim2.new(0, 0, 1, 0);
  2043. ZIndex = 8;
  2044. Parent = blurButton;
  2045. })
  2046. icon3.Size = UDim2.new(0,icon3.AbsoluteSize.Y,0,icon3.AbsoluteSize.Y)
  2047.  
  2048. blurButton.MouseButton1Down:connect(function()
  2049. local window = Window.new({width = 165, height = 100, name='Set Blur', icon='rbxassetid://951352122'})
  2050. local blurLabel = create('TextLabel',{
  2051. ZIndex = 8;
  2052. Text = "Blur Level";
  2053. TextScaled = true;
  2054. BackgroundColor3 = Color3.new(1,1,1);
  2055. BackgroundTransparency = 1;
  2056. TextColor3 = Color3.new(1,1,1);
  2057. Size = UDim2.new(0,60,0,60);
  2058. Position = UDim2.new(0.45,-60,0.05,0);
  2059. Parent = window.Content;
  2060. })
  2061.  
  2062. local blurBox = create('TextBox',{
  2063. ZIndex = 8;
  2064. Text = tostring(settings.blurLevel);
  2065. ClearTextOnFocus = false;
  2066. TextSize = 28;
  2067. MultiLine = false;
  2068. BackgroundColor3 = Color3.new(1,1,1);
  2069. BackgroundTransparency = .9;
  2070. TextColor3 = Color3.new(1,1,1);
  2071. Size = UDim2.new(0,60,0,60);
  2072. Position = UDim2.new(0.55,0,0.05,0);
  2073. Parent = window.Content;
  2074. })
  2075.  
  2076. blurBox.Changed:connect(function()
  2077. blurBox.Text = blurBox.Text:gsub("%D","")
  2078. end)
  2079. blurBox.FocusLost:connect(function(enter)
  2080. if enter then
  2081. settings.blurLevel = tonumber(blurBox.Text)
  2082. blurLevel = enabled and tonumber(blurBox.Text) or blurLevel
  2083. end
  2084. end)
  2085. end)
  2086.  
  2087. keyboardButton.MouseButton1Down:connect(function()
  2088. local window = Window.new({width = 165, height = 100, name='Set Key', icon='rbxassetid://950538977'})
  2089. local changeButton = create('TextButton',{
  2090. ZIndex = 8;
  2091. Text = "Set Keybind";
  2092. Size = UDim2.new(.45,0,.6,0);
  2093. BackgroundColor3 = Color3.new(1,1,1);
  2094. BackgroundTransparency = .9;
  2095. TextColor3 = Color3.new(1,1,1);
  2096. Position = UDim2.new(0.05,0,0.15,0);
  2097. Font = Enum.Font.SourceSansLight;
  2098. TextScaled = true;
  2099. Parent = window.Content;
  2100. })
  2101. local currentButton = create('TextLabel',{
  2102. ZIndex = 8;
  2103. Text = tostring(binds[1][1]):sub(14);
  2104. Size = UDim2.new(.45,0,.6,0);
  2105. BackgroundTransparency = 1;
  2106. TextColor3 = Color3.new(1,1,1);
  2107. Position = UDim2.new(0.5,0,0.15,0);
  2108. Font = Enum.Font.SourceSansLight;
  2109. TextScaled = true;
  2110. Parent = window.Content;
  2111. })
  2112. local deb = false
  2113. local function b()
  2114. toggleable = false
  2115. currentButton.Text = "Press A Key"
  2116. local a = services.input.InputBegan:wait()
  2117. if a.UserInputType == Enum.UserInputType.Keyboard then
  2118. binds[1][1] = a.KeyCode
  2119. settings.toggleKey = binds[1][1]
  2120. currentButton.Text = tostring(binds[1][1]):sub(14);
  2121. wait()
  2122. toggleable = true;
  2123. else
  2124. b()
  2125. end
  2126. end
  2127. changeButton.MouseButton1Down:connect(b)
  2128. end)
  2129.  
  2130. -- Register Click of Color Mixer Button --
  2131.  
  2132. colorButton.MouseButton1Down:connect(function()
  2133. local window = Window.new({width = 250, height = 300, name='Color Mixer', icon='rbxassetid://904628594',closed = function(this)
  2134.  
  2135. -- Define Buffer Message on Window Closed --
  2136.  
  2137. local bufferText = create('TextLabel',{
  2138. Position = UDim2.new(0.025,0,0.125,0);
  2139. Size = UDim2.new(.95,0,.075,0);
  2140. TextScaled = true;
  2141. Font = Enum.Font.SourceSansLight;
  2142. TextColor3 = Color3.new(1,1,1);
  2143. BackgroundTransparency = .9;
  2144. BorderSizePixel = 0;
  2145. BackgroundColor3 = Color3.new(1,1,1);
  2146. Text = "Closing Buffer Activated";
  2147. ZIndex = 8;
  2148. Parent = this;
  2149. })
  2150. -- Buffer remove to prevent breaking other tabs --
  2151. for i,v in pairs(this.Content:children())do
  2152. v.Visible = false;
  2153. wait()
  2154. v:Destroy()
  2155. end
  2156. end})
  2157. local overallColor
  2158. local unmixedColor
  2159. -- Define Hue Slider Frame --
  2160. local colorMixerBar = create('Frame',{
  2161. Size = UDim2.new(0,24,0,180);
  2162. Position = UDim2.new(.95,-24,0.05,0);
  2163. BackgroundTransparency = 1;
  2164. Active = true;
  2165. ZIndex = 8;
  2166. Parent = window.Content;
  2167. })
  2168. -- Returns Center Position of Gui --
  2169. local function returnCenterPosition(g)
  2170. return {x=g.AbsolutePosition.X + (g.AbsoluteSize.X/2),y=g.AbsolutePosition.Y + (g.AbsoluteSize.Y/2)}
  2171. end
  2172. -- Add hue slider colors --
  2173. for hue = 0,180,1 do
  2174. local c = create('Frame',{
  2175. Position = UDim2.new(0,0,0,hue);
  2176. Size = UDim2.new(1,0,0,1);
  2177. BackgroundColor3 = Color3.fromHSV(hue/180,1,1);
  2178. ZIndex = 8;
  2179. BorderSizePixel = 0;
  2180. Name = "Color";
  2181. Parent = colorMixerBar;
  2182. })
  2183. end
  2184. local colorHue = Color3.toHSV(settings.mainColor)
  2185. -- Define Hue Slider Draggable Frame --
  2186. local colorBarDrag = create('Frame',{
  2187. Name = "ColorDrag";
  2188. BackgroundColor3 = Color3.new(1,1,1);
  2189. Size = UDim2.new(1,4,0,8);
  2190. Position = UDim2.new(0,-2,0,(180*colorHue)-2);
  2191. Active = true;
  2192. BorderSizePixel = 0;
  2193. ZIndex = 8;
  2194. Draggable = true;
  2195. Parent = colorMixerBar;
  2196. },true)
  2197. -- Define Inner Color of Draggable --
  2198. local colorBarDragColor = create('Frame',{
  2199. Name = "DragColor";
  2200. Size = UDim2.new(1,-4,0,4);
  2201. Position = UDim2.new(0,2,0,2);
  2202. BorderSizePixel = 0;
  2203. Active = true;
  2204. ZIndex = 8;
  2205. Parent = colorBarDrag
  2206. },true)
  2207.  
  2208. colorBarDragColor.BackgroundColor3 = Color3.fromHSV(colorHue,1,1)
  2209. -- Draggable handling --
  2210. colorBarDrag.Changed:connect(function()
  2211. -- Handle X Coords --
  2212. if colorBarDrag.AbsolutePosition.X ~= colorMixerBar.AbsolutePosition.X-2 then
  2213. colorBarDrag.Position = UDim2.new(UDim.new(0,-2),colorBarDrag.Position.Y)
  2214. end
  2215. -- Handle Y Coords --
  2216. if colorBarDrag.AbsolutePosition.Y > (colorMixerBar.AbsolutePosition.Y + colorMixerBar.AbsoluteSize.Y)-4 then
  2217. colorBarDrag.Position = UDim2.new(colorBarDrag.Position.X,UDim.new(0,colorMixerBar.AbsoluteSize.Y-4))
  2218. elseif colorBarDrag.AbsolutePosition.Y < colorMixerBar.AbsolutePosition.Y-4 then
  2219. colorBarDrag.Position = UDim2.new(colorBarDrag.Position.X,UDim.new(0,-4))
  2220. end
  2221. -- Center Circle Color --
  2222. coroutine.wrap(function()
  2223. for i,v in pairs(colorMixerBar:children())do
  2224. if v.Name == "Color"then
  2225. if v.AbsolutePosition.Y == returnCenterPosition(colorBarDrag).y then
  2226. colorBarDragColor.BackgroundColor3 = v.BackgroundColor3
  2227. end
  2228. end
  2229. end
  2230. end)()
  2231. end)
  2232.  
  2233. -- Hue Slider Handling --
  2234.  
  2235. local colorEvent
  2236. colorMixerBar.InputBegan:connect(function(input)
  2237. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  2238. local M = services.mouse;
  2239. colorBarDrag.Position = UDim2.new(UDim.new(0,-2),UDim.new(0,M.Y-colorMixerBar.AbsolutePosition.Y))
  2240. volumeBarEvent = M.Move:connect(function()
  2241. colorBarDrag.Position = UDim2.new(UDim.new(0,-2),UDim.new(0,M.Y-colorMixerBar.AbsolutePosition.Y))
  2242. end)
  2243. end
  2244. end)
  2245. colorMixerBar.InputEnded:connect(function(input)
  2246. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  2247. if volumeBarEvent then
  2248. volumeBarEvent:disconnect();
  2249. end
  2250. end
  2251. end)
  2252.  
  2253. -- Handling with hues for later --
  2254.  
  2255. local hue = Color3.toHSV(colorBarDragColor.BackgroundColor3)
  2256. colorBarDragColor.Changed:connect(function(prop)
  2257. if prop == "BackgroundColor3"then
  2258. hue = Color3.toHSV(colorBarDragColor.BackgroundColor3)
  2259. end
  2260. end)
  2261. -- Define HSL Holder --
  2262. local hsvHolder = create('Frame',{
  2263. Position = UDim2.new(0.05,0,0.05,0);
  2264. Size = UDim2.new(0,183,0,183);
  2265. BackgroundTransparency = 1;
  2266. Active = true;
  2267. ZIndex = 8;
  2268. Parent = window.Content;
  2269. })
  2270. local hsvTable = {}
  2271.  
  2272. -- Build HSL Frame --
  2273.  
  2274. for sat = 0,45,1 do
  2275. for light = 0,45,1 do
  2276. local c = create('Frame',{
  2277. Position = UDim2.new(0,sat*4,0,light*4);
  2278. Size = UDim2.new(0,4,0,4);
  2279. BackgroundColor3 = Color3.fromHSV(hue,sat/45,light/45);
  2280. ZIndex = 8;
  2281. BorderSizePixel = 0;
  2282. Parent = hsvHolder;
  2283. })
  2284. table.insert(hsvTable,c)
  2285. coroutine.wrap(function()
  2286. services.RunService.RenderStepped:connect(function()
  2287. if(c.BackgroundColor3 ~= Color3.fromHSV(hue,sat/45,light/45))then
  2288. c.BackgroundColor3 = Color3.fromHSV(hue,sat/45,light/45);
  2289. end
  2290. end)
  2291. end)()
  2292. end
  2293. end
  2294.  
  2295. -- HSL Slider Definition --
  2296.  
  2297. local h,s,l = Color3.toHSV(settings.mainColor)
  2298. local outerDragA = create('Frame',{
  2299. Size = UDim2.new(0,15,0,3);
  2300. Position = UDim2.new(0,((45*s)*4)-7,0,((45*l)*4)-1);
  2301. ZIndex = 8;
  2302. BorderSizePixel = 0;
  2303. BackgroundColor3 = Color3.new(1,1,1);
  2304. Parent = hsvHolder;
  2305. })
  2306. local outerDragB = create('Frame',{
  2307. Size = UDim2.new(0,3,0,15);
  2308. Position = outerDragA.Position + UDim2.new(0,6,0,-6);
  2309. ZIndex = 8;
  2310. BorderSizePixel = 0;
  2311. BackgroundColor3 = Color3.new(1,1,1);
  2312. Parent = hsvHolder;
  2313. })
  2314. local innerDragA = create('Frame',{
  2315. Size = UDim2.new(0,13,0,1);
  2316. Position = outerDragA.Position + UDim2.new(0,1,0,1);
  2317. ZIndex = 8;
  2318. BorderSizePixel = 0;
  2319. BackgroundColor3 = settings.mainColor;
  2320. Parent = hsvHolder;
  2321. })
  2322. local innerDragB = create('Frame',{
  2323. Size = UDim2.new(0,1,0,13);
  2324. Position = outerDragB.Position + UDim2.new(0,1,0,1);
  2325. ZIndex = 8;
  2326. BorderSizePixel = 0;
  2327. BackgroundColor3 = settings.mainColor;
  2328. Parent = hsvHolder;
  2329. })
  2330. local indicator = create('Frame',{
  2331. Size = UDim2.new(0,1,0,1);
  2332. Position = UDim2.new(0,7,0,1);
  2333. ZIndex = 8;
  2334. BackgroundTransparency = 1;
  2335. Parent = outerDragA;
  2336. })
  2337. -- Extra handling for the HSL Slider --
  2338. outerDragA.Changed:connect(function()
  2339. outerDragB.Position = outerDragA.Position + UDim2.new(0,6,0,-6);
  2340. innerDragA.Position = outerDragA.Position + UDim2.new(0,1,0,1);
  2341. innerDragB.Position = outerDragB.Position + UDim2.new(0,1,0,1);
  2342. end)
  2343.  
  2344. -- HSL Slider Functionality --
  2345. local function collisionDetect(gui1, gui2)
  2346. local g1p, g1s = gui1.AbsolutePosition, gui1.AbsoluteSize;
  2347. local g2p, g2s = gui2.AbsolutePosition, gui2.AbsoluteSize;
  2348. return ((g1p.x < g2p.x + g2s.x and g1p.x + g1s.x > g2p.x) and (g1p.y < g2p.y + g2s.y and g1p.y + g1s.y > g2p.y));
  2349. end;
  2350.  
  2351. local hsvEvent;
  2352. -- Nasty hsl function to help handle --
  2353. local function hsvFunction()
  2354. local M = services.mouse;
  2355. local X,Y = 0,0
  2356. if M.X < hsvHolder.AbsolutePosition.X then
  2357. X = 0
  2358. elseif M.X > hsvHolder.AbsolutePosition.X + hsvHolder.AbsoluteSize.X then
  2359. X = hsvHolder.AbsoluteSize.X
  2360. else
  2361. X = M.X - hsvHolder.AbsolutePosition.X
  2362. end
  2363. if M.Y < hsvHolder.AbsolutePosition.Y then
  2364. Y = 0
  2365. elseif M.Y > hsvHolder.AbsolutePosition.Y + hsvHolder.AbsoluteSize.Y then
  2366. Y = hsvHolder.AbsoluteSize.Y
  2367. else
  2368. Y = M.Y - hsvHolder.AbsolutePosition.Y
  2369. end
  2370. X,Y = X-7,Y -1
  2371. outerDragA.Position = UDim2.new(0,X,0,Y)
  2372. end
  2373. -- HSL Frame Functionality --
  2374. hsvHolder.InputBegan:connect(function(input)
  2375. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  2376. local M = services.mouse;
  2377. hsvFunction()
  2378. hsvEvent = M.Move:connect(function()
  2379. hsvFunction()
  2380. end)
  2381. end
  2382. end)
  2383. hsvHolder.InputEnded:connect(function(input)
  2384. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  2385. if hsvEvent then
  2386. hsvEvent:disconnect();
  2387. end
  2388. end
  2389. end)
  2390.  
  2391. -- Define RGB Boxes --
  2392.  
  2393. local function createNumberOnlyBox(t)
  2394. local box = create("TextBox",{
  2395. MultiLine = false;
  2396. ClearTextOnFocus = false;
  2397. Font = Enum.Font.SourceSansLight;
  2398. BackgroundTransparency = 1;
  2399. ZIndex = 8;
  2400. TextColor3 = Color3.new(1,1,1);
  2401. Text = "";
  2402. })
  2403. for i,v in pairs(t)do
  2404. box[i]=v
  2405. end
  2406. box.Changed:connect(function()
  2407. box.Text = box.Text:gsub("%D","")
  2408. end)
  2409. return box
  2410. end
  2411.  
  2412. local rLabel = create('TextLabel',{
  2413. Font = Enum.Font.SourceSansLight;
  2414. ZIndex = 8;
  2415. Name = "rLabel";
  2416. Text = "R";
  2417. TextColor3 = Color3.new(1,1,1);
  2418. TextSize = 24;
  2419. Size = UDim2.new(.1,0,.1,0);
  2420. Position = UDim2.new(.15,0,.75,0);
  2421. BackgroundTransparency = 1;
  2422. Parent = window.Content
  2423. })
  2424.  
  2425. local rBox = createNumberOnlyBox({
  2426. Name = "rBox";
  2427. TextSize = 26;
  2428. Text = math.floor(settings.mainColor.r*255);
  2429. Position = UDim2.new(.15,0,0.85,0);
  2430. Size = UDim2.new(0.1,0,0.1,0);
  2431. Parent = window.Content;
  2432. })
  2433.  
  2434. local gLabel = create('TextLabel',{
  2435. Font = Enum.Font.SourceSansLight;
  2436. ZIndex = 8;
  2437. Name = "gLabel";
  2438. Text = "G";
  2439. TextColor3 = Color3.new(1,1,1);
  2440. TextSize = 20;
  2441. Size = UDim2.new(.1,0,.1,0);
  2442. Position = UDim2.new(.35,0,.75,0);
  2443. BackgroundTransparency = 1;
  2444. Parent = window.Content
  2445. })
  2446.  
  2447. local gBox = createNumberOnlyBox({
  2448. Name = "gBox";
  2449. TextSize = 26;
  2450. Text = math.floor(settings.mainColor.g*255);
  2451. Position = UDim2.new(.35,0,0.85,0);
  2452. Size = UDim2.new(0.1,0,0.1,0);
  2453. Parent = window.Content;
  2454. })
  2455.  
  2456. local bLabel = create('TextLabel',{
  2457. Font = Enum.Font.SourceSansLight;
  2458. ZIndex = 8;
  2459. Name = "bLabel";
  2460. Text = "B";
  2461. TextColor3 = Color3.new(1,1,1);
  2462. TextSize = 20;
  2463. Size = UDim2.new(.1,0,.1,0);
  2464. Position = UDim2.new(.55,0,.75,0);
  2465. BackgroundTransparency = 1;
  2466. Parent = window.Content
  2467. })
  2468.  
  2469. local bBox = createNumberOnlyBox({
  2470. Name = "bBox";
  2471. TextSize = 26;
  2472. Text = math.floor(settings.mainColor.b*255);
  2473. Position = UDim2.new(.55,0,0.85,0);
  2474. Size = UDim2.new(0.1,0,0.1,0);
  2475. Parent = window.Content;
  2476. })
  2477.  
  2478. -- Functions to help handle the boxes --
  2479.  
  2480. local function updateColorGuis()
  2481. local h,s,l = Color3.toHSV(settings.mainColor)
  2482. rBox.Text = math.floor(settings.mainColor.r*255);
  2483. gBox.Text = math.floor(settings.mainColor.g*255);
  2484. bBox.Text = math.floor(settings.mainColor.b*255);
  2485. innerDragA.BackgroundColor3 = settings.mainColor;
  2486. innerDragB.BackgroundColor3 = settings.mainColor;
  2487. end
  2488.  
  2489. local function FocusLost()
  2490. settings.mainColor = Color3.fromRGB(tonumber(rBox.Text),tonumber(gBox.Text),tonumber(bBox.Text))
  2491. local h,s,l = Color3.toHSV(settings.mainColor)
  2492. updateColorGuis()
  2493. local colorHue = Color3.toHSV(settings.mainColor)
  2494. colorBarDrag.Position = UDim2.new(0,-2,0,(180*colorHue)-2);
  2495. outerDragA.Position = UDim2.new(0,((45*s)*4)-7,0,((45*l)*4)-1)
  2496. end
  2497. rBox.FocusLost:connect(function(enter)
  2498. if enter then
  2499. FocusLost()
  2500. end
  2501. end)
  2502. gBox.FocusLost:connect(function(enter)
  2503. if enter then
  2504. FocusLost()
  2505. end
  2506. end)
  2507. bBox.FocusLost:connect(function(enter)
  2508. if enter then
  2509. FocusLost()
  2510. end
  2511. end)
  2512.  
  2513. local cEvent
  2514. indicator.Changed:connect(function(prop)
  2515. if prop == "AbsolutePosition"then
  2516. if cEvent then cEvent:disconnect() end
  2517. coroutine.wrap(function()
  2518. for i,v in pairs(hsvTable)do
  2519. if collisionDetect(indicator,v)then
  2520. settings.mainColor = v.BackgroundColor3
  2521. updateColorGuis()
  2522. cEvent = v.Changed:connect(function(prop)
  2523. if prop == "BackgroundColor3"then
  2524. settings.mainColor = v.BackgroundColor3
  2525. updateColorGuis()
  2526. end
  2527. end)
  2528. end
  2529. end
  2530. end)()
  2531. end
  2532. end)
  2533. --
  2534. end)
  2535. end
  2536. end)
  2537.  
  2538. -- Color Functionality --
  2539.  
  2540. function alternateColors(object,property,oldColor3,newColor3,i)
  2541. coroutine.wrap(function()
  2542. for i = 0,1,i do
  2543. object[property] = oldColor3:lerp(newColor3,i)
  2544. game:service'RunService'.RenderStepped:wait()
  2545. end
  2546. object[property] = newColor3
  2547. end)()
  2548. end
  2549.  
  2550. local Colorables = {}
  2551.  
  2552. local function addRecolorables(inst)
  2553. if inst.BackgroundColor3 == colorCheck then
  2554. table.insert(Colorables,inst)
  2555. end
  2556. inst.ChildAdded:connect(function(i)
  2557. if i.BackgroundColor3 == colorCheck then
  2558. table.insert(Colorables,i)
  2559. end
  2560. end)
  2561. end
  2562.  
  2563. Children(gui,function(inst)
  2564. addRecolorables(inst)
  2565. end)
  2566. gui.ChildAdded:connect(function(i)
  2567. Children(i,function(inst)
  2568. addRecolorables(inst)
  2569. end)
  2570. addRecolorables(i)
  2571. end)
  2572. Children(pingui,function(inst)
  2573. addRecolorables(inst)
  2574. end)
  2575. pingui.ChildAdded:connect(function(i)
  2576. Children(i,function(inst)
  2577. addRecolorables(inst)
  2578. end)
  2579. addRecolorables(i)
  2580. end)
  2581.  
  2582.  
  2583. game:service'RunService'.Stepped:connect(function()
  2584. if colorCheck ~= settings.mainColor then
  2585. coroutine.wrap(function()
  2586. for i,v in pairs(Colorables)do
  2587. v.BackgroundColor3 = settings.mainColor--alternateColors(v,"BackgroundColor3",colorCheck,settings.mainColor,.05)
  2588. end
  2589. colorCheck = settings.mainColor
  2590. end)()
  2591. end
  2592. end)
  2593. --Window.new({width = 250, height = 300, name='Server', icon='http://www.roblox.com/asset/?id=658933127'})
  2594.  
  2595. -- Handle Saving --
  2596.  
  2597. services.Players.PlayerRemoving:connect(function(player)
  2598. game:service'CookiesService':SetCookieValue('nebulaBackgroundColor3',tostring(math.floor(settings.mainColor.r*255)..", "..math.floor(settings.mainColor.g*255)..", "..math.floor(settings.mainColor.b*255)));
  2599. game:service'CookiesService':SetCookieValue('nebulaKeyBind',tostring(settings.toggleKey):sub(14))
  2600. game:service'CookiesService':SetCookieValue('nebulaBlurLevel',tostring(settings.blurLevel))
  2601. end)
  2602.  
  2603. -- Handle Intro --
  2604.  
  2605. local Intro = createIcon('rbxassetid://950437566',{
  2606. Size = UDim2.new(0,150,0,150);
  2607. Position = UDim2.new(.5,-50,0,-150);
  2608. Visible = true;
  2609. Parent = gui;
  2610. })
  2611. local IntroText = create('TextLabel',{
  2612. Transparency = 1;
  2613. Text = "Created by Scripterity & finny";
  2614. TextSize = 32;
  2615. TextColor3 = Color3.new(1,1,1);
  2616. Font = Enum.Font.SourceSansLight;
  2617. Position = UDim2.new(0,0,1,0);
  2618. Size = UDim2.new(1,0,0,30);
  2619. Parent = Intro;
  2620. })
  2621. repeat wait()until Intro.IsLoaded
  2622. Intro:TweenPosition(UDim2.new(.5,-75,.5,-75),Enum.EasingDirection.Out,Enum.EasingStyle.Back,.5,true)
  2623. wait(.75)
  2624. tweenRecursiveTransparency(IntroText,0,-.05);
  2625. wait(5)
  2626. Intro:TweenPosition(UDim2.new(.5,-75,1,0),Enum.EasingDirection.In,Enum.EasingStyle.Quint,.5,true)
  2627. --Intro:TweenSizeAndPosition(UDim2.new(0,100+gui.AbsoluteSize.X,0,100+gui.AbsoluteSize.X),UDim2.new(0,0,0,-((gui.AbsoluteSize.X-gui.AbsoluteSize.Y)/2)),Enum.EasingDirection.Out,Enum.EasingStyle.Back ,1,true)
  2628. tweenRecursiveTransparency(Intro,1,.05)
  2629. tweenRecursiveTransparency(IntroText,1,.05)
  2630. repeat wait()until Intro.ImageTransparency == 1
  2631. Intro:Destroy()
  2632.  
  2633. print("Click ".. tostring(settings.toggleKey) .." to use Nebula");
Advertisement
Add Comment
Please, Sign In to add comment