Advertisement
SmokeDelsin

test 509

Jun 6th, 2015
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. do --the animating
  4. plr = game:service'Players'.LocalPlayer
  5. char = plr.Character
  6. mouse = plr:GetMouse()
  7. humanoid = char:findFirstChild("Humanoid")
  8. torso = char:findFirstChild("Torso")
  9. head = char.Head
  10. ra = char:findFirstChild("Right Arm")
  11. la = char:findFirstChild("Left Arm")
  12. rl = char:findFirstChild("Right Leg")
  13. ll = char:findFirstChild("Left Leg")
  14. rs = torso:findFirstChild("Right Shoulder")
  15. ls = torso:findFirstChild("Left Shoulder")
  16. rh = torso:findFirstChild("Right Hip")
  17. lh = torso:findFirstChild("Left Hip")
  18. neck = torso:findFirstChild("Neck")
  19. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  20. anim = char:findFirstChild("Animate")
  21. rootpart = char:findFirstChild("HumanoidRootPart")
  22. camera = workspace.CurrentCamera
  23. if anim then
  24. anim:Destroy()
  25. end
  26.  
  27.  
  28. local rm = Instance.new("Motor", torso)
  29. rm.C0 = CFrame.new(1.5, 0.5, 0)
  30. rm.C1 = CFrame.new(0, 0.5, 0)
  31. rm.Part0 = torso
  32. rm.Part1 = ra
  33. local lm = Instance.new("Motor", torso)
  34. lm.C0 = CFrame.new(-1.5, 0.5, 0)
  35. lm.C1 = CFrame.new(0, 0.5, 0)
  36. lm.Part0 = torso
  37. lm.Part1 = la
  38.  
  39. local rlegm = Instance.new("Motor", torso)
  40. rlegm.C0 = CFrame.new(0.5, -1, 0)
  41. rlegm.C1 = CFrame.new(0, 1, 0)
  42. rlegm.Part0 = torso
  43. rlegm.Part1 = rl
  44. local llegm = Instance.new("Motor", torso)
  45. llegm.C0 = CFrame.new(-0.5, -1, 0)
  46. llegm.C1 = CFrame.new(0, 1, 0)
  47. llegm.Part0 = torso
  48. llegm.Part1 = ll
  49.  
  50. neck.C0 = CFrame.new(0, 1, 0)
  51. neck.C1 = CFrame.new(0, -0.5, 0)
  52.  
  53.  
  54. rj.C0 = CFrame.new()
  55. rj.C1 = CFrame.new()
  56.  
  57.  
  58. local sound = Instance.new("Sound", head)
  59. sound.SoundId = "http://www.roblox.com/asset/?id=130797915"
  60. sound.Volume = 0.8
  61. sound.Looped = true
  62.  
  63. for i,v in pairs(char:children()) do
  64. if v:IsA("Hat") then
  65. v:Destroy()
  66. end
  67. end
  68.  
  69.  
  70. --look of the fox here
  71. game:service'InsertService':LoadAsset(201119985):children()[1].Parent = char
  72. Instance.new("PointLight", torso).Range = 10
  73.  
  74. if char:findFirstChild("Shirt") then
  75. char:findFirstChild("Shirt"):Destroy()
  76. end
  77. if char:findFirstChild("Pants") then
  78. char:findFirstChild("Pants"):Destroy()
  79. end
  80. if char:findFirstChild("Shirt Graphic") then
  81. char:findFirstChild("Shirt Graphic"):Destroy()
  82. c.Head.face.Texture = "rbxassetid://201119984"
  83.  
  84. print'Smokedelsin(Aka wable3) Made. BRUH BRUH'
  85.  
  86.  
  87. local speed = 0.3
  88. local angle = 0
  89. local sitting = false
  90. local humanwalk = false
  91. local anglespeed = 1
  92. rsc0 = rm.C0
  93. lsc0 = lm.C0
  94. llc0 = llegm.C0
  95. rlc0 = rlegm.C0
  96. neckc0 = neck.C0
  97.  
  98. local controllerService = game:GetService("ControllerService")
  99. local controller = controllerService:GetChildren()[1]
  100.  
  101. controller.Parent = nil
  102.  
  103. Instance.new("HumanoidController", game:service'ControllerService')
  104. Instance.new("SkateboardController", game:service'ControllerService')
  105. Instance.new("VehicleController", game:service'ControllerService')
  106. local controller = controllerService:GetChildren()[1]
  107. mouse.KeyDown:connect(function(k)
  108. if k == "q" then
  109. humanwalk = not humanwalk
  110. end
  111. if k == "z" then
  112. if not sound.IsPlaying then
  113. sound:stop()
  114. sound.SoundId = "http://www.roblox.com/asset/?id=130802245"
  115. wait()
  116. sound:play()
  117. end
  118. end
  119. if k == "x" then
  120. if not sound.IsPlaying then
  121. sound:stop()
  122. sound.SoundId = "http://www.roblox.com/asset/?id=179849734"
  123. wait()
  124. sound:play()
  125. end
  126. end
  127. if k == "c" then
  128. if not sound.IsPlaying then
  129. sound:stop()
  130. sound.SoundId = "http://www.roblox.com/asset/?id=142283906"
  131. wait()
  132. sound:play()
  133. end
  134. end
  135. if string.byte(k) == 48 then
  136. humanoid.WalkSpeed = 34
  137. end
  138.  
  139. end)
  140. mouse.KeyUp:connect(function(k)
  141.  
  142. if string.byte(k) == 48 then
  143. humanoid.WalkSpeed = 16
  144. end
  145.  
  146. end)
  147.  
  148.  
  149.  
  150. while wait() do
  151. angle = (angle % 100) + anglespeed/10
  152. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  153. local rscf = rsc0
  154. local lscf = lsc0
  155. local rlcf = rlc0
  156. local llcf = llc0
  157. local rjcf = CFrame.new()
  158. local ncf = neckc0
  159. local rayz = Ray.new(rootpart.Position, Vector3.new(0, -6, 0))
  160. local hitz, enz = workspace:findPartOnRay(rayz, char)
  161. if not hitz then
  162. if sound.IsPlaying then
  163. sound:stop()
  164. end
  165.  
  166. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude > 2 then
  167.  
  168. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, 0)
  169. rjcf = CFrame.new() * CFrame.Angles(-math.pi/5, math.sin(angle)*0.05, 0)
  170. rscf = rsc0 * CFrame.Angles(math.pi/1.7+math.sin(angle)*0.1, 0, 0)
  171. lscf = lsc0 * CFrame.Angles(math.pi/1.7+math.sin(-angle)*0.1, 0, 0)
  172. rlcf = rlc0 * CFrame.Angles(-math.pi/10+math.sin(-angle)*0.3, 0, 0)
  173. llcf = llc0 * CFrame.Angles(-math.pi/10+math.sin(angle)*0.3, 0, 0)
  174.  
  175. else
  176.  
  177. ncf = neckc0 * CFrame.Angles(math.pi/14, 0, 0)
  178. rjcf = CFrame.new() * CFrame.Angles(-math.pi/18, math.sin(angle)*0.05, 0)
  179. rscf = rsc0 * CFrame.Angles(-math.pi/10+math.sin(angle)*0.2, 0, 0)
  180. lscf = lsc0 * CFrame.Angles(-math.pi/10+math.sin(-angle)*0.2, 0, 0)
  181. rlcf = rlc0 * CFrame.new(0, 0.7, -0.5) CFrame.Angles(-math.pi/14, 0, 0)
  182. llcf = llc0 * CFrame.Angles(-math.pi/20, 0, 0)
  183.  
  184. end
  185. elseif humanoid.Sit then
  186. if sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=142283906" then
  187. anglespeed = 6
  188. ncf = neckc0 * CFrame.Angles(math.pi/5-math.abs(math.sin(angle))*0.3, 0, 0)
  189. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  190. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  191. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  192. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  193. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  194. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=179849734" then
  195. anglespeed = 4
  196. ncf = neckc0 * CFrame.Angles(math.pi/5-math.abs(math.sin(angle))*0.3, 0, 0)
  197. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  198. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  199. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  200. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  201. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  202. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=130802245" then
  203. anglespeed = 2
  204. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
  205. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
  206. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  207. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  208. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  209. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  210. else
  211. anglespeed = 1/2
  212. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
  213. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
  214. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  215. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  216. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  217. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  218. end
  219. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
  220. if sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=142283906" then
  221. anglespeed = 4
  222. ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3, 0, 0)
  223. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/20, math.sin(angle)*0.001, 0)
  224. rscf = rsc0 * CFrame.Angles(math.pi/2+math.abs(math.sin(angle)*1), 0, 0)
  225. lscf = lsc0 * CFrame.Angles(math.pi/2+math.abs(math.sin(angle)*1), 0, 0)
  226. rlcf = rlc0 * CFrame.Angles(math.pi/20, math.sin(angle)*0.08, math.rad(2.5))
  227. llcf = llc0 * CFrame.Angles(math.pi/20, -math.sin(angle)*0.08, -math.rad(2.5))
  228. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=179849734" then
  229. anglespeed = 2
  230. ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3, 0, 0)
  231. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/20, math.sin(angle)*0.001, 0)
  232. rscf = rsc0 * CFrame.Angles(math.pi/2+math.abs(math.sin(angle)*1), 0, 0)
  233. lscf = lsc0 * CFrame.Angles(math.pi/2+math.abs(math.sin(angle)*1), 0, 0)
  234. rlcf = rlc0 * CFrame.Angles(math.pi/20, math.sin(angle)*0.08, math.rad(2.5))
  235. llcf = llc0 * CFrame.Angles(math.pi/20, -math.sin(angle)*0.08, -math.rad(2.5))
  236. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=130802245" then
  237. anglespeed = 3
  238. ncf = neckc0 * CFrame.Angles(math.sin(angle)*0.07, math.rad(30), 0)
  239. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*0.001, 0)
  240. rscf = rsc0 * CFrame.Angles(math.sin(angle)*0.05, 0, 0)
  241. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*0.05, 0, 0)
  242. rlcf = rlc0 * CFrame.new(0, -0.1 + math.abs(mvmnt)*0.1, -0.1) * CFrame.Angles(0, math.rad(5), math.rad(5))
  243. llcf = llc0 * CFrame.Angles(0, math.rad(2.5), math.rad(1))
  244. else
  245. if humanwalk then
  246. anglespeed = 1/4
  247. ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  248. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*0.001, 0)
  249. rscf = rsc0 * CFrame.Angles(math.sin(angle)*0.1, 0, 0)
  250. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*0.1, 0, 0)
  251. rlcf = rlc0 * CFrame.Angles(0, math.sin(angle)*0.08, math.rad(2.5))
  252. llcf = llc0 * CFrame.Angles(0, -math.sin(angle)*0.08, -math.rad(2.5))
  253. else
  254. anglespeed = 1/2
  255. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
  256. rjcf = CFrame.new(0, -2, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
  257. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  258. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  259. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  260. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  261. end
  262. end
  263. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 20 then
  264. if sound.IsPlaying then
  265. sound:stop()
  266. end
  267. if humanwalk then
  268. anglespeed = 4
  269. ncf = neckc0 * CFrame.Angles(math.pi/24, mvmnt*.02, 0)
  270. rjcf = CFrame.new(0, math.abs(mvmnt)*0.05, 0) * CFrame.Angles(-math.pi/24, -mvmnt*.02, 0)
  271. rscf = rsc0 * CFrame.Angles(math.sin(angle)*1.25, 0, -math.abs(mvmnt)*0.02)
  272. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*1.25, 0, math.abs(mvmnt)*0.02)
  273. rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*1, 0, math.rad(.5))
  274. llcf = llc0 * CFrame.Angles(math.sin(angle)*1, 0, -math.rad(.5))
  275. else
  276. anglespeed = 4
  277. ncf = neckc0 * CFrame.new(0, 0, .2) * CFrame.Angles(math.pi/1.9, 0, 0)
  278. 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)
  279. 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))
  280. 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))
  281. 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)
  282. 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)
  283. end
  284. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then
  285. if sound.IsPlaying then
  286. sound:stop()
  287. end
  288. if humanwalk then
  289. anglespeed = 5
  290. ncf = neckc0 * CFrame.Angles(math.pi/20, math.sin(angle)*.04, 0)
  291. rjcf = CFrame.new(0, -.4 + math.abs(mvmnt)*0.25, 0) * CFrame.Angles(-math.pi/20, -math.sin(angle)*.08, 0)
  292. 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)
  293. 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)
  294. 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))
  295. 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))
  296. else
  297. anglespeed = 5.5
  298. ncf = neckc0 * CFrame.new(0, 0, .2) * CFrame.Angles(math.pi/1.9+math.sin(mvmnt/2)*0.05, 0, 0)
  299. 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)
  300. rscf = rsc0 * CFrame.new(-1, 0.2, -.5) * CFrame.Angles(math.pi/2+math.sin(angle)*1.8, 0, math.rad(5))
  301. lscf = lsc0 * CFrame.new(1, 0.2, -.5) * CFrame.Angles(math.pi/2+math.sin(angle)*1.8, 0, -math.rad(5))
  302. 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)
  303. 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)
  304. end
  305. end
  306.  
  307. rm.C0 = clerp(rm.C0,rscf,speed)
  308. lm.C0 = clerp(lm.C0,lscf,speed)
  309. rj.C0 = clerp(rj.C0,rjcf,speed)
  310. neck.C0 = clerp(neck.C0,ncf,speed)
  311. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  312. llegm.C0 = clerp(llegm.C0,llcf,speed)
  313. end
  314.  
  315.  
  316. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement