Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function lerp(weld,beglerp,endlerp,speed)
- weld.C0 = beglerp:lerp(endlerp,speed)
- return weld.C0
- end
- local Run = game:GetService("RunService")
- local id = nil
- local playing = false
- local loop = false
- local mic = true
- local Player = game.Players.LocalPlayer
- mouse = Player:GetMouse()
- local PlayerGui = Player.PlayerGui
- local Char = Player.Character
- local Head = Char.Head
- local RA = Char["Right Arm"]
- local T = Char.Torso
- local RS = T["Right Shoulder"]
- RS.Part0 = nil
- local Neck = T.Neck
- local NC0 = Neck.C0
- local NC1 = Neck.C1
- Head:FindFirstChild("face"):Destroy()
- local LeftEye = Instance.new("Part",Head)
- LeftEye.Name = "Left Eye"
- LeftEye.TopSurface = 0
- LeftEye.BottomSurface = 0
- LeftEye.Locked = true
- LeftEye.CanCollide = false
- LeftEye.BrickColor = BrickColor.new("Really black")
- LeftEye.Size = Vector3.new(0.2,0.2,0.2)
- local LeftEyeWeld = Instance.new("Weld",Head)
- LeftEyeWeld.Part0 = Head
- LeftEyeWeld.Part1 = LeftEye
- LeftEyeWeld.C0 = CFrame.new(0.2,0.2,-0.5)
- local LeftEyeMesh = Instance.new("SpecialMesh",LeftEye)
- LeftEyeMesh.MeshType = "Sphere"
- local RightEye = Instance.new("Part",Head)
- RightEye.Name = "Right Eye"
- RightEye.TopSurface = 0
- RightEye.BottomSurface = 0
- RightEye.Locked = true
- RightEye.CanCollide = false
- RightEye.BrickColor = BrickColor.new("Really black")
- RightEye.Size = Vector3.new(0.2,0.2,0.2)
- local RightEyeWeld = Instance.new("Weld",Head)
- RightEyeWeld.Part0 = Head
- RightEyeWeld.Part1 = RightEye
- RightEyeWeld.C0 = CFrame.new(-0.2,0.2,-0.5)
- local RightEyeMesh = Instance.new("SpecialMesh",RightEye)
- RightEyeMesh.MeshType = "Sphere"
- local Mouth = Instance.new("Part",Head)
- Mouth.Name = "Mouth"
- Mouth.TopSurface = 0
- Mouth.BottomSurface = 0
- Mouth.Locked = true
- Mouth.CanCollide = false
- Mouth.BrickColor = BrickColor.new("Really black")
- Mouth.Size = Vector3.new(0.2,0.2,0.2)
- local MouthWeld = Instance.new("Weld",Head)
- MouthWeld.Part0 = Head
- MouthWeld.Part1 = Mouth
- MouthWeld.C0 = CFrame.new(0,-0.25,-0.6)
- local MouthMesh = Instance.new("SpecialMesh",Mouth)
- MouthMesh.MeshType = "Sphere"
- MouthMesh.Scale = Vector3.new(2.5,0.01,0.01)
- local WRS = Instance.new("Weld", T)
- WRS.Part0 = T
- WRS.Part1 = RA
- WRS.C0 = CFrame.new(1.5, 0.5, 0)
- WRS.C1 = CFrame.new(0, 0.5, 0)
- RSC0 = WRS.C0
- RSC1 = WRS.C1
- WRS.C0 = WRS.C0 *CFrame.new(-0.2,0,-0.5) *CFrame.Angles(math.pi/2,0,-math.pi/3)
- local Mic = Instance.new("Part",RA)
- Mic.TopSurface = 0
- Mic.BottomSurface = 0
- Mic.Size = Vector3.new(0.2,0.2,0.2)
- Mic.Locked = true
- Mic.CanCollide = false
- Mic.BrickColor = BrickColor.new("Really black")
- local MicWeld = Instance.new("Weld",Mic)
- MicWeld.Part0 = RA
- MicWeld.Part1 = Mic
- MicWeld.C0 = CFrame.new(0,-1,0) *CFrame.Angles(math.pi,0,0)
- local MicMesh = Instance.new("SpecialMesh",Mic)
- MicMesh.MeshId = "http://www.roblox.com/asset/?id=43996479"
- MicMesh.Scale = Vector3.new(0.3,0.3,0.3)
- local GUI = Instance.new("ScreenGui",PlayerGui)
- GUI.Name = "SongToPlay"
- local TextB = Instance.new("TextBox",GUI)
- TextB.Text = "Put ID here"
- TextB.Position = UDim2.new(0,800,0,300)
- TextB.Size = UDim2.new(0,100,0,20)
- local Sub = Instance.new("TextButton",GUI)
- Sub.Text = "Submit ID"
- Sub.Position = UDim2.new(0,900,0,300)
- Sub.Size = UDim2.new(0,50,0,20)
- local Clear = Instance.new("TextButton",GUI)
- Clear.Text = "Clear Text"
- Clear.Position = UDim2.new(0,900,0,280)
- Clear.Size = UDim2.new(0,50,0,20)
- local Stop = Instance.new("TextButton",GUI)
- Stop.Text = "Stop Music"
- Stop.Position = UDim2.new(0,900,0,320)
- Stop.Size = UDim2.new(0,50,0,20)
- local Vol = Instance.new("TextBox",GUI)
- Vol.Text = "1"
- Vol.Position = UDim2.new(0,900,0,340)
- Vol.Size = UDim2.new(0,50,0,20)
- local VolText = Instance.new("TextLabel",GUI)
- VolText.Text = "Volume:"
- VolText.BackgroundTransparency = 1
- VolText.Position = UDim2.new(0,850,0,340)
- VolText.Size = UDim2.new(0,50,0,20)
- local Pit = Instance.new("TextBox",GUI)
- Pit.Text = "1"
- Pit.Position = UDim2.new(0,900,0,360)
- Pit.Size = UDim2.new(0,50,0,20)
- local PitText = Instance.new("TextLabel",GUI)
- PitText.Text = "Pitch:"
- PitText.BackgroundTransparency = 1
- PitText.Position = UDim2.new(0,850,0,360)
- PitText.Size = UDim2.new(0,50,0,20)
- local Loop = Instance.new("TextButton",GUI)
- Loop.Text = "Loop"
- Loop.Position = UDim2.new(0,900,0,380)
- Loop.Size = UDim2.new(0,50,0,20)
- mouse.KeyDown:connect(function(key)
- if key == "z" then
- mic = not mic
- if mic == false then
- WRS.Part0 = nil
- RS.Part0 = T
- Mic.Transparency = 1
- for i = 1,20 do
- Run.RenderStepped:wait()
- end
- end
- if mic == true then
- WRS.Part0 = T
- RS.Part0 = nil
- Mic.Transparency = 0
- for i = 1,20 do
- Run.RenderStepped:wait()
- end
- end
- end
- end)
- Sub.MouseButton1Click:connect(function()
- id = TextB.Text
- if playing == true then return end
- if id == nil then return end
- Sound = Instance.new("Sound",Head)
- Sound.SoundId = "rbxassetid://"..id
- Sound.Volume = tonumber(Vol.Text)
- Sound.Pitch = tonumber(Pit.Text)
- if loop == true then
- Sound.Looped = true
- else
- Sound.Looped = false
- end
- Sound:Play()
- playing = true
- while Sound.Playing == true do
- if Sound.Parent == nil then break end
- lerp(Neck,Neck.C0,NC0 *CFrame.Angles(-math.rad(MouthMesh.Scale.Y*15),0,0),0.1)
- if mic == false then
- Sound.MaxDistance = 30
- if Sound:FindFirstChild("EchoSoundEffect") ~= nil then
- Sound.EchoSoundEffect:Destroy()
- end
- end
- if mic == true then
- Sound.MaxDistance = 100
- if Sound:FindFirstChild("EchoSoundEffect") == nil then
- Instance.new("EchoSoundEffect",Sound).Delay = 0.05
- end
- 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)
- end
- MouthMesh.Scale = Vector3.new(2.5,(Sound.PlaybackLoudness/300),0.4)
- Run.RenderStepped:wait()
- end
- if Sound.Parent ~= nil then
- Sound:Destroy()
- end
- playing = false
- for i = 1,100 do
- lerp(Neck,Neck.C0,NC0,0.1)
- lerp(WRS,WRS.C0,RSC0 *CFrame.new(-0.2,0,-0.5) *CFrame.Angles(math.pi/2,0,-math.pi/3),0.1)
- Run.RenderStepped:wait()
- end
- MouthMesh.Scale = Vector3.new(2.5,0.01,0.01)
- end)
- Clear.MouseButton1Click:connect(function()
- TextB.Text = ""
- end)
- Stop.MouseButton1Click:connect(function()
- Sound:Destroy()
- end)
- Loop.MouseButton1Click:connect(function()
- loop = not loop
- if loop == false then
- Loop.Text = "Loop"
- end
- if loop == true then
- Loop.Text = "Unloop"
- end
- end)
- while true do
- for i = 1,math.random(400,1200) do
- Run.RenderStepped:wait()
- end
- for i = 0,1,0.1 do
- LeftEyeMesh.Scale = Vector3.new(1,1*i,1)
- RightEyeMesh.Scale = Vector3.new(1,1*i,1)
- Run.RenderStepped:wait()
- end
- end
Add Comment
Please, Sign In to add comment