Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- players = game:GetService("Players")
- player = owner
- head = player.Character:WaitForChild("Head")
- max_distance = 60
- chat_bubbles = 0
- gui_height = 5
- bubble_color = Color3.new(0,0,0)
- chat_color = Color3.new(255, 255, 255)
- function createChatBubble(seconds, message)
- chat_bubbles = chat_bubbles + 1
- local gui = Instance.new("BillboardGui",head)
- gui.Adornee = head
- gui.MaxDistance = max_distance
- gui.Size = UDim2.new(0,32*(#message/3),0.6,0)
- gui.StudsOffset = Vector3.new(0, chat_bubbles - 1, 0)
- local chat_bubble = Instance.new("Frame",gui)
- chat_bubble.Size = UDim2.new(1,0,1,0)
- chat_bubble.BackgroundTransparency = 1
- chat_bubble.BackgroundColor3 = bubble_color
- local text_label = Instance.new("TextBox",chat_bubble)
- text_label.Text = message
- text_label.Size = UDim2.new(1,0,1,0)
- text_label.TextColor3 = chat_color
- text_label.TextSize = 20
- text_label.Font = "Fantasy"
- text_label.BackgroundTransparency = 1
- wait(0.1)
- gui.StudsOffset = Vector3.new(0, chat_bubbles - 0.9, 0)
- wait(0.1)
- gui.StudsOffset = Vector3.new(0, chat_bubbles - 0.8, 0)
- wait(0.1)
- gui.StudsOffset = Vector3.new(0, chat_bubbles - 0.7, 0)
- wait(0.1)
- gui.StudsOffset = Vector3.new(0, chat_bubbles - 0.6, 0)
- wait(0.1)
- gui.StudsOffset = Vector3.new(0, chat_bubbles - 0.5, 0)
- wait(0.1)
- gui.StudsOffset = Vector3.new(0, chat_bubbles - 0.4, 0)
- wait(0.1)
- gui.StudsOffset = Vector3.new(0, chat_bubbles - 0.3, 0)
- wait(0.1)
- gui.StudsOffset = Vector3.new(0, chat_bubbles - 0.2, 0)
- wait(0.1)
- gui.StudsOffset = Vector3.new(0, chat_bubbles - 0.1, 0)
- wait(0.1)
- gui.StudsOffset = Vector3.new(0, chat_bubbles, 0)
- local chat_bubble = Instance.new("Frame",gui)
- chat_bubble.Size = UDim2.new(1,0,1,0)
- chat_bubble.BackgroundTransparency = 1
- chat_bubble.BackgroundColor3 = bubble_color
- local text_label = Instance.new("TextBox",chat_bubble)
- text_label.Text = message
- text_label.Size = UDim2.new(1,0,1,0)
- text_label.TextColor3 = chat_color
- text_label.TextSize = 20
- text_label.Font = "Fantasy"
- text_label.BackgroundTransparency = 1
- wait(seconds)
- wait(0)
- text_label.TextTransparency = text_label.TextTransparency + 0.1
- wait(0.1)
- text_label.TextTransparency = text_label.TextTransparency + 0.1
- wait(0.1)
- text_label.TextTransparency = text_label.TextTransparency + 0.1
- wait(0.1)
- text_label.TextTransparency = text_label.TextTransparency + 0.1
- wait(0.1)
- text_label.TextTransparency = text_label.TextTransparency + 0.1
- wait(0.1)
- text_label.TextTransparency = text_label.TextTransparency + 0.1
- wait(0.1)
- text_label.TextTransparency = text_label.TextTransparency + 0.1
- gui:Destroy()
- chat_bubbles = chat_bubbles - 1
- end
- player.chatted:connect(function(msg)
- chat = coroutine.wrap(createChatBubble)
- chat((#msg/5)+2,msg)
- end)
Add Comment
Please, Sign In to add comment