Advertisement
SOCHILDISHHH

RARE PISTOL

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