GalaxyEggBRG

gaster

Jun 17th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.10 KB | None | 0 0
  1. -- Gaster <3
  2. -- Yup, Will Be 136kb Soon *cri*
  3.  
  4.  
  5.  
  6. dot = false
  7. des = false
  8. local ChatService = game:GetService("Chat")
  9. local player = game.Players.LocalPlayer
  10. char = player.Character
  11. hum = char.Humanoid
  12. torso = hum.Torso
  13. m=player:GetMouse()
  14. bb = Instance.new("BillboardGui",player.Character.Head)
  15. bb.Enabled = true
  16. bb.AlwaysOnTop = true
  17. bb.Size = UDim2.new(0,200,0,50)
  18. bb.StudsOffset = Vector3.new(0,1,0)
  19. gui=Instance.new("TextBox",bb)
  20. gui.Text = "* "
  21. gui.Size = UDim2.new(0,133,0,45)
  22. gui.Position=UDim2.new(0,57,0,-40)
  23. gui.TextColor3 = Color3.new(255,255,255)
  24. gui.BackgroundColor3=Color3.new(0,0,0)
  25. gui.TextWrapped = true
  26. gui.TextScaled = true
  27. gui.TextXAlignment = "Left"
  28. gui.TextYAlignment = "Top"
  29. gui.Visible = false
  30. gui.BorderColor3 = Color3.new(255,0,0)
  31.  
  32. gui1=Instance.new("TextButton",bb)
  33. gui1.Position=UDim2.new(0,5,0,-43)
  34. gui1.Size = UDim2.new(0,190,0,51)
  35.  
  36. gui1.TextColor3 = Color3.new(255,255,255)
  37. gui1.BackgroundColor3=Color3.new(0,0,0)
  38.  
  39. gui1.Visible = false
  40. img = Instance.new("ImageLabel",bb)
  41. img.Size = UDim2.new(0,46,0,47)
  42. img.Position = UDim2.new(0,10,0,-41)
  43. img.Image = "rbxassetid://389423540"
  44. img.BorderColor3 = Color3.new(0,0,0)
  45. img.Visible = false
  46. asd = Instance.new("Sound",player.Character.Torso)
  47. asd.SoundId = "http://www.roblox.com/asset/?id = 388981936"
  48.  
  49. asd1 = Instance.new("Sound",player.Character.Torso)
  50. asd1.SoundId = "http://www.roblox.com/asset/?id = 388981936"
  51.  
  52. s1 = Instance.new("Sound",player.Character.Torso)
  53. s1.SoundId = "http://www.roblox.com/asset/?id = 388975914"
  54.  
  55. sb1 = Instance.new("Sound",player.Character.Torso)
  56. sb1.SoundId = "http://www.roblox.com/asset/?id = 388975914"
  57.  
  58. s2 = Instance.new("Sound",player.Character.Torso)
  59. s2.SoundId = "http://www.roblox.com/asset/?id = 388981201"
  60.  
  61. sb2 = Instance.new("Sound",player.Character.Torso)
  62. sb2.SoundId = "http://www.roblox.com/asset/?id = 388981201"
  63.  
  64. s3 = Instance.new("Sound",player.Character.Torso)
  65. s3.SoundId = "http://www.roblox.com/asset/?id = 389412974"
  66.  
  67. sb3 = Instance.new("Sound",player.Character.Torso)
  68. sb3.SoundId = "http://www.roblox.com/asset/?id = 389412974"
  69.  
  70.  
  71. asd2 = Instance.new("Sound",player.Character.Torso)
  72. asd2.SoundId = "http://www.roblox.com/asset/?id = 366168126"
  73. asd2.Looped = true
  74. asd3 = Instance.new("Sound",player.Character.Torso)
  75. asd3.SoundId = "http://www.roblox.com/asset/?id = 359261051"
  76. asd3.Looped = true
  77. asd4 = Instance.new("Sound",player.Character.Torso)
  78. asd4.SoundId = "http://www.roblox.com/asset/?id = 330630853"
  79. asd4.Looped = false
  80. asd5 = Instance.new("Sound",player.Character.Torso)
  81. asd5.SoundId = "http://www.roblox.com/asset/?id = 0"
  82. asd5.Looped = true
  83. dunkd = Instance.new("Sound",player.Character.Torso)
  84. dunkd.SoundId = "http://www.roblox.com/asset/?id = 333078694"
  85. dunkd.Looped = false
  86. function play(play)
  87. s = math.rand(1,7)
  88. if s = 1 then do
  89. asd:Play()
  90. elseif s = 2 then do
  91. s1:Play()
  92. elseif s = 3 then do
  93. sb1:Play()
  94. elseif s = 4 then do
  95. s2:Play()
  96. elseif s = 5 then do
  97. sb2:Play()
  98. elseif s = 6 then do
  99. s3:Play()
  100. elseif s = 7 then do
  101. sb3:Play()
  102. end
  103. eye = Instance.new("Part",player.Character)
  104. eye.BrickColor = BrickColor.new("Black")
  105. eye.Material = "Neon"
  106. eye.FormFactor = 3
  107. eye.Shape = "Ball"
  108. eye.Size = Vector3.new(0.37,0.37,0.1)
  109. weld = Instance.new("Weld",eye)
  110. weld.Part0 = eye
  111. weld.Part1 = player.Character.Head
  112. weld.C0 = CFrame.new(0.1,-0.2,0.45)
  113. eye.Transparency = 1
  114. -- listen for their chatting
  115. player.Chatted:connect(function(message)
  116. a = string.len(message)
  117. gui.Text = "* "
  118. gui.Visible = true
  119. gui1.Visible = true
  120. des = false
  121. img.Visible = true
  122. print(a)
  123. if dot == false then
  124. for i = 1,string.len(message) do wait(0.07)
  125. gui.Text =gui.Text..message:sub(i,i)
  126.  
  127. play()
  128. end
  129. end
  130.  
  131. des = true
  132. end)
  133. m.KeyDown:connect(function(k)
  134. if k == "l" then
  135. asd2:Play()
  136. eye.Transparency = 0
  137.  
  138. end
  139. end)
  140. m.KeyDown:connect(function(k)
  141. if k == "k" then
  142. eye.Transparency = 1
  143. asd3:Play()
  144. end
  145. end)
  146. m.KeyDown:connect(function(k)
  147. if k == "j" then
  148. eye.Transparency = 0
  149. asd4:Play()
  150. end
  151. end)
  152. m.KeyDown:connect(function(k)
  153. if k == "p" then
  154. eye.Transparency = 1
  155. asd5:Play()
  156. end
  157. end)
  158. m.KeyDown:connect(function(k)
  159. if k == "z" then
  160.  
  161. img.Image = "rbxassetid://389423480"
  162. end
  163. end)
  164. m.KeyDown:connect(function(k)
  165. if k == "n" then
  166. img.Image = "rbxassetid://389423540"
  167. end
  168. end)
  169. m.KeyDown:connect(function(k)
  170. if k == "b" then
  171. img.Image = "rbxassetid://389423622"
  172. end
  173. end)
  174. m.KeyDown:connect(function(k)
  175. if k == "m" then
  176. img.Image = "rbxassetid://389423678"
  177. end
  178. end)
  179. m.KeyDown:connect(function(k)
  180. if k == "h" then
  181. img.Image = "rbxassetid://389423917"
  182. end
  183. end)
  184. m.KeyDown:connect(function(k)
  185. if k == "x" then
  186. if des == true then
  187. gui.Visible = false
  188. gui.Text = "! "
  189. gui1.Visible = false
  190. img.Visible = false
  191. end
  192. end
  193. end)
  194. m.KeyDown:connect(function(k)
  195. if k == ";" then
  196. asd3:Stop()
  197. asd2:Stop()
  198. asd4:Stop()
  199. dunkd:Stop()
  200. eye.Transparency = 1
  201. asd5:Stop()
  202. end
  203. end)
  204. m.KeyDown:connect(function(k)
  205. if k == "y" then
  206. img.Image = "rbxassetid://378198656"
  207. end
  208. end)
  209. -- my god...
  210. -- Suck_HiyaThere moves to arizona
  211.  
  212. pls=game:GetService'Players';
  213. rs=game:GetService'RunService';
  214. uinps=game:GetService'UserInputService';
  215. lp=pls.LocalPlayer;
  216. mouse=lp:GetMouse();
  217. c=lp.Character;
  218. rayModel=Instance.new('Model',c);
  219. human=c.Humanoid;
  220. Cone=nil;
  221. human.MaxHealth=50000000;
  222. wait();
  223. human.Health=50000000;
  224. c.Health:Destroy();
  225. Debounces={
  226. FPS=0;
  227. isAttacking=false;
  228. isMoving=false;
  229. isSprinting=false;
  230. Debounce=false;
  231. isTyping=false;
  232. isJumping=false;
  233. isFlash=false;
  234. };
  235. numLerp=function(start,goal,alpha)
  236. return(((goal-start)*alpha)+start);
  237. end;
  238. CFrameZero=function()
  239. return CFrame.new(Vector3.new());
  240. end;
  241. local function a()
  242. local t=tick();
  243. local l=t%1*3;
  244. local t=.5*math.pi*(l%1);
  245. if l<1 then
  246. return Color3.new(1,1-math.cos(t),1-math.sin(t));
  247. elseif l<2 then
  248. return Color3.new(1-math.sin(t),1,1-math.cos(t));
  249. else
  250. return Color3.new(1-math.cos(t),1-math.sin(t),1);
  251. end;
  252. end;
  253. rad=function(value)
  254. return math.rad(value);
  255. end;
  256. CFAngles=function(Vector)
  257. return CFrame.Angles(rad(Vector.x),rad(Vector.y),rad(Vector.z));
  258. end;
  259. AnimStat={
  260. lerpSpeed=.2;
  261. lerpSpeed2=.35;
  262. lerpTween=0;
  263. };
  264. Joints={
  265. c.HumanoidRootPart.RootJoint;
  266. c.Torso.Neck;
  267. c.Torso['Left Shoulder'];
  268. c.Torso['Right Shoulder'];
  269. c.Torso['Left Hip'];
  270. c.Torso['Right Hip'];
  271. };
  272. prepareCharacter=function()
  273. music=Instance.new('Sound',c.HumanoidRootPart);
  274. music.SoundId='rbxassetid://394144904';
  275. music.Looped=true;
  276. music.Volume=.6;
  277. music2=Instance.new('Sound',c);
  278. music2.SoundId='rbxassetid://259613634';
  279. music2.Looped=true;
  280. music2.Volume=1;
  281. music3=Instance.new('Sound',c.HumanoidRootPart);
  282. music3.SoundId='rbxassetid://266530326';
  283. music3.Looped=true;
  284. music3.Volume=1;
  285. music4=Instance.new('Sound',c.HumanoidRootPart);
  286. music4.SoundId='rbxassetid://155738252';
  287. music4.Looped=true;
  288. music4.Volume=1;
  289. music5=Instance.new('Sound',c.HumanoidRootPart);
  290. music5.SoundId='rbxassetid://215391212';
  291. music5.Looped=true;
  292. music5.Volume=1;
  293. human.WalkSpeed=0;
  294. human.JumpPower=0;
  295. end;
  296. triWave=function(x)
  297. local pi2=math.pi/2;
  298. return math.abs((x/pi2)%4-2)-1;
  299. end;
  300. setLerp=function(speed)
  301. AnimStat.lerpSpeed=speed;
  302. end;
  303. setTween=function(tween)
  304. AnimStat.lerpTween=tween;
  305. end;
  306. playSound=function(id,part,vol,pitch)
  307. local vol=vol or 1;
  308. local pitch=pitch or 1;
  309. local x=Instance.new('Sound',part);
  310. x.Volume=vol;
  311. x.Pitch=pitch;
  312. x.SoundId='rbxassetid://'..id;
  313. spawn(function()
  314. wait();
  315. x:Play();
  316. wait(x.TimeLength+.2);
  317. x:Destroy();
  318. end);
  319. end;
  320. lerpBoom=function()
  321. if Cone then
  322. Cone.CFrame=CFrame.new(c.HumanoidRootPart.CFrame.p,c.HumanoidRootPart.CFrame.p+c.HumanoidRootPart.Velocity)*CFrame.Angles(-math.pi/2,0,0);
  323. cMesh.Scale=Vector3.new(20,20+c.HumanoidRootPart.Velocity.magnitude/10,20);
  324. Cone.Transparency=1-c.HumanoidRootPart.Velocity.magnitude/1000;
  325. else
  326. Cone=Instance.new('Part',c);
  327. Cone.Anchored=true;
  328. Cone.CanCollide=false;
  329. Cone.Transparency=math.random(50,70)/100;
  330. Cone.Size=Vector3.new(1,1,1);
  331. Cone.CFrame=CFrame.new(c.HumanoidRootPart.CFrame.p,c.HumanoidRootPart.CFrame.p+c.HumanoidRootPart.Velocity)*CFrame.Angles(-math.pi/2,0,0);
  332. cMesh=Instance.new('SpecialMesh',Cone);
  333. cMesh.MeshId='rbxassetid://1033714';
  334. cMesh.Scale=Vector3.new(20,50,20);
  335. end;
  336. end;
  337. noBoom=function()
  338. if Cone then local x=Cone Cone=nil;
  339. for i=1,20 do
  340. wait();
  341. x.Mesh.Scale=x.Mesh.Scale+Vector3.new(-.5,1,-.5);
  342. x.Transparency=x.Transparency+1/30;
  343. end;
  344. end;
  345. end;
  346. gasterBlast=function(tCFrame,aimPos,charge)
  347. local aimTarget;
  348. if aimPos then
  349. aimTarget=CFrame.new(tCFrame,aimPos);
  350. else
  351. aimTarget=tCFrame;
  352. end;
  353. local gast=Instance.new('Part',c);
  354. gast.Size=Vector3.new(12,.2,12);
  355. gast.CanCollide=false;
  356. gast.Anchored=true;
  357. gast.Transparency=1;
  358. if charge then
  359. playSound(400523331,gast,math.random(90,110)/100);
  360. end;
  361. wait();
  362. for i=1,2 do
  363. local decal=Instance.new('Decal',gast);
  364. decal.Texture='rbxassetid://333659455';
  365. if i==1 then
  366. decal.Face=Enum.NormalId.Top;
  367. else
  368. decal.Face=Enum.NormalId.Bottom;
  369. end;
  370. end;
  371. gast.CFrame=CFrame.new(aimTarget.p-Vector3.new(math.sin(tick()*10)*10,20,math.cos(tick()*10)*10));
  372. spawn(function()
  373. local tarCFrame=gast.CFrame;
  374. local isLooping=true;
  375. spawn(function()
  376. while rs.RenderStepped:wait()and isLooping do
  377. gast.CFrame=gast.CFrame:lerp(tarCFrame,.6/(Debounces.FPS/60));
  378. end;
  379. end);
  380. for i=1,30 do
  381. wait();
  382. tarCFrame=gast.CFrame:lerp(aimTarget,.24);
  383. end;
  384. playSound(340722848,gast,math.random(90,110)/100);
  385. isLooping=false;
  386. wait(.08);
  387. local ray=Ray.new(aimTarget.p,aimTarget.lookVector.unit*999);
  388. local _,pos=workspace:FindPartOnRay(ray,c);
  389. local dis=(aimTarget.p-pos).magnitude;
  390. 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);
  391. local rayPart=Instance.new('Part',rayModel);
  392. rayPart.Material='Neon';
  393. rayPart.FormFactor='Custom';
  394. rayPart.Anchored=true;
  395. rayPart.CanCollide=false;
  396. rayPart.Color=Color3.new(255,255,255)
  397. rayPart.Shape='Cylinder';
  398. rayPart.Size=Vector3.new(dis+400,8,8);
  399. rayPart.CFrame=rayCFrame;
  400. gast:Destroy();
  401. end);
  402. end;
  403. largegasterBlast=function(tCFrame,aimPos)
  404. local aimTarget;
  405. if aimPos then
  406. aimTarget=CFrame.new(tCFrame,aimPos);
  407. else
  408. aimTarget=tCFrame;
  409. end;
  410. local gast=Instance.new('Part',c);
  411. gast.Size=Vector3.new(25,.2,25);
  412. gast.CanCollide=false;
  413. gast.Anchored=true;
  414. gast.Transparency=1;
  415. playSound(400523331,gast,math.random(85,97)/100);
  416. wait();
  417. for i=1,2 do
  418. local decal=Instance.new('Decal',gast);
  419. decal.Texture='rbxassetid://333659455';
  420. if i==1 then
  421. decal.Face=Enum.NormalId.Top;
  422. else
  423. decal.Face=Enum.NormalId.Bottom;
  424. end;
  425. end;
  426. gast.CFrame=CFrame.new(aimTarget.p-Vector3.new(math.sin(tick()*10)*10,20,math.cos(tick()*10)*10));
  427. spawn(function()
  428. local tarCFrame=gast.CFrame;
  429. local isLooping=true;
  430. spawn(function()
  431. while rs.RenderStepped:wait()and isLooping do
  432. gast.CFrame=gast.CFrame:lerp(tarCFrame,.6/(Debounces.FPS/60));
  433. end;
  434. end);
  435. for i=1,40 do
  436. wait();
  437. tarCFrame=gast.CFrame:lerp(aimTarget,.18);
  438. end;
  439. playSound(340722848,gast,math.random(80,95)/100);
  440. isLooping=false;
  441. wait(.08);
  442. local ray=Ray.new(aimTarget.p,aimTarget.lookVector.unit*999);
  443. local _,pos=workspace:FindPartOnRay(ray,c);
  444. local dis=(aimTarget.p-pos).magnitude;
  445. 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);
  446. local rayPart=Instance.new('Part',rayModel);
  447. rayPart.Material='Neon';
  448. rayPart.FormFactor='Custom';
  449. rayPart.Anchored=true;
  450. rayPart.CanCollide=false;
  451. rayPart.Shape='Cylinder';
  452. rayPart.Size=Vector3.new(dis+400,17,17);
  453. rayPart.CFrame=rayCFrame;
  454. gast:Destroy();
  455. end);
  456. end;
  457.  
  458. if Debounces.isAttacking==false and Debounces.isMoving==false and Debounces.Debounce==false and Debounces.isJumping==false then
  459. setLerp(.8);
  460. elseif Debounces.isAttacking==false and Debounces.isMoving==true and Debounces.Debounce==false and Debounces.isSprinting==true and Debounces.isJumping==false then
  461. sine=tick()*28;
  462. human.WalkSpeed=400;
  463. lerpBoom();
  464. setLerp(.65);
  465. end;
  466. human.Changed:connect(function(prop)
  467. if prop=='MoveDirection'then
  468. if human.MoveDirection.magnitude>.02 then
  469. Debounces.isMoving=true;
  470. else
  471. Debounces.isMoving=false;
  472. end;
  473. end;
  474. end);
  475. uinps.InputBegan:connect(function(InputObj)
  476. if InputObj.KeyCode==Enum.KeyCode.Slash then
  477. local finishEvent=nil;
  478. Debounces.isTyping=true
  479. finishEvent=uinps.InputBegan:connect(function(InputObj)
  480. if InputObj.KeyCode==Enum.KeyCode.Return or InputObj.UserInputType==Enum.UserInputType.MouseButton1 then
  481. Debounces.isTyping=false;
  482. finishEvent:disconnect();
  483. end;
  484. end);
  485. end;
  486. end);
  487. mouse.KeyDown:connect(function(key)
  488. if key=='0'then
  489. Debounces.isSprinting=true;
  490. playSound(160248522,c.Torso);
  491. for i=1,3 do
  492. spawn(function()
  493. local e=Instance.new('Part',c);
  494. e.Size=Vector3.new(1,1,1);
  495. e.Material='Neon';
  496. e.Color=a();
  497. e.Anchored=true;
  498. e.CFrame=c.HumanoidRootPart.CFrame*CFrame.Angles(0,0,-math.pi/2);
  499. e.CanCollide=false;
  500. local rm=Instance.new('SpecialMesh',e);
  501. rm.MeshType='FileMesh';
  502. rm.MeshId='rbxassetid://3270017';
  503. rm.Scale=Vector3.new(3.2,3.2,10);
  504. for x=1,30 do
  505. wait();
  506. rm.Scale=rm.Scale:lerp(Vector3.new(i*30,i*30,(4-i)*450),.1);
  507. e.Transparency=x/30+.5;
  508. end;
  509. end);
  510. end;
  511. c.HumanoidRootPart.Velocity=c.HumanoidRootPart.CFrame.lookVector*200;
  512. end;
  513. end);
  514. mouse.KeyUp:connect(function(key)
  515. if key=='0'then
  516. Debounces.isSprinting=false;
  517. end;
  518. end);
  519. mouse.KeyDown:connect(function(key)
  520. if key=='v'then
  521. playSound(201858087,c.Torso,math.random(90,120)/100);
  522. local oldPos=c.HumanoidRootPart.CFrame.p;
  523. local mHit=mouse.Hit.p;
  524. for i=1,2 do
  525. spawn(function()
  526. local pos
  527. if i==1 then pos=oldPos else pos=mHit end
  528. local p=Instance.new('Part',workspace);
  529. p.Anchored=true;
  530. p.CanCollide=false;
  531. p.Color=a();
  532. p.FormFactor='Custom';
  533. p.CFrame=CFrame.new(pos+Vector3.new(0,500,0));
  534. p.Transparency=.4;
  535. p.Size=Vector3.new(20,1000,20);
  536. for i=1,20 do
  537. wait();
  538. p.Transparency=.4+(i/10)*.6;
  539. p.Size=Vector3.new(20-i*1.5,1000,20-i*1.5);
  540. p.CFrame=CFrame.new(pos+Vector3.new(0,500,0));
  541. end;
  542. p:Destroy();
  543. end);
  544. end;
  545. if Debounces.isMoving then
  546. 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));
  547. else
  548. c.HumanoidRootPart.CFrame=CFrame.new(mouse.Hit.p+Vector3.new(0,4,0),Vector3.new(oldPos.x,mouse.Hit.p.y+4,oldPos.z));
  549. end;
  550. end;
  551. end);
  552. mouse.KeyDown:connect(function(key)
  553. if key=='r'then
  554. local pointTarget=mouse.Hit.p;
  555. for i=1,20 do
  556. wait();
  557. 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));
  558. end;
  559. wait();
  560. largegasterBlast(CFrame.new(pointTarget+Vector3.new(0,35,0),pointTarget));
  561. end;
  562. end);
  563. mouse.KeyDown:connect(function(key)
  564. if key=='f'then
  565. local pointTarget=mouse.Hit.p;
  566. for i=1,20 do
  567. wait();
  568. 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)));
  569. end;
  570. largegasterBlast(CFrame.new(c.HumanoidRootPart.CFrame.p+Vector3.new(0,50,0),pointTarget):toWorldSpace(CFrame.new(0,0,-25)));
  571. end;
  572. end);
  573. mouse.Button1Down:connect(function()
  574. Debounces.isFlash=true;
  575. end);
  576. mouse.Button1Up:connect(function()
  577. Debounces.isFlash=false;
  578. end);
  579. mouse.KeyDown:connect(function(key)
  580. if key=='k'then
  581. if music.isPlaying then music:Stop();else music:Play();end;
  582. end;
  583. end);
  584. mouse.KeyDown:connect(function(key)
  585. if key=='j'then
  586. if music2.isPlaying then music2:Stop();else music2:Play();end;
  587. end;
  588. end);
  589. mouse.KeyDown:connect(function(key)
  590. if key=='l'then
  591. if music3.isPlaying then music3:Stop();else music3:Play();end;
  592. end;
  593. end);
  594. mouse.KeyDown:connect(function(key)
  595. if key=='p'then
  596. if music4.isPlaying then music4:Stop();else music4:Play();end;
  597. end;
  598. end);
  599. mouse.KeyDown:connect(function(key)
  600. if key=='o'then
  601. if music5.isPlaying then music4:Stop();else music5:Play();end;
  602. end;
  603. end);
  604. mouse.KeyDown:connect(function(key)
  605. if key=='e'then
  606. gasterBlast(c.Torso.CFrame.p+Vector3.new(math.sin(tick()*10)*10,12,math.cos(tick()*10)*10),mouse.Hit.p,true);
  607. end;
  608. end);
  609. mouse.KeyDown:connect(function(key)
  610. if key=='c'then
  611. largegasterBlast(c.Torso.CFrame.p+Vector3.new(math.sin(tick()*10)*10,12,math.cos(tick()*10)*10),mouse.Hit.p);
  612. end;
  613. end);
  614. mouse.KeyDown:connect(function(key)
  615. if key=='q'then
  616. for i=1,5 do
  617. wait();
  618. gasterBlast(c.Torso.CFrame.p+Vector3.new(math.sin(tick()*10)*10,12,math.cos(tick()*10)*10),mouse.Hit.p);
  619. end;
  620. largegasterBlast(c.Torso.CFrame.p+Vector3.new(0,25,0),mouse.Hit.p);
  621. end;
  622. end);
  623. mouse.KeyDown:connect(function(key)
  624. if key=='t'then
  625. local pointTarget=mouse.Hit.p;
  626. for i=1,20 do
  627. 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);
  628. end;
  629. wait(.2);
  630. for i=1,10 do
  631. largegasterBlast(pointTarget+Vector3.new(math.sin(math.deg((360/20)*i))*25,20,math.cos(math.deg((360/20)*i))*25),pointTarget);
  632. end;
  633. end;
  634. end);
  635. human.StateChanged:connect(function(os,ns)
  636. if c.HumanoidRootPart.Velocity.Y<.1 and Debounces.isJumping==true and ns==Enum.HumanoidStateType.Landed then
  637. Debounces.isJumping=false;
  638. end;
  639. end);
  640. rs.RenderStepped:connect(function()
  641. Debounces.FPS=1/rs.RenderStepped:wait();
  642. if Debounces.FPS<30 then
  643. Debounces.FPS=30;
  644. end;
  645. if Debounces.isSprinting then
  646. lerpBoom();
  647. else
  648. noBoom();
  649. end;
  650. for _,v in pairs(rayModel:children())do
  651. v.Transparency=v.Transparency+.06/(Debounces.FPS/60);
  652. if v.Transparency>.99 then v:Destroy();return;end;
  653. v.CanCollide=true;
  654. local tParts=v:GetTouchingParts();
  655. v.CanCollide=false;
  656. local vCFrame=v.CFrame;
  657. v.Size=v.Size+Vector3.new(0,1,1)/(Debounces.FPS/60);
  658. v.CFrame=vCFrame;
  659. for _,x in pairs(tParts)do
  660. if x and x.Parent and x.Parent:FindFirstChild'Humanoid'and x.Parent.Humanoid:isA'Humanoid'and x.Parent~=c then
  661. x.Parent.Humanoid:TakeDamage(10000000,20000000);
  662. end;
  663. end;
  664. end;
  665. local FPSLerp=AnimStat.lerpSpeed/(Debounces.FPS/60);
  666. end);
  667.  
  668. local verlet = {}
  669. verlet.step_time = 1 / 50
  670. verlet.gravity = Vector3.new(0, -10, 0)
  671.  
  672. local char = game.Players.LocalPlayer.Character
  673. local torso = char:WaitForChild("Torso")
  674. local parts = {}
  675. local render = game:GetService("RunService").RenderStepped
  676.  
  677. wait(2)
  678.  
  679. local point = {}
  680. local link = {}
  681. local rope = {}
  682.  
  683. local function ccw(A,B,C)
  684. return (C.y-A.y) * (B.x-A.x) > (B.y-A.y) * (C.x-A.x)
  685. end
  686.  
  687. local function intersect(A,B,C,D)
  688. return ccw(A,C,D) ~= ccw(B,C,D) and ccw(A,B,C) ~= ccw(A,B,D)
  689. end
  690.  
  691. local function vec2(v)
  692. return Vector2.new(v.x, v.z)
  693. end
  694.  
  695. function point:step()
  696. if not self.fixed then
  697. local derivative = (self.position - self.last_position) * 0.95
  698. self.last_position = self.position
  699. self.position = self.position + derivative + (self.velocity * verlet.step_time ^ 2)
  700. --[[local torsoP = torso.CFrame * CFrame.new(-1, 0, 0.5)
  701. local torsoE = torso.CFrame * CFrame.new(1, 0, 0.5)
  702. local pointE = self.position + torso.CFrame.lookVector * 100
  703. local doIntersect = intersect(vec2(torsoP.p), vec2(torsoE.p), vec2(self.position), vec2(pointE))
  704. if not doIntersect then
  705. self.postition = self.position - torso.CFrame.lookVector * 10
  706. end]]
  707. end
  708. end
  709.  
  710. function link:step()
  711. for i = 1, 1 do
  712. local distance = self.point1.position - self.point2.position
  713. local magnitude = distance.magnitude
  714. local differance = (self.length - magnitude) / magnitude
  715. local translation = ((self.point1.fixed or self.point2.fixed) and 1 or 0.6) * distance * differance
  716. if not self.point1.fixed then
  717. self.point1.position = self.point1.position + translation
  718. end
  719. if not self.point2.fixed then
  720. self.point2.position = self.point2.position - translation
  721. end
  722. end
  723. end
  724.  
  725. function verlet.new(class, a, b, c)
  726. if class == "Point" then
  727. local new = {}
  728. setmetatable(new, {__index = point})
  729. new.class = class
  730. new.position = a or Vector3.new()
  731. new.last_position = new.position
  732. new.velocity = verlet.gravity
  733. new.fixed = false
  734. return new
  735. elseif class == "Link" then
  736. local new = {}
  737. setmetatable(new, {__index = link})
  738. new.class = class
  739. new.point1 = a
  740. new.point2 = b
  741. new.length = c or (a.position - b.position).magnitude
  742. return new
  743. elseif class == "Rope" then
  744. local new = {}
  745. setmetatable(new, {__index = link})
  746. new.class = class
  747. new.start_point = a
  748. new.finish_point = b
  749. new.points = {}
  750. new.links = {}
  751. local inc = (b - a) / 10
  752. for i = 0, 10 do
  753. table.insert(new.points, verlet.new("Point", a + (i * inc)))
  754. end
  755. for i = 2, #new.points do
  756. table.insert(new.links, verlet.new("Link", new.points[i - 1], new.points[i]))
  757. end
  758. return new
  759. end
  760. end
  761.  
  762. local tris = {}
  763. local triParts = {}
  764.  
  765. local function GetDiscoColor(hue)
  766. local section = hue % 1 * 3
  767. local secondary = 0.5 * math.pi * (section % 1)
  768. if section < 1 then
  769. return Color3.new(0, 0, 0)
  770. elseif section < 2 then
  771. return Color3.new(0, 0, 0)
  772. else
  773. return Color3.new(0, 0, 0)
  774. end
  775. end
  776.  
  777. local function setupPart(part)
  778. part.Anchored = true
  779. part.FormFactor = 3
  780. part.CanCollide = false
  781. part.TopSurface = 10
  782. part.BottomSurface = 10
  783. part.LeftSurface = 10
  784. part.RightSurface = 10
  785. part.FrontSurface = 10
  786. part.BackSurface = 10
  787. part.Material = "Neon"
  788. local m = Instance.new("SpecialMesh", part)
  789. m.MeshType = "Wedge"
  790. m.Scale = Vector3.new(0.2, 1, 1)
  791. return part
  792. end
  793.  
  794. local function CFrameFromTopBack(at, top, back)
  795. local right = top:Cross(back)
  796. return CFrame.new(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  797. end
  798.  
  799. local function drawTri(parent, a, b, c)
  800. local this = {}
  801. local mPart1 = table.remove(triParts, 1) or setupPart(Instance.new("Part"))
  802. local mPart2 = table.remove(triParts, 1) or setupPart(Instance.new("Part"))
  803. function this:Set(a, b, c)
  804. local ab, bc, ca = b-a, c-b, a-c
  805. local abm, bcm, cam = ab.magnitude, bc.magnitude, ca.magnitude
  806. local edg1 = math.abs(0.5 + ca:Dot(ab)/(abm*abm))
  807. local edg2 = math.abs(0.5 + ab:Dot(bc)/(bcm*bcm))
  808. local edg3 = math.abs(0.5 + bc:Dot(ca)/(cam*cam))
  809. if edg1 < edg2 then
  810. if edg1 >= edg3 then
  811. a, b, c = c, a, b
  812. ab, bc, ca = ca, ab, bc
  813. abm = cam
  814. end
  815. else
  816. if edg2 < edg3 then
  817. a, b, c = b, c, a
  818. ab, bc, ca = bc, ca, ab
  819. abm = bcm
  820. else
  821. a, b, c = c, a, b
  822. ab, bc, ca = ca, ab, bc
  823. abm = cam
  824. end
  825. end
  826.  
  827. local len1 = -ca:Dot(ab)/abm
  828. local len2 = abm - len1
  829. local width = (ca + ab.unit*len1).magnitude
  830.  
  831. local maincf = CFrameFromTopBack(a, ab:Cross(bc).unit, -ab.unit)
  832.  
  833. if len1 > 0.2 then
  834. mPart1.Parent = parent
  835. mPart1.Size = Vector3.new(0.2, width, len1)
  836. mPart1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  837. else
  838. mPart1.Parent = nil
  839. end
  840.  
  841. if len2 > 0.2 then
  842. mPart2.Parent = parent
  843. mPart2.Size = Vector3.new(0.2, width, len2)
  844. mPart2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  845. else
  846. mPart2.Parent = nil
  847. end
  848. end
  849. function this:SetProperty(prop, value)
  850. mPart1[prop] = value
  851. mPart2[prop] = value
  852. end
  853. this:Set(a, b, c)
  854. function this:Destroy()
  855. mPart1:Destroy()
  856. mPart2:Destroy()
  857. end
  858. this.p1 = mPart1
  859. this.p2 = mPart2
  860. this.p1.BrickColor = BrickColor.new(GetDiscoColor(math.noise(0.5, 0.5, this.p1.CFrame.Y * 0.5 + time())))
  861. this.p2.BrickColor = BrickColor.new(GetDiscoColor(math.noise(0.5, 0.5, this.p2.CFrame.Y * 0.5 + time())))
  862. return this
  863. end
  864.  
  865. function verlet.draw(object, id)
  866. if object.class == "Point" then
  867. local part = parts[id]
  868. part.BrickColor = BrickColor.new(107, 0, 107)
  869. part.Transparency = 0
  870. part.formFactor = 3
  871. part.Anchored = true
  872. part.CanCollide = false
  873. part.TopSurface = 0
  874. part.BottomSurface = 0
  875. part.Size = Vector3.new(0.35, 0.35, 0.35)
  876. part.Material = "Neon"
  877. part.CFrame = CFrame.new(object.position)
  878. part.Parent = torso
  879. return part
  880. elseif object.class == "Link" then
  881. local part = parts[id]
  882. local dist = (object.point1.position - object.point2.position).magnitude
  883. part.Size = Vector3.new(0.2, 0.2, dist)
  884. part.CFrame = CFrame.new(object.point1.position, object.point2.position) * CFrame.new(0, 0, dist * -0.5)
  885. part.Parent = torso
  886. return part
  887. end
  888. end
  889.  
  890. function verlet.clear()
  891. for _, v in pairs(workspace:GetChildren()) do
  892. if v.Name == "Part" then
  893. v:Destroy()
  894. end
  895. end
  896. end
  897.  
  898. local points = {}
  899. local links = {}
  900.  
  901. for x = 0, 2 do
  902. points[x] = {}
  903. for y = 0, 3 do
  904. points[x][y] = verlet.new("Point", torso.Position + Vector3.new(x * 0.8 - 2, 2 - y * 0.8, 5 + y * 0.4))
  905. points[x][y].fixed = y == 0
  906. end
  907. end
  908.  
  909. for x = 1, 2 do
  910. for y = 0, 3 do
  911. links[#links + 1] = verlet.new("Link", points[x][y], points[x - 1][y], 1 + y * 0.08)
  912. end
  913. end
  914.  
  915. for x = 0, 2 do
  916. for y = 1, 3 do
  917. links[#links + 1] = verlet.new("Link", points[x][y], points[x][y - 1], 1.2 + y * 0.03)
  918. end
  919. end
  920.  
  921. render:connect(function()
  922. for x = 0, 2 do
  923. for y = 0, 3 do
  924. if y == 0 then
  925. points[x][y].position = (torso.CFrame * CFrame.new(x * 1 - 1, 1, 0.5)).p
  926. else
  927. points[x][y]:step()
  928. end
  929. end
  930. end
  931. for i = 1, #links do
  932. links[i]:step()
  933. end
  934. for i = 1, #tris do
  935. triParts[#triParts + 1] = tris[i].p1
  936. triParts[#triParts + 1] = tris[i].p2
  937. end
  938. tris = {}
  939. for x = 1, 2 do
  940. for y = 1, 3 do
  941. tris[#tris + 1] = drawTri(torso, points[x - 1][y - 1].position, points[x - 1][y].position, points[x][y - 1].position)
  942. tris[#tris + 1] = drawTri(torso, points[x][y].position, points[x - 1][y].position, points[x][y - 1].position)
  943. end
  944. end
  945. end)
Add Comment
Please, Sign In to add comment