Advertisement
Guest User

Untitled

a guest
Feb 25th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.08 KB | None | 0 0
  1. Player=game:GetService("Players").LocalPlayer
  2. Character=Player.Character
  3. PlayerGui=Player.PlayerGui
  4. Backpack=Player.Backpack
  5. Torso=Character.Torso
  6. Head=Character.Head
  7. Humanoid=Character.Humanoid
  8. ---------------------------
  9. LeftArm=Character["Left Arm"]
  10. LeftLeg=Character["Left Leg"]
  11. RightArm=Character["Right Arm"]
  12. RightLeg=Character["Right Leg"]
  13. LS=Torso["Left Shoulder"]
  14. LH=Torso["Left Hip"]
  15. RS=Torso["Right Shoulder"]
  16. RH=Torso["Right Hip"]
  17. -------------------------
  18. vt=Vector3.new
  19. cf=CFrame.new
  20. --------------------------
  21. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  22. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  23. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  24. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  25. ------------------------
  26. RSH, LSH=nil, nil
  27. -----------
  28. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  29. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  30. LH=Torso["Left Hip"]
  31. RH=Torso["Right Hip"]
  32. TorsoColor=Torso.BrickColor
  33. function NoOutline(Part)
  34. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  35. end
  36. player=Player
  37. ch=Character
  38. RSH=ch.Torso["Right Shoulder"]
  39. LSH=ch.Torso["Left Shoulder"]
  40. --
  41. RSH.Parent=nil
  42. LSH.Parent=nil
  43. --
  44. RW.Name="Right Shoulder"
  45. RW.Part0=ch.Torso
  46. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  47. RW.C1=cf(0, 0.5, 0)
  48. RW.Part1=ch["Right Arm"]
  49. RW.Parent=ch.Torso
  50. --
  51. LW.Name="Left Shoulder"
  52. LW.Part0=ch.Torso
  53. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  54. LW.C1=cf(0, 0.5, 0)
  55. LW.Part1=ch["Left Arm"]
  56. LW.Parent=ch.Torso
  57. ------------------------
  58. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  59. local velderp=RootPart.Velocity.y
  60. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  61. -------------animating yay-------------------------------------
  62. if RootPart.Velocity.y > 1 and hitfloor==nil then
  63. Anim="Jump"
  64. if attack==false then
  65. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  66. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(0)),.2)
  67. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(10), math.rad(0), math.rad(20)),.2)
  68. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(10), math.rad(0), math.rad(-20)),.2)
  69. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),.2)
  70. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.2)
  71. end
  72. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  73. Anim="Fall"
  74. if attack==false then
  75. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(10)),.2)
  76. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(-10)),.2)
  77. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(30)),.2)
  78. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-30)),.2)
  79. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(20),math.rad(90),math.rad(0)),.2)
  80. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(-30),math.rad(-90),math.rad(0)),.2)
  81. end
  82. elseif torvel<1 and hitfloor~=nil then
  83. Anim="Idle"
  84. if attack==false then
  85. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(50)),.2)
  86. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-50)),.2)
  87. RW.C0 = clerp(RW.C0, CFrame.new(.9, 0.5, -.5) * angles(math.rad(80), math.rad(0), math.rad(-50)),.2)
  88. LW.C0 = clerp(LW.C0, CFrame.new(-.8, 0.3, -.5) * angles(math.rad(60), math.rad(11), math.rad(70)),.2)
  89. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(70),math.rad(0)),.2)
  90. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.2)
  91. end
  92. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  93. Anim="Walk"
  94. if attack==false then
  95. change=3
  96. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(50)),.2)
  97. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-5),math.rad(2),math.rad(-50)),.2)
  98. RW.C0 = clerp(RW.C0, CFrame.new(.9, 0.5, -.5) * angles(math.rad(80), math.rad(0), math.rad(-50)),.2)
  99. LW.C0 = clerp(LW.C0, CFrame.new(-.8, 0.3, -.5) * angles(math.rad(60), math.rad(11), math.rad(70)),.2)
  100. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(70),math.rad(0)),.2)
  101. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.2)
  102. end
  103. elseif torvel>=22 and hitfloor~=nil then
  104. Anim="Run"
  105. if attack==false then
  106. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  107. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  108. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)),.2)
  109. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)),.2)
  110. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),.2)
  111. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.2)
  112. end
  113. end
  114. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement