Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = owner
- local char = plr.Character
- local hum = char.Humanoid
- local rarm = char["Right Arm"]
- local larm = char["Left Arm"]
- local rleg = char["Right Leg"]
- local lleg = char["Left Leg"]
- local root = char.HumanoidRootPart
- local tors = char.Torso
- local head = char.Head
- local action = ""
- local t = tick()
- local RunS = game:GetService("RunService")
- local playback = 0
- hum.HipHeight = 0.5
- hum.WalkSpeed = 20
- head.Size = Vector3.new(2, 2, 2)
- rarm.Size = Vector3.new(1, 3, 1)
- larm.Size = Vector3.new(1, 3, 1)
- tors.Size = Vector3.new(2, 3, 1)
- rleg.Size = Vector3.new(1, 3, 1)
- lleg.Size = Vector3.new(1, 3, 1)
- local f = Instance.new("Decal", head)
- f.Name = "Texture"
- f.Texture = "rbxassetid://3755253739"
- f.Face = "Front"
- local fc = f:Clone()
- fc.Parent = head
- fc.Texture = "rbxassetid://3755175019"
- fc.Face = "Back"
- local fc = f:Clone()
- fc.Parent = head
- fc.Texture = "rbxassetid://3755174443"
- fc.Face = "Left"
- local fc = f:Clone()
- fc.Parent = head
- fc.Texture = "rbxassetid://3755252237"
- fc.Face = "Right"
- local fc = f:Clone()
- fc.Parent = head
- fc.Texture = "rbxassetid://3755175626"
- fc.Face = "Top"
- local glasses = Instance.new("Part", char)
- glasses.Anchored = false
- glasses.CanCollide = false
- glasses.Material = "Neon"
- glasses.Transparency = 1
- glasses.Size = Vector3.new(2.25, 2.25, 2.25)
- glasses.CastShadow = false
- local g = Instance.new("Decal", glasses)
- g.Name = "Texture"
- g.Texture = "rbxassetid://3755176276"
- g.Face = "Front"
- local gc = g:Clone()
- gc.Parent = glasses
- gc.Texture = "rbxassetid://3755177267"
- gc.Face = "Right"
- local gc = g:Clone()
- gc.Parent = glasses
- gc.Texture = "rbxassetid://3755176850"
- gc.Face = "Left"
- local glassesw = Instance.new("Weld", glasses)
- glassesw.Part0 = head
- glassesw.Part1 = glasses
- local mouth = Instance.new("Part", char)
- mouth.Name = "Mouth"
- mouth.BrickColor = BrickColor.new(Color3.new(0, 0, 0))
- mouth.Size = Vector3.new(1, 0.5, 2)
- local mouthm = Instance.new("Weld", mouth)
- mouthm.Part0 = head
- mouthm.Part1 = mouth
- mouthm.C0 = CFrame.new(0, -0.6, -0.01)
- local mouthsize = Instance.new("BlockMesh", mouth)
- for i,stuff in pairs(char:GetChildren()) do
- if stuff:IsA("Shirt") or stuff:IsA("Pants") or stuff:IsA("BodyColors") or stuff:IsA("Hat") or stuff:IsA("Accessory") or stuff:IsA("Accoutrement") or stuff:IsA("CharacterMesh") then
- stuff:Destroy()
- end
- end
- local music = Instance.new("Sound", head)
- music.SoundId = "rbxassetid://3295654382"
- music.Name = "Music"
- music.Volume = 3
- music.Looped = true
- music:Play()
- if head:FindFirstChild("Mesh") then head.Mesh:Destroy() end
- if head:FindFirstChild("face") then head.face:Destroy() end
- local shirt = Instance.new("Shirt", char)
- shirt.ShirtTemplate = "rbxassetid://3516317543"
- local pants = Instance.new("Pants", char)
- pants.PantsTemplate = "rbxassetid://3516314876"
- local colors = Instance.new("BodyColors", char)
- colors.HeadColor = BrickColor.new("Brick yellow")
- colors.LeftArmColor = BrickColor.new("Brick yellow")
- colors.RightArmColor = BrickColor.new("Brick yellow")
- colors.TorsoColor = BrickColor.new("Brick yellow")
- colors.LeftLegColor = BrickColor.new("Brick yellow")
- colors.RightLegColor = BrickColor.new("Brick yellow")
- function createJoint(wp0, wp1, wc0x, wc0y, wc0z, wc1x, wc1y, wc1z, name)
- local joint = Instance.new("Weld", wp0)
- joint.Part0 = wp0
- joint.Part1 = wp1
- joint.C0 = CFrame.new(wc0x, wc0y, wc0z)
- joint.C1 = CFrame.new(wc1x, wc1y, wc1z)
- joint.Name = name
- return joint
- end
- local RS = createJoint(char.Torso, char["Right Arm"], 1.5, 1, 0, 0, 1, 0, "Right Shoulder")
- local TS = createJoint(char.HumanoidRootPart, char.Torso, 0, 0, 0, 0, 0, 0, "RootJoint")
- local LS = createJoint(char.Torso, char["Left Arm"], -1.5, 1, 0, 0, 1, 0, "Left Shoulder")
- local RH = createJoint(char.Torso, char["Right Leg"], 0.5, -1.5, 0, 0, 1.5, 0, "Right Hip")
- local LH = createJoint(char.Torso, char["Left Leg"], -0.5, -1.5, 0, 0, 1.5, 0, "Left Hip")
- local NK = createJoint(char.Torso, char.Head, 0, 2, 0, 0, -1/2, 0, "Neck")
- local rsc0 = RS.C0
- local lsc0 = LS.C0
- local tsc0 = TS.C0
- local rhc0 = RH.C0
- local lhc0 = LH.C0
- local nkc0 = NK.C0
- local remote = Instance.new("RemoteFunction", char)
- remote.Name = "MouthRemote"
- function recieveInfo(player, info, n, t, ls, rs, lh, rh)
- playback = info
- NK.C0 = n
- TS.C0 = t
- LS.C0 = ls
- RS.C0 = rs
- LH.C0 = lh
- RH.C0 = rh
- return info
- end
- remote.OnServerInvoke = recieveInfo
- NLS([[
- local plr = owner
- local cam = workspace.CurrentCamera
- local char = plr.Character
- local NK = char.Torso:WaitForChild("Neck")
- local RS = char.Torso:WaitForChild("Right Shoulder")
- local LS = char.Torso:WaitForChild("Left Shoulder")
- local RH = char.Torso:WaitForChild("Right Hip")
- local LH = char.Torso:WaitForChild("Left Hip")
- local TS = char.HumanoidRootPart:WaitForChild("RootJoint")
- local hum = char.Humanoid
- local rsc0 = CFrame.new(1.5, 1, 0)
- local lsc0 = CFrame.new(-1.5, 1, 0)
- local tsc0 = CFrame.new()
- local rhc0 = CFrame.new(0.5, -1.5, 0)
- local lhc0 =CFrame.new(-0.5, -1.5, 0)
- local nkc0 = CFrame.new(0, 2, 0)
- local music = owner.Character.Head:WaitForChild("Music")
- local mouth = char:WaitForChild("Mouth")
- local mouthsize = mouth:WaitForChild("Mesh")
- local t = tick()
- local root = char.HumanoidRootPart
- local action = ""
- function lerp(a, b, t)
- return a * (1-t) + (b*t)
- end
- game:GetService("RunService").RenderStepped:connect(function()
- t = t + 0.5
- local playback = music.PlaybackLoudness
- local a = playback - 350
- a = a * 3
- if a < 0 then
- a = 0
- elseif a > 45 then
- a = 45
- end
- cam.FieldOfView = lerp(cam.FieldOfView, 70 + playback/20, 0.3)
- NK.C0 = NK.C0:lerp(nkc0 * CFrame.Angles(math.rad(a)/3, 0, 0), 0.1)
- mouthsize.Scale = mouthsize.Scale:lerp(Vector3.new(0.75+a/45/2, a/45, 1), 0.1)
- if not hum.Sit then
- if math.abs(root.Velocity.x) > 1 or math.abs(root.Velocity.z) > 1 and hum:GetState() ~= Enum.HumanoidStateType.Freefall then
- action = "Walk"
- elseif math.abs(root.Velocity.x) < 1 or math.abs(root.Velocity.z) < 1 then
- action = "Idle"
- end
- else
- action = "Sit"
- end
- NK.C0 = NK.C0:lerp(nkc0 * CFrame.Angles(math.rad(a)/3, 0, 0), 0.1)
- mouthsize.Scale = mouthsize.Scale:lerp(Vector3.new(0.75+a/45/2, a/45, 1), 0.1)
- if action == "Idle" then
- speed = 0.5
- TS.C0 = TS.C0:lerp(tsc0, speed)
- LS.C0 = LS.C0:lerp(lsc0 * CFrame.Angles(0, 0, math.rad(-2) + -math.sin(t/20)/10/2), speed)
- RS.C0 = RS.C0:lerp(rsc0 * CFrame.Angles(0, 0, math.rad(2) + math.sin(t/20)/10/2), speed)
- LH.C0 = LH.C0:lerp(lhc0, speed)
- RH.C0 = RH.C0:lerp(rhc0, speed)
- elseif action == "Walk" then
- speed = 0.5
- TS.C0 = TS.C0:lerp(tsc0, speed)
- LS.C0 = LS.C0:lerp(lsc0 * CFrame.Angles(math.sin(t/3)/1.5, 0, 0), speed)
- RS.C0 = RS.C0:lerp(rsc0 * CFrame.Angles(-math.sin(t/3)/1.5, 0, 0), speed)
- LH.C0 = LH.C0:lerp(lhc0 * CFrame.Angles(-math.sin(t/3)/1.5, 0, 0), speed)
- RH.C0 = RH.C0:lerp(rhc0 * CFrame.Angles(math.sin(t/3)/1.5, 0, 0), speed)
- elseif action == "Sit" then
- speed = 0.5
- TS.C0 = TS.C0:lerp(tsc0 * CFrame.new(0, 0.5, 0), speed)
- LS.C0 = LS.C0:lerp(lsc0 * CFrame.Angles(math.rad(15), 0, math.rad(-2) + -math.sin(t/20)/10/2), speed)
- RS.C0 = RS.C0:lerp(rsc0 * CFrame.Angles(math.rad(15), 0, math.rad(2) + math.sin(t/20)/10/2), speed)
- LH.C0 = LH.C0:lerp(lhc0 * CFrame.Angles(math.rad(90), 0, -math.rad(15)), speed)
- RH.C0 = RH.C0:lerp(rhc0 * CFrame.Angles(math.rad(90), 0, math.rad(15)), speed)
- end
- if owner.Character:WaitForChild("MouthRemote") then
- owner.Character.MouthRemote:InvokeServer(music.PlaybackLoudness, NK.C0, TS.C0, LS.C0, RS.C0, LH.C0, RH.C0)
- end
- end)
- ]], char)
- RunS.Stepped:connect(function()
- t = t + 0.5
- local a = playback - 350
- a = a * 3
- if a < 0 then
- a = 0
- elseif a > 45 then
- a = 45
- end
- NK.C0 = NK.C0:lerp(nkc0 * CFrame.Angles(math.rad(a)/3, 0, 0), 0.1)
- mouthsize.Scale = mouthsize.Scale:lerp(Vector3.new(0.75+a/45/2, a/45, 1), 0.1)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement