Advertisement
Hugo1234cool

Untitled

Feb 22nd, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.79 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do print("FE Compatibility code V2 by Mokiros")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end
  6. local p =owner
  7. local char = p.Character
  8. local mouse = p:GetMouse()
  9. local larm = char["Left Arm"]
  10. local rarm = char["Right Arm"]
  11. local lleg = char["Left Leg"]
  12. local rleg = char["Right Leg"]
  13. local hed = char.Head
  14. local torso = char.Torso
  15. local hum = char.Humanoid
  16. local cam = game.Workspace.CurrentCamera
  17. local root = char.HumanoidRootPart
  18. local deb = false
  19. local shot = 0
  20. local debris=game:service"Debris"
  21. local l = game:GetService("Lighting")
  22. local rs = game:GetService("RunService").RenderStepped
  23. ptz = {0.8, 0.85, 0.9, 0.95, 1, 1.05, 1.1}
  24. math.randomseed(os.time())
  25. ----------------------------------------------------
  26. Debounces = {
  27. CanAttack = true;
  28. NoIdl = false;
  29. Slashing = false;
  30. Slashed = false;
  31. RPunch = false;
  32. RPunched = false;
  33. LPunch = false;
  34. LPunched = false;
  35. }
  36. local Touche = {char.Name, }
  37. ----------------------------------------------------
  38. hed.face.Texture = "rbxassetid://227969918"
  39. char["Body Colors"].HeadColor = BrickColor.new("Pastel brown")
  40. char["Body Colors"].TorsoColor = BrickColor.new("Pastel brown")
  41. char["Body Colors"].LeftArmColor = BrickColor.new("Pastel brown")
  42. char["Body Colors"].RightArmColor = BrickColor.new("Pastel brown")
  43. char["Body Colors"].LeftLegColor = BrickColor.new("Pastel brown")
  44. char["Body Colors"].RightLegColor = BrickColor.new("Pastel brown")
  45. ----------------------------------------------------
  46. ypcall(function()
  47. char.Shirt:Destroy()
  48. char.Pants:Destroy()
  49. shirt = Instance.new("Shirt", char)
  50. shirt.Name = "Shirt"
  51. pants = Instance.new("Pants", char)
  52. pants.Name = "Pants"
  53. char.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=0"
  54. char.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=0"
  55. end)
  56. ----------------------------------------------------
  57. --------------nico
  58. local fartids={251309043,251309043}
  59. local timer=false
  60. local debris=game:GetService("Debris")
  61. local char=game.Players.LocalPlayer.Character
  62. for i = 1,3,2 do
  63. local asdf=Instance.new("Part",char)
  64. asdf.Shape="Ball"
  65. asdf.Locked=true
  66. asdf.FormFactor="Custom"
  67. asdf.Material="SmoothPlastic"
  68. asdf.BrickColor=BrickColor.new(1030)
  69. asdf.Size=Vector3.new(.4,.4,.4)
  70. local weld=Instance.new("Weld",char)
  71. weld.Part0=char.Torso
  72. weld.Part1=asdf
  73. weld.C0=CFrame.new((i-2)/2.5,-.9,.4)
  74. end
  75. function crap()
  76. if timer==false then
  77. timer=true
  78. local char=game.Players.LocalPlayer.Character
  79. local crap=Instance.new("Part",Workspace)
  80. crap.FormFactor="Custom"
  81. crap.BrickColor=BrickColor.new(25)
  82. crap.Material="Grass"
  83. crap.Size=Vector3.new(1.2,0.4,0.4)
  84. local snd=Instance.new("Sound",char)
  85. snd.SoundId="rbxassetid://" .. tostring(fartids[math.random(1,#fartids)])
  86. snd.Volume=2
  87. snd:Play()
  88. debris:AddItem(snd,snd.TimeLength)
  89. local smk=Instance.new("Smoke",crap)
  90. smk.Color=BrickColor.new(25).Color
  91. debris:AddItem(smk,2.5)
  92. for i = 0.15,1.3,.02 do
  93. local weld=Instance.new("Weld",crap)
  94. weld.Part0=char.Torso
  95. weld.Part1=crap
  96. weld.C0=CFrame.new(0,-.9,i)*CFrame.Angles(0,math.rad(90),0)
  97. wait()
  98. end
  99. local crapCFrame=crap.CFrame
  100. crap:Destroy()
  101.  
  102. for i = 0,1.2,0.4 do
  103. local newCrap=Instance.new("Part",Workspace)
  104. newCrap.FormFactor="Custom"
  105. newCrap.BrickColor=BrickColor.new(25)
  106. newCrap.Material="Grass"
  107. newCrap.Size=Vector3.new(.4,.4,.4)
  108. newCrap.CFrame=crapCFrame*CFrame.new(i-1,0,0)
  109. end
  110. timer=false
  111. end
  112. end
  113. game.Players.LocalPlayer:GetMouse().KeyDown:connect(function(key)
  114. if string.lower(key)=="x" then
  115. crap()
  116. end
  117. end)
  118.  
  119. do --CFrame lerp
  120. local function QuaternionFromCFrame(cf)
  121. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  122. local trace = m00 + m11 + m22
  123. if trace > 0 then
  124. local s = math.sqrt(1 + trace)
  125. local recip = 0.5/s
  126. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  127. else
  128. local i = 0
  129. if m11 > m00 then
  130. i = 1
  131. end
  132. if m22 > (i == 0 and m00 or m11) then
  133. i = 2
  134. end
  135. if i == 0 then
  136. local s = math.sqrt(m00-m11-m22+1)
  137. local recip = 0.5/s
  138. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  139. elseif i == 1 then
  140. local s = math.sqrt(m11-m22-m00+1)
  141. local recip = 0.5/s
  142. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  143. elseif i == 2 then
  144. local s = math.sqrt(m22-m00-m11+1)
  145. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  146. end
  147. end
  148. end
  149. local function QuaternionToCFrame(px, py, pz, x, y, z, w)
  150. local xs, ys, zs = x + x, y + y, z + z
  151. local wx, wy, wz = w*xs, w*ys, w*zs
  152. local xx = x*xs
  153. local xy = x*ys
  154. local xz = x*zs
  155. local yy = y*ys
  156. local yz = y*zs
  157. local zz = z*zs
  158. 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))
  159. end
  160. local function QuaternionSlerp(a, b, t)
  161. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  162. local startInterp, finishInterp;
  163. if cosTheta >= 0.0001 then
  164. if (1 - cosTheta) > 0.0001 then
  165. local theta = math.acos(cosTheta)
  166. local invSinTheta = 1/math.sin(theta)
  167. startInterp = math.sin((1-t)*theta)*invSinTheta
  168. finishInterp = math.sin(t*theta)*invSinTheta
  169. else
  170. startInterp = 1-t
  171. finishInterp = t
  172. end
  173. else
  174. if (1+cosTheta) > 0.0001 then
  175. local theta = math.acos(-cosTheta)
  176. local invSinTheta = 1/math.sin(theta)
  177. startInterp = math.sin((t-1)*theta)*invSinTheta
  178. finishInterp = math.sin(t*theta)*invSinTheta
  179. else
  180. startInterp = t-1
  181. finishInterp = t
  182. end
  183. end
  184. 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
  185. end
  186. function clerp(a,b,t)
  187. local qa = {QuaternionFromCFrame(a)}
  188. local qb = {QuaternionFromCFrame(b)}
  189. local ax, ay, az = a.x, a.y, a.z
  190. local bx, by, bz = b.x, b.y, b.z
  191. local _t = 1-t
  192. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  193. end
  194.  
  195. end
  196. do --the animating
  197. plr = game:service'Players'.LocalPlayer
  198. char = plr.Character
  199. mouse = plr:GetMouse()
  200. humanoid = char:findFirstChild("Humanoid")
  201. torso = char:findFirstChild("Torso")
  202. head = char.Head
  203. ra = char:findFirstChild("Right Arm")
  204. la = char:findFirstChild("Left Arm")
  205. rl = char:findFirstChild("Right Leg")
  206. ll = char:findFirstChild("Left Leg")
  207. rs = torso:findFirstChild("Right Shoulder")
  208. ls = torso:findFirstChild("Left Shoulder")
  209. rh = torso:findFirstChild("Right Hip")
  210. lh = torso:findFirstChild("Left Hip")
  211. neck = torso:findFirstChild("Neck")
  212. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  213. anim = char:findFirstChild("Animate")
  214. rootpart = char:findFirstChild("HumanoidRootPart")
  215. camera = workspace.CurrentCamera
  216. if anim then
  217. anim:Destroy()
  218. end
  219.  
  220.  
  221. local rm = Instance.new("Motor", torso)
  222. rm.C0 = CFrame.new(1.5, 0.5, 0)
  223. rm.C1 = CFrame.new(0, 0.5, 0)
  224. rm.Part0 = torso
  225. rm.Part1 = ra
  226. local lm = Instance.new("Motor", torso)
  227. lm.C0 = CFrame.new(-1.5, 0.5, 0)
  228. lm.C1 = CFrame.new(0, 0.5, 0)
  229. lm.Part0 = torso
  230. lm.Part1 = la
  231.  
  232. local rlegm = Instance.new("Motor", torso)
  233. rlegm.C0 = CFrame.new(0.5, -1, 0)
  234. rlegm.C1 = CFrame.new(0, 1, 0)
  235. rlegm.Part0 = torso
  236. rlegm.Part1 = rl
  237. local llegm = Instance.new("Motor", torso)
  238. llegm.C0 = CFrame.new(-0.5, -1, 0)
  239. llegm.C1 = CFrame.new(0, 1, 0)
  240. llegm.Part0 = torso
  241. llegm.Part1 = ll
  242.  
  243. neck.C0 = CFrame.new(0, 1, 0)
  244. neck.C1 = CFrame.new(0, -0.5, 0)
  245.  
  246.  
  247. rj.C0 = CFrame.new()
  248. rj.C1 = CFrame.new()
  249.  
  250.  
  251. local sound = Instance.new("Sound", head)
  252. sound.SoundId = "http://www.roblox.com/asset/?id=130797915"
  253. sound.Volume = 0.8
  254. sound.Looped = true
  255.  
  256. local speed = 0.3
  257. local angle = 0
  258. local sitting = false
  259. local humanwalk = false
  260. local anglespeed = 1
  261. rsc0 = rm.C0
  262. lsc0 = lm.C0
  263. llc0 = llegm.C0
  264. rlc0 = rlegm.C0
  265. neckc0 = neck.C0
  266.  
  267. local controllerService = game:GetService("ControllerService")
  268. local controller = controllerService:GetChildren()[1]
  269.  
  270. controller.Parent = nil
  271.  
  272. while wait() do
  273. angle = (angle % 100) + anglespeed/10
  274. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  275. local rscf = rsc0
  276. local lscf = lsc0
  277. local rlcf = rlc0
  278. local llcf = llc0
  279. local rjcf = CFrame.new()
  280. local ncf = neckc0
  281. local rayz = Ray.new(rootpart.Position, Vector3.new(0, -6, 0))
  282. local hitz, enz = workspace:findPartOnRay(rayz, char)
  283. if not hitz then
  284. if sound.IsPlaying then
  285. sound:stop()
  286. end
  287.  
  288. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude > 2 then
  289.  
  290. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, 0)
  291. rjcf = CFrame.new() * CFrame.Angles(-math.pi/5, math.sin(angle)*0.05, 0)
  292. rscf = rsc0 * CFrame.Angles(math.pi/1.7+math.sin(angle)*0.1, 0, 0)
  293. lscf = lsc0 * CFrame.Angles(math.pi/1.7+math.sin(-angle)*0.1, 0, 0)
  294. rlcf = rlc0 * CFrame.Angles(-math.pi/10+math.sin(-angle)*0.3, 0, 0)
  295. llcf = llc0 * CFrame.Angles(-math.pi/10+math.sin(angle)*0.3, 0, 0)
  296.  
  297. else
  298.  
  299. ncf = neckc0 * CFrame.Angles(math.pi/14, 0, 0)
  300. rjcf = CFrame.new() * CFrame.Angles(-math.pi/18, math.sin(angle)*0.05, 0)
  301. rscf = rsc0 * CFrame.Angles(-math.pi/10+math.sin(angle)*0.2, 0, 0)
  302. lscf = lsc0 * CFrame.Angles(-math.pi/10+math.sin(-angle)*0.2, 0, 0)
  303. rlcf = rlc0 * CFrame.new(0, 0.7, -0.5) CFrame.Angles(-math.pi/14, 0, 0)
  304. llcf = llc0 * CFrame.Angles(-math.pi/20, 0, 0)
  305.  
  306. end
  307. elseif humanoid.Sit then
  308. if sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=150794704" then
  309. anglespeed = 6
  310. ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  311. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  312. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  313. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  314. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  315. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  316. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=135570347" then
  317. anglespeed = 4
  318. ncf = neckc0 * CFrame.Angles(math.pi/5-math.abs(math.sin(angle))*0.3, 0, 0)
  319. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  320. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  321. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  322. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  323. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  324. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=149713968" then
  325. anglespeed = 2
  326. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
  327. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
  328. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  329. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  330. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  331. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  332. else
  333. anglespeed = 1/2
  334. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
  335. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
  336. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  337. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  338. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  339. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  340. end
  341. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
  342. if sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=130797915" then
  343. anglespeed = 6
  344. ncf = neckc0 * CFrame.Angles(math.pi/10-math.sin(angle)*0.07, 0, 0)
  345. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/10, math.sin(angle)*0.001, 0)
  346. rscf = rsc0 * CFrame.Angles(math.pi/1+math.sin(angle)*0.5, 0, 0)
  347. lscf = lsc0 * CFrame.Angles(math.pi/1+math.sin(angle)*0.5, 0, 0)
  348. rlcf = rlc0 * CFrame.Angles(math.pi/10, math.sin(angle)*0.08, math.rad(6.5))
  349. llcf = llc0 * CFrame.Angles(math.pi/10, -math.sin(angle)*0.08, -math.rad(6.5))
  350. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=149713968" then
  351. anglespeed = 2
  352. ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3, 0, 0)
  353. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/20, math.sin(angle)*0.001, 0)
  354. rscf = rsc0 * CFrame.Angles(math.pi/2+math.abs(math.sin(angle)*1), 0, 0)
  355. lscf = lsc0 * CFrame.Angles(math.pi/2+math.abs(math.sin(angle)*1), 0, 0)
  356. rlcf = rlc0 * CFrame.Angles(math.pi/20, math.sin(angle)*0.08, math.rad(2.5))
  357. llcf = llc0 * CFrame.Angles(math.pi/20, -math.sin(angle)*0.08, -math.rad(2.5))
  358. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=130802245" then
  359. anglespeed = 3
  360. ncf = neckc0 * CFrame.Angles(math.sin(angle)*0.07, math.rad(30), 0)
  361. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*0.001, 0)
  362. rscf = rsc0 * CFrame.Angles(math.sin(angle)*0.05, 0, 0)
  363. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*0.05, 0, 0)
  364. rlcf = rlc0 * CFrame.new(0, -0.1 + math.abs(mvmnt)*0.1, -0.1) * CFrame.Angles(0, math.rad(5), math.rad(5))
  365. llcf = llc0 * CFrame.Angles(0, math.rad(2.5), math.rad(1))
  366. else
  367. if humanwalk then
  368. anglespeed = 1/4
  369. ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  370. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*0.001, 0)
  371. rscf = rsc0 * CFrame.Angles(math.sin(angle)*0.1, 0, 0)
  372. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*0.1, 0, 0)
  373. rlcf = rlc0 * CFrame.Angles(0, math.sin(angle)*0.08, math.rad(2.5))
  374. llcf = llc0 * CFrame.Angles(0, -math.sin(angle)*0.08, -math.rad(2.5))
  375. else
  376. anglespeed = 1/2
  377. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
  378. rjcf = CFrame.new(0, -2, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
  379. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  380. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  381. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  382. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  383. end
  384. end
  385. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 20 then
  386. if sound.IsPlaying then
  387. sound:stop()
  388. end
  389. if humanwalk then
  390. anglespeed = 4
  391. ncf = neckc0 * CFrame.Angles(math.pi/24, mvmnt*.02, 0)
  392. rjcf = CFrame.new(0, math.abs(mvmnt)*0.05, 0) * CFrame.Angles(-math.pi/24, -mvmnt*.02, 0)
  393. rscf = rsc0 * CFrame.Angles(math.sin(angle)*1.25, 0, -math.abs(mvmnt)*0.02)
  394. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*1.25, 0, math.abs(mvmnt)*0.02)
  395. rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*1, 0, math.rad(.5))
  396. llcf = llc0 * CFrame.Angles(math.sin(angle)*1, 0, -math.rad(.5))
  397. else
  398. anglespeed = 4
  399. ncf = neckc0 * CFrame.new(0, 0, .2) * CFrame.Angles(math.pi/1.9, 0, 0)
  400. 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)
  401. 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))
  402. 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))
  403. 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)
  404. 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)
  405. end
  406. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then
  407. if sound.IsPlaying then
  408. sound:stop()
  409. end
  410. if humanwalk then
  411. anglespeed = 5
  412. ncf = neckc0 * CFrame.Angles(math.pi/20, math.sin(angle)*.04, 0)
  413. rjcf = CFrame.new(0, -.4 + math.abs(mvmnt)*0.25, 0) * CFrame.Angles(-math.pi/20, -math.sin(angle)*.08, 0)
  414. 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)
  415. 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)
  416. 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))
  417. 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))
  418. else
  419. anglespeed = 5.5
  420. ncf = neckc0 * CFrame.new(0, 0, .2) * CFrame.Angles(math.pi/1.9+math.sin(mvmnt/2)*0.05, 0, 0)
  421. 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)
  422. rscf = rsc0 * CFrame.new(-1, 0.2, -.5) * CFrame.Angles(math.pi/2+math.sin(angle)*1.8, 0, math.rad(5))
  423. lscf = lsc0 * CFrame.new(1, 0.2, -.5) * CFrame.Angles(math.pi/2+math.sin(angle)*1.8, 0, -math.rad(5))
  424. 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)
  425. 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)
  426. end
  427. end
  428.  
  429. rm.C0 = clerp(rm.C0,rscf,speed)
  430. lm.C0 = clerp(lm.C0,lscf,speed)
  431. rj.C0 = clerp(rj.C0,rjcf,speed)
  432. neck.C0 = clerp(neck.C0,ncf,speed)
  433. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  434. llegm.C0 = clerp(llegm.C0,llcf,speed)
  435. end
  436.  
  437.  
  438. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement