Hugo1234cool

Untitled

Feb 5th, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.11 KB | None | 0 0
  1. local p =owner
  2. local char = p.Character
  3. local mouse = p:GetMouse()
  4. local larm = char["Left Arm"]
  5. local rarm = char["Right Arm"]
  6. local lleg = char["Left Leg"]
  7. local rleg = char["Right Leg"]
  8. local hed = char.Head
  9. local torso = char.Torso
  10. local hum = char.Humanoid
  11. local cam = game.Workspace.CurrentCamera
  12. local root = char.HumanoidRootPart
  13. local deb = false
  14. local shot = 0
  15. local debris=game:service"Debris"
  16. local l = game:GetService("Lighting")
  17. local rs = game:GetService("RunService").RenderStepped
  18. ptz = {0.8, 0.85, 0.9, 0.95, 1, 1.05, 1.1}
  19. math.randomseed(os.time())
  20. ----------------------------------------------------
  21. Debounces = {
  22. CanAttack = true;
  23. NoIdl = false;
  24. Slashing = false;
  25. Slashed = false;
  26. RPunch = false;
  27. RPunched = false;
  28. LPunch = false;
  29. LPunched = false;
  30. }--https://github.com/Mokiros/roblox-FE-compatibility
  31. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  32. local Player,game,owner = owner,game
  33. local RealPlayer = Player
  34. do
  35. print("FE Compatibility code V2 by Mokiros")
  36. local RealPlayer = RealPlayer
  37. script.Parent = RealPlayer.Character
  38.  
  39. --Fake event to make stuff like Mouse.KeyDown work
  40. local Disconnect_Function = function(this)
  41. this[1].Functions[this[2]] = nil
  42. end
  43. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  44. local FakeEvent_Metatable = {__index={
  45. Connect = function(this,f)
  46. local i = tostring(math.random(0,10000))
  47. while this.Functions[i] do
  48. i = tostring(math.random(0,10000))
  49. end
  50. this.Functions[i] = f
  51. return setmetatable({this,i},Disconnect_Metatable)
  52. end
  53. }}
  54. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  55. local function fakeEvent()
  56. return setmetatable({Functions={}},FakeEvent_Metatable)
  57. end
  58.  
  59. --Creating fake input objects with fake variables
  60. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  61. FakeMouse.keyUp = FakeMouse.KeyUp
  62. FakeMouse.keyDown = FakeMouse.KeyDown
  63. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  64. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  65. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  66. end}
  67. --Merged 2 functions into one by checking amount of arguments
  68. CAS.UnbindAction = CAS.BindAction
  69.  
  70. --This function will trigger the events that have been :Connect()'ed
  71. local function TriggerEvent(self,ev,...)
  72. for _,f in pairs(self[ev].Functions) do
  73. f(...)
  74. end
  75. end
  76. FakeMouse.TriggerEvent = TriggerEvent
  77. UIS.TriggerEvent = TriggerEvent
  78.  
  79. --Client communication
  80. local Event = Instance.new("RemoteEvent")
  81. Event.Name = "UserInput_Event"
  82. Event.OnServerEvent:Connect(function(plr,io)
  83. if plr~=RealPlayer then return end
  84. FakeMouse.Target = io.Target
  85. FakeMouse.Hit = io.Hit
  86. if not io.isMouse then
  87. local b = io.UserInputState == Enum.UserInputState.Begin
  88. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  89. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  90. end
  91. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  92. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  93. end
  94. for _,t in pairs(CAS.Actions) do
  95. for _,k in pairs(t.Keys) do
  96. if k==io.KeyCode then
  97. t.Function(t.Name,io.UserInputState,io)
  98. end
  99. end
  100. end
  101. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  102. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  103. end
  104. end)
  105. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  106. local Mouse = owner:GetMouse()
  107. local UIS = game:GetService("UserInputService")
  108. local input = function(io,RobloxHandled)
  109. if RobloxHandled then return end
  110. --Since InputObject is a client-side instance, we create and pass table instead
  111. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  112. end
  113. UIS.InputBegan:Connect(input)
  114. UIS.InputEnded:Connect(input)
  115.  
  116. local h,t
  117. --Give the server mouse data every second frame, but only if the values changed
  118. --If player is not moving their mouse, client won't fire events
  119. local HB = game:GetService("RunService").Heartbeat
  120. while true do
  121. if h~=Mouse.Hit or t~=Mouse.Target then
  122. h,t=Mouse.Hit,Mouse.Target
  123. Event:FireServer({isMouse=true,Target=t,Hit=h})
  124. end
  125. --Wait 2 frames
  126. for i=1,2 do
  127. HB:Wait()
  128. end
  129. end]==],script)
  130.  
  131. ----Sandboxed game object that allows the usage of client-side methods and services
  132. --Real game object
  133. local RealGame = game
  134.  
  135. --Metatable for fake service
  136. local FakeService_Metatable = {
  137. __index = function(self,k)
  138. local s = rawget(self,"_RealService")
  139. if s then
  140. return typeof(s[k])=="function"
  141. and function(_,...)return s[k](s,...)end or s[k]
  142. end
  143. end,
  144. __newindex = function(self,k,v)
  145. local s = rawget(self,"_RealService")
  146. if s then s[k]=v end
  147. end
  148. }
  149. local function FakeService(t,RealService)
  150. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  151. return setmetatable(t,FakeService_Metatable)
  152. end
  153.  
  154. --Fake game object
  155. local FakeGame = {
  156. GetService = function(self,s)
  157. return rawget(self,s) or RealGame:GetService(s)
  158. end,
  159. Players = FakeService({
  160. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  161. },"Players"),
  162. UserInputService = FakeService(UIS,"UserInputService"),
  163. ContextActionService = FakeService(CAS,"ContextActionService"),
  164. RunService = FakeService({
  165. _btrs = {},
  166. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  167. BindToRenderStep = function(self,name,_,fun)
  168. self._btrs[name] = self.Heartbeat:Connect(fun)
  169. end,
  170. UnbindFromRenderStep = function(self,name)
  171. self._btrs[name]:Disconnect()
  172. end,
  173. },"RunService")
  174. }
  175. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  176. FakeGame.service = FakeGame.GetService
  177. FakeService(FakeGame,game)
  178. --Changing owner to fake player object to support owner:GetMouse()
  179. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  180. end
  181. local Touche = {char.Name, }
  182. ----------------------------------------------------
  183. hed.face.Texture = "rbxassetid://227969918"
  184. char["Body Colors"].HeadColor = BrickColor.new("Pastel brown")
  185. char["Body Colors"].TorsoColor = BrickColor.new("Pastel brown")
  186. char["Body Colors"].LeftArmColor = BrickColor.new("Pastel brown")
  187. char["Body Colors"].RightArmColor = BrickColor.new("Pastel brown")
  188. char["Body Colors"].LeftLegColor = BrickColor.new("Pastel brown")
  189. char["Body Colors"].RightLegColor = BrickColor.new("Pastel brown")
  190. ----------------------------------------------------
  191. ypcall(function()
  192. char.Shirt:Destroy()
  193. char.Pants:Destroy()
  194. shirt = Instance.new("Shirt", char)
  195. shirt.Name = "Shirt"
  196. pants = Instance.new("Pants", char)
  197. pants.Name = "Pants"
  198. char.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=0"
  199. char.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=0"
  200. end)
  201. ----------------------------------------------------
  202. --------------nico
  203. local fartids={251309043,251309043}
  204. local timer=false
  205. local debris=game:GetService("Debris")
  206. local char=game.Players.LocalPlayer.Character
  207. for i = 1,3,2 do
  208. local asdf=Instance.new("Part",char)
  209. asdf.Shape="Ball"
  210. asdf.Locked=true
  211. asdf.FormFactor="Custom"
  212. asdf.Material="SmoothPlastic"
  213. asdf.BrickColor=BrickColor.new(1030)
  214. asdf.Size=Vector3.new(.4,.4,.4)
  215. local weld=Instance.new("Weld",char)
  216. weld.Part0=char.Torso
  217. weld.Part1=asdf
  218. weld.C0=CFrame.new((i-2)/2.5,-.9,.4)
  219. end
  220. function crap()
  221. if timer==false then
  222. timer=true
  223. local char=game.Players.LocalPlayer.Character
  224. local crap=Instance.new("Part",Workspace)
  225. crap.FormFactor="Custom"
  226. crap.BrickColor=BrickColor.new(25)
  227. crap.Material="Grass"
  228. crap.Size=Vector3.new(1.2,0.4,0.4)
  229. local snd=Instance.new("Sound",char)
  230. snd.SoundId="rbxassetid://" .. tostring(fartids[math.random(1,#fartids)])
  231. snd.Volume=2
  232. snd:Play()
  233. debris:AddItem(snd,snd.TimeLength)
  234. local smk=Instance.new("Smoke",crap)
  235. smk.Color=BrickColor.new(25).Color
  236. debris:AddItem(smk,2.5)
  237. for i = 0.15,1.3,.02 do
  238. local weld=Instance.new("Weld",crap)
  239. weld.Part0=char.Torso
  240. weld.Part1=crap
  241. weld.C0=CFrame.new(0,-.9,i)*CFrame.Angles(0,math.rad(90),0)
  242. wait()
  243. end
  244. local crapCFrame=crap.CFrame
  245. crap:Destroy()
  246.  
  247. for i = 0,1.2,0.4 do
  248. local newCrap=Instance.new("Part",Workspace)
  249. newCrap.FormFactor="Custom"
  250. newCrap.BrickColor=BrickColor.new(25)
  251. newCrap.Material="Grass"
  252. newCrap.Size=Vector3.new(.4,.4,.4)
  253. newCrap.CFrame=crapCFrame*CFrame.new(i-1,0,0)
  254. end
  255. timer=false
  256. end
  257. end
  258. game.Players.LocalPlayer:GetMouse().KeyDown:connect(function(key)
  259. if string.lower(key)=="x" then
  260. crap()
  261. end
  262. end)
  263.  
  264. do --CFrame lerp
  265. local function QuaternionFromCFrame(cf)
  266. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  267. local trace = m00 + m11 + m22
  268. if trace > 0 then
  269. local s = math.sqrt(1 + trace)
  270. local recip = 0.5/s
  271. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  272. else
  273. local i = 0
  274. if m11 > m00 then
  275. i = 1
  276. end
  277. if m22 > (i == 0 and m00 or m11) then
  278. i = 2
  279. end
  280. if i == 0 then
  281. local s = math.sqrt(m00-m11-m22+1)
  282. local recip = 0.5/s
  283. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  284. elseif i == 1 then
  285. local s = math.sqrt(m11-m22-m00+1)
  286. local recip = 0.5/s
  287. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  288. elseif i == 2 then
  289. local s = math.sqrt(m22-m00-m11+1)
  290. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  291. end
  292. end
  293. end
  294. local function QuaternionToCFrame(px, py, pz, x, y, z, w)
  295. local xs, ys, zs = x + x, y + y, z + z
  296. local wx, wy, wz = w*xs, w*ys, w*zs
  297. local xx = x*xs
  298. local xy = x*ys
  299. local xz = x*zs
  300. local yy = y*ys
  301. local yz = y*zs
  302. local zz = z*zs
  303. 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))
  304. end
  305. local function QuaternionSlerp(a, b, t)
  306. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  307. local startInterp, finishInterp;
  308. if cosTheta >= 0.0001 then
  309. if (1 - cosTheta) > 0.0001 then
  310. local theta = math.acos(cosTheta)
  311. local invSinTheta = 1/math.sin(theta)
  312. startInterp = math.sin((1-t)*theta)*invSinTheta
  313. finishInterp = math.sin(t*theta)*invSinTheta
  314. else
  315. startInterp = 1-t
  316. finishInterp = t
  317. end
  318. else
  319. if (1+cosTheta) > 0.0001 then
  320. local theta = math.acos(-cosTheta)
  321. local invSinTheta = 1/math.sin(theta)
  322. startInterp = math.sin((t-1)*theta)*invSinTheta
  323. finishInterp = math.sin(t*theta)*invSinTheta
  324. else
  325. startInterp = t-1
  326. finishInterp = t
  327. end
  328. end
  329. 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
  330. end
  331. function clerp(a,b,t)
  332. local qa = {QuaternionFromCFrame(a)}
  333. local qb = {QuaternionFromCFrame(b)}
  334. local ax, ay, az = a.x, a.y, a.z
  335. local bx, by, bz = b.x, b.y, b.z
  336. local _t = 1-t
  337. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  338. end
  339.  
  340. end
  341. do --the animating
  342. plr = game:service'Players'.LocalPlayer
  343. char = plr.Character
  344. mouse = plr:GetMouse()
  345. humanoid = char:findFirstChild("Humanoid")
  346. torso = char:findFirstChild("Torso")
  347. head = char.Head
  348. ra = char:findFirstChild("Right Arm")
  349. la = char:findFirstChild("Left Arm")
  350. rl = char:findFirstChild("Right Leg")
  351. ll = char:findFirstChild("Left Leg")
  352. rs = torso:findFirstChild("Right Shoulder")
  353. ls = torso:findFirstChild("Left Shoulder")
  354. rh = torso:findFirstChild("Right Hip")
  355. lh = torso:findFirstChild("Left Hip")
  356. neck = torso:findFirstChild("Neck")
  357. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  358. anim = char:findFirstChild("Animate")
  359. rootpart = char:findFirstChild("HumanoidRootPart")
  360. camera = workspace.CurrentCamera
  361. if anim then
  362. anim:Destroy()
  363. end
  364.  
  365.  
  366. local rm = Instance.new("Motor", torso)
  367. rm.C0 = CFrame.new(1.5, 0.5, 0)
  368. rm.C1 = CFrame.new(0, 0.5, 0)
  369. rm.Part0 = torso
  370. rm.Part1 = ra
  371. local lm = Instance.new("Motor", torso)
  372. lm.C0 = CFrame.new(-1.5, 0.5, 0)
  373. lm.C1 = CFrame.new(0, 0.5, 0)
  374. lm.Part0 = torso
  375. lm.Part1 = la
  376.  
  377. local rlegm = Instance.new("Motor", torso)
  378. rlegm.C0 = CFrame.new(0.5, -1, 0)
  379. rlegm.C1 = CFrame.new(0, 1, 0)
  380. rlegm.Part0 = torso
  381. rlegm.Part1 = rl
  382. local llegm = Instance.new("Motor", torso)
  383. llegm.C0 = CFrame.new(-0.5, -1, 0)
  384. llegm.C1 = CFrame.new(0, 1, 0)
  385. llegm.Part0 = torso
  386. llegm.Part1 = ll
  387.  
  388. neck.C0 = CFrame.new(0, 1, 0)
  389. neck.C1 = CFrame.new(0, -0.5, 0)
  390.  
  391.  
  392. rj.C0 = CFrame.new()
  393. rj.C1 = CFrame.new()
  394.  
  395.  
  396. local sound = Instance.new("Sound", head)
  397. sound.SoundId = "http://www.roblox.com/asset/?id=130797915"
  398. sound.Volume = 0.8
  399. sound.Looped = true
  400.  
  401. local speed = 0.3
  402. local angle = 0
  403. local sitting = false
  404. local humanwalk = false
  405. local anglespeed = 1
  406. rsc0 = rm.C0
  407. lsc0 = lm.C0
  408. llc0 = llegm.C0
  409. rlc0 = rlegm.C0
  410. neckc0 = neck.C0
  411.  
  412. local controllerService = game:GetService("ControllerService")
  413. local controller = controllerService:GetChildren()[1]
  414.  
  415. controller.Parent = nil
  416.  
  417. while wait() do
  418. angle = (angle % 100) + anglespeed/10
  419. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  420. local rscf = rsc0
  421. local lscf = lsc0
  422. local rlcf = rlc0
  423. local llcf = llc0
  424. local rjcf = CFrame.new()
  425. local ncf = neckc0
  426. local rayz = Ray.new(rootpart.Position, Vector3.new(0, -6, 0))
  427. local hitz, enz = workspace:findPartOnRay(rayz, char)
  428. if not hitz then
  429. if sound.IsPlaying then
  430. sound:stop()
  431. end
  432.  
  433. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude > 2 then
  434.  
  435. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, 0)
  436. rjcf = CFrame.new() * CFrame.Angles(-math.pi/5, math.sin(angle)*0.05, 0)
  437. rscf = rsc0 * CFrame.Angles(math.pi/1.7+math.sin(angle)*0.1, 0, 0)
  438. lscf = lsc0 * CFrame.Angles(math.pi/1.7+math.sin(-angle)*0.1, 0, 0)
  439. rlcf = rlc0 * CFrame.Angles(-math.pi/10+math.sin(-angle)*0.3, 0, 0)
  440. llcf = llc0 * CFrame.Angles(-math.pi/10+math.sin(angle)*0.3, 0, 0)
  441.  
  442. else
  443.  
  444. ncf = neckc0 * CFrame.Angles(math.pi/14, 0, 0)
  445. rjcf = CFrame.new() * CFrame.Angles(-math.pi/18, math.sin(angle)*0.05, 0)
  446. rscf = rsc0 * CFrame.Angles(-math.pi/10+math.sin(angle)*0.2, 0, 0)
  447. lscf = lsc0 * CFrame.Angles(-math.pi/10+math.sin(-angle)*0.2, 0, 0)
  448. rlcf = rlc0 * CFrame.new(0, 0.7, -0.5) CFrame.Angles(-math.pi/14, 0, 0)
  449. llcf = llc0 * CFrame.Angles(-math.pi/20, 0, 0)
  450.  
  451. end
  452. elseif humanoid.Sit then
  453. if sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=150794704" then
  454. anglespeed = 6
  455. ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
  456. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  457. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  458. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  459. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  460. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  461. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=135570347" then
  462. anglespeed = 4
  463. ncf = neckc0 * CFrame.Angles(math.pi/5-math.abs(math.sin(angle))*0.3, 0, 0)
  464. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
  465. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  466. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  467. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  468. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  469. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=149713968" then
  470. anglespeed = 2
  471. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
  472. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
  473. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  474. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  475. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  476. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  477. else
  478. anglespeed = 1/2
  479. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
  480. rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
  481. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  482. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  483. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  484. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  485. end
  486. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
  487. if sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=130797915" then
  488. anglespeed = 6
  489. ncf = neckc0 * CFrame.Angles(math.pi/10-math.sin(angle)*0.07, 0, 0)
  490. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/10, math.sin(angle)*0.001, 0)
  491. rscf = rsc0 * CFrame.Angles(math.pi/1+math.sin(angle)*0.5, 0, 0)
  492. lscf = lsc0 * CFrame.Angles(math.pi/1+math.sin(angle)*0.5, 0, 0)
  493. rlcf = rlc0 * CFrame.Angles(math.pi/10, math.sin(angle)*0.08, math.rad(6.5))
  494. llcf = llc0 * CFrame.Angles(math.pi/10, -math.sin(angle)*0.08, -math.rad(6.5))
  495. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=149713968" then
  496. anglespeed = 2
  497. ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3, 0, 0)
  498. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/20, math.sin(angle)*0.001, 0)
  499. rscf = rsc0 * CFrame.Angles(math.pi/2+math.abs(math.sin(angle)*1), 0, 0)
  500. lscf = lsc0 * CFrame.Angles(math.pi/2+math.abs(math.sin(angle)*1), 0, 0)
  501. rlcf = rlc0 * CFrame.Angles(math.pi/20, math.sin(angle)*0.08, math.rad(2.5))
  502. llcf = llc0 * CFrame.Angles(math.pi/20, -math.sin(angle)*0.08, -math.rad(2.5))
  503. elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=130802245" then
  504. anglespeed = 3
  505. ncf = neckc0 * CFrame.Angles(math.sin(angle)*0.07, math.rad(30), 0)
  506. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*0.001, 0)
  507. rscf = rsc0 * CFrame.Angles(math.sin(angle)*0.05, 0, 0)
  508. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*0.05, 0, 0)
  509. rlcf = rlc0 * CFrame.new(0, -0.1 + math.abs(mvmnt)*0.1, -0.1) * CFrame.Angles(0, math.rad(5), math.rad(5))
  510. llcf = llc0 * CFrame.Angles(0, math.rad(2.5), math.rad(1))
  511. else
  512. if humanwalk then
  513. anglespeed = 1/4
  514. ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  515. rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*0.001, 0)
  516. rscf = rsc0 * CFrame.Angles(math.sin(angle)*0.1, 0, 0)
  517. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*0.1, 0, 0)
  518. rlcf = rlc0 * CFrame.Angles(0, math.sin(angle)*0.08, math.rad(2.5))
  519. llcf = llc0 * CFrame.Angles(0, -math.sin(angle)*0.08, -math.rad(2.5))
  520. else
  521. anglespeed = 1/2
  522. ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
  523. rjcf = CFrame.new(0, -2, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
  524. rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
  525. lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
  526. rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
  527. llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
  528. end
  529. end
  530. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 20 then
  531. if sound.IsPlaying then
  532. sound:stop()
  533. end
  534. if humanwalk then
  535. anglespeed = 4
  536. ncf = neckc0 * CFrame.Angles(math.pi/24, mvmnt*.02, 0)
  537. rjcf = CFrame.new(0, math.abs(mvmnt)*0.05, 0) * CFrame.Angles(-math.pi/24, -mvmnt*.02, 0)
  538. rscf = rsc0 * CFrame.Angles(math.sin(angle)*1.25, 0, -math.abs(mvmnt)*0.02)
  539. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*1.25, 0, math.abs(mvmnt)*0.02)
  540. rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*1, 0, math.rad(.5))
  541. llcf = llc0 * CFrame.Angles(math.sin(angle)*1, 0, -math.rad(.5))
  542. else
  543. anglespeed = 4
  544. ncf = neckc0 * CFrame.new(0, 0, .2) * CFrame.Angles(math.pi/1.9, 0, 0)
  545. 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)
  546. 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))
  547. 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))
  548. 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)
  549. 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)
  550. end
  551. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then
  552. if sound.IsPlaying then
  553. sound:stop()
  554. end
  555. if humanwalk then
  556. anglespeed = 5
  557. ncf = neckc0 * CFrame.Angles(math.pi/20, math.sin(angle)*.04, 0)
  558. rjcf = CFrame.new(0, -.4 + math.abs(mvmnt)*0.25, 0) * CFrame.Angles(-math.pi/20, -math.sin(angle)*.08, 0)
  559. 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)
  560. 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)
  561. 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))
  562. 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))
  563. else
  564. anglespeed = 5.5
  565. ncf = neckc0 * CFrame.new(0, 0, .2) * CFrame.Angles(math.pi/1.9+math.sin(mvmnt/2)*0.05, 0, 0)
  566. 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)
  567. rscf = rsc0 * CFrame.new(-1, 0.2, -.5) * CFrame.Angles(math.pi/2+math.sin(angle)*1.8, 0, math.rad(5))
  568. lscf = lsc0 * CFrame.new(1, 0.2, -.5) * CFrame.Angles(math.pi/2+math.sin(angle)*1.8, 0, -math.rad(5))
  569. 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)
  570. 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)
  571. end
  572. end
  573.  
  574. rm.C0 = clerp(rm.C0,rscf,speed)
  575. lm.C0 = clerp(lm.C0,lscf,speed)
  576. rj.C0 = clerp(rj.C0,rjcf,speed)
  577. neck.C0 = clerp(neck.C0,ncf,speed)
  578. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  579. llegm.C0 = clerp(llegm.C0,llcf,speed)
  580. end
  581.  
  582.  
  583. end
Advertisement
Add Comment
Please, Sign In to add comment