Advertisement
BobMe

messge

Jul 30th, 2023 (edited)
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.56 KB | None | 0 0
  1. local function sendMessage(msg,from)
  2. local MessageGui = Instance.new("ScreenGui")
  3. local Outer = Instance.new("Frame")
  4. local Top = Instance.new("TextLabel")
  5. local PlayerName = Instance.new("TextLabel")
  6. local CloseButton = Instance.new("TextButton")
  7. local Bottom = Instance.new("TextLabel")
  8. local Message = Instance.new("TextLabel")
  9. local CountDown = Instance.new("TextLabel")
  10.  
  11. --Properties:
  12.  
  13. MessageGui.Name = "MessageGui"
  14. MessageGui.Parent = nil
  15. MessageGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  16.  
  17. Outer.Name = "Outer"
  18. Outer.Parent = MessageGui
  19. Outer.AnchorPoint = Vector2.new(1, 1)
  20. Outer.BackgroundColor3 = Color3.fromRGB(255, 90, 255)
  21. Outer.BackgroundTransparency = 0.500
  22. Outer.BorderColor3 = Color3.fromRGB(0, 0, 0)
  23. Outer.BorderSizePixel = 0
  24. Outer.Position = UDim2.new(0.996352255, 0, 0.993518531, 0)
  25. Outer.Size = UDim2.new(0.300000012, 0, 0.150000006, 0)
  26. Outer.SizeConstraint = Enum.SizeConstraint.RelativeXX
  27.  
  28. Top.Name = "Top"
  29. Top.Parent = Outer
  30. Top.AnchorPoint = Vector2.new(0.5, 0.5)
  31. Top.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  32. Top.BackgroundTransparency = 0.200
  33. Top.BorderColor3 = Color3.fromRGB(0, 0, 0)
  34. Top.BorderSizePixel = 0
  35. Top.Position = UDim2.new(0.5, 0, 0.0900000036, 0)
  36. Top.Size = UDim2.new(0.980000019, 0, 0.140000001, 0)
  37. Top.Font = Enum.Font.SourceSans
  38. Top.Text = ""
  39. Top.TextColor3 = Color3.fromRGB(255, 255, 255)
  40. Top.TextScaled = true
  41. Top.TextSize = 14.000
  42. Top.TextWrapped = true
  43. Top.TextXAlignment = Enum.TextXAlignment.Left
  44.  
  45. PlayerName.Name = "PlayerName"
  46. PlayerName.Parent = Top
  47. PlayerName.AnchorPoint = Vector2.new(0, 0.5)
  48. PlayerName.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  49. PlayerName.BackgroundTransparency = 1.000
  50. PlayerName.BorderColor3 = Color3.fromRGB(0, 0, 0)
  51. PlayerName.BorderSizePixel = 0
  52. PlayerName.Position = UDim2.new(0.0143876318, 0, 0.499999017, 0)
  53. PlayerName.Size = UDim2.new(0.985612571, 0, 0.699999988, 0)
  54. PlayerName.Font = Enum.Font.SourceSans
  55. PlayerName.Text = "Message from Memo1332:"
  56. PlayerName.TextColor3 = Color3.fromRGB(255, 255, 255)
  57. PlayerName.TextScaled = true
  58. PlayerName.TextSize = 14.000
  59. PlayerName.TextWrapped = true
  60. PlayerName.TextXAlignment = Enum.TextXAlignment.Left
  61.  
  62. CloseButton.Name = "CloseButton"
  63. CloseButton.Parent = Top
  64. CloseButton.AnchorPoint = Vector2.new(1, 0)
  65. CloseButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  66. CloseButton.BackgroundTransparency = 1.000
  67. CloseButton.BorderColor3 = Color3.fromRGB(0, 0, 0)
  68. CloseButton.BorderSizePixel = 0
  69. CloseButton.Position = UDim2.new(1, 0, 0, 0)
  70. CloseButton.Size = UDim2.new(1, 0, 1, 0)
  71. CloseButton.SizeConstraint = Enum.SizeConstraint.RelativeYY
  72. CloseButton.Font = Enum.Font.SourceSans
  73. CloseButton.Text = "X"
  74. CloseButton.TextColor3 = Color3.fromRGB(255, 0, 4)
  75. CloseButton.TextScaled = true
  76. CloseButton.TextSize = 14.000
  77. CloseButton.TextWrapped = true
  78.  
  79. Bottom.Name = "Bottom"
  80. Bottom.Parent = Outer
  81. Bottom.AnchorPoint = Vector2.new(0.5, 0.5)
  82. Bottom.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  83. Bottom.BackgroundTransparency = 0.200
  84. Bottom.BorderColor3 = Color3.fromRGB(0, 0, 0)
  85. Bottom.BorderSizePixel = 0
  86. Bottom.Position = UDim2.new(0.49999994, 0, 0.580677807, 0)
  87. Bottom.Size = UDim2.new(0.980000019, 0, 0.794795692, 0)
  88. Bottom.Font = Enum.Font.SourceSans
  89. Bottom.Text = ""
  90. Bottom.TextColor3 = Color3.fromRGB(255, 255, 255)
  91. Bottom.TextScaled = true
  92. Bottom.TextSize = 14.000
  93. Bottom.TextWrapped = true
  94. Bottom.TextXAlignment = Enum.TextXAlignment.Left
  95.  
  96. Message.Name = "Message"
  97. Message.Parent = Bottom
  98. Message.AnchorPoint = Vector2.new(0, 0.5)
  99. Message.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  100. Message.BackgroundTransparency = 1.000
  101. Message.BorderColor3 = Color3.fromRGB(0, 0, 0)
  102. Message.BorderSizePixel = 0
  103. Message.Position = UDim2.new(0.0143876467, 0, 0.505529761, 0)
  104. Message.Size = UDim2.new(0.985612571, 0, 0.922082603, 0)
  105. Message.Font = Enum.Font.SourceSans
  106. Message.Text = "When I was a young boy\\nMy father took me into the city\\nTo see a marching band\\nHe said, \"Son, when you grow up\\nWould you be the savior of the broken\\nThe beaten and the damned?\"\\nHe said, \"Will you defeat them?\\nYour demons, and all the non-believers\\nThe plans that they have made?\"\\n\"Because one day, I'll leave you a phantom\\nTo lead you in the summer\\nTo join the black parade\"\\nWhen I was a young boy\\nMy father took me into the city\\nTo see a marching band\\nHe said, \"Son, when you grow up\\nWould you be the savior of the broken\\nThe beaten and the damned?\"\\nSometimes I get the feelin'\\nShe's watchin' over me\\nAnd other times I feel like I should go\\nAnd through it all, the rise and fall\\nThe bodies in the streets\\nAnd when you're gone, we want you all to know\\nWe'll carry on, we'll carry on\\nAnd though you're dead and gone, believe me\\nYour memory will carry on\\nWe'll carry on\\nAnd in my heart, I can't contain it\\nThe anthem won't explain it\\nA world that sends you reelin'\\nFrom decimated dreams\\nYour misery and hate will kill us all\\nSo paint it black and take it back\\nLet's shout it loud and clear\\nDefiant to the end, we hear the call\\nTo carry on, we'll carry on\\nAnd though you're dead and gone, believe me\\nYour memory will carry on\\nWe'll carry on\\nAnd though you're broken and defeated\\nYour weary widow marches\\nOn and on, we carry through the fears\\nOh, ah, ha\\nDisappointed faces of your peers\\nOh, ah, ha\\nTake a look at me, 'cause I could not care at all\\nDo or die, you'll never make me\\nBecause the world will never take my heart\\nGo and try, you'll never break me\\nWe want it all, we wanna play this part\\nI won't explain or say I'm sorry\\nI'm unashamed, I'm gonna show my scars\\nGive a cheer for all the broken\\nListen here, because it's who we are\\nJust a man, I'm not a hero\\nJust a boy, who had to sing this song\\nJust a man, I'm not a hero\\nI don't care\\nWe'll carry on, we'll carry on\\nAnd though you're dead and gone, believe me\\nYour memory will carry on\\nYou'll carry on\\nAnd though you're broken and defeated\\nYour weary widow marches, oh\\nDo or die, you'll never make me\\nBecause the world will never take my heart\\nGo and try, you'll never break me\\nWe want it all, we wanna play this part (we'll carry on)\\nDo or die, you'll never make me (we'll carry on)\\nBecause the world will never take my heart (we'll carry on)\\nGo and try, you'll never break me (we'll carry on)\\nWe want it all, we wanna play this part (we'll carry on!)"
  107. Message.TextColor3 = Color3.fromRGB(255, 255, 255)
  108. Message.TextSize = 30.000
  109. Message.TextWrapped = true
  110. Message.TextXAlignment = Enum.TextXAlignment.Left
  111. Message.TextYAlignment = Enum.TextYAlignment.Top
  112.  
  113. CountDown.Name = "CountDown"
  114. CountDown.Parent = Bottom
  115. CountDown.AnchorPoint = Vector2.new(0, 0.5)
  116. CountDown.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  117. CountDown.BackgroundTransparency = 1.000
  118. CountDown.BorderColor3 = Color3.fromRGB(0, 0, 0)
  119. CountDown.BorderSizePixel = 0
  120. CountDown.Position = UDim2.new(0.0143876467, 0, 0.522244036, 0)
  121. CountDown.Size = UDim2.new(0.969879985, 0, 0.955511093, 0)
  122. CountDown.Font = Enum.Font.SourceSans
  123. CountDown.Text = "30"
  124. CountDown.TextColor3 = Color3.fromRGB(255, 255, 255)
  125. CountDown.TextSize = 30.000
  126. CountDown.TextWrapped = true
  127. CountDown.TextXAlignment = Enum.TextXAlignment.Right
  128. CountDown.TextYAlignment = Enum.TextYAlignment.Bottom
  129.  
  130. for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  131. local clon = MessageGui:Clone()
  132. clon.Outer.Position = UDim2.new(0.996+0.5, 0,0.994, 0)
  133. clon.Parent = v.PlayerGui
  134. clon.Outer.Top.PlayerName.Text = "Message from "..tostring(from.DisplayName)..":"
  135. clon.Outer.Bottom.Message.Text = msg
  136. clon.Outer:TweenPosition(UDim2.new(0.996, 0,0.994, 0),Enum.EasingDirection.Out,Enum.EasingStyle.Back,0.5,true)
  137. local closing = false
  138.  
  139. local function close()
  140. closing = true
  141. clon.Outer:TweenPosition(UDim2.new(0.996+0.5, 0,0.994, 0),Enum.EasingDirection.In,Enum.EasingStyle.Back,0.5,true)
  142. wait(0.5)
  143. clon:Destroy()
  144. end
  145.  
  146. clon.Outer.Top.CloseButton.MouseButton1Click:Connect(function()
  147. close()
  148. end)
  149.  
  150. coroutine.resume(coroutine.create(function()
  151. for i=1,#msg,3 do
  152. clon.Text = string.sub(msg,1,i)
  153. wait()
  154. end
  155. end))
  156. coroutine.resume(coroutine.create(function()
  157. for i=1,10 do
  158. clon.Outer.Bottom.CountDown.Text = tostring(10-i)
  159. wait(1)
  160. if closing then
  161. break
  162. end
  163. end
  164. if not closing then
  165. close()
  166. end
  167. end))
  168. end
  169. end
  170.  
  171. owner.Chatted:Connect(function(msg)
  172. local split = string.split(msg,"/")
  173. if split[1] == "m" then
  174. sendMessage(split[2],owner)
  175. end
  176. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement