Advertisement
The_God_M8

RLX PACK XD

Aug 5th, 2021 (edited)
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.82 KB | None | 0 0
  1. local Note = {}
  2.  
  3. local LibName = "RLXPACK"
  4. function Note:CreateWindow(text)
  5. text = text or "Note Library"
  6.  
  7. local NoteLibrary = Instance.new("ScreenGui")
  8. local NotF = Instance.new("ScreenGui", game.CoreGui)
  9. NotF .ResetOnSpawn = false
  10. local Dragify = Instance.new("Frame")
  11. local MainFrame = Instance.new("Frame")
  12. local mainCorner = Instance.new("UICorner")
  13. local SideFrame = Instance.new("Frame")
  14. local sideCorner = Instance.new("UICorner")
  15. local Title = Instance.new("TextLabel")
  16. local allTabs = Instance.new("Frame")
  17. local elementListing = Instance.new("UIListLayout")
  18. local allPages = Instance.new("Frame")
  19. local allCorner = Instance.new("UICorner")
  20. local pageFolder = Instance.new("Folder")
  21.  
  22. NoteLibrary.Name = LibName
  23. NoteLibrary.Parent = game.CoreGui
  24. NoteLibrary.ResetOnSpawn = false
  25.  
  26. function dragify(Frame)
  27. dragToggle = nil
  28. dragSpeed = .01
  29. dragInput = nil
  30. dragStart = nil
  31. dragPos = nil
  32.  
  33. function updateInput(input)
  34. Delta = input.Position - dragStart
  35. Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + Delta.X, startPos.Y.Scale, startPos.Y.Offset + Delta.Y)
  36. game:GetService("TweenService"):Create(Frame, TweenInfo.new(.25), {Position = Position}):Play()
  37. end
  38.  
  39. Frame.InputBegan:Connect(function(input)
  40. if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then
  41. dragToggle = true
  42. dragStart = input.Position
  43. startPos = Frame.Position
  44. input.Changed:Connect(function()
  45. if (input.UserInputState == Enum.UserInputState.End) then
  46. dragToggle = false
  47. end
  48. end)
  49. end
  50. end)
  51.  
  52. Frame.InputChanged:Connect(function(input)
  53. if (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
  54. dragInput = input
  55. end
  56. end)
  57.  
  58. game:GetService("UserInputService").InputChanged:Connect(function(input)
  59. if (input == dragInput and dragToggle) then
  60. updateInput(input)
  61. end
  62. end)
  63. end
  64.  
  65. -- forgot who created the dragify, anyway credits to them
  66.  
  67. Dragify.Name = "Dragify"
  68. Dragify.Parent = NoteLibrary
  69. Dragify.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  70. Dragify.BackgroundTransparency = 1.000
  71. Dragify.BorderSizePixel = 0
  72. Dragify.Position = UDim2.new(0.285028011, 0, 0.198664442, 0)
  73. Dragify.Size = UDim2.new(0, 536, 0, 360)
  74.  
  75. dragify(Dragify)
  76.  
  77.  
  78. MainFrame.Name = "MainFrame"
  79. MainFrame.Parent = Dragify
  80. MainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  81. MainFrame.BackgroundColor3 = Color3.fromRGB(22, 23, 27)
  82. MainFrame.Position = UDim2.new(0.5, 0, 0.5, 0)
  83. MainFrame.Size = UDim2.new(0, 536, 0, 360)
  84. MainFrame.Draggable = true
  85.  
  86. mainCorner.CornerRadius = UDim.new(0, 6)
  87. mainCorner.Name = "mainCorner"
  88. mainCorner.Parent = MainFrame
  89.  
  90. SideFrame.Name = "SideFrame"
  91. SideFrame.Parent = MainFrame
  92. SideFrame.BackgroundColor3 = _G.Themes.Background
  93. SideFrame.BorderSizePixel = 0
  94. SideFrame.Size = UDim2.new(0, 135, 0, 360)
  95.  
  96. sideCorner.CornerRadius = UDim.new(0, 6)
  97. sideCorner.Name = "sideCorner"
  98. sideCorner.Parent = SideFrame
  99.  
  100. Title.Name = "Title"
  101. Title.Parent = SideFrame
  102. Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  103. Title.BackgroundTransparency = 1.000
  104. Title.BorderSizePixel = 0
  105. Title.Size = UDim2.new(0, 135, 0, 33)
  106. Title.Font = Enum.Font.Gotham
  107. Title.Text = text
  108. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  109. Title.TextSize = 15
  110.  
  111. allTabs.Name = "allTabs"
  112. allTabs.Parent = SideFrame
  113. allTabs.BackgroundColor3 = _G.Themes.Background
  114. allTabs.BackgroundTransparency = 1.000
  115. allTabs.BorderSizePixel = 0
  116. allTabs.Position = UDim2.new(0.0740740746, 0, 0.108333334, 0)
  117. allTabs.Size = UDim2.new(0, 116, 0, 309)
  118.  
  119. elementListing.Name = "elementListing"
  120. elementListing.Parent = allTabs
  121. elementListing.SortOrder = Enum.SortOrder.LayoutOrder
  122. elementListing.Padding = UDim.new(0, 5)
  123.  
  124. allPages.Name = "allPages"
  125. allPages.Parent = MainFrame
  126. allPages.BackgroundColor3 = _G.Themes.Background
  127. allPages.BorderSizePixel = 0
  128. allPages.Position = UDim2.new(0.274253726, 0, 0.027777778, 0)
  129. allPages.Size = UDim2.new(0, 380, 0, 341)
  130.  
  131. allCorner.CornerRadius = UDim.new(0, 6)
  132. allCorner.Name = "allCorner"
  133. allCorner.Parent = allPages
  134.  
  135. pageFolder.Name = "pageFolder"
  136. pageFolder.Parent = allPages
  137.  
  138. local TabHandler = {}
  139. local FirstTime = false
  140. function TabHandler:CreateTab(tabText, canvas)
  141. tabText = tabText or "New Tab"
  142. canvas = canvas or 1
  143.  
  144. local tabButton = Instance.new("TextButton")
  145. local tabBtnCorner = Instance.new("UICorner")
  146. local newPage = Instance.new("ScrollingFrame")
  147. local pageElementListing = Instance.new("UIListLayout")
  148.  
  149. tabButton.Name = "tabButton"
  150. tabButton.Parent = allTabs
  151. tabButton.BackgroundColor3 = _G.Themes.Background
  152. tabButton.BorderSizePixel = 0
  153. tabButton.Size = UDim2.new(0, 116, 0, 29)
  154. tabButton.Font = Enum.Font.Gotham
  155. tabButton.Text = " "..tabText
  156. tabButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  157. tabButton.TextSize = 15.000
  158. tabButton.TextXAlignment = Enum.TextXAlignment.Left
  159.  
  160. tabBtnCorner.CornerRadius = UDim.new(0, 3)
  161. tabBtnCorner.Parent = tabButton
  162.  
  163. newPage.Name = tabText
  164. newPage.Parent = pageFolder
  165. newPage.Active = true
  166. newPage.Visible = false
  167. newPage.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  168. newPage.BackgroundTransparency = 1.000
  169. newPage.BorderSizePixel = 0
  170. newPage.Position = UDim2.new(0.018421052, 0, 0.0293255132, 0)
  171. newPage.Size = UDim2.new(0, 367, 0, 323)
  172. newPage.ScrollBarThickness = 5
  173. newPage.ClipsDescendants = true
  174. newPage.ScrollBarImageColor3 = _G.Themes.Glow
  175. newPage.CanvasSize = UDim2.new(0, 0, canvas, 0)
  176. newPage.ScrollBarThickness = 5
  177.  
  178. pageElementListing.Name = "pageElementListing"
  179. pageElementListing.Parent = newPage
  180. pageElementListing.SortOrder = Enum.SortOrder.LayoutOrder
  181. pageElementListing.Padding = UDim.new(0, 10)
  182.  
  183. tabButton.MouseButton1Click:Connect(function()
  184. for i,v in next, pageFolder:GetChildren() do
  185. v.Visible = false
  186. end
  187. newPage.Visible = true
  188.  
  189. for i,v in next, allTabs:GetChildren() do
  190. if v:IsA("TextButton") then
  191. game.TweenService:Create(v, TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {
  192. BackgroundColor3 = _G.Themes.Background
  193. }):Play()
  194. end
  195. end
  196. game.TweenService:Create(tabButton, TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {
  197. BackgroundColor3 = _G.Themes.Glow
  198. }):Play()
  199. end)
  200.  
  201. if FirstTime == false then
  202. FirstTime = true
  203. for i,v in next, pageFolder:GetChildren() do
  204. v.Visible = false
  205. end
  206. newPage.Visible = true
  207.  
  208. for i,v in next, allTabs:GetChildren() do
  209. if v:IsA("TextButton") then
  210. game.TweenService:Create(v, TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {
  211. BackgroundColor3 = _G.Themes.Background
  212. }):Play()
  213. end
  214. end
  215. game.TweenService:Create(tabButton, TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {
  216. BackgroundColor3 = _G.Themes.Glow
  217. }):Play()
  218. end
  219.  
  220. local InnerLib = {}
  221.  
  222. function InnerLib:CreateButton(text, callback)
  223. text = text or "New Button"
  224. callback = callback or function() end
  225.  
  226. local TextButton = Instance.new("TextButton")
  227. local buttonCorner = Instance.new("UICorner")
  228.  
  229. TextButton.Parent = newPage
  230. TextButton.BackgroundColor3 = Color3.fromRGB(42, 43, 49)
  231. TextButton.Size = UDim2.new(0, 357, 0, 37)
  232. TextButton.Font = Enum.Font.Gotham
  233. TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  234. TextButton.TextSize = 14.000
  235. TextButton.Text = text
  236. TextButton.MouseButton1Click:Connect(function()
  237. callback()
  238.  
  239. game.TweenService:Create(TextButton, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {
  240. BackgroundColor3 = _G.Themes.Glow
  241. }):Play()
  242. wait(0.1)
  243. game.TweenService:Create(TextButton, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
  244. BackgroundColor3 = Color3.fromRGB(42, 43, 49)
  245. }):Play()
  246. end)
  247.  
  248. buttonCorner.CornerRadius = UDim.new(0, 3)
  249. buttonCorner.Name = "buttonCorner"
  250. buttonCorner.Parent = TextButton
  251. end
  252.  
  253. function InnerLib:CreateToggle(text, callback)
  254. text = text or "New Toggle"
  255. callback = callback or function() end
  256.  
  257. local toggleButton = Instance.new("TextButton")
  258. local buttonCorner = Instance.new("UICorner")
  259.  
  260. toggleButton.Name = "toggleButton"
  261. toggleButton.Parent = newPage
  262. toggleButton.BackgroundColor3 = Color3.fromRGB(42, 43, 49)
  263. toggleButton.Size = UDim2.new(0, 357, 0, 37)
  264. toggleButton.Font = Enum.Font.Gotham
  265. toggleButton.Text = text
  266. toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  267. toggleButton.TextSize = 14.000
  268.  
  269. buttonCorner.CornerRadius = UDim.new(0, 3)
  270. buttonCorner.Name = "buttonCorner"
  271. buttonCorner.Parent = toggleButton
  272.  
  273. local tog = false
  274.  
  275. toggleButton.MouseButton1Click:Connect(function()
  276. tog = not tog
  277. callback(tog)
  278. if tog then
  279. game.TweenService:Create(toggleButton, TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {
  280. BackgroundColor3 = _G.Themes.Glow
  281. }):Play()
  282. else
  283. game.TweenService:Create(toggleButton, TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {
  284. BackgroundColor3 = Color3.fromRGB(42, 43, 49)
  285. }):Play()
  286. end
  287. end)
  288. end
  289.  
  290.  
  291.  
  292. function InnerLib:CreateBind(text, first, callback, val)
  293. text = text or " New Bind"
  294.  
  295. callback = callback or function() end
  296. local key = first
  297. _G[val] = key
  298. local bindLabel = Instance.new("TextLabel")
  299. local bindCorner = Instance.new("UICorner")
  300. local bindButton = Instance.new("TextButton")
  301.  
  302. bindLabel.Name = "bindLabel"
  303. bindLabel.Parent = newPage
  304. bindLabel.BackgroundColor3 = Color3.fromRGB(42, 43, 49)
  305. bindLabel.Position = UDim2.new(0.0190735701, 0, 0.027859237, 0)
  306. bindLabel.Size = UDim2.new(0, 357, 0, 37)
  307. bindLabel.Font = Enum.Font.Gotham
  308. bindLabel.Text = " "..text
  309. bindLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  310. bindLabel.TextSize = 14.000
  311. bindLabel.TextXAlignment = Enum.TextXAlignment.Left
  312.  
  313. bindCorner.CornerRadius = UDim.new(0, 3)
  314. bindCorner.Name = "bindCorner"
  315. bindCorner.Parent = bindLabel
  316.  
  317. bindButton.Name = "bindButton"
  318. bindButton.Parent = bindLabel
  319. bindButton.BackgroundColor3 = Color3.fromRGB(42, 43, 49)
  320. bindButton.BorderColor3 = _G.Themes.Glow
  321. bindButton.Position = UDim2.new(0.868347347, 0, 0.162162155, 0)
  322. bindButton.Size = UDim2.new(0, 45, 0, 24)
  323. bindButton.Font = Enum.Font.Gotham
  324. bindButton.Text = key
  325. bindButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  326. bindButton.TextSize = 14.000
  327.  
  328. local blacklisted = {
  329. Unknwon = true;
  330. Return = true;
  331. Space = true;
  332. Tab = true;
  333. }
  334.  
  335. bindButton.MouseButton1Click:Connect(function()
  336. bindButton.Text = ". . ."
  337. local a = game:GetService("UserInputService").InputBegan:wait()
  338. if a.KeyCode and not blacklisted[a.KeyCode.Name] then
  339. bindButton.Text = a.KeyCode.Name
  340. key = a.KeyCode.Name
  341. _G[val] = key
  342. end
  343. end)
  344.  
  345. game:GetService("UserInputService").InputBegan:connect(function(current, pressed)
  346. if not pressed then
  347. if current.KeyCode.Name == key then
  348. callback(bindButton.Text)
  349. end
  350. end
  351. end)
  352.  
  353. end
  354.  
  355. function InnerLib:CreateTextBox(text, callback, yo)
  356. text = text or "New Textbox"
  357. callback = callback or function() end
  358. accvalue = yo or nil
  359.  
  360. local textBoxLabel = Instance.new("TextLabel")
  361. local textBoxLabelCorner = Instance.new("UICorner")
  362. local textBox = Instance.new("TextBox")
  363. local textboxCorner = Instance.new("UICorner")
  364.  
  365. textBoxLabel.Name = text
  366. textBoxLabel.Parent = newPage
  367. textBoxLabel.BackgroundColor3 = Color3.fromRGB(42, 43, 49)
  368. textBoxLabel.Position = UDim2.new(0, 0, 0.408668727, 0)
  369. textBoxLabel.Size = UDim2.new(0, 357, 0, 37)
  370. textBoxLabel.Font = Enum.Font.Gotham
  371. textBoxLabel.Text = " "..text
  372. textBoxLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  373. textBoxLabel.TextSize = 14.000
  374. textBoxLabel.TextXAlignment = Enum.TextXAlignment.Left
  375.  
  376. textBoxLabelCorner.CornerRadius = UDim.new(0, 3)
  377. textBoxLabelCorner.Name = "textBoxLabelCorner"
  378. textBoxLabelCorner.Parent = textBoxLabel
  379.  
  380. textBox.Name = "textBox"
  381. textBox.Parent = textBoxLabel
  382. textBox.BackgroundColor3 = Color3.fromRGB(42, 43, 49)
  383. textBox.BackgroundTransparency = 1
  384. textBox.Position = UDim2.new(0.380952388, 0, 0.166666389, 0)
  385. textBox.Size = UDim2.new(0, 209, 0, 23)
  386. textBox.Font = Enum.Font.GothamSemibold
  387. textBox.PlaceholderText = "Type here!"
  388. textBox.Text = accvalue or ""
  389. textBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  390. textBox.TextSize = 14.000
  391. textBox.TextXAlignment = Enum.TextXAlignment.Right
  392.  
  393. textboxCorner.CornerRadius = UDim.new(0, 3)
  394. textboxCorner.Name = "textboxCorner"
  395. textboxCorner.Parent = textBox
  396.  
  397. textBox.FocusLost:Connect(function(enterPressed)
  398. if not enterPressed then return end
  399. callback(textBox.Text)
  400. end)
  401. end
  402.  
  403. function InnerLib:CreateSlider(text, minvalue, maxvalue, callback)
  404. text = text or " New Slider"
  405. minvalue = minvalue or 0
  406. maxvalue = maxvalue or 100
  407. callback = callback or function() end
  408.  
  409. local sliderContainer = Instance.new("TextButton")
  410. local buttonCorner = Instance.new("UICorner")
  411. local sliderFrame = Instance.new("Frame")
  412. local sliderLabel = Instance.new("TextLabel")
  413. local sliderValue = Instance.new("TextLabel")
  414. local sliderValueCorner = Instance.new("UICorner")
  415. local sliderLabelCorner = Instance.new("UICorner")
  416.  
  417. sliderContainer.Name = "sliderContainer"
  418. sliderContainer.Parent = newPage
  419. sliderContainer.BackgroundColor3 = Color3.fromRGB(42, 43, 49)
  420. sliderContainer.Size = UDim2.new(0, 357, 0, 37)
  421. sliderContainer.Font = Enum.Font.Gotham
  422. sliderContainer.Text = ""
  423. sliderContainer.TextColor3 = Color3.fromRGB(255, 255, 255)
  424. sliderContainer.TextSize = 14.000
  425.  
  426. buttonCorner.CornerRadius = UDim.new(0, 3)
  427. buttonCorner.Name = "buttonCorner"
  428. buttonCorner.Parent = sliderContainer
  429.  
  430. sliderFrame.Name = "sliderFrame"
  431. sliderFrame.Parent = sliderContainer
  432. sliderFrame.BackgroundColor3 = _G.Themes.Glow
  433. sliderFrame.Size = UDim2.new(0, 0, 0, 37)
  434. sliderFrame.ZIndex = 1
  435. sliderFrame.BorderSizePixel = 0
  436.  
  437. sliderLabel.Name = "sliderLabel"
  438. sliderLabel.Parent = sliderContainer
  439. sliderLabel.BackgroundColor3 = Color3.fromRGB(42, 43, 49)
  440. sliderLabel.BackgroundTransparency = 1.000
  441. sliderLabel.Position = UDim2.new(0, 0, -0.0237637162, 0)
  442. sliderLabel.Size = UDim2.new(0, 357, 0, 37)
  443. sliderLabel.Font = Enum.Font.Gotham
  444. sliderLabel.Text = " "..text
  445. sliderLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  446. sliderLabel.TextSize = 14.000
  447. sliderLabel.TextXAlignment = Enum.TextXAlignment.Left
  448.  
  449. sliderValue.Name = "sliderValue"
  450. sliderValue.Parent = sliderContainer
  451. sliderValue.BackgroundColor3 = Color3.fromRGB(42, 43, 49)
  452. sliderValue.BackgroundTransparency = 1.000
  453. sliderValue.Position = UDim2.new(0.890756309, 0, 0.192452103, 0)
  454. sliderValue.Size = UDim2.new(0, 39, 0, 22)
  455. sliderValue.Font = Enum.Font.Gotham
  456. sliderValue.Text = minvalue
  457. sliderValue.TextColor3 = Color3.fromRGB(255, 255, 255)
  458. sliderValue.TextSize = 14.000
  459.  
  460. sliderValueCorner.CornerRadius = UDim.new(0, 3)
  461. sliderValueCorner.Name = "sliderValueCorner"
  462. sliderValueCorner.Parent = sliderValue
  463.  
  464. sliderLabelCorner.CornerRadius = UDim.new(0, 3)
  465. sliderLabelCorner.Name = "sliderLabelCorner"
  466. sliderLabelCorner.Parent = sliderContainer
  467.  
  468. local mouse = game.Players.LocalPlayer:GetMouse()
  469. local uis = game:GetService("UserInputService")
  470. local Value;
  471.  
  472. sliderContainer.MouseButton1Down:Connect(function()
  473. Value = math.floor((((tonumber(maxvalue) - tonumber(minvalue)) / 357) * sliderFrame.AbsoluteSize.X) + tonumber(minvalue)) or 0
  474. pcall(function()
  475. callback(Value)
  476. end)
  477. sliderFrame.Size = UDim2.new(0, math.clamp(mouse.X - sliderFrame.AbsolutePosition.X, 0, 357), 0, 37)
  478. moveconnection = mouse.Move:Connect(function()
  479. sliderValue.Text = Value
  480. Value = math.floor((((tonumber(maxvalue) - tonumber(minvalue)) / 357) * sliderFrame.AbsoluteSize.X) + tonumber(minvalue))
  481. pcall(function()
  482. callback(Value)
  483. end)
  484. sliderFrame.Size = UDim2.new(0, math.clamp(mouse.X - sliderFrame.AbsolutePosition.X, 0, 357), 0, 37)
  485. end)
  486. releaseconnection = uis.InputEnded:Connect(function(Mouse)
  487. if Mouse.UserInputType == Enum.UserInputType.MouseButton1 then
  488. Value = math.floor((((tonumber(maxvalue) - tonumber(minvalue)) / 357) * sliderFrame.AbsoluteSize.X) + tonumber(minvalue))
  489. pcall(function()
  490. callback(Value)
  491. end)
  492. sliderFrame.Size = UDim2.new(0, math.clamp(mouse.X - sliderFrame.AbsolutePosition.X, 0, 357), 0, 37)
  493. sliderValue.Text = Value
  494. moveconnection:Disconnect()
  495. releaseconnection:Disconnect()
  496. end
  497. end)
  498. end)
  499. end
  500. local objects = {}
  501.  
  502. local tween = game:GetService("TweenService")
  503. local tweeninfo = TweenInfo.new
  504.  
  505. local function Find(table, value) -- table.find doesn't work for dictionaries
  506. for i, v in pairs(table) do
  507. if v == value then
  508. return i
  509. end
  510. end
  511. end
  512.  
  513. local function Create(instance, properties, children)
  514. local object = Instance.new(instance)
  515.  
  516. for i, v in pairs(properties or {}) do
  517. object[i] = v
  518.  
  519. if typeof(v) == "Color3" then -- save for theme changer later
  520. local theme = Find(_G.Themes, v)
  521.  
  522. if theme then
  523. objects[theme] = objects[theme] or {}
  524. objects[theme][i] = objects[theme][i] or setmetatable({}, {_mode = "k"})
  525.  
  526. table.insert(objects[theme][i], object)
  527. end
  528. end
  529. end
  530.  
  531. for i, module in pairs(children or {}) do
  532. module.Parent = object
  533. end
  534.  
  535. return object
  536. end
  537.  
  538. local function Tween(instance, properties, duration, ...)
  539. tween:Create(instance, tweeninfo(duration, ...), properties):Play()
  540. end
  541.  
  542. function InnerLib:Notify(title, text, callback)
  543.  
  544. local notification = Create("ImageLabel", {
  545. Name = "Notification",
  546. Parent = NotF,
  547. BackgroundTransparency = 1,
  548. Size = UDim2.new(0, 200, 0, 60),
  549. Image = "rbxassetid://5028857472",
  550. ImageColor3 = _G.Themes.Background,
  551. ScaleType = Enum.ScaleType.Slice,
  552. SliceCenter = Rect.new(4, 4, 296, 296),
  553. ZIndex = 3,
  554. ClipsDescendants = true
  555. }, {
  556. Create("ImageLabel", {
  557. Name = "Flash",
  558. Size = UDim2.new(1, 0, 1, 0),
  559. BackgroundTransparency = 1,
  560. Image = "rbxassetid://4641149554",
  561. ImageColor3 = Color3.fromRGB(255, 255, 255),
  562. ZIndex = 5
  563. }),
  564. Create("ImageLabel", {
  565. Name = "Glow",
  566. BackgroundTransparency = 1,
  567. Position = UDim2.new(0, -15, 0, -15),
  568. Size = UDim2.new(1, 30, 1, 30),
  569. ZIndex = 2,
  570. Image = "rbxassetid://5028857084",
  571. ImageColor3 = _G.Themes.Glow,
  572. ScaleType = Enum.ScaleType.Slice,
  573. SliceCenter = Rect.new(24, 24, 276, 276)
  574. }),
  575. Create("TextLabel", {
  576. Name = "Title",
  577. BackgroundTransparency = 1,
  578. Position = UDim2.new(0, 10, 0, 8),
  579. Size = UDim2.new(1, -40, 0, 16),
  580. ZIndex = 4,
  581. Font = Enum.Font.GothamSemibold,
  582. TextColor3 = Color3.fromRGB(255, 255, 255),
  583. TextSize = 14.000,
  584. TextXAlignment = Enum.TextXAlignment.Left
  585. }),
  586. Create("TextLabel", {
  587. Name = "Text",
  588. BackgroundTransparency = 1,
  589. Position = UDim2.new(0, 10, 1, -24),
  590. Size = UDim2.new(1, -40, 0, 16),
  591. ZIndex = 4,
  592. Font = Enum.Font.Gotham,
  593. TextColor3 = Color3.fromRGB(255, 255, 255),
  594. TextSize = 12.000,
  595. TextXAlignment = Enum.TextXAlignment.Left
  596. }),
  597. Create("ImageButton", {
  598. Name = "Accept",
  599. BackgroundTransparency = 1,
  600. Position = UDim2.new(1, -26, 0, 8),
  601. Size = UDim2.new(0, 16, 0, 16),
  602. Image = "rbxassetid://5012538259",
  603. ImageColor3 = Color3.fromRGB(255, 255, 255),
  604. ZIndex = 4
  605. }),
  606. Create("ImageButton", {
  607. Name = "Decline",
  608. BackgroundTransparency = 1,
  609. Position = UDim2.new(1, -26, 1, -24),
  610. Size = UDim2.new(0, 16, 0, 16),
  611. Image = "rbxassetid://5012538583",
  612. ImageColor3 = Color3.fromRGB(255, 255, 255),
  613. ZIndex = 4
  614. })
  615. })
  616.  
  617.  
  618. -- position and size
  619. title = title or "Notification"
  620. text = text or ""
  621.  
  622. notification.Title.Text = title
  623. notification.Text.Text = text
  624.  
  625. local padding = 10
  626. local textSize = game:GetService("TextService"):GetTextSize(text, 12, Enum.Font.Gotham, Vector2.new(math.huge, 16))
  627.  
  628. notification.Position = UDim2.new(0, padding, 1, -(notification.AbsoluteSize.Y + padding))
  629. notification.Size = UDim2.new(0, 0, 0, 60)
  630.  
  631. Tween(notification, {Size = UDim2.new(0, textSize.X + 70, 0, 60)}, 0.2)
  632. wait(0.2)
  633.  
  634. notification.ClipsDescendants = false
  635. Tween(notification.Flash, {
  636. Size = UDim2.new(0, 0, 0, 60),
  637. Position = UDim2.new(1, 0, 0, 0)
  638. }, 0.2)
  639.  
  640. -- callbacks
  641. local active = true
  642. local close = function()
  643.  
  644. if not active then
  645. return
  646. end
  647.  
  648. active = false
  649. notification.ClipsDescendants = true
  650.  
  651.  
  652. notification.Flash.Position = UDim2.new(0, 0, 0, 0)
  653. Tween(notification.Flash, {Size = UDim2.new(1, 0, 1, 0)}, 0.2)
  654.  
  655. wait(0.2)
  656. Tween(notification, {
  657. Size = UDim2.new(0, 0, 0, 60),
  658. Position = notification.Position + UDim2.new(0, textSize.X + 70, 0, 0)
  659. }, 0.2)
  660.  
  661. wait(0.2)
  662. notification:Destroy()
  663. end
  664.  
  665.  
  666.  
  667. notification.Accept.MouseButton1Click:Connect(function()
  668.  
  669. if not active then
  670. return
  671. end
  672.  
  673. if callback then
  674. callback(true)
  675. end
  676.  
  677. close()
  678. end)
  679.  
  680. notification.Decline.MouseButton1Click:Connect(function()
  681.  
  682. if not active then
  683. return
  684. end
  685.  
  686. if callback then
  687. callback(false)
  688. end
  689.  
  690. close()
  691. end)
  692. end
  693.  
  694. function InnerLib:CreateDropdown(text, list, callback)
  695. callback = callback or function() end
  696. list = list or {}
  697. text = text or "New Dropdown"
  698.  
  699. local isDropped = false
  700.  
  701. local dropdownBtn = Instance.new("TextButton")
  702. local buttonCorner = Instance.new("UICorner")
  703. local UIListLayout = Instance.new("UIListLayout")
  704. local listFrame = Instance.new("Frame")
  705. local UICorner = Instance.new("UICorner")
  706. local ListButton = Instance.new("TextButton")
  707. local UIListLayout = Instance.new("UIListLayout")
  708.  
  709. dropdownBtn.Name = "dropdownBtn"
  710. dropdownBtn.Parent = newPage
  711. dropdownBtn.BackgroundColor3 = Color3.fromRGB(42, 43, 49)
  712. dropdownBtn.Size = UDim2.new(0, 357, 0, 37)
  713. dropdownBtn.Font = Enum.Font.Gotham
  714. dropdownBtn.Text = text
  715. dropdownBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
  716. dropdownBtn.TextSize = 14.000
  717.  
  718. buttonCorner.CornerRadius = UDim.new(0, 3)
  719. buttonCorner.Name = "buttonCorner"
  720. buttonCorner.Parent = dropdownBtn
  721.  
  722. listFrame.Name = "listFrame"
  723. listFrame.Parent = MainFrame
  724. listFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  725. listFrame.BackgroundColor3 = Color3.fromRGB(22, 23, 27)
  726. listFrame.BorderColor3 = Color3.fromRGB(27, 42, 53)
  727. listFrame.BorderSizePixel = 0
  728. listFrame.Position = UDim2.new(1.15415907, 0, 0.5, 0)
  729. listFrame.Size = UDim2.new(0, 141, 0, 360)
  730. listFrame.Visible = false
  731. listFrame.ClipsDescendants = true
  732. listFrame.BackgroundTransparency = 1
  733.  
  734. UICorner.CornerRadius = UDim.new(0, 5)
  735. UICorner.Parent = listFrame
  736.  
  737. UIListLayout.Parent = listFrame
  738. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  739.  
  740. dropdownBtn.MouseButton1Click:Connect(function()
  741. if isDropped then
  742. isDropped = false
  743. listFrame.Size = UDim2.new(0, 141, 0, 0)
  744. listFrame.Visible = false
  745. game.TweenService:Create(dropdownBtn, TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {
  746. BackgroundColor3 = Color3.fromRGB(42, 43, 49)
  747. }):Play()
  748. else
  749. isDropped = true
  750. listFrame.Size = UDim2.new(0, 141, 0, 360)
  751. listFrame.Visible = true
  752. game.TweenService:Create(dropdownBtn, TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {
  753. BackgroundColor3 = _G.Themes.Glow
  754. }):Play()
  755. end
  756. end)
  757.  
  758.  
  759.  
  760. for i,v in next, list do
  761. local ListButton = Instance.new("TextButton")
  762.  
  763. ListButton.Name = "ListButton"
  764. ListButton.Parent = listFrame
  765. ListButton.BackgroundColor3 = Color3.fromRGB(22, 23, 27)
  766. ListButton.BorderColor3 = _G.Themes.Glow
  767. ListButton.BorderSizePixel = 0
  768. ListButton.Size = UDim2.new(0, 141, 0, 28)
  769. ListButton.Font = Enum.Font.Gotham
  770. ListButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  771. ListButton.TextSize = 14.000
  772. ListButton.ZIndex = 10
  773. ListButton.Text = v
  774.  
  775. ListButton.MouseButton1Click:Connect(function()
  776. dropdownBtn.Text = text..": "..v
  777. callback(v)
  778. end)
  779. end
  780. end
  781.  
  782. return InnerLib
  783. end
  784. return TabHandler
  785. end
  786.  
  787. return Note
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement