Advertisement
scriptingtales

Roblox Billboard Chat

Apr 7th, 2024
744
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. local textSound = Instance.new("Sound", owner.Character.Head)
  2. textSound.SoundId = "rbxassetid://5416525817"
  3. textSound.Volume = 2
  4. local billb = Instance.new("BillboardGui")
  5. billb.Adornee = owner.Character.Head
  6. billb.ExtentsOffsetWorldSpace = Vector3.new(0, 5, 0)
  7. billb.LightInfluence = 0
  8. billb.Size = UDim2.fromScale(20, 1)
  9. billb.Parent = script
  10. local texb = Instance.new("TextLabel", billb)
  11. texb.BackgroundTransparency = 1
  12. texb.TextScaled = true
  13. texb.Font = Enum.Font.SciFi
  14. texb.TextStrokeTransparency = 0
  15. texb.TextColor3 = Color3.fromRGB(255, 255, 255)
  16. texb.Size = UDim2.fromScale(1,1)
  17. texb.Text = ""
  18.  
  19. local task_delay = nil
  20.  
  21. owner.Chatted:Connect(function(txt)
  22.     for i = 1, #txt, 1 do
  23.         texb.Text = string.sub(txt, 1, i)
  24.         textSound:Play()
  25.         task.wait(0.01)
  26.     end
  27.  
  28.     if task_delay then
  29.         task.cancel(task_delay)
  30.     end
  31.  
  32.     task_delay = task.delay(15, function()
  33.         texb.Text = ""
  34.     end)
  35.  
  36. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement