Advertisement
TheUnknownDiscord

chat thing

Sep 2nd, 2021 (edited)
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. runservice = game:GetService("RunService")
  2. music = Instance.new("Sound", owner.Character.Torso)
  3. music.Volume = 1.75
  4. music.Looped = true
  5. local clickSound = Instance.new("Sound", owner.Character.Head)
  6. clickSound.Volume = 2
  7. clickSound.SoundId = "rbxassetid://4724430129"
  8. owner.Chatted:connect(function(butwhathechatted)
  9. if owner.character.Head:findFirstChild("chat") then
  10. owner.character.Head:findFirstChild("chat"):destroy()
  11. end
  12. local chatopen = Instance.new("Sound", owner.Character.Head)
  13. chatopen.Volume = 1
  14. chatopen.SoundId = "rbxassetid://1293432625"
  15. chatopen:play()
  16. local chatclose = Instance.new("Sound", owner.Character.Head)
  17. chatclose.Volume = 1
  18. chatclose.SoundId = "rbxassetid://1293432192"
  19. local billboard = Instance.new("BillboardGui", owner.character.Head)
  20. billboard.Adornee = owner.character.Head
  21. billboard.StudsOffset = Vector3.new(-1, 2.5, 0)
  22. billboard.Size = UDim2.new(2,0,1,0)
  23. billboard.Name = "chat"
  24. local text = Instance.new("TextBox", billboard)
  25. text.BackgroundTransparency = 1
  26. text.TextStrokeTransparency = 0
  27. text.TextSize = 25
  28. text.TextStrokeColor3 = Color3.fromRGB(0,0,0)
  29. text.Size = billboard.Size
  30. text.Font = "Arcade"
  31. text.TextColor3 = Color3.fromRGB(245, 205, 48)
  32. text.Text = butwhathechatted
  33. for i = 1, #butwhathechatted do
  34. text.Text = string.sub(butwhathechatted,1,i)
  35. clickSound.PlaybackSpeed = math.random(70, 185)/100
  36. wait(0.125)
  37. clickSound:Play()
  38. end
  39. text.Text = butwhathechatted
  40. coroutine.wrap(function()
  41. wait(3)
  42. for i = 1,50 do
  43. billboard.StudsOffset = billboard.StudsOffset - Vector3.new(0,-0.01,0)
  44. text.TextTransparency = text.TextTransparency + 0.02
  45. text.TextStrokeTransparency = text.TextStrokeTransparency + 0.02
  46. runservice.Stepped:wait()
  47. end
  48. billboard:destroy()
  49. chatclose:play()
  50. end)()
  51. end)
  52. owner.Chatted:Connect(function(musicchange)
  53. if musicchange == "-music1" then
  54. music:Stop()
  55. music.SoundId = "rbxassetid://567129571"
  56. music:Play()
  57. elseif musicchange == "-music2" then
  58. music:Stop()
  59. music.SoundId = "rbxassetid://481096455"
  60. music:Play()
  61. end
  62. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement