Advertisement
Guest User

Untitled

a guest
Jan 26th, 2020
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.63 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(163524136):children()[1].Parent = char
  186. game:service'InsertService':LoadAsset(161246757):children()[1].Parent = char
  187. game:service'InsertService':LoadAsset(7075089):children()[1].Parent = head
  188. sound:stop()
  189. sound.SoundId = "http://www.roblox.com/asset/?id=155565393"
  190. wait()
  191. sound:play()
  192. end
  193. end
  194. if k == "t" then
  195. if not sound.IsPlaying then
  196. game:service'InsertService':LoadAsset(5161514):children()[1].Parent = char
  197. game:service'InsertService':LoadAsset(1235488):children()[1].Parent = char
  198. sound:stop()
  199. sound.SoundId = "http://www.roblox.com/asset/?id=149981769"
  200. wait()
  201. sound:play()
  202. end
  203. end
  204. if k == "y" then
  205. if not sound.IsPlaying then
  206. game:service'InsertService':LoadAsset(128218044):children()[1].Parent = char
  207. game:service'InsertService':LoadAsset(46352929):children()[1].Parent = char
  208. game:service'InsertService':LoadAsset(7074944):children()[1].Parent = head
  209. sound:stop()
  210. sound.SoundId = "http://www.roblox.com/asset/?id=142486515"
  211. wait()
  212. sound:play()
  213. end
  214. end
  215. if k == "u" then
  216. if not sound.IsPlaying then
  217. game:service'InsertService':LoadAsset(163491934):children()[1].Parent = char
  218. game:service'InsertService':LoadAsset(100982122):children()[1].Parent = char
  219. game:service'InsertService':LoadAsset(110288809):children()[1].Parent = head
  220. sound:stop()
  221. sound.SoundId = "http://www.roblox.com/asset/?id=146560757"
  222. wait()
  223. sound:play()
  224. end
  225. end
  226. if k == "p" then
  227. if not sound.IsPlaying then
  228. game:service'InsertService':LoadAsset(16101765):children()[1].Parent = head
  229. h = Instance.new("Hat")
  230. p = Instance.new("Part")
  231. m = Instance.new("SpecialMesh")
  232. m.Scale = Vector3.new(1.07, 1.07, 1.07)
  233. m.MeshType = "FileMesh"
  234. m.MeshId = "http://www.roblox.com/asset/?id=19367193"
  235. m.Scale = Vector3.new(1.07, 1.07, 1.07)
  236. m.TextureId = "http://www.roblox.com/asset/?id=115999029"
  237. p.Parent = h
  238. p.Name = "Handle"
  239. p.formFactor = 0
  240. p.Size = Vector3.new(1, 1, 1)
  241. p.BottomSurface = 0
  242. p.TopSurface = 0
  243. p.Locked = true
  244. m.Parent = p
  245. h.AttachmentForward = Vector3.new (-0, -0, -1)
  246. h.AttachmentPos = Vector3.new(0, 0.3, 0.05)
  247. h.AttachmentRight = Vector3.new (1, 0, 0)
  248. h.AttachmentUp = Vector3.new (0, 1, 0)
  249. h.Parent = char
  250. sound:stop()
  251. sound.SoundId = "http://www.roblox.com/asset/?id=157518993"
  252. wait()
  253. sound:play()
  254. end
  255. end
  256. if k == "m" then
  257. if not sound.IsPlaying then
  258. game:service'InsertService':LoadAsset(16101765):children()[1].Parent = head
  259. h = Instance.new("Hat")
  260. p = Instance.new("Part")
  261. m = Instance.new("SpecialMesh")
  262. m.Scale = Vector3.new(1.07, 1.07, 1.07)
  263. m.MeshType = "FileMesh"
  264. m.MeshId = "http://www.roblox.com/asset/?id=19367193"
  265. m.Scale = Vector3.new(1.07, 1.07, 1.07)
  266. m.TextureId = "http://www.roblox.com/asset/?id=72393530"
  267. p.Parent = h
  268. p.Name = "Handle"
  269. p.formFactor = 0
  270. p.Size = Vector3.new(1, 1, 1)
  271. p.BottomSurface = 0
  272. p.TopSurface = 0
  273. p.Locked = true
  274. m.Parent = p
  275. h.AttachmentForward = Vector3.new (-0, -0, -1)
  276. h.AttachmentPos = Vector3.new(0, 0.3, 0.05)
  277. h.AttachmentRight = Vector3.new (1, 0, 0)
  278. h.AttachmentUp = Vector3.new (0, 1, 0)
  279. h.Parent = char
  280. sound:stop()
  281. sound.SoundId = "http://www.roblox.com/asset/?id=149917859"
  282. wait()
  283. sound:play()
  284. end
  285. end
  286. if k == "n" then
  287. if not sound.IsPlaying then
  288. game:service'InsertService':LoadAsset(16101765):children()[1].Parent = head
  289. h = Instance.new("Hat")
  290. p = Instance.new("Part")
  291. m = Instance.new("SpecialMesh")
  292. m.Scale = Vector3.new(1.07, 1.07, 1.07)
  293. m.MeshType = "FileMesh"
  294. m.MeshId = "http://www.roblox.com/asset/?id=19367193"
  295. m.Scale = Vector3.new(1.07, 1.07, 1.07)
  296. m.TextureId = "http://www.roblox.com/asset/?id=118244522"
  297. p.Parent = h
  298. p.Name = "Handle"
  299. p.formFactor = 0
  300. p.Size = Vector3.new(1, 1, 1)
  301. p.BottomSurface = 0
  302. p.TopSurface = 0
  303. p.Locked = true
  304. m.Parent = p
  305. h.AttachmentForward = Vector3.new (-0, -0, -1)
  306. h.AttachmentPos = Vector3.new(0, 0.3, 0.05)
  307. h.AttachmentRight = Vector3.new (1, 0, 0)
  308. h.AttachmentUp = Vector3.new (0, 1, 0)
  309. h.Parent = char
  310. sound:stop()
  311. sound.SoundId = "http://www.roblox.com/asset/?id=147384299"
  312. wait()
  313. sound:play()
  314. end
  315. end
  316. if string.byte(k) == 48 then
  317. humanoid.WalkSpeed = 34
  318. end
  319.  
  320. end)
  321. mouse.KeyUp:connect(function(k)
  322.  
  323. if string.byte(k) == 48 then
  324. humanoid.WalkSpeed = 16
  325. end
  326.  
  327. end)
  328.  
  329.  
  330.  
  331. while wait() do
  332. angle = (angle % 100) + anglespeed/10 -- i don't see any function getting called here
  333. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  334. local rscf = rsc0
  335. local lscf = lsc0
  336. local rlcf = rlc0
  337. local llcf = llc0
  338. local rjcf = CFrame.new()
  339. local ncf = neckc0
  340. local rayz = Ray.new(rootpart.Position, Vector3.new(0, -6, 0))
  341. local hitz, enz = workspace:findPartOnRay(rayz, char)
  342. if not hitz then
  343. if sound.IsPlaying then
  344. sound:stop()
  345. end
  346. elseif humanoid.Sit then
  347. if sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=151444073" then
  348. anglespeed = 2
  349. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
  350. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
  351. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  352. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  353. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  354. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  355. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=142300879" then
  356. anglespeed = 6
  357. ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  358. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  359. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  360. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  361. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  362. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  363. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=155565393" then
  364. anglespeed = 6
  365. ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  366. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  367. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  368. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  369. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  370. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  371. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=149981769" then
  372. anglespeed = 6
  373. ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  374. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  375. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  376. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  377. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  378. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  379. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=142486515" then
  380. anglespeed = 6
  381. ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  382. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  383. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  384. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  385. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  386. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  387. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=146560757" then
  388. anglespeed = 6
  389. ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  390. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  391. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  392. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  393. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  394. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  395. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=157518993" then
  396. anglespeed = 6
  397. ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  398. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  399. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  400. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  401. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  402. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  403.  
  404. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=149917859" then
  405. anglespeed = 6
  406. ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  407. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  408. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  409. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  410. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  411. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  412. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=147384299" then
  413. anglespeed = 6
  414. ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  415. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  416. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  417. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  418. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  419. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  420. else
  421. anglespeed = 1/2
  422. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
  423. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
  424. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  425. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  426. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  427. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  428. end
  429. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
  430. if sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=151444073" then
  431. anglespeed = 3
  432. ncf = neckc0 * CFrame.Angles(math.sin(angle)*0.07, math.rad(30), 0)
  433. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*0.001, 0)
  434. rscf = rsc0 * CFrame.Angles(-math.sin(angle)*.2, 0, math.sin(angle)*.2)
  435. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*0.05, 0, 0)
  436. rlcf = rlc0 * CFrame.new(0, -0.1 + math.abs(mvmnt)*0.1, -0.1) * CFrame.Angles(0, math.rad(5), math.rad(5))
  437. llcf = llc0 * CFrame.Angles(0, math.rad(2.5), math.rad(1))
  438. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=142300879" then
  439. anglespeed = 2
  440. ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3,0, 0)
  441. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*.5, 0)
  442. rscf = rsc0 * CFrame.Angles(0, 0, math.pi/2+math.abs(math.sin(angle)*1))
  443. lscf = lsc0 * CFrame.Angles(0, 0, -math.pi/2-math.abs(math.sin(angle)*1))
  444. rlcf = rlc0 * CFrame.Angles(0, math.sin(angle)*0.08, math.rad(2.5))
  445. llcf = llc0 * CFrame.Angles(0, -math.sin(angle)*0.08, -math.rad(2.5))
  446. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=155565393" then
  447. anglespeed = 2
  448. ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3,0, 0)
  449. rjcf = CFrame.new(math.sin(angle)*2, 0, 0) * CFrame.Angles(-math.pi/20, math.sin(angle)*.5, 0)
  450. rscf = rsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*.5), math.pi/20, -math.pi/20)
  451. lscf = lsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*.5), -math.pi/20, math.pi/20)
  452. rlcf = rlc0 * CFrame.Angles(math.pi/20+math.sin(angle)*0.2, math.sin(angle)*0.08, math.rad(2.5))
  453. llcf = llc0 * CFrame.Angles(math.pi/20-math.sin(angle)*0.2, -math.sin(angle)*0.08, -math.rad(2.5))
  454. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=149981769" then
  455. anglespeed = 2
  456. ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3,0, 0)
  457. rjcf = CFrame.new(math.sin(angle)*3, -1, 0) * CFrame.Angles(-math.pi/2, math.sin(angle)*-2, 0)
  458. rscf = rsc0 * CFrame.Angles(math.pi/1+math.sin(angle)*1.5, 0, 0)
  459. lscf = lsc0 * CFrame.Angles(math.pi/1-math.sin(angle)*1.5, 0, 0)
  460. rlcf = rlc0 * CFrame.Angles(math.pi/20+math.sin(angle)*1.5, 0, 0)
  461. llcf = llc0 * CFrame.Angles(math.pi/20-math.sin(angle)*1.5, 0, 0)
  462. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=142486515" then
  463. anglespeed = 1
  464. ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.5,0, 0)
  465. rjcf = CFrame.new(0, 0, math.sin(angle)*3) * CFrame.Angles(0, math.sin(angle)*0.1, 0)
  466. rscf = rsc0 * CFrame.Angles(0, 0, -math.pi/20+math.sin(angle)*.75)
  467. lscf = lsc0 * CFrame.Angles(0, 0, math.pi/20+math.sin(angle)*.75)
  468. rlcf = rlc0 * CFrame.Angles(math.pi/20+math.sin(angle)*.75, 0, 0)
  469. llcf = llc0 * CFrame.Angles(math.pi/20-math.sin(angle)*.75, 0, 0)
  470. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=146560757" then
  471. anglespeed = 2
  472. ncf = neckc0 * CFrame.Angles(0,0, 0)
  473. rjcf = CFrame.new(0, -math.abs(math.sin(angle))*1.5, 0) * CFrame.Angles(math.sin(angle)*2, 0, 0)
  474. rscf = rsc0 * CFrame.Angles(0, 0, 0)
  475. lscf = lsc0 * CFrame.Angles(0, 0, 0)
  476. rlcf = rlc0 * CFrame.Angles(0, 0, 0)
  477. llcf = llc0 * CFrame.Angles(0, 0, 0)
  478. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=157518993" then
  479. anglespeed = 7
  480. ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3,0, 0)
  481. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*.5, 0)
  482. rscf = rsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*1), math.pi/20, -math.pi/20)
  483. lscf = lsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*1), -math.pi/20, math.pi/20)
  484. rlcf = rlc0 * CFrame.Angles(0, math.sin(angle)*0.1, math.rad(2.5))
  485. llcf = llc0 * CFrame.Angles(0, -math.sin(angle)*1, -math.rad(2.5))
  486. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=149917859" then
  487. anglespeed = 7
  488. ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3,0, 0)
  489. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*.5, 0)
  490. rscf = rsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*1), math.pi/20, -math.pi/20)
  491. lscf = lsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*1), -math.pi/20, math.pi/20)
  492. rlcf = rlc0 * CFrame.Angles(0, math.sin(angle)*0.1, math.rad(2.5))
  493. llcf = llc0 * CFrame.Angles(0, -math.sin(angle)*1, -math.rad(2.5))
  494. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=147384299" then
  495. anglespeed = 7
  496. ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3,0, 0)
  497. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*.5, 0)
  498. rscf = rsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*1), math.pi/20, -math.pi/20)
  499. lscf = lsc0 * CFrame.Angles(math.pi/3+math.abs(math.sin(angle)*1), -math.pi/20, math.pi/20)
  500. rlcf = rlc0 * CFrame.Angles(0, math.sin(angle)*0.1, math.rad(2.5))
  501. llcf = llc0 * CFrame.Angles(0, -math.sin(angle)*1, -math.rad(2.5))
  502. else
  503. if humanwalk then
  504. anglespeed = 1/4
  505. ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  506. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*0.001, 0)
  507. rscf = rsc0 * CFrame.Angles(math.sin(angle)*0.1, 0, 0)
  508. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*0.1, 0, 0)
  509. rlcf = rlc0 * CFrame.Angles(0, math.sin(angle)*0.08, math.rad(2.5))
  510. llcf = llc0 * CFrame.Angles(0, -math.sin(angle)*0.08, -math.rad(2.5))
  511. else
  512. anglespeed = 1/2
  513. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
  514. rjcf = CFrame.new(0, -2, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
  515. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  516. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  517. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  518. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  519. end
  520. end
  521. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 20 then
  522. if sound.IsPlaying then
  523. sound:stop()
  524. for _,v in pairs(char:GetChildren()) do if v.ClassName=="Hat" then v:remove() end end
  525. for _,v in pairs(head:GetChildren()) do if v.ClassName=="Decal" then v:remove() end end
  526. end
  527. if humanwalk then
  528. anglespeed = 4
  529. ncf = neckc0 * CFrame.Angles(math.pi/24, mvmnt*.02, 0)
  530. rjcf = CFrame.new(0, math.abs(mvmnt)*0.05, 0) * CFrame.Angles(math.pi/24, -mvmnt*.02, 0)
  531. rscf = rsc0 * CFrame.Angles(math.sin(angle)*1.25, 0, -math.abs(mvmnt)*0.02)
  532. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*1.25, 0, math.abs(mvmnt)*0.02)
  533. rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*1, 0, math.rad(.5))
  534. llcf = llc0 * CFrame.Angles(math.sin(angle)*1, 0, -math.rad(.5))
  535. else
  536. anglespeed = 4
  537. ncf = neckc0 * CFrame.new(0, 0, .2) * CFrame.Angles(math.pi/1.9, 0, 0)
  538. 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)
  539. 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))
  540. 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))
  541. 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)
  542. 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)
  543. end
  544. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then
  545. if sound.IsPlaying then
  546. sound:stop()
  547. for _,v in pairs(char:GetChildren()) do if v.ClassName=="Hat" then v:remove() end end
  548. for _,v in pairs(head:GetChildren()) do if v.ClassName=="Decal" then v:remove() end end
  549. end
  550. if humanwalk then
  551. anglespeed = 5
  552. ncf = neckc0 * CFrame.Angles(-math.pi/20, math.sin(angle)*.04, 0)
  553. rjcf = CFrame.new(0, -.4 + math.abs(mvmnt)*0.25, 0) * CFrame.Angles(0, -math.sin(angle)*.08, 0)
  554. 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)
  555. 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)
  556. 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))
  557. 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))
  558. else
  559. anglespeed = 5.5
  560. ncf = neckc0 * CFrame.new(0, 0, .2) * CFrame.Angles(math.pi/1.9+math.sin(mvmnt/2)*0.05, 0, 0)
  561. 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)
  562. rscf = rsc0 * CFrame.new(-1, 0.2, -.5) * CFrame.Angles(math.pi/2+math.sin(angle)*1.8, 0, math.rad(5))
  563. lscf = lsc0 * CFrame.new(1, 0.2, -.5) * CFrame.Angles(math.pi/2+math.sin(angle)*1.8, 0, -math.rad(5))
  564. 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)
  565. 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)
  566. end
  567. end
  568.  
  569. rm.C0 = clerp(rm.C0,rscf,speed)
  570. lm.C0 = clerp(lm.C0,lscf,speed)
  571. rj.C0 = clerp(rj.C0,rjcf,speed)
  572. neck.C0 = clerp(neck.C0,ncf,speed)
  573. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  574. llegm.C0 = clerp(llegm.C0,llcf,speed)
  575. end
  576. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement