Advertisement
Guest User

Untitled

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