Advertisement
DerpGuyHD

Undertale Sans

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