Blueisim

Asriel

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