Advertisement
BobMe

Notify

Jul 1st, 2020
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.69 KB | None | 0 0
  1. -- Farewell infortality
  2. -- Revamp by ImFrostic, Version 2.81
  3.  
  4. -- Objects
  5.  
  6. local Notify = Instance.new("ScreenGui")
  7. local Frame = Instance.new("Frame")
  8. local Sound = Instance.new("Sound")
  9. local Top = Instance.new("TextLabel")
  10. local TextButton = Instance.new("TextButton")
  11. local Question = Instance.new("TextLabel")
  12. local AnswerGreen = Instance.new("Frame")
  13. local Ans = Instance.new("TextButton")
  14. local AnswerGrey = Instance.new("Frame")
  15. local Ans_2 = Instance.new("TextButton")
  16. local AnswerRed = Instance.new("Frame")
  17. local Ans_3 = Instance.new("TextButton")
  18.  
  19. -- Properties
  20.  
  21. Notify.Name = "Notify"
  22. Notify.Parent = game.StarterGui
  23. Notify.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  24.  
  25. Frame.Parent = Notify
  26. Frame.AnchorPoint = Vector2.new(0.5, 0.5)
  27. Frame.BackgroundColor3 = Color3.new(0, 0, 0)
  28. Frame.BackgroundTransparency = 0.5
  29. Frame.Position = UDim2.new(-0.200000003, 0, 0.5, 0)
  30. Frame.Size = UDim2.new(0.400000006, 0, 0.400000006, 0)
  31.  
  32. Sound.Parent = Frame
  33. Sound.SoundId = "rbxassetid://1029495337"
  34. Sound.Volume = 4
  35. Sound.Pitch = 2
  36.  
  37. Top.Name = "Top"
  38. Top.Parent = Frame
  39. Top.BackgroundColor3 = Color3.new(0, 0, 0)
  40. Top.BackgroundTransparency = 0.5
  41. Top.Size = UDim2.new(1, 0, 0.0799999982, 0)
  42. Top.Font = Enum.Font.SourceSans
  43. Top.Text = "Notification from Memo1332"
  44. Top.TextColor3 = Color3.new(1, 1, 1)
  45. Top.TextScaled = true
  46. Top.TextSize = 14
  47. Top.TextWrapped = true
  48. Top.TextXAlignment = Enum.TextXAlignment.Left
  49.  
  50. TextButton.Parent = Top
  51. TextButton.AnchorPoint = Vector2.new(1, 0)
  52. TextButton.BackgroundColor3 = Color3.new(1, 1, 1)
  53. TextButton.BackgroundTransparency = 1
  54. TextButton.Position = UDim2.new(1, 0, 0, 0)
  55. TextButton.Size = UDim2.new(1, 0, 1, 0)
  56. TextButton.SizeConstraint = Enum.SizeConstraint.RelativeYY
  57. TextButton.Font = Enum.Font.SourceSans
  58. TextButton.Text = "X"
  59. TextButton.TextColor3 = Color3.new(1, 1, 1)
  60. TextButton.TextScaled = true
  61. TextButton.TextSize = 14
  62. TextButton.TextWrapped = true
  63.  
  64. Question.Name = "Question"
  65. Question.Parent = Frame
  66. Question.BackgroundColor3 = Color3.new(1, 1, 1)
  67. Question.BackgroundTransparency = 0.80000001192093
  68. Question.Position = UDim2.new(0, 0, 0.0799999982, 0)
  69. Question.Size = UDim2.new(1, 0, 0.319999993, 0)
  70. Question.Font = Enum.Font.SourceSans
  71. Question.Text = "Yoooooo are u there?"
  72. Question.TextColor3 = Color3.new(1, 1, 1)
  73. Question.TextScaled = true
  74. Question.TextSize = 14
  75. Question.TextWrapped = true
  76. Question.TextXAlignment = Enum.TextXAlignment.Left
  77. Question.TextYAlignment = Enum.TextYAlignment.Top
  78.  
  79. AnswerGreen.Name = "AnswerGreen"
  80. AnswerGreen.Parent = Frame
  81. AnswerGreen.BackgroundColor3 = Color3.new(0.00392157, 0.364706, 0)
  82. AnswerGreen.BackgroundTransparency = 0.5
  83. AnswerGreen.BorderSizePixel = 0
  84. AnswerGreen.Position = UDim2.new(0.100000001, 0, 0.600000024, 0)
  85. AnswerGreen.Size = UDim2.new(0.25, 0, 0.224999994, 0)
  86.  
  87. Ans.Name = "Ans"
  88. Ans.Parent = AnswerGreen
  89. Ans.BackgroundColor3 = Color3.new(0.0156863, 1, 0)
  90. Ans.BackgroundTransparency = 0.80000001192093
  91. Ans.Size = UDim2.new(1, 0, 1, 0)
  92. Ans.Font = Enum.Font.SourceSans
  93. Ans.Text = "Yes"
  94. Ans.TextColor3 = Color3.new(1, 1, 1)
  95. Ans.TextScaled = true
  96. Ans.TextSize = 14
  97. Ans.TextWrapped = true
  98.  
  99. AnswerGrey.Name = "AnswerGrey"
  100. AnswerGrey.Parent = Frame
  101. AnswerGrey.AnchorPoint = Vector2.new(0.5, 0)
  102. AnswerGrey.BackgroundColor3 = Color3.new(0.364706, 0.364706, 0.364706)
  103. AnswerGrey.BackgroundTransparency = 0.5
  104. AnswerGrey.BorderSizePixel = 0
  105. AnswerGrey.Position = UDim2.new(0.5, 0, 0.600000024, 0)
  106. AnswerGrey.Size = UDim2.new(0.25, 0, 0.224999994, 0)
  107.  
  108. Ans_2.Name = "Ans"
  109. Ans_2.Parent = AnswerGrey
  110. Ans_2.BackgroundColor3 = Color3.new(1, 1, 1)
  111. Ans_2.BackgroundTransparency = 0.80000001192093
  112. Ans_2.Size = UDim2.new(1, 0, 1, 0)
  113. Ans_2.Font = Enum.Font.SourceSans
  114. Ans_2.Text = "Close"
  115. Ans_2.TextColor3 = Color3.new(1, 1, 1)
  116. Ans_2.TextScaled = true
  117. Ans_2.TextSize = 14
  118. Ans_2.TextWrapped = true
  119.  
  120. AnswerRed.Name = "AnswerRed"
  121. AnswerRed.Parent = Frame
  122. AnswerRed.AnchorPoint = Vector2.new(1, 0)
  123. AnswerRed.BackgroundColor3 = Color3.new(0.364706, 0, 0)
  124. AnswerRed.BackgroundTransparency = 0.5
  125. AnswerRed.BorderSizePixel = 0
  126. AnswerRed.Position = UDim2.new(0.899999976, 0, 0.600000024, 0)
  127. AnswerRed.Size = UDim2.new(0.25, 0, 0.224999994, 0)
  128.  
  129. Ans_3.Name = "Ans"
  130. Ans_3.Parent = AnswerRed
  131. Ans_3.BackgroundColor3 = Color3.new(1, 0, 0)
  132. Ans_3.BackgroundTransparency = 0.80000001192093
  133. Ans_3.Size = UDim2.new(1, 0, 1, 0)
  134. Ans_3.Font = Enum.Font.SourceSans
  135. Ans_3.Text = "No"
  136. Ans_3.TextColor3 = Color3.new(1, 1, 1)
  137. Ans_3.TextScaled = true
  138. Ans_3.TextSize = 14
  139. Ans_3.TextWrapped = true
  140.  
  141. -- Scripts
  142.  
  143. function findplayer(playername)
  144. for i,v in pairs(game.Players:GetChildren()) do
  145. local nam = v.Name
  146. if string.sub(nam,1,#playername):lower() == playername:lower() then
  147. return v
  148. end
  149. end
  150. return nil
  151. end
  152.  
  153. owner.Chatted:Connect(function(msg)
  154. if string.sub(msg,1,7):lower() == ";notif/" then
  155. local split = string.split(string.sub(msg,8),"/")
  156. local clon = Notify:Clone()
  157. local plr = findplayer(split[1])
  158. local tim = os.time()
  159. clon.Parent = plr.PlayerGui
  160. clon.Frame.Question.Text = split[2]
  161. clon.Frame.AnswerGreen.Ans.Text = split[3]
  162. clon.Frame.AnswerRed.Ans.Text = split[4]
  163. clon.Frame.Top.Text = "Notification from "..tostring(owner)
  164. clon.Frame:TweenPosition(UDim2.new(0.5,0,0.5,0),Enum.EasingDirection.Out,Enum.EasingStyle.Back,0.5,true)
  165. coroutine.resume(coroutine.create(function()
  166. clon.Frame.Sound:Play()
  167. wait(.5)
  168. clon.Frame.Sound.Pitch = 3
  169. clon.Frame.Sound:Play()
  170. end))
  171. local function playSound()
  172. coroutine.resume(coroutine.create(function()
  173. local clon2 = Sound:Clone()
  174. local gui = Instance.new("ScreenGui")
  175. gui.Parent = owner.PlayerGui
  176. clon2.Parent = gui
  177. clon2:Play()
  178. wait(.5)
  179. clon2.Pitch = 3
  180. clon2:Play()
  181. wait(.5)
  182. gui:Destroy()
  183. end))
  184. end
  185.  
  186. clon.Frame.AnswerGreen.Ans.MouseButton1Down:Connect(function()
  187. clon:Destroy()
  188. warn("Question responce from: "..plr.Name)
  189. print(" - Response: "..split[3].."\n - Time taken: "..tostring(os.time()-tim))
  190. playSound()
  191. end)
  192. clon.Frame.AnswerRed.Ans.MouseButton1Down:Connect(function()
  193. clon:Destroy()
  194. warn("Question responce from: "..plr.Name)
  195. print(" - Response: "..split[4].."\n - Time taken: "..tostring(os.time()-tim))
  196. playSound()
  197. end)
  198. clon.Frame.AnswerGrey.Ans.MouseButton1Down:Connect(function()
  199. clon:Destroy()
  200. warn("Question responce from: "..plr.Name)
  201. print(" - Response: No responce".."\n - Time taken: "..tostring(os.time()-tim))
  202. playSound()
  203. end)
  204. clon.Frame.Top.TextButton.MouseButton1Down:Connect(function()
  205. clon:Destroy()
  206. warn("Question responce from: "..plr.Name)
  207. print(" - Response: No responce".."\n - Time taken: "..tostring(os.time()-tim))
  208. playSound()
  209. end)
  210. end
  211. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement