Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Player=game:GetService("Players").LocalPlayer
- Character = workspace["CloneCharacter"]
- LeftArm=Character["Left Arm"]
- LeftLeg=Character["Left Leg"]
- RightArm=Character["Right Arm"]
- RightLeg=Character["Right Leg"]
- Head=Character["Head"]
- Torso=Character["Torso"]
- attacking = false
- walking = false
- position = "Idle"
- local sine = 0
- running = false
- local change = 2
- local HEADLERP = Instance.new("ManualWeld")
- HEADLERP.Parent = Head
- HEADLERP.Part0 = Head
- HEADLERP.Part1 = Torso
- HEADLERP.C0 = CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
- local TORSOLERP = Instance.new("ManualWeld")
- TORSOLERP.Parent = Torso
- TORSOLERP.Part0 = Torso
- TORSOLERP.Part1 = Torso
- TORSOLERP.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
- local ROOTLERP = Instance.new("ManualWeld")
- ROOTLERP.Parent = Torso
- ROOTLERP.Part0 = Torso
- ROOTLERP.Part1 = Torso
- ROOTLERP.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
- local RIGHTARMLERP = Instance.new("ManualWeld")
- RIGHTARMLERP.Parent = RightArm
- RIGHTARMLERP.Part0 = RightArm
- RIGHTARMLERP.Part1 = Torso
- RIGHTARMLERP.C0 = CFrame.new(-1.5, 0, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
- local LEFTARMLERP = Instance.new("ManualWeld")
- LEFTARMLERP.Parent = LeftArm
- LEFTARMLERP.Part0 = LeftArm
- LEFTARMLERP.Part1 = Torso
- LEFTARMLERP.C0 = CFrame.new(1.5, 0, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
- local RIGHTLEGLERP = Instance.new("ManualWeld")
- RIGHTLEGLERP.Parent = RightLeg
- RIGHTLEGLERP.Part0 = RightLeg
- RIGHTLEGLERP.Part1 = Torso
- RIGHTLEGLERP.C0 = CFrame.new(-0.5, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
- local LEFTLEGLERP = Instance.new("ManualWeld")
- LEFTLEGLERP.Parent = LeftLeg
- LEFTLEGLERP.Part0 = LeftLeg
- LEFTLEGLERP.Part1 = Torso
- LEFTLEGLERP.C0 = CFrame.new(0.42, 2.0, 0.2) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
- HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0.3) * CFrame.Angles(math.rad(20 + 3*math.cos(sine/18)), math.rad(0), math.rad(0)), 0.3)
- ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(20), math.rad(0)), 0.5)
- RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.5, 0.1, 0.7) * CFrame.Angles(math.rad(-15), math.rad(30), math.rad(0.01)), 0.5)
- LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.5, 0.3, 0.8) * CFrame.Angles(math.rad(-30), math.rad(-25), math.rad(0)), 0.5)
- RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-3)), 0.5)
- LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.42, 2.0, 0.2) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(3)), 0.5)
- checks1 = coroutine.wrap(function() -------Checks
- while true do
- if Torso.Velocity.Magnitude > 0.5 and running == false then
- position = "Walking"
- elseif Torso.Velocity.Magnitude < 0.5 and running == false then
- position = "Idle2"
- elseif Torso.Velocity.Magnitude < 0.5 and running == false then
- position = "Idle"
- elseif Torso.Velocity.Magnitude > 15 then
- position = "Running"
- else
- end
- wait()
- end
- end)
- checks1()
- local anims = coroutine.wrap(function()
- while true do
- sine = sine + change
- if position == "Walking" and attacking == false and running == false then
- change = 2.2
- walking = true
- RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.6, 0.1, 0) * CFrame.Angles(math.rad(-48 * math.sin(sine/8)), math.rad(-20 * math.sin(sine/8)), math.rad(-8)), 0.6)
- LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.6, 0.1, 0) * CFrame.Angles(math.rad(48 * math.sin(sine/8)), math.rad(-20 * math.sin(sine/8)), math.rad(8)), 0.6)
- ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(5 * math.cos(sine/8)), math.rad(0) + Torso.RotVelocity.Y / 30, math.cos(25 * math.cos(sine/10))), 0.3)
- HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0.3) * CFrame.Angles(math.rad(20), math.rad(0 - 50 * Head.RotVelocity.Y / 30, math.cos(15 * math.cos(sine/10))), math.rad(0 - 20 * Head.RotVelocity.Y / 30, math.cos(15 * math.cos(sine/10)))), 0.3)
- RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, 1.92 - 0.35 * math.cos(sine/6)/2.8, 0.2 - math.sin(sine/6)/3.4) * CFrame.Angles(math.rad(10) + -math.sin(sine/6)/2.3, math.rad(0)*math.cos(sine/1), math.rad(0) + RightLeg.RotVelocity.Y / 30, math.cos(25 * math.cos(sine/10))), 0.5)
- LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.5, 1.92 + 0.35 * math.cos(sine/6)/2.8, 0.2 + math.sin(sine/6)/3.4) * CFrame.Angles(math.rad(10) - -math.sin(sine/6)/2.3, math.rad(0)*math.cos(sine/1), math.rad(0) + LeftLeg.RotVelocity.Y / 30, math.cos(25 * math.cos(sine/10))), 0.5)
- elseif position == "Idle" and attacking == false and running == false then
- walking = false
- change = .9
- HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0.2) * CFrame.Angles(math.rad(15 + 2 * math.sin(sine/12)), math.rad(0), math.rad(0)), .3)
- ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, -.1+ .05 * math.sin(sine/8), 0) * CFrame.Angles(math.rad(0), math.rad(0 * math.cos(sine/8)), math.rad(0)), .3)
- TORSOLERP.C0 = TORSOLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
- RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.58, 0.1 + 0.05 * math.sin(sine/8), 0) * CFrame.Angles(math.rad(2 + 1 * math.sin(sine/8)), math.rad(2 - 2 * math.sin(sine/8)), math.rad(-8 - 3 * math.sin(sine/8))), .3)
- LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.58, 0.1 + 0.05 * math.sin(sine/8), 0) * CFrame.Angles(math.rad(2 + 1 * math.sin(sine/8)), math.rad(2 + 2 * math.sin(sine/8)), math.rad(8 + 3 * math.sin(sine/8))), .3)
- RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.45, 1.9 + .05 * math.sin(sine/8), 0) * CFrame.Angles(math.rad(0 * math.sin(sine/8)), math.rad(1 - 2 * math.sin(sine/8)), math.rad(-2 - .5 * math.sin(sine/8))), .3)
- LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.45, 1.9 + .05 * math.sin(sine/8), 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(2 + .5 * math.sin(sine/8))), .3)
- elseif position == "Idle2" and attacking == false and running == false then
- change = .7
- HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0 + 2 * math.sin(sine/12)), math.rad(40), math.rad(0)), .3)
- ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, -.1+ .05 * math.sin(sine/8), 0) * CFrame.Angles(math.rad(0), math.rad(40), math.rad(0)), .3)
- TORSOLERP.C0 = TORSOLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
- LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1,-.2,.4) * CFrame.Angles(math.rad(-87),math.rad(80 - 1 * math.sin(sine/8)),math.rad(0)), 0.3)
- RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-.7,-.2,.4) * CFrame.Angles(math.rad(-87),math.rad(-88 + .7 * math.sin(sine/8)),math.rad(0)), 0.3)
- RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.45, 1.9 + .05 * math.sin(sine/8), 0) * CFrame.Angles(math.rad(0 * math.sin(sine/8)), math.rad(1 - 2 * math.sin(sine/8)), math.rad(-2 - .5 * math.sin(sine/8))), .3)
- LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.45, 1.9 + .05 * math.sin(sine/8), 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(2 + .5 * math.sin(sine/8))), .3)
- elseif position == "Running" and attacking == false then
- change = 2
- RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.45+0.50*math.cos(sine/5),0.2-0.25*math.cos(sine/5),-0.2-0.5*math.cos(sine/5))*CFrame.Angles(math.rad(-20+120*math.cos(sine/5)),math.rad(0),math.rad(-4+30*math.cos(sine/5))),.3)
- LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.45+0.50*math.cos(sine/5),0.2-0.25*math.cos(sine/5),-0.2+0.5*math.cos(sine/5))*CFrame.Angles(math.rad(-20-120*math.cos(sine/5)),math.rad(0),math.rad(4+30*math.cos(sine/5))),.3)
- ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, -.05, 0) * CFrame.Angles(math.rad(-20 - 4 * math.cos(sine/4)), math.rad(0 + 0 * math.cos(sine/8)), math.rad(0) + Torso.RotVelocity.Y / 30, math.cos(10 * math.cos(sine/10))), 0.3)
- HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, .2) * CFrame.Angles(math.rad(-10), math.rad(0 + 20 * Head.RotVelocity.Y / 30, math.cos(15 * math.cos(sine/10))), math.rad(0 - 20 * Head.RotVelocity.Y / 30, math.cos(15 * math.cos(sine/10)))), 0.3)
- RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, 1.8 - 0.45 * math.cos(sine/4)/2.8, -0.05) * CFrame.Angles(math.rad(-35)*math.sin(sine/4), math.rad(1)*math.cos(sine/1), math.rad(0) + RightLeg.RotVelocity.Y / 90, math.cos(25 * math.cos(sine/6))), 0.3)
- LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.5, 1.8 + 0.45 * math.cos(sine/4)/2.8, -0.05) * CFrame.Angles(math.rad(35)*math.sin(sine/4), math.rad(-1)*math.cos(sine/1), math.rad(0) + LeftLeg.RotVelocity.Y / 90, math.cos(25 * math.cos(sine/6))), 0.3)
- end
- wait()
- end
- end)
- anims()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement