Advertisement
Marty2000

Cool Notification Library

Apr 17th, 2024
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.57 KB | None | 0 0
  1. local NotificationLibrary = {}
  2.  
  3. local AbyssGUI = Instance.new("ScreenGui"); AbyssGUI.Name = "Abyss"; AbyssGUI.Parent = game.CoreGui; AbyssGUI.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  4.  
  5. function NotificationLibrary:Success(TitleText, Desc, Delay)
  6. local Notification = Instance.new("Frame")
  7. local Line = Instance.new("Frame")
  8. local Warning = Instance.new("ImageLabel")
  9. local UICorner = Instance.new("UICorner")
  10. local Title = Instance.new("TextLabel")
  11. local Description = Instance.new("TextLabel")
  12.  
  13. Notification.Name = "Notification"
  14. Notification.Parent = AbyssGUI
  15. Notification.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  16. Notification.BackgroundTransparency = 0.400
  17. Notification.BorderSizePixel = 0
  18. Notification.Position = UDim2.new(1, 5, 0, 75)
  19. Notification.Size = UDim2.new(0, 450, 0, 60)
  20.  
  21. Line.Name = "Line"
  22. Line.Parent = Notification
  23. Line.BackgroundColor3 = Color3.fromRGB(241, 196, 15)
  24. Line.BorderSizePixel = 0
  25. Line.Position = UDim2.new(0, 0, 0.938461304, 0)
  26. Line.Size = UDim2.new(0, 0, 0, 4)
  27.  
  28. Warning.Name = "Warning"
  29. Warning.Parent = Notification
  30. Warning.BackgroundTransparency = 1.000
  31. Warning.Position = UDim2.new(0.0258302614, 0, 0.0897435844, 0)
  32. Warning.Size = UDim2.new(0, 44, 0, 49)
  33. Warning.Image = "rbxassetid://17174789239"
  34. Warning.ImageColor3 = Color3.fromRGB(241, 196, 15)
  35. Warning.ScaleType = Enum.ScaleType.Fit
  36.  
  37. UICorner.CornerRadius = UDim.new(0, 20)
  38. UICorner.Parent = Warning
  39.  
  40. Title.Name = "Title"
  41. Title.Parent = Notification
  42. Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  43. Title.BackgroundTransparency = 1.000
  44. Title.Position = UDim2.new(0.161, 0, 0.155, 0)
  45. Title.Size = UDim2.new(0, 205, 0, 15)
  46. Title.Text = TitleText
  47. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  48. Title.TextSize = 12.000
  49. Title.TextStrokeTransparency = 1
  50. Title.TextXAlignment = Enum.TextXAlignment.Left
  51.  
  52. Description.Name = "Description"
  53. Description.Parent = Notification
  54. Description.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  55. Description.BackgroundTransparency = 1.000
  56. Description.Position = UDim2.new(0.161, 0, 0.483, 0)
  57. Description.Size = UDim2.new(0, 205, 0, 18)
  58. Description.Text = Desc
  59. Description.TextColor3 = Color3.fromRGB(199, 199, 199)
  60. Description.TextSize = 12.000
  61. Description.TextStrokeTransparency = 1
  62. Description.TextXAlignment = Enum.TextXAlignment.Left
  63. Notification:TweenPosition(UDim2.new(1, -400, 0, 75), "Out", "Sine", 0.35)
  64. wait(0.35)
  65. Line:TweenSize(UDim2.new(0, 450, 0, 4), "Out", "Linear", Delay)
  66. wait(Delay)
  67. Notification:TweenPosition(UDim2.new(1, 5, 0, 75), "Out", "Sine", 0.35)
  68. wait(0.35)
  69. Notification:Destroy()
  70. end
  71.  
  72. function NotificationLibrary:Warning(TitleText, Desc, Delay)
  73. local Notification = Instance.new("Frame")
  74. local Line = Instance.new("Frame")
  75. local Warning = Instance.new("ImageLabel")
  76. local UICorner = Instance.new("UICorner")
  77. local Title = Instance.new("TextLabel")
  78. local Description = Instance.new("TextLabel")
  79.  
  80. Notification.Name = "Notification"
  81. Notification.Parent = AbyssGUI
  82. Notification.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  83. Notification.BackgroundTransparency = 0.400
  84. Notification.BorderSizePixel = 0
  85. Notification.Position = UDim2.new(1, 5, 0, 75)
  86. Notification.Size = UDim2.new(0, 450, 0, 60)
  87.  
  88. Line.Name = "Line"
  89. Line.Parent = Notification
  90. Line.BackgroundColor3 = Color3.fromRGB(241, 196, 15)
  91. Line.BorderSizePixel = 0
  92. Line.Position = UDim2.new(0, 0, 0.938461304, 0)
  93. Line.Size = UDim2.new(0, 0, 0, 4)
  94.  
  95. Warning.Name = "Warning"
  96. Warning.Parent = Notification
  97. Warning.BackgroundTransparency = 1.000
  98. Warning.Position = UDim2.new(0.0258302614, 0, 0.0897435844, 0)
  99. Warning.Size = UDim2.new(0, 44, 0, 49)
  100. Warning.Image = "rbxassetid://17174788924"
  101. Warning.ImageColor3 = Color3.fromRGB(241, 196, 15)
  102. Warning.ScaleType = Enum.ScaleType.Fit
  103.  
  104. UICorner.CornerRadius = UDim.new(0, 20)
  105. UICorner.Parent = Warning
  106.  
  107. Title.Name = "Title"
  108. Title.Parent = Notification
  109. Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  110. Title.BackgroundTransparency = 1.000
  111. Title.Position = UDim2.new(0.161, 0, 0.155, 0)
  112. Title.Size = UDim2.new(0, 205, 0, 15)
  113. Title.Text = TitleText
  114. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  115. Title.TextSize = 12.000
  116. Title.TextStrokeTransparency = 1
  117. Title.TextXAlignment = Enum.TextXAlignment.Left
  118.  
  119. Description.Name = "Description"
  120. Description.Parent = Notification
  121. Description.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  122. Description.BackgroundTransparency = 1.000
  123. Description.Position = UDim2.new(0.161, 0, 0.483, 0)
  124. Description.Size = UDim2.new(0, 205, 0, 18)
  125. Description.Text = Desc
  126. Description.TextColor3 = Color3.fromRGB(199, 199, 199)
  127. Description.TextSize = 12.000
  128. Description.TextStrokeTransparency = 1
  129. Description.TextXAlignment = Enum.TextXAlignment.Left
  130. Notification:TweenPosition(UDim2.new(1, -400, 0, 75), "Out", "Sine", 0.35)
  131. wait(0.35)
  132. Line:TweenSize(UDim2.new(0, 450, 0, 4), "Out", "Linear", Delay)
  133. wait(Delay)
  134. Notification:TweenPosition(UDim2.new(1, 5, 0, 75), "Out", "Sine", 0.35)
  135. wait(0.35)
  136. Notification:Destroy()
  137. end
  138.  
  139. function NotificationLibrary:Error(TitleText, Desc, Delay)
  140. local Notification = Instance.new("Frame")
  141. local Line = Instance.new("Frame")
  142. local Warning = Instance.new("ImageLabel")
  143. local UICorner = Instance.new("UICorner")
  144. local Title = Instance.new("TextLabel")
  145. local Description = Instance.new("TextLabel")
  146.  
  147. Notification.Name = "Notification"
  148. Notification.Parent = AbyssGUI
  149. Notification.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  150. Notification.BackgroundTransparency = 0.400
  151. Notification.BorderSizePixel = 0
  152. Notification.Position = UDim2.new(1, 5, 0, 75)
  153. Notification.Size = UDim2.new(0, 450, 0, 60)
  154.  
  155. Line.Name = "Line"
  156. Line.Parent = Notification
  157. Line.BackgroundColor3 = Color3.fromRGB(241, 196, 15)
  158. Line.BorderSizePixel = 0
  159. Line.Position = UDim2.new(0, 0, 0.938461304, 0)
  160. Line.Size = UDim2.new(0, 0, 0, 4)
  161.  
  162. Warning.Name = "Warning"
  163. Warning.Parent = Notification
  164. Warning.BackgroundTransparency = 1.000
  165. Warning.Position = UDim2.new(0.0258302614, 0, 0.0897435844, 0)
  166. Warning.Size = UDim2.new(0, 44, 0, 49)
  167. Warning.Image = "rbxassetid://17174789071"
  168. Warning.ImageColor3 = Color3.fromRGB(241, 196, 15)
  169. Warning.ScaleType = Enum.ScaleType.Fit
  170.  
  171. UICorner.CornerRadius = UDim.new(0, 20)
  172. UICorner.Parent = Warning
  173.  
  174. Title.Name = "Title"
  175. Title.Parent = Notification
  176. Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  177. Title.BackgroundTransparency = 1.000
  178. Title.Position = UDim2.new(0.161, 0, 0.155, 0)
  179. Title.Size = UDim2.new(0, 205, 0, 15)
  180. Title.Text = TitleText
  181. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  182. Title.TextSize = 12.000
  183. Title.TextStrokeTransparency = 1
  184. Title.TextXAlignment = Enum.TextXAlignment.Left
  185.  
  186. Description.Name = "Description"
  187. Description.Parent = Notification
  188. Description.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  189. Description.BackgroundTransparency = 1.000
  190. Description.Position = UDim2.new(0.161, 0, 0.483, 0)
  191. Description.Size = UDim2.new(0, 205, 0, 18)
  192. Description.Text = Desc
  193. Description.TextColor3 = Color3.fromRGB(199, 199, 199)
  194. Description.TextSize = 12.000
  195. Description.TextStrokeTransparency = 1
  196. Description.TextXAlignment = Enum.TextXAlignment.Left
  197. Notification:TweenPosition(UDim2.new(1, -400, 0, 75), "Out", "Sine", 0.35)
  198. wait(0.35)
  199. Line:TweenSize(UDim2.new(0, 450, 0, 4), "Out", "Linear", Delay)
  200. wait(Delay)
  201. Notification:TweenPosition(UDim2.new(1, 5, 0, 75), "Out", "Sine", 0.35)
  202. wait(0.35)
  203. Notification:Destroy()
  204. end
  205.  
  206. return NotificationLibrary
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement