Advertisement
billwa

SVD

Nov 4th, 2015
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 42.90 KB | None | 0 0
  1. svd = Instance.new("Tool",game.Players.LocalPlayer.Backpack)
  2. svd.GripPos = Vector3.new(-0.10000000149012,-0.40000000596046,0.10000000149012)
  3. svd.Grip = CFrame.new(-0.10000000149012,-0.40000000596046,0.10000000149012) * CFrame.Angles(3.1414785385132, 1.3336758613586, 3.1415865421295)
  4. svd.GripForward = Vector3.new(-0.97201842069626,2.6802434149431e-005,0.23490445315838)
  5. svd.CanBeDropped = false
  6. svd.Name = "SVD"
  7. svd.GripRight = Vector3.new(-0.2349044829607,-0.00011697719310177,-0.97201853990555)
  8. svd.GripUp = Vector3.new(-1.4260000398281e-006,1,-0.00011999999696855)
  9. svd.ToolTip = "[10] Snayperskaya Vintovka Dragunova"
  10.  
  11. part = Instance.new("Part",svd)
  12. part.FormFactor = Enum.FormFactor.Custom
  13. part.CanCollide = false
  14. part.TopSurface = Enum.SurfaceType.Smooth
  15. part.Anchored = false
  16. part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
  17. part.CFrame = CFrame.new(-21.399993896484,1.1200100183487,13.953337669373) * CFrame.Angles(0, 1.5707963705063, 0)
  18. part.BrickColor = BrickColor.new("Black")
  19. part.Friction = 0.30000001192093
  20. part.BottomSurface = Enum.SurfaceType.Smooth
  21.  
  22. mesh = Instance.new("BlockMesh",part)
  23. mesh.Scale = Vector3.new(0.66666668653488,0.66666668653488,0.33333334326744)
  24.  
  25. maxammo = Instance.new("IntValue",svd)
  26. maxammo.Name = "MaxAmmo"
  27. maxammo.Value = 10
  28.  
  29. part = Instance.new("Part",svd)
  30. part.FormFactor = Enum.FormFactor.Custom
  31. part.CanCollide = false
  32. part.TopSurface = Enum.SurfaceType.Smooth
  33. part.Anchored = false
  34. part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
  35. part.CFrame = CFrame.new(-21.399993896484,1.2533299922943,13.319984436035) * CFrame.Angles(-1.5707963705063, 7.2759576141834e-012, 3.1415927410126)
  36. part.BrickColor = BrickColor.new("Black")
  37. part.Friction = 0.30000001192093
  38. part.BottomSurface = Enum.SurfaceType.Smooth
  39.  
  40. mesh = Instance.new("CylinderMesh",part)
  41. mesh.Scale = Vector3.new(1,0.33333334326744,2)
  42.  
  43. stringvalue = Instance.new("StringValue",svd)
  44. stringvalue.Name = "StringValue"
  45.  
  46. isdown = Instance.new("BoolValue",svd)
  47. isdown.Name = "IsDown"
  48.  
  49. ammo = Instance.new("IntValue",svd)
  50. ammo.Name = "Ammo"
  51. ammo.Value = 10
  52.  
  53. part = Instance.new("Part",svd)
  54. part.FormFactor = Enum.FormFactor.Custom
  55. part.CanCollide = false
  56. part.TopSurface = Enum.SurfaceType.Smooth
  57. part.Anchored = false
  58. part.Size = Vector3.new(0.20000000298023,1.133333325386,0.20000000298023)
  59. part.CFrame = CFrame.new(-21.399993896484,1.0167570114136,14.986680030823) * CFrame.Angles(1.5707963705063, -7.2759576141834e-012, 1.1368683772162e-013)
  60. part.BrickColor = BrickColor.new("Reddish brown")
  61. part.Friction = 0.30000001192093
  62. part.BottomSurface = Enum.SurfaceType.Smooth
  63.  
  64. mesh = Instance.new("SpecialMesh",part)
  65. mesh.Scale = Vector3.new(1.5,1,1)
  66.  
  67. storedammo = Instance.new("IntValue",svd)
  68. storedammo.Name = "StoredAmmo"
  69. storedammo.Value = 60
  70.  
  71. zoomedin = Instance.new("BoolValue",svd)
  72. zoomedin.Name = "ZoomedIn"
  73.  
  74. visibleb = Instance.new("BoolValue",svd)
  75. visibleb.Name = "VisibleB"
  76.  
  77. modetext = Instance.new("StringValue",svd)
  78. modetext.Name = "ModeText"
  79. modetext.Value = "Nil"
  80.  
  81. part = Instance.new("Part",svd)
  82. part.FormFactor = Enum.FormFactor.Custom
  83. part.CanCollide = false
  84. part.TopSurface = Enum.SurfaceType.Smooth
  85. part.Anchored = false
  86. part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
  87. part.CFrame = CFrame.new(-21.399993896484,1.1200100183487,13.620007514954) * CFrame.Angles(0, 1.5707963705063, 0)
  88. part.BrickColor = BrickColor.new("Black")
  89. part.Friction = 0.30000001192093
  90. part.BottomSurface = Enum.SurfaceType.Smooth
  91.  
  92. mesh = Instance.new("BlockMesh",part)
  93. mesh.Scale = Vector3.new(0.66666668653488,0.66666668653488,0.33333334326744)
  94.  
  95. part = Instance.new("Part",svd)
  96. part.FormFactor = Enum.FormFactor.Custom
  97. part.CanCollide = false
  98. part.TopSurface = Enum.SurfaceType.Smooth
  99. part.Anchored = false
  100. part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
  101. part.CFrame = CFrame.new(-21.399993896484,1.2533349990845,13.286680221558) * CFrame.Angles(-3.1415927410126, 1.1368683772162e-013, -3.1415927410126)
  102. part.BrickColor = BrickColor.new("Black")
  103. part.Friction = 0.30000001192093
  104. part.BottomSurface = Enum.SurfaceType.Smooth
  105.  
  106. mesh = Instance.new("SpecialMesh",part)
  107. mesh.Scale = Vector3.new(0.17333333194256,0.17333333194256,0.66666668653488)
  108. mesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
  109. mesh.TextureId = "http://www.roblox.com/asset/?id=0"
  110. mesh.MeshType = Enum.MeshType.FileMesh
  111.  
  112. part = Instance.new("Part",svd)
  113. part.FormFactor = Enum.FormFactor.Custom
  114. part.CanCollide = false
  115. part.TopSurface = Enum.SurfaceType.Smooth
  116. part.Anchored = false
  117. part.Size = Vector3.new(0.20000000298023,1.2666666507721,0.20000000298023)
  118. part.CFrame = CFrame.new(-21.399993896484,0.8866760134697,16.120010375977) * CFrame.Angles(1.5707963705063, -1.5707963705063, 0)
  119. part.BrickColor = BrickColor.new("Black")
  120. part.Friction = 0.30000001192093
  121. part.BottomSurface = Enum.SurfaceType.Smooth
  122.  
  123. mesh = Instance.new("CylinderMesh",part)
  124. mesh.Scale = Vector3.new(0.5,1,0.66666668653488)
  125.  
  126. handle = Instance.new("Part",svd)
  127. handle.CanCollide = false
  128. handle.Transparency = 1
  129. handle.TopSurface = Enum.SurfaceType.Smooth
  130. handle.Anchored = false
  131. handle.Size = Vector3.new(1,1.2000000476837,1)
  132. handle.Name = "Handle"
  133. handle.CFrame = CFrame.new(-21.383255004883,0.65335100889206,13.443597793579) * CFrame.Angles(7.8047623901512e-006, 1.5707963705063, 0)
  134. handle.BrickColor = BrickColor.new("Black")
  135. handle.Friction = 0.30000001192093
  136. handle.BottomSurface = Enum.SurfaceType.Smooth
  137.  
  138. mesh = Instance.new("BlockMesh",handle)
  139. mesh.Scale = Vector3.new(0.16666667163372,0.36666667461395,0.20000000298023)
  140.  
  141. fire = Instance.new("Sound",handle)
  142. fire.Pitch = 1.5
  143. fire.Name = "Fire"
  144. fire.Volume = 1
  145. fire.SoundId = "http://roblox.com/asset/?id=10209859"
  146.  
  147. reload = Instance.new("Sound",handle)
  148. reload.Name = "Reload"
  149. reload.Volume = 1
  150. reload.SoundId = "http://www.roblox.com/asset/?version=1&id=2691591"
  151.  
  152. switch = Instance.new("Sound",handle)
  153. switch.Pitch = 1.5
  154. switch.Name = "Switch"
  155. switch.Volume = 1
  156. switch.SoundId = "rbxasset://sounds//clickfast.wav"
  157.  
  158. barrel = Instance.new("Part",svd)
  159. barrel.FormFactor = Enum.FormFactor.Custom
  160. barrel.CanCollide = false
  161. barrel.TopSurface = Enum.SurfaceType.Smooth
  162. barrel.Anchored = false
  163. barrel.Size = Vector3.new(0.20000000298023,0.26666668057442,0.20000000298023)
  164. barrel.Name = "Barrel"
  165. barrel.CFrame = CFrame.new(-21.399993896484,0.88667798042297,16.820028305054) * CFrame.Angles(1.5707963705063, -1.5707963705063, 0)
  166. barrel.BrickColor = BrickColor.new("Black")
  167. barrel.Friction = 0.30000001192093
  168. barrel.BottomSurface = Enum.SurfaceType.Smooth
  169.  
  170. decal = Instance.new("Decal",barrel)
  171. decal.Face = Enum.NormalId.Top
  172. decal.Texture = "http://www.roblox.com/asset/?id=94500807"
  173.  
  174. mesh = Instance.new("CylinderMesh",barrel)
  175. mesh.Scale = Vector3.new(0.66666668653488,1,0.66666668653488)
  176.  
  177. light = Instance.new("BillboardGui",barrel)
  178. light.Enabled = false
  179. light.Active = true
  180. light.Adornee = Barrel
  181. light.Name = "Light"
  182. light.Size = UDim2.new(2.75, 0, 2.75, 0)
  183.  
  184. light = Instance.new("ImageLabel",light)
  185. light.Visible = false
  186. light.Active = true
  187. light.Image = "http://www.roblox.com/asset/?id=95361991"
  188. light.Size = UDim2.new(0.75, 0, 0.66, 0)
  189. light.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  190. light.BackgroundTransparency = 1
  191. light.Position = UDim2.new(0.125, 0, 0.15, 0)
  192. light.Name = "Light"
  193. light.BackgroundColor3 = Color3.new(0.756863, 0.752941, 0.764706)
  194.  
  195. part = Instance.new("Part",svd)
  196. part.FormFactor = Enum.FormFactor.Custom
  197. part.CanCollide = false
  198. part.TopSurface = Enum.SurfaceType.Smooth
  199. part.Anchored = false
  200. part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
  201. part.CFrame = CFrame.new(-21.399993896484,1.0866730213165,13.620007514954) * CFrame.Angles(0, 1.5707963705063, 0)
  202. part.BrickColor = BrickColor.new("Black")
  203. part.Friction = 0.30000001192093
  204. part.BottomSurface = Enum.SurfaceType.Smooth
  205.  
  206. mesh = Instance.new("BlockMesh",part)
  207. mesh.Scale = Vector3.new(0.66666668653488,0.33333334326744,1)
  208.  
  209. part = Instance.new("Part",svd)
  210. part.FormFactor = Enum.FormFactor.Custom
  211. part.CanCollide = false
  212. part.TopSurface = Enum.SurfaceType.Smooth
  213. part.Anchored = false
  214. part.Size = Vector3.new(0.20000000298023,0.26666668057442,0.20000000298023)
  215. part.CFrame = CFrame.new(-21.399993896484,1.2533349990845,13.486680030823) * CFrame.Angles(-1.5707963705063, 7.2759576141834e-012, 3.1415927410126)
  216. part.BrickColor = BrickColor.new("Black")
  217. part.Friction = 0.30000001192093
  218. part.BottomSurface = Enum.SurfaceType.Smooth
  219.  
  220. mesh = Instance.new("CylinderMesh",part)
  221. mesh.Scale = Vector3.new(0.66666668653488,1,1.3333333730698)
  222.  
  223. part = Instance.new("Part",svd)
  224. part.FormFactor = Enum.FormFactor.Custom
  225. part.CanCollide = false
  226. part.TopSurface = Enum.SurfaceType.Smooth
  227. part.Anchored = false
  228. part.Size = Vector3.new(0.26666668057442,0.20000000298023,0.20000000298023)
  229. part.CFrame = CFrame.new(-21.399993896484,0.59333699941635,13.553345680237) * CFrame.Angles(-0, -1.5707963705063, 0)
  230. part.BrickColor = BrickColor.new("Black")
  231. part.Friction = 0.30000001192093
  232. part.BottomSurface = Enum.SurfaceType.Smooth
  233.  
  234. mesh = Instance.new("BlockMesh",part)
  235. mesh.Scale = Vector3.new(1,0.066666670143604,0.66666668653488)
  236.  
  237. part = Instance.new("Part",svd)
  238. part.FormFactor = Enum.FormFactor.Custom
  239. part.CanCollide = false
  240. part.TopSurface = Enum.SurfaceType.Smooth
  241. part.Anchored = false
  242. part.Size = Vector3.new(0.20000000298023,0.40000000596046,0.20000000298023)
  243. part.CFrame = CFrame.new(-21.399993896484,0.86384499073029,14.606811523438) * CFrame.Angles(1.3961431980133, -1.978526415769e-005, -4.7557005018461e-005)
  244. part.BrickColor = BrickColor.new("Reddish brown")
  245. part.Friction = 0.30000001192093
  246. part.BottomSurface = Enum.SurfaceType.Smooth
  247.  
  248. mesh = Instance.new("SpecialMesh",part)
  249. mesh.Scale = Vector3.new(1.5,1,1)
  250.  
  251. part = Instance.new("Part",svd)
  252. part.FormFactor = Enum.FormFactor.Custom
  253. part.CanCollide = false
  254. part.TopSurface = Enum.SurfaceType.Smooth
  255. part.Anchored = false
  256. part.Size = Vector3.new(0.46666666865349,0.26666668057442,0.20000000298023)
  257. part.CFrame = CFrame.new(-21.399993896484,0.60096096992493,13.220337867737) * CFrame.Angles(1.8599240779877, -1.5707963705063, 0)
  258. part.BrickColor = BrickColor.new("Reddish brown")
  259. part.Friction = 0.30000001192093
  260. part.BottomSurface = Enum.SurfaceType.Smooth
  261.  
  262. mesh = Instance.new("BlockMesh",part)
  263. mesh.Scale = Vector3.new(1,1,0.89999997615814)
  264.  
  265. part = Instance.new("Part",svd)
  266. part.FormFactor = Enum.FormFactor.Custom
  267. part.CanCollide = false
  268. part.TopSurface = Enum.SurfaceType.Smooth
  269. part.Anchored = false
  270. part.Size = Vector3.new(0.20000000298023,0.26666668057442,0.20000000298023)
  271. part.CFrame = CFrame.new(-21.399993896484,0.72001898288727,13.653351783752) * CFrame.Angles(-3.0517574487021e-005, -1.5707963705063, 0)
  272. part.BrickColor = BrickColor.new("Black")
  273. part.Friction = 0.30000001192093
  274. part.BottomSurface = Enum.SurfaceType.Smooth
  275.  
  276. mesh = Instance.new("BlockMesh",part)
  277. mesh.Scale = Vector3.new(0.33333334326744,1,0.66666668653488)
  278.  
  279. part = Instance.new("Part",svd)
  280. part.FormFactor = Enum.FormFactor.Custom
  281. part.CanCollide = false
  282. part.TopSurface = Enum.SurfaceType.Smooth
  283. part.Anchored = false
  284. part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.26666668057442)
  285. part.CFrame = CFrame.new(-21.39999961853,1.0533410310745,16.520004272461) * CFrame.Angles(1.5707963705063, -7.2759576141834e-012, -3.1415927410126)
  286. part.BrickColor = BrickColor.new("Black")
  287. part.Friction = 0.30000001192093
  288. part.BottomSurface = Enum.SurfaceType.Smooth
  289.  
  290. mesh = Instance.new("SpecialMesh",part)
  291. mesh.Scale = Vector3.new(0.33333334326744,1,1)
  292. mesh.MeshType = Enum.MeshType.Wedge
  293.  
  294. part = Instance.new("Part",svd)
  295. part.FormFactor = Enum.FormFactor.Custom
  296. part.CanCollide = false
  297. part.TopSurface = Enum.SurfaceType.Smooth
  298. part.Anchored = false
  299. part.Size = Vector3.new(1.133333325386,0.20000000298023,0.20000000298023)
  300. part.CFrame = CFrame.new(-21.399993896484,0.95673596858978,14.986665725708) * CFrame.Angles(0, 1.5707963705063, 0)
  301. part.BrickColor = BrickColor.new("Reddish brown")
  302. part.Friction = 0.30000001192093
  303. part.BottomSurface = Enum.SurfaceType.Smooth
  304.  
  305. mesh = Instance.new("BlockMesh",part)
  306. mesh.Scale = Vector3.new(1,0.66666668653488,1)
  307.  
  308. part = Instance.new("Part",svd)
  309. part.FormFactor = Enum.FormFactor.Custom
  310. part.CanCollide = false
  311. part.TopSurface = Enum.SurfaceType.Smooth
  312. part.Anchored = false
  313. part.Size = Vector3.new(0.20000000298023,0.93333333730698,0.20000000298023)
  314. part.CFrame = CFrame.new(-21.399993896484,0.47972100973129,12.637727737427) * CFrame.Angles(1.5271239280701, -1.5707963705063, 0)
  315. part.BrickColor = BrickColor.new("Reddish brown")
  316. part.Friction = 0.30000001192093
  317. part.BottomSurface = Enum.SurfaceType.Smooth
  318.  
  319. mesh = Instance.new("BlockMesh",part)
  320. mesh.Scale = Vector3.new(0.33333334326744,1,0.89999997615814)
  321.  
  322. part = Instance.new("Part",svd)
  323. part.FormFactor = Enum.FormFactor.Custom
  324. part.CanCollide = false
  325. part.TopSurface = Enum.SurfaceType.Smooth
  326. part.Anchored = false
  327. part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.86666667461395)
  328. part.CFrame = CFrame.new(-21.399993896484,0.41166898608208,12.607316017151) * CFrame.Angles(3.0980036258698, 7.7024014899507e-005, -3.9828235458117e-005)
  329. part.BrickColor = BrickColor.new("Reddish brown")
  330. part.Friction = 0.30000001192093
  331. part.BottomSurface = Enum.SurfaceType.Smooth
  332.  
  333. mesh = Instance.new("SpecialMesh",part)
  334. mesh.Scale = Vector3.new(0.89999997615814,0.33333334326744,1)
  335. mesh.MeshType = Enum.MeshType.Wedge
  336.  
  337. part = Instance.new("Part",svd)
  338. part.FormFactor = Enum.FormFactor.Custom
  339. part.CanCollide = false
  340. part.TopSurface = Enum.SurfaceType.Smooth
  341. part.Anchored = false
  342. part.Size = Vector3.new(0.20000000298023,0.33333334326744,0.20000000298023)
  343. part.CFrame = CFrame.new(-21.399993896484,0.49702900648117,12.269940376282) * CFrame.Angles(1.5271239280701, -1.5707963705063, 0)
  344. part.BrickColor = BrickColor.new("Reddish brown")
  345. part.Friction = 0.30000001192093
  346. part.BottomSurface = Enum.SurfaceType.Smooth
  347.  
  348. mesh = Instance.new("BlockMesh",part)
  349. mesh.Scale = Vector3.new(0.66666668653488,1,0.89999997615814)
  350.  
  351. part = Instance.new("Part",svd)
  352. part.FormFactor = Enum.FormFactor.Custom
  353. part.CanCollide = false
  354. part.TopSurface = Enum.SurfaceType.Smooth
  355. part.Anchored = false
  356. part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
  357. part.CFrame = CFrame.new(-21.399993896484,0.66355001926422,12.262665748596) * CFrame.Angles(3.0979778766632, -1.5707963705063, 0)
  358. part.BrickColor = BrickColor.new("Dark stone grey")
  359. part.Friction = 0.30000001192093
  360. part.BottomSurface = Enum.SurfaceType.Smooth
  361.  
  362. mesh = Instance.new("CylinderMesh",part)
  363. mesh.Scale = Vector3.new(0.16666667163372,1,0.16666667163372)
  364.  
  365. part = Instance.new("Part",svd)
  366. part.FormFactor = Enum.FormFactor.Custom
  367. part.CanCollide = false
  368. part.TopSurface = Enum.SurfaceType.Smooth
  369. part.Anchored = false
  370. part.Size = Vector3.new(0.20000000298023,1.2000000476837,0.20000000298023)
  371. part.CFrame = CFrame.new(-21.399993896484,0.81279301643372,12.623167991638) * CFrame.Angles(1.5271239280701, -1.5707963705063, 0)
  372. part.BrickColor = BrickColor.new("Reddish brown")
  373. part.Friction = 0.30000001192093
  374. part.BottomSurface = Enum.SurfaceType.Smooth
  375.  
  376. mesh = Instance.new("BlockMesh",part)
  377. mesh.Scale = Vector3.new(0.33333334326744,1,0.89999997615814)
  378.  
  379. part = Instance.new("Part",svd)
  380. part.FormFactor = Enum.FormFactor.Custom
  381. part.CanCollide = false
  382. part.TopSurface = Enum.SurfaceType.Smooth
  383. part.Anchored = false
  384. part.Size = Vector3.new(0.40000000596046,0.20000000298023,0.20000000298023)
  385. part.CFrame = CFrame.new(-21.399993896484,0.5563600063324,12.100509643555) * CFrame.Angles(1.5271239280701, -1.5707963705063, 0)
  386. part.BrickColor = BrickColor.new("Reddish brown")
  387. part.Friction = 0.30000001192093
  388. part.BottomSurface = Enum.SurfaceType.Smooth
  389.  
  390. mesh = Instance.new("BlockMesh",part)
  391. mesh.Scale = Vector3.new(1,0.66666668653488,0.89999997615814)
  392.  
  393. part = Instance.new("Part",svd)
  394. part.FormFactor = Enum.FormFactor.Custom
  395. part.CanCollide = false
  396. part.TopSurface = Enum.SurfaceType.Smooth
  397. part.Anchored = false
  398. part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
  399. part.CFrame = CFrame.new(-21.399993896484,0.99722599983215,13.320495605469) * CFrame.Angles(0.78535580635071, -9.7146912594326e-006, -1.3593356925412e-005)
  400. part.BrickColor = BrickColor.new("Black")
  401. part.Friction = 0.30000001192093
  402. part.BottomSurface = Enum.SurfaceType.Smooth
  403.  
  404. mesh = Instance.new("SpecialMesh",part)
  405. mesh.Scale = Vector3.new(1.5,1,1)
  406.  
  407. part = Instance.new("Part",svd)
  408. part.FormFactor = Enum.FormFactor.Custom
  409. part.CanCollide = false
  410. part.TopSurface = Enum.SurfaceType.Smooth
  411. part.Anchored = false
  412. part.Size = Vector3.new(0.20000000298023,1.2000000476837,0.20000000298023)
  413. part.CFrame = CFrame.new(-21.399993896484,1.0167520046234,13.886672019958) * CFrame.Angles(1.5707963705063, -7.2759576141834e-012, 1.1368683772162e-013)
  414. part.BrickColor = BrickColor.new("Black")
  415. part.Friction = 0.30000001192093
  416. part.BottomSurface = Enum.SurfaceType.Smooth
  417.  
  418. mesh = Instance.new("SpecialMesh",part)
  419. mesh.Scale = Vector3.new(1.5,1,1)
  420.  
  421. part = Instance.new("Part",svd)
  422. part.FormFactor = Enum.FormFactor.Custom
  423. part.CanCollide = false
  424. part.TopSurface = Enum.SurfaceType.Smooth
  425. part.Anchored = false
  426. part.Size = Vector3.new(1.2000000476837,0.26666668057442,0.20000000298023)
  427. part.CFrame = CFrame.new(-21.399993896484,0.88667798042297,13.820003509521) * CFrame.Angles(0, 1.5707963705063, 0)
  428. part.BrickColor = BrickColor.new("Black")
  429. part.Friction = 0.30000001192093
  430. part.BottomSurface = Enum.SurfaceType.Smooth
  431.  
  432. mesh = Instance.new("BlockMesh",part)
  433.  
  434. part = Instance.new("Part",svd)
  435. part.FormFactor = Enum.FormFactor.Custom
  436. part.CanCollide = false
  437. part.TopSurface = Enum.SurfaceType.Smooth
  438. part.Anchored = false
  439. part.Size = Vector3.new(0.20000000298023,0.46666666865349,0.20000000298023)
  440. part.CFrame = CFrame.new(-21.399993896484,1.2533299922943,13.786680221558) * CFrame.Angles(-1.5707963705063, 7.2759576141834e-012, 3.1415927410126)
  441. part.BrickColor = BrickColor.new("Black")
  442. part.Friction = 0.30000001192093
  443. part.BottomSurface = Enum.SurfaceType.Smooth
  444.  
  445. mesh = Instance.new("CylinderMesh",part)
  446. mesh.Scale = Vector3.new(1,1,2)
  447.  
  448. part = Instance.new("Part",svd)
  449. part.FormFactor = Enum.FormFactor.Custom
  450. part.CanCollide = false
  451. part.TopSurface = Enum.SurfaceType.Smooth
  452. part.Anchored = false
  453. part.Size = Vector3.new(0.20000000298023,0.33333334326744,0.20000000298023)
  454. part.CFrame = CFrame.new(-21.39999961853,1.0167520046234,15.586675643921) * CFrame.Angles(1.5707963705063, -1.5707963705063, 0)
  455. part.BrickColor = BrickColor.new("Black")
  456. part.Friction = 0.30000001192093
  457. part.BottomSurface = Enum.SurfaceType.Smooth
  458.  
  459. mesh = Instance.new("CylinderMesh",part)
  460. mesh.Scale = Vector3.new(0.5,1,0.66666668653488)
  461.  
  462. part = Instance.new("Part",svd)
  463. part.FormFactor = Enum.FormFactor.Custom
  464. part.CanCollide = false
  465. part.TopSurface = Enum.SurfaceType.Smooth
  466. part.Anchored = false
  467. part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
  468. part.CFrame = CFrame.new(-21.399993896484,0.96258401870728,15.792440414429) * CFrame.Angles(2.3561956882477, -1.5707963705063, 0)
  469. part.BrickColor = BrickColor.new("Black")
  470. part.Friction = 0.30000001192093
  471. part.BottomSurface = Enum.SurfaceType.Smooth
  472.  
  473. mesh = Instance.new("CylinderMesh",part)
  474. mesh.Scale = Vector3.new(0.5,1,0.66666668653488)
  475.  
  476. mag = Instance.new("Part",svd)
  477. mag.FormFactor = Enum.FormFactor.Custom
  478. mag.CanCollide = false
  479. mag.TopSurface = Enum.SurfaceType.Smooth
  480. mag.Anchored = false
  481. mag.Size = Vector3.new(0.33333334326744,0.33333334326744,0.20000000298023)
  482. mag.Name = "Mag"
  483. mag.CFrame = CFrame.new(-21.399993896484,0.6533420085907,13.986680030823) * CFrame.Angles(-3.1415927410126, -1.5707963705063, 0)
  484. mag.BrickColor = BrickColor.new("Black")
  485. mag.Friction = 0.30000001192093
  486. mag.BottomSurface = Enum.SurfaceType.Smooth
  487.  
  488. mesh = Instance.new("BlockMesh",mag)
  489. mesh.Scale = Vector3.new(1,1.1000000238419,0.89999997615814)
  490.  
  491. mag2 = Instance.new("Part",svd)
  492. mag2.FormFactor = Enum.FormFactor.Custom
  493. mag2.CanCollide = false
  494. mag2.TopSurface = Enum.SurfaceType.Smooth
  495. mag2.Anchored = false
  496. mag2.Size = Vector3.new(0.33333334326744,0.20000000298023,0.20000000298023)
  497. mag2.Name = "Mag2"
  498. mag2.CFrame = CFrame.new(-21.399993896484,0.39999398589134,14.000012397766) * CFrame.Angles(2.9670794010162, -1.5707963705063, 0)
  499. mag2.BrickColor = BrickColor.new("Black")
  500. mag2.Friction = 0.30000001192093
  501. mag2.BottomSurface = Enum.SurfaceType.Smooth
  502.  
  503. mesh = Instance.new("BlockMesh",mag2)
  504. mesh.Scale = Vector3.new(1,1.1000000238419,0.89999997615814)
  505.  
  506. part = Instance.new("Part",svd)
  507. part.FormFactor = Enum.FormFactor.Custom
  508. part.CanCollide = false
  509. part.TopSurface = Enum.SurfaceType.Smooth
  510. part.Anchored = false
  511. part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
  512. part.CFrame = CFrame.new(-21.399993896484,0.61900502443314,13.401012420654) * CFrame.Angles(0.78537756204605, -1.5707963705063, 0)
  513. part.BrickColor = BrickColor.new("Black")
  514. part.Friction = 0.30000001192093
  515. part.BottomSurface = Enum.SurfaceType.Smooth
  516.  
  517. mesh = Instance.new("BlockMesh",part)
  518. mesh.Scale = Vector3.new(0.33333334326744,0.066666670143604,0.66666668653488)
  519.  
  520. part = Instance.new("Part",svd)
  521. part.FormFactor = Enum.FormFactor.Custom
  522. part.CanCollide = false
  523. part.TopSurface = Enum.SurfaceType.Smooth
  524. part.Anchored = false
  525. part.Size = Vector3.new(0.20000000298023,1.2000000476837,0.20000000298023)
  526. part.CFrame = CFrame.new(-21.399993896484,0.88667798042297,14.953337669373) * CFrame.Angles(1.5707963705063, -7.2759576141834e-012, 1.1368683772162e-013)
  527. part.BrickColor = BrickColor.new("Reddish brown")
  528. part.Friction = 0.30000001192093
  529. part.BottomSurface = Enum.SurfaceType.Smooth
  530.  
  531. mesh = Instance.new("SpecialMesh",part)
  532. mesh.Scale = Vector3.new(1.5,1,1)
  533.  
  534. part = Instance.new("Part",svd)
  535. part.FormFactor = Enum.FormFactor.Custom
  536. part.CanCollide = false
  537. part.TopSurface = Enum.SurfaceType.Smooth
  538. part.Anchored = false
  539. part.Size = Vector3.new(0.40000000596046,0.26666668057442,0.20000000298023)
  540. part.CFrame = CFrame.new(-21.399993896484,0.63896298408508,12.463959693909) * CFrame.Angles(1.5271239280701, -1.5707963705063, 0)
  541. part.BrickColor = BrickColor.new("Reddish brown")
  542. part.Friction = 0.30000001192093
  543. part.BottomSurface = Enum.SurfaceType.Smooth
  544.  
  545. mesh = Instance.new("BlockMesh",part)
  546. mesh.Scale = Vector3.new(1,1,0.89999997615814)
  547.  
  548. part = Instance.new("Part",svd)
  549. part.FormFactor = Enum.FormFactor.Custom
  550. part.CanCollide = false
  551. part.TopSurface = Enum.SurfaceType.Smooth
  552. part.Anchored = false
  553. part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
  554. part.CFrame = CFrame.new(-21.399993896484,1.0866730213165,13.953337669373) * CFrame.Angles(0, 1.5707963705063, 0)
  555. part.BrickColor = BrickColor.new("Black")
  556. part.Friction = 0.30000001192093
  557. part.BottomSurface = Enum.SurfaceType.Smooth
  558.  
  559. mesh = Instance.new("BlockMesh",part)
  560. mesh.Scale = Vector3.new(0.66666668653488,0.33333334326744,1)
  561.  
  562. part = Instance.new("Part",svd)
  563. part.FormFactor = Enum.FormFactor.Custom
  564. part.CanCollide = false
  565. part.Transparency = 0.40000000596046
  566. part.TopSurface = Enum.SurfaceType.Smooth
  567. part.Reflectance = 0.20000000298023
  568. part.Anchored = false
  569. part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
  570. part.CFrame = CFrame.new(-21.399993896484,1.2533299922943,14.386684417725) * CFrame.Angles(-1.5708290338516, 1.5707963705063, 0)
  571. part.BrickColor = BrickColor.new("White")
  572. part.Friction = 0.30000001192093
  573. part.BottomSurface = Enum.SurfaceType.Smooth
  574.  
  575. mesh = Instance.new("CylinderMesh",part)
  576. mesh.Scale = Vector3.new(1.3333333730698,0.34999999403954,0.66666668653488)
  577.  
  578. part = Instance.new("Part",svd)
  579. part.FormFactor = Enum.FormFactor.Custom
  580. part.CanCollide = false
  581. part.TopSurface = Enum.SurfaceType.Smooth
  582. part.Anchored = false
  583. part.Size = Vector3.new(0.20000000298023,0.26666668057442,0.20000000298023)
  584. part.CFrame = CFrame.new(-21.399993896484,1.2533349990845,13.486680030823) * CFrame.Angles(1.5707428455353, 1.5707963705063, 0)
  585. part.BrickColor = BrickColor.new("Black")
  586. part.Friction = 0.30000001192093
  587. part.BottomSurface = Enum.SurfaceType.Smooth
  588.  
  589. mesh = Instance.new("SpecialMesh",part)
  590. mesh.Scale = Vector3.new(0.10000000149012,0.36666667461395,0.10000000149012)
  591. mesh.MeshId = "http://www.roblox.com/asset/?id=1033714"
  592. mesh.VertexColor = Vector3.new(0,0,0)
  593. mesh.MeshType = Enum.MeshType.FileMesh
  594.  
  595. part = Instance.new("Part",svd)
  596. part.FormFactor = Enum.FormFactor.Custom
  597. part.CanCollide = false
  598. part.Transparency = 0.40000000596046
  599. part.TopSurface = Enum.SurfaceType.Smooth
  600. part.Reflectance = 0.20000000298023
  601. part.Anchored = false
  602. part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
  603. part.CFrame = CFrame.new(-21.399993896484,1.2533299922943,13.319984436035) * CFrame.Angles(-1.5708290338516, 1.5707963705063, 0)
  604. part.BrickColor = BrickColor.new("White")
  605. part.Friction = 0.30000001192093
  606. part.BottomSurface = Enum.SurfaceType.Smooth
  607.  
  608. mesh = Instance.new("CylinderMesh",part)
  609. mesh.Scale = Vector3.new(1.5,0.34999999403954,0.75)
  610.  
  611. part = Instance.new("Part",svd)
  612. part.FormFactor = Enum.FormFactor.Custom
  613. part.CanCollide = false
  614. part.TopSurface = Enum.SurfaceType.Smooth
  615. part.Anchored = false
  616. part.Size = Vector3.new(0.20000000298023,0.20000000298023,0.20000000298023)
  617. part.CFrame = CFrame.new(-21.399993896484,1.2533299922943,14.386684417725) * CFrame.Angles(-3.1415927410126, 5.3468229452847e-005, 3.1415495872498)
  618. part.BrickColor = BrickColor.new("Black")
  619. part.Friction = 0.30000001192093
  620. part.BottomSurface = Enum.SurfaceType.Smooth
  621.  
  622. mesh = Instance.new("SpecialMesh",part)
  623. mesh.Scale = Vector3.new(0.15000000596046,0.15000000596046,0.66666668653488)
  624. mesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
  625. mesh.TextureId = "http://www.roblox.com/asset/?id=0"
  626. mesh.MeshType = Enum.MeshType.FileMesh
  627.  
  628. part = Instance.new("Part",svd)
  629. part.FormFactor = Enum.FormFactor.Custom
  630. part.CanCollide = false
  631. part.TopSurface = Enum.SurfaceType.Smooth
  632. part.Anchored = false
  633. part.Size = Vector3.new(0.20000000298023,0.33333334326744,0.20000000298023)
  634. part.CFrame = CFrame.new(-21.399993896484,1.2533349990845,14.186676025391) * CFrame.Angles(-1.5707658529282, -3.0517570849042e-005, 3.1415622234344)
  635. part.BrickColor = BrickColor.new("Black")
  636. part.Friction = 0.30000001192093
  637. part.BottomSurface = Enum.SurfaceType.Smooth
  638.  
  639. mesh = Instance.new("CylinderMesh",part)
  640. mesh.Scale = Vector3.new(0.83333337306976,1,1.6666667461395)
  641.  
  642. Tool = svd;
  643. local arms = nil
  644. local torso = nil
  645. local welds = {}
  646.  
  647. function Equip(mouse)
  648. wait(0.01)
  649. arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
  650. torso = Tool.Parent:FindFirstChild("Torso")
  651. if arms ~= nil and torso ~= nil then
  652. local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
  653. if sh ~= nil then
  654. local yes = true
  655. if yes then
  656. yes = false
  657. sh[1].Part1 = nil
  658. sh[2].Part1 = nil
  659. local weld1 = Instance.new("Weld")
  660. weld1.Part0 = torso
  661. weld1.Parent = torso
  662. weld1.Part1 = arms[1]
  663. weld1.C1 = CFrame.new(-0.249, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(0), math.rad(-90))
  664. welds[1] = weld1
  665. weld1.Name = "weld1"
  666. local weld2 = Instance.new("Weld")
  667. weld2.Part0 = torso
  668. weld2.Parent = torso
  669. weld2.Part1 = arms[2]
  670. weld2.C1 = CFrame.new(-0.75, -0.2, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  671. welds[2] = weld2
  672. weld2.Name = "weld2"
  673. end
  674. else
  675. print("sh")
  676. end
  677. else
  678. print("arms")
  679. end
  680. end
  681.  
  682. function Unequip(mouse)
  683. if arms ~= nil and torso ~= nil then
  684. local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
  685. if sh ~= nil then
  686. local yes = true
  687. if yes then
  688. yes = false
  689. sh[1].Part1 = arms[1]
  690. sh[2].Part1 = arms[2]
  691. welds[1].Parent = nil
  692. welds[2].Parent = nil
  693. end
  694. else
  695. print("sh")
  696. end
  697. else
  698. print("arms")
  699. end
  700. end
  701. Tool.Equipped:connect(Equip)
  702. Tool.Unequipped:connect(Unequip)
  703.  
  704. local prev
  705. local parts = svd:GetChildren()
  706.  
  707. for i = 1,#parts do
  708.         if (parts[i].className == "Part") then
  709.                 if (prev ~= nil)then
  710.                         local weld = Instance.new("Weld")
  711.                         weld.Part0 = prev
  712.                         weld.Part1 = parts[i]
  713.                         weld.C0 = prev.CFrame:inverse()
  714.                         weld.C1 = parts[i].CFrame:inverse()
  715.                         weld.Parent = prev
  716.                 end
  717.                 prev = parts[i]
  718.         end
  719. end
  720.  
  721. local Tool = svd
  722. a = false
  723. cam = nil
  724. wut = Tool.Parent
  725. MaximumZoom = 1
  726.  
  727.  
  728.  
  729. function onEquipped(mouse2)
  730.     mouse2.KeyDown:connect(onkeyDown)
  731.     mouse = mouse2
  732. end
  733.  
  734. function onkeyDown(key)
  735.     if (key == "q") and svd.IsDown.Value == false then
  736.    local Camera = workspace.CurrentCamera
  737.    local Pos1 = Vector3.new(Camera.Focus.X, Camera.Focus.Y, Camera.Focus.Z)
  738.    local Pos2 = Vector3.new(Camera.CoordinateFrame.X, Camera.CoordinateFrame.Y, Camera.CoordinateFrame.Z)
  739.    local Distance = (Pos1-Pos2).magnitude
  740.     if not a then
  741.     cam=game.Workspace.CurrentCamera:clone()
  742.     cam.Parent=game.Workspace
  743.     game.Workspace.CurrentCamera.FieldOfView = 17
  744.     a=true
  745.  
  746.     else
  747.         game.Workspace.CurrentCamera:Remove()
  748.         game.Workspace.CurrentCamera = cam
  749.         game.Workspace.CurrentCamera.FieldOfView = 70
  750.         a=false
  751.     end
  752. end
  753. end
  754.  
  755. svd.Equipped:connect(onEquipped)
  756.  
  757. on = 0
  758. Tool = svd
  759. welds = {}
  760. sh = {}
  761. arms = nil
  762. torso = nil
  763. f = nil
  764.  
  765.  
  766. function StanceChange(ison)
  767. if arms == nil and torso == nil then
  768.     arms = {Tool.Parent:FindFirstChild("Left Leg"), Tool.Parent:FindFirstChild("Right Leg")}
  769.     torso = Tool.Parent:FindFirstChild("Torso")
  770.     end
  771. if arms ~= nil and torso ~= nil then
  772.     sh = {torso:FindFirstChild("Left Hip"), torso:FindFirstChild("Right Hip")}
  773.     if sh ~= nil then
  774.         local yes = true
  775.         if yes then
  776.             yes = false
  777. -------------------------------------------
  778.             if ison == 1 then
  779.                 sh[1].Part1 = nil
  780.                 sh[2].Part1 = nil
  781.                 local weld1 = Instance.new("Weld")
  782.                 weld1.Part0 = torso
  783.                 weld1.Parent = torso
  784.                 weld1.Part1 = arms[1]
  785.                 weld1.C1 = CFrame.new(0.5, 0.6, 1.15) * CFrame.fromEulerAnglesXYZ(math.rad(20),0,0) --Left leg
  786.                 arms[1].Name = "LDave"
  787.                 arms[1].CanCollide = true
  788.                 welds[1] = weld1
  789.                 Tool.Parent.Humanoid.WalkSpeed = 11
  790.                 local weld2 = Instance.new("Weld")
  791.                 weld2.Part0 = torso
  792.                 weld2.Parent = torso
  793.                 weld2.Part1 = arms[2]
  794.                 weld2.C1 = CFrame.new(-0.5,0.495,1) * CFrame.fromEulerAnglesXYZ(math.rad(60),0,0) --Right leg
  795.                 arms[2].Name = "RDave"
  796.                 arms[2].CanCollide = true
  797.                 welds[2] = weld2
  798.                 local force = Instance.new("BodyForce")
  799.                 force.Parent = torso
  800.                 f = force
  801.                 wait(0.01)
  802. -------------------------------------------
  803.             elseif ison == 2 then
  804.                 sh[1].Part1 = nil
  805.                 sh[2].Part1 = nil
  806.                 local weld1 = Instance.new("Weld")
  807.                 weld1.Part0 = torso
  808.                 weld1.Parent = torso
  809.                 weld1.Part1 = arms[1]
  810.                 weld1.C1 = CFrame.new(0.4, 1.25, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(90),0.25,0) --Left leg
  811.                 arms[1].Name = "LDave"
  812.                 arms[1].CanCollide = true
  813.                 welds[1] = weld1
  814.                 Tool.Parent.Humanoid.WalkSpeed = 7
  815.                 local weld2 = Instance.new("Weld")
  816.                 weld2.Part0 = torso
  817.                 weld2.Parent = torso
  818.                 weld2.Part1 = arms[2]
  819.                 weld2.C1 = CFrame.new(-0.4, 1.25, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(90),-0.25,0) --Right leg
  820.                 arms[2].Name = "RDave"
  821.                 arms[2].CanCollide = true
  822.                 welds[2] = weld2
  823.                 local force = Instance.new("BodyForce")
  824.                 force.Parent = torso
  825.                 f = force
  826.                 wait(0.01)
  827. -------------------------------------------
  828.             elseif ison == 0 then
  829.                 if arms then
  830.                     sh[1].Part1 = arms[1]
  831.                     sh[2].Part1 = arms[2]
  832.                     f.Parent = nil
  833.                     arms[2].Name = "Right Leg"
  834.                     arms[1].Name = "Left Leg"
  835.                     welds[1].Parent = nil
  836.                     welds[2].Parent = nil
  837.                     Tool.Parent.Humanoid.WalkSpeed = 16
  838.                     end
  839.                 end
  840.             end
  841.         end
  842.     end
  843. end
  844.  
  845. function Key(key)
  846. if key then
  847.     key = string.lower(key)
  848.     if (key=="x") then --lower stance
  849.         if on == 0 then
  850.             on = 1
  851.             StanceChange(on)
  852.             elseif on == 1 then
  853.             on = 0
  854.             StanceChange(on)
  855.             wait(0.1)
  856.             on = 2
  857.             StanceChange(on)
  858.             elseif on > 1 then
  859.             end
  860.         end
  861.     if (key=="c") then  --raise stance
  862.         if on == 2 then
  863.             on = 0
  864.             StanceChange(on)
  865.             wait(0.1)
  866.             on = 1
  867.             StanceChange(on)
  868.             elseif on == 1 then
  869.             on = 0
  870.             StanceChange(on)
  871.             elseif on < 1 then
  872.             end
  873.         end
  874.     end
  875. end
  876.  
  877. function Equip(mouse)
  878. mouse.KeyDown:connect(Key)
  879. end
  880.  
  881. svd.Equipped:connect(Equip)
  882.  
  883. wait(1)
  884. local Tool = svd;
  885. local pewsound
  886. local bangsound
  887. local cam
  888. local ggui
  889. --EDITED BY ROBOTESTGEAR.. I made it way better -.-
  890. enabled = true
  891. automatichold = false
  892. dmged = false
  893. shotgun = false
  894. equipped = false
  895. reloading = false
  896.  
  897. -----------------------------------------------------------------------------ONLY EDIT THESE VALUES!!!!!
  898. -----!Instructions!-----
  899. --Make sure you have a part in the gun named Barrel, it is where the laser will shoot from.--
  900. --Just place this script into any gun and edit the values below.--
  901. --Don't edit anything else or risk breaking it.--
  902. --Acttuly mr. guy who scripted this, Myself (robotestgear) made it better. You're welcome. :)
  903. ------------------------
  904. DamageMin = 75
  905. DamageMax = 160
  906. SPS = 6 -- Shots Per Second, gives a limit of how fast the gun shoots.
  907. Accuracy = 11.5 -- [1-10] [1 = Minigun, 10 = Sniper]
  908. WallShoot = false -- Shoots through walls.
  909. GH = false -- [True = RB can't hurt RB.] [False = RB can hurt RB.]
  910. BulletColor = "Bright yellow" -- Any Brickcolor will work.
  911. Flash = true
  912. --------------------------------------------------------------------------------------------------------
  913.  
  914. local zm = Instance.new("Part")
  915. zm.Name = "ZoomZM"
  916. zm.Anchored = true
  917. zm.Transparency = 1
  918. zm.Size = Vector3.new(1,1,1)
  919. zm.CanCollide = false
  920. GunType = 0
  921.  
  922. --[[local gui = Instance.new("ScreenGui")
  923. local bg = Instance.new("Frame",gui)
  924. local bar = Instance.new("Frame",bg)
  925. local bvl = Instance.new("ImageLabel", bg)
  926. bvl.Name = "Bevel"
  927. bvl.BackgroundTransparency = 1
  928. bvl.Image = "http://www.roblox.com/asset/?id=56852431"
  929. bvl.Size = UDim2.new(1,0,1,0)
  930. bg.Name = "Back"
  931. bar.Name = "Charge"
  932. bar.BackgroundColor3 = Color3.new(200/255,0/255,0/255)
  933. bg.BackgroundColor3 = Color3.new(200/255,200/255,200/255)
  934. bg.Size = UDim2.new(0,10,0,-100)
  935. bg.Position = UDim2.new(0,5,0,500)
  936. bar.Size = UDim2.new(0,4,-1,0)
  937. bar.Position = UDim2.new(0,3,1,0)
  938.  
  939. ggui = gui:Clone()
  940. ggui.Name = "GunGui"
  941. ggui.Back.Charge.Size = UDim2.new(0,4,-(script.Charge.Value/100),0)]]
  942.  
  943. GroupID = 5520
  944.  
  945. function AntiGH(char1,char2)
  946. if GH then
  947. local plyr1 = game.Players:findFirstChild(char1.Name)
  948. local plyr2 = game.Players:findFirstChild(char2.Name)
  949. if plyr1 and plyr2 then
  950. if plyr1:IsInGroup(GroupID) and plyr2:IsInGroup(GroupID) then
  951. return false
  952. end
  953. end
  954. return true
  955. elseif not GH then
  956. return true
  957. end
  958. end
  959.  
  960. MaxDist = 2400
  961.  
  962. function RayCast(Start,End,Ignore)
  963. if WallShoot then
  964. ray1 = Ray.new(Start, End.unit * 999.999)
  965. local Part1, TempPos = Workspace:FindPartOnRay(ray1,Ignore)
  966. ray2 = Ray.new(TempPos, End.unit * 999.999)
  967. local Part2, EndPos = Workspace:FindPartOnRay(ray2,Part1)
  968. return Part1, Part2, EndPos
  969. elseif not WallShoot then
  970. ray = Ray.new(Start, End.unit * 999.999)
  971. return Workspace:FindPartOnRay(ray,Ignore)
  972. end
  973. end
  974.  
  975. function DmgPlr(Part)
  976. if Part ~= nil then
  977. local c = Instance.new("ObjectValue")
  978. c.Name = "creator"
  979. c.Value = game.Players:findFirstChild(svd.Parent.Name)
  980. local hum = Part.Parent:findFirstChild("Humanoid")
  981. local hathum = Part.Parent.Parent:findFirstChild("Humanoid")
  982. local hat = Part.Parent
  983. if hathum ~= nil and hat:IsA("Hat") and AntiGH(hathum.Parent, script.Parent.Parent) then
  984. hathum:TakeDamage((math.random(DamageMin,DamageMax))/3)
  985. Part.Parent = game.Workspace
  986. Part.CFrame = CFrame.new(Part.Position + Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5)))
  987. hat:Remove()
  988. c.Parent = hathum
  989. game.Debris:AddItem(c,1.5)
  990. elseif hum ~= nil and AntiGH(hum.Parent, svd.Parent) then
  991. if Part.Name == "Head" then
  992. hum:TakeDamage((math.random(DamageMin,DamageMax))*2)
  993. end
  994. hum:TakeDamage((math.random(DamageMin,DamageMax)))
  995. c.Parent = hum
  996. game.Debris:AddItem(c,1.5)
  997. end
  998. end
  999. end
  1000.  
  1001. function onButton1Down(mouse)
  1002. if svd.Ammo.Value == 0 and reloading == false then
  1003. else
  1004.     if GunType == 0 and svd.IsDown.Value == false then
  1005.         if (not enabled) then return end
  1006.         enabled = false
  1007.             LaserShoot(mouse)
  1008.             if Flash then
  1009.             svd.Barrel.Light.Light.Visible = true
  1010.             end
  1011.             svd.Ammo.Value = svd.Ammo.Value - 1
  1012.             wait(0.01)
  1013.             if Flash then
  1014.             svd.Barrel.Light.Light.Visible = false
  1015.             end
  1016.             wait(1/SPS)
  1017.         enabled = true
  1018.     elseif GunType == 1 and svd.IsDown.Value == false then
  1019.         automatichold = true
  1020.         while automatichold == true and svd.Ammo.Value ~= 0 do wait()
  1021.         if (not enabled) then return end
  1022.         if svd.Parent:findFirstChild("Humanoid").Health == 0 then svd:Remove() end
  1023.         enabled = false
  1024.             LaserShoot(mouse)
  1025.             if Flash then
  1026.             svd.Barrel.Light.Light.Visible = true
  1027.             end
  1028.             svd.Ammo.Value = svd.Ammo.Value - 1
  1029.             wait(0.01)
  1030.             if Flash then
  1031.             svd.Barrel.Light.Light.Visible = false
  1032.             end
  1033.             wait(1/SPS)
  1034.         enabled = true
  1035.         end
  1036.     end
  1037. end
  1038. end
  1039.  
  1040.  function LaserShoot(mouse)
  1041.     hit = mouse.Hit.p
  1042.     local StartPos = svd.Barrel.CFrame.p
  1043.     local rv = (StartPos-hit).magnitude/(Accuracy * 20)
  1044.     local rcl = Vector3.new(math.random(-rv,rv),math.random(-rv,rv),math.random(-rv,rv))
  1045.     aim = hit + rcl
  1046.     local P = Instance.new("Part")
  1047.     P.Name = "Bullet"
  1048.     P.formFactor = 3
  1049.     P.BrickColor = BrickColor.new(BulletColor)
  1050.     P.Size = Vector3.new(0.1,0.1,0.1)
  1051.     P.Anchored = true
  1052.     P.CanCollide = false
  1053.     P.Transparency = 1
  1054.     P.Parent = svd.Parent
  1055.     local m = Instance.new("CylinderMesh")
  1056.     m.Name = "Mesh"
  1057.     m.Parent = P
  1058.     local c = Instance.new("ObjectValue")
  1059.     c.Name = "creator"
  1060.     c.Value = game.Players:findFirstChild(svd.Parent.Name)
  1061.         pewsound = svd.Handle:FindFirstChild("Fire")
  1062.         if pewsound then
  1063.         pewsound:Play()
  1064.         end --Brick created. Moving on to next part
  1065.     local SPos = svd.Barrel.CFrame.p
  1066.     if WallShoot then
  1067.     local Part1, Part2, EndPos = RayCast(SPos, (aim-SPos).unit * 999, svd.Parent)
  1068.     DmgPlr(Part1)
  1069.     DmgPlr(Part2)
  1070.     if Part1 and Part2 then
  1071.     local enddist = (EndPos-SPos).magnitude
  1072.     P.CFrame = CFrame.new(EndPos, SPos) * CFrame.new(0,0,-enddist/2) * CFrame.Angles(math.rad(90),0,0)
  1073.     m.Scale = Vector3.new(.04,enddist,.04)
  1074.     else
  1075.     P.CFrame = CFrame.new(EndPos, SPos) * CFrame.new(0,0,-MaxDist/2) * CFrame.Angles(math.rad(90),0,0)
  1076.     m.Scale = Vector3.new(.04,MaxDist,.04)
  1077.     end
  1078.     elseif not WallShoot then
  1079.     local Part, Pos = RayCast(SPos, (aim-SPos).unit * 999, svd.Parent)
  1080.     DmgPlr(Part)
  1081.     if Part then
  1082.     local dist = (Pos-SPos).magnitude
  1083.     P.CFrame = CFrame.new(Pos, SPos) * CFrame.new(0,0,-dist/2) * CFrame.Angles(math.rad(90),0,0)
  1084.     m.Scale = Vector3.new(.1,dist,.1)
  1085.     else
  1086.     P.CFrame = CFrame.new(Pos, SPos) * CFrame.new(0,0,-MaxDist/2) * CFrame.Angles(math.rad(90),0,0)
  1087.     m.Scale = Vector3.new(.1,MaxDist,.1)
  1088.     end
  1089.     end
  1090.     game.Debris:AddItem(P,.1)
  1091. end
  1092.  
  1093. function onButton1Up(mouse)
  1094. automatichold = false
  1095. end
  1096.  
  1097. function onKeyDown(key, mouse)
  1098.  
  1099.  
  1100.  
  1101. if key:lower() == "r" then
  1102.     if svd.Ammo.Value < svd.MaxAmmo.Value and reloading == false and svd.StoredAmmo.Value >= 1 then
  1103.         reloadsound = svd.Handle:FindFirstChild("Reload")
  1104.         if reloadsound then
  1105.         reloadsound:Play()
  1106.         end
  1107.         enabled = false
  1108.         svd.VisibleB.Value = true
  1109.         svd.StringValue.Value = "Reloading"
  1110.         reloading = true
  1111.         svd.Mag.Transparency = 1
  1112.         svd.Mag2.Transparency = 1
  1113.         svd.StoredAmmo.Value = svd.StoredAmmo.Value + svd.Ammo.Value
  1114.         svd.Ammo.Value = 0
  1115.     if svd.StoredAmmo.Value >= svd.MaxAmmo.Value then
  1116.         svd.StoredAmmo.Value = svd.StoredAmmo.Value - svd.MaxAmmo.Value
  1117.         wait(3)
  1118.         svd.Ammo.Value = svd.MaxAmmo.Value
  1119.         svd.StoredAmmo.Value = svd.StoredAmmo.Value - (svd.MaxAmmo.Value - svd.Ammo.Value)
  1120.     elseif svd.StoredAmmo.Value < svd.MaxAmmo.Value and svd.StoredAmmo.Value >= 1 then
  1121.         wait(3)
  1122.         svd.Ammo.Value = svd.StoredAmmo.Value
  1123.         svd.StoredAmmo.Value = 0
  1124.         end
  1125.         wait(0.2)
  1126.         svd.VisibleB.Value = false
  1127.         enabled = true
  1128.         reloading = false
  1129.         svd.Mag.Transparency = 0
  1130.         svd.Mag2.Transparency = 0
  1131.     end
  1132. end
  1133.  
  1134. if key:lower() == "m" then
  1135.     switch = svd.Handle.Switch
  1136.     if GunType == 1 then
  1137.     switch:Play()
  1138.     GunType = 0
  1139.     Accuracy = 11.5
  1140.     else
  1141.     switch:Play()
  1142.     GunType = 0
  1143.     Accuracy = 11.5
  1144.     end
  1145. end
  1146.  
  1147. end
  1148.        
  1149. function onEquipped(mouse)
  1150. equipped = true
  1151.  
  1152.     if mouse == nil then
  1153.         print("Mouse not found")
  1154.         return
  1155.     end
  1156.     mouse.Icon = "http://www.roblox.com/asset/?id=52812029"
  1157.     mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  1158.     mouse.Button1Up:connect(function() onButton1Up(mouse) end)
  1159.     mouse.KeyDown:connect(function(key) onKeyDown(key, mouse) end)
  1160.  
  1161. end
  1162.  
  1163. function onUnequipped(mouse)
  1164. equipped = false
  1165. automatichold = false
  1166.  
  1167.  
  1168. end
  1169.  
  1170. svd.Equipped:connect(onEquipped)
  1171. svd.Unequipped:connect(onUnequipped)
  1172. while true do wait()
  1173. if svd.Ammo.Value == 0 then
  1174.         svd.VisibleB.Value = true
  1175.         svd.StringValue.Value = "Reload"
  1176. end
  1177. if GunType == 1 and svd.IsDown.Value == false then
  1178. svd.ModeText.Value = "Auto"
  1179. elseif GunType == 0 and svd.IsDown.Value == false then
  1180. svd.ModeText.Value = "Semi"
  1181. elseif svd.IsDown.Value == true then
  1182. svd.ModeText.Value = "Safe"
  1183. end
  1184. end
  1185.  
  1186. screengui = Instance.new("ScreenGui",svd)
  1187.  
  1188. stats = Instance.new("Frame",screengui)
  1189. stats.Size = UDim2.new(0.15, 0, 0.175, 0)
  1190. stats.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  1191. stats.Name = "Stats"
  1192. stats.Position = UDim2.new(0.1, 0, 0.65, 0)
  1193. stats.Style = Enum.FrameStyle.RobloxRound
  1194. stats.BackgroundColor3 = Color3.new(0.639216, 0.635294, 0.647059)
  1195.  
  1196. mode = Instance.new("TextButton",stats)
  1197. mode.FontSize = Enum.FontSize.Size18
  1198. mode.BackgroundTransparency = 1
  1199. mode.Size = UDim2.new(1, 0, 0.5, 0)
  1200. mode.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  1201. mode.Text = "Mode: Nil"
  1202. mode.Font = Enum.Font.ArialBold
  1203. mode.Name = "Mode"
  1204. mode.TextColor3 = Color3.new(0.866667, 0.866667, 0.866667)
  1205. mode.BackgroundColor3 = Color3.new(0.639216, 0.635294, 0.647059)
  1206.  
  1207. ammo = Instance.new("TextButton",stats)
  1208. ammo.FontSize = Enum.FontSize.Size18
  1209. ammo.BackgroundTransparency = 1
  1210. ammo.Position = UDim2.new(-0.12, 0, 0.5, 0)
  1211. ammo.Size = UDim2.new(1, 0, 0.5, 0)
  1212. ammo.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  1213. ammo.Text = "Ammo: "
  1214. ammo.Font = Enum.Font.ArialBold
  1215. ammo.Name = "Ammo"
  1216. ammo.TextColor3 = Color3.new(0.866667, 0.866667, 0.866667)
  1217. ammo.BackgroundColor3 = Color3.new(0.639216, 0.635294, 0.647059)
  1218.  
  1219. ammo = Instance.new("TextButton",ammo)
  1220. ammo.FontSize = Enum.FontSize.Size18
  1221. ammo.BackgroundTransparency = 1
  1222. ammo.Position = UDim2.new(0.7, 0, 0, 0)
  1223. ammo.Size = UDim2.new(1, 0, 1, 0)
  1224. ammo.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  1225. ammo.Text = "20 / 140"
  1226. ammo.Font = Enum.Font.ArialBold
  1227. ammo.Name = "Ammo"
  1228. ammo.TextXAlignment = Enum.TextXAlignment.Left
  1229. ammo.TextColor3 = Color3.new(1, 0.2, 0)
  1230. ammo.BackgroundColor3 = Color3.new(0.639216, 0.635294, 0.647059)
  1231.  
  1232. reload = Instance.new("TextButton",stats)
  1233. reload.Visible = false
  1234. reload.FontSize = Enum.FontSize.Size18
  1235. reload.TextTransparency = 2.8999993801117
  1236. reload.BackgroundTransparency = 1
  1237. reload.Position = UDim2.new(0, 0, 1, 0)
  1238. reload.Size = UDim2.new(1, 0, 0.5, 0)
  1239. reload.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  1240. reload.Text = "Reloading"
  1241. reload.Font = Enum.Font.ArialBold
  1242. reload.Name = "Reload"
  1243. reload.TextColor3 = Color3.new(1, 0.2, 0)
  1244. reload.BackgroundColor3 = Color3.new(0.639216, 0.635294, 0.647059)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement