View difference between Paste ID: nxnG68pF and eZjP3N4a
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,Mouse,mouse,UserInputService,ContextActionService = owner
4
local RealPlayer = Player
5
do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},Soundscape=r:GetService("RunService").Heartbeat,BindToSoundscape=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
6
7
print("IM TRYING")
8
wait(0.25);
9
 
10
 
11
_clear=function()
12
        local c={char;bag;gui;};
13
        for i=1,#c do
14
                local c=c[i]:children();
15
                for i=1,#c do
16
                        if(c[i].Name==name)then
17
                                c[i].Parent=nil;
18
                        end;
19
                end;
20
        end;
21
        local n=name..user.Name;
22
        local c=workspace:children();
23
        for i=1,#c do
24
                if(c[i].Name==n)then
25
                        c[i].Parent=nil;
26
                end;
27
        end;
28
end;
29
 
30
_valid_key=function(object,key)
31
        return object[key],key;
32
end;
33
 
34
_new=function(class)
35
        return function(props)
36
                if(type(list_base_props)=='table')then
37
                        for i,v in next,list_base_props do
38
                                if(props[i]==nil)then
39
                                        props[i]=v;
40
                                end;
41
                        end;
42
                end;
43
               
44
                local object=class;
45
               
46
                if(type(class)=='string')then
47
                        object=Instance.new(class:sub(1,1):upper()..class:sub(2));
48
                end;
49
               
50
                local parent=props[1];
51
                        props[1]=nil;
52
               
53
                for i,v in next,props do
54
                        local load,res,key=pcall(_valid_key,object,i:sub(1,1):upper()..i:sub(2));
55
                        if(not load)then
56
                                load,res,key=pcall(_valid_key,object,i);
57
                        end;
58
                       
59
                        if(key)then
60
                                t=type(res);
61
                                s=tostring(res);
62
                                if(t=='userdata'and s=='Signal '..key)then
63
                                        if(type(v)=='table')then
64
                                                for i=1,#v do
65
                                                        res:connect(v[i]);
66
                                                end;
67
                                        else
68
                                                res:connect(v);
69
                                        end;
70
                                else
71
                                        object[key]=v;
72
                                end;
73
                        end;
74
                end;
75
               
76
                if(parent)then
77
                        object.Parent=parent;
78
                end;
79
               
80
                return object;
81
        end;
82
end;
83
 
84
_RGB=function(r,g,b)
85
        return Color3.new(r/255,g/255,b/255);
86
end;
87
 
88
_copy=function(o)
89
        local def=o.archivable;
90
        o.archivable=true;
91
        local c=o:clone();
92
        o.archivable=def;
93
        return c;
94
end;
95
 
96
_hum=function(char)
97
        local hum=char:findFirstChild'Humanoid';
98
        if(not hum or hum.className~='Humanoid')then
99
                local c=char:children();
100
                for i=1,#c do
101
                        if(c[i].className=='Humanoid')then
102
                                return c[i];
103
                        end;
104
                end;
105
        else
106
                return hum;
107
        end;
108
end;
109
 
110
_hum_tag=function(hum)
111
        local c=hum:findFirstChild'creator'or Instance.new('ObjectValue',hum);
112
                c.Name='creator';
113
                c.Value=user;
114
        if(hum.Health==0 and not hum:findFirstChild'killed')then
115
                Instance.new('BoolValue',hum).Name='killed';
116
                bullets.clip=bullets.clip+10;
117
        end;
118
end;
119
 
120
_hum_dam=function(hum,dam,percent)
121
        hum.Health=hum.Health-(percent and hum.MaxHealth*(dam*0.01)or dam);
122
        if(hum.Health<=hum.MaxHealth*0.1)then
123
                _hum_tag(hum);
124
        end;
125
end;
126
 
127
_ray=function(v0,v1,i)
128
        local mag=(v0-v1).magnitude;
129
        local ray=Ray.new(v0,(v1-v0).unit*(mag>999 and 999 or mag));
130
       
131
        return(type(i)=='table'and workspace.FindPartOnRayWithIgnoreList or workspace.FindPartOnRay)(workspace,ray,i);
132
end;
133
 
134
_must=function(v0,v1,i)
135
        local hit,pos=_ray(v0,v1,i);
136
        return not hit and mouse.target or hit,pos;
137
end;
138
 
139
_cframe=function(x,y,z,r0,r1,r2)
140
        return CFrame.Angles(
141
                math.rad(r0 or 0),
142
                math.rad(r1 or 0),
143
                math.rad(r2 or 0)
144
        )*CFrame.new(x,y,z);
145
end;
146
 
147
_update=function()
148
        if(bool_active and not screen.Parent)then
149
                screen.Parent=gui;
150
        elseif(not bool_active and screen.Parent)then
151
                screen.Parent=nil;
152
        end;
153
end;
154
 
155
_light=function(v0,v1)
156
        local mag=(v0-v1).magnitude;
157
        local len=math.random(2,7);
158
                len=len>mag/2 and mag/2 or len;
159
       
160
        --local light=_new'part'{
161
        --        cFrame=CFrame.new(v0,v1);
162
        --        size=Vector3.new(1,1,1);
163
        --        color=_RGB(255,255,0);
164
        --        anchored=true;
165
        --        inv;
166
        --};
167
                _new'blockMesh'{
168
                        scale=Vector3.new(0.2,0.2,len);
169
                        offset=Vector3.new(0,0,-len/2);
170
                        light;
171
                };
172
               
173
        local bb=_new'billboardGui'{
174
                size=UDim2.new(2,0,2,0);
175
                adornee=light;
176
                light;
177
        };
178
                _new'imageLabel'{
179
                        image=url:format(109101526);
180
                        backgroundTransparency=1;
181
                        size=UDim2.new(1,0,1,0);
182
                        bb;
183
                };
184
               
185
       -- _rem(light,0.15);
186
end;
187
 
188
_rem=function(object,del)
189
        if(del)then
190
                delay(del,function()
191
                        if(object.Parent)then
192
                                object.Parent=nil;
193
                        end;
194
                end);
195
        else
196
                pcall(function()
197
                        if(object.Parent)then
198
                                object.Parent=nil;
199
                        end;
200
                end);
201
        end;
202
end;
203
 
204
_blood=function(pos,count)
205
        for i=1,count do
206
                local p=_new'part'{
207
                        rotVelocity=Vector3.new(math.random(),math.random(),math.random())*50;
208
                        position=pos+Vector3.new(math.random(),math.random(),math.random());
209
                        velocity=Vector3.new(math.random(),math.random(),math.random())*50;
210
                        size=Vector3.new(math.random(),math.random(),math.random())/3;
211
                        color=_RGB(255,0,0);
212
                        transparency=0.5;
213
                        canCollide=true;
214
                        bottomSurface=0;
215
                        topSurface=0;
216
                        formFactor=3;
217
                        locked=true;
218
                        inv;
219
                };
220
                delay(5,function()
221
                        p.Parent=nil;
222
                end);
223
        end;
224
end;
225
 
226
_make_hue=function()
227
        h_hue=_new'part'{
228
                size=Vector3.new(0.25,1.8,0.35);
229
                color=_RGB(100,100,100);
230
                formFactor=3;
231
                name='hue';
232
                handle;
233
        };
234
        hh_weld=_new'weld'{
235
                c1=_cframe(0,0.5,0);
236
                part0=handle;
237
                part1=h_hue;
238
                handle;
239
        };
240
end;
241
 
242
_shot=function(v0,v1)
243
        if(not time_left)then
244
                time_left=0;
245
        end;
246
        if(time_left>time())then
247
                return nil;
248
        else
249
                time_left=time()+math.random(1,10)/100;
250
        end;
251
       
252
        if(bullets.current<1)then
253
                local tick_sound=head:findFirstChild'tick_sound'or _new'sound'{
254
                        soundId='rbxasset://sounds/SWITCH3.wav';
255
                        name='tick_sound';
256
                        volume=0.2;
257
                        pitch=2;
258
                        head;
259
                };
260
                tick_sound:play();
261
                if(bullets.clip>0)then
262
                        time_left=time()+2;
263
                        h_hue:breakJoints();
264
                        h_hue.CanCollide=true;
265
                        h_hue.Velocity=(h_hue.CFrame*CFrame.new(0,5,0)).lookVector*10;
266
                        _rem(h_hue,10);
267
                        delay(1.9,function()
268
                                _make_hue();
269
                                local got=(bullets.clip>bullets.maximum and
270
                                        bullets.maximum or
271
                                        bullets.clip)-bullets.current;
272
 
273
                                bullets.clip=bullets.clip-got;
274
                                bullets.current=bullets.current+got;
275
                        end);
276
                end;
277
                return nil;
278
        else
279
                bullets.current=bullets.current-1;
280
               
281
                h_weld.C1=_cframe(0,0.75,0,
282
                                        -math.random(1000,1100)/10,180,0);
283
                d_weld.C1=_cframe(0,-0.25,0.3);
284
               
285
                lightstuff.Visible=true;
286
                delay(0.1,function()
287
                        lightstuff.Visible=false;
288
                end);
289
               
290
                _rem(_new'part'{
291
                        velocity=CFrame.new(drag.Position,(drag.CFrame*CFrame.new(-4,-5,0)).p).lookVector*10;
292
                        cFrame=drag.CFrame*CFrame.new(-0.5,0,0);
293
                        size=Vector3.new(0.1,0.1,0.4);
294
                        color=_RGB(200,200,0);
295
                        material='Slate';
296
                        canCollide=true;
297
                        formFactor=3;
298
                        inv;
299
                },5);
300
 
301
                delay(0.1,function()
302
                        d_weld.C1=_cframe(0,-0.25,0);
303
                        if(bool_active)then
304
                                h_weld.C1=h_weld_cf_active;
305
                        end;
306
                end)
307
        end;
308
       
309
        local hit,pos=_must(v0,v1,char);
310
       
311
        shot_sound:play();
312
       
313
 
314
                                _rem(_new'part'{
315
                                        cFrame=CFrame.new(v0,pos)*CFrame.new(0,0,-(v0-pos).magnitude*0.5);
316
                                        size=Vector3.new(0.1,0.1,(v0-pos).magnitude);
317
                                        color=_RGB(255,255,0);
318
                                        transparency=0.6;
319
                                                                                reflectance=0.5;
320
                                        canCollide=false;
321
                                        bottomSurface=0;
322
                                        anchored=true;
323
                                        formFactor=3;
324
                                        topSurface=0;
325
                                        inv;
326
                                },.15);
327
        _light(v0,v1);
328
       
329
        if(not hit)then return nil;end;
330
       
331
        if(hit.Parent.className=='Hat')then
332
                hit:breakJoints();
333
                hit.CanCollide=true;
334
                hit.Velocity=CFrame.new(v0,pos).lookVector*math.random(30,50);
335
                hit.RotVelocity=Vector3.new(math.random(1,90),math.random(1,90),math.random(1,90));
336
        else
337
                local hum=_hum(hit.Parent);
338
                if(not hum)then
339
                        if(hit.Anchored==false and hit.Size.magnitude<4)then
340
                                hit:breakJoints();
341
                                hit.CanCollide=true;
342
                        end;
343
                else
344
                        _hum_dam(hum,math.random(4,6));
345
                        _blood(pos,math.random(3,6));
346
                        hit.RotVelocity=Vector3.new(math.random(1,90),math.random(1,90),math.random(1,90))/6;
347
                        if(hit.Name=='Head')then
348
                                hum.Health=0;
349
                                _blood(pos,math.random(3,6));
350
                                delay(0.001,function()
351
                                        _new(workspace:FindFirstChild'head_shot'or'sound'){
352
                                                pitch=math.random(70,100)*0.01;
353
                                                soundId=url:format(1876552);
354
                                                name='head_shot';
355
                                                workspace;
356
                                        }:play();
357
                                end);
358
                                _hum_tag(hum);
359
                                _rem(_new'part'{
360
                                        cFrame=CFrame.new(v0,pos)*CFrame.new(0,0,-(v0-pos).magnitude*0.5);
361
                                        size=Vector3.new(0.1,0.1,(v0-pos).magnitude);
362
                                        color=torso.Color;
363
                                        transparency=0.5;
364
                                        canCollide=false;
365
                                        bottomSurface=0;
366
                                        anchored=true;
367
                                        formFactor=3;
368
                                        topSurface=0;
369
                                        inv;
370
                                },30);
371
                                hit.Parent=nil;
372
                                for b=0,1 do
373
                                        for a=0,1 do
374
                                                for i=0,1 do
375
                                                        _rem(_new'part'{
376
                                                                velocity=CFrame.new(v0,pos).lookVector*20;
377
                                                                cFrame=hit.CFrame*CFrame.new(i,-b,a);
378
                                                                size=Vector3.new(0.5,0.5,0.5);
379
                                                                color=_RGB(255,255,255);
380
                                                                bottomSurface=0;
381
                                                                canCollide=true;
382
                                                                transparency=0;
383
                                                                formFactor=3;
384
                                                                topSurface=0;
385
                                                                hum;
386
                                                        },30);
387
                                                end;
388
                                        end;
389
                                end;
390
                        end;
391
                end;
392
        end;
393
end;
394
 
395
 
396
 
397
_cf_select=function(mouse)
398
        mouse.Icon=url:format(109111387);--108999296
399
        bool_active=true;
400
       
401
        local arm=char:findFirstChild'Right Arm';
402
        local weld=torso:findFirstChild'Right Shoulder';
403
        if(arm and weld)then
404
                h_weld.Part0=arm;
405
                h_weld.C1=h_weld_cf_active;
406
               
407
                weld.Part1=nil;
408
                weld.Part0=nil;
409
               
410
                weld=_new(torso:findFirstChild'right_arml'or'weld'){
411
                        name='right_arml';
412
                        part0=torso;
413
                        part1=arm;
414
                        torso;
415
                };
416
               
417
                arml=(arml or 0)+1;
418
                local alv=arml;
419
                local gyro=torso:findFirstChild'p_gyro'or Instance.new('BodyGyro',torso);
420
                        gyro.maxTorque=Vector3.new(5e5,5e5,5e5);
421
                        gyro.P=30000;
422
                        gyro.D=1000;
423
                        gyro.Name='p_gyro';
424
                repeat
425
                        local pos=mouse.hit.p;
426
                        local val,valp,p0,p1,p2,hitpos,cj,c0,c1;
427
                       
428
                        val=-math.pi*0.5;
429
                        valp=val*-1;
430
                        p0=torso.CFrame;
431
                        p0=p0+((p0*CFrame.Angles(valp,0,0)).lookVector*0.5)+(p0*CFrame.Angles(0,val,0)).lookVector;
432
                        p1=p0+((p0.p-pos).unit*-2);
433
                        p2=CFrame.new((p0.p+p1.p)/2,p0.p)*CFrame.Angles(val,val,0);
434
                        hitpos=torso.Position;
435
                        cj=CFrame.new(hitpos);
436
                        c0=torso.CFrame:inverse()*cj;
437
                        c1=p2:inverse()*cj;
438
                        weld.C0=c0;
439
                        weld.C1=c1;
440
                       
441
                        gyro.cframe=CFrame.new(torso.Position,Vector3.new(pos.X,torso.Position.Y,pos.Z));
442
                       
443
                        wait(0.001);
444
                until arml~=alv;
445
                gyro.Parent=nil;
446
        end;
447
end;
448
 
449
_cf_deselect=function()
450
        bool_active=false;
451
        arml=(arml or 0)+1;
452
        loop_shot=(loop_shot or 0)+1;
453
               
454
        h_weld.Part0=torso;
455
        h_weld.C1=h_weld_cf_inactive;
456
       
457
        local weld=torso:findFirstChild'right_arml';
458
        if(weld)then
459
                weld.Part1=nil;
460
                weld.Part0=nil;
461
        end;
462
        local arm=char:findFirstChild'Right Arm';
463
        local weld=torso:findFirstChild'Right Shoulder';
464
        if(arm and weld)then
465
                weld.Part0=torso;
466
                weld.Part1=arm;
467
        end;
468
end;
469
 
470
_cf_mouse=function(event,fun)
471
        mouse[event:sub(1,1):upper()..event:sub(2)]:connect(function(...)
472
                if(bool_active)then
473
                        fun(...);
474
                end;
475
        end);
476
end;
477
 
478
 
479
do
480
        local main=getfenv(0);
481
        local c=game:children();
482
        local check=function(v)
483
                if(v.className~=''and v.className~='Instance'and game:service(v.className))then
484
                        main[v.className:sub(1,1):lower()..v.className:sub(2)]=v;
485
                end;
486
        end;
487
488-
                pcall(check,c[i]);
488+
489
 
490
bullets={
491
        maximum=9999999999999999999999999999;
492
        current=80;
493
        clip=99999*999;
494-
        maximum=51111111111111111111111111110;
494+
495-
        current=511111111111111111111111111111110;
495+
496-
        clip=501111111111111111111111111111111*4;
496+
497
        backgroundColor3=_RGB(0,0,0);
498
        textColor3=_RGB(200,200,200);
499
        borderSizePixel=0;
500
        color=_RGB(0,0,0);
501
        archivable=false;
502
        canCollide=false;
503
        bottomSurface=0;
504
        topSurface=0;
505
        formFactor=0;
506
        locked=true;
507
};
508
 
509
 
510
 
511
user=players.localPlayer;
512
mouse=user:getMouse();
513
char=user.Character;
514
gui=user.PlayerGui;
515
bag=user.Backpack;
516
torso=char.Torso;
517
head=char.Head;
518
hum=_hum(char);
519
 
520
url='rbxassetid://%d';
521
name='dev-uzi';
522
 
523
h_weld_cf_inactive=_cframe(0.35,0.5,0.5,
524
                                                        0,90,-70);
525
h_weld_cf_active=_cframe(0,0.75,0,
526
                                                -110,180,0);
527
 
528
assert(hum,'humanoid is not found');
529
 
530
 
531
 
532
_clear();
533
 
534
 
535
_cf_mouse('button1Down',function()
536
        loop_shot=(loop_shot or 0)+1;
537
        local vers=loop_shot;
538
        repeat
539
                _shot((tube.CFrame*CFrame.new(0,0,tube.Size.Z*0.5)).p,mouse.hit.p);
540
               wait(0.001);
541
        until vers~=loop_shot;
542
end);
543
 
544
_cf_mouse('button1Up',function()
545
        loop_shot=(loop_shot or 0)+1;
546
end);
547
 
548
_cf_mouse('move',function()
549
        cross_f.Position=UDim2.new(0,mouse.X-11,0,mouse.Y-11);
550
end);
551
 
552
_cf_mouse('keyDown',function(k)
553
        if(k=='r')then
554
                if(bullets.clip>0 and time_left<=time())then
555
                        local got=(bullets.clip>bullets.maximum and
556
                                bullets.maximum or
557
                                bullets.clip)-bullets.current;
558
 
559
                        bullets.clip=bullets.clip-got;
560
                        bullets.current=bullets.current+got;
561
                        if(got~=0)then
562
                                time_left=time()+2;
563
                        end;
564
                end;
565
        end;
566
end);
567
 
568
 
569
screen=_new'screenGui'{
570
        name=name;
571
};
572
 
573
cross_f=_new'frame'{
574
        size=UDim2.new(0,21,0,21);
575
        backgroundTransparency=1;
576
        screen;
577
};
578
 
579
for i=0,1 do
580
        _new'frame'{
581
                position=UDim2.new(0,13*i,0,11);
582
                size=UDim2.new(0,10,0,1);
583
                cross_f;
584
        };
585
end;
586
 
587
for i=0,1 do
588
        _new'frame'{
589
                position=UDim2.new(0,11,0,13*i);
590
                size=UDim2.new(0,1,0,10);
591
                cross_f;
592
        };
593
end;
594
 
595
 
596
 
597
shot_sound=_new(head:findFirstChild'2920959'or'sound'){
598
        soundId=url:format(2920959);
599
        pitch=1.4;
600
        head;
601
};
602
if(shot_sound.Name~='2920959')then
603
        shot_sound.Name='2920959';
604
        shot_sound:play();
605
end;
606
 
607
bin=_new'hopperBin'{
608
        deselected=_cf_deselect;
609
        selected=_cf_select;
610
        name=name;
611
        bag;
612
};
613
 
614
inv=_new'model'{
615
        name=name;
616
        char;
617
};
618
 
619
handle=_new'part'{
620
        size=Vector3.new(0.3,1.3,0.4);
621
        color=_RGB(140,140,140);
622
        name='handle';
623
        formFactor=3;
624
        inv;
625
        touched=function(hit)
626
                if(hit.Parent.className=='Model')then
627
                        local hum=_hum(hit.Parent);
628
                        if(hum~=nil)then
629
                                _hum_dam(hum,handle.Velocity.magnitude);
630
                        end;
631
                end;
632
        end;
633
};
634
        h_weld=_new'weld'{
635
                c1=h_weld_cf_inactive;
636
                part1=handle;
637
                part0=torso;
638
                handle;
639
        };
640
                _make_hue();
641
               
642
                h_part=_new'part'{
643
                        size=Vector3.new(0.4,0.4,1.4);
644
                        color=_RGB(140,140,140);
645
                        name='handle';
646
                        formFactor=3;
647
                        handle;
648
                };
649
                hp_weld=_new'weld'{
650
                        c1=_cframe(0,-1.3/2,-0.3,
651
                                                20,0,0);
652
                        part0=handle;
653
                        part1=h_part;
654
                        handle;
655
                };
656
               
657
                drag=_new'part'{
658
                        size=Vector3.new(0.5,0.45,1.5);
659
                        color=_RGB(100,100,100);
660
                        name='handle';
661
                        formFactor=3;
662
                        handle;
663
                };
664
                d_weld=_new'weld'{
665
                        c1=_cframe(0,-0.25,0);
666
                        part0=h_part;
667
                        part1=drag;
668
                        handle;
669
                };
670
               
671
                tube=_new'part'{
672
                        size=Vector3.new(0.2,0.2,1.5);
673
                        color=_RGB(0,0,0);
674
                        name='handle';
675
                        formFactor=3;
676
                        handle;
677
                };
678
                t_weld=_new'weld'{
679
                        c1=_cframe(0,-0.3,-0.1);
680
                        part0=h_part;
681
                        part1=tube;
682
                        handle;
683
                };
684
 
685
bullets_label=_new'textLabel'{
686
        textStrokeColor3=_RGB(0,0,0);
687
        textColor3=_RGB(200,200,200);
688
        textStrokeTransparency=0;
689
        backgroundTransparency=1;
690
        fontSize=5;
691
        screen;
692
};
693
 
694
lightstuff=_new'frame'{
695
        backgroundColor3=_RGB(255,255,255);
696
        position=UDim2.new(0,0,0,-1);
697
        backgroundTransparency=0.5;
698
        size=UDim2.new(1,0,1,1);
699
        borderSizePixel=0;
700
        visible=false;
701
        screen;
702
};
703
 
704
coroutine.wrap(function()
705
        local red,white,green;
706
        repeat
707
                if(screen.Parent)then
708
                        if(not green and bullets.current==bullets.maximum)then
709
                                green=true;
710
                                bullets_label.TextColor3=_RGB(0,200,0);
711
                        elseif(not red and bullets.current==0)then
712
                                red=true;
713
                                bullets_label.TextColor3=_RGB(200,0,0);
714
                        elseif((red or green)and bullets.current~=0 and bullets.current~=bullets.maximum)then
715
                                bullets_label.TextColor3=_RGB(200,200,200);
716
                                green=false;
717
                                red=false;
718
                        end;
719
                        bullets_label.Text=('Bullets: %d/%d'):format(bullets.current,bullets.clip);
720
                        bullets_label.Size=UDim2.new(0,bullets_label.TextBounds.X,0,bullets_label.TextBounds.Y);
721
                        bullets_label.Position=UDim2.new(1,-bullets_label.TextBounds.X-6,1,-bullets_label.TextBounds.Y-6);
722
                end;
723
                wait(0.001);
724
        until nil;
725
end)();
726
 
727
 
728
_G.dev_pistol_version=(_G.dev_pistol_version or 0)+1;
729
local vers=_G.dev_pistol_version;
730
repeat _update();wait(0.001);until _G.dev_pistol_version~=vers or hum.Health==0;
731
if(hum.Health==0)then
732
        _clear();
733
end;