Advertisement
MaxproGlitcher

Guid notif menu by Max

Aug 30th, 2022 (edited)
9,302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.22 KB | None | 0 0
  1. local NotificationTable = {};
  2. local Done = true;
  3. local TweenService = game:GetService("TweenService");
  4. local TemplateName = {}
  5.  
  6. local function Debug(...)
  7. if getgenv().DebugEnabled and game:GetService("Players").LocalPlayer then
  8. rconsolename("Data".."_"..tostring(game.PlaceId))
  9. local Args = {...}
  10. local Str = "";
  11. for _,Arg in next, Args do
  12. Str = Str .. " " ..tostring(Arg)
  13. end
  14. rconsolewarn(Str)
  15. wait(1.5)
  16. end
  17. end
  18.  
  19. local function CheckAd()
  20. if getgenv then
  21. if not getgenv()["zenyaiscute"] then
  22. getgenv()["zenyaiscute"] = true;
  23. NotificationTable.Notify("Alert!"," créateur <b><font color=\"rgb(255,255,255)\">MaxproGlitcher</font></b> sur Roblox.", "rbxassetid://11823384169", {
  24. Duration = 7,
  25. TitleSettings = {
  26. TextXAlignment = Enum.TextXAlignment.Center,
  27. Font = Enum.Font.SourceSansSemibold,
  28. },
  29.  
  30. GradientSettings = {
  31. GradientEnabled = false,
  32. SolidColorEnabled = true,
  33. SolidColor = Color3.fromRGB(255, 255, 255),
  34. Retract = true
  35. }
  36. })
  37. wait(.3)
  38. NotificationTable.Notify("Notifications", "By MaxproGlitcher", "rbxassetid://11823384169", {
  39. Duration = 7,
  40. TitleSettings = {
  41. TextXAlignment = Enum.TextXAlignment.Center,
  42. Font = Enum.Font.SourceSansSemibold,
  43. },
  44.  
  45. GradientSettings = {
  46. GradientEnabled = false,
  47. SolidColorEnabled = true,
  48. SolidColor = Color3.fromRGB(255, 255, 255),
  49. Retract = true
  50. }
  51. })
  52. end
  53. else
  54. if not _G["zenyaiscute"] then
  55. _G["zenyaiscute"] = true;
  56. NotificationTable.Notify("Alert!", "If this script is not loading dm <b><font color=\"rgb(255,255,255)\"MaxproGlitcher#6199</font></b> on discord", "rbxassetid://11823384169", {
  57. Duration = 7,
  58. TitleSettings = {
  59. TextXAlignment = Enum.TextXAlignment.Center,
  60. Font = Enum.Font.SourceSansSemibold,
  61. },
  62.  
  63. GradientSettings = {
  64. GradientEnabled = false,
  65. SolidColorEnabled = true,
  66. SolidColor = Color3.fromRGB(255, 255, 255),
  67. Retract = true
  68. }
  69. })
  70. wait(.3)
  71. NotificationTable.Notify("Notifications", "Beaucoup nouveauté arrive très bientôt, Script, etc..", "rbxassetid://11823384169", {
  72. Duration = 7,
  73. TitleSettings = {
  74. TextXAlignment = Enum.TextXAlignment.Center,
  75. Font = Enum.Font.SourceSansSemibold,
  76. },
  77.  
  78. GradientSettings = {
  79. GradientEnabled = false,
  80. SolidColorEnabled = true,
  81. SolidColor = Color3.fromRGB(255, 255, 255),
  82. Retract = true
  83. }
  84. })
  85. end
  86. end
  87. wait()
  88. end
  89.  
  90. local function CreateNormalNotificationArguments()
  91. local ArgFour = {
  92. Duration = 4,
  93.  
  94. TitleSettings = {
  95. BackgroundColor3 = Color3.fromRGB(200, 200 ,200),
  96. TextColor3 = Color3.fromRGB(240, 240, 240),
  97. TextScaled = true,
  98. TextWrapped = true,
  99. TextSize = 18.000,
  100. Font = Enum.Font.SourceSansBold,
  101. TextXAlignment = Enum.TextXAlignment.Left,
  102. TextYAlignment = Enum.TextYAlignment.Center
  103. },
  104.  
  105. DescriptionSettings = {
  106. BackgroundColor3 = Color3.fromRGB(200, 200 ,200),
  107. TextColor3 = Color3.fromRGB(240, 240, 240),
  108. TextScaled = true,
  109. TextWrapped = true,
  110. TextSize = 14.000,
  111. Font = Enum.Font.SourceSans,
  112. TextXAlignment = Enum.TextXAlignment.Left,
  113. TextYAlignment = Enum.TextYAlignment.Top,
  114. },
  115.  
  116. IconSettings = {
  117. BackgroundTransparency = 1,
  118. BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  119. },
  120.  
  121. GradientSettings = {
  122. GradientEnabled = true,
  123. SolidColorEnabled = false,
  124. SolidColor = Color3.fromRGB(0,255,255),
  125. Retract = false,
  126. Extend = false
  127. },
  128.  
  129. Main = {
  130. BorderColor3 = Color3.fromRGB(255, 255, 255),
  131. BackgroundColor3 = Color3.fromRGB(30, 30, 30),
  132. BackgroundTransparency = 0.050,
  133. Rounding = true,
  134. BorderSizePixel = 1
  135. }
  136. }
  137.  
  138. return ArgFour;
  139. end
  140.  
  141. local function RandomName(Size)
  142. local String = "";
  143. local Alphabet = {"{","}","[","]","(",")","/","\\","'","\"","`","~",",",";",":",".","<",">","@","#","$","%","1","2","3","4","5","6","7","8","9","0","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"}
  144.  
  145. for i = 1, Size do
  146. String = String .. Alphabet[math.random(#Alphabet)]
  147. end
  148.  
  149. return String;
  150. end
  151.  
  152. local NotificationFolder = Instance.new("Folder");
  153.  
  154. NotificationTable.CreateNotification = function(TitleData, Text, Image, Settings)
  155.  
  156. Debug("CREATED_",TitleData, Text, Image, Settings)
  157. local Duration = Settings.Duration;
  158. local TitleSettings = Settings.TitleSettings;
  159. local DescriptionSettings = Settings.DescriptionSettings;
  160. local IconSettings = Settings.IconSettings;
  161. local GradientSettings = Settings.GradientSettings;
  162. local MainSettings = Settings.Main;
  163.  
  164. Debug("Running Parent")
  165. if getgenv then
  166. Debug("GetGenv Detected")
  167. if (game:GetService("CoreGui"):FindFirstChild("RobloxGui"):FindFirstChild("NotificationFrame"):FindFirstChild("NotificationFolder")) then
  168. Debug("NotifFolder Detected")
  169. NotificationFolder = game:GetService("CoreGui"):FindFirstChild("RobloxGui"):FindFirstChild("NotificationFrame"):FindFirstChild("NotificationFolder");
  170. else
  171. Debug("Creating NotifFolder")
  172. NotificationFolder.Name = "NotificationFolder"
  173. NotificationFolder.Parent = game:GetService("CoreGui"):FindFirstChild("RobloxGui"):FindFirstChild("NotificationFrame");
  174. end
  175. else
  176. Debug("Roblox Client Detected")
  177. if (game:GetService("Players").LocalPlayer.PlayerGui:FindFirstChild("NotificationFolder")) then
  178. NotificationFolder = game:GetService("Players").LocalPlayer.PlayerGui:FindFirstChild("NotificationFolder");
  179. else
  180. NotificationFolder.Name = "NotificationFolder"
  181. NotificationFolder.Parent = game:GetService("Players").LocalPlayer.PlayerGui;
  182. end
  183. end
  184.  
  185. Debug("Creating Notif Instances")
  186. local Notification = Instance.new("ScreenGui")
  187. local _Template = Instance.new("Frame")
  188. local Icon = Instance.new("ImageLabel")
  189. local UIAspectRatioConstraint = Instance.new("UIAspectRatioConstraint")
  190. local Title = Instance.new("TextLabel")
  191. local TextLabel = Instance.new("TextLabel")
  192. local UICorner = Instance.new("UICorner")
  193. local Frame = Instance.new("Frame")
  194. local UIGradient = Instance.new("UIGradient")
  195.  
  196.  
  197. Debug("Setting main Parent/Name")
  198. Notification.Name = RandomName(15)
  199. Debug("Main 1/4")
  200.  
  201. if hookmetamethod then
  202. local a;a=hookmetamethod(game,"__index",function(...)local self,b=...if self==Notification and not checkcaller()then if tostring(b)=="Name"then return"CoreGui"end end;return a(...)end)
  203. end
  204.  
  205. Notification.Parent = NotificationFolder
  206. Debug("Main 2/4")
  207. Notification.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  208. Debug("Main 3/4")
  209. Notification.Enabled = true;
  210. Debug("Main 4/4")
  211.  
  212. if getgenv().DevBuild then
  213. TemplateName[_Template] = RandomName(15) .. "_";
  214. _Template.Name = TemplateName[_Template]
  215. else
  216. _Template.Name = "_Template";
  217. end
  218. Debug("_Temp 1/9")
  219. _Template.BackgroundColor3 = MainSettings.BackgroundColor3
  220. Debug("_Temp 2/9")
  221. _Template.BackgroundTransparency = MainSettings.BackgroundTransparency
  222. Debug("_Temp 3/9")
  223. _Template.BorderColor3 = MainSettings.BorderColor3
  224. Debug("_Temp 4/9")
  225. _Template.Position = UDim2.new(0.713929176, 0, 0.587826073, 0)
  226. Debug("_Temp 5/9")
  227. _Template.Size = UDim2.new(0, 270, 0, 64)
  228. Debug("_Temp 6/9")
  229. _Template.ZIndex = 9
  230. Debug("_Temp 7/9")
  231. _Template.Visible = false;
  232. Debug("_Temp 8/9")
  233. _Template.Parent = Notification
  234. Debug("_Temp 9/9")
  235. Debug("_Temp finished")
  236.  
  237. Icon.Name = "Icon"
  238. Icon.Parent = _Template
  239. Icon.BackgroundColor3 = IconSettings.BackgroundColor3
  240. Icon.BackgroundTransparency = IconSettings.BackgroundTransparency
  241. Icon.Position = UDim2.new(0.0277603213, 0, 0.182097465, 0)
  242. Icon.Size = UDim2.new(0, 40, 0, 40)
  243. Icon.Image = Image
  244. Debug("Icon finished")
  245.  
  246. UIAspectRatioConstraint.Parent = Icon
  247. Debug("UiAspect finished")
  248.  
  249. Title.Name = "Title"
  250. Title.Parent = _Template
  251. Title.BackgroundTransparency = 1.000
  252. Title.Position = UDim2.new(0, 63, 0, 2)
  253. Title.Size = UDim2.new(0, 129, 0, 21)
  254. Title.Text = TitleData
  255. Title.TextColor3 = TitleSettings.TextColor3
  256. Title.TextScaled = TitleSettings.TextScaled
  257. Title.TextSize = TitleSettings.TextSize
  258. Title.TextWrapped = TitleSettings.TextWrapped
  259. Title.TextXAlignment = TitleSettings.TextXAlignment
  260. Title.TextYAlignment = TitleSettings.TextYAlignment
  261. Title.Font = TitleSettings.Font
  262. Title.BackgroundColor3 = TitleSettings.BackgroundColor3
  263. Title.RichText = true
  264. Debug("Title finished")
  265.  
  266. TextLabel.Parent = _Template
  267. TextLabel.BackgroundColor3 = DescriptionSettings.BackgroundColor3
  268. TextLabel.BackgroundTransparency = 1.000
  269. TextLabel.Position = UDim2.new(0, 63, 0, 23)
  270. TextLabel.Size = UDim2.new(0, 178, 0, 35)
  271. TextLabel.Text = Text
  272. TextLabel.TextColor3 = DescriptionSettings.TextColor3
  273. TextLabel.TextScaled = DescriptionSettings.TextScaled
  274. TextLabel.TextSize = DescriptionSettings.TextSize
  275. TextLabel.TextWrapped = DescriptionSettings.TextWrapped
  276. TextLabel.TextXAlignment = DescriptionSettings.TextXAlignment
  277. TextLabel.TextYAlignment = DescriptionSettings.TextYAlignment
  278. TextLabel.Font = DescriptionSettings.Font
  279. TextLabel.BackgroundColor3 = DescriptionSettings.BackgroundColor3
  280. TextLabel.RichText = true
  281. Debug("TextLanel finished")
  282.  
  283. if MainSettings.Rounding then
  284. UICorner.Parent = _Template
  285. end
  286. Debug("Rounding finished")
  287.  
  288. Frame.Parent = _Template
  289. Frame.BorderSizePixel = 0
  290. Frame.Position = UDim2.new(0,0,1,-3)
  291. Frame.Size = UDim2.new(0, 263, 0, 3)
  292. Frame.Visible = false;
  293. Debug("Frame finished")
  294.  
  295. UIGradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 8, 231)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(64, 0, 255))}
  296. UIGradient.Parent = Frame
  297. Debug("Gradient finished")
  298.  
  299. if GradientSettings.GradientEnabled then
  300. Frame.Visible = true
  301. elseif GradientSettings.SolidColor then
  302. UIGradient:Destroy();
  303. Frame.BackgroundColor3 = GradientSettings.SolidColor
  304. Frame.Visible = true
  305. end
  306.  
  307. Debug("Returning Objects")
  308. return {_Template, Duration, GradientSettings.Retract, GradientSettings.Extend};
  309. end
  310.  
  311. NotificationTable.InsertNotification = function(Notification, Duration, Retracting, Extending)
  312. Debug("Insert Called, waiting to run")
  313. repeat game:GetService("RunService").Heartbeat:Wait() until Done;
  314.  
  315. local ShowPosition = UDim2.new(1, -280, 1, -70 * #NotificationFolder:GetChildren() - 1);
  316. local HidePosition = UDim2.new(1, 0, 1, 0);
  317.  
  318. Notification.Position = HidePosition;
  319. Notification.Visible = true;
  320.  
  321. local TweenInfData = TweenInfo.new(0.4);
  322. local TweenInfData2 = TweenInfo.new(Duration);
  323.  
  324. TweenService:Create(Notification, TweenInfData, {
  325. Position = ShowPosition
  326. }):Play();
  327.  
  328. if (Retracting) then
  329.  
  330. TweenService:Create(Notification.Frame, TweenInfData2, {
  331. Size = UDim2.new(0, 0, 0, 3)
  332. }):Play();
  333. elseif (Extending) then
  334. Notification.Frame.Size = UDim2.new(0, 0, 0, 3);
  335.  
  336. TweenService:Create(Notification.Frame, TweenInfData2, {
  337. Size = UDim2.new(0, 263, 0, 3)
  338. }):Play();
  339. end
  340.  
  341. wait(TweenInfData2.Time);
  342. wait(TweenInfData.Time);
  343.  
  344. Done = false
  345. local Tween = TweenService:Create(Notification, TweenInfData, {
  346. Position = HidePosition
  347. })
  348.  
  349. Tween.Completed:Connect(function(State)
  350. if State == Enum.PlaybackState.Completed then
  351. Notification.Parent:Destroy();
  352. Done = true
  353. end
  354. end)
  355.  
  356. Tween:Play();
  357. end
  358.  
  359. NotificationTable.Notify = function(...)
  360. CheckAd();
  361. coroutine.wrap(function(...)
  362. local Args = {...};
  363.  
  364. Debug("Notif started")
  365. assert(#Args < 5, "Error: Too many arguments for Notify | Expected 3 : 4");
  366. assert(#Args > 2, "Error: Too little arguments for Notify | Expected 3 : 4")
  367.  
  368. Debug("Notif started", "Fixing Args")
  369. for Index,Argument in next, Args do
  370. if Index ~= 4 then
  371. Args[Index] = tostring(Argument);
  372. end
  373. end
  374.  
  375.  
  376. Debug("Arg 3 reset")
  377. if (#Args == 3) then
  378. Args[4] = CreateNormalNotificationArguments();
  379. end
  380.  
  381. Debug("Arg 5 reset")
  382. Args[5] = CreateNormalNotificationArguments();
  383.  
  384. Debug("Settings set")
  385. if (type(Args[4]) ~= "table") then
  386. warn("Settings table malformed, please make sure you have the exact table copied! { ARG4_INVALID_TABLE }");
  387. Args[4] = CreateNormalNotificationArguments();
  388. end
  389.  
  390. for Property, Value in next, Args[4] do
  391. if type(Value) == "table" then
  392. for SubProperty, SubValue in next, Value do
  393. Args[5][Property][SubProperty] = SubValue;
  394. end
  395. else
  396. Args[5][Property] = Value
  397. end
  398. end
  399.  
  400. Debug("Settings set done")
  401.  
  402. local NotifFrame = NotificationTable.CreateNotification(Args[1], Args[2], Args[3], Args[5]);
  403.  
  404. Debug("Finished creating", "Inserting")
  405. NotificationTable.InsertNotification(NotifFrame[1], NotifFrame[2], NotifFrame[3], NotifFrame[4]);
  406. Debug("Finished Inserting")
  407. end)(...)
  408. end
  409.  
  410. -- { Wall Notifications } --
  411.  
  412. local WallNotificationFolder = Instance.new("Folder");
  413.  
  414. local function CreateWallArgs()
  415. local ArgThree = {
  416. Duration = 5,
  417.  
  418. MainSettings = {
  419. Orientation = "Middle",
  420. VisibleSize = UDim2.new(0.96981132, 0, 0.947604775, 0);
  421. HiddenSize = UDim2.new(0, 0, 0.947604775, 0),
  422. TweenTime = 0.8
  423. },
  424.  
  425. TitleSettings = {
  426. Enabled = true,
  427. BackgroundColor3 = Color3.fromRGB(200, 200 ,200),
  428. TextColor3 = Color3.fromRGB(240, 240, 240),
  429. TextScaled = true,
  430. TextWrapped = true,
  431. TextSize = 18.000,
  432. Font = Enum.Font.SourceSansBold,
  433. TextXAlignment = Enum.TextXAlignment.Center,
  434. TextYAlignment = Enum.TextYAlignment.Center
  435. },
  436.  
  437. DescriptionSettings = {
  438. BackgroundColor3 = Color3.fromRGB(200, 200 ,200),
  439. TextColor3 = Color3.fromRGB(240, 240, 240),
  440. TextScaled = true,
  441. TextWrapped = true,
  442. TextSize = 14.000,
  443. Font = Enum.Font.SourceSans,
  444. TextXAlignment = Enum.TextXAlignment.Center,
  445. TextYAlignment = Enum.TextYAlignment.Center
  446. }
  447. };
  448. return ArgThree;
  449. end
  450.  
  451. NotificationTable.CreateWallNotification = function(TitleText, DescriptionText, Settings)
  452.  
  453. local Duration = Settings.Duration;
  454. local TitleSettings = Settings.TitleSettings;
  455. local DescriptionSettings = Settings.DescriptionSettings;
  456. local MainSettings = Settings.MainSettings;
  457.  
  458. if getgenv then
  459. if (game:GetService("CoreGui"):FindFirstChild("RobloxGui"):FindFirstChild("WallNotificationFolder")) then
  460. WallNotificationFolder = game:GetService("CoreGui"):FindFirstChild("RobloxGui"):FindFirstChild("WallNotificationFolder");
  461. else
  462. WallNotificationFolder.Name = "WallNotificationFolder"
  463. WallNotificationFolder.Parent = game:GetService("CoreGui"):FindFirstChild("RobloxGui");
  464. end
  465. else
  466. if (game:GetService("Players").LocalPlayer.PlayerGui:FindFirstChild("WallNotificationFolder")) then
  467. WallNotificationFolder = game:GetService("Players").LocalPlayer.PlayerGui:FindFirstChild("WallNotificationFolder");
  468. else
  469. WallNotificationFolder.Name = "WallNotificationFolder"
  470. WallNotificationFolder.Parent = game:GetService("Players").LocalPlayer.PlayerGui;
  471. end
  472. end
  473.  
  474. local WallNotification = Instance.new("ScreenGui")
  475. local Main = Instance.new("Frame")
  476. local Title = Instance.new("TextLabel")
  477. local Description = Instance.new("TextLabel")
  478.  
  479. WallNotification.Name = "Notification"
  480. WallNotification.Parent = WallNotificationFolder
  481. WallNotification.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  482. WallNotification.Enabled = true;
  483.  
  484. Main.Name = "Main"
  485. Main.Parent = WallNotification
  486. Main.AnchorPoint = Vector2.new(0.5, 0.5)
  487. Main.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  488. Main.BackgroundTransparency = 0.200
  489. Main.BorderColor3 = Color3.fromRGB(255, 255, 255)
  490. Main.Position = UDim2.new(0.5, 0, 0.5, 0)
  491. Main.Size = MainSettings.HiddenSize;
  492.  
  493. Title.Name = "Title"
  494. Title.Parent = Main
  495. Title.BackgroundTransparency = 1.000
  496. Title.Position = UDim2.new(0.267834008, 0, 0.0142180091, 0)
  497. Title.Size = UDim2.new(0.463035017, 0, 0.0805396363, 0)
  498. Title.Text = TitleText
  499. Title.TextColor3 = TitleSettings.TextColor3
  500. Title.TextScaled = TitleSettings.TextScaled
  501. Title.TextSize = TitleSettings.TextSize
  502. Title.TextWrapped = TitleSettings.TextWrapped
  503. Title.TextXAlignment = TitleSettings.TextXAlignment
  504. Title.TextYAlignment = TitleSettings.TextYAlignment
  505. Title.Font = TitleSettings.Font
  506. Title.BackgroundColor3 = TitleSettings.BackgroundColor3
  507. Title.Visible = TitleSettings.Enabled
  508. Title.RichText = true
  509.  
  510. Description.Name = "Description"
  511. Description.Parent = Main
  512. Description.BackgroundTransparency = 1.000
  513. Description.Position = UDim2.new(0.0149156936, 0, 0.127962083, 0)
  514. Description.Size = UDim2.new(0.969520092, 0, 0.830963671, 0)
  515. Description.Text = DescriptionText
  516. Description.TextColor3 = DescriptionSettings.TextColor3
  517. Description.TextScaled = DescriptionSettings.TextScaled
  518. Description.TextSize = DescriptionSettings.TextSize
  519. Description.TextWrapped = DescriptionSettings.TextWrapped
  520. Description.TextXAlignment = DescriptionSettings.TextXAlignment
  521. Description.TextYAlignment = DescriptionSettings.TextYAlignment
  522. Description.Font = DescriptionSettings.Font
  523. Description.BackgroundColor3 = DescriptionSettings.BackgroundColor3
  524. Description.RichText = true
  525.  
  526. Main.Visible = false;
  527.  
  528. return {Main, Duration, MainSettings};
  529. end
  530.  
  531. NotificationTable.InsertWallNotification = function(Notification, Duration, SettingsTable)
  532. local ShowSize = SettingsTable.VisibleSize;
  533. local HiddenSize = SettingsTable.HiddenSize;
  534. local PositionType = SettingsTable.Orientation;
  535. local TweenInfData = TweenInfo.new(SettingsTable.TweenTime);
  536.  
  537. if PositionType == "Top" then
  538. Notification.Visible = true;
  539. Notification.Size = ShowSize;
  540. Notification.Position = UDim2.new(Notification.Position.X.Scale, Notification.Position.X.Offset, 0, -(Notification.Parent.AbsoluteSize.Y / 2) - 25)
  541.  
  542. TweenService:Create(Notification, TweenInfData, {
  543. Position = UDim2.new(.5, 0, .5, 0)
  544. }):Play()
  545.  
  546. wait(TweenInfData.Time + Duration);
  547.  
  548. TweenService:Create(Notification, TweenInfData, {
  549. Position = UDim2.new(Notification.Position.X.Scale, Notification.Position.X.Offset, 0, -(Notification.Parent.AbsoluteSize.Y / 2) - 25)
  550. }):Play();
  551.  
  552. wait(TweenInfData.Time);
  553. elseif PositionType == "Left" then
  554. Notification.Visible = true;
  555. Notification.Size = ShowSize;
  556. Notification.Position = UDim2.new(0, -(Notification.Parent.AbsoluteSize.X / 2), Notification.Position.Y.Scale, Notification.Position.Y.Offset)
  557.  
  558. TweenService:Create(Notification, TweenInfData, {
  559. Position = UDim2.new(.5, 0, .5, 0)
  560. }):Play()
  561.  
  562. wait(TweenInfData.Time + Duration);
  563.  
  564. TweenService:Create(Notification, TweenInfData, {
  565. Position = UDim2.new(0, -(Notification.Parent.AbsoluteSize.X / 2), Notification.Position.Y.Scale, Notification.Position.Y.Offset)
  566. }):Play();
  567.  
  568. wait(TweenInfData.Time);
  569. elseif PositionType == "Right" then
  570. Notification.Visible = true;
  571. Notification.Size = ShowSize;
  572. Notification.Position = UDim2.new(0, Notification.Parent.AbsoluteSize.X + Notification.AbsoluteSize.X / 2, Notification.Position.Y.Scale, Notification.Position.Y.Offset)
  573.  
  574. TweenService:Create(Notification, TweenInfData, {
  575. Position = UDim2.new(.5, 0, .5, 0)
  576. }):Play()
  577.  
  578. wait(TweenInfData.Time + Duration);
  579.  
  580. TweenService:Create(Notification, TweenInfData, {
  581. Position = UDim2.new(0, Notification.Parent.AbsoluteSize.X + Notification.AbsoluteSize.X / 2, Notification.Position.Y.Scale, Notification.Position.Y.Offset)
  582. }):Play();
  583.  
  584. wait(TweenInfData.Time);
  585.  
  586. elseif PositionType == "Bottom" then
  587. Notification.Visible = true;
  588. Notification.Size = ShowSize;
  589. Notification.Position = UDim2.new(Notification.Position.X.Scale, Notification.Position.X.Offset, 0, Notification.Parent.AbsoluteSize.Y + (Notification.AbsoluteSize.Y / 2))
  590.  
  591. TweenService:Create(Notification, TweenInfData, {
  592. Position = UDim2.new(.5, 0, .5, 0)
  593. }):Play()
  594.  
  595. wait(TweenInfData.Time + Duration);
  596.  
  597. TweenService:Create(Notification, TweenInfData, {
  598. Position = UDim2.new(Notification.Position.X.Scale, Notification.Position.X.Offset, 0, Notification.Parent.AbsoluteSize.Y + (Notification.AbsoluteSize.Y / 2))
  599. }):Play();
  600.  
  601. wait(TweenInfData.Time);
  602.  
  603. elseif PositionType == "Middle" then
  604. Notification.Visible = true;
  605.  
  606. TweenInfData = TweenInfo.new(.8);
  607.  
  608. TweenService:Create(Notification, TweenInfData, {
  609. Size = ShowSize
  610. }):Play();
  611.  
  612. wait(TweenInfData.Time + Duration);
  613.  
  614. TweenService:Create(Notification, TweenInfData, {
  615. Size = HiddenSize
  616. }):Play();
  617.  
  618. wait(TweenInfData.Time);
  619. end
  620.  
  621. Notification.Parent:Destroy();
  622. end
  623.  
  624. NotificationTable.WallNotification = function(...)
  625. CheckAd();
  626. coroutine.wrap(function(...)
  627. local Args = {...};
  628.  
  629. assert(#Args < 4, "Error: Too many arguments for WallNotification | Expected 2 : 3");
  630. assert(#Args > 1, "Error: Too little arguments for WallNotification | Expected 2 : 3")
  631.  
  632. for Index,Argument in next, Args do
  633. if Index ~= 3 then
  634. Args[Index] = tostring(Argument);
  635. end
  636. end
  637.  
  638. if (#Args == 2) then
  639. Args[3] = CreateWallArgs();
  640. end
  641.  
  642. Args[4] = CreateWallArgs();
  643.  
  644. if (type(Args[3]) ~= "table") then
  645. warn("Settings table malformed, please make sure you have the exact table copied! { ARG4_INVALID_TABLE }");
  646. Args[3] = CreateWallArgs();
  647. end
  648.  
  649. for Property, Value in next, Args[3] do
  650. if type(Value) == "table" then
  651. for SubProperty, SubValue in next, Value do
  652. Args[4][Property][SubProperty] = SubValue;
  653. end
  654. else
  655. Args[4][Property] = Value
  656. end
  657. end
  658.  
  659.  
  660. local NotifFrame = NotificationTable.CreateWallNotification(Args[1], Args[2], Args[4]);
  661.  
  662. NotificationTable.InsertWallNotification(NotifFrame[1], NotifFrame[2], NotifFrame[3]);
  663. end)(...)
  664. end
  665.  
  666. NotificationTable.ClearOverride = function()
  667. CheckAd();
  668. for _, Folder in next, game:GetService("CoreGui"):FindFirstChild("RobloxGui"):GetChildren() do
  669. if Folder.Name:match("NotificationFolder") or Folder.Name:match("WallNotificationFolder") then
  670. Folder:Destroy();
  671. end
  672. end
  673. for _, Folder in next, game:GetService("Players").LocalPlayer.PlayerGui:GetChildren() do
  674. if Folder.Name:match("NotificationFolder") or Folder.Name:match("WallNotificationFolder") then
  675. Folder:Destroy();
  676. end
  677. end
  678. end
  679.  
  680. return NotificationTable;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement