Advertisement
OnePunchMan

Wake me up inside

Jun 6th, 2017
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.53 KB | None | 0 0
  1. pls=game:GetService'Players';
  2. rs=game:GetService'RunService';
  3. uinps=game:GetService'UserInputService';
  4. lp=pls.LocalPlayer;
  5. mouse=lp:GetMouse();
  6. c=lp.Character;
  7. rayModel=Instance.new('Model',c);
  8. human=c.Humanoid;
  9. Cone=nil;
  10. human.MaxHealth=50;
  11. wait();
  12. human.Health=50;
  13. c.Health:Destroy();
  14. Debounces={
  15. FPS=0;
  16. isAttacking=false;
  17. isMoving=false;
  18. isSprinting=false;
  19. Debounce=false;
  20. isTyping=false;
  21. isJumping=false;
  22. isFlash=false;
  23. };
  24. numLerp=function(start,goal,alpha)
  25. return(((goal-start)*alpha)+start);
  26. end;
  27. CFrameZero=function()
  28. return CFrame.new(Vector3.new());
  29. end;
  30. local function a()
  31. local t=tick();
  32. local l=t%1*3;
  33. local t=.5*math.pi*(l%1);
  34. if l<1 then
  35. return BrickColor.new("Really red").Color;
  36. elseif l<2 then
  37. return BrickColor.new("Really red").Color;
  38. else
  39. return BrickColor.new("Really red").Color;
  40. end;
  41. end;
  42. rad=function(value)
  43. return math.rad(value);
  44. end;
  45. CFAngles=function(Vector)
  46. return CFrame.Angles(rad(Vector.x),rad(Vector.y),rad(Vector.z));
  47. end;
  48. AnimStat={
  49. lerpSpeed=.2;
  50. lerpSpeed2=.35;
  51. lerpTween=0;
  52. };
  53. Joints={
  54. c.HumanoidRootPart.RootJoint;
  55. c.Torso.Neck;
  56. c.Torso['Left Shoulder'];
  57. c.Torso['Right Shoulder'];
  58. c.Torso['Left Hip'];
  59. c.Torso['Right Hip'];
  60. };
  61. JointTargets={
  62. CFrameZero();
  63. CFrameZero();
  64. CFrameZero();
  65. CFrameZero();
  66. CFrameZero();
  67. CFrameZero();
  68. };
  69. prepareCharacter=function()
  70. music=Instance.new('Sound',c.HumanoidRootPart);
  71. music.SoundId='rbxassetid://340656185';
  72. music.Looped=true;
  73. music.Volume=.6;
  74. music2=Instance.new('Sound',c);
  75. music2.SoundId='rbxassetid://326429386';
  76. music2.Looped=true;
  77. music2.Volume=1;
  78. music3=Instance.new('Sound',c.HumanoidRootPart);
  79. music3.SoundId='rbxassetid://328728034';
  80. music3.Looped=true;
  81. music3.Volume=1;
  82. music4=Instance.new('Sound',c.HumanoidRootPart);
  83. music4.SoundId='rbxassetid://315675951';
  84. music4.Looped=true;
  85. music4.Volume=1;
  86. music5=Instance.new('Sound',c.HumanoidRootPart);
  87. music5.SoundId='rbxassetid://383649303';
  88. music5.Looped=true;
  89. music5.Volume=1;
  90. music6=Instance.new('Sound',char)
  91. music6.SoundId='rbxassetid://328728034';
  92. music6.Volume=10;
  93. music6.Pitch=1;
  94. music6.Looped=true;
  95. wait(0.1)
  96. human.WalkSpeed=0;
  97. human.JumpPower=0;
  98. for i,v in pairs(c:children())do
  99. if v:isA'Hat'then v:Destroy();end;
  100. if v:FindFirstChild'roblox'then v.roblox:Destroy();end;
  101. if v.Name=='Head'then v.Transparency=1 for _,x in pairs(v:children())do if x.ClassName=='Sound'then x:Destroy();end;end;end;
  102. if v:FindFirstChild'face'then v.face:Destroy();end;
  103. if v:isA'Part'then v.BrickColor=BrickColor.new'White';end;
  104. end
  105. local shirt=c:FindFirstChild'Shirt'or Instance.new('Shirt',c);
  106. local pants=c:FindFirstChild'Pants'or Instance.new('Pants',c);
  107. shirt.ShirtTemplate='rbxassetid://324290888';
  108. pants.PantsTemplate='rbxassetid://127381017';
  109. local Head=Instance.new('Part',c);
  110. Head.Size=Vector3.new(2.5,2.5,1);
  111. Head.Transparency=1;
  112. Head:BreakJoints();
  113. local hw=Instance.new('Weld',c.Head);
  114. hw.Part0=c.Head;
  115. hw.Part1=Head;
  116. hw.C0=CFrame.new(0,.3,0);
  117. faceDecal=Instance.new('Decal',Head);
  118. faceDecal.Face=Enum.NormalId.Front;
  119. faceDecal.Texture='rbxassetid://291303373';
  120. local backDecal=Instance.new('Decal',Head);
  121. backDecal.Face=Enum.NormalId.Back;
  122. backDecal.Texture='rbxassetid://291303373';
  123. local mes=Instance.new('BlockMesh',Head);
  124. mes.Scale=Vector3.new(1,1,.4);
  125. local Anim=human:FindFirstChild'Animator'
  126. if Anim then Anim:Destroy();end;
  127. end;
  128. setJointCFrames=function(table)
  129. for i=1,#table do
  130. JointTargets[i]=table[i];
  131. end;
  132. end;
  133. triWave=function(x)
  134. local pi2=math.pi/2;
  135. return math.abs((x/pi2)%4-2)-1;
  136. end;
  137. setLerp=function(speed)
  138. AnimStat.lerpSpeed=speed;
  139. end;
  140. setTween=function(tween)
  141. AnimStat.lerpTween=tween;
  142. end;
  143. playSound=function(id,part,vol,pitch)
  144. local vol=vol or 1;
  145. local pitch=pitch or 1;
  146. local x=Instance.new('Sound',part);
  147. x.Volume=vol;
  148. x.Pitch=pitch;
  149. x.SoundId='rbxassetid://'..id;
  150. spawn(function()
  151. wait();
  152. x:Play();
  153. wait(x.TimeLength+.2);
  154. x:Destroy();
  155. end);
  156. end;
  157. lerpBoom=function()
  158. if Cone then
  159. Cone.CFrame=CFrame.new(c.HumanoidRootPart.CFrame.p,c.HumanoidRootPart.CFrame.p+c.HumanoidRootPart.Velocity)*CFrame.Angles(-math.pi/2,0,0);
  160. cMesh.Scale=Vector3.new(20,20+c.HumanoidRootPart.Velocity.magnitude/10,20);
  161. Cone.Transparency=1-c.HumanoidRootPart.Velocity.magnitude/1000;
  162. else
  163. Cone=Instance.new('Part',c);
  164. Cone.Anchored=true;
  165. Cone.CanCollide=false;
  166. Cone.Transparency=math.random(50,70)/100;
  167. Cone.Size=Vector3.new(1,1,1);
  168. Cone.CFrame=CFrame.new(c.HumanoidRootPart.CFrame.p,c.HumanoidRootPart.CFrame.p+c.HumanoidRootPart.Velocity)*CFrame.Angles(-math.pi/2,0,0);
  169. cMesh=Instance.new('SpecialMesh',Cone);
  170. cMesh.MeshId='rbxassetid://1033714';
  171. cMesh.Scale=Vector3.new(20,50,20);
  172. end;
  173. end;
  174. noBoom=function()
  175. if Cone then local x=Cone Cone=nil;
  176. for i=1,20 do
  177. wait();
  178. x.Mesh.Scale=x.Mesh.Scale+Vector3.new(-.5,1,-.5);
  179. x.Transparency=x.Transparency+1/30;
  180. end;
  181. end;
  182. end;
  183. gasterBlast=function(tCFrame,aimPos,charge)
  184. local aimTarget;
  185. if aimPos then
  186. aimTarget=CFrame.new(tCFrame,aimPos);
  187. else
  188. aimTarget=tCFrame;
  189. end;
  190. local gast=Instance.new('Part',c);
  191. gast.Size=Vector3.new(12,.2,12);
  192. gast.CanCollide=false;
  193. gast.Anchored=true;
  194. gast.Transparency=1;
  195. if charge then
  196. playSound(400523331,gast,math.random(90,110)/100);
  197. end;
  198. wait();
  199. for i=1,2 do
  200. local decal=Instance.new('Decal',gast);
  201. decal.Texture='rbxassetid://232855011';
  202. if i==1 then
  203. decal.Face=Enum.NormalId.Top;
  204. else
  205. decal.Face=Enum.NormalId.Bottom;
  206. end;
  207. end;
  208. gast.CFrame=CFrame.new(aimTarget.p-Vector3.new(math.sin(tick()*10)*10,20,math.cos(tick()*10)*10));
  209. spawn(function()
  210. local tarCFrame=gast.CFrame;
  211. local isLooping=true;
  212. spawn(function()
  213. while rs.RenderStepped:wait()and isLooping do
  214. gast.CFrame=gast.CFrame:lerp(tarCFrame,.6/(Debounces.FPS/60));
  215. end;
  216. end);
  217. for i=1,30 do
  218. wait();
  219. tarCFrame=gast.CFrame:lerp(aimTarget,.24);
  220. end;
  221. playSound(340722848,gast,math.random(90,110)/100);
  222. isLooping=false;
  223. wait(.08);
  224. local ray=Ray.new(aimTarget.p,aimTarget.lookVector.unit*999);
  225. local _,pos=workspace:FindPartOnRay(ray,c);
  226. local dis=(aimTarget.p-pos).magnitude;
  227. local rayCFrame=CFrame.new(gast.CFrame.p+(pos-gast.CFrame.p).unit*(dis/2+200),gast.CFrame.p+(pos-gast.CFrame.p).unit*dis*2)*CFrame.Angles(0,math.pi/2,0);
  228. local rayPart=Instance.new('Part',rayModel);
  229. rayPart.Material='Neon';
  230. rayPart.FormFactor='Custom';
  231. rayPart.Color=a();
  232. rayPart.Anchored=true;
  233. rayPart.CanCollide=false;
  234. rayPart.Shape='Cylinder';
  235. rayPart.Size=Vector3.new(dis+400,8,8);
  236. rayPart.CFrame=rayCFrame;
  237. gast:Destroy();
  238. end);
  239. end;
  240. largegasterBlast=function(tCFrame,aimPos)
  241. local aimTarget;
  242. if aimPos then
  243. aimTarget=CFrame.new(tCFrame,aimPos);
  244. else
  245. aimTarget=tCFrame;
  246. end;
  247. local gast=Instance.new('Part',c);
  248. gast.Size=Vector3.new(25,.2,25);
  249. gast.CanCollide=false;
  250. gast.Anchored=true;
  251. gast.Transparency=1;
  252. playSound(400523331,gast,math.random(85,97)/100);
  253. wait();
  254. for i=1,2 do
  255. local decal=Instance.new('Decal',gast);
  256. decal.Texture='rbxassetid://232855011';
  257. if i==1 then
  258. decal.Face=Enum.NormalId.Top;
  259. else
  260. decal.Face=Enum.NormalId.Bottom;
  261. end;
  262. end;
  263. gast.CFrame=CFrame.new(aimTarget.p-Vector3.new(math.sin(tick()*10)*10,20,math.cos(tick()*10)*10));
  264. spawn(function()
  265. local tarCFrame=gast.CFrame;
  266. local isLooping=true;
  267. spawn(function()
  268. while rs.RenderStepped:wait()and isLooping do
  269. gast.CFrame=gast.CFrame:lerp(tarCFrame,.6/(Debounces.FPS/60));
  270. end;
  271. end);
  272. for i=1,40 do
  273. wait();
  274. tarCFrame=gast.CFrame:lerp(aimTarget,.18);
  275. end;
  276. playSound(340722848,gast,math.random(80,95)/100);
  277. isLooping=false;
  278. wait(.08);
  279. local ray=Ray.new(aimTarget.p,aimTarget.lookVector.unit*999);
  280. local _,pos=workspace:FindPartOnRay(ray,c);
  281. local dis=(aimTarget.p-pos).magnitude;
  282. local rayCFrame=CFrame.new(gast.CFrame.p+(pos-gast.CFrame.p).unit*(dis/2+200),gast.CFrame.p+(pos-gast.CFrame.p).unit*dis*2)*CFrame.Angles(0,math.pi/2,0);
  283. local rayPart=Instance.new('Part',rayModel);
  284. rayPart.Material='Neon';
  285. rayPart.FormFactor='Custom';
  286. rayPart.Color=a();
  287. rayPart.Anchored=true;
  288. rayPart.CanCollide=false;
  289. rayPart.Shape='Cylinder';
  290. rayPart.Size=Vector3.new(dis+400,17,17);
  291. rayPart.CFrame=rayCFrame;
  292. gast:Destroy();
  293. end);
  294. end;
  295. prepareCharacter();
  296. spawn(function()
  297. local sine=0;
  298. while wait()do
  299. if Debounces.isFlash then
  300. if(tick()*8)%2>1 then
  301. faceDecal.Texture='rbxassetid://291303373';
  302. else
  303. faceDecal.Texture='rbxassetid://291303373';
  304. end;
  305. else
  306. faceDecal.Texture='rbxassetid://291303373';
  307. end;
  308. if Debounces.isAttacking==false and Debounces.isMoving==false and Debounces.Debounce==false and Debounces.isJumping==false then
  309. setLerp(.8);
  310. local spasm=math.abs(math.sin(tick()*20))*1.1;
  311. local spasm2=math.abs(math.sin(tick()*20-2))*1.1;
  312. local spasm3=math.abs(math.sin(tick()*20-2.3))*1.1;
  313. setJointCFrames({
  314. CFrame.new(Vector3.new(0,0-spasm,0))*CFAngles(Vector3.new(0,0,0));
  315. CFrame.new(Vector3.new(0,1.5,0))*CFAngles(Vector3.new(-0.011,-0.502,-1.177));
  316. CFrame.new(Vector3.new(-1.5-spasm2^2/3,-0.001,0))*CFAngles(Vector3.new(-2.344,7.899,-2.82+spasm3^2*-60));
  317. CFrame.new(Vector3.new(1.569+spasm2^2/3,0,-0.1))*CFAngles(Vector3.new(4.822,1.123,6.383+spasm3^2*60));
  318. CFrame.new(Vector3.new(-0.61,-2+spasm/1.01,-.15))*CFAngles(Vector3.new(-2.206,0.767,-0.582));
  319. CFrame.new(Vector3.new(0.55,-2+spasm/1.01,-.1))*CFAngles(Vector3.new(-0.026,0.463,3.184));
  320. });
  321. elseif Debounces.isAttacking==false and Debounces.isMoving==true and Debounces.Debounce==false and Debounces.isSprinting==false and Debounces.isJumping==false then
  322. sine=tick()*18;
  323. human.WalkSpeed=120;
  324. setLerp(.35);
  325. setJointCFrames({
  326. CFrame.new(Vector3.new(0,math.sin(sine)/50-.3,0))*CFAngles(Vector3.new(-30-math.sin(sine*2)*3,math.sin(sine*2)*15,0));
  327. CFrame.new(Vector3.new(0,1.48,0.099))*CFAngles(Vector3.new(14.999,-0.001,0));
  328. CFrame.new(Vector3.new(-1.5,-0.001,0.2+math.sin(sine*2+math.pi)*1.2))*CFAngles(Vector3.new(-25.001+math.sin(sine*2+math.pi)*-90,0,-15));
  329. CFrame.new(Vector3.new(1.5,-0.001,0.2+math.sin(sine*2)*1.2))*CFAngles(Vector3.new(-25+math.sin(sine*2)*-90,-0.001,14.999));
  330. CFrame.new(Vector3.new(-0.501,-2+math.cos(sine*2+math.pi)/3,.3+math.sin(sine*2)))*CFAngles(Vector3.new(-25+math.sin(sine*2)*-70,0,-0.001));
  331. CFrame.new(Vector3.new(0.499,-2+math.cos(sine*2)/3,.3+math.sin(sine*2+math.pi)))*CFAngles(Vector3.new(-25+math.sin(sine*2)*70,0,0));
  332. });
  333. elseif Debounces.isAttacking==false and Debounces.isMoving==true and Debounces.Debounce==false and Debounces.isSprinting==true and Debounces.isJumping==false then
  334. sine=tick()*28;
  335. human.WalkSpeed=400;
  336. lerpBoom();
  337. setLerp(.65);
  338. setJointCFrames({
  339. CFrame.new(Vector3.new(0,math.sin(sine)/50-.3,0))*CFAngles(Vector3.new(-30-math.sin(sine*2)*3,math.sin(sine*2)*15,0));
  340. CFrame.new(Vector3.new(0,1.48,0.099))*CFAngles(Vector3.new(14.999,-0.001,0));
  341. CFrame.new(Vector3.new(-1.5,-0.001,0.2+math.sin(sine*2+math.pi)*1.2))*CFAngles(Vector3.new(-25.001+math.sin(sine*2+math.pi)*-90,0,-15));
  342. CFrame.new(Vector3.new(1.5,-0.001,0.2+math.sin(sine*2)*1.2))*CFAngles(Vector3.new(-25+math.sin(sine*2)*-90,-0.001,14.999));
  343. CFrame.new(Vector3.new(-0.501,-2+math.cos(sine*2+math.pi)/3,.3+math.sin(sine*2)))*CFAngles(Vector3.new(-25+math.sin(sine*2)*-70,0,-0.001));
  344. CFrame.new(Vector3.new(0.499,-2+math.cos(sine*2)/3,.3+math.sin(sine*2+math.pi)))*CFAngles(Vector3.new(-25+math.sin(sine*2)*70,0,0));
  345. });
  346. elseif Debounces.isJumping==true and Debounces.Debounce==false then
  347. setLerp(.14);
  348. human.WalkSpeed=45;
  349. setJointCFrames({
  350. CFrame.new(Vector3.new(0,0,0))*CFAngles(Vector3.new(-8,0,0));
  351. CFrame.new(Vector3.new(0,1.5,-0.15))*CFAngles(Vector3.new(-10.138,3.687,0.306));
  352. CFrame.new(Vector3.new(-1.23,0.069,-0.56))*CFAngles(Vector3.new(50.809,0.672,18.704));
  353. CFrame.new(Vector3.new(0.929,-0.031,-1.0912))*CFAngles(Vector3.new(63.00,13.85,-36.416));
  354. CFrame.new(Vector3.new(-0.63,-1.82,-0.74))*CFAngles(Vector3.new(31.324,3.424,-1.249));
  355. CFrame.new(Vector3.new(0.619,-1.331,0.82))*CFAngles(Vector3.new(-59.644,0.998,9.776));
  356. });
  357. end;
  358. end;
  359. end);
  360. human.Changed:connect(function(prop)
  361. if prop=='MoveDirection'then
  362. if human.MoveDirection.magnitude>.02 then
  363. Debounces.isMoving=true;
  364. else
  365. Debounces.isMoving=false;
  366. end;
  367. end;
  368. end);
  369. uinps.InputBegan:connect(function(InputObj)
  370. if InputObj.KeyCode==Enum.KeyCode.Slash then
  371. local finishEvent=nil;
  372. Debounces.isTyping=true
  373. finishEvent=uinps.InputBegan:connect(function(InputObj)
  374. if InputObj.KeyCode==Enum.KeyCode.Return or InputObj.UserInputType==Enum.UserInputType.MouseButton1 then
  375. Debounces.isTyping=false;
  376. finishEvent:disconnect();
  377. end;
  378. end);
  379. end;
  380. end);
  381. mouse.KeyDown:connect(function(key)
  382. if key=='0'then
  383. Debounces.isSprinting=true;
  384. playSound(160248522,c.Torso);
  385. for i=1,3 do
  386. spawn(function()
  387. local e=Instance.new('Part',c);
  388. e.Size=Vector3.new(1,1,1);
  389. e.Material='Neon';
  390. e.Color=a();
  391. e.Anchored=true;
  392. e.CFrame=c.HumanoidRootPart.CFrame*CFrame.Angles(0,0,-math.pi/2);
  393. e.CanCollide=false;
  394. local rm=Instance.new('SpecialMesh',e);
  395. rm.MeshType='FileMesh';
  396. rm.MeshId='rbxassetid://3270017';
  397. rm.Scale=Vector3.new(3.2,3.2,10);
  398. for x=1,30 do
  399. wait();
  400. rm.Scale=rm.Scale:lerp(Vector3.new(i*30,i*30,(4-i)*450),.1);
  401. e.Transparency=x/30+.5;
  402. end;
  403. end);
  404. end;
  405. c.HumanoidRootPart.Velocity=c.HumanoidRootPart.CFrame.lookVector*200;
  406. end;
  407. end);
  408. mouse.KeyUp:connect(function(key)
  409. if key=='0'then
  410. Debounces.isSprinting=false;
  411. end;
  412. end);
  413. mouse.KeyDown:connect(function(key)
  414. if key=='v'then
  415. playSound(201858087,c.Torso,math.random(90,120)/100);
  416. local oldPos=c.HumanoidRootPart.CFrame.p;
  417. local mHit=mouse.Hit.p;
  418. for i=1,2 do
  419. spawn(function()
  420. local pos
  421. if i==1 then pos=oldPos else pos=mHit end
  422. local p=Instance.new('Part',workspace);
  423. p.Anchored=true;
  424. p.CanCollide=false;
  425. p.Color=a();
  426. p.FormFactor='Custom';
  427. p.CFrame=CFrame.new(pos+Vector3.new(0,500,0));
  428. p.Transparency=.4;
  429. p.Size=Vector3.new(20,1000,20);
  430. for i=1,20 do
  431. wait();
  432. p.Transparency=.4+(i/10)*.6;
  433. p.Size=Vector3.new(20-i*1.5,1000,20-i*1.5);
  434. p.CFrame=CFrame.new(pos+Vector3.new(0,500,0));
  435. end;
  436. p:Destroy();
  437. end);
  438. end;
  439. if Debounces.isMoving then
  440. c.HumanoidRootPart.CFrame=CFrame.new(mouse.Hit.p+Vector3.new(0,4,0),Vector3.new(c.HumanoidRootPart.Velocity.x,mouse.Hit.p.y+4,c.HumanoidRootPart.Velocity.z));
  441. else
  442. c.HumanoidRootPart.CFrame=CFrame.new(mouse.Hit.p+Vector3.new(0,4,0),Vector3.new(oldPos.x,mouse.Hit.p.y+4,oldPos.z));
  443. end;
  444. end;
  445. end);
  446. mouse.KeyDown:connect(function(key)
  447. if key=='r'then
  448. local pointTarget=mouse.Hit.p;
  449. for i=1,20 do
  450. wait();
  451. gasterBlast(CFrame.new(pointTarget+Vector3.new(math.sin(tick()*10)*20,5+math.abs(math.sin(tick()*5)*10),math.cos(tick()*10)*20),pointTarget));
  452. end;
  453. wait();
  454. largegasterBlast(CFrame.new(pointTarget+Vector3.new(0,35,0),pointTarget));
  455. end;
  456. end);
  457. mouse.KeyDown:connect(function(key)
  458. if key=='f'then
  459. local pointTarget=mouse.Hit.p;
  460. for i=1,20 do
  461. wait();
  462. gasterBlast(CFrame.new(c.HumanoidRootPart.CFrame.p+Vector3.new(0,50,0),pointTarget):toWorldSpace(CFrame.new(math.sin(i/2)*(20-i),math.cos(i/2)*(20-i),-i)));
  463. end;
  464. largegasterBlast(CFrame.new(c.HumanoidRootPart.CFrame.p+Vector3.new(0,50,0),pointTarget):toWorldSpace(CFrame.new(0,0,-25)));
  465. end;
  466. end);
  467. mouse.Button1Down:connect(function()
  468. Debounces.isFlash=true;
  469. end);
  470. mouse.Button1Up:connect(function()
  471. Debounces.isFlash=false;
  472. end);
  473. mouse.KeyDown:connect(function(key)
  474. if key=='k'then
  475. if music.isPlaying then music:Stop();else music:Play();end;
  476. end;
  477. end);
  478. mouse.KeyDown:connect(function(key)
  479. if key=='j'then
  480. if music2.isPlaying then music2:Stop();else music2:Play();end;
  481. end;
  482. end);
  483. mouse.KeyDown:connect(function(key)
  484. if key=='l'then
  485. if music3.isPlaying then music3:Stop();else music3:Play();end;
  486. end;
  487. end);
  488. mouse.KeyDown:connect(function(key)
  489. if key=='p'then
  490. if music4.isPlaying then music4:Stop();else music4:Play();end;
  491. end;
  492. end);
  493. mouse.KeyDown:connect(function(key)
  494. if key=='o'then
  495. if music5.isPlaying then music4:Stop();else music5:Play();end;
  496. end;
  497. end);
  498. mouse.KeyDown:connect(function(key)
  499. if key=='e'then
  500. gasterBlast(c.Torso.CFrame.p+Vector3.new(math.sin(tick()*10)*10,12,math.cos(tick()*10)*10),mouse.Hit.p,true);
  501. end;
  502. end);
  503. mouse.KeyDown:connect(function(key)
  504. if key=='c'then
  505. largegasterBlast(c.Torso.CFrame.p+Vector3.new(math.sin(tick()*10)*10,12,math.cos(tick()*10)*10),mouse.Hit.p);
  506. end;
  507. end);
  508. mouse.KeyDown:connect(function(key)
  509. if key=='q'then
  510. for i=1,5 do
  511. wait();
  512. gasterBlast(c.Torso.CFrame.p+Vector3.new(math.sin(tick()*10)*10,12,math.cos(tick()*10)*10),mouse.Hit.p);
  513. end;
  514. largegasterBlast(c.Torso.CFrame.p+Vector3.new(0,25,0),mouse.Hit.p);
  515. end;
  516. end);
  517. mouse.KeyDown:connect(function(key)
  518. if key=='t'then
  519. local pointTarget=mouse.Hit.p;
  520. for i=1,20 do
  521. gasterBlast(pointTarget+Vector3.new(math.sin(math.deg((360/40)*i))*(20-i),5+i,math.cos(math.deg((360/40)*i))*(20-i)),pointTarget);
  522. end;
  523. wait(.2);
  524. for i=1,10 do
  525. largegasterBlast(pointTarget+Vector3.new(math.sin(math.deg((360/20)*i))*25,20,math.cos(math.deg((360/20)*i))*25),pointTarget);
  526. end;
  527. end;
  528. end);
  529. human.StateChanged:connect(function(os,ns)
  530. if c.HumanoidRootPart.Velocity.Y<.1 and Debounces.isJumping==true and ns==Enum.HumanoidStateType.Landed then
  531. Debounces.isJumping=false;
  532. end;
  533. end);
  534. for i=1,#Joints do
  535. Joints[i].C1=CFrameZero();
  536. end;
  537. rs.RenderStepped:connect(function()
  538. Debounces.FPS=1/rs.RenderStepped:wait();
  539. if Debounces.FPS<30 then
  540. Debounces.FPS=30;
  541. end;
  542. if Debounces.isSprinting then
  543. lerpBoom();
  544. else
  545. noBoom();
  546. end;
  547. for _,v in pairs(rayModel:children())do
  548. v.Transparency=v.Transparency+.06/(Debounces.FPS/60);
  549. if v.Transparency>.99 then v:Destroy();return;end;
  550. v.CanCollide=true;
  551. local tParts=v:GetTouchingParts();
  552. v.CanCollide=false;
  553. local vCFrame=v.CFrame;
  554. v.Size=v.Size+Vector3.new(0,1,1)/(Debounces.FPS/60);
  555. v.CFrame=vCFrame;
  556. for _,x in pairs(tParts)do
  557. if x and x.Parent and x.Parent:FindFirstChild'Humanoid'and x.Parent.Humanoid:isA'Humanoid'and x.Parent~=c then
  558. x.Parent.Humanoid:TakeDamage(1,2);
  559. end;
  560. end;
  561. end;
  562. local FPSLerp=AnimStat.lerpSpeed/(Debounces.FPS/60);
  563. for i=1,#Joints do
  564. Joints[i].C0=Joints[i].C0:lerp(JointTargets[i],FPSLerp);
  565. end;
  566. end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement