Advertisement
DarkScriptZEditors

Untitled

Nov 21st, 2018
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.04 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code by Mokiros")
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  51. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67. local Mouse = Player:GetMouse()
  68. local UIS = game:GetService("UserInputService")
  69. local input = function(io,a)
  70. if a then return end
  71. --Since InputObject is a client-side instance, we create and pass table instead
  72. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  73. end
  74. UIS.InputBegan:Connect(input)
  75. UIS.InputEnded:Connect(input)
  76. local h,t
  77. --Give the server mouse data 30 times every second, but only if the values changed
  78. --If player is not moving their mouse, client won't fire events
  79. while wait(1/30) do
  80. if h~=Mouse.Hit or t~=Mouse.Target then
  81. h,t=Mouse.Hit,Mouse.Target
  82. Event:FireServer({isMouse=true,Target=t,Hit=h})
  83. end
  84. end]==],Player.Character)
  85.  
  86. ----Sandboxed game object that allows the usage of client-side methods and services
  87. --Real game object
  88. local _rg = game
  89.  
  90. --Metatable for fake service
  91. local fsmt = {
  92. __index = function(self,k)
  93. local s = rawget(self,"_RealService")
  94. if s then
  95. return typeof(s[k])=="function"
  96. and function(_,...)return s[k](s,...)end or s[k]
  97. end
  98. end,
  99. __newindex = function(self,k,v)
  100. local s = rawget(self,"_RealService")
  101. if s then s[k]=v end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return rawget(self,s) or _rg:GetService(s)
  113. end,
  114. Players = FakeService({
  115. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. RunService = FakeService({
  120. _btrs = {},
  121. RenderStepped = _rg:GetService("RunService").Heartbeat,
  122. BindToRenderStep = function(self,name,_,fun)
  123. self._btrs[name] = self.Heartbeat:Connect(fun)
  124. end,
  125. UnbindFromRenderStep = function(self,name)
  126. self._btrs[name]:Disconnect()
  127. end,
  128. },"RunService")
  129. }
  130. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  131. g.service = g.GetService
  132. FakeService(g,game)
  133. --Changing owner to fake player object to support owner:GetMouse()
  134. game,owner = g,g.Players.LocalPlayer
  135. end
  136. pls=game:GetService'Players';
  137. rs=game:GetService'RunService';
  138. uinps=game:GetService'UserInputService';
  139. lp=pls.LocalPlayer;
  140. mouse=lp:GetMouse();
  141. c=lp.Character;
  142. rayModel=Instance.new('Model',c);
  143. human=c.Humanoid;
  144. Cone=nil;
  145. human.MaxHealth=5000;
  146. wait();
  147. human.Health=5000;
  148. c.Health:Destroy();
  149. Debounces={
  150. FPS=0;
  151. isAttacking=false;
  152. isMoving=false;
  153. isSprinting=false;
  154. Debounce=false;
  155. isTyping=false;
  156. isJumping=false;
  157. isFlash=false;
  158. };
  159. numLerp=function(start,goal,alpha)
  160. return(((goal-start)*alpha)+start);
  161. end;
  162. CFrameZero=function()
  163. return CFrame.new(Vector3.new());
  164. end;
  165. local function a()
  166. local t=tick();
  167. local l=t%1*3;
  168. local t=.5*math.pi*(l%1);
  169. if l<1 then
  170. return Color3.new(1,1-math.cos(t),1-math.sin(t));
  171. elseif l<2 then
  172. return Color3.new(1-math.sin(t),1,1-math.cos(t));
  173. else
  174. return Color3.new(1-math.cos(t),1-math.sin(t),1);
  175. end;
  176. end;
  177. rad=function(value)
  178. return math.rad(value);
  179. end;
  180. CFAngles=function(Vector)
  181. return CFrame.Angles(rad(Vector.x),rad(Vector.y),rad(Vector.z));
  182. end;
  183. AnimStat={
  184. lerpSpeed=.2;
  185. lerpSpeed2=.35;
  186. lerpTween=0;
  187. };
  188. Joints={
  189. c.HumanoidRootPart.RootJoint;
  190. c.Torso.Neck;
  191. c.Torso['Left Shoulder'];
  192. c.Torso['Right Shoulder'];
  193. c.Torso['Left Hip'];
  194. c.Torso['Right Hip'];
  195. };
  196. JointTargets={
  197. CFrameZero();
  198. CFrameZero();
  199. CFrameZero();
  200. CFrameZero();
  201. CFrameZero();
  202. CFrameZero();
  203. };
  204. prepareCharacter=function()
  205. music=Instance.new('Sound',c.HumanoidRootPart);
  206. music.SoundId='rbxassetid://394144904';
  207. music.Looped=true;
  208. music.Volume=.6;
  209. music2=Instance.new('Sound',c);
  210. music2.SoundId='rbxassetid://259613634';
  211. music2.Looped=true;
  212. music2.Volume=1;
  213. music3=Instance.new('Sound',c.HumanoidRootPart);
  214. music3.SoundId='rbxassetid://266530326';
  215. music3.Looped=true;
  216. music3.Volume=1;
  217. music4=Instance.new('Sound',c.HumanoidRootPart);
  218. music4.SoundId='rbxassetid://155738252';
  219. music4.Looped=true;
  220. music4.Volume=1;
  221. music5=Instance.new('Sound',c.HumanoidRootPart);
  222. music5.SoundId='rbxassetid://215391212';
  223. music5.Looped=true;
  224. music5.Volume=1;
  225. human.WalkSpeed=0;
  226. human.JumpPower=0;
  227. for i,v in pairs(c:children())do
  228. if v:isA'Hat'then v:Destroy();end;
  229. if v:FindFirstChild'roblox'then v.roblox:Destroy();end;
  230. 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;
  231. if v:FindFirstChild'face'then v.face:Destroy();end;
  232. if v:isA'Part'then v.BrickColor=BrickColor.new'White';end;
  233. end
  234. local shirt=c:FindFirstChild'Shirt'or Instance.new('Shirt',c);
  235. local pants=c:FindFirstChild'Pants'or Instance.new('Pants',c);
  236. shirt.ShirtTemplate='rbxassetid://334755544';
  237. pants.PantsTemplate='rbxassetid://315964941';
  238. local Head=Instance.new('Part',c);
  239. Head.Size=Vector3.new(2.5,2.5,1);
  240. Head.Transparency=1;
  241. Head:BreakJoints();
  242. local hw=Instance.new('Weld',c.Head);
  243. hw.Part0=c.Head;
  244. hw.Part1=Head;
  245. hw.C0=CFrame.new(0,.3,0);
  246. faceDecal=Instance.new('Decal',Head);
  247. faceDecal.Face=Enum.NormalId.Front;
  248. faceDecal.Texture='rbxassetid://400387868';
  249. local backDecal=Instance.new('Decal',Head);
  250. backDecal.Face=Enum.NormalId.Back;
  251. backDecal.Texture='rbxassetid://400377807';
  252. local mes=Instance.new('BlockMesh',Head);
  253. mes.Scale=Vector3.new(1,1,.4);
  254. local Anim=human:FindFirstChild'Animator'
  255. if Anim then Anim:Destroy();end;
  256. end;
  257. setJointCFrames=function(table)
  258. for i=1,#table do
  259. JointTargets[i]=table[i];
  260. end;
  261. end;
  262. triWave=function(x)
  263. local pi2=math.pi/2;
  264. return math.abs((x/pi2)%4-2)-1;
  265. end;
  266. setLerp=function(speed)
  267. AnimStat.lerpSpeed=speed;
  268. end;
  269. setTween=function(tween)
  270. AnimStat.lerpTween=tween;
  271. end;
  272. playSound=function(id,part,vol,pitch)
  273. local vol=vol or 1;
  274. local pitch=pitch or 1;
  275. local x=Instance.new('Sound',part);
  276. x.Volume=vol;
  277. x.Pitch=pitch;
  278. x.SoundId='rbxassetid://'..id;
  279. spawn(function()
  280. wait();
  281. x:Play();
  282. wait(x.TimeLength+.2);
  283. x:Destroy();
  284. end);
  285. end;
  286. lerpBoom=function()
  287. if Cone then
  288. Cone.CFrame=CFrame.new(c.HumanoidRootPart.CFrame.p,c.HumanoidRootPart.CFrame.p+c.HumanoidRootPart.Velocity)*CFrame.Angles(-math.pi/2,0,0);
  289. cMesh.Scale=Vector3.new(20,20+c.HumanoidRootPart.Velocity.magnitude/10,20);
  290. Cone.Transparency=1-c.HumanoidRootPart.Velocity.magnitude/1000;
  291. else
  292. Cone=Instance.new('Part',c);
  293. Cone.Anchored=true;
  294. Cone.CanCollide=false;
  295. Cone.Transparency=math.random(50,70)/100;
  296. Cone.Size=Vector3.new(1,1,1);
  297. Cone.CFrame=CFrame.new(c.HumanoidRootPart.CFrame.p,c.HumanoidRootPart.CFrame.p+c.HumanoidRootPart.Velocity)*CFrame.Angles(-math.pi/2,0,0);
  298. cMesh=Instance.new('SpecialMesh',Cone);
  299. cMesh.MeshId='rbxassetid://1033714';
  300. cMesh.Scale=Vector3.new(20,50,20);
  301. end;
  302. end;
  303. noBoom=function()
  304. if Cone then local x=Cone Cone=nil;
  305. for i=1,20 do
  306. wait();
  307. x.Mesh.Scale=x.Mesh.Scale+Vector3.new(-.5,1,-.5);
  308. x.Transparency=x.Transparency+1/30;
  309. end;
  310. end;
  311. end;
  312. gasterBlast=function(tCFrame,aimPos,charge)
  313. local aimTarget;
  314. if aimPos then
  315. aimTarget=CFrame.new(tCFrame,aimPos);
  316. else
  317. aimTarget=tCFrame;
  318. end;
  319. local gast=Instance.new('Part',c);
  320. gast.Size=Vector3.new(12,.2,12);
  321. gast.CanCollide=false;
  322. gast.Anchored=true;
  323. gast.Transparency=1;
  324. if charge then
  325. playSound(400523331,gast,math.random(90,110)/100);
  326. end;
  327. wait();
  328. for i=1,2 do
  329. local decal=Instance.new('Decal',gast);
  330. decal.Texture='rbxassetid://323497117';
  331. if i==1 then
  332. decal.Face=Enum.NormalId.Top;
  333. else
  334. decal.Face=Enum.NormalId.Bottom;
  335. end;
  336. end;
  337. gast.CFrame=CFrame.new(aimTarget.p-Vector3.new(math.sin(tick()*10)*10,20,math.cos(tick()*10)*10));
  338. spawn(function()
  339. local tarCFrame=gast.CFrame;
  340. local isLooping=true;
  341. spawn(function()
  342. while rs.RenderStepped:wait()and isLooping do
  343. gast.CFrame=gast.CFrame:lerp(tarCFrame,.6/(Debounces.FPS/60));
  344. end;
  345. end);
  346. for i=1,30 do
  347. wait();
  348. tarCFrame=gast.CFrame:lerp(aimTarget,.24);
  349. end;
  350. playSound(340722848,gast,math.random(90,110)/100);
  351. isLooping=false;
  352. wait(.08);
  353. local ray=Ray.new(aimTarget.p,aimTarget.lookVector.unit*999);
  354. local _,pos=workspace:FindPartOnRay(ray,c);
  355. local dis=(aimTarget.p-pos).magnitude;
  356. 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);
  357. local rayPart=Instance.new('Part',rayModel);
  358. rayPart.Material='Neon';
  359. rayPart.FormFactor='Custom';
  360. rayPart.Color=a();
  361. rayPart.Anchored=true;
  362. rayPart.CanCollide=false;
  363. rayPart.Shape='Cylinder';
  364. rayPart.Size=Vector3.new(dis+400,8,8);
  365. rayPart.CFrame=rayCFrame;
  366. gast:Destroy();
  367. end);
  368. end;
  369. largegasterBlast=function(tCFrame,aimPos)
  370. local aimTarget;
  371. if aimPos then
  372. aimTarget=CFrame.new(tCFrame,aimPos);
  373. else
  374. aimTarget=tCFrame;
  375. end;
  376. local gast=Instance.new('Part',c);
  377. gast.Size=Vector3.new(25,.2,25);
  378. gast.CanCollide=false;
  379. gast.Anchored=true;
  380. gast.Transparency=1;
  381. playSound(400523331,gast,math.random(85,97)/100);
  382. wait();
  383. for i=1,2 do
  384. local decal=Instance.new('Decal',gast);
  385. decal.Texture='rbxassetid://323497117';
  386. if i==1 then
  387. decal.Face=Enum.NormalId.Top;
  388. else
  389. decal.Face=Enum.NormalId.Bottom;
  390. end;
  391. end;
  392. gast.CFrame=CFrame.new(aimTarget.p-Vector3.new(math.sin(tick()*10)*10,20,math.cos(tick()*10)*10));
  393. spawn(function()
  394. local tarCFrame=gast.CFrame;
  395. local isLooping=true;
  396. spawn(function()
  397. while rs.RenderStepped:wait()and isLooping do
  398. gast.CFrame=gast.CFrame:lerp(tarCFrame,.6/(Debounces.FPS/60));
  399. end;
  400. end);
  401. for i=1,40 do
  402. wait();
  403. tarCFrame=gast.CFrame:lerp(aimTarget,.18);
  404. end;
  405. playSound(340722848,gast,math.random(80,95)/100);
  406. isLooping=false;
  407. wait(.08);
  408. local ray=Ray.new(aimTarget.p,aimTarget.lookVector.unit*999);
  409. local _,pos=workspace:FindPartOnRay(ray,c);
  410. local dis=(aimTarget.p-pos).magnitude;
  411. 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);
  412. local rayPart=Instance.new('Part',rayModel);
  413. rayPart.Material='Neon';
  414. rayPart.FormFactor='Custom';
  415. rayPart.Color=a();
  416. rayPart.Anchored=true;
  417. rayPart.CanCollide=false;
  418. rayPart.Shape='Cylinder';
  419. rayPart.Size=Vector3.new(dis+400,17,17);
  420. rayPart.CFrame=rayCFrame;
  421. gast:Destroy();
  422. end);
  423. end;
  424. prepareCharacter();
  425. spawn(function()
  426. local sine=0;
  427. while wait()do
  428. if Debounces.isFlash then
  429. if(tick()*8)%2>1 then
  430. faceDecal.Texture='rbxassetid://400377503';
  431. else
  432. faceDecal.Texture='rbxassetid://400387868';
  433. end;
  434. else
  435. faceDecal.Texture='rbxassetid://400387868';
  436. end;
  437. if Debounces.isAttacking==false and Debounces.isMoving==false and Debounces.Debounce==false and Debounces.isJumping==false then
  438. setLerp(.8);
  439. local spasm=math.abs(math.sin(tick()*20))*1.1;
  440. local spasm2=math.abs(math.sin(tick()*20-2))*1.1;
  441. local spasm3=math.abs(math.sin(tick()*20-2.3))*1.1;
  442. setJointCFrames({
  443. CFrame.new(Vector3.new(0,0-spasm,0))*CFAngles(Vector3.new(0,0,0));
  444. CFrame.new(Vector3.new(0,1.5,0))*CFAngles(Vector3.new(-0.011,-0.502,-1.177));
  445. CFrame.new(Vector3.new(-1.5-spasm2^2/3,-0.001,0))*CFAngles(Vector3.new(-2.344,7.899,-2.82+spasm3^2*-60));
  446. CFrame.new(Vector3.new(1.569+spasm2^2/3,0,-0.1))*CFAngles(Vector3.new(4.822,1.123,6.383+spasm3^2*60));
  447. CFrame.new(Vector3.new(-0.61,-2+spasm/1.01,-.15))*CFAngles(Vector3.new(-2.206,0.767,-0.582));
  448. CFrame.new(Vector3.new(0.55,-2+spasm/1.01,-.1))*CFAngles(Vector3.new(-0.026,0.463,3.184));
  449. });
  450. elseif Debounces.isAttacking==false and Debounces.isMoving==true and Debounces.Debounce==false and Debounces.isSprinting==false and Debounces.isJumping==false then
  451. sine=tick()*18;
  452. human.WalkSpeed=120;
  453. setLerp(.35);
  454. setJointCFrames({
  455. 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));
  456. CFrame.new(Vector3.new(0,1.48,0.099))*CFAngles(Vector3.new(14.999,-0.001,0));
  457. 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));
  458. 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));
  459. 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));
  460. 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));
  461. });
  462. elseif Debounces.isAttacking==false and Debounces.isMoving==true and Debounces.Debounce==false and Debounces.isSprinting==true and Debounces.isJumping==false then
  463. sine=tick()*28;
  464. human.WalkSpeed=400;
  465. lerpBoom();
  466. setLerp(.65);
  467. setJointCFrames({
  468. 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));
  469. CFrame.new(Vector3.new(0,1.48,0.099))*CFAngles(Vector3.new(14.999,-0.001,0));
  470. 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));
  471. 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));
  472. 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));
  473. 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));
  474. });
  475. elseif Debounces.isJumping==true and Debounces.Debounce==false then
  476. setLerp(.14);
  477. human.WalkSpeed=45;
  478. setJointCFrames({
  479. CFrame.new(Vector3.new(0,0,0))*CFAngles(Vector3.new(-8,0,0));
  480. CFrame.new(Vector3.new(0,1.5,-0.15))*CFAngles(Vector3.new(-10.138,3.687,0.306));
  481. CFrame.new(Vector3.new(-1.23,0.069,-0.56))*CFAngles(Vector3.new(50.809,0.672,18.704));
  482. CFrame.new(Vector3.new(0.929,-0.031,-1.0912))*CFAngles(Vector3.new(63.00,13.85,-36.416));
  483. CFrame.new(Vector3.new(-0.63,-1.82,-0.74))*CFAngles(Vector3.new(31.324,3.424,-1.249));
  484. CFrame.new(Vector3.new(0.619,-1.331,0.82))*CFAngles(Vector3.new(-59.644,0.998,9.776));
  485. });
  486. end;
  487. end;
  488. end);
  489. human.Changed:connect(function(prop)
  490. if prop=='MoveDirection'then
  491. if human.MoveDirection.magnitude>.02 then
  492. Debounces.isMoving=true;
  493. else
  494. Debounces.isMoving=false;
  495. end;
  496. end;
  497. end);
  498. uinps.InputBegan:connect(function(InputObj)
  499. if InputObj.KeyCode==Enum.KeyCode.Slash then
  500. local finishEvent=nil;
  501. Debounces.isTyping=true
  502. finishEvent=uinps.InputBegan:connect(function(InputObj)
  503. if InputObj.KeyCode==Enum.KeyCode.Return or InputObj.UserInputType==Enum.UserInputType.MouseButton1 then
  504. Debounces.isTyping=false;
  505. finishEvent:disconnect();
  506. end;
  507. end);
  508. end;
  509. end);
  510. mouse.KeyDown:connect(function(key)
  511. if key=='0'then
  512. Debounces.isSprinting=true;
  513. playSound(160248522,c.Torso);
  514. for i=1,3 do
  515. spawn(function()
  516. local e=Instance.new('Part',c);
  517. e.Size=Vector3.new(1,1,1);
  518. e.Material='Neon';
  519. e.Color=a();
  520. e.Anchored=true;
  521. e.CFrame=c.HumanoidRootPart.CFrame*CFrame.Angles(0,0,-math.pi/2);
  522. e.CanCollide=false;
  523. local rm=Instance.new('SpecialMesh',e);
  524. rm.MeshType='FileMesh';
  525. rm.MeshId='rbxassetid://3270017';
  526. rm.Scale=Vector3.new(3.2,3.2,10);
  527. for x=1,30 do
  528. wait();
  529. rm.Scale=rm.Scale:lerp(Vector3.new(i*30,i*30,(4-i)*450),.1);
  530. e.Transparency=x/30+.5;
  531. end;
  532. end);
  533. end;
  534. c.HumanoidRootPart.Velocity=c.HumanoidRootPart.CFrame.lookVector*200;
  535. end;
  536. end);
  537. mouse.KeyUp:connect(function(key)
  538. if key=='0'then
  539. Debounces.isSprinting=false;
  540. end;
  541. end);
  542. mouse.KeyDown:connect(function(key)
  543. if key=='v'then
  544. playSound(201858087,c.Torso,math.random(90,120)/100);
  545. local oldPos=c.HumanoidRootPart.CFrame.p;
  546. local mHit=mouse.Hit.p;
  547. for i=1,2 do
  548. spawn(function()
  549. local pos
  550. if i==1 then pos=oldPos else pos=mHit end
  551. local p=Instance.new('Part',workspace);
  552. p.Anchored=true;
  553. p.CanCollide=false;
  554. p.Color=a();
  555. p.FormFactor='Custom';
  556. p.CFrame=CFrame.new(pos+Vector3.new(0,500,0));
  557. p.Transparency=.4;
  558. p.Size=Vector3.new(20,1000,20);
  559. for i=1,20 do
  560. wait();
  561. p.Transparency=.4+(i/10)*.6;
  562. p.Size=Vector3.new(20-i*1.5,1000,20-i*1.5);
  563. p.CFrame=CFrame.new(pos+Vector3.new(0,500,0));
  564. end;
  565. p:Destroy();
  566. end);
  567. end;
  568. if Debounces.isMoving then
  569. 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));
  570. else
  571. c.HumanoidRootPart.CFrame=CFrame.new(mouse.Hit.p+Vector3.new(0,4,0),Vector3.new(oldPos.x,mouse.Hit.p.y+4,oldPos.z));
  572. end;
  573. end;
  574. end);
  575. mouse.KeyDown:connect(function(key)
  576. if key=='r'then
  577. local pointTarget=mouse.Hit.p;
  578. for i=1,20 do
  579. wait();
  580. 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));
  581. end;
  582. wait();
  583. largegasterBlast(CFrame.new(pointTarget+Vector3.new(0,35,0),pointTarget));
  584. end;
  585. end);
  586. mouse.KeyDown:connect(function(key)
  587. if key=='f'then
  588. local pointTarget=mouse.Hit.p;
  589. for i=1,20 do
  590. wait();
  591. 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)));
  592. end;
  593. largegasterBlast(CFrame.new(c.HumanoidRootPart.CFrame.p+Vector3.new(0,50,0),pointTarget):toWorldSpace(CFrame.new(0,0,-25)));
  594. end;
  595. end);
  596. mouse.Button1Down:connect(function()
  597. Debounces.isFlash=true;
  598. end);
  599. mouse.Button1Up:connect(function()
  600. Debounces.isFlash=false;
  601. end);
  602. mouse.KeyDown:connect(function(key)
  603. if key=='k'then
  604. if music.isPlaying then music:Stop();else music:Play();end;
  605. end;
  606. end);
  607. mouse.KeyDown:connect(function(key)
  608. if key=='j'then
  609. if music2.isPlaying then music2:Stop();else music2:Play();end;
  610. end;
  611. end);
  612. mouse.KeyDown:connect(function(key)
  613. if key=='l'then
  614. if music3.isPlaying then music3:Stop();else music3:Play();end;
  615. end;
  616. end);
  617. mouse.KeyDown:connect(function(key)
  618. if key=='p'then
  619. if music4.isPlaying then music4:Stop();else music4:Play();end;
  620. end;
  621. end);
  622. mouse.KeyDown:connect(function(key)
  623. if key=='o'then
  624. if music5.isPlaying then music4:Stop();else music5:Play();end;
  625. end;
  626. end);
  627. mouse.KeyDown:connect(function(key)
  628. if key=='e'then
  629. gasterBlast(c.Torso.CFrame.p+Vector3.new(math.sin(tick()*10)*10,12,math.cos(tick()*10)*10),mouse.Hit.p,true);
  630. end;
  631. end);
  632. mouse.KeyDown:connect(function(key)
  633. if key=='c'then
  634. largegasterBlast(c.Torso.CFrame.p+Vector3.new(math.sin(tick()*10)*10,12,math.cos(tick()*10)*10),mouse.Hit.p);
  635. end;
  636. end);
  637. mouse.KeyDown:connect(function(key)
  638. if key=='q'then
  639. for i=1,5 do
  640. wait();
  641. gasterBlast(c.Torso.CFrame.p+Vector3.new(math.sin(tick()*10)*10,12,math.cos(tick()*10)*10),mouse.Hit.p);
  642. end;
  643. largegasterBlast(c.Torso.CFrame.p+Vector3.new(0,25,0),mouse.Hit.p);
  644. end;
  645. end);
  646. mouse.KeyDown:connect(function(key)
  647. if key=='t'then
  648. local pointTarget=mouse.Hit.p;
  649. for i=1,20 do
  650. 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);
  651. end;
  652. wait(.2);
  653. for i=1,10 do
  654. largegasterBlast(pointTarget+Vector3.new(math.sin(math.deg((360/20)*i))*25,20,math.cos(math.deg((360/20)*i))*25),pointTarget);
  655. end;
  656. end;
  657. end);
  658. human.StateChanged:connect(function(os,ns)
  659. if c.HumanoidRootPart.Velocity.Y<.1 and Debounces.isJumping==true and ns==Enum.HumanoidStateType.Landed then
  660. Debounces.isJumping=false;
  661. end;
  662. end);
  663. for i=1,#Joints do
  664. Joints[i].C1=CFrameZero();
  665. end;
  666. rs.RenderStepped:connect(function()
  667. Debounces.FPS=1/rs.RenderStepped:wait();
  668. if Debounces.FPS<30 then
  669. Debounces.FPS=30;
  670. end;
  671. if Debounces.isSprinting then
  672. lerpBoom();
  673. else
  674. noBoom();
  675. end;
  676. for _,v in pairs(rayModel:children())do
  677. v.Transparency=v.Transparency+.06/(Debounces.FPS/60);
  678. if v.Transparency>.99 then v:Destroy();return;end;
  679. v.CanCollide=true;
  680. local tParts=v:GetTouchingParts();
  681. v.CanCollide=false;
  682. local vCFrame=v.CFrame;
  683. v.Size=v.Size+Vector3.new(0,1,1)/(Debounces.FPS/60);
  684. v.CFrame=vCFrame;
  685. for _,x in pairs(tParts)do
  686. if x and x.Parent and x.Parent:FindFirstChild'Humanoid'and x.Parent.Humanoid:isA'Humanoid'and x.Parent~=c then
  687. x.Parent.Humanoid:TakeDamage(1,2);
  688. end;
  689. end;
  690. end;
  691. local FPSLerp=AnimStat.lerpSpeed/(Debounces.FPS/60);
  692. for i=1,#Joints do
  693. Joints[i].C0=Joints[i].C0:lerp(JointTargets[i],FPSLerp);
  694. end;
  695. end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement