Potato228

фвафвыа

Mar 24th, 2023
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.17 KB | None | 0 0
  1. -- THIS WAS MADE BY BoredStuff2 on twitter CREDITS
  2.  
  3. local isExistance = false
  4.  
  5. local Notifyt = Instance.new("ScreenGui")
  6. local NotificationParent = Instance.new("ScrollingFrame")
  7. local UIListLayout = Instance.new("UIListLayout")
  8. local UIPadding = Instance.new("UIPadding")
  9. local Notification = Instance.new("Frame")
  10. local Container = Instance.new("ImageButton")
  11. local Top = Instance.new("ImageLabel")
  12. local Exit = Instance.new("Frame")
  13. local UIAspectRatioConstraint = Instance.new("UIAspectRatioConstraint")
  14. local Icon = Instance.new("ImageLabel")
  15. local Button = Instance.new("TextButton")
  16. local Title = Instance.new("TextLabel")
  17. local Accent = Instance.new("Frame")
  18. local Body = Instance.new("Frame")
  19. local Content = Instance.new("TextLabel")
  20. local UIPadding_2 = Instance.new("UIPadding")
  21. local UISizeConstraint = Instance.new("UISizeConstraint")
  22.  
  23. if game.CoreGui:FindFirstChild("Notifyt") then
  24. isExistance = true
  25. Notifyt = game.CoreGui.Notifyt
  26. NotificationParent = Notifyt.NotificationParent
  27. Notification = Notifyt.Notification
  28. end
  29.  
  30. Notifyt.Name = "Notifyt"
  31. Notifyt.Parent = game.CoreGui
  32. Notifyt.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  33. Notifyt.ResetOnSpawn = false
  34.  
  35. NotificationParent.Name = "NotificationParent"
  36. NotificationParent.Parent = Notifyt
  37. NotificationParent.AnchorPoint = Vector2.new(1, 0)
  38. NotificationParent.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  39. NotificationParent.BackgroundTransparency = 1.000
  40. NotificationParent.BorderSizePixel = 0
  41. NotificationParent.ClipsDescendants = false
  42. NotificationParent.Position = UDim2.new(1, 0, 0, -25)
  43. NotificationParent.Selectable = false
  44. NotificationParent.Size = UDim2.new(0, 275, 1, 0)
  45. NotificationParent.CanvasSize = UDim2.new(0, 0, 0, 0)
  46. NotificationParent.ScrollBarThickness = 0
  47. NotificationParent.ScrollingEnabled = false
  48.  
  49. UIListLayout.Parent = NotificationParent
  50. UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Right
  51. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  52. UIListLayout.VerticalAlignment = Enum.VerticalAlignment.Bottom
  53. UIListLayout.Padding = UDim.new(0, 5)
  54.  
  55. UIPadding.Parent = NotificationParent
  56. UIPadding.PaddingRight = UDim.new(0, 25)
  57.  
  58. Notification.Name = "Notification"
  59. Notification.Parent = Notifyt
  60. Notification.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  61. Notification.BackgroundTransparency = 1.000
  62. Notification.BorderSizePixel = 0
  63. Notification.Position = UDim2.new(1, 0, 0, 0)
  64. Notification.Size = UDim2.new(0, 250, 0, 0)
  65. Notification.Visible = false
  66.  
  67. Container.Name = "Container"
  68. Container.Parent = Notification
  69. Container.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  70. Container.BackgroundTransparency = 1.000
  71. Container.BorderSizePixel = 0
  72. Container.Position = UDim2.new(1.14999998, 0, 0, 0)
  73. Container.Size = UDim2.new(1, 0, 0, 0)
  74. Container.Image = "rbxassetid://6296184185"
  75. Container.ImageColor3 = Color3.fromRGB(0, 0, 0)
  76. Container.ImageTransparency = 0.500
  77. Container.ScaleType = Enum.ScaleType.Slice
  78. Container.SliceCenter = Rect.new(512, 512, 512, 512)
  79. Container.SliceScale = 0.012
  80.  
  81. Top.Name = "Top"
  82. Top.Parent = Container
  83. Top.BackgroundColor3 = Color3.fromRGB(248, 248, 248)
  84. Top.BackgroundTransparency = 1.000
  85. Top.BorderSizePixel = 0
  86. Top.Size = UDim2.new(1, 0, 0, 32)
  87. Top.ZIndex = 3
  88. Top.Image = "rbxassetid://6276641225"
  89. Top.ImageColor3 = Color3.fromRGB(0, 0, 0)
  90. Top.ImageTransparency = 0.600
  91. Top.ScaleType = Enum.ScaleType.Slice
  92. Top.SliceCenter = Rect.new(256, 256, 256, 256)
  93. Top.SliceScale = 0.022
  94.  
  95. Exit.Name = "Exit"
  96. Exit.Parent = Top
  97. Exit.AnchorPoint = Vector2.new(1, 0)
  98. Exit.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  99. Exit.BackgroundTransparency = 1.000
  100. Exit.BorderColor3 = Color3.fromRGB(27, 42, 53)
  101. Exit.BorderSizePixel = 0
  102. Exit.ClipsDescendants = true
  103. Exit.LayoutOrder = 3
  104. Exit.Position = UDim2.new(1, 0, 0, 0)
  105. Exit.Size = UDim2.new(1, 0, 1, 0)
  106.  
  107. UIAspectRatioConstraint.Parent = Exit
  108.  
  109. Icon.Name = "Icon"
  110. Icon.Parent = Exit
  111. Icon.AnchorPoint = Vector2.new(0.5, 0.5)
  112. Icon.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  113. Icon.BackgroundTransparency = 1.000
  114. Icon.BorderSizePixel = 0
  115. Icon.Position = UDim2.new(0.5, 0, 0.5, 0)
  116. Icon.Size = UDim2.new(0.5, 0, 0.5, 0)
  117. Icon.Image = "http://www.roblox.com/asset/?id=6415685859"
  118. Icon.ScaleType = Enum.ScaleType.Fit
  119.  
  120. Button.Name = "Button"
  121. Button.Parent = Exit
  122. Button.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  123. Button.BackgroundTransparency = 1.000
  124. Button.BorderSizePixel = 0
  125. Button.Size = UDim2.new(1, 0, 1, 0)
  126. Button.ZIndex = 2
  127. Button.Font = Enum.Font.SourceSans
  128. Button.Text = ""
  129. Button.TextColor3 = Color3.fromRGB(0, 0, 0)
  130. Button.TextSize = 14.000
  131.  
  132. Title.Name = "Title"
  133. Title.Parent = Top
  134. Title.AnchorPoint = Vector2.new(1, 0)
  135. Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  136. Title.BackgroundTransparency = 1.000
  137. Title.BorderSizePixel = 0
  138. Title.Position = UDim2.new(1, 0, 0, 0)
  139. Title.Size = UDim2.new(1, -12, 1, 0)
  140. Title.Font = Enum.Font.GothamSemibold
  141. Title.Text = "Notification"
  142. Title.TextColor3 = Color3.fromRGB(240, 240, 240)
  143. Title.TextSize = 14.000
  144. Title.TextWrapped = true
  145. Title.TextXAlignment = Enum.TextXAlignment.Left
  146.  
  147. Accent.Name = "Accent"
  148. Accent.Parent = Top
  149. Accent.AnchorPoint = Vector2.new(0, 1)
  150. Accent.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  151. Accent.BackgroundTransparency = 0.700
  152. Accent.BorderSizePixel = 0
  153. Accent.Position = UDim2.new(0, 0, 1, 0)
  154. Accent.Size = UDim2.new(1, 0, 0, 1)
  155.  
  156. Body.Name = "Body"
  157. Body.Parent = Container
  158. Body.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  159. Body.BackgroundTransparency = 1.000
  160. Body.BorderSizePixel = 0
  161. Body.ClipsDescendants = true
  162. Body.Position = UDim2.new(0, 0, 0, 32)
  163. Body.Size = UDim2.new(1, 0, 0, 0)
  164.  
  165. Content.Name = "Content"
  166. Content.Parent = Body
  167. Content.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  168. Content.BackgroundTransparency = 1.000
  169. Content.BorderSizePixel = 0
  170. Content.Size = UDim2.new(1, 0, 1, 0)
  171. Content.Font = Enum.Font.Gotham
  172. Content.Text = "Message Here. This is an example message prompt."
  173. Content.TextColor3 = Color3.fromRGB(230, 230, 230)
  174. Content.TextSize = 14.000
  175. Content.TextWrapped = true
  176. Content.TextXAlignment = Enum.TextXAlignment.Left
  177. Content.TextYAlignment = Enum.TextYAlignment.Top
  178.  
  179. UIPadding_2.Parent = Body
  180. UIPadding_2.PaddingBottom = UDim.new(0, 12)
  181. UIPadding_2.PaddingLeft = UDim.new(0, 12)
  182. UIPadding_2.PaddingRight = UDim.new(0, 12)
  183. UIPadding_2.PaddingTop = UDim.new(0, 12)
  184.  
  185. UISizeConstraint.Parent = Container
  186. UISizeConstraint.MaxSize = Vector2.new(math.huge, 120)
  187.  
  188. Notification.AutomaticSize = Enum.AutomaticSize.Y
  189. Container.AutomaticSize = Enum.AutomaticSize.Y
  190. Body.AutomaticSize = Enum.AutomaticSize.Y
  191.  
  192. -- remove clones:
  193.  
  194. if isExistance then
  195. UIListLayout:Destroy()
  196. UIPadding:Destroy()
  197. Container:Destroy()
  198. end
  199.  
  200. -- script converted by saypotato
  201.  
  202. local T = game:GetService('TweenService')
  203. local t = TweenInfo.new(0.5, Enum.EasingStyle.Quint)
  204. local tp = NotificationParent
  205.  
  206. function prompt(title, text, closeTime, close)
  207. local Prompt = Notification:Clone()
  208. local Sound = Instance.new('Sound', Notification)
  209.  
  210. Prompt.Visible = true
  211. Prompt.Container.Top.Title.Text = title
  212. Prompt.Container.Body.Content.Text = text
  213.  
  214. Prompt.Parent = NotificationParent
  215. Sound.SoundId = "rbxassetid://6518811702"
  216. Sound:Play()
  217.  
  218. T:Create(Prompt.Container, t, {Position = UDim2.new(0, 0, 0, 0)}):Play()
  219.  
  220. -- auto size
  221. Prompt.AutomaticSize = Enum.AutomaticSize.Y
  222. Prompt.Container.AutomaticSize = Enum.AutomaticSize.Y
  223. Prompt.Container.Body.AutomaticSize = Enum.AutomaticSize.Y
  224. Prompt.Container.Body.Content.AutomaticSize = Enum.AutomaticSize.Y
  225.  
  226. Prompt.Container.Top.Exit.Button.MouseButton1Click:Connect(function()
  227. T:Create(Prompt.Container, t, {Position = UDim2.new(1.15, 0, 0, 0)}):Play()
  228. wait(0.48)
  229. Prompt:Destroy()
  230. end)
  231.  
  232. Prompt.Container.Top.Exit.Visible = close
  233.  
  234. wait(1)
  235.  
  236. Sound:Destroy()
  237.  
  238. spawn(function()
  239. if typeof(closeTime) == "number" then
  240. task.wait(closeTime)
  241. local s = pcall(function()
  242. T:Create(Prompt.Container, t, {Position = UDim2.new(1.15, 0, 0, 0)}):Play()
  243. wait(0.48)
  244. Prompt:Destroy()
  245. end)
  246. if not s then
  247. print('Already closed.')
  248. end
  249. end
  250. end)
  251. end
  252.  
  253. local lib = {}
  254.  
  255. function lib.prompt(title, description, closeTime)
  256. prompt(title, description, closeTime, true)
  257. end
  258.  
  259. return lib
Add Comment
Please, Sign In to add comment