HenloMyDude

yahwasd

Mar 24th, 2020
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.05 KB | None | 0 0
  1. players = game:GetService("Players")
  2. player = owner
  3. head = player.Character:WaitForChild("Head")
  4. max_distance = 60
  5. chat_bubbles = 0
  6. gui_height = 5
  7. bubble_color = Color3.new(0,0,0)
  8. chat_color = Color3.new(255, 255, 255)
  9.  
  10. function createChatBubble(seconds, message)
  11. chat_bubbles = chat_bubbles + 1
  12. local gui = Instance.new("BillboardGui",head)
  13. gui.Adornee = head
  14. gui.MaxDistance = max_distance
  15. gui.Size = UDim2.new(0,32*(#message/3),0.6,0)
  16. gui.StudsOffset = Vector3.new(0, chat_bubbles - 1, 0)
  17. local chat_bubble = Instance.new("Frame",gui)
  18. chat_bubble.Size = UDim2.new(1,0,1,0)
  19. chat_bubble.BackgroundTransparency = 1
  20. chat_bubble.BackgroundColor3 = bubble_color
  21. local text_label = Instance.new("TextBox",chat_bubble)
  22. text_label.Text = message
  23. text_label.Size = UDim2.new(1,0,1,0)
  24. text_label.TextColor3 = chat_color
  25. text_label.TextSize = 20
  26. text_label.Font = "Fantasy"
  27. text_label.BackgroundTransparency = 1
  28. wait(0.1)
  29. gui.StudsOffset = Vector3.new(0, chat_bubbles - 0.9, 0)
  30. wait(0.1)
  31. gui.StudsOffset = Vector3.new(0, chat_bubbles - 0.8, 0)
  32. wait(0.1)
  33. gui.StudsOffset = Vector3.new(0, chat_bubbles - 0.7, 0)
  34. wait(0.1)
  35. gui.StudsOffset = Vector3.new(0, chat_bubbles - 0.6, 0)
  36. wait(0.1)
  37. gui.StudsOffset = Vector3.new(0, chat_bubbles - 0.5, 0)
  38. wait(0.1)
  39. gui.StudsOffset = Vector3.new(0, chat_bubbles - 0.4, 0)
  40. wait(0.1)
  41. gui.StudsOffset = Vector3.new(0, chat_bubbles - 0.3, 0)
  42. wait(0.1)
  43. gui.StudsOffset = Vector3.new(0, chat_bubbles - 0.2, 0)
  44. wait(0.1)
  45. gui.StudsOffset = Vector3.new(0, chat_bubbles - 0.1, 0)
  46. wait(0.1)
  47. gui.StudsOffset = Vector3.new(0, chat_bubbles, 0)
  48.  
  49. local chat_bubble = Instance.new("Frame",gui)
  50. chat_bubble.Size = UDim2.new(1,0,1,0)
  51. chat_bubble.BackgroundTransparency = 1
  52. chat_bubble.BackgroundColor3 = bubble_color
  53.  
  54.  
  55. local text_label = Instance.new("TextBox",chat_bubble)
  56. text_label.Text = message
  57. text_label.Size = UDim2.new(1,0,1,0)
  58. text_label.TextColor3 = chat_color
  59. text_label.TextSize = 20
  60. text_label.Font = "Fantasy"
  61. text_label.BackgroundTransparency = 1
  62. wait(seconds)
  63. wait(0)
  64. text_label.TextTransparency = text_label.TextTransparency + 0.1
  65. wait(0.1)
  66. text_label.TextTransparency = text_label.TextTransparency + 0.1
  67. wait(0.1)
  68. text_label.TextTransparency = text_label.TextTransparency + 0.1
  69. wait(0.1)
  70. text_label.TextTransparency = text_label.TextTransparency + 0.1
  71. wait(0.1)
  72. text_label.TextTransparency = text_label.TextTransparency + 0.1
  73. wait(0.1)
  74. text_label.TextTransparency = text_label.TextTransparency + 0.1
  75. wait(0.1)
  76. text_label.TextTransparency = text_label.TextTransparency + 0.1
  77. gui:Destroy()
  78. chat_bubbles = chat_bubbles - 1
  79. end
  80.  
  81. player.chatted:connect(function(msg)
  82. chat = coroutine.wrap(createChatBubble)
  83. chat((#msg/5)+2,msg)
  84. end)
Add Comment
Please, Sign In to add comment