Alphashadowgaming

Untitled

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