Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wait();
- Animating = true;
- local model = script.Parent;
- local torso = model:WaitForChild("Torso");
- local head = model:WaitForChild("Head");
- local vhead = model:WaitForChild("VisibleHead")
- local rwing = model:WaitForChild("Left Arm");
- local lwing = model:WaitForChild("Right Arm");
- local rleg = model:WaitForChild("Right Leg");
- local lleg = model:WaitForChild("Left Leg");
- local beak = model:WaitForChild("Beak");
- local wattle = model:WaitForChild("Wattle");
- local eye1 = model:WaitForChild("Eye")
- local eye2 = model:WaitForChild("Eye2")
- local eye1m = eye1:WaitForChild("eye1m")
- local eye2m = eye2:WaitForChild("eye2m");
- local neck = torso:WaitForChild("Neck");
- local vneck = head:WaitForChild("VNeck");
- local rsh = torso:WaitForChild("Right Shoulder");
- local lsh = torso:WaitForChild("Left Shoulder");
- local rhi = torso:WaitForChild("Right Shoulderr");
- local lhi = torso:WaitForChild("Left Shoulderr");
- local bth = head:WaitForChild("bth");
- local wth = head:WaitForChild("wth");
- local eth1 = head:WaitForChild("eth1");
- local eth2 = head:WaitForChild("eth2");
- local swoot = Instance.new("Sound",torso);
- swoot.Volume = .5;
- swoot.SoundId = "http://www.roblox.com/asset/?id=3931318"
- swoot.Looped = true
- local cluck1 = Instance.new("Sound", head)
- local randomids = {
- 'http://www.roblox.com/asset/?id=24111782',
- 'http://www.roblox.com/asset/?id=24111798',
- 'http://www.roblox.com/asset/?id=24111823',
- 'http://www.roblox.com/asset/?id=24111685'
- }
- cluck1.Pitch = 1
- cluck1.Volume = 1
- local humanoid = model:WaitForChild("Humanoid");
- local status = "standing"
- lastcluck = 0;
- clucktime = 0;
- lastpeck = 0;
- pecktime = 0;
- lastblink = 0;
- blinktime = 0;
- local function Peck()
- if math.random(1,2) == 1 then
- for i = 0, -125, -25 do
- neck.DesiredAngle = math.rad(i)
- wait(0.03)
- end
- for i = -125, 0, 25 do
- neck.DesiredAngle = math.rad(i)
- wait(0.03)
- end
- else
- vneck.DesiredAngle = math.rad(60)
- wait(0.5)
- vneck.DesiredAngle = -math.rad(60)
- wait(1)
- vneck.DesiredAngle = 0
- end
- end
- local function Blink()
- eye1m.Scale = Vector3.new(0.3, 0.02, 0.3)
- eye2m.Scale = Vector3.new(0.3, 0.02, 0.3)
- wait(0.1)
- eye1m.Scale = Vector3.new(0.3, 0.3, 0.3)
- eye2m.Scale = Vector3.new(0.3, 0.3, 0.3)
- end
- local run = humanoid.Running:connect(function(spd)
- if spd <1 then
- status = "standing"
- else
- status = "walking"
- end
- end)
- local climb = humanoid.Climbing:connect(function(active)
- if active then
- status = "walking"
- end
- end)
- local seated = humanoid.Seated:connect(function(active)
- if active then
- status = "sitting"
- end
- end)
- local swimming = humanoid.Swimming:connect(function(active)
- if active then
- status = "sitting"
- end
- end)
- local fallingdown = humanoid.FallingDown:connect(function(active)
- if active then
- status = "falling"
- end
- end)
- local freefalling = humanoid.FreeFalling:connect(function(active)
- if active then
- status = "falling"
- end
- end)
- local rs = game:GetService("RunService").RenderStepped;
- while true do
- rs:wait();
- local time = Workspace.DistributedGameTime;
- if time - lastcluck >= clucktime then
- cluck1.SoundId = randomids[math.random(1,#randomids)]
- wait(0)
- cluck1:Play()
- lastcluck = time;
- clucktime = (math.random()*10)+4;
- end
- if time - lastpeck >= pecktime and status == "standing" then
- Peck();
- lastpeck = time;
- pecktime = (math.random()*10)+6;
- end
- if time - lastblink >= blinktime then
- Blink();
- lastblink = time;
- blinktime = (math.random()*10)+2
- end
- local amp, fre = 0, 1
- if status == "sitting" then
- rleg.Transparency = 1
- lleg.Transparency = 1
- else
- rleg.Transparency = 0
- lleg.Transparency = 0
- end
- if status == "walking" then
- amp = 1.1
- fre = 15
- end
- local desangle = amp * math.sin(time*fre)
- rhi.DesiredAngle = -desangle
- lhi.DesiredAngle = -desangle
- if torso.Velocity.y < -1 then
- torso.Velocity = Vector3.new(torso.Velocity.x, -0.5, torso.Velocity.z)
- end
- if status == "falling" then
- if not swoot.IsPlaying then
- swoot:Play()
- end
- swoot.Pitch = (math.random()*2) + 7
- local swoosh = math.rad(40) * math.sin(time*30)
- rsh.DesiredAngle = swoosh + math.rad(40)
- lsh.DesiredAngle = swoosh + math.rad(40)
- else
- if swoot.IsPlaying then
- swoot:Stop()
- end
- rsh.DesiredAngle = 0
- lsh.DesiredAngle = 0
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment