Advertisement
zed_isJayTheLionJR

Zotiyac Rapping

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