Advertisement
hjkook

sing

Feb 3rd, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.35 KB | None | 0 0
  1. local msg = Instance.new("Message",workspace)
  2. msg.Text = "Singing script"
  3. wait(2)
  4. msg:Destroy()
  5.  
  6. local plr = game.Players.LocalPlayer
  7. repeat wait() until plr.Character
  8. plr = game.Players.LocalPlayer
  9. char = plr.Character
  10. torso = char.Torso
  11. head = char.Head
  12. neck = torso.Neck
  13. head.face:Destroy()
  14. sound = Instance.new("Sound", head)
  15. sound.SoundId = "rbxassetid://"
  16. sound.Volume = 100
  17. sound:Play()
  18. sound.Looped = true
  19. plr.Chatted:connect(function(message)
  20. if message:sub(1,4) == "Play" then
  21. sound:Stop()
  22. sound.SoundId = "http://www.roblox.com/asset/?id="..message:sub(6)
  23. sound:Play()
  24. end
  25. end)
  26.  
  27.  
  28.  
  29.  
  30. ---- [[ Left Eye]] ----
  31.  
  32. eye1 = Instance.new("Part", workspace)
  33. eye1.Anchored = false
  34. eye1.Parent = head
  35. eye1.TopSurface = 0
  36. eye1.BrickColor = BrickColor.new("Black")
  37. eye1.BottomSurface = 0
  38. eye1m = Instance.new("SpecialMesh", eye1)
  39. eye1m.MeshType = Enum.MeshType.Sphere
  40. eye1m.Scale = Vector3.new(0.02,0.12,0.03)
  41. ogsize = eye1m.Scale
  42. weld = Instance.new("Weld", head)
  43. weld.Part0 = eye1
  44. weld.Part1 = head
  45. weld.C1 = CFrame.new(-.17,.14,-.57)
  46.  
  47.  
  48.  
  49. ---- [[ Right Eye ]] ----
  50.  
  51.  
  52. eye2 = Instance.new("Part", workspace)
  53. eye2.Anchored = false
  54. eye2.Parent = head
  55. eye2.TopSurface = 0
  56. eye2.BrickColor = BrickColor.new("Black")
  57. eye2.BottomSurface = 0
  58. eye2m = Instance.new("SpecialMesh", eye2)
  59. eye2m.MeshType = Enum.MeshType.Sphere
  60. eye2m.Scale = Vector3.new(0.02,0.12,0.03)
  61. ogsize = eye2m.Scale
  62. weld = Instance.new("Weld", head)
  63. weld.Part0 = eye2
  64. weld.Part1 = head
  65. weld.C1 = CFrame.new(.17,.14,-.57)
  66.  
  67.  
  68.  
  69. ---- [[ Mouth ]] ----
  70.  
  71. mouth = Instance.new("Part", workspace)
  72. mouth.Anchored = false
  73. mouth.Parent = head
  74. mouth.TopSurface = 0
  75. mouth.BrickColor = BrickColor.new("Black")
  76. mouth.BottomSurface = 0
  77. mouth.Material = "SmoothPlastic"
  78. mouthm = Instance.new("SpecialMesh", mouth)
  79. mouthm.MeshType = Enum.MeshType.Sphere
  80. mouthm.Scale = Vector3.new(.13,0.1,0.05)
  81. ogsize = mouthm.Scale
  82. weld = Instance.new("Weld", head)
  83. weld.Part0 = mouth
  84. weld.Part1 = head
  85. weld.C1 = CFrame.new(0,-.25,-.6)
  86. game:service'RunService'.RenderStepped:connect(function()
  87. mouthm.Scale = mouthm.Scale:lerp(Vector3.new(ogsize.X+sound.PlaybackLoudness/20000,sound.PlaybackLoudness/1000,ogsize.Z),0.8)
  88. neck.C0 = neck.C0:lerp(CFrame.new(0,1,0)*CFrame.Angles(math.rad(mouthm.Scale.Y*100) +math.rad(-90),0,math.rad(180)),0.1)
  89. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement