Advertisement
Adog1656

sans script

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