Advertisement
Guest User

Ghost + Dev-uzi script (2 in 1)

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