Advertisement
Guest User

Untitled

a guest
Jan 20th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 armmovement=false
  14. chr.Animate.Disabled=true
  15. local RunSpeed=36
  16. local WlkSpeed=18
  17. local runnin=false
  18. local tik=0
  19. local rollvalue=0
  20. local swimming=false
  21. local fldb={['w']=false,['a']=false,['s']=false,['d']=false}
  22. local jumpval=0
  23. local idlerollv=0
  24.  
  25. local BallColor=torso.BrickColor
  26. local BallTransparency=0.5
  27. local BallReflectance=0
  28. local BallMaterial="Plastic"
  29.  
  30.  
  31.  
  32. coroutine.wrap(function()
  33. for i,x in pairs(hed:GetChildren()) do if x:IsA('Sound') then x:Destroy() end end end)()
  34. function Lerp(a, b, i)
  35. local com1 = {a.X, a.Y, a.Z, a:toEulerAnglesXYZ()}
  36. local com2 = {b.X, b.Y, b.Z, b:toEulerAnglesXYZ()}
  37. local calx = com1[1] + (com2[1] - com1[1]) * i
  38. local caly = com1[2] + (com2[2] - com1[2]) * i
  39. local calz = com1[3] + (com2[3] - com1[3]) * i
  40. local cala = com1[4] + (com2[4] - com1[4]) * i
  41. local calb = com1[5] + (com2[5] - com1[5]) * i
  42. local calc = com1[6] + (com2[6] - com1[6]) * i
  43. return CFrame.new(calx, caly, calz) * CFrame.Angles(cala, calb, calc)
  44. end
  45. function TwnSingleNumber(s,f,m)
  46. local wot=s+(f-s)*m
  47. return wot
  48. end
  49. function TwnVector3(q,w,e)
  50. local begin={q.x,q.y,q.z}
  51. local ending={w.x,w.y,w.z}
  52. local bgx=begin[1]+(ending[1]-begin[1])*e
  53. local bgy=begin[2]+(ending[2]-begin[2])*e
  54. local bgz=begin[3]+(ending[3]-begin[3])*e
  55. return Vector3.new(bgx,bgy,bgz)
  56. end
  57. newWeld = function(wld, wp0, wp1, wc0x, wc0y, wc0z)
  58. wld = Instance.new("Weld", wp1)
  59. wld.Part0 = wp0
  60. wld.Part1 = wp1
  61. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  62. end
  63. function Avg(a, b)
  64. return CFrame.new((a.X+b.X)/2,(a.Y+b.Y)/2,(a.Z+b.Z)/2)
  65. end
  66.  
  67. local jump=Instance.new('Sound',rutprt)
  68. jump.Volume=.2
  69. jump.Pitch=1
  70. jump.SoundId='http://www.roblox.com/asset?id=170588191'
  71.  
  72. newWeld(law, torso, larm, -1.5, 0.5, 0)
  73. newWeld(raw, torso, rarm, 1.5, 0.5, 0)
  74. newWeld(llw, torso, lleg, -.5, -2, 0)
  75. newWeld(rlw, torso, rleg, .5, -2, 0)
  76. newWeld(hw, torso, hed, 0, 1.5, 0)
  77. local rutwald=Instance.new('Weld',rutprt)
  78. rutwald.Part0=rutprt
  79. rutwald.Part1=torso
  80. larm.Weld.C1 = CFrame.new(0, 0.5, 0)
  81. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
  82. rleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)
  83. lleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)
  84.  
  85. local anim = "Idling"
  86. local lastanim = "Idling"
  87. local val = 0
  88. local syne = 0
  89. local num = 0
  90. local runtime = 0
  91.  
  92. maus.KeyDown:connect(function(kei)
  93. if string.byte(kei)==48 and not otheranims and not sitting and not disabled then
  94. runnin=true
  95. end
  96. if kei=='w' then fldb.w=true end
  97. if kei=='a' then fldb.a=true end
  98. if kei=='s' then fldb.s=true end
  99. if kei=='d' then fldb.d=true end
  100. end)
  101. maus.KeyUp:connect(function(kei)
  102. if string.byte(kei)==48 and not otheranims and not sitting and not disabled then
  103. runnin=false
  104. end
  105. if kei=='w' then fldb.w=false end
  106. if kei=='a' then fldb.a=false end
  107. if kei=='s' then fldb.s=false end
  108. if kei=='d' then fldb.d=false end
  109. end)
  110.  
  111. local bawl=Instance.new("Part",torso)
  112. bawl.formFactor="Custom"
  113. bawl.Shape="Ball"
  114. bawl.BrickColor=(BallColor or torso.BrickColor)
  115. bawl.Material=BallMaterial
  116. bawl.Transparency=(BallTransparency or 0)
  117. bawl.Reflectance=(BallReflectance or 0)
  118. bawl.Size=Vector3.new(5.35,5.35,5.35)
  119. bawl.TopSurface=10
  120. bawl.BottomSurface=10
  121. bawl.LeftSurface=10
  122. bawl.RightSurface=10
  123. bawl.FrontSurface=10
  124. bawl.BackSurface=10
  125. bawl.Anchored=false
  126. bawl:breakJoints''
  127. bawl.Locked=true
  128. bawl.CanCollide=true
  129. --[[local bawlmesh=Instance.new("SpecialMesh",bawl)
  130. bawlmesh.MeshId="http://www.roblox.com/asset/?id=1527559"
  131. --bawlmesh.TextureId="http://www.roblox.com/asset?id=25701026"
  132. bawlmesh.Scale=Vector3.new(2.35,2.35,2.35)]]
  133. local bawllight=Instance.new("PointLight",bawl)
  134. bawllight.Brightness=1
  135. bawllight.Range=15
  136. bawllight.Color=bawl.BrickColor.Color
  137. bawllight.Shadows=true
  138. local bawlweld=Instance.new("Weld",bawl)
  139. bawlweld.Part0=rutprt
  140. bawlweld.Part1=bawl
  141. bawlweld.C1=CFrame.new(0,0,0)
  142. rutprt.Weld.C1=CFrame.new(0,-bawl.Size.y,0)*CFrame.Angles(math.rad(0),math.rad(0),0)
  143.  
  144. part = Instance.new("Part", bawl)
  145. part.CFrame=bawl.CFrame
  146. mehs = Instance.new("SpecialMesh", part)
  147. mehs.MeshId="rbxassetid://536350485"
  148. mehs.TextureId="rbxassetid://536350488"
  149. local partweld=Instance.new("Weld", part)
  150. partweld.Part0=bawl
  151. partweld.Part1=part
  152. partweld.C1=CFrame.new(0,0,0)
  153.  
  154. wari = Instance.new("Sound", bawl)
  155. wari.SoundId="rbxassetid://167067148"
  156. wari.Looped = true
  157. wari.Playing = true
  158.  
  159. chr.Humanoid.Swimming:connect(function(speedpls)
  160. if speedpls>=5 and not otheranims and not disabled and not sitting then
  161. swimming=true
  162. anim="Swimming"
  163. elseif speedpls<5 and not otheranims and not disabled and not sitting then
  164. swimming=false
  165. end
  166. end)
  167.  
  168. coroutine.resume(coroutine.create(function()
  169. while true do
  170. if trailing then
  171. local Ray=Ray.new(rutprt.CFrame.p,(rutprt.CFrame.p-(rutprt.CFrame*CFrame.new(0,-2,0)).p).unit*-5)
  172. local hitbrick,hitposition=Workspace:FindPartOnRay(Ray,chr)
  173. if hitbrick and hitposition then
  174. local splash=Instance.new("Part",bawl)
  175. splash.Anchored=true
  176. splash.CanCollide=false
  177. splash.Transparency=0
  178. splash.formFactor="Custom"
  179. splash.BrickColor=hitbrick.BrickColor
  180. splash.Size=Vector3.new(2,2,2)
  181. game:service'Debris':AddItem(splash,2)
  182. splash.CFrame=CFrame.new(hitposition)*CFrame.Angles(math.random(1,3),math.random(1,3),math.random(1,3))
  183. local splm=Instance.new("BlockMesh",splash)
  184. coroutine.wrap(function()
  185. for a=0,1,.05 do
  186. splm.Scale=Vector3.new(a,a,a) splash.Transparency=splash.Transparency+.05 splash.CFrame=splash.CFrame+Vector3.new(0,.05,0) wait'' end
  187. end)()
  188. end
  189. wait''
  190. else
  191. wait''
  192. end
  193. end
  194. end))
  195.  
  196. game:service'RunService'.RenderStepped:connect(function()
  197. syne=syne+1
  198. if not otheranims and not swimming then
  199. if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 1 and not dnc and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
  200. anim="Idling"
  201.  
  202. elseif (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude > 1 and (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude < RunSpeed-5 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
  203. anim="Walking"
  204. dnc=false
  205.  
  206. 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
  207. anim="Sprinting"
  208. dnc=false
  209.  
  210. elseif torso.Velocity.y>5 and chr.Humanoid.Jump then
  211. anim='Jumping'
  212. dnc=false
  213.  
  214. elseif (torso.Velocity.y < -5) and chr.Humanoid.Jump then
  215. anim='Falling'
  216. dnc=false
  217.  
  218. end
  219. end
  220.  
  221. if anim~=lastanim then runtime=0 end
  222. lastanim=anim
  223.  
  224. if anim=="Idling" then
  225. trailing=false
  226. if not armmovement then
  227. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525+math.cos(syne/32.5)/25,0)*CFrame.Angles(0,0,math.rad(3)),.1)
  228. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525+math.cos(syne/32.5)/25,0)*CFrame.Angles(0,0,math.rad(-3)),.1)
  229. end
  230. lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.9-math.cos(syne/32.5)/20,(math.cos(syne/32.5)/35))*CFrame.Angles(-(math.cos(syne/32.5)/35),0,math.rad(-2.5)),.1)
  231. rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.9-math.cos(syne/32.5)/20,(math.cos(syne/32.5)/35))*CFrame.Angles(-(math.cos(syne/32.5)/35),0,math.rad(2.5)),.1)
  232. hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/32.5)/50,0)*CFrame.Angles(math.cos(syne/32.5)/40,0,0),.1)
  233. rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-.4,-math.cos(syne/25)*3)*CFrame.Angles(math.cos(syne/25)/4,math.rad(0),math.rad(0)),.1)
  234. bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,-math.cos(syne/25)*3)*CFrame.Angles(math.rad(rollvalue),0,0),.25)
  235. end
  236.  
  237.  
  238. if anim=="Walking" then
  239. trailing=true
  240. rollvalue=rollvalue+3
  241. if rollvalue>=359 then rollvalue=0 bawlweld.C0=CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/4)/5))
  242. elseif rollvalue>=177 and rollvalue<=183 then rollvalue=184 bawlweld.C0=CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/4)/5))
  243. else
  244. bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/4)/5)),.2) end
  245. if not armmovement then
  246. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525-math.cos(syne/8)/6,math.cos(syne/8)/6)*CFrame.Angles(-math.cos(syne/8)/3+math.rad(25),0,math.rad(12.5)),.1)
  247. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525+math.cos(syne/8)/6,-math.cos(syne/8)/6)*CFrame.Angles(math.cos(syne/8)/3+math.rad(25),0,math.rad(-12.5)),.1)
  248. end
  249.  
  250. lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-(math.cos(syne/8)/11)-.5,-1.7+math.sin(syne/4)/3.5-math.cos(syne/8)/4,math.rad(-5)-(math.cos(syne/8)))*CFrame.Angles(math.rad(5)+(math.cos(syne/8)),0,-(math.cos(syne/8)/11)+math.rad(1)),.1)
  251.  
  252. rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(-(math.cos(syne/8)/11)+.5,-1.7-math.sin(syne/4)/3.5+math.cos(syne/8)/4,math.rad(-5)+(math.cos(syne/8)))*CFrame.Angles(math.rad(5)-(math.cos(syne/8)),0,-(math.cos(syne/8)/11)+math.rad(-1)),.1)
  253.  
  254. rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-.5-math.cos(syne/4)/2,-math.cos(syne/4)*1.5)*CFrame.Angles(math.cos(syne/4)/10+math.rad(-5),math.cos(syne/4)/10,math.cos(syne/8)/10+math.sin(rutprt.RotVelocity.y/2)/10),.1)
  255. end
  256.  
  257. if anim=="Sprinting" then
  258. trailing=true
  259. rollvalue=rollvalue+5
  260. if rollvalue>=359 then rollvalue=0 bawlweld.C0=CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/3)/5))
  261. elseif rollvalue>=177 and rollvalue<=183 then rollvalue=184 bawlweld.C0=CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/3)/5))
  262. else
  263. bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/3)/5)),.2) end
  264. if not armmovement then
  265. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525-math.cos(syne/6)/6,math.sin(syne/6)/5)*CFrame.Angles(-math.cos(syne/6)/3+math.rad(25),0,math.rad(12.5)),.1)
  266. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525+math.cos(syne/6)/6,-math.sin(syne/6)/5)*CFrame.Angles(math.cos(syne/6)/3+math.rad(25),0,math.rad(-12.5)),.1)
  267. end
  268.  
  269. lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-(math.cos(syne/6)/11)-.575,-1.7+math.cos(syne/3)/4-math.cos(syne/6)/4,math.rad(-5)-(math.cos(syne/6)))*CFrame.Angles(math.rad(5)+(math.cos(syne/6)),0,-(math.cos(syne/6)/11)+math.rad(-5)),.1)
  270.  
  271. rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(-(math.cos(syne/6)/11)+.575,-1.7-math.cos(syne/3)/4+math.cos(syne/6)/4,math.rad(-5)+(math.cos(syne/6)))*CFrame.Angles(math.rad(5)-(math.cos(syne/6)),0,-(math.cos(syne/6)/11)+math.rad(5)),.1)
  272.  
  273. rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-.5-math.cos(syne/3)/2,-math.cos(syne/3)*1.5)*CFrame.Angles(math.cos(syne/3)/10+math.rad(-5),math.cos(syne/3)/10,math.cos(syne/6)/10+math.sin(rutprt.RotVelocity.y/2)/10),.1)
  274. end
  275.  
  276. if anim=="Falling" then
  277. trailing=false
  278. if not armmovement then
  279. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(25),0,math.rad(25)),.1)
  280. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(25),0,math.rad(-25)),.1)
  281. end
  282. lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,math.rad(-20))*CFrame.Angles(math.rad(20),0,math.rad(-2.5)),.1)
  283. rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.9,math.rad(-20))*CFrame.Angles(math.rad(20),0,math.rad(2.5)),.1)
  284. hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5,-.3)*CFrame.Angles(math.rad(-15),0,0),.1)
  285. rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,rutprt.Weld.C0.y+.2,1.75)*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(0)),.1)
  286. bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(rollvalue),0,0),.325)
  287. end
  288.  
  289. if anim=="Jumping" then
  290. trailing=false
  291. if not armmovement then
  292. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(-25),0,math.rad(25)),.1)
  293. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(-25),0,math.rad(-25)),.1)
  294. end
  295. lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,math.rad(5))*CFrame.Angles(math.rad(-5),0,math.rad(-2.5)),.1)
  296. rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.9,math.rad(5))*CFrame.Angles(math.rad(-5),0,math.rad(2.5)),.1)
  297. hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5,.05)*CFrame.Angles(math.rad(15),0,0),.1)
  298. rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,rutprt.Weld.C0.y+.1,0)*CFrame.Angles(math.rad(5),math.rad(0),math.rad(0)),.1)
  299. bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(rollvalue),0,0),.325)
  300. end
  301.  
  302. if anim=="WallRun" then
  303. chr.Humanoid.Jump=true
  304. trailing=false
  305. rollvalue=rollvalue+7
  306. if rollvalue>=359 then rollvalue=0 bawlweld.C0=CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/3)/5))
  307. elseif rollvalue>=177 and rollvalue<=183 then rollvalue=184 bawlweld.C0=CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/3)/5))
  308. else
  309. bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/3)/5)),.2) end
  310. if not armmovement then
  311. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.325,.525,.2)*CFrame.Angles(math.rad(-45),0,math.rad(3)),.1)
  312. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.325,.525,.2)*CFrame.Angles(math.rad(-45),0,math.rad(-3)),.1)
  313. end
  314.  
  315. lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-(math.cos(syne/5)/11)-.575,-1.8-math.cos(syne/2.5)/2+math.cos(syne/5)/6,math.rad(-30)-(math.cos(syne/5)))*CFrame.Angles(math.rad(30)+(math.cos(syne/5)),0,-(math.cos(syne/5)/11)+math.rad(-5)),.1)
  316.  
  317. rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(-(math.cos(syne/5)/11)+.575,-1.8+math.cos(syne/2.5)/2-math.cos(syne/5)/6,math.rad(-30)+(math.cos(syne/5)))*CFrame.Angles(math.rad(30)-(math.cos(syne/5)),0,-(math.cos(syne/5)/11)+math.rad(5)),.1)
  318.  
  319. hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.45,.25)*CFrame.Angles(math.rad(30),0,0),.1)
  320. rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-1-math.cos(syne/2.5)/2,2-math.cos(syne/3)*1.5)*CFrame.Angles(math.cos(syne/2.5)/10+math.rad(-3),math.cos(syne/2.5)/10,math.cos(syne/5)/10+math.sin(rutprt.RotVelocity.y/2)/10),.1)
  321. end
  322.  
  323.  
  324. if anim=="Swimming" then
  325. rollvalue=rollvalue+4
  326. if rollvalue>=360 then rollvalue=0 end
  327. if not armmovement then
  328. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525-math.cos(syne/8)/6,math.cos(syne/8)/6)*CFrame.Angles(-math.cos(syne/8)/3+math.rad(25),0,math.rad(12.5)),.1)
  329. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525+math.cos(syne/8)/6,-math.cos(syne/8)/6)*CFrame.Angles(math.cos(syne/8)/3+math.rad(25),0,math.rad(-12.5)),.1)
  330. end
  331.  
  332. lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.7+math.cos(syne/4)/4,math.rad(-5)-(math.cos(syne/8)))*CFrame.Angles(math.rad(5)+(math.cos(syne/8)),0,math.rad(-5)),.1)
  333.  
  334. rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.7-math.cos(syne/4)/4,math.rad(-5)+(math.cos(syne/8)))*CFrame.Angles(math.rad(5)-(math.cos(syne/8)),0,math.rad(5)),.1)
  335.  
  336. bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,0),.25)
  337. rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-.4-math.cos(syne/4)/4,-math.cos(syne/4)*1.25)*CFrame.Angles(math.cos(syne/4)/10+math.rad(95),math.cos(syne/4)/10,math.cos(syne/8)/10+math.sin(rutprt.RotVelocity.y/2)/10),.1)
  338. end
  339.  
  340. chr.Humanoid.CameraOffset=(rutprt.CFrame:toObjectSpace(hed.CFrame)).p+Vector3.new(0,-1.25,0)
  341.  
  342. if runnin and not disabled and not otheranims and not sitting then
  343. chr.Humanoid.WalkSpeed=RunSpeed
  344. elseif not runnin and not disabled and not otheranims and not sitting then
  345. chr.Humanoid.WalkSpeed=WlkSpeed
  346. end
  347.  
  348. if rutprt:findFirstChild("WallRunningVelocitypls") and otheranims then
  349. local rei=Ray.new((rutprt.CFrame).p,(((rutprt.CFrame*CFrame.new(0,0,-1)).p)-rutprt.CFrame.p).unit*((bawl.Size.y/2)))
  350. local hitpart,hitpos=Workspace:FindPartOnRay(rei,chr)
  351. if not hitpart then
  352. otheranims=false
  353. rutprt:findFirstChild("WallRunningVelocitypls"):Destroy''
  354. else
  355. return
  356. end
  357. end
  358.  
  359. if runnin and (fldb.w or fldb.a or fldb.s or fldb.d) then
  360. local rei=Ray.new((rutprt.CFrame).p,(((rutprt.CFrame*CFrame.new(0,0,-1)).p)-rutprt.CFrame.p).unit*((bawl.Size.y/2)))
  361. local hitpart,hitpos=Workspace:FindPartOnRay(rei,chr)
  362. if hitpart and hitpart.CanCollide then
  363. otheranims=true
  364. anim="WallRun"
  365. if not rutprt:findFirstChild("WallRunningVelocitypls") then
  366. local wlvelo=Instance.new("BodyVelocity",rutprt)
  367. wlvelo.Name="WallRunningVelocitypls"
  368. wlvelo.maxForce=Vector3.new(0,math.huge,0)
  369. wlvelo.velocity=Vector3.new(0,RunSpeed*1.2,0)
  370. end
  371. end
  372. else
  373. if rutprt:findFirstChild("WallRunningVelocitypls") and otheranims then
  374. otheranims=false
  375. rutprt:findFirstChild("WallRunningVelocitypls"):destroy''
  376. end
  377. end
  378. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement