Advertisement
gdgrg

somethin

Aug 4th, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 33.44 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. local RealPlayer = Player
  4. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end,__call=function(self,...)local t=rawget(self,"_RealService")if t then return t(...)end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return self[t]end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;x.RunService=v({RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")setmetatable(x,{__index=function(self,t)return r:GetService(t)or typeof(r[t])=="function"and function(m,...)return r[t](r,...)end or r[t]end,__newindex=s.__newindex,__call=s.__call})game,owner=x,x.Players.LocalPlayer end
  5.  
  6. function clerp(c1,c2,al)
  7. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  8. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  9. for i,v in pairs(com1) do
  10. com1[i] = v+(com2[i]-v)*al
  11. end
  12. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  13. end
  14.  
  15. plr = game:service'Players'.LocalPlayer
  16. plrgui = plr:findFirstChild'PlayerGui'
  17. plrmouse = plr:GetMouse()
  18. char = plr.Character
  19. humanoid = char:findFirstChild("Humanoid")
  20. torso = char:findFirstChild("Torso")
  21. head = char.Head
  22. ra = char:findFirstChild("Right Arm")
  23. la = char:findFirstChild("Left Arm")
  24. rl = char:findFirstChild("Right Leg")
  25. ll = char:findFirstChild("Left Leg")
  26. rs = torso:findFirstChild("Right Shoulder")
  27. ls = torso:findFirstChild("Left Shoulder")
  28. rh = torso:findFirstChild("Right Hip")
  29. lh = torso:findFirstChild("Left Hip")
  30. neck = torso:findFirstChild("Neck")
  31. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  32. rootpart = char:findFirstChild("HumanoidRootPart")
  33. camera = workspace.CurrentCamera
  34. anim = char:findFirstChild("Animate")
  35.  
  36. local rm = Instance.new("Weld")
  37. rm.C0 = CFrame.new(1.5, 0.5, 0)
  38. rm.C1 = CFrame.new(0, 0.5, 0)
  39. rm.Part0 = torso
  40. rm.Part1 = ra
  41. rm.Name = 'Right Shoulder'
  42.  
  43. local lm = Instance.new("Weld")
  44. lm.C0 = CFrame.new(-1.5, 0.5, 0)
  45. lm.C1 = CFrame.new(0, 0.5, 0)
  46. lm.Part0 = torso
  47. lm.Part1 = la
  48. lm.Name = 'Left Shoulder'
  49.  
  50. local tool = Instance.new('HopperBin', plr.Backpack)
  51. tool.Name = 'Dual M1911'
  52.  
  53. function scan(parent)
  54. local parts,last = {}
  55. for _,v in pairs(parent:GetChildren()) do
  56. if (v:IsA("BasePart")) then
  57. v.Anchored = true
  58. if (last) then
  59. local w = Instance.new("Weld")
  60. w.Name = ("%s_Weld"):format(v.Name)
  61. w.Part0,w.Part1 = last,v
  62. w.C0 = last.CFrame:inverse()
  63. w.C1 = v.CFrame:inverse()
  64. w.Parent = last
  65. end
  66. last = v
  67. table.insert(parts,v)
  68. end
  69. scan(v)
  70. end
  71. for _,v in pairs(parts) do
  72. v.Anchored = false
  73. v.Locked = true
  74. v.CanCollide = false
  75. end
  76. end
  77.  
  78. --1-Torso
  79. holsters=Instance.new("Model")
  80. holsters.Name="Torso"
  81. holsters.Parent=char
  82. --2-HolsterWeldTo2
  83. obj2=Instance.new("Part")
  84. obj2.CFrame=CFrame.new(Vector3.new(14.8519955,1.44200003,35.6479988)) * CFrame.Angles(1.8325955867767,-1.4901161193848e-008,-3.1415927410126)
  85. obj2.FormFactor=Enum.FormFactor.Custom
  86. obj2.LeftSurface=10
  87. obj2.Transparency=1
  88. obj2.TopSurface=10
  89. obj2.RightSurface=10
  90. obj2.Material="SmoothPlastic"
  91. obj2.Size=Vector3.new(0.200000003,0.200000003,1.60000014)
  92. obj2.FrontSurface=10
  93. obj2.BottomSurface=10
  94. obj2.BackSurface=10
  95. obj2.BrickColor=BrickColor.new("Dark stone grey")
  96. obj2.Name="HolsterWeldTo2"
  97. obj2.Parent=holsters
  98. --3-Mesh
  99. obj3=Instance.new("BlockMesh")
  100. obj3.Scale=Vector3.new(0.999499977,1,1)
  101. obj3.Parent=obj2
  102. --4-Belt
  103. obj4=Instance.new("Part")
  104. obj4.CFrame=CFrame.new(Vector3.new(13.6000061,1.49000156,35.8999977)) * CFrame.Angles(-1.4901162970204e-008,0,-0)
  105. obj4.FormFactor=Enum.FormFactor.Custom
  106. obj4.LeftSurface=10
  107. obj4.TopSurface=10
  108. obj4.RightSurface=10
  109. obj4.Material="SmoothPlastic"
  110. obj4.Size=Vector3.new(2,0.200000003,1)
  111. obj4.FrontSurface=10
  112. obj4.BottomSurface=10
  113. obj4.BackSurface=10
  114. obj4.BrickColor=BrickColor.new("Dark stone grey")
  115. obj4.Name="Belt"
  116. obj4.Parent=holsters
  117. --5-Mesh
  118. obj5=Instance.new("BlockMesh")
  119. obj5.Scale=Vector3.new(1.10000002,1,1.10000002)
  120. obj5.Parent=obj4
  121. --6-Hold2
  122. obj6=Instance.new("Part")
  123. obj6.CFrame=CFrame.new(Vector3.new(14.8000011,1.0950017,35.6999893)) * CFrame.Angles(0.26179936528206,0,-0)
  124. obj6.FormFactor=Enum.FormFactor.Custom
  125. obj6.LeftSurface=10
  126. obj6.TopSurface=10
  127. obj6.RightSurface=10
  128. obj6.Material="SmoothPlastic"
  129. obj6.Size=Vector3.new(0.400000006,1.00999999,0.600000024)
  130. obj6.FrontSurface=10
  131. obj6.BottomSurface=10
  132. obj6.BackSurface=10
  133. obj6.BrickColor=BrickColor.new("Dark stone grey")
  134. obj6.Name="Hold2"
  135. obj6.Parent=holsters
  136. --7-TorsoWeld
  137. obj7=Instance.new("Part")
  138. obj7.CFrame=CFrame.new(Vector3.new(13.6000061,1.99000168,35.8999939)) * CFrame.Angles(-0,0,-0)
  139. obj7.FormFactor=Enum.FormFactor.Custom
  140. obj7.LeftSurface=10
  141. obj7.Transparency=1
  142. obj7.TopSurface=10
  143. obj7.RightSurface=10
  144. obj7.Size=Vector3.new(2,2,1)
  145. obj7.FrontSurface=10
  146. obj7.BottomSurface=10
  147. obj7.BackSurface=10
  148. obj7.BrickColor=BrickColor.new("Bright blue")
  149. obj7.Name="TorsoWeld"
  150. obj7.Parent=holsters
  151. --8-HolsterWeldTo
  152. obj8=Instance.new("Part")
  153. obj8.CFrame=CFrame.new(Vector3.new(12.342,1.44200003,35.6479988)) * CFrame.Angles(1.8325955867767,-1.4901161193848e-008,-3.1415927410126)
  154. obj8.FormFactor=Enum.FormFactor.Custom
  155. obj8.LeftSurface=10
  156. obj8.Transparency=1
  157. obj8.TopSurface=10
  158. obj8.RightSurface=10
  159. obj8.Material="SmoothPlastic"
  160. obj8.Size=Vector3.new(0.200000003,0.200000003,1.60000014)
  161. obj8.FrontSurface=10
  162. obj8.BottomSurface=10
  163. obj8.BackSurface=10
  164. obj8.BrickColor=BrickColor.new("Dark stone grey")
  165. obj8.Name="HolsterWeldTo"
  166. obj8.Parent=holsters
  167. --9-Mesh
  168. obj9=Instance.new("BlockMesh")
  169. obj9.Scale=Vector3.new(0.999499977,1,1)
  170. obj9.Parent=obj8
  171. --10-Hold
  172. obj10=Instance.new("Part")
  173. obj10.CFrame=CFrame.new(Vector3.new(12.4000053,1.09500158,35.6999893)) * CFrame.Angles(0.26179936528206,0,-0)
  174. obj10.FormFactor=Enum.FormFactor.Custom
  175. obj10.LeftSurface=10
  176. obj10.TopSurface=10
  177. obj10.RightSurface=10
  178. obj10.Material="SmoothPlastic"
  179. obj10.Size=Vector3.new(0.400000006,1.00999999,0.600000024)
  180. obj10.FrontSurface=10
  181. obj10.BottomSurface=10
  182. obj10.BackSurface=10
  183. obj10.BrickColor=BrickColor.new("Dark stone grey")
  184. obj10.Name="Hold"
  185. obj10.Parent=holsters
  186. holsters:MakeJoints()
  187. scan(holsters)
  188.  
  189. --1-M1911
  190. gun=Instance.new("Model")
  191. gun.Name="M1911"
  192. gun.Parent=char
  193. --2-Handle
  194. obj2=Instance.new("Part")
  195. obj2.CFrame=CFrame.new(Vector3.new(12.3420238,1.86332655,36.3927727)) * CFrame.Angles(1.5707963705063,-4.4703483581543e-008,3.1415927410126)
  196. obj2.FormFactor=Enum.FormFactor.Custom
  197. obj2.LeftSurface=10
  198. obj2.TopSurface=10
  199. obj2.RightSurface=10
  200. obj2.Material=Enum.Material.Wood
  201. obj2.Size=Vector3.new(0.200000003,0.99999994,0.400000036)
  202. obj2.FrontSurface=10
  203. obj2.BottomSurface=10
  204. obj2.BackSurface=10
  205. obj2.BrickColor=BrickColor.new("Brown")
  206. obj2.Name="Handle"
  207. obj2.Parent=gun
  208. --3-Decor
  209. obj3=Instance.new("Part")
  210. obj3.CFrame=CFrame.new(Vector3.new(12.3420143,2.28510284,35.9773712)) * CFrame.Angles(1.832595705986,0,-3.1415927410126)
  211. obj3.FormFactor=Enum.FormFactor.Custom
  212. obj3.LeftSurface=10
  213. obj3.TopSurface=10
  214. obj3.RightSurface=10
  215. obj3.Material="SmoothPlastic"
  216. obj3.Size=Vector3.new(0.200000003,0.200000003,0.200000003)
  217. obj3.FrontSurface=10
  218. obj3.BottomSurface=10
  219. obj3.BackSurface=10
  220. obj3.BrickColor=BrickColor.new("Dark stone grey")
  221. obj3.Name="Decor"
  222. obj3.Parent=gun
  223. --4-Mesh
  224. obj4=Instance.new("BlockMesh")
  225. obj4.Offset=Vector3.new(0,0.00999999978,0.0399999991)
  226. obj4.Scale=Vector3.new(0.699999988,0.200000003,0.800000012)
  227. obj4.Parent=obj3
  228. --5-Decor
  229. obj5=Instance.new("Part")
  230. obj5.CFrame=CFrame.new(Vector3.new(12.3420143,1.46716928,35.8617401)) * CFrame.Angles(1.8325955867767,-1.4901161193848e-008,-3.1415927410126)
  231. obj5.FormFactor=Enum.FormFactor.Custom
  232. obj5.LeftSurface=10
  233. obj5.TopSurface=10
  234. obj5.RightSurface=10
  235. obj5.Material="SmoothPlastic"
  236. obj5.Size=Vector3.new(0.200000003,0.400000006,0.200000003)
  237. obj5.FrontSurface=10
  238. obj5.BottomSurface=10
  239. obj5.BackSurface=10
  240. obj5.BrickColor=BrickColor.new("Dark stone grey")
  241. obj5.Name="Decor"
  242. obj5.Parent=gun
  243. --6-Mesh
  244. obj6=Instance.new("BlockMesh")
  245. obj6.Scale=Vector3.new(0.600000024,1,0.200000003)
  246. obj6.Parent=obj5
  247. --7-Decor
  248. obj7=Instance.new("Part")
  249. obj7.CFrame=CFrame.new(Vector3.new(12.3420124,1.55429673,36.0928192)) * CFrame.Angles(0.45686540007591,-1.1175870895386e-008,3.141592502594)
  250. obj7.FormFactor=Enum.FormFactor.Custom
  251. obj7.LeftSurface=10
  252. obj7.TopSurface=10
  253. obj7.RightSurface=10
  254. obj7.Material="SmoothPlastic"
  255. obj7.Size=Vector3.new(0.200000003,0.310000002,0.200000003)
  256. obj7.FrontSurface=10
  257. obj7.BottomSurface=10
  258. obj7.BackSurface=10
  259. obj7.BrickColor=BrickColor.new("Dark stone grey")
  260. obj7.Name="Decor"
  261. obj7.Parent=gun
  262. --8-Mesh
  263. obj8=Instance.new("BlockMesh")
  264. obj8.Scale=Vector3.new(0.600000024,1,0.200000003)
  265. obj8.Parent=obj7
  266. --9-Decor
  267. obj9=Instance.new("Part")
  268. obj9.CFrame=CFrame.new(Vector3.new(12.3420258,2.21372294,35.8965569)) * CFrame.Angles(0.76370096206665,-1.4901161193848e-008,-3.1415927410126)
  269. obj9.FormFactor=Enum.FormFactor.Custom
  270. obj9.LeftSurface=10
  271. obj9.TopSurface=10
  272. obj9.RightSurface=10
  273. obj9.Material="SmoothPlastic"
  274. obj9.Size=Vector3.new(0.200000003,0.200000003,0.200000003)
  275. obj9.FrontSurface=10
  276. obj9.BottomSurface=10
  277. obj9.BackSurface=10
  278. obj9.BrickColor=BrickColor.new("Dark stone grey")
  279. obj9.Name="Decor"
  280. obj9.Parent=gun
  281. --10-Mesh
  282. obj10=Instance.new("BlockMesh")
  283. obj10.Scale=Vector3.new(0.400000006,0.200000003,1)
  284. obj10.Parent=obj9
  285. --11-Decor
  286. obj11=Instance.new("Part")
  287. obj11.CFrame=CFrame.new(Vector3.new(12.3420229,1.8633275,36.2927704)) * CFrame.Angles(1.5707963705063,-4.4703483581543e-008,3.1415927410126)
  288. obj11.FormFactor=Enum.FormFactor.Custom
  289. obj11.LeftSurface=10
  290. obj11.TopSurface=10
  291. obj11.RightSurface=10
  292. obj11.Material="SmoothPlastic"
  293. obj11.Size=Vector3.new(0.200000003,1.20000005,0.400000036)
  294. obj11.FrontSurface=10
  295. obj11.BottomSurface=10
  296. obj11.BackSurface=10
  297. obj11.BrickColor=BrickColor.new("Dark stone grey")
  298. obj11.Name="Decor"
  299. obj11.Parent=gun
  300. --12-Mesh
  301. obj12=Instance.new("BlockMesh")
  302. obj12.Offset=Vector3.new(0,-0.0700000003,0)
  303. obj12.Scale=Vector3.new(0.995000005,0.949999988,1.20000005)
  304. obj12.Parent=obj11
  305. --13-Decor
  306. obj13=Instance.new("Part")
  307. obj13.CFrame=CFrame.new(Vector3.new(12.3420258,2.30202365,35.8373909)) * CFrame.Angles(1.756756901741,-1.0430812835693e-007,3.1415927410126)
  308. obj13.FormFactor=Enum.FormFactor.Custom
  309. obj13.LeftSurface=10
  310. obj13.TopSurface=10
  311. obj13.RightSurface=10
  312. obj13.Material="SmoothPlastic"
  313. obj13.Size=Vector3.new(0.200000003,0.200000003,0.200000003)
  314. obj13.FrontSurface=10
  315. obj13.BottomSurface=10
  316. obj13.BackSurface=10
  317. obj13.BrickColor=BrickColor.new("Dark stone grey")
  318. obj13.Name="Decor"
  319. obj13.Parent=gun
  320. --14-Mesh
  321. obj14=Instance.new("BlockMesh")
  322. obj14.Scale=Vector3.new(0.400000006,0.200000003,0.400000006)
  323. obj14.Parent=obj13
  324. --15-BulletCase
  325. obj15=Instance.new("Part")
  326. obj15.CFrame=CFrame.new(Vector3.new(12.3420229,1.44165683,35.6482697)) * CFrame.Angles(1.8325955867767,-1.4901161193848e-008,-3.1415927410126)
  327. obj15.FormFactor=Enum.FormFactor.Custom
  328. obj15.LeftSurface=10
  329. obj15.TopSurface=10
  330. obj15.RightSurface=10
  331. obj15.Material="SmoothPlastic"
  332. obj15.Size=Vector3.new(0.200000003,0.200000003,1.60000014)
  333. obj15.FrontSurface=10
  334. obj15.BottomSurface=10
  335. obj15.BackSurface=10
  336. obj15.BrickColor=BrickColor.new("Dark stone grey")
  337. obj15.Name="BulletCase"
  338. obj15.Parent=gun
  339. --16-Mesh
  340. obj16=Instance.new("BlockMesh")
  341. obj16.Scale=Vector3.new(0.999499977,1,1)
  342. obj16.Parent=obj15
  343. --17-Flashlight
  344. obj17=Instance.new("Part")
  345. obj17.CFrame=CFrame.new(Vector3.new(12.3420115,0.729269207,35.601902)) * CFrame.Angles(-2.8797931671143,-1.7763568394003e-015,-3.1415927410126)
  346. obj17.FormFactor=Enum.FormFactor.Custom
  347. obj17.LeftSurface=10
  348. obj17.TopSurface=10
  349. obj17.RightSurface=10
  350. obj17.Material="SmoothPlastic"
  351. obj17.Size=Vector3.new(0.200000003,0.200000003,0.200000003)
  352. obj17.FrontSurface=10
  353. obj17.BottomSurface=10
  354. obj17.BackSurface=10
  355. obj17.BrickColor=BrickColor.new("Pastel yellow")
  356. obj17.Name="Flashlight"
  357. obj17.Parent=gun
  358. --18-Mesh
  359. obj18=Instance.new("CylinderMesh")
  360. obj18.Offset=Vector3.new(0,0,0.0500000007)
  361. obj18.Scale=Vector3.new(0.5,1.01999998,0.5)
  362. obj18.Parent=obj17
  363. --19-Decor
  364. obj19=Instance.new("Part")
  365. obj19.CFrame=CFrame.new(Vector3.new(12.3420143,2.1178081,35.8290215)) * CFrame.Angles(1.832595705986,0,-3.1415927410126)
  366. obj19.FormFactor=Enum.FormFactor.Custom
  367. obj19.LeftSurface=10
  368. obj19.TopSurface=10
  369. obj19.RightSurface=10
  370. obj19.Material="SmoothPlastic"
  371. obj19.Size=Vector3.new(0.200000003,0.400000036,0.200000003)
  372. obj19.FrontSurface=10
  373. obj19.BottomSurface=10
  374. obj19.BackSurface=10
  375. obj19.BrickColor=BrickColor.new("Black")
  376. obj19.Name="Decor"
  377. obj19.Parent=gun
  378. --20-Mesh
  379. obj20=Instance.new("BlockMesh")
  380. obj20.Scale=Vector3.new(0.5,0.5,1.10000002)
  381. obj20.Parent=obj19
  382. --21-Decor
  383. obj21=Instance.new("Part")
  384. obj21.CFrame=CFrame.new(Vector3.new(12.2895117,2.05304575,35.6843338)) * CFrame.Angles(1.832595705986,1.5699505805969,-3.1415927410126)
  385. obj21.FormFactor=Enum.FormFactor.Custom
  386. obj21.LeftSurface=10
  387. obj21.TopSurface=10
  388. obj21.RightSurface=10
  389. obj21.Material="SmoothPlastic"
  390. obj21.Size=Vector3.new(0.399999976,0.200000003,0.200000003)
  391. obj21.FrontSurface=10
  392. obj21.BottomSurface=10
  393. obj21.BackSurface=10
  394. obj21.BrickColor=BrickColor.new("Dark stone grey")
  395. obj21.Name="Decor"
  396. obj21.Parent=gun
  397. --22-Mesh
  398. obj22=Instance.new("SpecialMesh")
  399. obj22.MeshType=Enum.MeshType.Wedge
  400. obj22.Scale=Vector3.new(1,0.25,0.50999999)
  401. obj22.Parent=obj21
  402. --23-Decor
  403. obj23=Instance.new("Part")
  404. obj23.CFrame=CFrame.new(Vector3.new(12.3420172,1.41577363,35.744442)) * CFrame.Angles(-2.8797931671143,-1.7763568394003e-015,-3.1415927410126)
  405. obj23.FormFactor=Enum.FormFactor.Custom
  406. obj23.LeftSurface=10
  407. obj23.TopSurface=10
  408. obj23.RightSurface=10
  409. obj23.Material="SmoothPlastic"
  410. obj23.Size=Vector3.new(0.200000003,1.60000002,0.200000003)
  411. obj23.FrontSurface=10
  412. obj23.BottomSurface=10
  413. obj23.BackSurface=10
  414. obj23.BrickColor=BrickColor.new("Dark stone grey")
  415. obj23.Name="Decor"
  416. obj23.Parent=gun
  417. --24-Mesh
  418. obj24=Instance.new("CylinderMesh")
  419. obj24.Parent=obj23
  420. --25-ShellCaseSpawner
  421. obj25=Instance.new("Part")
  422. obj25.CFrame=CFrame.new(Vector3.new(12.3420172,1.75731552,35.6289024)) * CFrame.Angles(-2.8797931671143,-1.7763568394003e-015,-3.1415927410126)
  423. obj25.FormFactor=Enum.FormFactor.Custom
  424. obj25.LeftSurface=10
  425. obj25.TopSurface=10
  426. obj25.RightSurface=10
  427. obj25.Material="SmoothPlastic"
  428. obj25.Size=Vector3.new(0.200000003,0.200000003,0.200000003)
  429. obj25.FrontSurface=10
  430. obj25.BottomSurface=10
  431. obj25.BackSurface=10
  432. obj25.Name="ShellCaseSpawner"
  433. obj25.Parent=gun
  434. --26-Mesh
  435. obj26=Instance.new("CylinderMesh")
  436. obj26.Offset=Vector3.new(0.0149999997,0,-0.0350000001)
  437. obj26.Scale=Vector3.new(0.75,1,0.75)
  438. obj26.Parent=obj25
  439. --27-Decor
  440. obj27=Instance.new("Part")
  441. obj27.CFrame=CFrame.new(Vector3.new(12.3420115,0.765501678,35.4666672)) * CFrame.Angles(-2.8797931671143,-1.7763568394003e-015,-3.1415927410126)
  442. obj27.FormFactor=Enum.FormFactor.Custom
  443. obj27.LeftSurface=10
  444. obj27.TopSurface=10
  445. obj27.RightSurface=10
  446. obj27.Material="SmoothPlastic"
  447. obj27.Size=Vector3.new(0.200000003,0.200000003,0.200000003)
  448. obj27.FrontSurface=10
  449. obj27.BottomSurface=10
  450. obj27.BackSurface=10
  451. obj27.BrickColor=BrickColor.new("Black")
  452. obj27.Name="Decor"
  453. obj27.Parent=gun
  454. --28-Mesh
  455. obj28=Instance.new("CylinderMesh")
  456. obj28.Offset=Vector3.new(0,0,0.0500000007)
  457. obj28.Scale=Vector3.new(0.5,1.01999998,0.5)
  458. obj28.Parent=obj27
  459. --29-Decor
  460. obj29=Instance.new("Part")
  461. obj29.CFrame=CFrame.new(Vector3.new(12.3920164,1.4734931,35.5290413)) * CFrame.Angles(-1.3089969158173,-1.5701057910919,-0)
  462. obj29.FormFactor=Enum.FormFactor.Custom
  463. obj29.LeftSurface=10
  464. obj29.TopSurface=10
  465. obj29.RightSurface=10
  466. obj29.Material="SmoothPlastic"
  467. obj29.Size=Vector3.new(1.60000002,0.200000003,0.200000003)
  468. obj29.FrontSurface=10
  469. obj29.BottomSurface=10
  470. obj29.BackSurface=10
  471. obj29.BrickColor=BrickColor.new("Dark stone grey")
  472. obj29.Name="Decor"
  473. obj29.Parent=gun
  474. --30-Mesh
  475. obj30=Instance.new("SpecialMesh")
  476. obj30.MeshType=Enum.MeshType.Wedge
  477. obj30.Scale=Vector3.new(1,0.25,0.5)
  478. obj30.Parent=obj29
  479. --31-Decor
  480. obj31=Instance.new("Part")
  481. obj31.CFrame=CFrame.new(Vector3.new(12.2895117,1.18371284,35.4513969)) * CFrame.Angles(1.832595705986,1.5699505805969,-3.1415927410126)
  482. obj31.FormFactor=Enum.FormFactor.Custom
  483. obj31.LeftSurface=10
  484. obj31.TopSurface=10
  485. obj31.RightSurface=10
  486. obj31.Material="SmoothPlastic"
  487. obj31.Size=Vector3.new(1,0.200000003,0.200000003)
  488. obj31.FrontSurface=10
  489. obj31.BottomSurface=10
  490. obj31.BackSurface=10
  491. obj31.BrickColor=BrickColor.new("Dark stone grey")
  492. obj31.Name="Decor"
  493. obj31.Parent=gun
  494. --32-Mesh
  495. obj32=Instance.new("SpecialMesh")
  496. obj32.MeshType=Enum.MeshType.Wedge
  497. obj32.Scale=Vector3.new(1,0.25,0.50999999)
  498. obj32.Parent=obj31
  499. gun:MakeJoints()
  500. scan(gun)
  501.  
  502. local gun2 = gun:clone()
  503. gun2.Parent = char
  504.  
  505. local torsoweld = Instance.new('Weld', char)
  506. torsoweld.Part0 = torso
  507. torsoweld.Part1 = holsters.TorsoWeld
  508. torsoweld.C1 = CFrame.Angles(0,math.pi,0)
  509.  
  510. local gunweld = Instance.new('Weld', char)
  511. gunweld.Part0 = gun.BulletCase
  512. gunweld.Part1 = holsters.HolsterWeldTo
  513.  
  514. local gunweld2 = Instance.new('Weld', char)
  515. gunweld2.Part0 = gun2.BulletCase
  516. gunweld2.Part1 = holsters.HolsterWeldTo2
  517.  
  518. local bodygyro = Instance.new('BodyGyro')
  519. bodygyro.maxTorque = Vector3.new(14e16,14e16,14e16)
  520. bodygyro.P = 15000
  521.  
  522. local rsc0 = rm.C0
  523. local lsc0 = lm.C0
  524. local angle = 0
  525. local anglespeed = .5
  526. local speed = .3
  527. local side = 0
  528. local Equipped = false
  529. local origneckc0 = neck.C0
  530. local origneckc1 = neck.C1
  531. local neckc0 = CFrame.new(0, 1, 0)
  532. local firing = false
  533. local pistol = 1
  534. local light = false
  535.  
  536. local gunlight = Instance.new('SpotLight', gun.Flashlight)
  537. gunlight.Range = 40
  538. gunlight.Angle = 60
  539. gunlight.Face = 'Bottom'
  540. gunlight.Shadows = true
  541. gunlight.Enabled = false
  542.  
  543. local gunlight2 = gunlight:clone()
  544. gunlight2.Parent = gun2.Flashlight
  545.  
  546. local fire = Instance.new('Sound', head)
  547. fire.SoundId = "rbxassetid://132373536"
  548. fire.Volume = 1
  549.  
  550. local reload = Instance.new('Sound', head)
  551. reload.SoundId = "rbxassetid://138109513"
  552. reload.Volume = 1
  553.  
  554. local ammo = 14
  555. local scrgui = Instance.new('ScreenGui', plrgui)
  556. scrgui.Name = 'DualGunsGui'
  557.  
  558. local ammonution = Instance.new('TextLabel', scrgui)
  559. ammonution.Size = UDim2.new(0,150,0,50)
  560. ammonution.Position = UDim2.new(1, -250, 1, -70)
  561. ammonution.BackgroundTransparency = 1
  562. ammonution.TextColor3 = Color3.new(1,1,1)
  563. ammonution.TextStrokeTransparency = .1
  564. ammonution.Text = ('| '):rep(ammo)
  565. ammonution.TextXAlignment = 'Right'
  566. ammonution.ZIndex = 2
  567. ammonution.FontSize = 'Size18'
  568.  
  569. local ammonution2 = Instance.new('TextLabel', scrgui)
  570. ammonution2.Size = UDim2.new(0,150,0,50)
  571. ammonution2.Position = UDim2.new(1, -250, 1, -70)
  572. ammonution2.BackgroundTransparency = 1
  573. ammonution2.TextColor3 = Color3.new(.5,.5,.5)
  574. ammonution2.TextStrokeTransparency = .1
  575. ammonution2.TextXAlignment = 'Right'
  576. ammonution2.Text = ('| '):rep(ammo)
  577. ammonution2.FontSize = 'Size18'
  578.  
  579. local rel = Instance.new('TextButton', scrgui)
  580. rel.Size = UDim2.new(0,500,0,250)
  581. rel.Position = UDim2.new(.5, -250, .8, -250)
  582. rel.BackgroundTransparency = 1
  583. rel.TextColor3 = Color3.new(.7,0,0)
  584. rel.Visible = false
  585. rel.Text = 'Reload (r)'
  586. rel.FontSize = 'Size24'
  587.  
  588. rel.MouseButton1Down:connect(function()
  589. if ammo >= 14 or firing then return end
  590. dontclerpneck = true
  591. firing = true
  592. local dropammo = gun.Handle:clone()
  593. dropammo:ClearAllChildren()
  594. dropammo.CanCollide = true
  595. dropammo.BrickColor = BrickColor.Black()
  596. dropammo.Parent = workspace
  597. dropammo.CFrame = gun.Handle.CFrame
  598. local dropammo2 = dropammo:clone()
  599. dropammo2.Parent = workspace
  600. dropammo2.CFrame = gun2.Handle.CFrame * CFrame.new(0, -.5, 0)
  601. game:service'Debris':AddItem(dropammo,15)
  602. game:service'Debris':AddItem(dropammo2,15)
  603. wait(.5)
  604. reload:play()
  605. for i = 1, 65 do
  606. firing = true
  607. rscf = rsc0 * CFrame.Angles(math.pi/2, 0, 0)
  608. lscf = lsc0 * CFrame.new(1.2, 0, -.4) * CFrame.Angles(math.pi/4 + math.sin(angle)*math.random()/20, math.rad(30), math.pi/3.2)
  609. lm.C0 = clerp(lm.C0,lscf,speed)
  610. rm.C0 = clerp(rm.C0,rscf,speed)
  611. game:service'RunService'.RenderStepped:wait()
  612. end
  613. reload:play()
  614. for i = 1, 65 do
  615. firing = true
  616. rscf = rsc0 * CFrame.new(-1.2, 0, -.4) * CFrame.Angles(math.pi/4 + math.sin(angle)*math.random()/20, -math.rad(30), -math.pi/3.2)
  617. lscf = lsc0 * CFrame.Angles(math.pi/2, 0, 0)
  618. lm.C0 = clerp(lm.C0,lscf,speed)
  619. rm.C0 = clerp(rm.C0,rscf,speed)
  620. game:service'RunService'.RenderStepped:wait()
  621. end
  622. dontclerpneck = false
  623. firing = false
  624. ammo = 14
  625. ammonution.Text = ('| '):rep(ammo)
  626. end)
  627. tool.Selected:connect(function(mouse)
  628. Equipped = true
  629. bodygyro.Parent = torso
  630. bodygyro.cframe = torso.CFrame
  631. rs.Parent = nil
  632. ls.Parent = nil
  633. rm.Parent = torso
  634. lm.Parent = torso
  635. neck.C0 = CFrame.new(0, 1, 0)
  636. neck.C1 = CFrame.new(0, -0.5, 0)
  637. gunweld.Part0 = gun.Handle
  638. gunweld2.Part0 = gun2.Handle
  639. gunweld.Part1 = ra
  640. gunweld2.Part1 = la
  641. gunweld.C1 = CFrame.new(0, -.8, 0)
  642. gunweld.C0 = CFrame.Angles(math.pi/2-math.rad(15), 0, math.pi)
  643. gunweld2.C1 = CFrame.new(0, -.8, 0)
  644. gunweld2.C0 = CFrame.Angles(math.pi/2-math.rad(15), 0, math.pi)
  645. mouse.KeyDown:connect(function(k)
  646. if k == "r" then
  647. if ammo >= 14 or firing then return end
  648. dontclerpneck = true
  649. firing = true
  650. local dropammo = gun.Handle:clone()
  651. dropammo:ClearAllChildren()
  652. dropammo.CanCollide = true
  653. dropammo.BrickColor = BrickColor.Black()
  654. dropammo.Parent = workspace
  655. dropammo.CFrame = gun.Handle.CFrame
  656. local dropammo2 = dropammo:clone()
  657. dropammo2.Parent = workspace
  658. dropammo2.CFrame = gun2.Handle.CFrame * CFrame.new(0, -.5, 0)
  659. game:service'Debris':AddItem(dropammo,15)
  660. game:service'Debris':AddItem(dropammo2,15)
  661. wait(.5)
  662. reload:play()
  663. for i = 1, 65 do
  664. firing = true
  665. rscf = rsc0 * CFrame.Angles(math.pi/2, 0, 0)
  666. lscf = lsc0 * CFrame.new(1.2, 0, -.4) * CFrame.Angles(math.pi/4 + math.sin(angle)*math.random()/20, math.rad(30), math.pi/3.2)
  667. lm.C0 = clerp(lm.C0,lscf,speed)
  668. rm.C0 = clerp(rm.C0,rscf,speed)
  669. game:service'RunService'.RenderStepped:wait()
  670. end
  671. reload:play()
  672. for i = 1, 65 do
  673. firing = true
  674. rscf = rsc0 * CFrame.new(-1.2, 0, -.4) * CFrame.Angles(math.pi/4 + math.sin(angle)*math.random()/20, -math.rad(30), -math.pi/3.2)
  675. lscf = lsc0 * CFrame.Angles(math.pi/2, 0, 0)
  676. lm.C0 = clerp(lm.C0,lscf,speed)
  677. rm.C0 = clerp(rm.C0,rscf,speed)
  678. game:service'RunService'.RenderStepped:wait()
  679. end
  680. dontclerpneck = false
  681. firing = false
  682. ammo = 14
  683. ammonution.Text = ('| '):rep(ammo)
  684. end
  685. if k == "f" then
  686. light = not light
  687. local sound = Instance.new('Sound', head)
  688. sound.SoundId = "rbxassetid://115959318"
  689. sound.Volume = 1
  690. sound:play()
  691. game:service'Debris':AddItem(sound,1)
  692. end
  693. end)
  694. mouse.Button1Down:connect(function()
  695. if ammo <= 0 then
  696. local sound = Instance.new('Sound', head)
  697. sound.SoundId = "rbxassetid://132464034"
  698. sound.Volume = 1
  699. sound:play()
  700. game:service'Debris':AddItem(sound,1)
  701. end
  702. if firing or ammo <= 0 then return end
  703. ammo = ammo - 1
  704. ammonution.Text = ('| '):rep(ammo)
  705. firing = true
  706. local pa = Instance.new('Part')
  707. pa.CanCollide = false
  708. pa.Anchored = true
  709. pa.Locked = true
  710. pa.FormFactor = 'Custom'
  711. pa.BrickColor = BrickColor.new('New Yeller')
  712. pa.Size = Vector3.new(.2,3,.2)
  713. Instance.new('BlockMesh', pa).Scale = Vector3.new(.2,3,.2)
  714. local thegun
  715. if pistol == 1 then
  716. thegun = gun.BulletCase
  717. elseif pistol == 2 then
  718. thegun = gun2.BulletCase
  719. end
  720. local muzzle = Instance.new('PointLight', thegun)
  721. muzzle.Range = 12
  722. muzzle.Color = Color3.new(1,.6,.1)
  723. game:service'Debris':AddItem(muzzle, .05)
  724. local shell = pa:clone()
  725. shell:ClearAllChildren()
  726. shell.Anchored = false
  727. shell.CFrame = thegun.Parent.ShellCaseSpawner.CFrame
  728. shell.Size = Vector3.new(.2,.5,.2)
  729. shell.Parent = workspace
  730. shell.BrickColor = BrickColor.new('Bright yellow')
  731. shell.CanCollide = true
  732. game:service'Debris':AddItem(shell, 5)
  733. local bulletpos = thegun.Position
  734. local bulletvelocity = (mouse.Hit.p - bulletpos).unit*15
  735. local lastbulletpos = thegun.Position
  736. fire:play()
  737. coroutine.wrap(function()
  738. while game:service'RunService'.Stepped:wait() do
  739. lastbulletpos = bulletpos
  740. bulletpos = bulletpos + bulletvelocity
  741. local RayCast = Ray.new(lastbulletpos, (bulletpos - lastbulletpos))
  742. local hit, hitpos = workspace:FindPartOnRay(RayCast, char)
  743. if (torso.Position - pa.Position).magnitude > 800 then
  744. pa:Destroy()
  745. break
  746. end
  747. pa.Anchored = true
  748. pa.CFrame = CFrame.new(bulletpos, bulletpos+bulletvelocity) * CFrame.Angles(math.pi/2, 0, 0)
  749. if hit then
  750. local damage
  751. local sound = Instance.new('Sound', pa)
  752. sound.SoundId = "rbxassetid://166423137"
  753. sound.Pitch = 1.2+math.random()/3
  754. sound.Volume = 1
  755. sound:play()
  756. pa:Destroy()
  757. game:service'Debris':AddItem(sound,4)
  758. local ray = Ray.new(rootpart.Position, Vector3.new(0, -6, 0))
  759. local hitz, enz = workspace:FindPartOnRay(ray, char)
  760. local hum = hit and hit.Parent and hit.Parent:findFirstChild'Humanoid'
  761. if hum then
  762. damage = math.random(5,10)
  763. hum:TakeDamage(damage)
  764. end
  765. local hum = hit and hit.Parent and hit.Parent.Parent and hit.Parent.Parent:findFirstChild'Humanoid'
  766. if hum then
  767. damage = math.random(5,10)
  768. hum:TakeDamage(damage)
  769. end
  770. break
  771. end
  772. pa.Anchored = true
  773. pa.Parent = char
  774. pa.CFrame = CFrame.new(bulletpos, bulletpos+bulletvelocity) * CFrame.Angles(math.pi/2, 0, 0)
  775. end
  776. end)()
  777.  
  778. if pistol == 1 then
  779. pistol = 2
  780. for i = 1, 4 do
  781. rscf = CFrame.new(Vector3.new(rsc0.x, rsc0.y, rsc0.z), torso.CFrame:pointToObjectSpace(plrmouse.Hit.p)) * CFrame.new(0, 0, .5) * CFrame.Angles(math.pi/1.5 + math.sin(angle)*math.random()/20, 0, math.cos(angle)*math.random()/20)
  782. lscf = CFrame.new(Vector3.new(lsc0.x, lsc0.y, lsc0.z), torso.CFrame:pointToObjectSpace(plrmouse.Hit.p)) * CFrame.Angles(math.pi/2 + math.sin(angle)*math.random()/20, 0, -math.cos(angle)*math.random()/20)
  783. lm.C0 = clerp(lm.C0,lscf,speed)
  784. rm.C0 = clerp(rm.C0,rscf,speed)
  785. game:service'RunService'.RenderStepped:wait()
  786. end
  787. elseif pistol == 2 then
  788. for i = 1, 4 do
  789. rscf = CFrame.new(Vector3.new(rsc0.x, rsc0.y, rsc0.z), torso.CFrame:pointToObjectSpace(plrmouse.Hit.p)) * CFrame.Angles(math.pi/2 + math.sin(angle)*math.random()/20, 0, math.cos(angle)*math.random()/20)
  790. lscf = CFrame.new(Vector3.new(lsc0.x, lsc0.y, lsc0.z), torso.CFrame:pointToObjectSpace(plrmouse.Hit.p)) * CFrame.new(0, 0, .5) * CFrame.Angles(math.pi/1.5 + math.sin(angle)*math.random()/20, 0, -math.cos(angle)*math.random()/20)
  791. lm.C0 = clerp(lm.C0,lscf,speed)
  792. rm.C0 = clerp(rm.C0,rscf,speed)
  793. game:service'RunService'.RenderStepped:wait()
  794. end
  795. pistol = 1
  796. end
  797. firing = false
  798. end)
  799. end)
  800. tool.Deselected:connect(function()
  801. Equipped = false
  802. rm.Parent = nil
  803. lm.Parent = nil
  804. rs.Parent = torso
  805. ls.Parent = torso
  806. neck.C0 = origneckc0
  807. neck.C1 = origneckc1
  808. lm.C0 = lsc0
  809. rm.C0 = rsc0
  810. gunweld.Part0 = gun.BulletCase
  811. gunweld.Part1 = holsters.HolsterWeldTo
  812. gunweld.C0 = CFrame.new()
  813. gunweld.C1 = CFrame.new()
  814. gunweld2.Part0 = gun2.BulletCase
  815. gunweld2.Part1 = holsters.HolsterWeldTo2
  816. gunweld2.C0 = CFrame.new()
  817. gunweld2.C1 = CFrame.new()
  818. bodygyro.Parent = nil
  819. end)
  820.  
  821. game:service'RunService'.RenderStepped:connect(function()
  822. if Equipped then
  823. if ammo <= 0 then
  824. rel.Visible = true
  825. else
  826. rel.Visible = false
  827. end
  828. if light then
  829. gunlight.Enabled = true
  830. gunlight2.Enabled = true
  831. else
  832. gunlight.Enabled = false
  833. gunlight2.Enabled = false
  834. end
  835. angle = angle + (0.05+math.random()/20)
  836. local rscf = rsc0
  837. local lscf = lsc0
  838. local ncf = neckc0
  839. local rmx,rmy,rmz = rm.C0:toEulerAnglesXYZ()
  840. if rmz >= 1 then
  841. bodygyro.cframe = bodygyro.cframe * CFrame.Angles(0, -rmz/5, 0)
  842. elseif rmz <= -1 then
  843. bodygyro.cframe = bodygyro.cframe * CFrame.Angles(0, -rmz/5, 0)
  844. end
  845. rscf = CFrame.new(Vector3.new(rsc0.x, rsc0.y, rsc0.z), torso.CFrame:pointToObjectSpace(plrmouse.Hit.p)) * CFrame.Angles(math.pi/2 + math.sin(angle)*math.random()/20, 0, math.cos(angle)*math.random()/20)
  846. lscf = CFrame.new(Vector3.new(lsc0.x, lsc0.y, lsc0.z), torso.CFrame:pointToObjectSpace(plrmouse.Hit.p)) * CFrame.Angles(math.pi/2 + math.sin(angle)*math.random()/20, 0, -math.cos(angle)*math.random()/20)
  847. ncf = neckc0 * CFrame.new(Vector3.new(), torso.CFrame:pointToObjectSpace(plrmouse.Hit.p))
  848. if not firing then
  849. lm.C0 = clerp(lm.C0,lscf,speed)
  850. rm.C0 = clerp(rm.C0,rscf,speed)
  851. end
  852. if not dontclerpneck then
  853. neck.C0 = clerp(neck.C0,ncf,speed)
  854. end
  855. end
  856. if light and not Equipped then
  857. gunlight.Enabled = false
  858. gunlight2.Enabled = false
  859. end
  860. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement