Advertisement
UhhLegoboy

Mouth

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