Advertisement
jayrock3401

Untitled

Dec 24th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.53 KB | None | 0 0
  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.  
  88. local p = owner
  89. local char = p.Character
  90. local larm = char["Left Arm"]
  91. local rarm = char["Right Arm"]
  92. local lleg = char["Left Leg"]
  93. local rleg = char["Right Leg"]
  94. local hed = char.Head
  95. local torso = char.Torso
  96. local hum = char.Humanoid
  97. local cam = game.Workspace.CurrentCamera
  98. local root = char.HumanoidRootPart
  99. local deb = false
  100. local shot = 0
  101. local debris=game:service"Debris"
  102. local l = game:GetService("Lighting")
  103. local rs = game:GetService("RunService").RenderStepped
  104. ptz = {0.8, 0.85, 0.9, 0.95, 1, 1.05, 1.1}
  105. math.randomseed(os.time())
  106. ----------------------------------------------------
  107. Debounces = {
  108. CanAttack = true;
  109. NoIdl = false;
  110. Slashing = false;
  111. Slashed = false;
  112. RPunch = false;
  113. RPunched = false;
  114. LPunch = false;
  115. LPunched = false;
  116. }
  117. local Touche = {char.Name, }
  118. ----------------------------------------------------
  119. hed.face.Texture = "rbxassetid://227969918"
  120. char["Body Colors"].HeadColor = BrickColor.new("Pastel brown")
  121. char["Body Colors"].TorsoColor = BrickColor.new("Pastel brown")
  122. char["Body Colors"].LeftArmColor = BrickColor.new("Pastel brown")
  123. char["Body Colors"].RightArmColor = BrickColor.new("Pastel brown")
  124. char["Body Colors"].LeftLegColor = BrickColor.new("Pastel brown")
  125. char["Body Colors"].RightLegColor = BrickColor.new("Pastel brown")
  126. ----------------------------------------------------
  127. ypcall(function()
  128. char.Shirt:Destroy()
  129. char.Pants:Destroy()
  130. shirt = Instance.new("Shirt", char)
  131. shirt.Name = "Shirt"
  132. pants = Instance.new("Pants", char)
  133. pants.Name = "Pants"
  134. char.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=0"
  135. char.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=0"
  136. end)
  137. ----------------------------------------------------
  138. --------------nico
  139. local fartids={251309043,251309043}
  140. local timer=false
  141. local debris=game:GetService("Debris")
  142. local char=owner
  143. for i = 1,3,2 do
  144. local asdf=Instance.new("Part",char)
  145. asdf.Shape="Ball"
  146. asdf.Locked=true
  147. asdf.FormFactor="Custom"
  148. asdf.Material="SmoothPlastic"
  149. asdf.BrickColor=BrickColor.new(1030)
  150. asdf.Size=Vector3.new(.4,.4,.4)
  151. local weld=Instance.new("Weld",char)
  152. weld.Part0=char.Torso
  153. weld.Part1=asdf
  154. weld.C0=CFrame.new((i-2)/2.5,-.9,.4)
  155. end
  156. function crap()
  157. if timer==false then
  158. timer=true
  159. local char=owner
  160. local crap=Instance.new("Part",Workspace)
  161. crap.FormFactor="Custom"
  162. crap.BrickColor=BrickColor.new(25)
  163. crap.Material="Grass"
  164. crap.Size=Vector3.new(1.2,0.4,0.4)
  165. local snd=Instance.new("Sound",char)
  166. snd.SoundId="rbxassetid://" .. tostring(fartids[math.random(1,#fartids)])
  167. snd.Volume=2
  168. snd:Play()
  169. debris:AddItem(snd,snd.TimeLength)
  170. local smk=Instance.new("Smoke",crap)
  171. smk.Color=BrickColor.new(25).Color
  172. debris:AddItem(smk,2.5)
  173. for i = 0.15,1.3,.02 do
  174. local weld=Instance.new("Weld",crap)
  175. weld.Part0=char.Torso
  176. weld.Part1=crap
  177. weld.C0=CFrame.new(0,-.9,i)*CFrame.Angles(0,math.rad(90),0)
  178. wait()
  179. end
  180. local crapCFrame=crap.CFrame
  181. crap:Destroy()
  182.  
  183. for i = 0,1.2,0.4 do
  184. local newCrap=Instance.new("Part",Workspace)
  185. newCrap.FormFactor="Custom"
  186. newCrap.BrickColor=BrickColor.new(25)
  187. newCrap.Material="Grass"
  188. newCrap.Size=Vector3.new(.4,.4,.4)
  189. newCrap.CFrame=crapCFrame*CFrame.new(i-1,0,0)
  190. end
  191. timer=false
  192. end
  193. end
  194. game.Players.LocalPlayer:GetMouse().KeyDown:connect(function(key)
  195. if string.lower(key)=="x" then
  196. crap()
  197. end
  198. end)
  199.  
  200. do --CFrame lerp
  201. local function QuaternionFromCFrame(cf)
  202. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  203. local trace = m00 + m11 + m22
  204. if trace > 0 then
  205. local s = math.sqrt(1 + trace)
  206. local recip = 0.5/s
  207. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  208. else
  209. local i = 0
  210. if m11 > m00 then
  211. i = 1
  212. end
  213. if m22 > (i == 0 and m00 or m11) then
  214. i = 2
  215. end
  216. if i == 0 then
  217. local s = math.sqrt(m00-m11-m22+1)
  218. local recip = 0.5/s
  219. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  220. elseif i == 1 then
  221. local s = math.sqrt(m11-m22-m00+1)
  222. local recip = 0.5/s
  223. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  224. elseif i == 2 then
  225. local s = math.sqrt(m22-m00-m11+1)
  226. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  227. end
  228. end
  229. end
  230. local function QuaternionToCFrame(px, py, pz, x, y, z, w)
  231. local xs, ys, zs = x + x, y + y, z + z
  232. local wx, wy, wz = w*xs, w*ys, w*zs
  233. local xx = x*xs
  234. local xy = x*ys
  235. local xz = x*zs
  236. local yy = y*ys
  237. local yz = y*zs
  238. local zz = z*zs
  239. 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))
  240. end
  241. local function QuaternionSlerp(a, b, t)
  242. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  243. local startInterp, finishInterp;
  244. if cosTheta >= 0.0001 then
  245. if (1 - cosTheta) > 0.0001 then
  246. local theta = math.acos(cosTheta)
  247. local invSinTheta = 1/math.sin(theta)
  248. startInterp = math.sin((1-t)*theta)*invSinTheta
  249. finishInterp = math.sin(t*theta)*invSinTheta
  250. else
  251. startInterp = 1-t
  252. finishInterp = t
  253. end
  254. else
  255. if (1+cosTheta) > 0.0001 then
  256. local theta = math.acos(-cosTheta)
  257. local invSinTheta = 1/math.sin(theta)
  258. startInterp = math.sin((t-1)*theta)*invSinTheta
  259. finishInterp = math.sin(t*theta)*invSinTheta
  260. else
  261. startInterp = t-1
  262. finishInterp = t
  263. end
  264. end
  265. 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
  266. end
  267. function clerp(a,b,t)
  268. local qa = {QuaternionFromCFrame(a)}
  269. local qb = {QuaternionFromCFrame(b)}
  270. local ax, ay, az = a.x, a.y, a.z
  271. local bx, by, bz = b.x, b.y, b.z
  272. local _t = 1-t
  273. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  274. end
  275.  
  276. end
  277. do --the animating
  278. plr = owner
  279. char = plr.Character
  280. mouse = plr:GetMouse()
  281. humanoid = char:findFirstChild("Humanoid")
  282. torso = char:findFirstChild("Torso")
  283. head = char.Head
  284. ra = char:findFirstChild("Right Arm")
  285. la = char:findFirstChild("Left Arm")
  286. rl = char:findFirstChild("Right Leg")
  287. ll = char:findFirstChild("Left Leg")
  288. rs = torso:findFirstChild("Right Shoulder")
  289. ls = torso:findFirstChild("Left Shoulder")
  290. rh = torso:findFirstChild("Right Hip")
  291. lh = torso:findFirstChild("Left Hip")
  292. neck = torso:findFirstChild("Neck")
  293. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  294. anim = char:findFirstChild("Animate")
  295. rootpart = char:findFirstChild("HumanoidRootPart")
  296. camera = workspace.CurrentCamera
  297. if anim then
  298. anim:Destroy()
  299. end
  300.  
  301.  
  302. local rm = Instance.new("Motor", torso)
  303. rm.C0 = CFrame.new(1.5, 0.5, 0)
  304. rm.C1 = CFrame.new(0, 0.5, 0)
  305. rm.Part0 = torso
  306. rm.Part1 = ra
  307. local lm = Instance.new("Motor", torso)
  308. lm.C0 = CFrame.new(-1.5, 0.5, 0)
  309. lm.C1 = CFrame.new(0, 0.5, 0)
  310. lm.Part0 = torso
  311. lm.Part1 = la
  312.  
  313. local rlegm = Instance.new("Motor", torso)
  314. rlegm.C0 = CFrame.new(0.5, -1, 0)
  315. rlegm.C1 = CFrame.new(0, 1, 0)
  316. rlegm.Part0 = torso
  317. rlegm.Part1 = rl
  318. local llegm = Instance.new("Motor", torso)
  319. llegm.C0 = CFrame.new(-0.5, -1, 0)
  320. llegm.C1 = CFrame.new(0, 1, 0)
  321. llegm.Part0 = torso
  322. llegm.Part1 = ll
  323.  
  324. neck.C0 = CFrame.new(0, 1, 0)
  325. neck.C1 = CFrame.new(0, -0.5, 0)
  326.  
  327.  
  328. rj.C0 = CFrame.new()
  329. rj.C1 = CFrame.new()
  330.  
  331.  
  332. local sound = Instance.new("Sound", head)
  333. sound.SoundId = "http://www.roblox.com/asset/?id=130797915"
  334. sound.Volume = 0.8
  335. sound.Looped = true
  336.  
  337. local speed = 0.3
  338. local angle = 0
  339. local sitting = false
  340. local humanwalk = false
  341. local anglespeed = 1
  342. rsc0 = rm.C0
  343. lsc0 = lm.C0
  344. llc0 = llegm.C0
  345. rlc0 = rlegm.C0
  346. neckc0 = neck.C0
  347.  
  348. local controllerService = game:GetService("ControllerService")
  349. local controller = controllerService:GetChildren()[1]
  350.  
  351. controller.Parent = nil
  352.  
  353. while wait() do
  354. angle = (angle % 100) + anglespeed/10
  355. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  356. local rscf = rsc0
  357. local lscf = lsc0
  358. local rlcf = rlc0
  359. local llcf = llc0
  360. local rjcf = CFrame.new()
  361. local ncf = neckc0
  362. local rayz = Ray.new(rootpart.Position, Vector3.new(0, -6, 0))
  363. local hitz, enz = workspace:findPartOnRay(rayz, char)
  364. if not hitz then
  365. if sound.IsPlaying then
  366. sound:stop()
  367. end
  368.  
  369. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude > 2 then
  370.  
  371. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, 0)
  372. rjcf = CFrame.new() * CFrame.Angles(-math.pi/5, math.sin(angle)*0.05, 0)
  373. rscf = rsc0 * CFrame.Angles(math.pi/1.7+math.sin(angle)*0.1, 0, 0)
  374. lscf = lsc0 * CFrame.Angles(math.pi/1.7+math.sin(-angle)*0.1, 0, 0)
  375. rlcf = rlc0 * CFrame.Angles(-math.pi/10+math.sin(-angle)*0.3, 0, 0)
  376. llcf = llc0 * CFrame.Angles(-math.pi/10+math.sin(angle)*0.3, 0, 0)
  377.  
  378. else
  379.  
  380. ncf = neckc0 * CFrame.Angles(math.pi/14, 0, 0)
  381. rjcf = CFrame.new() * CFrame.Angles(-math.pi/18, math.sin(angle)*0.05, 0)
  382. rscf = rsc0 * CFrame.Angles(-math.pi/10+math.sin(angle)*0.2, 0, 0)
  383. lscf = lsc0 * CFrame.Angles(-math.pi/10+math.sin(-angle)*0.2, 0, 0)
  384. rlcf = rlc0 * CFrame.new(0, 0.7, -0.5) CFrame.Angles(-math.pi/14, 0, 0)
  385. llcf = llc0 * CFrame.Angles(-math.pi/20, 0, 0)
  386.  
  387. end
  388. elseif humanoid.Sit then
  389. if sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=150794704" then
  390. anglespeed = 6
  391. ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  392. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  393. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  394. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  395. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  396. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  397. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=135570347" then
  398. anglespeed = 4
  399. ncf = neckc0 * CFrame.Angles(math.pi/5-math.abs(math.sin(angle))*0.3, 0, 0)
  400. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  401. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  402. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  403. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  404. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  405. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=149713968" then
  406. anglespeed = 2
  407. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
  408. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
  409. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  410. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  411. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  412. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  413. else
  414. anglespeed = 1/2
  415. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
  416. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
  417. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  418. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  419. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  420. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  421. end
  422. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
  423. if sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=130797915" then
  424. anglespeed = 6
  425. ncf = neckc0 * CFrame.Angles(math.pi/10-math.sin(angle)*0.07, 0, 0)
  426. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/10, math.sin(angle)*0.001, 0)
  427. rscf = rsc0 * CFrame.Angles(math.pi/1+math.sin(angle)*0.5, 0, 0)
  428. lscf = lsc0 * CFrame.Angles(math.pi/1+math.sin(angle)*0.5, 0, 0)
  429. rlcf = rlc0 * CFrame.Angles(math.pi/10, math.sin(angle)*0.08, math.rad(6.5))
  430. llcf = llc0 * CFrame.Angles(math.pi/10, -math.sin(angle)*0.08, -math.rad(6.5))
  431. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=149713968" then
  432. anglespeed = 2
  433. ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3, 0, 0)
  434. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/20, math.sin(angle)*0.001, 0)
  435. rscf = rsc0 * CFrame.Angles(math.pi/2+math.abs(math.sin(angle)*1), 0, 0)
  436. lscf = lsc0 * CFrame.Angles(math.pi/2+math.abs(math.sin(angle)*1), 0, 0)
  437. rlcf = rlc0 * CFrame.Angles(math.pi/20, math.sin(angle)*0.08, math.rad(2.5))
  438. llcf = llc0 * CFrame.Angles(math.pi/20, -math.sin(angle)*0.08, -math.rad(2.5))
  439. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=130802245" then
  440. anglespeed = 3
  441. ncf = neckc0 * CFrame.Angles(math.sin(angle)*0.07, math.rad(30), 0)
  442. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*0.001, 0)
  443. rscf = rsc0 * CFrame.Angles(math.sin(angle)*0.05, 0, 0)
  444. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*0.05, 0, 0)
  445. rlcf = rlc0 * CFrame.new(0, -0.1 + math.abs(mvmnt)*0.1, -0.1) * CFrame.Angles(0, math.rad(5), math.rad(5))
  446. llcf = llc0 * CFrame.Angles(0, math.rad(2.5), math.rad(1))
  447. else
  448. if humanwalk then
  449. anglespeed = 1/4
  450. ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  451. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*0.001, 0)
  452. rscf = rsc0 * CFrame.Angles(math.sin(angle)*0.1, 0, 0)
  453. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*0.1, 0, 0)
  454. rlcf = rlc0 * CFrame.Angles(0, math.sin(angle)*0.08, math.rad(2.5))
  455. llcf = llc0 * CFrame.Angles(0, -math.sin(angle)*0.08, -math.rad(2.5))
  456. else
  457. anglespeed = 1/2
  458. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
  459. rjcf = CFrame.new(0, -2, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
  460. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  461. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  462. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  463. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  464. end
  465. end
  466. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 20 then
  467. if sound.IsPlaying then
  468. sound:stop()
  469. end
  470. if humanwalk then
  471. anglespeed = 4
  472. ncf = neckc0 * CFrame.Angles(math.pi/24, mvmnt*.02, 0)
  473. rjcf = CFrame.new(0, math.abs(mvmnt)*0.05, 0) * CFrame.Angles(-math.pi/24, -mvmnt*.02, 0)
  474. rscf = rsc0 * CFrame.Angles(math.sin(angle)*1.25, 0, -math.abs(mvmnt)*0.02)
  475. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*1.25, 0, math.abs(mvmnt)*0.02)
  476. rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*1, 0, math.rad(.5))
  477. llcf = llc0 * CFrame.Angles(math.sin(angle)*1, 0, -math.rad(.5))
  478. else
  479. anglespeed = 4
  480. ncf = neckc0 * CFrame.new(0, 0, .2) * CFrame.Angles(math.pi/1.9, 0, 0)
  481. 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)
  482. 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))
  483. 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))
  484. 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)
  485. 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)
  486. end
  487. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then
  488. if sound.IsPlaying then
  489. sound:stop()
  490. end
  491. if humanwalk then
  492. anglespeed = 5
  493. ncf = neckc0 * CFrame.Angles(math.pi/20, math.sin(angle)*.04, 0)
  494. rjcf = CFrame.new(0, -.4 + math.abs(mvmnt)*0.25, 0) * CFrame.Angles(-math.pi/20, -math.sin(angle)*.08, 0)
  495. 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)
  496. 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)
  497. 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))
  498. 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))
  499. else
  500. anglespeed = 5.5
  501. ncf = neckc0 * CFrame.new(0, 0, .2) * CFrame.Angles(math.pi/1.9+math.sin(mvmnt/2)*0.05, 0, 0)
  502. 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)
  503. rscf = rsc0 * CFrame.new(-1, 0.2, -.5) * CFrame.Angles(math.pi/2+math.sin(angle)*1.8, 0, math.rad(5))
  504. lscf = lsc0 * CFrame.new(1, 0.2, -.5) * CFrame.Angles(math.pi/2+math.sin(angle)*1.8, 0, -math.rad(5))
  505. 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)
  506. 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)
  507. end
  508. end
  509.  
  510. rm.C0 = clerp(rm.C0,rscf,speed)
  511. lm.C0 = clerp(lm.C0,lscf,speed)
  512. rj.C0 = clerp(rj.C0,rjcf,speed)
  513. neck.C0 = clerp(neck.C0,ncf,speed)
  514. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  515. llegm.C0 = clerp(llegm.C0,llcf,speed)
  516. end
  517.  
  518.  
  519. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement