Advertisement
mr2meows

sing [ROBLOX LUA]

Nov 23rd, 2017
529
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.52 KB | None | 0 0
  1. local function lerp(weld,beglerp,endlerp,speed)
  2. weld.C0 = beglerp:lerp(endlerp,speed)
  3. return weld.C0
  4. end
  5. local Run = game:GetService("RunService")
  6. local id = nil
  7. local playing = false
  8. local loop = false
  9. local mic = true
  10. local Player = game.Players.LocalPlayer
  11. mouse = Player:GetMouse()
  12. local PlayerGui = Player.PlayerGui
  13. local Char = Player.Character
  14. local Head = Char.Head
  15. local RA = Char["Right Arm"]
  16. local T = Char.Torso
  17. local RS = T["Right Shoulder"]
  18. RS.Part0 = nil
  19. local Neck = T.Neck
  20. local NC0 = Neck.C0
  21. local NC1 = Neck.C1
  22. Head:FindFirstChild("face"):Destroy()
  23. local LeftEye = Instance.new("Part",Head)
  24. LeftEye.Name = "Left Eye"
  25. LeftEye.TopSurface = 0
  26. LeftEye.BottomSurface = 0
  27. LeftEye.Locked = true
  28. LeftEye.CanCollide = false
  29. LeftEye.BrickColor = BrickColor.new("Really black")
  30. LeftEye.Size = Vector3.new(0.2,0.2,0.2)
  31. local LeftEyeWeld = Instance.new("Weld",Head)
  32. LeftEyeWeld.Part0 = Head
  33. LeftEyeWeld.Part1 = LeftEye
  34. LeftEyeWeld.C0 = CFrame.new(0.2,0.2,-0.5)
  35. local LeftEyeMesh = Instance.new("SpecialMesh",LeftEye)
  36. LeftEyeMesh.MeshType = "Sphere"
  37. local RightEye = Instance.new("Part",Head)
  38. RightEye.Name = "Right Eye"
  39. RightEye.TopSurface = 0
  40. RightEye.BottomSurface = 0
  41. RightEye.Locked = true
  42. RightEye.CanCollide = false
  43. RightEye.BrickColor = BrickColor.new("Really black")
  44. RightEye.Size = Vector3.new(0.2,0.2,0.2)
  45. local RightEyeWeld = Instance.new("Weld",Head)
  46. RightEyeWeld.Part0 = Head
  47. RightEyeWeld.Part1 = RightEye
  48. RightEyeWeld.C0 = CFrame.new(-0.2,0.2,-0.5)
  49. local RightEyeMesh = Instance.new("SpecialMesh",RightEye)
  50. RightEyeMesh.MeshType = "Sphere"
  51. local Mouth = Instance.new("Part",Head)
  52. Mouth.Name = "Mouth"
  53. Mouth.TopSurface = 0
  54. Mouth.BottomSurface = 0
  55. Mouth.Locked = true
  56. Mouth.CanCollide = false
  57. Mouth.BrickColor = BrickColor.new("Really black")
  58. Mouth.Size = Vector3.new(0.2,0.2,0.2)
  59. local MouthWeld = Instance.new("Weld",Head)
  60. MouthWeld.Part0 = Head
  61. MouthWeld.Part1 = Mouth
  62. MouthWeld.C0 = CFrame.new(0,-0.25,-0.6)
  63. local MouthMesh = Instance.new("SpecialMesh",Mouth)
  64. MouthMesh.MeshType = "Sphere"
  65. MouthMesh.Scale = Vector3.new(2.5,0.01,0.01)
  66. local WRS = Instance.new("Weld", T)
  67. WRS.Part0 = T
  68. WRS.Part1 = RA
  69. WRS.C0 = CFrame.new(1.5, 0.5, 0)
  70. WRS.C1 = CFrame.new(0, 0.5, 0)
  71. RSC0 = WRS.C0
  72. RSC1 = WRS.C1
  73. WRS.C0 = WRS.C0 *CFrame.new(-0.2,0,-0.5) *CFrame.Angles(math.pi/2,0,-math.pi/3)
  74. local Mic = Instance.new("Part",RA)
  75. Mic.TopSurface = 0
  76. Mic.BottomSurface = 0
  77. Mic.Size = Vector3.new(0.2,0.2,0.2)
  78. Mic.Locked = true
  79. Mic.CanCollide = false
  80. Mic.BrickColor = BrickColor.new("Really black")
  81. local MicWeld = Instance.new("Weld",Mic)
  82. MicWeld.Part0 = RA
  83. MicWeld.Part1 = Mic
  84. MicWeld.C0 = CFrame.new(0,-1,0) *CFrame.Angles(math.pi,0,0)
  85. local MicMesh = Instance.new("SpecialMesh",Mic)
  86. MicMesh.MeshId = "http://www.roblox.com/asset/?id=43996479"
  87. MicMesh.Scale = Vector3.new(0.3,0.3,0.3)
  88. local GUI = Instance.new("ScreenGui",PlayerGui)
  89. GUI.Name = "SongToPlay"
  90. local TextB = Instance.new("TextBox",GUI)
  91. TextB.Text = "Put ID here"
  92. TextB.Position = UDim2.new(0,800,0,300)
  93. TextB.Size = UDim2.new(0,100,0,20)
  94. local Sub = Instance.new("TextButton",GUI)
  95. Sub.Text = "Submit ID"
  96. Sub.Position = UDim2.new(0,900,0,300)
  97. Sub.Size = UDim2.new(0,50,0,20)
  98. local Clear = Instance.new("TextButton",GUI)
  99. Clear.Text = "Clear Text"
  100. Clear.Position = UDim2.new(0,900,0,280)
  101. Clear.Size = UDim2.new(0,50,0,20)
  102. local Stop = Instance.new("TextButton",GUI)
  103. Stop.Text = "Stop Music"
  104. Stop.Position = UDim2.new(0,900,0,320)
  105. Stop.Size = UDim2.new(0,50,0,20)
  106. local Vol = Instance.new("TextBox",GUI)
  107. Vol.Text = "1"
  108. Vol.Position = UDim2.new(0,900,0,340)
  109. Vol.Size = UDim2.new(0,50,0,20)
  110. local VolText = Instance.new("TextLabel",GUI)
  111. VolText.Text = "Volume:"
  112. VolText.BackgroundTransparency = 1
  113. VolText.Position = UDim2.new(0,850,0,340)
  114. VolText.Size = UDim2.new(0,50,0,20)
  115. local Pit = Instance.new("TextBox",GUI)
  116. Pit.Text = "1"
  117. Pit.Position = UDim2.new(0,900,0,360)
  118. Pit.Size = UDim2.new(0,50,0,20)
  119. local PitText = Instance.new("TextLabel",GUI)
  120. PitText.Text = "Pitch:"
  121. PitText.BackgroundTransparency = 1
  122. PitText.Position = UDim2.new(0,850,0,360)
  123. PitText.Size = UDim2.new(0,50,0,20)
  124. local Loop = Instance.new("TextButton",GUI)
  125. Loop.Text = "Loop"
  126. Loop.Position = UDim2.new(0,900,0,380)
  127. Loop.Size = UDim2.new(0,50,0,20)
  128.  
  129. mouse.KeyDowñconnect(function(key)
  130. if key == "z" then
  131. mic = not mic
  132. if mic == false then
  133. WRS.Part0 = nil
  134. RS.Part0 = T
  135. Mic.Transparency = 1
  136. for i = 1,20 do
  137. Run.RenderStepped:wait()
  138. end
  139. end
  140. if mic == true then
  141. WRS.Part0 = T
  142. RS.Part0 = nil
  143. Mic.Transparency = 0
  144. for i = 1,20 do
  145. Run.RenderStepped:wait()
  146. end
  147. end
  148. end
  149. end)
  150. Sub.MouseButton1Click:connect(function()
  151. id = TextB.Text
  152. if playing == true then return end
  153. if id == nil then return end
  154. Sound = Instance.new("Sound",Head)
  155. Sound.SoundId = "rbxassetid://"..id
  156. Sound.Volume = tonumber(Vol.Text)
  157. Sound.Pitch = tonumber(Pit.Text)
  158. if loop == true then
  159. Sound.Looped = true
  160. else
  161. Sound.Looped = false
  162. end
  163. Sound:Play()
  164. playing = true
  165. while Sound.Playing == true do
  166. if Sound.Parent == nil then break end
  167. lerp(Neck,Neck.C0,NC0 *CFrame.Angles(-math.rad(MouthMesh.Scale.Y*15),0,0),0.1)
  168. if mic == false then
  169. Sound.MaxDistance = 30
  170. if Sound:FindFirstChild("EchoSoundEffect") ~= nil then
  171. Sound.EchoSoundEffect:Destroy()
  172. end
  173. end
  174. if mic == true then
  175. Sound.MaxDistance = 100
  176. if Sound:FindFirstChild("EchoSoundEffect") == nil then
  177. Instance.new("EchoSoundEffect",Sound).Delay = 0.05
  178. end
  179. lerp(WRS,WRS.C0,RSC0 *CFrame.new(-0.2,MouthMesh.Scale.Y*0.075,-0.5) *CFrame.Angles(math.pi/2+MouthMesh.Scale.Y*0.3,0,-math.pi/3),0.1)
  180. end
  181. MouthMesh.Scale = Vector3.new(2.5,(Sound.PlaybackLoudness/300),0.4)
  182. Run.RenderStepped:wait()
  183. end
  184. if Sound.Parent ~= nil then
  185. Sound:Destroy()
  186. end
  187. playing = false
  188. for i = 1,100 do
  189. lerp(Neck,Neck.C0,NC0,0.1)
  190. lerp(WRS,WRS.C0,RSC0 *CFrame.new(-0.2,0,-0.5) *CFrame.Angles(math.pi/2,0,-math.pi/3),0.1)
  191. Run.RenderStepped:wait()
  192. end
  193. MouthMesh.Scale = Vector3.new(2.5,0.01,0.01)
  194. end)
  195.  
  196. Clear.MouseButton1Click:connect(function()
  197. TextB.Text = ""
  198. end)
  199.  
  200. Stop.MouseButton1Click:connect(function()
  201. Sound:Destroy()
  202. end)
  203.  
  204. Loop.MouseButton1Click:connect(function()
  205. loop = not loop
  206. if loop == false then
  207. Loop.Text = "Loop"
  208. end
  209. if loop == true then
  210. Loop.Text = "Unloop"
  211. end
  212. end)
  213.  
  214. while true do
  215. for i = 1,math.random(400,1200) do
  216. Run.RenderStepped:wait()
  217. end
  218. for i = 0,1,0.1 do
  219. LeftEyeMesh.Scale = Vector3.new(1,1*i,1)
  220. RightEyeMesh.Scale = Vector3.new(1,1*i,1)
  221. Run.RenderStepped:wait()
  222. end
  223. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement