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