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