Advertisement
good_scripter

Untitled

Jun 29th, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. local plr = owner
  2. local char = plr.Character
  3. local torso = char.Torso
  4. local head = char.Head
  5.  
  6. function Random(num)
  7. local section=num % 1 * 3;
  8. local secondary=0.5 * math.pi * (section % 1);
  9. if section < 1 then
  10. return 1,1 - math.cos(secondary),1 - math.sin(secondary);
  11. elseif section < 2 then
  12. return 1 - math.sin(secondary),1,1 - math.cos(secondary);
  13. else
  14. return 1 - math.cos(secondary),1 - math.sin(secondary),1;
  15. end
  16. end
  17.  
  18. function custommessage(msg)
  19. local bg = Instance.new("BillboardGui", char)
  20. bg.Adornee = char.Head
  21. bg.Size = UDim2.new(1, 0, 1, 0)
  22. bg.StudsOffset = Vector3.new(0.5, 4, 0)
  23.  
  24. local txt = Instance.new("TextLabel")
  25. txt.Parent = bg
  26. txt.Transparency = 0
  27. txt.BackgroundColor3 = Color3.new(1,1,1)
  28. txt.BackgroundTransparency = 1
  29. txt.BorderSizePixel = 0
  30. txt.Size = UDim2.new(0, 0, 0.05, 0)
  31. txt.Position = UDim2.new(0, 0, 0, 0)
  32. txt:TweenSize(UDim2.new(5,0,0.05,0),"Out","Quart",0.5,true)
  33. txt:TweenPosition(UDim2.new(-2.5,0,0,0),"Out","Quart",0.5,true)
  34. txt.Font = "Code"
  35. txt.FontSize = "Size8"
  36. txt.TextStrokeColor3 = Color3.new(0,0,0)
  37. txt.TextStrokeTransparency = 1
  38. txt.TextScaled = true
  39. txt.BackgroundColor3 = Color3.new(0,0,0)
  40. txt.Text = " "
  41. txt.SizeConstraint = 0
  42. game:service'RunService'.RenderStepped:connect(function()
  43. txt.TextColor3 = Color3.new(Random(tick()))
  44. end)
  45. wait(0.5)
  46. txt:TweenSize(UDim2.new(5,0,2,0),"In","Quart",0.5,true)
  47. txt:TweenPosition(UDim2.new(-2.5,0,0,0),"In","Quart",0.5,true)
  48. wait(0.5)
  49. for i = 0, msg:len(), 1 do
  50. txt.Text = msg:sub(0, i)
  51. texteffect = Instance.new("Sound",char)
  52. texteffect.SoundId = "rbxassetid://156286438"
  53. texteffect.TimePosition = 0
  54. texteffect:Play()
  55. wait(0.02)
  56. end
  57. wait(3)
  58. for i = 0,1,0.1 do
  59. wait()
  60. txt.TextTransparency = i
  61. end
  62. txt:TweenSize(UDim2.new(0,0,2,0),"Out","Quart",0.25,true)
  63. txt:TweenPosition(UDim2.new(0,0,0,0),"Out","Quart",0.25,true)
  64. wait(0.25)
  65. bg:Destroy()
  66. end
  67.  
  68. coroutine.resume(coroutine.create(function()
  69. custommessage("_Rainbow")
  70. end))
  71.  
  72. plr.Chatted:connect(function(message)
  73. custommessage(message)
  74. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement