Advertisement
Aeyao

animate

Apr 11th, 2016
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.34 KB | None | 0 0
  1. print("walkanim8 by ASBF loaded")
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10. local Player = game.Players.LocalPlayer
  11. local Character = game.Workspace:WaitForChild(Player.Name)
  12. local Head = Character:WaitForChild("Head")
  13. local Torso = Character:WaitForChild("Torso")
  14. local LArm = Character:WaitForChild("Left Arm")
  15. local RArm = Character:WaitForChild("Right Arm")
  16. local LLeg = Character:WaitForChild("Left Leg")
  17. local RLeg = Character:WaitForChild("Right Leg")
  18.  
  19. Character.Humanoid.WalkSpeed = 10
  20.  
  21.  
  22. local Weld = Instance.new("Weld",LArm)
  23. Weld.Part0 = LArm
  24. Weld.Part1 = Torso
  25. Weld.C0 = CFrame.new(1.5,0,0)
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32. local WeldR = Instance.new("Weld",RArm)
  33. WeldR.Part0 = RArm
  34. WeldR.Part1 = Torso
  35. WeldR.C0 = CFrame.new(-1.5,0,0)
  36.  
  37.  
  38. local WeldRL = Instance.new("Weld",RLeg)
  39. WeldRL.Part0 = RLeg
  40. WeldRL.Part1 = Torso
  41. WeldRL.C0 = CFrame.new(-0.5,2,0)
  42.  
  43. local WeldLL = Instance.new("Weld",LLeg)
  44. WeldLL.Part0 = LLeg
  45. WeldLL.Part1 = Torso
  46. WeldLL.C0 = CFrame.new(0.5,2,0)
  47.  
  48. local WeldT = Instance.new("Weld",Head)
  49. WeldT.Part0 = Head
  50. WeldT.Part1 = Torso
  51. WeldT.C0 = CFrame.new(0,-1.5,0)
  52.  
  53.  
  54.  
  55.  
  56. local RA = {
  57.  
  58. CFrame.new(1.5,0,0.4) * CFrame.Angles(math.rad(-45),0,0),
  59.  
  60. CFrame.new(1.5,0,-0.3) * CFrame.Angles(math.rad(45),0,0)
  61. }
  62.  
  63.  
  64. local LA = {
  65.  
  66. CFrame.new(-1.5,0,-0.4) * CFrame.Angles(math.rad(45),0,0),
  67.  
  68. CFrame.new(-1.5,0,0.3) * CFrame.Angles(math.rad(-45),0,0)
  69.  
  70. }
  71.  
  72. local RL = {
  73.  
  74. CFrame.new(-0.5,2.2,-0.2) * CFrame.Angles(math.rad(-30),0,0),
  75.  
  76. CFrame.new(-0.5,2,0.2) * CFrame.Angles(math.rad(30),0,0)
  77.  
  78. }
  79.  
  80. local LL = {
  81.  
  82. CFrame.new(0.5,2,0.2) * CFrame.Angles(math.rad(30),0,0),
  83.  
  84. CFrame.new(0.5,2.2,-0.2) * CFrame.Angles(math.rad(-30),0,0)
  85.  
  86. }
  87.  
  88. local T = {
  89.  
  90. CFrame.new(0,-1.5,0) * CFrame.Angles(math.rad(0),0,0),
  91.  
  92. CFrame.new(0,-1.5,0) * CFrame.Angles(math.rad(4),0,0)
  93.  
  94. }
  95.  
  96.  
  97. local Target = RA[1]
  98.  
  99. local rTarget = LA[1]
  100.  
  101. local rlTarget = LA[1]
  102.  
  103. local llTarget = LA[1]
  104.  
  105. local TTarget = T[1]
  106.  
  107. function Animation1()
  108.  
  109. Target = RA[1]
  110.  
  111. rTarget = LA[1]
  112.  
  113. rlTarget = RL[1]
  114.  
  115. llTarget = LL[1]
  116.  
  117. TTarget = T[1]
  118.  
  119. for i,v in pairs(RA,LA,RL,LL.T) do
  120.  
  121. Target = RA[i]
  122.  
  123. rTarget = LA[i]
  124.  
  125. rlTarget = RL[i]
  126.  
  127. llTarget = LL[i]
  128.  
  129. TTarget = T[i]
  130. wait(0.3)
  131.  
  132. end
  133.  
  134.  
  135. TTarget = T[1]
  136.  
  137. Target = RA[1]
  138.  
  139. rTarget = LA[1]
  140.  
  141. rlTarget = RL[1]
  142.  
  143. llTarget = LL[1]
  144.  
  145. end
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154. --[[function Animation2()
  155.  
  156. rTarget = Anim2[1]
  157.  
  158. for r,v in pairs(Anim2) do
  159. rTarget = Anim2[2]
  160. wait(0.3)
  161. end
  162.  
  163. rTarget = Anim2[1]
  164.  
  165.  
  166. end]]
  167.  
  168.  
  169.  
  170.  
  171.  
  172. local Speed = 0.1
  173. wait(3)
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181. rs = game:GetService'RunService'.RenderStepped
  182.  
  183. cam = workspace.CurrentCamera
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190. game:GetService("RunService").Stepped:connect(function()
  191. local vel = math.abs(Torso.Velocity.X) + math.abs(Torso.Velocity.Z)
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198. if vel > .5 then
  199. rs:wait()
  200.  
  201. Weld.C0 = Weld.C0:lerp(Target,Speed)
  202.  
  203. WeldR.C0 = WeldR.C0:lerp(rTarget,Speed)
  204.  
  205.  
  206. WeldRL.C0 = WeldRL.C0:lerp(rlTarget,Speed)
  207.  
  208. WeldLL.C0 = WeldLL.C0:lerp(llTarget,Speed)
  209.  
  210. WeldT.C0 = WeldT.C0:lerp(TTarget,Speed)
  211.  
  212. else
  213.  
  214. Weld.C0 = Weld.C0:lerp(CFrame.new(1.5,0,0),Speed)
  215.  
  216. WeldR.C0 = WeldR.C0:lerp(CFrame.new(-1.5,0,0),Speed)
  217.  
  218. WeldRL.C0 = WeldRL.C0:lerp(CFrame.new(-0.5,2,0),Speed)
  219.  
  220. WeldLL.C0 = WeldLL.C0:lerp(CFrame.new(0.5,2,0),Speed)
  221.  
  222. WeldT.C0 = WeldT.C0:lerp(CFrame.new(0,-1.5,0),Speed)
  223.  
  224. end
  225.  
  226. end)
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236. while wait() do
  237.  
  238. Animation1()
  239.  
  240. end
  241.  
  242. --[[while wait() do
  243.  
  244. Animation2()
  245.  
  246. end]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement