Advertisement
deadropz

Untitled

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