Advertisement
Chxp

Untitled

Aug 6th, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.72 KB | None | 0 0
  1. do
  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. local 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.  
  77. end
  78. do
  79. plr = game:service'Players'.LocalPlayer
  80. char = plr.Character
  81. mouse = plr:GetMouse()
  82. humanoid = char:findFirstChild("Humanoid")
  83. torso = char:findFirstChild("Torso")
  84. head = char.Head
  85. ra = char:findFirstChild("Right Arm")
  86. la = char:findFirstChild("Left Arm")
  87. rl = char:findFirstChild("Right Leg")
  88. ll = char:findFirstChild("Left Leg")
  89. rs = torso:findFirstChild("Right Shoulder")
  90. ls = torso:findFirstChild("Left Shoulder")
  91. rh = torso:findFirstChild("Right Hip")
  92. lh = torso:findFirstChild("Left Hip")
  93. neck = torso:findFirstChild("Neck")
  94. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  95. anim = char:findFirstChild("Animate")
  96. rootpart = char:findFirstChild("HumanoidRootPart")
  97. camera = workspace.CurrentCamera
  98. if anim then
  99. anim:Destroy()
  100. end
  101.  
  102. local rm = Instance.new("Motor", torso)
  103. rm.C0 = CFrame.new(1.5, 0.5, 0)
  104. rm.C1 = CFrame.new(0, 0.5, 0)
  105. rm.Part0 = torso
  106. rm.Part1 = ra
  107. local lm = Instance.new("Motor", torso)
  108. lm.C0 = CFrame.new(-1.5, 0.5, 0)
  109. lm.C1 = CFrame.new(0, 0.5, 0)
  110. lm.Part0 = torso
  111. lm.Part1 = la
  112.  
  113. local rlegm = Instance.new("Motor", torso)
  114. rlegm.C0 = CFrame.new(0.5, -1, 0)
  115. rlegm.C1 = CFrame.new(0, 1, 0)
  116. rlegm.Part0 = torso
  117. rlegm.Part1 = rl
  118. local llegm = Instance.new("Motor", torso)
  119. llegm.C0 = CFrame.new(-0.5, -1, 0)
  120. llegm.C1 = CFrame.new(0, 1, 0)
  121. llegm.Part0 = torso
  122. llegm.Part1 = ll
  123.  
  124. neck.C0 = CFrame.new(0, 1, 0)
  125. neck.C1 = CFrame.new(0, -0.5, 0)
  126.  
  127.  
  128. rj.C0 = CFrame.new()
  129. rj.C1 = CFrame.new()
  130.  
  131. local sound = Instance.new("Sound", head)
  132. sound.SoundId = "http://www.roblox.com/asset/?id=130797915"
  133. sound.Volume = 0.8
  134. sound.Looped = true
  135.  
  136. for _,v in pairs(char:GetChildren()) do if v.ClassName=="Hat" then v:remove() end end
  137. for _,v in pairs(head:GetChildren()) do if v.ClassName=="Decal" then v:remove() end end
  138.  
  139. cup = Instance.new("PointLight", head)
  140. cup.Range = 10
  141. cup.Color = Color3.new(0,255,0)
  142.  
  143. local speed = 0.3
  144. local angle = 0
  145. local humanwalk = true
  146. local anglespeed = 1
  147. rsc0 = rm.C0
  148. lsc0 = lm.C0
  149. llc0 = llegm.C0
  150. rlc0 = rlegm.C0
  151. neckc0 = neck.C0
  152.  
  153. local controllerService = game:GetService("ControllerService")
  154. local controller = controllerService:GetChildren()[1]
  155.  
  156. controller.Parent = nil
  157.  
  158. Instance.new("HumanoidController", game:service'ControllerService')
  159. Instance.new("SkateboardController", game:service'ControllerService')
  160. Instance.new("VehicleController", game:service'ControllerService')
  161. local controller = controllerService:GetChildren()[1]
  162. print("Made by jarredbcv, but credit goes to madiik for clerp")
  163. mouse.KeyDown:connect(function(k)
  164. if k == "q" then
  165. if not sound.IsPlaying then
  166. game:service'InsertService':LoadAsset(64446449):children()[1].Parent = char
  167. sound:stop()
  168. sound.SoundId = "http://www.roblox.com/asset/?id=151444073"
  169. wait()
  170. sound:play()
  171. end
  172. end
  173. if k == "e" then
  174. if not sound.IsPlaying then
  175. game:service'InsertService':LoadAsset(160709891):children()[1].Parent = char
  176. game:service'InsertService':LoadAsset(150182466):children()[1].Parent = head
  177. sound:stop()
  178. sound.SoundId = "http://www.roblox.com/asset/?id=142300879"
  179. wait()
  180. sound:play()
  181. end
  182. end
  183. if k == "r" then
  184. if not sound.IsPlaying then
  185. game:service'InsertService':LoadAsset(161212509):children()[1].Parent = char
  186. game:service'InsertService':LoadAsset(158066137):children()[1].Parent = char
  187. game:service'InsertService':LoadAsset(16131017):children()[1].Parent = char
  188. game:service'InsertService':LoadAsset(150182466):children()[1].Parent = head
  189. sound:stop()
  190. sound.SoundId = "http://www.roblox.com/asset/?id=130758889"
  191. wait()
  192. sound:play()
  193. end
  194. end
  195. if k == "t" then
  196. if not sound.IsPlaying then
  197. game:service'InsertService':LoadAsset(5161514):children()[1].Parent = char
  198. game:service'InsertService':LoadAsset(1235488):children()[1].Parent = char
  199. sound:stop()
  200. sound.SoundId = "http://www.roblox.com/asset/?id=139167869"
  201. wait()
  202. sound:play()
  203. end
  204. end
  205. if k == "y" then
  206. if not sound.IsPlaying then
  207. game:service'InsertService':LoadAsset(128218044):children()[1].Parent = char
  208. game:service'InsertService':LoadAsset(46352929):children()[1].Parent = char
  209. game:service'InsertService':LoadAsset(7074944):children()[1].Parent = head
  210. sound:stop()
  211. sound.SoundId = "http://www.roblox.com/asset/?id=142486515"
  212. wait()
  213. sound:play()
  214. end
  215. end
  216. if k == "u" then
  217. if not sound.IsPlaying then
  218. game:service'InsertService':LoadAsset(163491934):children()[1].Parent = char
  219. game:service'InsertService':LoadAsset(100982122):children()[1].Parent = char
  220. game:service'InsertService':LoadAsset(110288809):children()[1].Parent = head
  221. sound:stop()
  222. sound.SoundId = "http://www.roblox.com/asset/?id=146560757"
  223. wait()
  224. sound:play()
  225. end
  226. end
  227. if k == "p" then
  228. if not sound.IsPlaying then
  229. game:service'InsertService':LoadAsset(16101765):children()[1].Parent = head
  230. h = Instance.new("Hat")
  231. p = Instance.new("Part")
  232. m = Instance.new("SpecialMesh")
  233. m.Scale = Vector3.new(1.07, 1.07, 1.07)
  234. m.MeshType = "FileMesh"
  235. m.MeshId = "http://www.roblox.com/asset/?id=19367193"
  236. m.Scale = Vector3.new(1.07, 1.07, 1.07)
  237. m.TextureId = "http://www.roblox.com/asset/?id=115999029"
  238. p.Parent = h
  239. p.Name = "Handle"
  240. p.formFactor = 0
  241. p.Size = Vector3.new(1, 1, 1)
  242. p.BottomSurface = 0
  243. p.TopSurface = 0
  244. p.Locked = true
  245. m.Parent = p
  246. h.AttachmentForward = Vector3.new (-0, -0, -1)
  247. h.AttachmentPos = Vector3.new(0, 0.3, 0.05)
  248. h.AttachmentRight = Vector3.new (1, 0, 0)
  249. h.AttachmentUp = Vector3.new (0, 1, 0)
  250. h.Parent = char
  251. sound:stop()
  252. sound.SoundId = "http://www.roblox.com/asset/?id=157518993"
  253. wait()
  254. sound:play()
  255. end
  256. end
  257. if k == "m" then
  258. if not sound.IsPlaying then
  259. game:service'InsertService':LoadAsset(16101765):children()[1].Parent = head
  260. h = Instance.new("Hat")
  261. p = Instance.new("Part")
  262. m = Instance.new("SpecialMesh")
  263. m.Scale = Vector3.new(1.07, 1.07, 1.07)
  264. m.MeshType = "FileMesh"
  265. m.MeshId = "http://www.roblox.com/asset/?id=19367193"
  266. m.Scale = Vector3.new(1.07, 1.07, 1.07)
  267. m.TextureId = "http://www.roblox.com/asset/?id=72393530"
  268. p.Parent = h
  269. p.Name = "Handle"
  270. p.formFactor = 0
  271. p.Size = Vector3.new(1, 1, 1)
  272. p.BottomSurface = 0
  273. p.TopSurface = 0
  274. p.Locked = true
  275. m.Parent = p
  276. h.AttachmentForward = Vector3.new (-0, -0, -1)
  277. h.AttachmentPos = Vector3.new(0, 0.3, 0.05)
  278. h.AttachmentRight = Vector3.new (1, 0, 0)
  279. h.AttachmentUp = Vector3.new (0, 1, 0)
  280. h.Parent = char
  281. sound:stop()
  282. sound.SoundId = "http://www.roblox.com/asset/?id=149917859"
  283. wait()
  284. sound:play()
  285. end
  286. end
  287. if k == "n" then
  288. if not sound.IsPlaying then
  289. game:service'InsertService':LoadAsset(16101765):children()[1].Parent = head
  290. h = Instance.new("Hat")
  291. p = Instance.new("Part")
  292. m = Instance.new("SpecialMesh")
  293. m.Scale = Vector3.new(1.07, 1.07, 1.07)
  294. m.MeshType = "FileMesh"
  295. m.MeshId = "http://www.roblox.com/asset/?id=19367193"
  296. m.Scale = Vector3.new(1.07, 1.07, 1.07)
  297. m.TextureId = "http://www.roblox.com/asset/?id=118244522"
  298. p.Parent = h
  299. p.Name = "Handle"
  300. p.formFactor = 0
  301. p.Size = Vector3.new(1, 1, 1)
  302. p.BottomSurface = 0
  303. p.TopSurface = 0
  304. p.Locked = true
  305. m.Parent = p
  306. h.AttachmentForward = Vector3.new (-0, -0, -1)
  307. h.AttachmentPos = Vector3.new(0, 0.3, 0.05)
  308. h.AttachmentRight = Vector3.new (1, 0, 0)
  309. h.AttachmentUp = Vector3.new (0, 1, 0)
  310. h.Parent = char
  311. sound:stop()
  312. sound.SoundId = "http://www.roblox.com/asset/?id=147384299"
  313. wait()
  314. sound:play()
  315. end
  316. end
  317. if string.byte(k) == 48 then
  318. humanoid.WalkSpeed = 34
  319. end
  320.  
  321. end)
  322. mouse.KeyUp:connect(function(k)
  323.  
  324. if string.byte(k) == 48 then
  325. humanoid.WalkSpeed = 16
  326. end
  327.  
  328. end)
  329.  
  330.  
  331.  
  332. while wait() do
  333. angle = (angle % 100) + anglespeed/10 -- i don't see any function getting called here
  334. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  335. local rscf = rsc0
  336. local lscf = lsc0
  337. local rlcf = rlc0
  338. local llcf = llc0
  339. local rjcf = CFrame.new()
  340. local ncf = neckc0
  341. local rayz = Ray.new(rootpart.Position, Vector3.new(0, -6, 0))
  342. local hitz, enz = workspace:findPartOnRay(rayz, char)
  343. if not hitz then
  344. if sound.IsPlaying then
  345. sound:stop()
  346. end
  347. elseif humanoid.Sit then
  348. if sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=151444073" then
  349. anglespeed = 2
  350. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
  351. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
  352. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  353. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  354. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  355. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  356. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=142300879" then
  357. anglespeed = 6
  358. ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  359. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  360. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  361. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  362. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  363. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  364. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=130758889" then
  365. anglespeed = 6
  366. ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  367. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  368. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  369. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  370. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  371. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  372. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=139167869" then
  373. anglespeed = 6
  374. ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  375. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  376. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  377. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  378. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  379. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  380. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=142486515" then
  381. anglespeed = 6
  382. ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  383. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  384. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  385. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  386. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  387. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  388. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=146560757" then
  389. anglespeed = 6
  390. ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  391. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  392. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  393. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  394. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  395. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  396. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=157518993" then
  397. anglespeed = 6
  398. ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  399. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  400. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  401. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  402. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  403. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  404.  
  405. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=149917859" then
  406. anglespeed = 6
  407. ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  408. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  409. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  410. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  411. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  412. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  413. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=147384299" then
  414. anglespeed = 6
  415. ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  416. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  417. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  418. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  419. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  420. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  421. else
  422. anglespeed = 1/2
  423. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
  424. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
  425. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  426. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  427. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  428. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  429. end
  430. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
  431. if sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=151444073" then
  432. anglespeed = 3
  433. ncf = neckc0 * CFrame.Angles(math.sin(angle)*0.07, math.rad(30), 0)
  434. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*0.001, 0)
  435. rscf = rsc0 * CFrame.Angles(-math.sin(angle)*.2, 0, math.sin(angle)*.2)
  436. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*0.05, 0, 0)
  437. rlcf = rlc0 * CFrame.new(0, -0.1 + math.abs(mvmnt)*0.1, -0.1) * CFrame.Angles(0, math.rad(5), math.rad(5))
  438. llcf = llc0 * CFrame.Angles(0, math.rad(2.5), math.rad(1))
  439. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=142300879" then
  440. anglespeed = 2
  441. ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3,0, 0)
  442. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*.5, 0)
  443. rscf = rsc0 * CFrame.Angles(0, 0, math.pi/2+math.abs(math.sin(angle)*1))
  444. lscf = lsc0 * CFrame.Angles(0, 0, -math.pi/2-math.abs(math.sin(angle)*1))
  445. rlcf = rlc0 * CFrame.Angles(0, math.sin(angle)*0.08, math.rad(2.5))
  446. llcf = llc0 * CFrame.Angles(0, -math.sin(angle)*0.08, -math.rad(2.5))
  447. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=130758889" then
  448. anglespeed = 2
  449. ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3,0, 0)
  450. rjcf = CFrame.new(math.sin(angle)*2, 0, 0) * CFrame.Angles(-math.pi/20, math.sin(angle)*.5, 0)
  451. rscf = rsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*.5), math.pi/20, -math.pi/20)
  452. lscf = lsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*.5), -math.pi/20, math.pi/20)
  453. rlcf = rlc0 * CFrame.Angles(math.pi/20+math.sin(angle)*0.2, math.sin(angle)*0.08, math.rad(2.5))
  454. llcf = llc0 * CFrame.Angles(math.pi/20-math.sin(angle)*0.2, -math.sin(angle)*0.08, -math.rad(2.5))
  455. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=139167869" then
  456. anglespeed = .4
  457. ncf = neckc1 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3,0, 0)
  458. rjcf = CFrame.new(math.sin(angle)*3, 4, 3) * CFrame.Angles(-math.pi/2, math.sin(angle)*-2, 0)
  459. rscf = rsc0 * CFrame.Angles(math.pi/1+math.sin(angle)*1.5, 0, 0)
  460. lscf = lsc0 * CFrame.Angles(math.pi/1-math.sin(angle)*.5, 0, 0)
  461. rlcf = rlc0 * CFrame.Angles(math.pi/20+math.sin(angle)*1.5, 1, 0)
  462. llcf = llc0 * CFrame.Angles(math.pi/20-math.sin(angle)*2.5, 0, 0)
  463. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=142486515" then
  464. anglespeed = 1
  465. ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.5,0, 0)
  466. rjcf = CFrame.new(0, 0, math.sin(angle)*3) * CFrame.Angles(0, math.sin(angle)*0.1, 0)
  467. rscf = rsc0 * CFrame.Angles(0, 0, -math.pi/20+math.sin(angle)*.75)
  468. lscf = lsc0 * CFrame.Angles(0, 0, math.pi/20+math.sin(angle)*.75)
  469. rlcf = rlc0 * CFrame.Angles(math.pi/20+math.sin(angle)*.75, 0, 0)
  470. llcf = llc0 * CFrame.Angles(math.pi/20-math.sin(angle)*.75, 0, 0)
  471. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=146560757" then
  472. anglespeed = 2
  473. ncf = neckc0 * CFrame.Angles(0,0, 0)
  474. rjcf = CFrame.new(0, -math.abs(math.sin(angle))*1.5, 0) * CFrame.Angles(math.sin(angle)*2, 0, 0)
  475. rscf = rsc0 * CFrame.Angles(0, 0, 0)
  476. lscf = lsc0 * CFrame.Angles(0, 0, 0)
  477. rlcf = rlc0 * CFrame.Angles(0, 0, 0)
  478. llcf = llc0 * CFrame.Angles(0, 0, 0)
  479. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=157518993" then
  480. anglespeed = 7
  481. ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3,0, 0)
  482. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*.5, 0)
  483. rscf = rsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*1), math.pi/20, -math.pi/20)
  484. lscf = lsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*1), -math.pi/20, math.pi/20)
  485. rlcf = rlc0 * CFrame.Angles(0, math.sin(angle)*0.1, math.rad(2.5))
  486. llcf = llc0 * CFrame.Angles(0, -math.sin(angle)*1, -math.rad(2.5))
  487. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=149917859" then
  488. anglespeed = 7
  489. ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3,0, 0)
  490. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*.5, 0)
  491. rscf = rsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*1), math.pi/20, -math.pi/20)
  492. lscf = lsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*1), -math.pi/20, math.pi/20)
  493. rlcf = rlc0 * CFrame.Angles(0, math.sin(angle)*0.1, math.rad(2.5))
  494. llcf = llc0 * CFrame.Angles(0, -math.sin(angle)*1, -math.rad(2.5))
  495. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=147384299" then
  496. anglespeed = 7
  497. ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3,0, 0)
  498. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*.5, 0)
  499. rscf = rsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*1), math.pi/20, -math.pi/20)
  500. lscf = lsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*1), -math.pi/20, math.pi/20)
  501. rlcf = rlc0 * CFrame.Angles(0, math.sin(angle)*0.1, math.rad(2.5))
  502. llcf = llc0 * CFrame.Angles(0, -math.sin(angle)*1, -math.rad(2.5))
  503. else
  504. if humanwalk then
  505. anglespeed = 1/4
  506. ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  507. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*0.001, 0)
  508. rscf = rsc0 * CFrame.Angles(math.sin(angle)*0.1, 0, 0)
  509. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*0.1, 0, 0)
  510. rlcf = rlc0 * CFrame.Angles(0, math.sin(angle)*0.08, math.rad(2.5))
  511. llcf = llc0 * CFrame.Angles(0, -math.sin(angle)*0.08, -math.rad(2.5))
  512. else
  513. anglespeed = 1/2
  514. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
  515. rjcf = CFrame.new(0, -2, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
  516. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  517. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  518. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  519. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  520. end
  521. end
  522. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 20 then
  523. if sound.IsPlaying then
  524. sound:stop()
  525. for _,v in pairs(char:GetChildren()) do if v.ClassName=="Hat" then v:remove() end end
  526. for _,v in pairs(head:GetChildren()) do if v.ClassName=="Decal" then v:remove() end end
  527. end
  528. if humanwalk then
  529. anglespeed = 4
  530. ncf = neckc0 * CFrame.Angles(math.pi/24, mvmnt*.02, 0)
  531. rjcf = CFrame.new(0, math.abs(mvmnt)*0.05, 0) * CFrame.Angles(math.pi/24, -mvmnt*.02, 0)
  532. rscf = rsc0 * CFrame.Angles(math.sin(angle)*1.25, 0, -math.abs(mvmnt)*0.02)
  533. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*1.25, 0, math.abs(mvmnt)*0.02)
  534. rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*1, 0, math.rad(.5))
  535. llcf = llc0 * CFrame.Angles(math.sin(angle)*1, 0, -math.rad(.5))
  536. else
  537. anglespeed = 4
  538. ncf = neckc0 * CFrame.new(0, 0, .2) * CFrame.Angles(math.pi/1.9, 0, 0)
  539. rjcf = CFrame.new(0, -1.5+math.abs(mvmnt)*0.05, 0) * CFrame.Angles(-math.pi/1.9, math.sin(mvmnt/2)*0.05, 0)
  540. rscf = rsc0 * CFrame.new(-.45, 0.2, -.4+math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2+math.sin(angle)*0.7, 0, math.rad(5))
  541. lscf = lsc0 * CFrame.new(.45, 0.2, .1-math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2+math.sin(-angle)*0.7, 0, -math.rad(5))
  542. rlcf = rlc0 * CFrame.new(0, 0, -.3+math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2.5+math.sin(-angle)*0.6, 0, math.abs(mvmnt)*0.025)
  543. llcf = llc0 * CFrame.new(0, 0, .3-math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2.5+math.sin(angle)*.6, 0, -math.abs(mvmnt)*0.025)
  544. end
  545. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then
  546. if sound.IsPlaying then
  547. sound:stop()
  548. for _,v in pairs(char:GetChildren()) do if v.ClassName=="Hat" then v:remove() end end
  549. for _,v in pairs(head:GetChildren()) do if v.ClassName=="Decal" then v:remove() end end
  550. end
  551. if humanwalk then
  552. anglespeed = 34
  553. ncf = neckc1 * CFrame.Angles(-math.pi/20, math.sin(angle)*.04, 0)
  554. rjcf = CFrame.new(0, -.4 + math.abs(mvmnt)*0.25, 0) * CFrame.Angles(0, -math.sin(angle)*.08, 0)
  555. rscf = rsc0 * CFrame.new(0, 0, -.3+math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/18+math.sin(angle)*1.5, 0, -math.abs(mvmnt)*0.02)
  556. lscf = lsc0 * CFrame.new(0, 0, .3-math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/18+math.sin(-angle)*1.5, 0, math.abs(mvmnt)*0.02)
  557. 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))
  558. 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))
  559. else
  560. anglespeed = 5.5
  561. ncf = neckc0 * CFrame.new(0, 0, .2) * CFrame.Angles(math.pi/1.9+math.sin(mvmnt/2)*0.05, 0, 0)
  562. rjcf = CFrame.new(0, -1.3+math.abs(mvmnt)*0.05, 0) * CFrame.Angles(-math.pi/1.9+math.abs(mvmnt/2)*0.1, 0, 0)
  563. rscf = rsc0 * CFrame.new(-1, 0.2, -.5) * CFrame.Angles(math.pi/2+math.sin(angle)*1.8, 0, math.rad(5))
  564. lscf = lsc0 * CFrame.new(1, 0.2, -.5) * CFrame.Angles(math.pi/2+math.sin(angle)*1.8, 0, -math.rad(5))
  565. rlcf = rlc0 * CFrame.new(0, .3-math.abs(mvmnt)*0.125, -.3+math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2.5+math.sin(-angle)*1.4, 0, math.abs(mvmnt)*0.025)
  566. llcf = llc0 * CFrame.new(0, .3-math.abs(mvmnt)*0.125, .3-math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2.5+math.sin(-angle)*1.4, 0, -math.abs(mvmnt)*0.025)
  567. end
  568. end
  569.  
  570. rm.C0 = clerp(rm.C0,rscf,speed)
  571. lm.C0 = clerp(lm.C0,lscf,speed)
  572. rj.C0 = clerp(rj.C0,rjcf,speed)
  573. neck.C0 = clerp(neck.C0,ncf,speed)
  574. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  575. llegm.C0 = clerp(llegm.C0,llcf,speed)
  576. end
  577. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement