AlphaSploit

Dagger

Mar 20th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.94 KB | None | 0 0
  1. --// DECLARING PLAYER VARIBLES
  2.  
  3. Player = game.Players.LocalPlayer;
  4. Char = Player.Character;
  5. Hum = Char.Humanoid;
  6. Head = Char.Head;
  7. Torso = Char.Torso;
  8. HRootPart = Char.HumanoidRootPart;
  9. Ra = Char["Right Arm"];
  10. La = Char["Left Arm"];
  11. Rl = Char["Right Leg"];
  12. Ll = Char["Left Leg"];
  13. Mouse = Player:GetMouse();
  14. Cam = workspace.CurrentCamera;
  15. headIsCan = true
  16.  
  17. if Char:FindFirstChild("Main") then
  18. if Char:FindFirstChild("GunS") then
  19. Char.GunS.Disabled = true
  20. end
  21. Char["Main"]:Destroy()
  22. end
  23.  
  24. Main = Instance.new("Model",Char)
  25. Main.Name = "Main"
  26. script.Parent = Main
  27. script.Name = "GunS"
  28.  
  29. --// END
  30.  
  31.  
  32. --// DECLARING VARIBLES
  33.  
  34. Animate = {};
  35. Neck,RootJoint,RaW,LaW,RlW,LlW,HandleW = Torso.Neck,HRootPart.RootJoint,nil,nil,nil,nil,nil;
  36. toBlock = {Neck = false; RootJoint = false; RaW = false; LaW = false; RlW = false; LlW = false; Handle = false};
  37.  
  38. --// END
  39.  
  40.  
  41. --// DECLARING FUNCTIONS
  42. Lerp = function(a,b,c)
  43. return a+(b-a)*c
  44. end
  45. do
  46. local function QuaternionFromCFrame(cf)
  47. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  48. local trace = m00 + m11 + m22
  49. if trace > 0 then
  50. local s = math.sqrt(1 + trace)
  51. local recip = 0.5/s
  52. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  53. else
  54. local i = 0
  55. if m11 > m00 then
  56. i = 1
  57. end
  58. if m22 > (i == 0 and m00 or m11) then
  59. i = 2
  60. end
  61. if i == 0 then
  62. local s = math.sqrt(m00-m11-m22+1)
  63. local recip = 0.5/s
  64. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  65. elseif i == 1 then
  66. local s = math.sqrt(m11-m22-m00+1)
  67. local recip = 0.5/s
  68. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  69. elseif i == 2 then
  70. local s = math.sqrt(m22-m00-m11+1)
  71. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  72. end
  73. end
  74. end
  75. local function QuaternionToCFrame(px, py, pz, x, y, z, w)
  76. local xs, ys, zs = x + x, y + y, z + z
  77. local wx, wy, wz = w*xs, w*ys, w*zs
  78. local xx = x*xs
  79. local xy = x*ys
  80. local xz = x*zs
  81. local yy = y*ys
  82. local yz = y*zs
  83. local zz = z*zs
  84. 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))
  85. end
  86. local function QuaternionSlerp(a, b, t)
  87. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  88. local startInterp, finishInterp;
  89. if cosTheta >= 0.0001 then
  90. if (1 - cosTheta) > 0.0001 then
  91. local theta = math.acos(cosTheta)
  92. local invSinTheta = 1/math.sin(theta)
  93. startInterp = math.sin((1-t)*theta)*invSinTheta
  94. finishInterp = math.sin(t*theta)*invSinTheta
  95. else
  96. startInterp = 1-t
  97. finishInterp = t
  98. end
  99. else
  100. if (1+cosTheta) > 0.0001 then
  101. local theta = math.acos(-cosTheta)
  102. local invSinTheta = 1/math.sin(theta)
  103. startInterp = math.sin((t-1)*theta)*invSinTheta
  104. finishInterp = math.sin(t*theta)*invSinTheta
  105. else
  106. startInterp = t-1
  107. finishInterp = t
  108. end
  109. end
  110. 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
  111. end
  112. function cLerp(a,b,t)
  113. local qa = {QuaternionFromCFrame(a)}
  114. local qb = {QuaternionFromCFrame(b)}
  115. local ax, ay, az = a.x, a.y, a.z
  116. local bx, by, bz = b.x, b.y, b.z
  117. local _t = 1-t
  118. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  119. end
  120. end
  121.  
  122. Part = function(Parent,Size,CFrame,Color,Trans,Anch,Can)
  123. local p = Instance.new("Part",Parent); p.FormFactor = "Custom";
  124. p.Material = "SmoothPlastic"
  125. p.Size = Size; p.Anchored = Anch;
  126. p.CFrame = CFrame; p.BrickColor = BrickColor.new(Color);
  127. p.Transparency = Trans; p:BreakJoints()
  128. p.CanCollide = Can; return p;
  129. end
  130. Weld = function(Parent,Part0,Part1,C0,C1)
  131. local w = Instance.new("Motor",Parent); w.Part0 = Part0;
  132. w.Part1 = Part1; if C0 ~= nil then w.C0 = C0; end
  133. if C1 ~= nil then w.C1 = C1; end return w;
  134. end
  135. SleepObj = function(Obj,Time)
  136. if Obj.Parent:FindFirstChild("Enemy") and Obj.Parent.Enemy:FindFirstChild("Sleep") and Obj.Parent.Enemy.Sleep.Value == false then
  137. local Hum = Obj.Parent.Enemy
  138. Hum.Sleep.Value = true
  139. local s = script.Script:Clone()
  140. s.Parent = Hum.Sleep
  141. s.Disabled = false
  142. end
  143. end
  144.  
  145. --// END
  146.  
  147.  
  148. --// DECLARING KEYFRAME FUNCTIONS
  149.  
  150. function Prepare(Tab)
  151. local lastNum = 1
  152. local lastCFrame = {
  153. ["Neck"] = CFrame.new(0,1,0);
  154. ["TJ"] = CFrame.new(0,0,0);
  155. ["Ra"] = CFrame.new(1.5,.5,0);
  156. ["La"] = CFrame.new(-1.5,.5,0);
  157. ["Rl"] = CFrame.new(.5,-1,0);
  158. ["Ll"] = CFrame.new(-.5,-1,0);
  159. }
  160.  
  161. NewTable = {}
  162.  
  163. for z,_t in next,Tab do--for _,Anim in next,Tab do
  164. local _,Anim = _t[1],_t[2]
  165. if _ ~= 1 then
  166. local x = 1
  167. for i = lastNum,_ do
  168. x = x + 1
  169. NewTable[i] = { }
  170. for _i,_v in pairs(lastCFrame) do
  171. NewTable[i][_i] = cLerp(_v,Anim[_i],(1/(_-lastNum))*x);
  172. end
  173. end
  174. lastNum = _+1
  175. else
  176. lastNum = _
  177. end
  178. lastCFrame = Anim
  179. end
  180. return NewTable
  181. end
  182.  
  183. function makeKeyFrame(Frames,ifStop)
  184. if ifStop == nil then ifStop = true end
  185. local Frames = Prepare(Frames)
  186. local MainTab = {
  187. isRunning = false;
  188. Frames = Frames;
  189. ifStoppable = ifStop;
  190. }
  191.  
  192. function MainTab:Play(x,ifIgnoreBlock)
  193. local isDone = false
  194. coroutine.wrap(function()
  195. MainTab.isRunning = true
  196. while MainTab.isRunning do
  197. game:service'RunService'.Stepped:wait()
  198. for _,v in pairs(MainTab.Frames) do
  199. if MainTab.isRunning == false then
  200. break
  201. end
  202. game:service'RunService'.Stepped:wait()
  203.  
  204. if v["Neck"] ~= nil and (toBlock.Neck == false or ifIgnoreBlock ~= nil) then
  205. --print(v["Neck"])
  206. Neck.C0 = cLerp(Neck.C0,v["Neck"],.3)
  207. end
  208. if v["TJ"] ~= nil and (toBlock.RootJoint == false or ifIgnoreBlock ~= nil) then
  209. RootJoint.C0 = cLerp(RootJoint.C0,v["TJ"],.3)
  210. end
  211. if v["Ra"] ~= nil and (toBlock.RaW == false or ifIgnoreBlock ~= nil) then
  212. RaW.C0 = cLerp(RaW.C0,v["Ra"],.3)
  213. end
  214. if v["La"] ~= nil and (toBlock.LaW == false or ifIgnoreBlock ~= nil) then
  215. LaW.C0 = cLerp(LaW.C0,v["La"],.3)
  216. end
  217. if v["Rl"] ~= nil and (toBlock.RlW == false or ifIgnoreBlock ~= nil) then
  218. RlW.C0 = cLerp(RlW.C0,v["Rl"],.3)
  219. end
  220. if v["Ll"] ~= nil and (toBlock.LlW == false or ifIgnoreBlock ~= nil) then
  221. LlW.C0 = cLerp(LlW.C0,v["Ll"],.3)
  222. end
  223. if v["Handle"] ~= nil and (toBlock.Handle == false or ifIgnoreBlock ~= nil) then
  224. HandleW.C0 = cLerp(HandleW.C0,v["Handle"],.3)
  225. end
  226. end
  227. if x then
  228. isDone = true
  229. MainTab.isRunning = false
  230. end
  231. end
  232. end)()
  233. if x then
  234. repeat wait() until isDone == true
  235. end
  236. end
  237. function MainTab:Stop(x)
  238. if x ~= nil then
  239. if MainTab.ifStoppable then
  240. MainTab.isRunning = false;
  241. end
  242. else
  243. MainTab.isRunning = false;
  244. end
  245. end
  246.  
  247. return MainTab
  248. end
  249.  
  250. function stopAllFramesExcept(Name)
  251. for _,Tab in pairs(Animate) do
  252. if Name == nil then
  253. Tab:Stop(true)
  254. elseif _:lower() ~= Name:lower() then
  255. Tab:Stop(true)
  256. end
  257. end
  258. end
  259.  
  260. --// END
  261.  
  262. --// Knife
  263. --62275962
  264.  
  265. Handle = Part(Main,Vector3.new(.5,.5,.5),CFrame.new(),"Really black",1,false,false)
  266. HandleW = Weld(Handle,Ra,Handle,CFrame.new(0,-1,0)*CFrame.Angles(math.rad(-90),0,0))
  267. KnifeP = Part(Main,Vector3.new(.6,2,.2),CFrame.new(),"Really black",0,false,false)
  268. KnifeW = Weld(KnifeP,Handle,KnifeP,CFrame.new(0,1.2,0)*CFrame.Angles(0,math.rad(360),0))
  269. KnifeM = Instance.new("SpecialMesh",KnifeP)KnifeM.MeshType = "FileMesh" KnifeM.MeshId = "http://www.roblox.com/asset/?id=96627177"
  270. KnifeM.Scale = Vector3.new(1.5,1.5,1.5)KnifeM.TextureId = "http://www.roblox.com/asset/?id=96628026"
  271.  
  272. local cloneK = KnifeP:Clone()
  273. cloneK.Parent = Cam
  274. Weld(cloneK,KnifeP,cloneK,CFrame.new(0,0,0))
  275. cloneK.CanCollide = false
  276.  
  277.  
  278. --Sound = Instance.new("Sound",Handle) Sound.SoundId = "http://www.roblox.com/asset/?id=" Sound.Pitch = .821
  279.  
  280.  
  281. --// MAKING JOINTS
  282.  
  283. for _,v in pairs(Char:children()) do
  284. if v:IsA("Hat") and v:FindFirstChild("Handle") then
  285. v.Handle.CanCollide = false
  286. end
  287. end
  288.  
  289. ypcall(function()
  290. if Char:FindFirstChild("Animate") then
  291. Char.Animate.Disabled = true
  292. Char.Animate:Destroy()
  293. end
  294. end)
  295. Neck.C0 = CFrame.new(0,1,0); Neck.C1 = CFrame.new(0,-.5,0);
  296. RootJoint.C0 = CFrame.new(); RootJoint.C1 = CFrame.new();
  297. RaW = Weld(Main,Torso,Ra,CFrame.new(1.5,.5,0)*CFrame.Angles(0,0,math.rad(5)),CFrame.new(0,.5,0));
  298. LaW = Weld(Main,Torso,La,CFrame.new(-1.5,.5,0)*CFrame.Angles(0,0,math.rad(-5)),CFrame.new(0,.5,0));
  299. RlW = Weld(Main,Torso,Rl,CFrame.new(.5,-1,0)*CFrame.Angles(0,0,math.rad(5)),CFrame.new(0,1,0));
  300. LlW = Weld(Main,Torso,Ll,CFrame.new(-.5,-1,0)*CFrame.Angles(0,0,math.rad(-5)),CFrame.new(0,1,0));
  301.  
  302.  
  303. --// END
  304.  
  305. --// MAKING ANIMATIONS
  306.  
  307. local Tab = {
  308. {1,{
  309. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(1),0,0);
  310. ["TJ"] = CFrame.new(0,0,-.05)*CFrame.Angles(math.rad(-2),math.rad(0),0);
  311. ["Ra"] = CFrame.new(1.5,.45,0)*CFrame.Angles(math.rad(2.5),0,math.rad(1));
  312. ["La"] = CFrame.new(-1.5,.45,0)*CFrame.Angles(math.rad(1.5),0,math.rad(-1));
  313. ["Rl"] = CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(2),0,math.rad(1));
  314. ["Ll"] = CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(2),0,math.rad(-1));
  315. }};
  316. {50,{
  317. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(-.05),0,0);
  318. ["TJ"] = CFrame.new(0,0,-.025)*CFrame.Angles(math.rad(1),math.rad(0),0);
  319. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(-1),0,math.rad(3));
  320. ["La"] = CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(-1),0,math.rad(-3));
  321. ["Rl"] = CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(-1),0,math.rad(1));
  322. ["Ll"] = CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(-1),0,math.rad(-1));
  323. }};
  324. {90,{
  325. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(1),0,0);
  326. ["TJ"] = CFrame.new(0,0,-.05)*CFrame.Angles(math.rad(-2),math.rad(0),0);
  327. ["Ra"] = CFrame.new(1.5,.45,0)*CFrame.Angles(math.rad(2.5),0,math.rad(1));
  328. ["La"] = CFrame.new(-1.5,.45,0)*CFrame.Angles(math.rad(1.5),0,math.rad(-1));
  329. ["Rl"] = CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(2),0,math.rad(1));
  330. ["Ll"] = CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(2),0,math.rad(-1));
  331. }};
  332. };
  333. Animate["Idle"] = makeKeyFrame(Tab);
  334. Tab = {
  335. {1,{
  336. ["Neck"] = CFrame.new(0,1,0);
  337. ["TJ"] = CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),0);
  338. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(40),0,math.rad(0));
  339. ["La"] = CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(-40),0,math.rad(0));
  340. ["Rl"] = CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(-40),0,math.rad(0));
  341. ["Ll"] = CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(40),0,math.rad(0));
  342. }};
  343. {9,{
  344. ["Neck"] = CFrame.new(0,1,0);
  345. ["TJ"] = CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),0);
  346. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(-40),0,math.rad(0));
  347. ["La"] = CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(40),0,math.rad(0));
  348. ["Rl"] = CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(40),0,math.rad(0));
  349. ["Ll"] = CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(-40),0,math.rad(0));
  350. }};
  351. {18,{
  352. ["Neck"] = CFrame.new(0,1,0);
  353. ["TJ"] = CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),0);
  354. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(40),0,math.rad(0));
  355. ["La"] = CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(-40),0,math.rad(0));
  356. ["Rl"] = CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(-40),0,math.rad(0));
  357. ["Ll"] = CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(40),0,math.rad(0));
  358. }};
  359. };
  360. Animate["Walk"] = makeKeyFrame(Tab);
  361. Tab = {
  362. {1,{
  363. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(12),math.rad(-5),0);
  364. ["TJ"] = CFrame.new(0,-.1,0)*CFrame.Angles(math.rad(-12),math.rad(5),0);
  365. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(70),0,math.rad(-10));
  366. ["La"] = CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(-70),0,math.rad(10));
  367. ["Rl"] = CFrame.new(.5,-1,.2)*CFrame.Angles(math.rad(-60),0,math.rad(0));
  368. ["Ll"] = CFrame.new(-.5,-1,-.2)*CFrame.Angles(math.rad(50),0,math.rad(0));
  369. }};
  370. {4,{
  371. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(9),0,0);
  372. ["TJ"] = CFrame.new(0,.1,0)*CFrame.Angles(math.rad(-9),math.rad(0),0);
  373. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(0),0,math.rad(0));
  374. ["La"] = CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(0),0,math.rad(0));
  375. ["Rl"] = CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(0),0,math.rad(0));
  376. ["Ll"] = CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(0),0,math.rad(0));
  377. }};
  378. {8,{
  379. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(12),math.rad(5),0);
  380. ["TJ"] = CFrame.new(0,-.1,0)*CFrame.Angles(math.rad(-12),math.rad(-5),0);
  381. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(-70),0,math.rad(-10));
  382. ["La"] = CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(70),0,math.rad(10));
  383. ["Rl"] = CFrame.new(.5,-1,-.2)*CFrame.Angles(math.rad(50),0,math.rad(0));
  384. ["Ll"] = CFrame.new(-.5,-1,.2)*CFrame.Angles(math.rad(-60),0,math.rad(0));
  385. }};
  386. {12,{
  387. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(9),0,0);
  388. ["TJ"] = CFrame.new(0,.1,0)*CFrame.Angles(math.rad(-9),math.rad(0),0);
  389. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(0),0,math.rad(0));
  390. ["La"] = CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(0),0,math.rad(0));
  391. ["Rl"] = CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(0),0,math.rad(0));
  392. ["Ll"] = CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(0),0,math.rad(0));
  393. }};
  394. {16,{
  395. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(12),math.rad(-5),0);
  396. ["TJ"] = CFrame.new(0,-.1,0)*CFrame.Angles(math.rad(-12),math.rad(5),0);
  397. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(70),0,math.rad(-10));
  398. ["La"] = CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(-70),0,math.rad(10));
  399. ["Rl"] = CFrame.new(.5,-1,.2)*CFrame.Angles(math.rad(-50),0,math.rad(0));
  400. ["Ll"] = CFrame.new(-.5,-1,-.2)*CFrame.Angles(math.rad(60),0,math.rad(0));
  401. }};
  402. }
  403. Animate["Run"] = makeKeyFrame(Tab);
  404.  
  405.  
  406. Tab = {
  407. {1,{
  408. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(10),0,0);
  409. ["TJ"] = CFrame.new(0,-1.25,-.05)*CFrame.Angles(math.rad(-10),math.rad(0),0);
  410. ["Ra"] = CFrame.new(1.5,.3,0)*CFrame.Angles(math.rad(10),0,math.rad(5));
  411. ["La"] = CFrame.new(-1.5,.3,0)*CFrame.Angles(math.rad(10),0,math.rad(-5));
  412. ["Rl"] = CFrame.new(.5,.3,-.5)*CFrame.Angles(math.rad(10),0,math.rad(1));
  413. ["Ll"] = CFrame.new(-.5,-1.25,0)*CFrame.Angles(math.rad(-80),0,math.rad(-1))*CFrame.new(0,.5,0);
  414. }};
  415. {50,{
  416. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(12),0,0);
  417. ["TJ"] = CFrame.new(0,-1.25,-.05)*CFrame.Angles(math.rad(-12),math.rad(0),0);
  418. ["Ra"] = CFrame.new(1.5,.4,0)*CFrame.Angles(math.rad(12),0,math.rad(10));
  419. ["La"] = CFrame.new(-1.5,.4,0)*CFrame.Angles(math.rad(12),0,math.rad(-10));
  420. ["Rl"] = CFrame.new(.5,.3,-.5)*CFrame.Angles(math.rad(12),0,math.rad(1));
  421. ["Ll"] = CFrame.new(-.5,-1.25,0)*CFrame.Angles(math.rad(-78),0,math.rad(-1))*CFrame.new(0,.5,0);
  422. }};
  423. {90,{
  424. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(10),0,0);
  425. ["TJ"] = CFrame.new(0,-1.25,-.05)*CFrame.Angles(math.rad(-10),math.rad(0),0);
  426. ["Ra"] = CFrame.new(1.5,.3,0)*CFrame.Angles(math.rad(10),0,math.rad(5));
  427. ["La"] = CFrame.new(-1.5,.3,0)*CFrame.Angles(math.rad(10),0,math.rad(-5));
  428. ["Rl"] = CFrame.new(.5,.3,-.5)*CFrame.Angles(math.rad(10),0,math.rad(1));
  429. ["Ll"] = CFrame.new(-.5,-1.25,0)*CFrame.Angles(math.rad(-80),0,math.rad(-1))*CFrame.new(0,.5,0);
  430. }};
  431. };
  432. Animate["CIdle"] = makeKeyFrame(Tab);
  433. Tab = {
  434. {1,{
  435. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(35),math.rad(2),math.rad(-2));
  436. ["TJ"] = CFrame.new(0,-.55,0)*CFrame.Angles(math.rad(-40),math.rad(-2),0);
  437. ["Ra"] = CFrame.new(1.5,.3,0)*CFrame.Angles(math.rad(42),0,math.rad(5));
  438. ["La"] = CFrame.new(-1.5,.3,0)*CFrame.Angles(math.rad(48),0,math.rad(-5));
  439. ["Rl"] = CFrame.new(.5,-.2,-.5)*CFrame.Angles(math.rad(50),0,math.rad(1));
  440. ["Ll"] = CFrame.new(-.5,-.3,-.5)*CFrame.Angles(math.rad(0),0,math.rad(-1));
  441. }};
  442. {5,{
  443. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(35),math.rad(0),math.rad(0));
  444. ["TJ"] = CFrame.new(0,-.6,0)*CFrame.Angles(math.rad(-40),math.rad(0),0);
  445. ["Ra"] = CFrame.new(1.5,.3,0)*CFrame.Angles(math.rad(45),0,math.rad(5));
  446. ["La"] = CFrame.new(-1.5,.3,0)*CFrame.Angles(math.rad(45),0,math.rad(-5));
  447. ["Rl"] = CFrame.new(.5,-.2,-.5)*CFrame.Angles(math.rad(20),0,math.rad(1));
  448. ["Ll"] = CFrame.new(-.5,0,-.5)*CFrame.Angles(math.rad(25),0,math.rad(-1));
  449. }};
  450. {10,{
  451. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(35),math.rad(-2),math.rad(2));
  452. ["TJ"] = CFrame.new(0,-.55,0)*CFrame.Angles(math.rad(-40),math.rad(2),0);
  453. ["Ra"] = CFrame.new(1.5,.3,0)*CFrame.Angles(math.rad(48),0,math.rad(5));
  454. ["La"] = CFrame.new(-1.5,.3,0)*CFrame.Angles(math.rad(42),0,math.rad(-5));
  455. ["Rl"] = CFrame.new(.5,-.1,-.5)*CFrame.Angles(math.rad(0),0,math.rad(1));
  456. ["Ll"] = CFrame.new(-.5,-.3,-.5)*CFrame.Angles(math.rad(50),0,math.rad(-1));
  457. }};
  458. {15,{
  459. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(35),math.rad(0),math.rad(0));
  460. ["TJ"] = CFrame.new(0,-.6,0)*CFrame.Angles(math.rad(-40),math.rad(0),0);
  461. ["Ra"] = CFrame.new(1.5,.3,0)*CFrame.Angles(math.rad(45),0,math.rad(5));
  462. ["La"] = CFrame.new(-1.5,.3,0)*CFrame.Angles(math.rad(45),0,math.rad(-5));
  463. ["Rl"] = CFrame.new(.5,0,-.5)*CFrame.Angles(math.rad(30),0,math.rad(1));
  464. ["Ll"] = CFrame.new(-.5,-.2,-.5)*CFrame.Angles(math.rad(25),0,math.rad(-1));
  465. }};
  466. {20,{
  467. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(35),math.rad(2),math.rad(-2));
  468. ["TJ"] = CFrame.new(0,-.55,0)*CFrame.Angles(math.rad(-40),math.rad(-2),0);
  469. ["Ra"] = CFrame.new(1.5,.3,0)*CFrame.Angles(math.rad(42),0,math.rad(5));
  470. ["La"] = CFrame.new(-1.5,.3,0)*CFrame.Angles(math.rad(48),0,math.rad(-5));
  471. ["Rl"] = CFrame.new(.5,-.2,-.5)*CFrame.Angles(math.rad(50),0,math.rad(1));
  472. ["Ll"] = CFrame.new(-.5,-.3,-.5)*CFrame.Angles(math.rad(0),0,math.rad(-1));
  473. }};
  474. };
  475. Animate["Crawl"] = makeKeyFrame(Tab);
  476. Tab = {
  477. {1,{
  478. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(10),0,0);
  479. ["TJ"] = CFrame.new(0,-1.25,-.05)*CFrame.Angles(math.rad(-10),math.rad(0),0);
  480. ["Ra"] = CFrame.new(1.5,.3,0)*CFrame.Angles(math.rad(10),0,math.rad(5));
  481. ["La"] = CFrame.new(-1.5,.3,0)*CFrame.Angles(math.rad(10),0,math.rad(-5));
  482. ["Rl"] = CFrame.new(.5,.3,-.5)*CFrame.Angles(math.rad(10),0,math.rad(1));
  483. ["Ll"] = CFrame.new(-.5,-1.25,0)*CFrame.Angles(math.rad(-80),0,math.rad(-1))*CFrame.new(0,.5,0);
  484. }};
  485. {5,{
  486. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(80),0,0);
  487. ["TJ"] = CFrame.new(0,-1.1,0)*CFrame.Angles(math.rad(-60),math.rad(0),0);
  488. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(135),0,math.rad(10));
  489. ["La"] = CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(135),0,math.rad(-10));
  490. ["Rl"] = CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(-25),0,math.rad(1));
  491. ["Ll"] = CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(-25),0,math.rad(-1));
  492. }};
  493. {10,{
  494. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(10),0,0);
  495. ["TJ"] = CFrame.new(0,-1.2,0)*CFrame.Angles(math.rad(-100),math.rad(0),0);
  496. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(135),0,math.rad(10));
  497. ["La"] = CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(135),0,math.rad(-10));
  498. ["Rl"] = CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(5),0,math.rad(1));
  499. ["Ll"] = CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(5),0,math.rad(-1));
  500. }};
  501. {15,{
  502. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(-70),0,0);
  503. ["TJ"] = CFrame.new(0,-1.2,0)*CFrame.Angles(math.rad(-135),math.rad(0),0);
  504. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(45),0,math.rad(-10));
  505. ["La"] = CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(45),0,math.rad(10));
  506. ["Rl"] = CFrame.new(.5,-1,-.5)*CFrame.Angles(math.rad(-25),0,math.rad(1));
  507. ["Ll"] = CFrame.new(-.5,-1,-.5)*CFrame.Angles(math.rad(-25),0,math.rad(-1));
  508. }};
  509. {20,{
  510. ["Neck"] = CFrame.new(0,.75,0)*CFrame.Angles(math.rad(-85),0,0);
  511. ["TJ"] = CFrame.new(0,-1.5,0)*CFrame.Angles(math.rad(-180),math.rad(0),0);
  512. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(100),0,math.rad(-10));
  513. ["La"] = CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(100),0,math.rad(10));
  514. ["Rl"] = CFrame.new(.5,-.3,-.5)*CFrame.Angles(math.rad(-15),0,math.rad(1));
  515. ["Ll"] = CFrame.new(-.5,-.3,-.5)*CFrame.Angles(math.rad(-15),0,math.rad(-1));
  516. }};
  517. {25,{
  518. ["Neck"] = CFrame.new(0,.75,0)*CFrame.Angles(math.rad(-20),0,0);
  519. ["TJ"] = CFrame.new(0,-2.5,0)*CFrame.Angles(math.rad(-270),0,0);
  520. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(80),0,math.rad(-10));
  521. ["La"] = CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(80),0,math.rad(10));
  522. ["Rl"] = CFrame.new(.5,-.4,-.5)*CFrame.Angles(math.rad(60),0,math.rad(1));
  523. ["Ll"] = CFrame.new(-.5,-.4,-.5)*CFrame.Angles(math.rad(30),0,math.rad(-1));
  524. }};
  525. {30,{
  526. ["Neck"] = CFrame.new(0,.75,0)*CFrame.Angles(math.rad(-20),0,0);
  527. ["TJ"] = CFrame.new(0,-1.5,0)*CFrame.Angles(math.rad(-315),0,0);
  528. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(50),0,math.rad(-10));
  529. ["La"] = CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(50),0,math.rad(10));
  530. ["Rl"] = CFrame.new(.5,-.4,-.5)*CFrame.Angles(math.rad(30),0,math.rad(1));
  531. ["Ll"] = CFrame.new(-.5,-.4,-.5)*CFrame.Angles(math.rad(-10),0,math.rad(-1));
  532. }};
  533. {35,{
  534. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(10),0,0);
  535. ["TJ"] = CFrame.new(0,-1.25,-.05)*CFrame.Angles(math.rad(-10),math.rad(0),0);
  536. ["Ra"] = CFrame.new(1.5,.3,0)*CFrame.Angles(math.rad(10),0,math.rad(5));
  537. ["La"] = CFrame.new(-1.5,.3,0)*CFrame.Angles(math.rad(10),0,math.rad(-5));
  538. ["Rl"] = CFrame.new(.5,.3,-.5)*CFrame.Angles(math.rad(10),0,math.rad(1));
  539. ["Ll"] = CFrame.new(-.5,-1.25,0)*CFrame.Angles(math.rad(-80),0,math.rad(-1))*CFrame.new(0,.5,0);
  540. }}
  541. };
  542. Animate["Role"] = makeKeyFrame(Tab);
  543.  
  544. local Tab = {
  545. {1,{
  546. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(5),0,0);
  547. ["TJ"] = CFrame.new(0,0,-.05)*CFrame.Angles(math.rad(0),math.rad(0),0);
  548. ["Ra"] = CFrame.new(1.5,.4,0)*CFrame.Angles(math.rad(-10),0,math.rad(10));
  549. ["La"] = CFrame.new(-1.5,.4,0)*CFrame.Angles(math.rad(10),0,math.rad(-10));
  550. ["Rl"] = CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(2),0,math.rad(5));
  551. ["Ll"] = CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(1),0,math.rad(-5));
  552. }};
  553. {4,{
  554. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(10),0,0);
  555. ["TJ"] = CFrame.new(0,0,-.05)*CFrame.Angles(math.rad(0),math.rad(0),0);
  556. ["Ra"] = CFrame.new(1.5,.4,0)*CFrame.Angles(math.rad(10),0,math.rad(-12));
  557. ["La"] = CFrame.new(-1.5,.4,0)*CFrame.Angles(math.rad(-10),0,math.rad(12));
  558. ["Rl"] = CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(-1),0,math.rad(5));
  559. ["Ll"] = CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(2),0,math.rad(-5));
  560. }};
  561. {6,{
  562. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(5),0,0);
  563. ["TJ"] = CFrame.new(0,0,-.05)*CFrame.Angles(math.rad(0),math.rad(0),0);
  564. ["Ra"] = CFrame.new(1.5,.45,0)*CFrame.Angles(math.rad(-10),0,math.rad(16));
  565. ["La"] = CFrame.new(-1.5,.45,0)*CFrame.Angles(math.rad(-20),0,math.rad(-16));
  566. ["Rl"] = CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(-2),0,math.rad(5));
  567. ["Ll"] = CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(4),0,math.rad(-5));
  568. }};
  569. {9,{
  570. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(10),0,0);
  571. ["TJ"] = CFrame.new(0,0,-.05)*CFrame.Angles(math.rad(0),math.rad(0),0);
  572. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(-5),0,math.rad(-10));
  573. ["La"] = CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(4),0,math.rad(10));
  574. ["Rl"] = CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(-10),0,math.rad(5));
  575. ["Ll"] = CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(-3),0,math.rad(-5));
  576. }};
  577. {12,{
  578. ["Neck"] = CFrame.new(0,1,0)*CFrame.Angles(math.rad(5),0,0);
  579. ["TJ"] = CFrame.new(0,0,-.05)*CFrame.Angles(math.rad(0),math.rad(0),0);
  580. ["Ra"] = CFrame.new(1.5,.6,0)*CFrame.Angles(math.rad(3),0,math.rad(13));
  581. ["La"] = CFrame.new(-1.5,.6,0)*CFrame.Angles(math.rad(5),0,math.rad(-13));
  582. ["Rl"] = CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(4),0,math.rad(5));
  583. ["Ll"] = CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(-3),0,math.rad(-5));
  584. }};
  585. };
  586. Animate["Shock"] = makeKeyFrame(Tab);
  587.  
  588. local Tab = {
  589. {1,{
  590. ["TJ"] = CFrame.new(0,0,-.05)*CFrame.Angles(math.rad(-2),math.rad(-10),0);
  591. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(45),0,math.rad(-5))*CFrame.new(0,.5,0);
  592. ["La"] = CFrame.new(-1,.7,-.5)*CFrame.Angles(math.rad(70),0,math.rad(30));
  593. ["Handle"] = CFrame.new(0,-1,0)*CFrame.Angles(math.rad(-150),0,0)
  594. }};
  595. {5,{
  596. ["TJ"] = CFrame.new(0,0,-.05)*CFrame.Angles(math.rad(-2),math.rad(-10),0);
  597. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(45),0,math.rad(-5))*CFrame.new(0,.5,0);
  598. ["La"] = CFrame.new(-1,.7,-.5)*CFrame.Angles(math.rad(70),0,math.rad(45));
  599. ["Handle"] = CFrame.new(0,-1,0)*CFrame.Angles(math.rad(-150),0,0)
  600. }};
  601. {10,{
  602. ["TJ"] = CFrame.new(0,0,-.05)*CFrame.Angles(math.rad(-2),math.rad(10),0);
  603. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(90),0,math.rad(-5))*CFrame.new(0,-.5,0);
  604. ["La"] = CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(-40),0,math.rad(-20));
  605. ["Handle"] = CFrame.new(0,-1,0)*CFrame.Angles(math.rad(-150),0,0)
  606. }};
  607. {15,{
  608. ["TJ"] = CFrame.new(0,0,-.05)*CFrame.Angles(math.rad(-2),math.rad(10),0);
  609. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(90),0,math.rad(-5))*CFrame.new(0,-.5,0);
  610. ["La"] = CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(-40),0,math.rad(-20));
  611. ["Handle"] = CFrame.new(0,-1,0)*CFrame.Angles(math.rad(-150),0,0)
  612. }};
  613. {20,{
  614. ["TJ"] = CFrame.new(0,0,-.05)*CFrame.Angles(math.rad(-1),math.rad(0),0);
  615. ["Ra"] = CFrame.new(1.5,.45,0)*CFrame.Angles(math.rad(2.5),0,math.rad(1));
  616. ["La"] = CFrame.new(-1.5,.45,0)*CFrame.Angles(math.rad(1.5),0,math.rad(-1));
  617. ["Handle"] = CFrame.new(0,-1,0)*CFrame.Angles(math.rad(-90),0,0)
  618. }};
  619. }
  620. Animate["Stab"] = makeKeyFrame(Tab,false);
  621. local Tab = {
  622. {1,{
  623. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(70),0,math.rad(-5))*CFrame.new(0,.5,0);
  624. ["La"] = CFrame.new(-1,.7,-.5)*CFrame.Angles(math.rad(70),0,math.rad(45));
  625. ["Handle"] = CFrame.new(0,-1,0)*CFrame.Angles(math.rad(-150),0,0)
  626. }};
  627. {5,{
  628. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(70),0,math.rad(-5))*CFrame.new(0,.5,0);
  629. ["La"] = CFrame.new(-1,.7,-.5)*CFrame.Angles(math.rad(70),0,math.rad(45));
  630. ["Handle"] = CFrame.new(0,-1,0)*CFrame.Angles(math.rad(-150),0,0)
  631. }};
  632. {10,{
  633. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(115),0,math.rad(-5))*CFrame.new(0,-.5,0);
  634. ["La"] = CFrame.new(-1.5,.4,.2)*CFrame.Angles(math.rad(-20),0,math.rad(-20));
  635. ["Handle"] = CFrame.new(0,-1,0)*CFrame.Angles(math.rad(-150),0,0)
  636. }};
  637. {15,{
  638. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(115),0,math.rad(-5))*CFrame.new(0,-.5,0);
  639. ["La"] = CFrame.new(-1.5,.4,.2)*CFrame.Angles(math.rad(-20),0,math.rad(-20));
  640. ["Handle"] = CFrame.new(0,-1,0)*CFrame.Angles(math.rad(-150),0,0)
  641. }};
  642. {20,{
  643. ["Ra"] = CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(0),0,math.rad(5))*CFrame.new(0,.5,0);
  644. ["La"] = CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(0),0,math.rad(-5));
  645. ["Handle"] = CFrame.new(0,-1,0)*CFrame.Angles(math.rad(-90),0,0)
  646. }};
  647. }
  648. Animate["CStab"] = makeKeyFrame(Tab,false);
  649. --// END
  650.  
  651. function damage(hit,damage,cooldown)
  652. for i,v in pairs(hit:GetChildren()) do
  653. if v:IsA("Humanoid") and hit.Name ~= Char.Name then
  654. local find = v:FindFirstChild("Hitz")
  655. if not find then
  656. if v.Parent:findFirstChild("Head") then
  657. local BillG = Instance.new("BillboardGui",v.Parent.Head)BillG.Size = UDim2.new(1,0,1,0)
  658. BillG.Adornee = v.Parent.Head BillG.StudsOffset = Vector3.new(math.random(-3,3),math.random(3,5),math.random(-3,3))
  659. local TL = Instance.new("TextLabel",BillG)TL.Size = UDim2.new(1,0,1,0)
  660. TL.BackgroundTransparency = 1 TL.Text = tostring(damage).."-"
  661. TL.TextColor3 = BrickColor.new("Dark stone grey").Color TL.TextStrokeColor3 = BrickColor.new("Really red").Color
  662. TL.TextStrokeTransparency = 0 TL.TextXAlignment = Enum.TextXAlignment.Center
  663. TL.TextYAlignment = Enum.TextYAlignment.Center TL.FontSize = Enum.FontSize.Size18
  664. TL.Font = "ArialBold"
  665. coroutine.resume(coroutine.create(function()
  666. wait(1)
  667. for i = 0,1,.1 do wait(.1) BillG.StudsOffset = BillG.StudsOffset+Vector3.new(0,.1,0) end
  668. BillG:Destroy()
  669. end))
  670. end
  671. v.Health = v.Health - damage local bool = Instance.new("BoolValue",v)bool.Name = 'Hitz'game:GetService("Debris"):AddItem(bool,cooldown)
  672. end
  673. end
  674. end
  675. end
  676.  
  677. function playSound(id,parent,volume,pitch)
  678. local sound = Instance.new("Sound",parent or workspace)
  679. sound.SoundId = "http://www.roblox.com/asset?id="..id
  680. sound.Volume = volume or 1
  681. sound.Pitch = pitch or 1
  682. coroutine.wrap(function()
  683. wait()
  684. sound:Play()
  685. wait(10)
  686. sound:Stop()
  687. sound:Destroy()
  688. end)()
  689. return sound
  690. end
  691.  
  692. noPressButtons = false
  693. isAttacking = false
  694. Mouse.Button1Down:connect(function()
  695. if not isAttacking then
  696. isAttacking = true; noPressButtons = true
  697. toBlock.RaW = true; toBlock.LaW = true; toBlock.RootJoint = true; toBlock.Handle = true;
  698. playSound(91154708,KnifeP,1,1)
  699. local Var = KnifeP.Touched:connect(function(Hit) damage(Hit.Parent,math.random(30,45),1) end)
  700. if isCrouching == true then
  701. toBlock.RootJoint = false;
  702. Animate.CStab:Play(true,true)
  703. else
  704. Animate.Stab:Play(true,true)
  705. end
  706.  
  707. Var:disconnect()
  708.  
  709. toBlock.RaW = false; toBlock.LaW = false; toBlock.RootJoint = false; toBlock.Handle = false;
  710. isAttacking = false; noPressButtons = false
  711. end
  712. end)
  713. Mouse.KeyDown:connect(function(Key)
  714. if Key == "p" then
  715. stopAllFramesExcept("d")
  716. Animate.Shock:Play()
  717. elseif Key == '\48' and isCrouching == false and not noPressButtons then
  718. Hum.WalkSpeed = 35
  719. elseif Key == '\50' and not noPressButtons then
  720. Mode = -1
  721. isCrouching = not isCrouching
  722. elseif isCrouching and Key == '\32' and not isBusy and not noPressButtons then
  723. isBusy = true
  724.  
  725. local oldW = Hum.WalkSpeed
  726. Hum.WalkSpeed = 0
  727. stopAllFramesExcept("Role")
  728.  
  729. local bg = Instance.new("BodyGyro",HRootPart)
  730. game.Debris:AddItem(bg,10)
  731. bg.maxTorque = Vector3.new()*math.huge
  732. bg.cframe = HRootPart.CFrame
  733.  
  734. local v = Instance.new("BodyVelocity",HRootPart)
  735. game.Debris:AddItem(v,10)
  736. v.maxForce = Vector3.new(math.huge,0,math.huge)
  737. v.velocity = HRootPart.CFrame.lookVector*30
  738.  
  739. Animate.Role:Play(true)
  740. v:Destroy()
  741. wait()
  742. bg:Destroy()
  743. Hum.WalkSpeed = oldW
  744.  
  745. isBusy = false
  746. end
  747. end)
  748. Mouse.KeyUp:connect(function(Key)
  749. if Key == '\48' and isCrouching == false then
  750. Hum.WalkSpeed = 16
  751. end
  752. end)
  753. Hum.Changed:connect(function()
  754. if isCrouching == true then
  755. Hum.Jump = false
  756. end
  757. end)
  758.  
  759.  
  760. isBusy = false
  761. isCrouching = false
  762. Mode = -1
  763. while true do
  764. wait(.02)
  765. if isBusy then
  766. Mode = -1
  767. repeat wait() until isBusy == false
  768. end
  769. if isCrouching == true then
  770. if Mode == -1 then
  771. Hum.WalkSpeed = 10
  772. end
  773. if Vector3.new(Torso.Velocity.x,0,Torso.Velocity.z).magnitude >= 8 then
  774. if Mode ~= 1 then
  775. Mode = 1
  776. stopAllFramesExcept("Crawl")
  777. Animate.Crawl:Play()
  778. end
  779. else
  780. if Mode ~= 0 then
  781. Mode = 0
  782. stopAllFramesExcept("CIdle")
  783. Animate.CIdle:Play()
  784. end
  785. end
  786. else
  787. if Mode == -1 then
  788. Hum.WalkSpeed = 16
  789. end
  790. if Vector3.new(Torso.Velocity.x,0,Torso.Velocity.z).magnitude >= 30 then
  791. if Mode ~= 2 then
  792. Mode = 2
  793. stopAllFramesExcept("Run")
  794. wait()
  795. Animate.Run:Play()
  796. end
  797. elseif Vector3.new(Torso.Velocity.x,0,Torso.Velocity.z).magnitude >= 15 then
  798. if Mode ~= 1 then
  799. Mode = 1
  800. stopAllFramesExcept("Walk")
  801. Animate.Walk:Play()
  802. end
  803. else
  804. if Mode ~= 0 then
  805. Mode = 0
  806. stopAllFramesExcept("Idle")
  807. Animate.Idle:Play()
  808. end
  809. end
  810. end
  811. end
Add Comment
Please, Sign In to add comment