Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- players = game:GetService("Players")
- player = players.StarzoZero
- 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(210, 0, 0)
- function createChatBubble(seconds, message)
- chat_bubbles = chat_bubbles + 1
- local gui = Instance.new("BillboardGui",head)
- gui.Adornee = head
- gui.MaxDistance = max_distance
- gui.ExtentsOffsetWorldSpace = Vector3.new(0,gui_height+(chat_bubbles*1.5),0)
- gui.Size = UDim2.new(0,32*(#message/3),0.6,0)
- local chat_bubble = Instance.new("Frame",gui)
- chat_bubble.Size = UDim2.new(1,0,1,0)
- chat_bubble.BackgroundTransparency = 0.5
- 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 = "SciFi"
- text_label.BackgroundTransparency = 1
- wait(seconds)
- gui:Destroy()
- chat_bubbles = chat_bubbles - 1
- end
- player.chatted:connect(function(msg)
- chat = coroutine.wrap(createChatBubble)
- chat((#msg/5)+2,msg)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement