NYXRBLX

Untitled

Sep 9th, 2016
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.38 KB | None | 0 0
  1. wait();
  2. plr = game.Players.LocalPlayer
  3. char = plr.Character
  4. Humans = char:findFirstChild("Humanoid")
  5. BulletTable,Disposables,Lasers = {},{},{}
  6. Clips,Bullets,CurrentGun = 850,20,1
  7. Reloading,FlashLight,LaserLight,Silenced,ToolName,LaserColor,plr,char = false,false,false,false,"Dual Pistols","Really Gold",game.Players.LocalPlayer,plr.Character
  8. V3,BC,CF = Vector3.new,BrickColor.new,CFrame
  9. for i,v in pairs(plr.Character:GetChildren()) do
  10. if v:IsA("Model") and v.Name == "MainModel" then
  11. v:Remove()
  12. end
  13. end
  14. for i,v in pairs(plr.Backpack:GetChildren()) do
  15. if v.Name == ToolName then
  16. v:Remove()
  17. end
  18. end
  19. Bin = Instance.new("HopperBin",plr.Backpack)
  20. Bin.Name = ToolName
  21. MainModel,GunModelOne,GunModelTwo,SheathOne,SheathTwo = Instance.new("Model"),Instance.new("Model"),Instance.new("Model"),Instance.new("Model"),Instance.new("Model")
  22. MainModel.Name,GunModelOne.Name,GunModelTwo.Name,SheathOne.Name,SheathTwo.Name = "MainModel","GunModelOne","GunModelTwo","SheathOne","SheathTwo"
  23. MainModel.Parent,GunModelOne.Parent,GunModelTwo.Parent,SheathOne.Parent,SheathTwo.Parent = char,MainModel,MainModel,MainModel,MainModel
  24. L1,L2,L3,L4 = Instance.new("SpotLight"), Instance.new("SpotLight"), Instance.new("SpotLight"), Instance.new("SpotLight")
  25. L1.Enabled,L2.Enabled,L3.Enabled,L4.Enabled = false,false,false,false
  26. L1.Brightness,L2.Brightness,L3.Brightness,L4.Brightness = 60,60,40,40
  27. L1.Range,L2.Range,L3.Range,L4.Range = 25,25,40,40
  28. L1.Color,L2.Color,L3.Color,L4.Color = BrickColor.new("Neon orange").Color,BrickColor.new("Neon orange").Color,BrickColor.new("White").Color,BrickColor.new("White").Color
  29. L3.Name,L4.Name = "Safe","Safe"
  30. script.Parent = MainModel
  31. function AddPart(name,parent,s1,s2,s3,color)
  32. p=Instance.new("Part",parent)
  33. p.Name=name
  34. p.formFactor="Custom"
  35. p.Anchored=false
  36. p.Locked=true
  37. p.CanCollide=false
  38. p.Size=Vector3.new(s1,s2,s3)
  39. p.TopSurface = "Smooth"
  40. p.BottomSurface = "Smooth"
  41. p.BrickColor=BrickColor.new(color)
  42. Instance.new("BlockMesh",p).Name = "Mesh"
  43. p:BreakJoints()
  44. return p
  45. end
  46. function AddWeld(name,parent,p1,p0,c1,c0)
  47. we=Instance.new("Weld",parent)
  48. we.Part1=p1
  49. we.Part0=p0
  50. we.C1=c0
  51. we.C0=c1
  52. return we
  53. end
  54. --Gets a bit confusing down below :3
  55. HandleOne,HandleTwo = AddPart("HandleLeft",GunModelOne,.02,1,.4,"Silver"),AddPart("HandleLeft",GunModelTwo,.02,1,.4,"Silver")
  56. HandleWeldLeft,HandleWeldRight = AddWeld("Weld",HandleOne,HandleOne,char["Torso"],CF.new(-1,0,-1),CF.Angles(math.rad(45),math.rad(180),0)),AddWeld("Weld",HandleTwo,HandleTwo,char["Torso"],CF.new(1,0,-1),CF.Angles(math.rad(45),math.rad(180),0))
  57. HandLeft = AddPart("HandLeft",MainModel,1,1,1,"Silver")
  58. HandRight = AddPart("HandRight",MainModel,1,1,1,"Silver")
  59. HandLeft.Transparency,HandRight.Transparency = 1,1
  60. AddWeld("Weld",HandLeft,HandLeft,char["Left Arm"],CF.new(0,-1,0),CF.Angles(math.rad(90),0,0))
  61. AddWeld("Weld",HandRight,HandRight,char["Right Arm"],CF.new(0,-1,0),CF.Angles(math.rad(90),0,0))
  62. PA1 = AddPart("Part",GunModelOne,.3,.1,1,"Silver")
  63. PA1.Mesh.Scale = V3(1,.6,1)
  64. WPA1 = AddWeld("Weld",PA1,PA1,HandleOne,CF.new(0,0.5,-.3),CF.new(0,0,0))
  65. PA2 = AddPart("Part",GunModelOne,.1,.5,.1,"Really Gold")
  66. PA2.Mesh:Remove()
  67. Instance.new("CylinderMesh",PA2).Scale = V3(.5,1,.5)
  68. WPA2 = AddWeld("Weld",PA2,PA2,HandleOne,CF.new(0,.6,-.9),CF.Angles(math.rad(90),0,0))
  69. PA3 = AddPart("Part",GunModelOne,.1,1.3,.1,"Really Gold")
  70. PA3.Mesh:Remove()
  71. Instance.new("CylinderMesh",PA3).Scale = V3(.7,1,.8)
  72. WPA3 = AddWeld("Weld",PA3,PA3,HandleOne,CF.new(0,.75,-.6),CF.Angles(math.rad(90),0,0))
  73. PA4 = AddPart("Part",GunModelOne,.3,.1,1.2,"Silver")
  74. PA4.Mesh.Scale = V3(1,1,1)
  75. WPA4 = AddWeld("Weld",PA4,PA4,HandleOne,CF.new(0,.65,-.5),CF.new(0,0,0))
  76. PA5 = AddPart("Part",GunModelOne,.3,.1,.3,"Silver")
  77. PA5.Mesh:Remove()
  78. Instance.new("CylinderMesh",PA5).Scale = V3(1,1,1)
  79. WPA5 = AddWeld("Weld",PA5,PA5,PA4,CF.new(0,0.1,-0.5),CF.Angles(math.rad(90),0,0))
  80. PA6 = AddPart("Part",GunModelOne,.3,.5,.3,"Silver")
  81. PA6.Mesh:Remove()
  82. Instance.new("CylinderMesh",PA6).Scale = V3(1,1,1)
  83. WPA6 = AddWeld("Weld",PA6,PA6,PA4,CF.new(0,0.1,0.35),CF.Angles(math.rad(90),0,0))
  84. PA7 = AddPart("Part",GunModelOne,.1,.1,.5,"Gold")
  85. PA7.Mesh:Remove()
  86. Instance.new("CylinderMesh",PA7).Scale = V3(.9,.9,1)
  87. WPA7 = AddWeld("Weld",PA7,PA7,PA3,CF.new(0,-0.31,0),CF.Angles(0,0,0))
  88. BamOne = Instance.new("Sound",PA7)
  89. BamOne.Pitch,BamOne.Volume,BamOne.SoundId = 1.4,.5,"http://www.roblox.com/asset/?id=94191736"
  90. PA8 = AddPart("Part",GunModelOne,.3,.1,.25,"Silver")
  91. PA8.Mesh:Remove()
  92. sm = Instance.new("SpecialMesh",PA8)
  93. sm.MeshType = "Wedge"
  94. sm.Scale = V3(.38,.6,1)
  95. WPA8 = AddWeld("Weld",PA8,PA8,PA6,CF.new(0.1,-.3,-0.07),CF.Angles(math.rad(180),0,0))
  96. PA9 = AddPart("Part",GunModelOne,.3,.1,.25,"Silver")
  97. PA9.Mesh:Remove()
  98. sm = Instance.new("SpecialMesh",PA9)
  99. sm.MeshType = "Wedge"
  100. sm.Scale = V3(.35,.6,1)
  101. WPA9 = AddWeld("Weld",PA9,PA9,PA6,CF.new(-0.1,-.3,-0.07),CF.Angles(math.rad(180),0,0))
  102. PA10 = AddPart("Part",GunModelOne,.3,.1,.25,"Silver")
  103. PA10.Mesh:Remove()
  104. sm = Instance.new("SpecialMesh",PA10)
  105. sm.MeshType = "Wedge"
  106. sm.Scale = V3(.35,.6,1)
  107. WPA10 = AddWeld("Weld",PA10,PA10,PA6,CF.new(0,-.34,0),CF.Angles(math.rad(100),0,0))
  108. PA11 = AddPart("Part",GunModelOne,.1,.3,.1,"Silver")
  109. PA11.Mesh:Remove()
  110. sm = Instance.new("SpecialMesh",PA11)
  111. sm.MeshType = "Wedge"
  112. sm.Scale = V3(.5,1,.5)
  113. WPA11 = AddWeld("Weld",PA11,PA11,HandleOne,CF.new(0,.25,-.35),CF.Angles(math.rad(90),0,0))
  114. PA12 = AddPart("Part",GunModelOne,.1,.1,.3,"Silver")
  115. PA12.Mesh:Remove()
  116. sm = Instance.new("SpecialMesh",PA12)
  117. sm.MeshType = "Wedge"
  118. sm.Scale = V3(.5,.5,.5)
  119. WPA12 = AddWeld("Weld",PA12,PA12,HandleOne,CF.new(0,.37,-.55),CF.Angles(math.rad(90),0,0))
  120. PA13 = AddPart("Part",GunModelOne,.1,.1,.3,"Silver")
  121. PA13.Mesh:Remove()
  122. sm = Instance.new("SpecialMesh",PA13)
  123. sm.MeshType = "Wedge"
  124. sm.Scale = V3(.5,.5,.5)
  125. WPA13 = AddWeld("Weld",PA13,PA13,HandleOne,CF.new(0,.37,-.45),CF.Angles(math.rad(270),0,0))
  126. PA14 = AddPart("Part",GunModelOne,.1,.1,.3,"Silver")
  127. PA14.Mesh:Remove()
  128. sm = Instance.new("SpecialMesh",PA14)
  129. sm.MeshType = "Wedge"
  130. sm.Scale = V3(.5,.5,.5)
  131. WPA14 = AddWeld("Weld",PA14,PA14,HandleOne,CF.new(0,.4,-.3),CF.Angles(math.rad(55),0,0))
  132. PA15 = AddPart("Part",GunModelOne,.1,.3,.3,"Silver")
  133. PA15.Mesh:Remove()
  134. sm = Instance.new("SpecialMesh",PA15)
  135. sm.MeshType = "Wedge"
  136. sm.Scale = V3(1,1,.25)
  137. WPA15 = AddWeld("Weld",PA15,PA15,HandleOne,CF.new(0,-0.35,-.23),CF.Angles(math.rad(0),0,0))
  138. PA16 = AddPart("Part",GunModelOne,.02,1,.3,"Really Gold")
  139. PA16.Mesh.Scale = V3(1.1,.9,1)
  140. WPA16 = AddWeld("Weld",PA16,PA16,HandleOne,CF.new(0,0,0),CF.new(0,0,0))
  141. PA17 = AddPart("Part",GunModelOne,.1,.3,.3,"Really Gold")
  142. PA17.Mesh:Remove()
  143. sm = Instance.new("SpecialMesh",PA17)
  144. sm.MeshType = "Wedge"
  145. sm.Scale = V3(1.1,1,.25)
  146. WPA17 = AddWeld("Weld",PA17,PA17,PA15,CF.new(0,0.05,0.05),CF.Angles(math.rad(0),0,0))
  147. PA18 = AddPart("Part",GunModelOne,.1,.3,.1,"Silver")
  148. PA18.Mesh:Remove()
  149. Instance.new("CylinderMesh",PA18).Scale = V3(.5,.8,.5)
  150. WPA18 = AddWeld("Weld",PA18,PA18,HandleOne,CF.new(0,0.2,0),CF.Angles(math.rad(90),math.rad(90),0))
  151. PA19 = AddPart("Part",GunModelOne,.1,.3,.1,"Silver")
  152. PA19.Mesh:Remove()
  153. Instance.new("CylinderMesh",PA19).Scale = V3(.5,1,.5)
  154. WPA19 = AddWeld("Weld",PA19,PA19,PA3,CF.new(0,0.51,0),CF.Angles(math.rad(0),math.rad(0),0))
  155. PA20 = AddPart("Part",GunModelOne,.1,.3,.1,"Silver")
  156. PA20.Mesh:Remove()
  157. PA20.Transparency = 1
  158. L2.Parent = PA20
  159. L3.Parent = PA20
  160. WPA20 = AddWeld("Weld",PA20,PA20,PA3,CF.new(0,0.6,0),CF.Angles(math.rad(261),0,0))
  161. PA21 = AddPart("Part",GunModelOne,.1,.25,.1,"Gold")
  162. WPA21 = AddWeld("Weld",PA21,PA21,PA3,CF.new(0,0.1,-0.35),CF.Angles(math.rad(0),0,0))
  163. PA22 = AddPart("Part",GunModelOne,.1,.35,.3,"Gold")
  164. WPA22 = AddWeld("Weld",PA21,PA21,PA22,CF.new(0,0,0.2),CF.Angles(math.rad(0),0,0))
  165. PA23 = AddPart("Part",GunModelOne,.1,.35,.1,"Silver")
  166. PA23.Mesh:Remove()
  167. PA23.Transparency = 0.4
  168. Instance.new("CylinderMesh",PA23).Scale = Vector3.new(0.5,1,0.5)
  169. WPA23 = AddWeld("Weld",PA22,PA22,PA23,CF.new(0,-0.03,0.05),CF.Angles(math.rad(0),0,0))
  170. PA24 = AddPart("Part",GunModelOne,.1,.35,.1,"Really red")
  171. PA24.Mesh:Remove()
  172. PA24.Transparency = 1
  173. Instance.new("CylinderMesh",PA24).Scale = Vector3.new(0.5,1,0.5)
  174. WPA24 = AddWeld("Weld",PA22,PA22,PA24,CF.new(0,-0.03,-0.06),CF.Angles(math.rad(90),0,0))
  175. PA26 = AddPart("Part",GunModelOne,.1,.35,.1,LaserColor)
  176. PA26.Mesh:Remove()
  177. PA26.Transparency = 0.4
  178. Instance.new("CylinderMesh",PA26).Scale = Vector3.new(0.5,1,0.5)
  179. WPA26 = AddWeld("Weld",PA22,PA22,PA26,CF.new(0,-0.03,-0.06),CF.Angles(math.rad(0),0,0))
  180. --Gun 2 Below
  181. PB1 = AddPart("Part",GunModelTwo,.3,.1,1,"Silver")
  182. PB1.Mesh.Scale = V3(1,.6,1)
  183. WPB1 = AddWeld("Weld",PB1,PB1,HandleTwo,CF.new(0,0.5,-.3),CF.new(0,0,0))
  184. PB2 = AddPart("Part",GunModelTwo,.1,.5,.1,"Really Gold")
  185. PB2.Mesh:Remove()
  186. Instance.new("CylinderMesh",PB2).Scale = V3(.5,1,.5)
  187. WPB2 = AddWeld("Weld",PB2,PB2,HandleTwo,CF.new(0,.6,-.9),CF.Angles(math.rad(90),0,0))
  188. PB3 = AddPart("Part",GunModelTwo,.1,1.3,.1,"Really Gold")
  189. PB3.Mesh:Remove()
  190. Instance.new("CylinderMesh",PB3).Scale = V3(.7,1,.8)
  191. WPB3 = AddWeld("Weld",PB3,PB3,HandleTwo,CF.new(0,.75,-.6),CF.Angles(math.rad(90),0,0))
  192. PB4 = AddPart("Part",GunModelTwo,.3,.1,1.2,"Silver")
  193. PB4.Mesh.Scale = V3(1,1,1)
  194. WPB4 = AddWeld("Weld",PB4,PB4,HandleTwo,CF.new(0,.65,-.5),CF.new(0,0,0))
  195. PB5 = AddPart("Part",GunModelTwo,.3,.1,.3,"Silver")
  196. PB5.Mesh:Remove()
  197. Instance.new("CylinderMesh",PB5).Scale = V3(1,1,1)
  198. WPB5 = AddWeld("Weld",PB5,PB5,PB4,CF.new(0,0.1,-0.5),CF.Angles(math.rad(90),0,0))
  199. PB6 = AddPart("Part",GunModelTwo,.3,.5,.3,"Silver")
  200. PB6.Mesh:Remove()
  201. Instance.new("CylinderMesh",PB6).Scale = V3(1,1,1)
  202. WPB6 = AddWeld("Weld",PB6,PB6,PB4,CF.new(0,0.1,0.35),CF.Angles(math.rad(90),0,0))
  203. PB7 = AddPart("Part",GunModelTwo,.1,.1,.5,"Gold")
  204. PB7.Mesh:Remove()
  205. Instance.new("CylinderMesh",PB7).Scale = V3(.9,.9,1)
  206. WPB7 = AddWeld("Weld",PB7,PB7,PB3,CF.new(0,-0.31,0),CF.Angles(0,0,0))
  207. BamTwo = Instance.new("Sound",PB7)
  208. BamTwo.Pitch,BamTwo.Volume,BamTwo.SoundId = 1.4,.5,"http://www.roblox.com/asset/?id=94191736"
  209. PB8 = AddPart("Part",GunModelTwo,.3,.1,.25,"Silver")
  210. PB8.Mesh:Remove()
  211. sm = Instance.new("SpecialMesh",PB8)
  212. sm.MeshType = "Wedge"
  213. sm.Scale = V3(.38,.6,1)
  214. WPB8 = AddWeld("Weld",PB8,PB8,PB6,CF.new(0.1,-.3,-0.07),CF.Angles(math.rad(180),0,0))
  215. PB9 = AddPart("Part",GunModelOne,.3,.1,.25,"Silver")
  216. PB9.Mesh:Remove()
  217. sm = Instance.new("SpecialMesh",PB9)
  218. sm.MeshType = "Wedge"
  219. sm.Scale = V3(.35,.6,1)
  220. WPB9 = AddWeld("Weld",PB9,PB9,PB6,CF.new(-0.1,-.3,-0.07),CF.Angles(math.rad(180),0,0))
  221. PB10 = AddPart("Part",GunModelTwo,.3,.1,.25,"Silver")
  222. PB10.Mesh:Remove()
  223. sm = Instance.new("SpecialMesh",PB10)
  224. sm.MeshType = "Wedge"
  225. sm.Scale = V3(.35,.6,1)
  226. WPB10 = AddWeld("Weld",PB10,PB10,PB6,CF.new(0,-.34,0),CF.Angles(math.rad(100),0,0))
  227. PB11 = AddPart("Part",GunModelTwo,.1,.3,.1,"Silver")
  228. PB11.Mesh:Remove()
  229. sm = Instance.new("SpecialMesh",PB11)
  230. sm.MeshType = "Wedge"
  231. sm.Scale = V3(.5,1,.5)
  232. WPB11 = AddWeld("Weld",PB11,PB11,HandleTwo,CF.new(0,.25,-.35),CF.Angles(math.rad(90),0,0))
  233. PB12 = AddPart("Part",GunModelTwo,.1,.1,.3,"Silver")
  234. PB12.Mesh:Remove()
  235. sm = Instance.new("SpecialMesh",PB12)
  236. sm.MeshType = "Wedge"
  237. sm.Scale = V3(.5,.5,.5)
  238. WPB12 = AddWeld("Weld",PB12,PB12,HandleTwo,CF.new(0,.37,-.55),CF.Angles(math.rad(90),0,0))
  239. PB13 = AddPart("Part",GunModelTwo,.1,.1,.3,"Silver")
  240. PB13.Mesh:Remove()
  241. sm = Instance.new("SpecialMesh",PB13)
  242. sm.MeshType = "Wedge"
  243. sm.Scale = V3(.5,.5,.5)
  244. WPB13 = AddWeld("Weld",PB13,PB13,HandleTwo,CF.new(0,.37,-.45),CF.Angles(math.rad(270),0,0))
  245. PB14 = AddPart("Part",GunModelTwo,.1,.1,.3,"Silver")
  246. PB14.Mesh:Remove()
  247. sm = Instance.new("SpecialMesh",PB14)
  248. sm.MeshType = "Wedge"
  249. sm.Scale = V3(.5,.5,.5)
  250. WPB14 = AddWeld("Weld",PB14,PB14,HandleTwo,CF.new(0,.4,-.3),CF.Angles(math.rad(55),0,0))
  251. PB15 = AddPart("Part",GunModelTwo,.1,.3,.3,"Silver")
  252. PB15.Mesh:Remove()
  253. sm = Instance.new("SpecialMesh",PB15)
  254. sm.MeshType = "Wedge"
  255. sm.Scale = V3(1,1,.25)
  256. WPB15 = AddWeld("Weld",PB15,PB15,HandleTwo,CF.new(0,-0.35,-.23),CF.Angles(math.rad(0),0,0))
  257. PB16 = AddPart("Part",GunModelTwo,.02,1,.3,"Really Gold")
  258. PB16.Mesh.Scale = V3(1.1,.9,1)
  259. WPB16 = AddWeld("Weld",PB16,PB16,HandleTwo,CF.new(0,0,0),CF.new(0,0,0))
  260. PB17 = AddPart("Part",GunModelTwo,.1,.3,.3,"Really Gold")
  261. PB17.Mesh:Remove()
  262. sm = Instance.new("SpecialMesh",PB17)
  263. sm.MeshType = "Wedge"
  264. sm.Scale = V3(1.1,1,.25)
  265. WPB17 = AddWeld("Weld",PB17,PB17,PB15,CF.new(0,0.05,0.05),CF.Angles(math.rad(0),0,0))
  266. PB18 = AddPart("Part",GunModelTwo,.1,.3,.1,"Silver")
  267. PB18.Mesh:Remove()
  268. Instance.new("CylinderMesh",PB18).Scale = V3(.5,.8,.5)
  269. WPB18 = AddWeld("Weld",PB18,PB18,HandleTwo,CF.new(0,0.2,0),CF.Angles(math.rad(90),math.rad(90),0))
  270. PB19 = AddPart("Part",GunModelTwo,.1,.3,.1,"Silver")
  271. PB19.Mesh:Remove()
  272. Instance.new("CylinderMesh",PB19).Scale = V3(.5,1,.5)
  273. WPB19 = AddWeld("Weld",PB19,PB19,PB3,CF.new(0,0.51,0),CF.Angles(math.rad(0),math.rad(0),0))
  274. PB20 = AddPart("Part",GunModelTwo,.1,.3,.1,"Silver")
  275. PB20.Mesh:Remove()
  276. PB20.Transparency = 1
  277. L1.Parent = PB20
  278. L4.Parent = PB20
  279. WPB20 = AddWeld("Weld",PB20,PB20,PB3,CF.new(0,0.6,0),CF.Angles(math.rad(261),0,0))
  280. PB21 = AddPart("Part",GunModelTwo,.1,.25,.1,"Gold")
  281. WPB21 = AddWeld("Weld",PB21,PB21,PB3,CF.new(0,0.1,-0.35),CF.Angles(math.rad(0),0,0))
  282. PB22 = AddPart("Part",GunModelTwo,.1,.35,.3,"Gold")
  283. WPB22 = AddWeld("Weld",PB21,PB21,PB22,CF.new(0,0,0.2),CF.Angles(math.rad(0),0,0))
  284. PB23 = AddPart("Part",GunModelTwo,.1,.35,.1,"Silver")
  285. PB23.Mesh:Remove()
  286. PB23.Transparency = 0.4
  287. Instance.new("CylinderMesh",PB23).Scale = Vector3.new(0.5,1,0.5)
  288. WPB23 = AddWeld("Weld",PB22,PB22,PB23,CF.new(0,-0.03,0.05),CF.Angles(math.rad(0),0,0))
  289. PB24 = AddPart("Part",GunModelTwo,.1,.35,.1,"Silver")
  290. PB24.Mesh:Remove()
  291. PB24.Transparency = 0.4
  292. Instance.new("CylinderMesh",PB24).Scale = Vector3.new(0.5,1,0.5)
  293. WPB24 = AddWeld("Weld",PB22,PB22,PB24,CF.new(0,-0.03,-0.06),CF.Angles(math.rad(90),0,0))
  294. PB26 = AddPart("Part",GunModelOne,.1,.35,.1,LaserColor)
  295. PB26.Mesh:Remove()
  296. PB26.Transparency = 0.4
  297. Instance.new("CylinderMesh",PB26).Scale = Vector3.new(0.5,1,0.5)
  298. WPB26 = AddWeld("Weld",PB22,PB22,PB26,CF.new(0,-0.03,-0.06),CF.Angles(math.rad(0),0,0))
  299. --End Of gun creation.
  300. --Holder's Creation
  301. PC1 = AddPart("Part",SheathOne,.5,1.5,.7,"Silver")
  302. WPC1 = AddWeld("Weld",PC1,PC1,char.Torso,CF.new(-1,0,0),CF.Angles(math.rad(45),0,0))
  303. --Holder Two
  304. PD1 = AddPart("Part",SheathTwo,.5,1.5,.7,"Silver")
  305. WPD1 = AddWeld("Weld",PD1,PD1,char.Torso,CF.new(1,0,0),CF.Angles(math.rad(45),0,0))
  306. --End Of Holders
  307. --Extras
  308. PE1 = AddPart("Part",MainModel,2.1,.5,1.1,"Silver")
  309. WPE1 = AddWeld("Weld",PE1,PE1,char.Torso,CF.new(0,-0.8,0),CF.Angles(math.rad(0),0,0))
  310. PE2 = AddPart("Part",MainModel,.8,.8,.7,"Silver")
  311. WPE2 = AddWeld("Weld",PE2,PE2,PE1,CF.new(0.4,-0.13,.9),CF.Angles(math.rad(0),0,0))
  312. PE3 = AddPart("Part",MainModel,.75,.8,.65,"Silver")
  313. WPE3 = AddWeld("Weld",PE3,PE3,PE2,CF.new(0,0.02,0),CF.Angles(math.rad(0),0,0))
  314. PE4 = AddPart("Part",MainModel,2.2,.25,1.2,"Silver")
  315. WPE4 = AddWeld("Weld",PE4,PE4,PE1,CF.new(0,0,0),CF.Angles(math.rad(0),0,0))
  316. ch,player = char,plr
  317. RW,LW,HW,RLG,LLG = Instance.new("Motor"),Instance.new("Motor"),Instance.new("Motor"),Instance.new("Motor"),Instance.new("Motor")
  318. RSH, LSH, NCK, LG2, LG1 = ch.Torso["Right Shoulder"], ch.Torso["Left Shoulder"], ch.Torso["Neck"], ch.Torso["Right Hip"], ch.Torso["Left Hip"]
  319. RW.C0,RW.C1,RW.Parent,RW.Part0 = CFrame.new(1.5, 0.5, 0),CFrame.new(0, 0.5, 0),MainModel,ch.Torso
  320. LW.C0,LW.C1,LW.Parent,LW.Part0 = CFrame.new(-1.5, 0.5, 0),CFrame.new(0, 0.5, 0),MainModel,ch.Torso
  321. HW.C1,HW.Parent,HW.Part0 = CFrame.new(0,-.7,0),MainModel,ch.Torso
  322. RLG.C1,RLG.Part0,RLG.Parent = CFrame.new(-.5,2,0),ch.Torso,MainModel
  323. LLG.C1,LLG.Part0,LLG.Parent = CFrame.new(.5,2,0),ch.Torso,MainModel
  324. function RWFunc()
  325. RW.Part1 = ch["Right Arm"]
  326. RSH.Part1 = nil
  327. end
  328. function LWFunc()
  329. LW.Part1 = ch["Left Arm"]
  330. LSH.Part1 = nil
  331. end
  332. function RWRem()
  333. RW.Part1 = nil
  334. RSH.Part1 = ch["Right Arm"]
  335. end
  336. function LWRem()
  337. LW.Part1 = nil
  338. LSH.Part1 = ch["Left Arm"]
  339. end
  340. function HWFunc()
  341. NCK.Part1 = nil
  342. HW.Part1 = ch.Head
  343. end
  344. function HWRem()
  345. NCK.Part1 = ch.Head
  346. HW.Part1 = nil
  347. end
  348. function Leg1Func()
  349. l1=ch["Left Leg"]
  350. l1.Name = "Left Legg"
  351. l1.CanCollide = true
  352. LG1.Part1 = nil
  353. LLG.Part1 = l1
  354. end
  355. function Leg2Func()
  356. l2=ch["Right Leg"]
  357. l2.Name = "Right Legg"
  358. l2.CanCollide = true
  359. LG2.Part1 = nil
  360. RLG.Part1 = l2
  361. end
  362. function Leg1Rem()
  363. l1=ch["Left Legg"]
  364. l1.Name = "Left Leg"
  365. l1.CanCollide = false
  366. LG1.Part1 = l1
  367. LLG.Part1 = nil
  368. end
  369. function Leg2Rem()
  370. l2=ch["Right Legg"]
  371. l2.Name = "Right Leg"
  372. l2.CanCollide = false
  373. LG2.Part1 = l2
  374. RLG.Part1 = nil
  375. end
  376. function Unequip()
  377. RWRem()
  378. LWRem()
  379. HWRem()
  380. HandleWeldLeft.Part0 = char.Torso
  381. HandleWeldRight.Part0 = char.Torso
  382. HandleWeldLeft.C0 = CF.Angles(math.rad(45),math.rad(180),0)
  383. HandleWeldLeft.C1 = CF.new(-1,.6,-.7)
  384. HandleWeldRight.C0 = CF.Angles(math.rad(45),math.rad(180),0)
  385. HandleWeldRight.C1 = CF.new(1,.6,-.7)
  386. pcall(function() char.Torso.TurnGyro:Remove() end)
  387. end
  388. Unequip()
  389. function Equip()
  390. HandleWeldLeft.C0 = CF.Angles(0,0,0)
  391. HandleWeldLeft.C1 = CF.new(0,0,0)
  392. HandleWeldRight.C0 = CF.Angles(0,0,0)
  393. HandleWeldRight.C1 = CF.new(0,0,0)
  394. HandleWeldRight.Part0 = HandRight
  395. HandleWeldLeft.Part0 = HandLeft
  396. RWFunc()
  397. LWFunc()
  398. HWFunc()
  399. end
  400. function CreateBullet(Part)
  401. Bullet = Instance.new("Part",char.Torso)
  402. Bullet.Name = "Bullet"
  403. Bullet.formFactor = "Custom"
  404. Bullet.CanCollide = false
  405. Bullet.Anchored = true
  406. Bullet.Size = V3(.2,.2,0.7)
  407. Bullet.CFrame = Part.CFrame * CF.Angles(270,0,0)
  408. Bullet.Anchored = true
  409. Bullet.BrickColor = BrickColor.new("Silver")
  410. Bullet.Reflectance = 0.3
  411. Bullet:BreakJoints()
  412. --M = Instance.new("SpecialMesh",Bullet)
  413. --M.MeshType = "Sphere"
  414. table.insert(BulletTable,Bullet)
  415. game.Debris:AddItem(Bullet,10)
  416. end
  417. function DisplayDamage(dmg,head)
  418. if head and dmg then
  419. local Model = Instance.new("Model")
  420. local Part = Instance.new("Part",Model)
  421. local Human = Instance.new("Humanoid")
  422. Instance.new("BlockMesh",Part)
  423. --
  424. Model.Name = tostring(dmg)
  425. Human.Parent = Model
  426. Human.MaxHealth = 0
  427. Human.Health = 0
  428. Part.formFactor = "Custom"
  429. Part.Size = Vector3.new(0.8,0.3,0.8)
  430. Part.CanCollide=false
  431. Part.CFrame = CFrame.new(head.Position) * CFrame.new(0, 3, 0)
  432. Part.Name = "Head"
  433. if Model.Name:find("Critical") then
  434. Part.BrickColor = BrickColor.new("Bright yellow")
  435. else
  436. Part.BrickColor = BrickColor.new("Really red")
  437. end
  438. local bp = Instance.new("BodyPosition")
  439. bp.P = 14000
  440. bp.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  441. bp.position = head.Position + Vector3.new(math.random(1,6), math.random(5,7), math.random(1,6))
  442. coroutine.resume(coroutine.create(function()
  443. wait()
  444. Model.Parent = workspace
  445. bp.Parent = Part
  446. wait(1.4)
  447. Model:remove()
  448. end))
  449. end
  450. end
  451. function UnCrouch()
  452. Leg1Rem()
  453. Leg2Rem()
  454. end
  455. function Crouch()
  456. Leg2Func()
  457. Leg1Func()
  458. LLG.C1 = CF.new(.5,.5,1.5) * CF.Angles(math.rad(90),0,0)
  459. RLG.C1 = CF.new(-.5,1,1) * CF.Angles(math.rad(0),0,0)
  460. end
  461. function DoReload()
  462. if Reloading then return end
  463. pcall(function()
  464. gui = plr.PlayerGui:findFirstChild("Ammo")
  465. for i,v in pairs(gui:GetChildren()) do
  466. if v.Name == "Reload Gun" then
  467. v:Remove()
  468. end
  469. end
  470. end)
  471. Reloading = true
  472. Clips = Clips - 1
  473. wait(.1)
  474. EmptiedClip(HandleOne)
  475. EmptiedClip(HandleTwo)
  476. ReloadAnim()
  477. Reloading = false
  478. end
  479. function Flash(Part)
  480. for i,v in pairs(Part:GetChildren()) do
  481. if v:IsA("SpotLight") and v.Name ~= "Safe" then
  482. v.Enabled = true
  483. coroutine.resume(coroutine.create(function()
  484. wait(0.1)
  485. v.Enabled = false
  486. end))
  487. end
  488. end
  489. end
  490. function EmptiedClip(part)
  491. EmptyClip = Instance.new("Part",MainModel)
  492. EmptyClip.Name = "EmtpyClip"
  493. EmptyClip.formFactor = "Custom"
  494. EmptyClip.BrickColor = BrickColor.new("Really Gold")
  495. EmptyClip.CanCollide = true
  496. EmptyClip.Reflectance = .1
  497. EmptyClip.Size = part.Size - Vector3.new(0.1,0.1,0.1)
  498. EmptyClip.CFrame = part.CFrame * CF.Angles(0,0,0)
  499. EmptyClip:BreakJoints()
  500. game.Debris:AddItem(EmptyClip,6)
  501. Instance.new("BlockMesh",EmptyClip)
  502. end
  503. function WarnLow()
  504. pg = plr.PlayerGui:findFirstChild("Ammo")
  505. if pg then
  506. Warn = Instance.new("TextLabel",pg)
  507. Warn.Name = "Reload Gun"
  508. Warn.Font = "ArialBold"
  509. Warn.FontSize = "Size24"
  510. Warn.Position = UDim2.new(0.5,0,0.5,0)
  511. Warn.Text = "Reload (r)"
  512. Warn.TextColor3 = BrickColor.new("Bright red").Color
  513. game.Debris:AddItem(Warn,2)
  514. end
  515. end
  516. function AddShell(Part)
  517. Shell = Instance.new("Part",MainModel)
  518. Shell.Name = "Shell"
  519. Shell.formFactor = "Custom"
  520. Shell.BrickColor = BrickColor.new("Really Gold")
  521. Shell.CanCollide = true
  522. Shell.Size = V3(.1,.35,.1)
  523. Shell.CFrame = Part.CFrame
  524. Shell:BreakJoints()
  525. Instance.new("CylinderMesh",Shell)
  526. game.Debris:AddItem(Shell,5)
  527. end
  528. function RemoveLS()
  529. god,err = ypcall(function()
  530. for i,v in pairs(Lasers) do
  531. pcall(function()
  532. if v:IsA("BasePart") then
  533. pcall(function()
  534. v:Remove()
  535. end)
  536. elseif type(v) == "userdata" then
  537. pcall(function()
  538. v:disconnect()
  539. end)
  540. end
  541. end)
  542. end
  543. end)
  544. if err then print(err) end
  545. Lasers = {}
  546. end
  547. function lerp(a,b,c)
  548. return a+(b-a)*c
  549. end
  550. function AnimLerp(c1,c2,al)
  551. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  552. for i,v in pairs(com1) do com1[i] = lerp(v,com2[i],al) end
  553. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  554. end
  555. function ReloadAnim()
  556. OldCf = RW.C0
  557. OldCf2 = LW.C0
  558. OldCf3 = HW.C0
  559. --[[
  560. HW.C0 = CFrame.new(Vector3.new(0, .8, 0), point * Vector3.new(1, 1, (point.Z >= 0 and 0 or 1)))
  561. ]]--
  562. pcall(function()
  563. Hman = plr.Character:findFirstChild("Humanoid")
  564. OldWalk = Hman.WalkSpeed
  565. Hman.WalkSpeed = Hman.WalkSpeed/2
  566. end)
  567. for i,v in pairs(char.Torso:GetChildren()) do
  568. if v:IsA("BodyGyro") then
  569. v:Remove()
  570. end
  571. end
  572. for i=0,1,0.1 do
  573. wait(0.02)
  574. LW.C0 = AnimLerp(LW.C0,CFrame.new(-1.2,.5,0) * CFrame.Angles(math.rad(90),0,math.rad(0)),0.2)
  575. HW.C0 = AnimLerp(HW.C0,CFrame.new(0,.8,0) * CFrame.Angles(math.rad(-10),0,0),0.2)
  576. end
  577. for i=0,1,0.05 do
  578. wait()
  579. RW.C0 = AnimLerp(RW.C0,CFrame.new(1,.5,0) * CFrame.Angles(math.rad(90),0,math.rad(-60)),0.2)
  580. HW.C0 = AnimLerp(HW.C0,CFrame.new(0,.8,0) * CFrame.Angles(math.rad(-10),math.rad(20),0),0.2)
  581. end
  582. for i=0,1,0.05 do
  583. wait()
  584. RW.C0 = AnimLerp(RW.C0,CFrame.new(1,.5,0) * CFrame.Angles(math.rad(90 - 20),0,math.rad(-60)),0.2)
  585. end
  586. for i=0,1,0.05 do
  587. wait()
  588. RW.C0 = AnimLerp(RW.C0,CFrame.new(1,.5,0) * CFrame.Angles(math.rad(70 + 20),0,math.rad(-60)),0.2)
  589. end
  590. WPA4.C1 = CF.new(0,0,0)
  591. for i=0,1,0.05 do
  592. wait()
  593. RW.C0 = AnimLerp(RW.C0,CFrame.new(1.2,.5,0) * CFrame.Angles(math.rad(90),0,math.rad(0)),0.2)
  594. end
  595. for i=0,1,0.1 do
  596. wait(0.02)
  597. LW.C0 = AnimLerp(LW.C0,CFrame.new(-1,.5,0) * CFrame.Angles(math.rad(90),0,math.rad(60)),0.2)
  598. HW.C0 = AnimLerp(HW.C0,CFrame.new(0,.8,0) * CFrame.Angles(math.rad(-10),math.rad(-20),0),0.2)
  599. end
  600. for i=0,1,0.1 do
  601. wait(0.02)
  602. LW.C0 = AnimLerp(LW.C0,CFrame.new(-1,.5,0) * CFrame.Angles(math.rad(90 - 20),0,math.rad(60)),0.2)
  603. end
  604. for i=0,1,0.1 do
  605. wait(0.02)
  606. LW.C0 = AnimLerp(LW.C0,CFrame.new(-1,.5,0) * CFrame.Angles(math.rad(70 + 20),0,math.rad(60)),0.2)
  607. end
  608. WPB4.C1 = CF.new(0,0,0)
  609. Bullets = 20
  610. UpdateBullets()
  611. for i=0,1,0.1 do
  612. wait(0.02)
  613. LW.C0 = AnimLerp(LW.C0,OldCf2,0.2)
  614. RW.C0 = AnimLerp(RW.C0,OldCf,0.2)
  615. HW.C0 = AnimLerp(HW.C0,OldCf3,0.2)
  616. end
  617. pcall(function()
  618. Hman = plr.Character:findFirstChild("Humanoid")
  619. Hman.WalkSpeed = OldWalk
  620. end)
  621. end
  622. Bin.Selected:connect(function(mouse)
  623. function MLS()
  624. PB25 = AddPart("Part",GunModelTwo,.1,.35,.1,LaserColor)
  625. PB25.Mesh:Remove()
  626. PB25.Anchored = true
  627. PB25.Transparency = 0.4
  628. Instance.new("CylinderMesh",PB25).Scale = Vector3.new(0.5,1,0.5)
  629. PA25 = AddPart("Part",GunModelOne,.1,.35,.1,LaserColor)
  630. PA25.Mesh:Remove()
  631. PA25.Transparency = 0.4
  632. PA25.Anchored = true
  633. Instance.new("CylinderMesh",PA25).Scale = Vector3.new(0.5,1,0.5)
  634. Delay(0,function()
  635. con = game:service("RunService").Stepped:connect(function()
  636. if LaserLight and PA25 and PB25 then
  637. --Below PA LEFT Laser
  638. local cf = CFrame.new(Vector3.new(0,0,0),PA24.CFrame.lookVector)
  639. ray1 = Ray.new(PA24.CFrame.p,cf.lookVector*300)
  640. hit,position = game:service("Workspace"):FindPartOnRay(ray1, char)
  641. dist = (position - PA24.CFrame.p).magnitude
  642. PA25.Size = Vector3.new(PA24.Size.X,dist,PA24.Size.Z)
  643. PA25.CFrame = CFrame.new((position+PA24.CFrame.p)/2, PA24.CFrame.p) * CFrame.Angles(math.rad(270),0,0)
  644. --Now PB RIGHT Laser
  645. local cf = CFrame.new(Vector3.new(0,0,0),PB24.CFrame.lookVector)
  646. ray1 = Ray.new(PB24.CFrame.p,cf.lookVector*300)
  647. hit,position = game:service("Workspace"):FindPartOnRay(ray1, char)
  648. dist = (position - PB24.CFrame.p).magnitude
  649. PB25.Size = Vector3.new(PB24.Size.X,dist,PB24.Size.Z)
  650. PB25.CFrame = CFrame.new((position+PB24.CFrame.p)/2, PB24.CFrame.p) * CFrame.Angles(math.rad(270),0,0)
  651. end
  652. end)
  653. end)
  654. table.insert(Lasers,con)
  655. table.insert(Lasers,PA25)
  656. table.insert(Lasers,PB25)
  657. end
  658. if LaserLight then
  659. MLS()
  660. end
  661. function AddBody()
  662. Body = Instance.new("BodyGyro",char["Torso"])
  663. Body.P = 200000
  664. Body.maxTorque = V3(1,1,1)/0
  665. return Body
  666. end
  667. Debug = true
  668. Equip()
  669. Gui = Instance.new("ScreenGui",plr.PlayerGui)
  670. Gui.Name = "Ammo"
  671. Frame = Instance.new("Frame",Gui)
  672. Frame.Name = "MainFrame"
  673. Frame.Size = UDim2.new(.15,0,.1,0)
  674. Frame.Position = UDim2.new(0.85,0,0.75,0)
  675. Frame.BackgroundTransparency = 0.2
  676. Frame.BackgroundColor = BrickColor.new("Silver")
  677. Frame.Active = true
  678. Frame.Draggable = true
  679. Dis = Instance.new("TextLabel",Frame)
  680. Dis.Name = "Real Numbers"
  681. Dis.Font = "ArialBold"
  682. Dis.FontSize = "Size24"
  683. Dis.Position = UDim2.new(0.5,0,0.5,0)
  684. Dis.TextColor3 = BrickColor.new("Really Gold").Color
  685. Dis.Text = Bullets.."/"..Clips
  686. Cred = Instance.new("TextLabel",Frame)
  687. Cred.Name = "Credz"
  688. Cred.Font = "ArialBold"
  689. Cred.FontSize = "Size12"
  690. Cred.Position = UDim2.new(0.5,0,0.05,0)
  691. Cred.Text = "Ma".."de B".."y"..": ".."Fr".."o".."st".."ftw"
  692. Cred.TextColor3 = BrickColor.new("Really Gold").Color
  693. function UpdateBullets()
  694. Dis.Text = Bullets.."/"..Clips
  695. end
  696. Delay(0,function()
  697. torso = char["Torso"]
  698. mouse.Move:connect(function()
  699. if Reloading then
  700. return
  701. end
  702. Body = char.Torso:findFirstChild("BodyGyro") or AddBody()
  703. x = math.pi/2
  704. Left = false
  705. Right = false
  706. local point = torso.CFrame:pointToObjectSpace(mouse.Hit.p)
  707. RW.C0 = CFrame.new(Vector3.new(1.2, .5, 0), point * Vector3.new(1, 1, (point.Z >= 0 and 0 or 1))) * CFrame.Angles(x,0,0)
  708. LW.C0 = CFrame.new(Vector3.new(-1.2, .5, 0), point * Vector3.new(1, 1, (point.Z >= 0 and 0 or 1))) * CFrame.Angles(x,0,0)
  709. HW.C0 = CFrame.new(Vector3.new(0, .8, 0), point * Vector3.new(1, 1, (point.Z >= 0 and 0 or 1)))
  710. if point.Z > -5 then
  711. if point.X > 0 then
  712. Left = true
  713. elseif point.X < 0 then
  714. Right = true
  715. end
  716. end
  717. if Right then
  718. Body.cframe = torso.cFrame * CF.Angles(0,math.rad(15),math.rad(0))
  719. elseif Left then
  720. Body.cframe = torso.CFrame * CF.Angles(0,math.rad(-15),math.rad(0))
  721. else
  722. Body.cframe = torso.CFrame
  723. end
  724. end)
  725. end)
  726. mouse.KeyDown:connect(function(Key)
  727. if Key == "c" then
  728. if Debug == true then
  729. Crouch()
  730. Debug = false
  731. elseif Debug == false then
  732. UnCrouch()
  733. Debug = true
  734. end
  735. elseif Key == "l" then
  736. if LaserLight then
  737. LaserLight = false
  738. RemoveLS()
  739. elseif not LaserLight then
  740. LaserLight = true
  741. MLS()
  742. end
  743. elseif Key == "r" then
  744. DoReload()
  745. elseif Key == "f" then
  746. if FlashLight == true then
  747. FlashLight = false
  748. L3.Enabled = false
  749. L4.Enabled = false
  750. elseif FlashLight == false then
  751. FlashLight = true
  752. L3.Enabled = true
  753. L4.Enabled = true
  754. end
  755. end
  756. end)
  757. mouse.KeyUp:connect(function()
  758. end)
  759. mouse.Button1Down:connect(function()
  760. if Reloading then return end
  761. if Clips < 1 and Bullets < 1 then
  762. return
  763. end
  764. if Bullets == 0 or Bullets < 0 then
  765. WarnLow()
  766. WPA4.C1 = CF.new(0,0,-.2)
  767. WPB4.C1 = CF.new(0,0,-.2)
  768. return
  769. end
  770. Bullets = Bullets - 1
  771. UpdateBullets()
  772. if CurrentGun == 1 then
  773. CurrentGun = 2
  774. WPA4.C1 = CF.new(0,0,-.2)
  775. ShotLeft = true
  776. BamOne:Play()
  777. Flash(PA20)
  778. CreateBullet(PA20)
  779. AddShell(PA7)
  780. wait(.2)
  781. WPA4.C1 = CF.new(0,0,0)
  782. elseif CurrentGun == 2 then
  783. CurrentGun = 1
  784. ShotRight = true
  785. WPB4.C1 = CF.new(0,0,-.2)
  786. BamTwo:Play()
  787. Flash(PB20)
  788. CreateBullet(PB20)
  789. AddShell(PB7)
  790. wait(.2)
  791. WPB4.C1 = CF.new(0,0,0)
  792. end
  793. end)
  794. end)
  795. Bin.Deselected:connect(function(mouse)
  796. Unequip()
  797. RemoveLS()
  798. L3.Enabled = false
  799. L4.Enabled = false
  800. FlashLight = false
  801. pcall(function()
  802. UnCrouch()
  803. end)
  804. for i,v in pairs(char.Torso:GetChildren()) do
  805. if v:IsA("BodyGyro") then
  806. v:Remove()
  807. end
  808. end
  809. for i=1,5 do
  810. pcall(function() plr.PlayerGui["Ammo"]:Remove() end)
  811. end
  812. end)
  813. Delay(0,function()
  814. BulletSpeed = 20
  815. Twirl = 0.2
  816. game:service("RunService").Stepped:connect(function()
  817. for i,v in pairs(BulletTable) do
  818. pcall(function()
  819. if v:IsA("BasePart") then
  820. ray = Ray.new(v.Position, v.CFrame.lookVector*(0.5+BulletSpeed))
  821. v.CFrame = v.CFrame * CFrame.new(0,0,-BulletSpeed) * CFrame.Angles(0,0,-Twirl)
  822. local Hit,Var = workspace:findPartOnRay(ray, char)
  823. function RemoveBullet()
  824. v:Remove()
  825. table.remove("BulletTable", i)
  826. end
  827. if Hit and Hit.Parent then
  828. local Human = Hit.Parent:findFirstChild("Humanoid")
  829. local Head = Hit.Parent:findFirstChild("Head")
  830. local Torso = Hit.Parent:findFirstChild("Torso")
  831. if v.Parent ~= char.Torso then
  832. v:Remove()
  833. table.remove(BulletTable, i)
  834. end
  835. if Hit.Parent:IsA("Hat") then
  836. local Human = Hit.Parent.Parent:findFirstChild("Humanoid")
  837. local Head = Hit.Parent.Parent:findFirstChild("Head")
  838. local Torso = Hit.Parent.Parent:findFirstChild("Torso")
  839. if Human and Head and Torso then
  840. Damage = math.random(10000,10000)
  841. Human:TakeDamage(Damage)
  842. if Human.Health < 1 then
  843. Obj = Instance.new("ObjectValue",Human)
  844. Obj.Name = "creator"
  845. Obj.Value = plr
  846. end
  847. DisplayDamage(Damage,Head)
  848. RemoveBullet()
  849. end
  850. elseif Human and Head and Torso then
  851. if Hit == Head then
  852. Damage = math.random(15,20)
  853. else
  854. Damage = math.random(15,20)
  855. end
  856. Human:TakeDamage(Damage)
  857. if Human.Health < 1 then
  858. Obj = Instance.new("ObjectValue",Human)
  859. Obj.Name = "creator"
  860. Obj.Value = plr
  861. end
  862. DisplayDamage(Damage,Head)
  863. RemoveBullet()
  864. elseif Hit then
  865. RemoveBullet()
  866. end
  867. end
  868. end
  869. end)
  870. end
  871. end)
  872. end)
Add Comment
Please, Sign In to add comment