Advertisement
ThatOneGuy561

Untitled

Jun 15th, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.60 KB | None | 0 0
  1. local plr = game.Players.LocalPlayer
  2. local chr = plr.Character
  3. local maus = plr:GetMouse()
  4. local PGui=plr.PlayerGui
  5. local lleg = chr["Left Leg"]
  6. local rleg = chr["Right Leg"]
  7. local larm = chr["Left Arm"]
  8. local rarm = chr["Right Arm"]
  9. local hed = chr.Head
  10. local rutprt = chr.HumanoidRootPart
  11. local torso = chr.Torso
  12. local otheranims=false
  13. local swimming=false
  14. chr.Animate.Disabled=true
  15. local fldb={['w']=false,['a']=false,['s']=false,['d']=false}
  16. local RunSpeed=30
  17. local WlkSpeed=16
  18. local SwimSpeed=14
  19. local SwimDashSpeed=28
  20. local anim = "Idling"
  21. local lastanim = "Idling"
  22. local val = 0
  23. local syne = 0
  24. local num = 0
  25. local runtime = 0
  26. local pseudohead=hed:Clone()
  27. for i,x in pairs(pseudohead:GetChildren()) do if not x.ClassName:find('Mesh') then x:Destroy() end end
  28. pseudohead.Name='PseudoHead'
  29. pseudohead.Parent=chr.Head
  30. local pseudoweld=Instance.new('Weld',torso)
  31. pseudoweld.Part0=hed
  32. pseudoweld.Name='PseudoHedWld'
  33. pseudoweld.Part1=pseudohead
  34. hed.Transparency=1
  35.  
  36. coroutine.wrap(function()
  37. for i,x in pairs(hed:GetChildren()) do if x:IsA('Sound') then x:Destroy() end end end)()
  38. function Lerp(a, b, i)
  39. local com1 = {a.X, a.Y, a.Z, a:toEulerAnglesXYZ()}
  40. local com2 = {b.X, b.Y, b.Z, b:toEulerAnglesXYZ()}
  41. local calx = com1[1] + (com2[1] - com1[1]) * i
  42. local caly = com1[2] + (com2[2] - com1[2]) * i
  43. local calz = com1[3] + (com2[3] - com1[3]) * i
  44. local cala = com1[4] + (com2[4] - com1[4]) * i
  45. local calb = com1[5] + (com2[5] - com1[5]) * i
  46. local calc = com1[6] + (com2[6] - com1[6]) * i
  47. return CFrame.new(calx, caly, calz) * CFrame.Angles(cala, calb, calc)
  48. end
  49. function TwnSingleNumber(s,f,m)
  50. local wot=s+(f-s)*m
  51. return wot
  52. end
  53. function TwnVector3(q,w,e)
  54. local begin={q.x,q.y,q.z}
  55. local ending={w.x,w.y,w.z}
  56. local bgx=begin[1]+(ending[1]-begin[1])*e
  57. local bgy=begin[2]+(ending[2]-begin[2])*e
  58. local bgz=begin[3]+(ending[3]-begin[3])*e
  59. return Vector3.new(bgx,bgy,bgz)
  60. end
  61. newWeld = function(wld, wp0, wp1, wc0x, wc0y, wc0z)
  62. wld = Instance.new("Weld", wp1)
  63. wld.Part0 = wp0
  64. wld.Part1 = wp1
  65. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  66. end
  67.  
  68. local angles = CFrame.Angles
  69. function clerp(a, b, t)
  70. return a:lerp(b, t)
  71. end
  72.  
  73.  
  74.  
  75. Player=game:GetService('Players').LocalPlayer
  76. Character=Player.Character
  77. Mouse=Player:GetMouse()
  78. m=Instance.new('Model',Character)
  79.  
  80.  
  81. local function weldBetween(a, b)
  82. local weldd = Instance.new("ManualWeld")
  83. weldd.Part0 = a
  84. weldd.Part1 = b
  85. weldd.C0 = CFrame.new()
  86. weldd.C1 = b.CFrame:inverse() * a.CFrame
  87. weldd.Parent = a
  88. return weldd
  89. end
  90.  
  91. it=Instance.new
  92.  
  93. function nooutline(part)
  94. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  95. end
  96.  
  97. function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  98. local fp=it("Part")
  99. fp.formFactor=formfactor
  100. fp.Parent=parent
  101. fp.Reflectance=reflectance
  102. fp.Transparency=transparency
  103. fp.CanCollide=false
  104. fp.Locked=true
  105. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  106. fp.Name=name
  107. fp.Size=size
  108. fp.Position=Character.Torso.Position
  109. nooutline(fp)
  110. fp.Material=material
  111. fp:BreakJoints()
  112. return fp
  113. end
  114.  
  115. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  116. local mesh=it(Mesh)
  117. mesh.Parent=part
  118. if Mesh=="SpecialMesh" then
  119. mesh.MeshType=meshtype
  120. mesh.MeshId=meshid
  121. end
  122. mesh.Offset=offset
  123. mesh.Scale=scale
  124. return mesh
  125. end
  126.  
  127. function weld(parent,part0,part1,c0,c1)
  128. local weld=it("Weld")
  129. weld.Parent=parent
  130. weld.Part0=part0
  131. weld.Part1=part1
  132. weld.C0=c0
  133. weld.C1=c1
  134. return weld
  135. end
  136.  
  137. LY_handle=part(Enum.FormFactor.Brick,m,Enum.Material.SmoothPlastic,1,1,"Dark stone grey","Handle",Vector3.new(1.45335066, 0.264246017, 0.211396158))
  138. LY_handleweld=weld(m,Character["Right Arm"],LY_handle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.00367164612, 0.987921953, 0.0167617798, 0.00026500001, -0.000169999985, 1, 4.4999997e-005, 0.999999881, 0.000169988081, -1, 4.49549443e-005, 0.000265007664))
  139. Color=part(Enum.FormFactor.Brick,m,Enum.Material.Neon,0,0.19999998807907,"Bright red","Color",Vector3.new(0.200000003, 0.264246017, 0.218002304))
  140. Colorweld=weld(m,LY_handle,Color,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.673862457, -0.000193119049, 0.0277631283, 0.999998569, -3.10177857e-005, -1.15665025e-005, -1.24345243e-005, -2.42797159e-006, -1.00000012, 3.1031057e-005, 0.999998271, -1.57067143e-006))
  141. mesh("SpecialMesh",Color,Enum.MeshType.Cylinder,"",Vector3.new(0, 0, 0),Vector3.new(0.198184475, 1, 1))
  142. Color=part(Enum.FormFactor.Brick,m,Enum.Material.Neon,0,0.19999998807907,"Bright red","Color",Vector3.new(0.200000003, 0.270852149, 0.270851493))
  143. Colorweld=weld(m,LY_handle,Color,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.971046448, -0.633370876, -8.34465027e-006, 0.999998569, -1.67783583e-008, 4.34461981e-007, 3.24653229e-008, 0.999998212, 4.28357794e-007, 4.34491085e-007, 4.28346709e-007, 1.00000012))
  144. mesh("SpecialMesh",Color,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(0.264245272, 0.924859583, 0.264245361))
  145. Color=part(Enum.FormFactor.Brick,m,Enum.Material.Neon,0,0.19999998807907,"Bright red","Color",Vector3.new(0.200000003, 0.270852149, 0.270851493))
  146. Colorweld=weld(m,LY_handle,Color,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.705991745, -0.13863945, -0.00022649765, 0.707114518, 0.707097352, 4.14534588e-006, -0.70709759, 0.707114279, -1.62664946e-005, -1.43024954e-005, 9.73419992e-006, 1.00000012))
  147. mesh("SpecialMesh",Color,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(0.264245272, 0.660614312, 0.264245361))
  148. Color=part(Enum.FormFactor.Brick,m,Enum.Material.Neon,0,0.19999998807907,"Bright red","Color",Vector3.new(0.200000003, 0.270852149, 0.270851493))
  149. Colorweld=weld(m,LY_handle,Color,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.667310715, 0.177476883, 0.000133514404, 0.70709914, -0.707113802, -1.69977284e-005, 0.707114041, 0.707098901, 3.84061423e-006, 9.00149462e-006, -1.40022084e-005, 1.00000012))
  150. mesh("SpecialMesh",Color,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(0.264245272, 0.660614312, 0.264245361))
  151. Color=part(Enum.FormFactor.Brick,m,Enum.Material.Neon,0,0.19999998807907,"Bright red","Color",Vector3.new(0.200000003, 0.270852149, 0.270851493))
  152. Colorweld=weld(m,LY_handle,Color,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.971019745, 0.687847018, 0, 1.00000012, 1.00408215e-009, 9.60426405e-010, 9.89530236e-010, 0.999999762, -9.68395142e-010, 9.60426405e-010, -9.72125491e-010, 1.00000012))
  153. mesh("SpecialMesh",Color,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(0.264245272, 0.924859583, 0.264245361))
  154. Color=part(Enum.FormFactor.Brick,m,Enum.Material.Neon,0,0.19999998807907,"Bright red","Color",Vector3.new(0.200000003, 0.264246017, 0.218002304))
  155. Colorweld=weld(m,LY_handle,Color,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.706794739, 0.0272381306, -7.15255737e-006, 0.999998569, -1.58179319e-008, 4.35422407e-007, 3.34257493e-008, 0.999998212, 4.27397623e-007, 4.35451511e-007, 4.27386425e-007, 1.00000012))
  156. mesh("SpecialMesh",Color,Enum.MeshType.Cylinder,"",Vector3.new(0, 0, 0),Vector3.new(0.264245272, 1, 1))
  157. Blade=part(Enum.FormFactor.Brick,m,Enum.Material.Neon,0,0.19999998807907,"Bright red","Blade",Vector3.new(7.00250864, 0.528491318, 0.200000003))
  158. Bladeweld=weld(m,LY_handle,Blade,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(4.74311829, 0.0272333622, 0, 1.00000012, 4.36557457e-011, 0, 2.91038305e-011, 0.999999762, -8.22453217e-012, 0, -1.1862511e-011, 1.00000012))
  159. mesh("BlockMesh",Blade,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.330306888))
  160. Part=part(Enum.FormFactor.Brick,m,Enum.Material.SmoothPlastic,0,0,"Dark stone grey","Part",Vector3.new(1.45335066, 0.264246017, 0.211396158))
  161. Partweld=weld(m,LY_handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-5.91278076e-005, 0.0272394419, 2.86102295e-006, 1.00000012, 4.36557457e-011, 0, 2.91038305e-011, 0.999999762, -8.22453217e-012, 0, -1.1862511e-011, 1.00000012))
  162. mesh("SpecialMesh",Part,Enum.MeshType.Cylinder,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  163. Color=part(Enum.FormFactor.Brick,m,Enum.Material.Neon,0,0.19999998807907,"Bright red","Color",Vector3.new(0.200000003, 1.39389634, 0.200000003))
  164. Colorweld=weld(m,LY_handle,Color,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00207185745, -2.27507019, 0.367805481, 0.000122999991, 3.09971547e-005, -1, -1.00000012, 3.10047035e-005, -0.00012300002, 3.09981406e-005, 0.999999821, 3.09999959e-005))
  165. mesh("SpecialMesh",Color,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.330306768, 1, 0.891827047))
  166. Color=part(Enum.FormFactor.Brick,m,Enum.Material.Neon,0,0.19999998807907,"Bright red","Color",Vector3.new(0.200000003, 1.40050244, 0.200000003))
  167. Colorweld=weld(m,LY_handle,Color,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000971078873, 7.54442596, 0.344686627, 6.1000057e-005, -3.1002859e-005, 1.00000012, 1.00000012, -3.09989991e-005, -6.09999697e-005, 3.09981406e-005, 0.999999821, 3.09999959e-005))
  168. mesh("SpecialMesh",Color,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.330306768, 1, 0.66061312))
  169. Color=part(Enum.FormFactor.Brick,m,Enum.Material.Neon,0,0.19999998807907,"Bright red","Color",Vector3.new(0.200000003, 1.40050244, 0.200000003))
  170. Colorweld=weld(m,LY_handle,Color,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00106692314, 7.54369164, 0.301707268, 6.19999773e-005, 3.09990464e-005, -1, 1.00000012, -9.2002796e-005, 6.19981438e-005, -9.19981394e-005, -0.999999821, -3.10018913e-005))
  171. mesh("SpecialMesh",Color,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.330306768, 1, 0.66061312))
  172. Color=part(Enum.FormFactor.Brick,m,Enum.Material.Neon,0,0.19999998807907,"Bright red","Color",Vector3.new(0.200000003, 0.200000003, 0.303882271))
  173. Colorweld=weld(m,LY_handle,Color,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000967741013, 1.14307976, -0.111138582, 6.1000057e-005, -3.10047508e-005, 1.00000012, 1.00000012, -3.09989991e-005, -6.09999697e-005, 3.09981406e-005, 0.999999821, 3.09981042e-005))
  174. mesh("SpecialMesh",Color,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.330306768, 0.990922511, 1))
  175. Color=part(Enum.FormFactor.Brick,m,Enum.Material.Neon,0,0.19999998807907,"Bright red","Color",Vector3.new(0.200000003, 0.200000003, 0.303882271))
  176. Colorweld=weld(m,LY_handle,Color,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00106334686, 1.14234924, -0.167325854, 6.19999773e-005, 3.10009382e-005, -1, 1.00000012, -9.2002796e-005, 6.19981438e-005, -9.19981394e-005, -0.999999821, -3.09999996e-005))
  177. mesh("SpecialMesh",Color,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.330306768, 0.990922511, 1))
  178. Color=part(Enum.FormFactor.Brick,m,Enum.Material.Neon,0,0.19999998807907,"Bright red","Color",Vector3.new(0.200000003, 0.389762193, 0.726674616))
  179. Colorweld=weld(m,LY_handle,Color,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-6.50882721e-005, -0.215640545, 8.60770226, 1.99873466e-006, -7.40025207e-005, 1.00000012, -3.09968163e-005, -0.999999821, -7.39984971e-005, 1.00000012, -3.10008181e-005, -1.99998613e-006))
  180. mesh("SpecialMesh",Color,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.330306768, 1, 1))
  181. Color=part(Enum.FormFactor.Brick,m,Enum.Material.Neon,0,0.19999998807907,"Bright red","Color",Vector3.new(0.200000003, 1.39389634, 0.200000003))
  182. Colorweld=weld(m,LY_handle,Color,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.000124931335, -2.27571106, 0.326155424, -1.86264515e-009, -9.20009552e-005, 1.00000012, -1.00000012, 3.09989991e-005, -2.91038305e-011, -3.09981406e-005, -0.999999821, -9.19999948e-005))
  183. mesh("SpecialMesh",Color,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.330306768, 1, 0.891827047))
  184. Color=part(Enum.FormFactor.Brick,m,Enum.Material.Neon,0,0.19999998807907,"Bright red","Color",Vector3.new(0.200000003, 0.389762193, 0.726674616))
  185. Colorweld=weld(m,LY_handle,Color,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.000325202942, -0.173182964, 8.60774612, -2.20000511e-005, 3.10054347e-005, -1.00000012, 7.39981479e-005, 0.999999821, 3.09975512e-005, 1.00000012, -7.40001851e-005, -2.20013317e-005))
  186. mesh("SpecialMesh",Color,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.330306768, 1, 1))
  187. Part=part(Enum.FormFactor.Brick,m,Enum.Material.SmoothPlastic,0,0,"Dark stone grey","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  188. Partweld=weld(m,LY_handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.677164078, -0.000199794769, 0.0277613401, 1.00000012, -3.09994066e-005, -1.20013719e-005, -1.20013137e-005, 2.95292011e-006, -1.00000012, 3.09995376e-005, 0.999999821, 2.9525288e-006))
  189. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.825765371, 0.660614371, 0.858796299))
  190. mesh("SpecialMesh",Part,Enum.MeshType.Cylinder,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  191. Part=part(Enum.FormFactor.Brick,m,Enum.Material.SmoothPlastic,0,0,"Dark stone grey","Part",Vector3.new(0.200000003, 0.270852149, 0.270851493))
  192. Partweld=weld(m,LY_handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.97104454, 0.0272381306, -1.1920929e-006, 1.00000012, 4.36557457e-011, 0, 2.91038305e-011, 0.999999762, -8.22453217e-012, 0, -1.1862511e-011, 1.00000012))
  193. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(0.528491259, 0.528491318, 1.32122672))
  194. Color_R=part(Enum.FormFactor.Brick,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Color_R",Vector3.new(0.200000003, 0.270852149, 0.270851493))
  195. Color_Rweld=weld(m,LY_handle,Color_R,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.97104454, 0.0272381306, -1.1920929e-006, 1.00000012, 4.36557457e-011, 0, 2.91038305e-011, 0.999999762, -8.22453217e-012, 0, -1.1862511e-011, 1.00000012))
  196. mesh("SpecialMesh",Color_R,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(0.515278935, 0.515278995, 1.18910372))
  197. LY_hitbox=part(Enum.FormFactor.Brick,m,Enum.Material.Neon,1,1,"Bright red","LY_hitbox",Vector3.new(7.75250864, 0.758491337, 0.200000003))
  198. LY_hitboxweld=weld(m,LY_handle,LY_hitbox,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(5.11811638, 0.0322332382, -2.38418579e-007, 1.00000012, 4.36557457e-011, 0, 2.91038305e-011, 0.999999762, -8.22453217e-012, 0, -1.1862511e-011, 1.00000012))
  199.  
  200.  
  201. --[[local mult = 2
  202. ----------------------------------------------------
  203. larm.Size = larm.Size * mult
  204. rarm.Size = rarm.Size * mult
  205. lleg.Size = lleg.Size * mult
  206. rleg.Size = rleg.Size * mult
  207. torso.Size = torso.Size * mult
  208. hed.Size = hed.Size * mult
  209. rutprt.Size = rutprt.Size * mult
  210. ----------------------------------------------------]]
  211. newWeld(law, torso, larm, -1.5, 0.5, 0)
  212. newWeld(raw, torso, rarm, 1.5, 0.5, 0)
  213. newWeld(llw, torso, lleg, -.5, -2, 0)
  214. newWeld(rlw, torso, rleg, .5, -2, 0)
  215. newWeld(hw, torso, hed, 0, 1.5, 0)
  216. local rutwald=Instance.new('Weld',rutprt)
  217. rutwald.Part0=rutprt
  218. rutwald.Part1=torso
  219. rutprt.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),0)
  220. larm.Weld.C1 = CFrame.new(0, 0.5, 0)*CFrame.Angles(math.rad(0),0,0)
  221. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)*CFrame.Angles(math.rad(0),0,0)
  222. rleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)
  223. lleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237. maus.KeyDown:connect(function(kei)
  238. if string.byte(kei)==48 and not otheranims then
  239. runnin=true
  240. end
  241. if kei=='w' then fldb.w=true end
  242. if kei=='a' then fldb.a=true end
  243. if kei=='s' then fldb.s=true end
  244. if kei=='d' then fldb.d=true end
  245. end)
  246. maus.KeyUp:connect(function(kei)
  247. if string.byte(kei)==48 and not otheranims then
  248. runnin=false
  249. end
  250. if kei=='w' then fldb.w=false end
  251. if kei=='a' then fldb.a=false end
  252. if kei=='s' then fldb.s=false end
  253. if kei=='d' then fldb.d=false end
  254. end)
  255.  
  256.  
  257.  
  258.  
  259.  
  260. game:service'RunService'.RenderStepped:connect(function()
  261. if anim~=lastanim then
  262. runtime=0
  263. end
  264. lastanim=anim
  265. chr.Humanoid.CameraOffset=(rutprt.CFrame:toObjectSpace(hed.CFrame)).p+Vector3.new(0,-1.25,0)
  266. syne=syne+.95
  267. if not otheranims and not swimming then
  268. if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 1 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
  269. anim="Idling"
  270. elseif (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude > 1 and (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude < RunSpeed-10 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
  271. anim="Walking"
  272. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude > RunSpeed-10 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
  273. anim="Sprinting"
  274. elseif torso.Velocity.y>5 and chr.Humanoid.Jump then
  275. anim='Jumping'
  276. elseif (torso.Velocity.y < -5) and chr.Humanoid.Jump then
  277. anim='Falling'
  278. end
  279. end
  280.  
  281. if anim ~= "Idling" then
  282. LY_handleweld.C0=clerp(LY_handleweld.C0,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),.1)
  283. end
  284.  
  285. if anim=="Idling" then
  286. idlesineinc=35
  287. LY_handleweld.C0=clerp(LY_handleweld.C0,CFrame.new(0, -.5, .46)*CFrame.Angles(math.rad(75),math.rad(0),math.rad(0)),.1)
  288. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525+math.cos(syne/idlesineinc)/25,0)*CFrame.Angles(math.rad(76),math.rad(12),math.rad(20)),.1)
  289. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525+math.cos(syne/idlesineinc)/25,0)*CFrame.Angles(0,0,math.rad(-3)),.1)
  290. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9-math.cos(syne/idlesineinc)/20,(math.cos(syne/idlesineinc)/35))*CFrame.Angles(-(math.cos(syne/idlesineinc)/35),0,math.rad(-2.5)),.1)
  291. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9-math.cos(syne/idlesineinc)/20,(math.cos(syne/idlesineinc)/35))*CFrame.Angles(-(math.cos(syne/idlesineinc)/35),0,math.rad(2.5)),.1)
  292. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/idlesineinc)/50,0)*CFrame.Angles(math.cos(syne/idlesineinc)/40,0,0),.1)
  293. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/idlesineinc)/20,0)*CFrame.Angles(math.cos(syne/idlesineinc)/35+math.rad(0),math.rad(0),math.rad(0)),.1)
  294. end
  295.  
  296. if anim=="Walking" then
  297. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525+math.cos(syne/15)/25,0)*CFrame.Angles(math.cos(syne/6)/1.25,math.rad(5),-(math.cos(syne/6.75)/15)+math.rad(3)),.1)
  298. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525+math.cos(syne/15)/25,0)*CFrame.Angles(-(math.cos(syne/6)/1.25),0,-(math.cos(syne/6.75)/15)-math.rad(3)),.1)
  299. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9-math.cos(syne/6)/10,-(math.cos(syne/6)/1.125))*CFrame.Angles(math.cos(syne/6)/1.125,0,math.rad(-2.5)),.1)
  300. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9-math.cos(syne/6)/10,math.cos(syne/6)/1.125)*CFrame.Angles(-(math.cos(syne/6)/1.125),0,math.rad(2.5)),.1)
  301. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/20)/50,0)*CFrame.Angles(-math.cos(syne/3)/20,0,0),.1)
  302. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/3.375)/20,math.cos(syne/3)/5)*CFrame.Angles(math.cos(syne/3)/20+math.rad(-3.5),math.cos(syne/6)/10,-math.cos(syne/6)/30+math.sin(rutprt.RotVelocity.y/2)/7.5),.1)
  303. end
  304.  
  305. if anim=="Sprinting" then
  306. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(-math.cos(syne/2.5)/10+math.rad(-55),0,math.rad(12.5)),.1)
  307. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(-math.cos(syne/2.5)/10+math.rad(-55),0,math.rad(-12.5)),.1)
  308. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.6-math.cos(syne/4)/4,-(math.cos(syne/4)*2)-math.rad(10))*CFrame.Angles(math.cos(syne/4)*2+math.rad(10),0,math.rad(-2.5)),.1)
  309. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.6-math.cos(syne/4)/4,math.cos(syne/4)*2-math.rad(10))*CFrame.Angles(-(math.cos(syne/4)*2)+math.rad(10),0,math.rad(2.5)),.1)
  310. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.55+math.cos(syne/20)/50,0)*CFrame.Angles(-math.cos(syne/2.5)/10+math.rad(20),0,0),.1)
  311. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.3+math.cos(syne/2.5)/15,math.cos(syne/2.5))*CFrame.Angles(math.cos(syne/2.5)/10+math.rad(-25),math.cos(syne/2.5)/10,math.cos(syne/4)/20+math.sin(rutprt.RotVelocity.y/2)/4),.1)
  312. end
  313.  
  314. if anim=="Jumping" then
  315. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(50)),.1)
  316. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(-50)),.1)
  317. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.4,0)*CFrame.Angles(math.rad(-17.5),0,math.rad(-2.5)),.1)
  318. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.1,-.1)*CFrame.Angles(math.rad(-17.5),0,math.rad(2.5)),.1)
  319. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/20)/50,0)*CFrame.Angles(math.cos(syne/20)/40,0,0),.1)
  320. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/20)/20,0)*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(0)),.1)
  321. end
  322.  
  323. if anim=="Falling" then
  324. rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(70)),.035)
  325. larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(-70)),.035)
  326. lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.2,0)*CFrame.Angles(math.rad(-14),0,math.rad(-2.5)),.035)
  327. rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(math.rad(0),0,math.rad(2.5)),.035)
  328. hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,-.3)*CFrame.Angles(math.rad(-40),0,0),.035)
  329. rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/20)/20,0)*CFrame.Angles(math.rad(10),math.rad(0),math.rad(0)),.035)
  330. end
  331.  
  332. if runnin and not otheranims and not swimming then
  333. chr.Humanoid.WalkSpeed=RunSpeed
  334. elseif not runnin and not otheranims and not swimming then
  335. chr.Humanoid.WalkSpeed=WlkSpeed
  336. end
  337. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement