123iamstupid123

Untitled

Aug 2nd, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.92 KB | None | 0 0
  1.  
  2. pls=game:GetService'Players';
  3. rs=game:GetService'RunService';
  4. uinps=game:GetService'UserInputService';
  5. lp=pls.LocalPlayer;
  6. mouse=lp:GetMouse();
  7. c=lp.Character;
  8. rayModel=Instance.new('Model',c);
  9. human=c.Humanoid;
  10. Cone=nil;
  11. wait();
  12. Debounces={
  13. FPS=0;
  14. isAttacking=false;
  15. isMoving=false;
  16. isSprinting=false;
  17. Debounce=false;
  18. isTyping=false;
  19. isJumping=false;
  20. isFlash=false;
  21. };
  22. numLerp=function(start,goal,alpha)
  23. return(((goal-start)*alpha)+start);
  24. end;
  25. CFrameZero=function()
  26. return CFrame.new(Vector3.new());
  27. end;
  28. local function a()
  29. local t=tick();
  30. local l=t%1*3;
  31. local t=.5*math.pi*(l%1);
  32. if l<1 then
  33. return Color3.new(1,1-math.cos(t),1-math.sin(t));
  34. elseif l<2 then
  35. return Color3.new(1-math.sin(t),1,1-math.cos(t));
  36. else
  37. return Color3.new(1-math.cos(t),1-math.sin(t),1);
  38. end;
  39. end;
  40. rad=function(value)
  41. return math.rad(value);
  42. end;
  43. CFAngles=function(Vector)
  44. return CFrame.Angles(rad(Vector.x),rad(Vector.y),rad(Vector.z));
  45. end;
  46. AnimStat={
  47. lerpSpeed=.2;
  48. lerpSpeed2=.35;
  49. lerpTween=0;
  50. };
  51. Joints={
  52. c.HumanoidRootPart.RootJoint;
  53. c.Torso.Neck;
  54. c.Torso['Left Shoulder'];
  55. c.Torso['Right Shoulder'];
  56. c.Torso['Left Hip'];
  57. c.Torso['Right Hip'];
  58. };
  59. prepareCharacter=function()
  60. music=Instance.new('Sound',c.HumanoidRootPart);
  61. music.SoundId='rbxassetid://394144904';
  62. music.Looped=true;
  63. music.Volume=.6;
  64. music2=Instance.new('Sound',c);
  65. music2.SoundId='rbxassetid://259613634';
  66. music2.Looped=true;
  67. music2.Volume=1;
  68. music3=Instance.new('Sound',c.HumanoidRootPart);
  69. music3.SoundId='rbxassetid://266530326';
  70. music3.Looped=true;
  71. music3.Volume=1;
  72. music4=Instance.new('Sound',c.HumanoidRootPart);
  73. music4.SoundId='rbxassetid://155738252';
  74. music4.Looped=true;
  75. music4.Volume=1;
  76. music5=Instance.new('Sound',c.HumanoidRootPart);
  77. music5.SoundId='rbxassetid://215391212';
  78. music5.Looped=true;
  79. music5.Volume=1;
  80. human.WalkSpeed=0;
  81. human.JumpPower=0;
  82. end;
  83. triWave=function(x)
  84. local pi2=math.pi/2;
  85. return math.abs((x/pi2)%4-2)-1;
  86. end;
  87. setLerp=function(speed)
  88. AnimStat.lerpSpeed=speed;
  89. end;
  90. setTween=function(tween)
  91. AnimStat.lerpTween=tween;
  92. end;
  93. playSound=function(id,part,vol,pitch)
  94. local vol=vol or 1;
  95. local pitch=pitch or 1;
  96. local x=Instance.new('Sound',part);
  97. x.Volume=vol;
  98. x.Pitch=pitch;
  99. x.SoundId='rbxassetid://'..id;
  100. spawn(function()
  101. wait();
  102. x:Play();
  103. wait(x.TimeLength+.2);
  104. x:Destroy();
  105. end);
  106. end;
  107. lerpBoom=function()
  108. if Cone then
  109. Cone.CFrame=CFrame.new(c.HumanoidRootPart.CFrame.p,c.HumanoidRootPart.CFrame.p+c.HumanoidRootPart.Velocity)*CFrame.Angles(-math.pi/2,0,0);
  110. cMesh.Scale=Vector3.new(20,20+c.HumanoidRootPart.Velocity.magnitude/10,20);
  111. Cone.Transparency=1-c.HumanoidRootPart.Velocity.magnitude/1000;
  112. else
  113. Cone=Instance.new('Part',c);
  114. Cone.Anchored=true;
  115. Cone.CanCollide=false;
  116. Cone.Transparency=math.random(50,70)/100;
  117. Cone.Size=Vector3.new(1,1,1);
  118. Cone.CFrame=CFrame.new(c.HumanoidRootPart.CFrame.p,c.HumanoidRootPart.CFrame.p+c.HumanoidRootPart.Velocity)*CFrame.Angles(-math.pi/2,0,0);
  119. cMesh=Instance.new('SpecialMesh',Cone);
  120. cMesh.MeshId='rbxassetid://1033714';
  121. cMesh.Scale=Vector3.new(20,50,20);
  122. end;
  123. end;
  124. noBoom=function()
  125. if Cone then local x=Cone Cone=nil;
  126. for i=1,20 do
  127. wait();
  128. x.Mesh.Scale=x.Mesh.Scale+Vector3.new(-.5,1,-.5);
  129. x.Transparency=x.Transparency+1/30;
  130. end;
  131. end;
  132. end;
  133. gasterBlast=function(tCFrame,aimPos,charge)
  134. local aimTarget;
  135. if aimPos then
  136. aimTarget=CFrame.new(tCFrame,aimPos);
  137. else
  138. aimTarget=tCFrame;
  139. end;
  140. local gast=Instance.new('Part',c);
  141. gast.Size=Vector3.new(12,.2,12);
  142. gast.CanCollide=false;
  143. gast.Anchored=true;
  144. gast.Transparency=1;
  145. if charge then
  146. playSound(400523331,gast,math.random(90,110)/100);
  147. end;
  148. wait();
  149. for i=1,2 do
  150. local decal=Instance.new('Decal',gast);
  151. decal.Texture='rbxassetid://323497117';
  152. if i==1 then
  153. decal.Face=Enum.NormalId.Top;
  154. else
  155. decal.Face=Enum.NormalId.Bottom;
  156. end;
  157. end;
  158. gast.CFrame=CFrame.new(aimTarget.p-Vector3.new(math.sin(tick()*10)*10,20,math.cos(tick()*10)*10));
  159. spawn(function()
  160. local tarCFrame=gast.CFrame;
  161. local isLooping=true;
  162. spawn(function()
  163. while rs.RenderStepped:wait()and isLooping do
  164. gast.CFrame=gast.CFrame:lerp(tarCFrame,.6/(Debounces.FPS/60));
  165. end;
  166. end);
  167. for i=1,30 do
  168. wait();
  169. tarCFrame=gast.CFrame:lerp(aimTarget,.24);
  170. end;
  171. playSound(340722848,gast,math.random(90,110)/100);
  172. isLooping=false;
  173. wait(.08);
  174. local ray=Ray.new(aimTarget.p,aimTarget.lookVector.unit*999);
  175. local _,pos=workspace:FindPartOnRay(ray,c);
  176. local dis=(aimTarget.p-pos).magnitude;
  177. 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);
  178. local rayPart=Instance.new('Part',rayModel);
  179. rayPart.Material='Neon';
  180. rayPart.FormFactor='Custom';
  181. rayPart.Anchored=true;
  182. rayPart.CanCollide=false;
  183. rayPart.Shape='Cylinder';
  184. rayPart.Size=Vector3.new(dis+400,8,8);
  185. rayPart.CFrame=rayCFrame;
  186. gast:Destroy();
  187. end);
  188. end;
  189. largegasterBlast=function(tCFrame,aimPos)
  190. local aimTarget;
  191. if aimPos then
  192. aimTarget=CFrame.new(tCFrame,aimPos);
  193. else
  194. aimTarget=tCFrame;
  195. end;
  196. local gast=Instance.new('Part',c);
  197. gast.Size=Vector3.new(25,.2,25);
  198. gast.CanCollide=false;
  199. gast.Anchored=true;
  200. gast.Transparency=1;
  201. playSound(400523331,gast,math.random(85,97)/100);
  202. wait();
  203. for i=1,2 do
  204. local decal=Instance.new('Decal',gast);
  205. decal.Texture='rbxassetid://323497117';
  206. if i==1 then
  207. decal.Face=Enum.NormalId.Top;
  208. else
  209. decal.Face=Enum.NormalId.Bottom;
  210. end;
  211. end;
  212. gast.CFrame=CFrame.new(aimTarget.p-Vector3.new(math.sin(tick()*10)*10,20,math.cos(tick()*10)*10));
  213. spawn(function()
  214. local tarCFrame=gast.CFrame;
  215. local isLooping=true;
  216. spawn(function()
  217. while rs.RenderStepped:wait()and isLooping do
  218. gast.CFrame=gast.CFrame:lerp(tarCFrame,.6/(Debounces.FPS/60));
  219. end;
  220. end);
  221. for i=1,40 do
  222. wait();
  223. tarCFrame=gast.CFrame:lerp(aimTarget,.18);
  224. end;
  225. playSound(340722848,gast,math.random(80,95)/100);
  226. isLooping=false;
  227. wait(.08);
  228. local ray=Ray.new(aimTarget.p,aimTarget.lookVector.unit*999);
  229. local _,pos=workspace:FindPartOnRay(ray,c);
  230. local dis=(aimTarget.p-pos).magnitude;
  231. 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);
  232. local rayPart=Instance.new('Part',rayModel);
  233. rayPart.Material='Neon';
  234. rayPart.FormFactor='Custom';
  235. rayPart.Anchored=true;
  236. rayPart.CanCollide=false;
  237. rayPart.Shape='Cylinder';
  238. rayPart.Size=Vector3.new(dis+400,17,17);
  239. rayPart.CFrame=rayCFrame;
  240. gast:Destroy();
  241. end);
  242. end;
  243.  
  244. if Debounces.isAttacking==false and Debounces.isMoving==false and Debounces.Debounce==false and Debounces.isJumping==false then
  245. setLerp(.8);
  246. elseif Debounces.isAttacking==false and Debounces.isMoving==true and Debounces.Debounce==false and Debounces.isSprinting==true and Debounces.isJumping==false then
  247. sine=tick()*28;
  248. human.WalkSpeed=400;
  249. lerpBoom();
  250. setLerp(.65);
  251. end;
  252. human.Changed:connect(function(prop)
  253. if prop=='MoveDirection'then
  254. if human.MoveDirection.magnitude>.02 then
  255. Debounces.isMoving=true;
  256. else
  257. Debounces.isMoving=false;
  258. end;
  259. end;
  260. end);
  261. uinps.InputBegan:connect(function(InputObj)
  262. if InputObj.KeyCode==Enum.KeyCode.Slash then
  263. local finishEvent=nil;
  264. Debounces.isTyping=true
  265. finishEvent=uinps.InputBegan:connect(function(InputObj)
  266. if InputObj.KeyCode==Enum.KeyCode.Return or InputObj.UserInputType==Enum.UserInputType.MouseButton1 then
  267. Debounces.isTyping=false;
  268. finishEvent:disconnect();
  269. end;
  270. end);
  271. end;
  272. end);
  273. mouse.KeyDown:connect(function(key)
  274. if key=='0'then
  275. Debounces.isSprinting=true;
  276. playSound(160248522,c.Torso);
  277. for i=1,3 do
  278. spawn(function()
  279. local e=Instance.new('Part',c);
  280. e.Size=Vector3.new(1,1,1);
  281. e.Material='Neon';
  282. e.Anchored=true;
  283. e.CFrame=c.HumanoidRootPart.CFrame*CFrame.Angles(0,0,-math.pi/2);
  284. e.CanCollide=false;
  285. local rm=Instance.new('SpecialMesh',e);
  286. rm.MeshType='FileMesh';
  287. rm.MeshId='rbxassetid://3270017';
  288. rm.Scale=Vector3.new(3.2,3.2,10);
  289. for x=1,30 do
  290. wait();
  291. rm.Scale=rm.Scale:lerp(Vector3.new(i*30,i*30,(4-i)*450),.1);
  292. e.Transparency=x/30+.5;
  293. end;
  294. end);
  295. end;
  296. c.HumanoidRootPart.Velocity=c.HumanoidRootPart.CFrame.lookVector*200;
  297. end;
  298. end);
  299. mouse.KeyUp:connect(function(key)
  300. if key=='0'then
  301. Debounces.isSprinting=false;
  302. end;
  303. end);
  304. mouse.KeyDown:connect(function(key)
  305. if key=='v'then
  306. playSound(446961725,c.Torso,math.random(90,120)/100);
  307. local oldPos=c.HumanoidRootPart.CFrame.p;
  308. local mHit=mouse.Hit.p;
  309. for i=1,2 do
  310. spawn(function()
  311. local pos
  312. if i==1 then pos=oldPos else pos=mHit end
  313. end);
  314. end;
  315. if Debounces.isMoving then
  316. 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));
  317. else
  318. c.HumanoidRootPart.CFrame=CFrame.new(mouse.Hit.p+Vector3.new(0,4,0),Vector3.new(oldPos.x,mouse.Hit.p.y+4,oldPos.z));
  319.  
  320. end;
  321. end;
  322. end);
  323. mouse.KeyDown:connect(function(key)
  324. if key=='r'then
  325. local pointTarget=mouse.Hit.p;
  326.  
  327.  
  328. for i=1,20 do
  329. wait();
  330. 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));
  331. end;
  332. wait();
  333. largegasterBlast(CFrame.new(pointTarget+Vector3.new(0,35,0),pointTarget));
  334. end;
  335. end);
  336. mouse.KeyDown:connect(function(key)
  337. if key=='f'then
  338. local pointTarget=mouse.Hit.p;
  339. for i=1,20 do
  340. wait();
  341.  
  342.  
  343. 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)));
  344. end;
  345. largegasterBlast(CFrame.new(c.HumanoidRootPart.CFrame.p+Vector3.new(0,50,0),pointTarget):toWorldSpace(CFrame.new(0,0,-25)));
  346. end;
  347. end);
  348. mouse.Button1Down:connect(function()
  349. Debounces.isFlash=true;
  350. end);
  351. mouse.Button1Up:connect(function()
  352. Debounces.isFlash=false;
  353. end);
  354. mouse.KeyDown:connect(function(key)
  355. if key=='j'then
  356. if music2.isPlaying then music2:Stop();else music2:Play();end;
  357. end;
  358. end);
  359. mouse.KeyDown:connect(function(key)
  360. if key=='l'then
  361. if music3.isPlaying then music3:Stop();else music3:Play();end;
  362. end;
  363. end);
  364. mouse.KeyDown:connect(function(key)
  365. if key=='o'then
  366. if music5.isPlaying then music4:Stop();else music5:Play();end;
  367. end;
  368. end);
  369. mouse.KeyDown:connect(function(key)
  370. if key=='e'then
  371.  
  372.  
  373. gasterBlast(c.Torso.CFrame.p+Vector3.new(math.sin(tick()*10)*10,12,math.cos(tick()*10)*10),mouse.Hit.p,true);
  374.  
  375.  
  376. end;
  377. end);
  378. mouse.KeyDown:connect(function(key)
  379. if key=='c'then
  380.  
  381.  
  382. largegasterBlast(c.Torso.CFrame.p+Vector3.new(math.sin(tick()*10)*10,12,math.cos(tick()*10)*10),mouse.Hit.p);
  383.  
  384.  
  385. end;
  386. end);
  387. mouse.KeyDown:connect(function(key)
  388. if key=='q'then
  389. eye.Transparency = 1
  390.  
  391. for i=1,5 do
  392. wait();
  393. gasterBlast(c.Torso.CFrame.p+Vector3.new(math.sin(tick()*10)*10,12,math.cos(tick()*10)*10),mouse.Hit.p);
  394.  
  395.  
  396. end;
  397. largegasterBlast(c.Torso.CFrame.p+Vector3.new(0,25,0),mouse.Hit.p);
  398. end;
  399. end);
  400. mouse.KeyDown:connect(function(key)
  401. if key=='t'then
  402.  
  403.  
  404. local pointTarget=mouse.Hit.p;
  405. for i=1,20 do
  406. 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);
  407.  
  408.  
  409. end;
  410. wait(.2);
  411. for i=1,10 do
  412. largegasterBlast(pointTarget+Vector3.new(math.sin(math.deg((360/20)*i))*25,20,math.cos(math.deg((360/20)*i))*25),pointTarget);
  413. end;
  414. end;
  415. end);
  416. human.StateChanged:connect(function(os,ns)
  417. if c.HumanoidRootPart.Velocity.Y<.1 and Debounces.isJumping==true and ns==Enum.HumanoidStateType.Landed then
  418. Debounces.isJumping=false;
  419. end;
  420. end);
  421. rs.RenderStepped:connect(function()
  422. Debounces.FPS=1/rs.RenderStepped:wait();
  423. if Debounces.FPS<30 then
  424. Debounces.FPS=30;
  425. end;
  426. if Debounces.isSprinting then
  427. lerpBoom();
  428. else
  429. noBoom();
  430. end;
  431. for _,v in pairs(rayModel:children())do
  432. v.Transparency=v.Transparency+.06/(Debounces.FPS/60);
  433. if v.Transparency>.99 then v:Destroy();return;end;
  434. v.CanCollide=true;
  435. local tParts=v:GetTouchingParts();
  436. v.CanCollide=false;
  437. local vCFrame=v.CFrame;
  438. v.Size=v.Size+Vector3.new(0,1,1)/(Debounces.FPS/60);
  439. v.CFrame=vCFrame;
  440. for _,x in pairs(tParts)do
  441. if x and x.Parent and x.Parent:FindFirstChild'Humanoid'and x.Parent.Humanoid:isA'Humanoid'and x.Parent~=c then
  442. x.Parent.Humanoid.Health=0;
  443. end;
  444. end;
  445. end;
  446. local FPSLerp=AnimStat.lerpSpeed/(Debounces.FPS/60);
  447. end);
Advertisement
Add Comment
Please, Sign In to add comment