Advertisement
loler222444

My Gui

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