Dark_EccentricYT

Untitled

Dec 30th, 2016
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.45 KB | None | 0 0
  1. do --CFrame lerp (stravant, clerp by AntiBoomz0r)
  2. local function QuaternionFromCFrame(cf)
  3. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  4. local trace = m00 + m11 + m22
  5. if trace > 0 then
  6. local s = math.sqrt(1 + trace)
  7. local recip = 0.5/s
  8. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  9. else
  10. local i = 0
  11. if m11 > m00 then
  12. i = 1
  13. end
  14. if m22 > (i == 0 and m00 or m11) then
  15. i = 2
  16. end
  17. if i == 0 then
  18. local s = math.sqrt(m00-m11-m22+1)
  19. local recip = 0.5/s
  20. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  21. elseif i == 1 then
  22. local s = math.sqrt(m11-m22-m00+1)
  23. local recip = 0.5/s
  24. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  25. elseif i == 2 then
  26. local s = math.sqrt(m22-m00-m11+1)
  27. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  28. end
  29. end
  30. end
  31. local function QuaternionToCFrame(px, py, pz, x, y, z, w)
  32. local xs, ys, zs = x + x, y + y, z + z
  33. local wx, wy, wz = w*xs, w*ys, w*zs
  34. local xx = x*xs
  35. local xy = x*ys
  36. local xz = x*zs
  37. local yy = y*ys
  38. local yz = y*zs
  39. local zz = z*zs
  40. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  41. end
  42. function QuaternionSlerp(a, b, t)
  43. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  44. local startInterp, finishInterp;
  45. if cosTheta >= 0.0001 then
  46. if (1 - cosTheta) > 0.0001 then
  47. local theta = math.acos(cosTheta)
  48. local invSinTheta = 1/math.sin(theta)
  49. startInterp = math.sin((1-t)*theta)*invSinTheta
  50. finishInterp = math.sin(t*theta)*invSinTheta
  51. else
  52. startInterp = 1-t
  53. finishInterp = t
  54. end
  55. else
  56. if (1+cosTheta) > 0.0001 then
  57. local theta = math.acos(-cosTheta)
  58. local invSinTheta = 1/math.sin(theta)
  59. startInterp = math.sin((t-1)*theta)*invSinTheta
  60. finishInterp = math.sin(t*theta)*invSinTheta
  61. else
  62. startInterp = t-1
  63. finishInterp = t
  64. end
  65. end
  66. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  67. end
  68. function clerp(a,b,t)
  69. local qa = {QuaternionFromCFrame(a)}
  70. local qb = {QuaternionFromCFrame(b)}
  71. local ax, ay, az = a.x, a.y, a.z
  72. local bx, by, bz = b.x, b.y, b.z
  73. local _t = 1-t
  74. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  75. end
  76. end
  77.  
  78. plr = game:service'Players'.LocalPlayer
  79. char = plr.Character
  80. mouse = plr:GetMouse()
  81. humanoid = char:findFirstChild("Humanoid")
  82. torso = char:findFirstChild("Torso")
  83. head = char.Head
  84. ra = char:findFirstChild("Right Arm")
  85. la = char:findFirstChild("Left Arm")
  86. rl = char:findFirstChild("Right Leg")
  87. ll = char:findFirstChild("Left Leg")
  88. rs = torso:findFirstChild("Right Shoulder")
  89. ls = torso:findFirstChild("Left Shoulder")
  90. rh = torso:findFirstChild("Right Hip")
  91. lh = torso:findFirstChild("Left Hip")
  92. neck = torso:findFirstChild("Neck")
  93. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  94. animate = char:findFirstChild("Animate")
  95. if animate then
  96. animate:Destroy()
  97. end
  98. rootpart = char:findFirstChild("HumanoidRootPart")
  99. camera = workspace.CurrentCamera
  100.  
  101. gun = Instance.new("Model", char)
  102. gun.Name = "GunModel"
  103.  
  104. local rm = Instance.new("Motor", torso)
  105. rm.C0 = CFrame.new(1.5, 0.5, 0)
  106. rm.C1 = CFrame.new(0, 0.5, 0)
  107. rm.Part0 = torso
  108. rm.Part1 = ra
  109.  
  110. local lm = Instance.new("Motor", torso)
  111. lm.C0 = CFrame.new(-1.5, 0.5, 0)
  112. lm.C1 = CFrame.new(0, 0.5, 0)
  113. lm.Part0 = torso
  114. lm.Part1 = la
  115.  
  116. local rlegm = Instance.new("Motor", torso)
  117. rlegm.C0 = CFrame.new(0.5, -1, 0)
  118. rlegm.C1 = CFrame.new(0, 1, 0)
  119. rlegm.Part0 = torso
  120. rlegm.Part1 = rl
  121. rlegm.Name = "Right Hip"
  122.  
  123. local llegm = Instance.new("Motor", torso)
  124. llegm.C0 = CFrame.new(-0.5, -1, 0)
  125. llegm.C1 = CFrame.new(0, 1, 0)
  126. llegm.Part0 = torso
  127. llegm.Part1 = ll
  128. llegm.Name = "Left Hip"
  129.  
  130. neck.C0 = CFrame.new(0, 1, 0)
  131. neck.C1 = CFrame.new(0, -0.5, 0)
  132.  
  133. rj.C0 = CFrame.new(0, -1.5, 0)
  134. rj.C1 = CFrame.new(0, -1.5, 0)
  135.  
  136. --[[local hydrotankbase = Instance.new("Part", gun)
  137. hydrotankbase.BrickColor = BrickColor.Black()
  138. hydrotankbase.FormFactor = 'Custom'
  139. hydrotankbase.CanCollide = false
  140. hydrotankbase.Material = 'SmoothPlastic'
  141. hydrotankbase.TopSurface = 'SmoothNoOutlines'
  142. hydrotankbase.BottomSurface = 'SmoothNoOutlines'
  143. hydrotankbase.LeftSurface = 'SmoothNoOutlines'
  144. hydrotankbase.RightSurface = 'SmoothNoOutlines'
  145. hydrotankbase.BackSurface = 'SmoothNoOutlines'
  146. hydrotankbase.FrontSurface = 'SmoothNoOutlines'
  147. hydrotankbase.Size = Vector3.new(1.2, .2, 1.2)
  148. Instance.new("CylinderMesh", hydrotankbase)
  149. local weld = Instance.new("Weld", hydrotankbase)
  150. weld.C0 = CFrame.new(torso.Size.x/2 - hydrotankbase.Size.x/2, .45, -torso.Size.z/2 - (hydrotankbase.Size.z/3))
  151. weld.Part0 = hydrotankbase
  152. weld.Part1 = torso
  153. local hydrotankbase2 = hydrotankbase:clone()
  154. hydrotankbase2.Parent = gun
  155. local weld = Instance.new("Weld", hydrotankbase)
  156. weld.C0 = CFrame.new(-torso.Size.x/2 + hydrotankbase2.Size.x/2, .45, -torso.Size.z/2 - (hydrotankbase2.Size.z/3))
  157. weld.Part0 = hydrotankbase2
  158. weld.Part1 = torso
  159. local hydroglass = hydrotankbase:clone()
  160. hydroglass.Parent = gun
  161. hydroglass.Size = Vector3.new(1.1, 1.5, 1.1)
  162. hydroglass.BrickColor = BrickColor.White()
  163. hydroglass.Transparency = .2
  164. local weld = Instance.new("Weld", hydroglass)
  165. weld.C0 = CFrame.new(0, -hydrotankbase.Size.y/2 - hydroglass.Size.y/2, 0)
  166. weld.Part0 = hydroglass
  167. weld.Part1 = hydrotankbase
  168. local hydroglass2 = hydroglass:clone()
  169. hydroglass2.Parent = gun
  170. local weld = Instance.new("Weld", hydrotankbase)
  171. weld.C0 = CFrame.new(0, -hydrotankbase.Size.y/2 - hydroglass2.Size.y/2, 0)
  172. weld.Part0 = hydroglass2
  173. weld.Part1 = hydrotankbase2
  174. local hydrotanktop = hydrotankbase:clone()
  175. hydrotanktop.Parent = gun
  176. local weld = Instance.new("Weld", hydrotankbase)
  177. weld.C0 = CFrame.new(0,- hydroglass2.Size.y/2 - hydrotanktop.Size.y/2,0)
  178. weld.Part0 = hydrotanktop
  179. weld.Part1 = hydroglass
  180. local hydrotanktop2 = hydrotankbase:clone()
  181. hydrotanktop2.Parent = gun
  182. local weld = Instance.new("Weld", hydrotankbase)
  183. weld.C0 = CFrame.new(0,- hydroglass2.Size.y/2 - hydrotanktop2.Size.y/2,0)
  184. weld.Part0 = hydrotanktop2
  185. weld.Part1 = hydroglass2
  186.  
  187. local hydrogen = hydrotankbase:clone()
  188. hydrogen.Parent = gun
  189. hydrogen.Material = 'Pebble'
  190. hydrogen.Size = Vector3.new(1, 1.5, 1)
  191. hydrogen.BrickColor = BrickColor.Blue()
  192. local weld = Instance.new("Weld", hydrogen)
  193. weld.C0 = CFrame.new(0, -hydrotankbase.Size.y/2 - hydroglass.Size.y/2, 0)
  194. weld.Part0 = hydrogen
  195. weld.Part1 = hydrotankbase
  196. local hydrogen2 = hydrogen:clone()
  197. hydrogen2.Parent = gun
  198. local weld = Instance.new("Weld", hydrogen2)
  199. weld.C0 = CFrame.new(0, -hydrotankbase.Size.y/2 - hydroglass2.Size.y/2, 0)
  200. weld.Part0 = hydrogen2
  201. weld.Part1 = hydrotankbase2]]--
  202.  
  203. rsc0 = rm.C0
  204. lsc0 = lm.C0
  205. neckc0 = neck.C0
  206. rootc0 = rj.C0
  207. llc0 = llegm.C0
  208. rlc0 = rlegm.C0
  209. speed = 0.25
  210. angle = 0
  211. mvmnt = 0
  212. anglespeed = 1
  213. humanoid.WalkSpeed = 8
  214. ctrl = false
  215. stopsprint = false
  216. action = false
  217. sprinting = false
  218. mouse.KeyDown:connect(function(k)
  219. repeat wait() until action == false
  220. if not action then
  221. if k:byte() == 48 then
  222. sprinting = true
  223. humanoid.WalkSpeed = 16
  224. end
  225. if k == '2' then
  226. ctrl = true
  227. humanoid.WalkSpeed = 5
  228. end
  229. end
  230. end)
  231.  
  232. mouse.KeyUp:connect(function(k)
  233. repeat wait() until action == false
  234. if not action then
  235. repeat wait() until action == false
  236. if k:byte() == 48 then
  237. sprinting = false
  238. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 10 and hitz then
  239. action = 'StopSprinting'
  240. end
  241. humanoid.WalkSpeed = 8
  242. if ctrl then
  243. humanoid.WalkSpeed = 5
  244. end
  245. end
  246. if k == '2' then
  247. ctrl = false
  248. humanoid.WalkSpeed = 8
  249. end
  250. end
  251. end)
  252.  
  253. Controls = game:service'ControllerService':children()[1]
  254.  
  255. local fakehead = head:clone()
  256. fakehead.Parent = head
  257. head.Transparency = 1
  258. for i,v in pairs(fakehead:children()) do
  259. if v:IsA'Sound' or v:IsA'Sound' then
  260. v:Destroy()
  261. end
  262. end
  263.  
  264. waitingloop = false
  265.  
  266. local fakeweld = Instance.new("Weld", head)
  267. fakeweld.Part0 = head
  268. fakeweld.Part1 = fakehead
  269.  
  270. humanoid.Jumping:connect(function()
  271. if not action then
  272. action = 'Jumping'
  273. end
  274. end)
  275.  
  276. game:service'RunService'.RenderStepped:connect(function()
  277. if not loopedaction then
  278. local rscf = rsc0
  279. local lscf = lsc0
  280. local rlcf = rlc0
  281. local llcf = llc0
  282. local rjcf = rootc0
  283. local ncf = neckc0
  284. local rayz = Ray.new(rootpart.Position, Vector3.new(0, -4.1, 0))
  285. local hitz, enz = workspace:findPartOnRay(rayz, char)
  286. angle = (angle % 100) + anglespeed/10
  287. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  288. if action ~= false then
  289. if action == 'StopSprinting' then
  290. Controls.Parent = nil
  291. local bodyvelocity = Instance.new("BodyVelocity", rootpart)
  292. bodyvelocity.maxForce = Vector3.new(1/0,0,1/0)
  293. bodyvelocity.velocity = rootpart.CFrame.lookVector * 16
  294. ncf = neckc0 * CFrame.Angles(math.rad(-15), -math.rad(65), 0)
  295. rscf = rsc0 * CFrame.Angles(math.rad(-22), 0, math.rad(20.5))
  296. lscf = lsc0 * CFrame.Angles(math.rad(-54.5), 0, -math.rad(18.5))
  297. rjcf = rootc0 * CFrame.new(0, -.35, 0) * CFrame.Angles(math.rad(35), math.rad(70), 0)
  298. llcf = llc0 * CFrame.new(0, .25, -.25) * CFrame.Angles(0, 0, -math.rad(58))
  299. rlcf = rlcf * CFrame.new(0, -.25, -.15) * CFrame.Angles(0, 0, math.rad(10))
  300. loopedaction = true
  301. for i = 0, 25 do
  302. bodyvelocity.velocity = rootpart.CFrame.lookVector * (16 - i/2)
  303. rm.C0 = clerp(rm.C0,rscf,speed)
  304. lm.C0 = clerp(lm.C0,lscf,speed)
  305. rj.C0 = clerp(rj.C0,rjcf,speed)
  306. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  307. llegm.C0 = clerp(llegm.C0,llcf,speed)
  308. neck.C0 = clerp(neck.C0,ncf,speed)
  309. wait()
  310. end
  311. bodyvelocity:Destroy()
  312. loopedaction = false
  313. stopsprint = false
  314. action = false
  315. Controls.Parent = game:service'ControllerService'
  316. humanoid.WalkSpeed = 8
  317. if ctrl then
  318. humanoid.WalkSpeed = 5
  319. end
  320. end
  321. if action == 'Jumping' then
  322. loopedaction = true
  323. ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  324. rjcf = rootc0 * CFrame.Angles(math.sin(angle)*0.025, 0, 0)
  325. rscf = rsc0 * CFrame.Angles(-math.pi/16, -math.sin(angle)*0.08, 0)
  326. lscf = lsc0 * CFrame.Angles(-math.pi/17, math.sin(angle)*0.08, 0)
  327. rlcf = rlc0 * CFrame.Angles(-math.pi/16+-math.sin(angle)*0.125, -math.sin(angle)*0.08, math.rad(2.5))
  328. llcf = llc0 * CFrame.Angles(-math.pi/17+-math.sin(angle)*0.125, math.sin(angle)*0.08, -math.rad(2.5))
  329. for i = 0, 12 do
  330. rm.C0 = clerp(rm.C0,rscf,speed)
  331. lm.C0 = clerp(lm.C0,lscf,speed)
  332. rj.C0 = clerp(rj.C0,rjcf,speed)
  333. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  334. llegm.C0 = clerp(llegm.C0,llcf,speed)
  335. neck.C0 = clerp(neck.C0,ncf,speed)
  336. wait()
  337. end
  338. loopedaction = false
  339. action = false
  340. end
  341. end
  342. if goinup and torso.Velocity.y <= 2 then
  343. goinup = false
  344. if ctrl then
  345. humanoid.WalkSpeed = 5
  346. elseif sprinting then
  347. humanoid.WalkSpeed = 16
  348. elseif not sprinting and not ctrl then
  349. humanoid.WalkSpeed = 8
  350. end
  351. end
  352. if not action then
  353. if not hitz then
  354. anglespeed = 1
  355. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 15 then
  356. if not waitingloop then
  357. waitingloop = true
  358. coroutine.wrap(function()
  359. repeat wait() until hitz
  360. action = 'StopSprinting'
  361. end)()
  362. end
  363. end
  364. ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  365. rjcf = rootc0 * CFrame.Angles(math.sin(angle)*0.025, 0, 0)
  366. rscf = rsc0 * CFrame.Angles(-math.pi/19, -math.sin(angle)*0.08, math.rad(20.5))
  367. lscf = lsc0 * CFrame.Angles(-math.pi/24, math.sin(angle)*0.08, -math.rad(20.5))
  368. rlcf = rlc0 * CFrame.Angles(math.pi/24+-math.sin(angle)*0.025, -math.sin(angle)*0.08, math.rad(2.5))
  369. llcf = llc0 * CFrame.Angles(math.pi/24+-math.sin(angle)*0.025, math.sin(angle)*0.08, -math.rad(2.5))
  370. elseif torso.Velocity.y >= 2 and hitz then
  371. anglespeed = 1.75
  372. goinup = true
  373. humanoid.WalkSpeed = 5
  374. rjcf = rootc0 * CFrame.Angles(-math.pi/64, 0, 0)
  375. rscf = rsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(angle)*.5, 0, -math.abs(mvmnt)*0.02)
  376. lscf = lsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(-angle)*.5, 0, math.abs(mvmnt)*0.02)
  377. rlcf = rlc0 * CFrame.new(0, .45+math.abs(math.sin(angle))*.4, -.25+math.sin(angle)*0.2) * CFrame.Angles(math.sin(-angle)*.45, 0, math.rad(.5))
  378. llcf = llc0 * CFrame.new(0, .85-math.abs(math.sin(angle))*.4, -.25-math.sin(angle)*0.2) * CFrame.Angles(math.sin(angle)*.45, 0, -math.rad(.5))
  379. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 2 then
  380. if not goinup then
  381. if stopsprint then
  382. action = 'StopSprinting'
  383. end
  384. anglespeed = 0.15
  385. if ctrl then
  386. ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  387. rscf = rsc0 * CFrame.Angles(0, -math.sin(angle)*0.08, 0)
  388. lscf = lsc0 * CFrame.Angles(0, math.sin(angle)*0.08, 0)
  389. rjcf = rootc0 * CFrame.new(0, -1.25, 0)
  390. llcf = llc0 * CFrame.new(0, 0, -.45) * CFrame.Angles(-math.pi/2.2, 0, 0)
  391. rlcf = rlcf * CFrame.new(0, 1.25, -.85)
  392. elseif not ctrl then
  393. ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  394. rjcf = rootc0 * CFrame.Angles(math.sin(angle)*0.025, 0, 0)
  395. rscf = rsc0 * CFrame.Angles(0, -math.sin(angle)*0.08, 0)
  396. lscf = lsc0 * CFrame.Angles(0, math.sin(angle)*0.08, 0)
  397. rlcf = rlc0 * CFrame.Angles(-math.sin(angle)*0.025, -math.sin(angle)*0.08, math.rad(2.5))
  398. llcf = llc0 * CFrame.Angles(-math.sin(angle)*0.025, math.sin(angle)*0.08, -math.rad(2.5))
  399. end
  400. end
  401. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 10 then
  402. if not goinup then
  403. if stopsprint then
  404. action = 'StopSprinting'
  405. end
  406. anglespeed = 1.5
  407. if ctrl then
  408. rscf = rsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(angle)*.5, 0, -math.abs(mvmnt)*0.02)
  409. lscf = lsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(-angle)*.5, 0, math.abs(mvmnt)*0.02)
  410. rjcf = rootc0 * CFrame.new(0, -.7, 0) * CFrame.Angles(-math.pi/32, 0, 0)
  411. llcf = llc0 * CFrame.new(0, .65, -.5 + (-.4+math.sin(angle)*0.25)) * CFrame.Angles(math.pi/18 + -math.pi/10 - math.sin(angle)*.45, 0, 0)
  412. rlcf = rlcf * CFrame.new(0, .65, -.5 + (-.25-math.sin(angle)*0.25)) * CFrame.Angles(math.pi/18 + -math.pi/10 + math.sin(angle)*.45, 0, 0)
  413. else
  414. rjcf = rootc0 * CFrame.Angles(-math.pi/64, 0, 0)
  415. rscf = rsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(angle)*.5, 0, -math.abs(mvmnt)*0.02)
  416. lscf = lsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(-angle)*.5, 0, math.abs(mvmnt)*0.02)
  417. rlcf = rlc0 * CFrame.new(0, 0, -.15+math.sin(angle)*0.1) * CFrame.Angles(math.sin(-angle)*.45, 0, math.rad(.5))
  418. llcf = llc0 * CFrame.new(0, 0, -.15-math.sin(angle)*0.1) * CFrame.Angles(math.sin(angle)*.45, 0, -math.rad(.5))
  419. end
  420. end
  421. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 15 then
  422. if not goinup then
  423. stopsprint = true --when released
  424. anglespeed = 2
  425. local RotVelocityZ = torso.RotVelocity.Y
  426. if RotVelocityZ >= 15 then
  427. RotVelocityZ = 15
  428. elseif RotVelocityZ <= -15 then
  429. RotVelocityZ = -15
  430. end
  431. ncf = neckc0 * CFrame.Angles(0, -math.sin(angle)*.1, 0)
  432. rscf = rsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(angle)*1.1, 0, -math.abs(mvmnt)*0.02)
  433. lscf = lsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(-angle)*1.1, 0, math.abs(mvmnt)*0.02)
  434. rjcf = rootc0 * CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/18, math.sin(angle)*.1, math.sin(angle)*.045 + math.rad(RotVelocityZ)*2.5)
  435. rlcf = rlc0 * CFrame.new(0, 0, -.6+math.abs(mvmnt)*0.125) * CFrame.Angles(-math.pi/18+math.sin(-angle)*1.3, 0, math.rad(.5))
  436. llcf = llc0 * CFrame.new(0, 0, -math.abs(mvmnt)*0.125) * CFrame.Angles(-math.pi/18+math.sin(angle)*1.3, 0, -math.rad(.5))
  437. end
  438. end
  439. end
  440. rm.C0 = clerp(rm.C0,rscf,speed)
  441. lm.C0 = clerp(lm.C0,lscf,speed)
  442. rj.C0 = clerp(rj.C0,rjcf,speed)
  443. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  444. llegm.C0 = clerp(llegm.C0,llcf,speed)
  445. neck.C0 = clerp(neck.C0,ncf,speed)
  446. end
  447. end)
Add Comment
Please, Sign In to add comment