Advertisement
yoinkydoodlewastaken

untitled

Jun 12th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87. local plr = owner
  88. local chr = plr.Character
  89. local maus = plr:GetMouse()
  90. local PGui=plr.PlayerGui
  91. local lleg = chr["Left Leg"]
  92. local rleg = chr["Right Leg"]
  93. local larm = chr["Left Arm"]
  94. local rarm = chr["Right Arm"]
  95. local hed = chr.Head
  96. local rutprt = chr.HumanoidRootPart
  97. local torso = chr.Torso
  98. local otheranims=false
  99. local armmovement=false
  100. chr.Animate.Disabled=true
  101. local RunSpeed=36
  102. local WlkSpeed=18
  103. local runnin=false
  104. local tik=0
  105. local rollvalue=0
  106. local swimming=false
  107. local fldb={['w']=false,['a']=false,['s']=false,['d']=false}
  108. local jumpval=0
  109. local idlerollv=0
  110.  
  111. local BallColor=torso.BrickColor
  112. local BallTransparency=0
  113. local BallReflectance=0
  114. local BallMaterial="Neon"
  115.  
  116.  
  117.  
  118. coroutine.wrap(function()
  119. for i,x in pairs(hed:GetChildren()) do if x:IsA('Sound') then x:Destroy() end end end)()
  120. function Lerp(a, b, i)
  121. local com1 = {a.X, a.Y, a.Z, a:toEulerAnglesXYZ()}
  122. local com2 = {b.X, b.Y, b.Z, b:toEulerAnglesXYZ()}
  123. local calx = com1[1] + (com2[1] - com1[1]) * i
  124. local caly = com1[2] + (com2[2] - com1[2]) * i
  125. local calz = com1[3] + (com2[3] - com1[3]) * i
  126. local cala = com1[4] + (com2[4] - com1[4]) * i
  127. local calb = com1[5] + (com2[5] - com1[5]) * i
  128. local calc = com1[6] + (com2[6] - com1[6]) * i
  129. return CFrame.new(calx, caly, calz) * CFrame.Angles(cala, calb, calc)
  130. end
  131. function TwnSingleNumber(s,f,m)
  132. local wot=s+(f-s)*m
  133. return wot
  134. end
  135. function TwnVector3(q,w,e)
  136. local begin={q.x,q.y,q.z}
  137. local ending={w.x,w.y,w.z}
  138. local bgx=begin[1]+(ending[1]-begin[1])*e
  139. local bgy=begin[2]+(ending[2]-begin[2])*e
  140. local bgz=begin[3]+(ending[3]-begin[3])*e
  141. return Vector3.new(bgx,bgy,bgz)
  142. end
  143. newWeld = function(wld, wp0, wp1, wc0x, wc0y, wc0z)
  144. wld = Instance.new("Weld", wp1)
  145. wld.Part0 = wp0
  146. wld.Part1 = wp1
  147. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  148. end
  149. function Avg(a, b)
  150. return CFrame.new((a.X+b.X)/2,(a.Y+b.Y)/2,(a.Z+b.Z)/2)
  151. end
  152.  
  153. local jump=Instance.new('Sound',rutprt)
  154. jump.Volume=.2
  155. jump.Pitch=1
  156. jump.SoundId='http://www.roblox.com/asset?id=170588191'
  157.  
  158. newWeld(law, torso, larm, -1.5, 0.5, 0)
  159. newWeld(raw, torso, rarm, 1.5, 0.5, 0)
  160. newWeld(llw, torso, lleg, -.5, -2, 0)
  161. newWeld(rlw, torso, rleg, .5, -2, 0)
  162. newWeld(hw, torso, hed, 0, 1.5, 0)
  163. local rutwald=Instance.new('Weld',rutprt)
  164. rutwald.Part0=rutprt
  165. rutwald.Part1=torso
  166. larm.Weld.C1 = CFrame.new(0, 0.5, 0)
  167. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
  168. rleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)
  169. lleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)
  170.  
  171. local anim = "Idling"
  172. local lastanim = "Idling"
  173. local val = 0
  174. local syne = 0
  175. local num = 0
  176. local runtime = 0
  177.  
  178. maus.KeyDown:connect(function(kei)
  179. if string.byte(kei)==48 and not otheranims and not sitting and not disabled then
  180. runnin=true
  181. end
  182. if kei=='w' then fldb.w=true end
  183. if kei=='a' then fldb.a=true end
  184. if kei=='s' then fldb.s=true end
  185. if kei=='d' then fldb.d=true end
  186. end)
  187. maus.KeyUp:connect(function(kei)
  188. if string.byte(kei)==48 and not otheranims and not sitting and not disabled then
  189. runnin=false
  190. end
  191. if kei=='w' then fldb.w=false end
  192. if kei=='a' then fldb.a=false end
  193. if kei=='s' then fldb.s=false end
  194. if kei=='d' then fldb.d=false end
  195. end)
  196.  
  197. local bawl=Instance.new("Part",torso)
  198. bawl.formFactor="Custom"
  199. bawl.Shape="Ball"
  200. bawl.BrickColor=(BallColor or torso.BrickColor)
  201. bawl.Material=BallMaterial
  202. bawl.Transparency=(BallTransparency or 0)
  203. bawl.Reflectance=(BallReflectance or 0)
  204. bawl.Size=Vector3.new(5.35,5.35,5.35)
  205. bawl.TopSurface=10
  206. bawl.BottomSurface=10
  207. bawl.LeftSurface=10
  208. bawl.RightSurface=10
  209. bawl.FrontSurface=10
  210. bawl.BackSurface=10
  211. bawl.Anchored=false
  212. bawl:breakJoints''
  213. bawl.Locked=true
  214. bawl.CanCollide=true
  215. --[[local bawlmesh=Instance.new("SpecialMesh",bawl)
  216. bawlmesh.MeshId="http://www.roblox.com/asset/?id=1527559"
  217. --bawlmesh.TextureId="http://www.roblox.com/asset?id=25701026"
  218. bawlmesh.Scale=Vector3.new(2.35,2.35,2.35)]]
  219. local bawllight=Instance.new("PointLight",bawl)
  220. bawllight.Brightness=1
  221. bawllight.Range=15
  222. bawllight.Color=bawl.BrickColor.Color
  223. bawllight.Shadows=true
  224. local bawlweld=Instance.new("Weld",bawl)
  225. bawlweld.Part0=rutprt
  226. bawlweld.Part1=bawl
  227. bawlweld.C1=CFrame.new(0,0,0)
  228. rutprt.Weld.C1=CFrame.new(0,-bawl.Size.y,0)*CFrame.Angles(math.rad(0),math.rad(0),0)
  229.  
  230. chr.Humanoid.Swimming:connect(function(speedpls)
  231. if speedpls>=5 and not otheranims and not disabled and not sitting then
  232. swimming=true
  233. anim="Swimming"
  234. elseif speedpls<5 and not otheranims and not disabled and not sitting then
  235. swimming=false
  236. end
  237. end)
  238.  
  239. coroutine.resume(coroutine.create(function()
  240. while true do
  241. if trailing then
  242. local Ray=Ray.new(rutprt.CFrame.p,(rutprt.CFrame.p-(rutprt.CFrame*CFrame.new(0,-2,0)).p).unit*-5)
  243. local hitbrick,hitposition=Workspace:FindPartOnRay(Ray,chr)
  244. if hitbrick and hitposition then
  245. local splash=Instance.new("Part",bawl)
  246. splash.Anchored=true
  247. splash.CanCollide=false
  248. splash.Transparency=0
  249. splash.formFactor="Custom"
  250. splash.BrickColor=hitbrick.BrickColor
  251. splash.Size=Vector3.new(2,2,2)
  252. game:service'Debris':AddItem(splash,2)
  253. splash.CFrame=CFrame.new(hitposition)*CFrame.Angles(math.random(1,3),math.random(1,3),math.random(1,3))
  254. local splm=Instance.new("BlockMesh",splash)
  255. coroutine.wrap(function()
  256. for a=0,1,.05 do
  257. splm.Scale=Vector3.new(a,a,a) splash.Transparency=splash.Transparency+.05 splash.CFrame=splash.CFrame+Vector3.new(0,.05,0) wait'' end
  258. end)()
  259. end
  260. wait''
  261. else
  262. wait''
  263. end
  264. end
  265. end))
  266.  
  267. game:service'RunService'.Stepped:connect(function()
  268. syne=syne+1
  269. if not otheranims and not swimming then
  270. 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
  271. anim="Idling"
  272.  
  273. 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
  274. anim="Walking"
  275. dnc=false
  276.  
  277. 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
  278. anim="Sprinting"
  279. dnc=false
  280.  
  281. elseif torso.Velocity.y>5 and chr.Humanoid.Jump then
  282. anim='Jumping'
  283. dnc=false
  284.  
  285. elseif (torso.Velocity.y < -5) and chr.Humanoid.Jump then
  286. anim='Falling'
  287. dnc=false
  288.  
  289. end
  290. end
  291.  
  292. if anim~=lastanim then runtime=0 end
  293. lastanim=anim
  294.  
  295. if anim=="Idling" then
  296. trailing=false
  297. if not armmovement then
  298. 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)
  299. 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)
  300. end
  301. 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)
  302. 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)
  303. 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)
  304. 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)
  305. bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,-math.cos(syne/25)*3)*CFrame.Angles(math.rad(rollvalue),0,0),.25)
  306. end
  307.  
  308.  
  309. if anim=="Walking" then
  310. trailing=true
  311. rollvalue=rollvalue+3
  312. if rollvalue>=359 then rollvalue=0 bawlweld.C0=CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/4)/5))
  313. 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))
  314. else
  315. bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/4)/5)),.2) end
  316. if not armmovement then
  317. 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)
  318. 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)
  319. end
  320.  
  321. 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)
  322.  
  323. 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)
  324.  
  325. 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)
  326. end
  327.  
  328. if anim=="Sprinting" then
  329. trailing=true
  330. rollvalue=rollvalue+5
  331. if rollvalue>=359 then rollvalue=0 bawlweld.C0=CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/3)/5))
  332. 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))
  333. else
  334. bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/3)/5)),.2) end
  335. if not armmovement then
  336. 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)
  337. 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)
  338. end
  339.  
  340. 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)
  341.  
  342. 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)
  343.  
  344. 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)
  345. end
  346.  
  347. if anim=="Falling" then
  348. trailing=false
  349. if not armmovement then
  350. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(25),0,math.rad(25)),.1)
  351. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(25),0,math.rad(-25)),.1)
  352. end
  353. 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)
  354. 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)
  355. hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5,-.3)*CFrame.Angles(math.rad(-15),0,0),.1)
  356. 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)
  357. bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(rollvalue),0,0),.325)
  358. end
  359.  
  360. if anim=="Jumping" then
  361. trailing=false
  362. if not armmovement then
  363. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(-25),0,math.rad(25)),.1)
  364. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(-25),0,math.rad(-25)),.1)
  365. end
  366. 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)
  367. 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)
  368. hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5,.05)*CFrame.Angles(math.rad(15),0,0),.1)
  369. 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)
  370. bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(rollvalue),0,0),.325)
  371. end
  372.  
  373. if anim=="WallRun" then
  374. chr.Humanoid.Jump=true
  375. trailing=false
  376. rollvalue=rollvalue+7
  377. if rollvalue>=359 then rollvalue=0 bawlweld.C0=CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/3)/5))
  378. 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))
  379. else
  380. bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/3)/5)),.2) end
  381. if not armmovement then
  382. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.325,.525,.2)*CFrame.Angles(math.rad(-45),0,math.rad(3)),.1)
  383. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.325,.525,.2)*CFrame.Angles(math.rad(-45),0,math.rad(-3)),.1)
  384. end
  385.  
  386. 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)
  387.  
  388. 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)
  389.  
  390. hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.45,.25)*CFrame.Angles(math.rad(30),0,0),.1)
  391. 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)
  392. end
  393.  
  394.  
  395. if anim=="Swimming" then
  396. rollvalue=rollvalue+4
  397. if rollvalue>=360 then rollvalue=0 end
  398. if not armmovement then
  399. 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)
  400. 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)
  401. end
  402.  
  403. 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)
  404.  
  405. 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)
  406.  
  407. bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,0),.25)
  408. 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)
  409. end
  410.  
  411. chr.Humanoid.CameraOffset=(rutprt.CFrame:toObjectSpace(hed.CFrame)).p+Vector3.new(0,-1.25,0)
  412.  
  413. if runnin and not disabled and not otheranims and not sitting then
  414. chr.Humanoid.WalkSpeed=RunSpeed
  415. elseif not runnin and not disabled and not otheranims and not sitting then
  416. chr.Humanoid.WalkSpeed=WlkSpeed
  417. end
  418.  
  419. if rutprt:findFirstChild("WallRunningVelocitypls") and otheranims then
  420. local rei=Ray.new((rutprt.CFrame).p,(((rutprt.CFrame*CFrame.new(0,0,-1)).p)-rutprt.CFrame.p).unit*((bawl.Size.y/2)))
  421. local hitpart,hitpos=Workspace:FindPartOnRay(rei,chr)
  422. if not hitpart then
  423. otheranims=false
  424. rutprt:findFirstChild("WallRunningVelocitypls"):Destroy''
  425. else
  426. return
  427. end
  428. end
  429.  
  430. if runnin and (fldb.w or fldb.a or fldb.s or fldb.d) then
  431. local rei=Ray.new((rutprt.CFrame).p,(((rutprt.CFrame*CFrame.new(0,0,-1)).p)-rutprt.CFrame.p).unit*((bawl.Size.y/2)))
  432. local hitpart,hitpos=Workspace:FindPartOnRay(rei,chr)
  433. if hitpart and hitpart.CanCollide then
  434. otheranims=true
  435. anim="WallRun"
  436. if not rutprt:findFirstChild("WallRunningVelocitypls") then
  437. local wlvelo=Instance.new("BodyVelocity",rutprt)
  438. wlvelo.Name="WallRunningVelocitypls"
  439. wlvelo.maxForce=Vector3.new(0,math.huge,0)
  440. wlvelo.velocity=Vector3.new(0,RunSpeed*1.2,0)
  441. end
  442. end
  443. else
  444. if rutprt:findFirstChild("WallRunningVelocitypls") and otheranims then
  445. otheranims=false
  446. rutprt:findFirstChild("WallRunningVelocitypls"):destroy''
  447. end
  448. end
  449. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement