Advertisement
Guest User

DevUzi

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