Advertisement
IHackShootingGames

Untitled

Sep 5th, 2014
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 64.33 KB | None | 0 0
  1. --[[A VTI Version of the Accuracy International L96AW Sniper Rifle.
  2. 338. Lapua Magnum, 5 round Mag.
  3. --]]
  4.  
  5. if script == nil then return end
  6.  
  7. Player = script:FindFirstChild("Player") ~= nil and script.Player.Value or game:GetService("Players"):FindFirstChild("IHackShootingGames")
  8. Name = "AW"
  9. MC = BrickColor.new("Black")
  10. DC = BrickColor.new("Black")
  11. GC = BrickColor.new("Brick yellow")
  12. BC = BrickColor.new("Dark stone grey")
  13. MR = 0
  14. GR = 0
  15. HP = true
  16. selected = false
  17. canDual = false
  18. dual = false
  19. Button1Down = false
  20. damage = 100000000000000000000000000000000000000000000
  21. canFire = true
  22. canFire2 = false
  23. readyTime = 1.8
  24. automatic = false
  25. burst = false
  26. burstCount = 0
  27. burstCountMax = 2
  28. canSilence = true
  29. silenced = false
  30. canZoom = true
  31. zoom = false
  32. switchToSingle = true
  33. switchToBurst = true
  34. switchToAutomatic = true
  35.  
  36. ammoGui = Instance.new("ScreenGui")
  37. ammoGui.Name = Name
  38. local frame = Instance.new("Frame")
  39. frame.Name = "Frame"
  40. frame.Size = UDim2.new(0, 165, 0, 60)
  41. frame.Position = UDim2.new(0, 0, 1, -400)
  42. frame.BackgroundColor3 = Color3.new(1, 1, 1)
  43. frame.BorderColor3 = Color3.new(0, 0, 0)
  44. frame.Parent = ammoGui
  45. local label = Instance.new("TextLabel")
  46. label.Name = "Weapon"
  47. label.Text = "Weapon: " ..Name
  48. label.Size = UDim2.new(1, 0, 0, 20)
  49. label.Position = UDim2.new(0, 0, 0, 0)
  50. label.BackgroundColor3 = Color3.new(1, 0, 0)
  51. label.BorderColor3 = Color3.new(0, 0, 0)
  52. label.Parent = frame
  53. local label = Instance.new("TextLabel")
  54. label.Name = "MagazinePrefix"
  55. label.Text = " Magazine:"
  56. label.TextXAlignment = "Left"
  57. label.Size = UDim2.new(1, 0, 0, 20)
  58. label.Position = UDim2.new(0, 0, 0, 20)
  59. label.BackgroundColor3 = Color3.new(1, 1, 1)
  60. label.BorderColor3 = Color3.new(0, 0, 0)
  61. label.Parent = frame
  62. local label = Instance.new("TextLabel")
  63. label.Name = "Magazine"
  64. label.Text = "0/0"
  65. label.TextXAlignment = "Right"
  66. label.Size = UDim2.new(1, 0, 0, 20)
  67. label.Position = UDim2.new(0, -10, 0, 20)
  68. label.BackgroundTransparency = 1
  69. label.BorderSizePixel = 0
  70. label.Parent = frame
  71. local label = Instance.new("TextLabel")
  72. label.Name = "AmmoPrefix"
  73. label.Text = " Ammunition:"
  74. label.TextXAlignment = "Left"
  75. label.Size = UDim2.new(1, 0, 0, 20)
  76. label.Position = UDim2.new(0, 0, 0, 40)
  77. label.BackgroundColor3 = Color3.new(1, 1, 1)
  78. label.BorderColor3 = Color3.new(0, 0, 0)
  79. label.Parent = frame
  80. local label = Instance.new("TextLabel")
  81. label.Name = "Ammo"
  82. label.Text = "0/0"
  83. label.TextXAlignment = "Right"
  84. label.Size = UDim2.new(1, 0, 0, 20)
  85. label.Position = UDim2.new(0, -10, 0, 40)
  86. label.BackgroundTransparency = 1
  87. label.BorderSizePixel = 0
  88. label.Parent = frame
  89.  
  90. function updateGui()
  91. if selected == false then return end
  92. if Player:FindFirstChild("PlayerGui") == nil then Instance.new("PlayerGui").Parent = Player end
  93. if Player.PlayerGui:FindFirstChild(Name) == nil then
  94. ammoGui:Clone().Parent = Player.PlayerGui
  95. end
  96. Player.PlayerGui[Name].Frame.Magazine.Text = tostring(magazine.Value).. "/" ..tostring(magazineMax.Value)
  97. Player.PlayerGui[Name].Frame.Ammo.Text = tostring(ammo.Value).. "/" ..tostring(ammoMax.Value)
  98. end
  99.  
  100. function makeParts(format)
  101. local model = Instance.new("Model")
  102. model.Name = Name
  103. local pm = Instance.new("Part")
  104. pm.Name = "Handle"
  105. pm.formFactor = "Symmetric"
  106. pm.Size = Vector3.new(1, 1, 1)
  107. pm.BrickColor = GC
  108. pm.Reflectance = GR
  109. pm.CanCollide = false
  110. pm.Transparency = 1
  111. pm.Locked = true
  112. pm.TopSurface = 0
  113. pm.BottomSurface = 0
  114. pm.Parent = model
  115. local m = Instance.new("BlockMesh")
  116. m.Scale = Vector3.new(0.28, 1.1, 0.19)
  117. m.Offset = Vector3.new(0, -0.25, 0.07)
  118. m.Parent = pm
  119. if format ~= nil then
  120. local w = Instance.new("Weld")
  121. w.Part0 = pm
  122. if format == "RightHand" then
  123. w.Part1 = Player.Character:FindFirstChild("Right Arm")
  124. w.C0 = CFrame.new(0, 1.15, 0.7)
  125. w.C1 = CFrame.new()
  126. elseif format == "RightHolster" then
  127. w.Part1 = Player.Character:FindFirstChild("Torso")
  128. w.C0 = CFrame.new(-0.66, -0.7, 0.3) * CFrame.fromEulerAnglesXYZ(math.rad(-135), math.rad(90), 0)
  129. w.C1 = CFrame.new()
  130. model.Name = Name.. " (Holstered)"
  131. end
  132. w.Parent = pm
  133. model.Parent = Player.Character
  134. end
  135. --[[
  136. sniper1 http://www.roblox.com/asset/?id=1868836
  137. equip http://www.roblox.com/asset/?id=13510737
  138. fire1 http://www.roblox.com/asset/?id=2760979
  139. fire2 http://www.roblox.com/asset/?id=13510352
  140. fire3 http://www.roblox.com/asset/?id=2692806
  141. fire4 http://www.roblox.com/asset/?id=2691586
  142. fire5 http://www.roblox.com/asset/?id=2920959
  143. fire6 http://www.roblox.com/asset/?id=2697431
  144. fire7 http://www.roblox.com/asset/?id=2920959
  145. reload1 http://www.roblox.com/asset/?id=2691591
  146. reload2 http://www.roblox.com/asset/?id=2697432
  147. reload3 http://www.roblox.com/asset/?id=2920960
  148. reload4 http://www.roblox.com/asset/?id=2761842
  149. shotgun1 http://www.roblox.com/asset/?id=2697294
  150. --]]
  151. local s = Instance.new("Sound")
  152. s.Name = "Fire"
  153. s.SoundId = "http://www.roblox.com/asset/?id=1868836"
  154. s.Volume = 1
  155. s.Pitch = 1
  156. s.Looped = false
  157. s.Parent = pm
  158. local s = Instance.new("Sound")
  159. s.Name = "Fire2"
  160. s.SoundId = "http://roblox.com/asset/?id=10209803"
  161. s.Volume = 1
  162. s.Pitch = 1.4
  163. s.Looped = false
  164. s.Parent = pm
  165. local s = Instance.new("Sound")
  166. s.Name = "Equip"
  167. s.SoundId = "http://www.roblox.com/asset/?id=10209881"
  168. s.Volume = 1
  169. s.Pitch = 0.6
  170. s.Looped = false
  171. s.Parent = pm
  172. local s = Instance.new("Sound")
  173. s.Name = "Reload"
  174. s.SoundId = "http://www.roblox.com/asset/?id=2761842"
  175. s.Volume = 1
  176. s.Pitch = 1.2
  177. s.Looped = false
  178. s.Parent = pm
  179. local s = Instance.new("Sound")
  180. s.Name = "Empty"
  181. s.SoundId = "http://www.roblox.com/asset/?id=2697295"
  182. s.Volume = 1
  183. s.Pitch = 5
  184. s.Looped = false
  185. s.Parent = pm
  186. local s = Instance.new("Sound")
  187. s.Name = "Switch"
  188. s.SoundId = "http://www.roblox.com/asset/?id=2697295"
  189. s.Volume = 1
  190. s.Pitch = 10
  191. s.Looped = false
  192. s.Parent = pm
  193. local p = Instance.new("Part")
  194. p.Name = "ShellOut"
  195. p.formFactor = "Custom"
  196. p.Size = Vector3.new(0.2, 0.2, 0.2)
  197. p.Transparency = 1
  198. p.Locked = true
  199. p.CanCollide = false
  200. p.TopSurface = 0
  201. p.BottomSurface = 0
  202. p.Parent = model
  203. local w = Instance.new("Weld")
  204. w.Part0 = p
  205. w.Part1 = pm
  206. w.C0 = CFrame.new(-0.06, 0.62, -0.06) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  207. w.C1 = CFrame.new()
  208. w.Parent = p--]]
  209. local p = Instance.new("Part")
  210. p.Name = "Grip"
  211. p.formFactor = "Symmetric"
  212. p.Size = Vector3.new(1, 1, 1)
  213. p.BrickColor = GC
  214. p.Reflectance = GR
  215. p.CanCollide = false
  216. p.Locked = true
  217. p.TopSurface = 0
  218. p.BottomSurface = 0
  219. p.Parent = model
  220. local m = Instance.new("BlockMesh")
  221. m.Scale = Vector3.new(0.3, 0.38, 0.8)
  222. m.Parent = p
  223. local w = Instance.new("Weld")
  224. w.Part0 = p
  225. w.Part1 = pm
  226. w.C0 = CFrame.new(0, -0.15, -0.5) * CFrame.fromEulerAnglesXYZ(math.rad(15), 0, 0)
  227. w.C1 = CFrame.new()
  228. w.Parent = p
  229. local p = Instance.new("Part")
  230. p.Name = "GripWood"
  231. p.formFactor = "Symmetric"
  232. p.Size = Vector3.new(1, 1, 1)
  233. p.BrickColor = DC
  234. p.Reflectance = MR
  235. p.CanCollide = false
  236. p.Locked = true
  237. p.TopSurface = 0
  238. p.BottomSurface = 0
  239. p.Parent = model
  240. local m = Instance.new("SpecialMesh")
  241. m.MeshType = "Brick"
  242. m.Scale = Vector3.new(0.36, 0.36, 0.6)
  243. m.Parent = p
  244. local w = Instance.new("Weld")
  245. w.Part0 = p
  246. w.Part1 = pm
  247. w.C0 = CFrame.new(0, -0.15, -0.56) * CFrame.fromEulerAnglesXYZ(math.rad(15), 0, 0)
  248. w.C1 = CFrame.new()
  249. w.Parent = p--]]
  250. local p = Instance.new("Part")
  251. p.Name = "Magazine"
  252. p.formFactor = "Symmetric"
  253. p.Size = Vector3.new(1, 1, 1)
  254. p.BrickColor = DC
  255. p.Reflectance = MR
  256. p.CanCollide = false
  257. p.Locked = true
  258. p.TopSurface = 0
  259. p.BottomSurface = 0
  260. p.Parent = model
  261. local m = Instance.new("BlockMesh")
  262. m.Scale = Vector3.new(0.25, 0.5, 0.5)
  263. m.Parent = p
  264. local w = Instance.new("Weld")
  265. w.Part0 = p
  266. w.Part1 = pm
  267. w.C0 = CFrame.new(0, 0.5, -0.24)
  268. w.C1 = CFrame.new()
  269. w.Parent = p
  270. local p = Instance.new("Part")
  271. p.Name = "Trigger Housing"
  272. p.formFactor = "Symmetric"
  273. p.Size = Vector3.new(1, 1, 1)
  274. p.BrickColor = MC
  275. p.Reflectance = MR
  276. p.CanCollide = false
  277. p.Locked = true
  278. p.TopSurface = 0
  279. p.BottomSurface = 0
  280. p.Parent = model
  281. local m = Instance.new("BlockMesh")
  282. m.Scale = Vector3.new(0.2, 0.4, 0.04)
  283. m.Parent = p
  284. local w = Instance.new("Weld")
  285. w.Part0 = p
  286. w.Part1 = pm
  287. w.C0 = CFrame.new(0, 0.1, -0.36)
  288. w.C1 = CFrame.new()
  289. w.Parent = p
  290. local p = Instance.new("Part")
  291. p.Name = "Trigger"
  292. p.formFactor = "Symmetric"
  293. p.Size = Vector3.new(1, 1, 1)
  294. p.BrickColor = BrickColor.new("Dark stone grey")
  295. p.Reflectance = MR
  296. p.CanCollide = false
  297. p.Locked = true
  298. p.TopSurface = 0
  299. p.BottomSurface = 0
  300. p.Parent = model
  301. local m = Instance.new("BlockMesh")
  302. m.Scale = Vector3.new(0.18, 0.18, 0.18)
  303. m.Parent = p
  304. local w = Instance.new("Weld")
  305. w.Part0 = p
  306. w.Part1 = pm
  307. w.C0 = CFrame.new(0, 0.02, -0.25)
  308. w.C1 = CFrame.new()
  309. w.Parent = p
  310. local p = Instance.new("Part")
  311. p.Name = "Body1" --------------
  312. p.CanCollide = false
  313. p.formFactor = "Symmetric"
  314. p.Size = Vector3.new(1, 1, 1)
  315. p.BrickColor = GC
  316. p.Reflectance = GR
  317. p.Locked = true
  318. p.TopSurface = 0
  319. p.BottomSurface = 0
  320. p.Parent = model
  321. local m = Instance.new("BlockMesh")
  322. m.Scale = Vector3.new(0.3, 2, 0.38)
  323. m.Parent = p
  324. local w = Instance.new("Weld")
  325. w.Part0 = p
  326. w.Part1 = pm
  327. w.C0 = CFrame.new(0, 1.2, -0.12)
  328. w.C1 = CFrame.new()
  329. w.Parent = p
  330. local p = Instance.new("Part")
  331. p.Name = "Body2"
  332. p.CanCollide = false
  333. p.formFactor = "Symmetric"
  334. p.Size = Vector3.new(1, 1, 1)
  335. p.BrickColor = DC
  336. p.Reflectance = MR
  337. p.Locked = true
  338. p.TopSurface = 0
  339. p.BottomSurface = 0
  340. p.Parent = model
  341. local m = Instance.new("SpecialMesh")
  342. m.MeshType = "Brick"
  343. m.Scale = Vector3.new(0.32, 1.4, 0.2)
  344. m.Parent = p
  345. local w = Instance.new("Weld")
  346. w.Part0 = p
  347. w.Part1 = pm
  348. w.C0 = CFrame.new(0, 1.48, -0.08)
  349. w.C1 = CFrame.new()
  350. w.Parent = p
  351. local p = Instance.new("Part")
  352. p.Name = "GripAngle1"
  353. p.CanCollide = false
  354. p.formFactor = "Symmetric"
  355. p.Size = Vector3.new(1, 1, 1)
  356. p.BrickColor = GC
  357. p.Reflectance = GR
  358. p.Locked = true
  359. p.TopSurface = 0
  360. p.BottomSurface = 0
  361. p.Parent = model
  362. local m = Instance.new("SpecialMesh")
  363. m.MeshType = "Wedge"
  364. m.Scale = Vector3.new(0.3, 0.14, 0.6)
  365. m.Parent = p
  366. local w = Instance.new("Weld")
  367. w.Part0 = p
  368. w.Part1 = pm
  369. w.C0 = CFrame.new(0, -0.38, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(270), 0, math.rad(180))
  370. w.C1 = CFrame.new()
  371. w.Parent = p
  372. local p = Instance.new("Part")
  373. p.Name = "GripAngle2"
  374. p.CanCollide = false
  375. p.formFactor = "Symmetric"
  376. p.Size = Vector3.new(1, 1, 1)
  377. p.BrickColor = GC
  378. p.Reflectance = GR
  379. p.Locked = true
  380. p.TopSurface = 0
  381. p.BottomSurface = 0
  382. p.Parent = model
  383. local m = Instance.new("SpecialMesh")
  384. m.MeshType = "Wedge"
  385. m.Scale = Vector3.new(0.3, 0.06, 0.8)
  386. m.Parent = p
  387. local w = Instance.new("Weld")
  388. w.Part0 = p
  389. w.Part1 = pm
  390. w.C0 = CFrame.new(0, -0.34, 0.8) * CFrame.fromEulerAnglesXYZ(math.rad(270), 0, math.rad(180))
  391. w.C1 = CFrame.new()
  392. w.Parent = p
  393. local p = Instance.new("Part")
  394. p.Name = "GripTrigHous"
  395. p.formFactor = "Symmetric"
  396. p.Size = Vector3.new(1, 1, 1)
  397. p.BrickColor = GC
  398. p.Reflectance = GR
  399. p.CanCollide = false
  400. p.Locked = true
  401. p.TopSurface = 0
  402. p.BottomSurface = 0
  403. p.Parent = model
  404. local m = Instance.new("BlockMesh")
  405. m.Scale = Vector3.new(0.3, 0.4, 0.1)
  406. m.Parent = p
  407. local w = Instance.new("Weld")
  408. w.Part0 = p
  409. w.Part1 = pm
  410. w.C0 = CFrame.new(0, 0, -0.4)
  411. w.C1 = CFrame.new()
  412. w.Parent = p
  413. local p = Instance.new("Part")
  414. p.Name = "GripCover"
  415. p.formFactor = "Symmetric"
  416. p.Size = Vector3.new(1, 1, 1)
  417. p.BrickColor = GC
  418. p.Reflectance = GR
  419. p.CanCollide = false
  420. p.Locked = true
  421. p.TopSurface = 0
  422. p.BottomSurface = 0
  423. p.Parent = model
  424. local m = Instance.new("BlockMesh")
  425. m.Scale = Vector3.new(0.3, 1, 0.3)
  426. m.Parent = p
  427. local w = Instance.new("Weld")
  428. w.Part0 = p
  429. w.Part1 = pm
  430. w.C0 = CFrame.new(0, 0.1, -0.08)
  431. w.C1 = CFrame.new()
  432. w.Parent = p
  433. local p = Instance.new("Part")
  434. p.Name = "BoltBlock" --------------
  435. p.CanCollide = false
  436. p.formFactor = "Symmetric"
  437. p.Size = Vector3.new(1, 1, 1)
  438. p.BrickColor = DC
  439. p.Reflectance = MR
  440. p.Locked = true
  441. p.TopSurface = 0
  442. p.BottomSurface = 0
  443. p.Parent = model
  444. local m = Instance.new("SpecialMesh")
  445. m.MeshType = "Brick"
  446. m.Scale = Vector3.new(0.28, 1, 0.3)
  447. m.Parent = p
  448. local w = Instance.new("Weld")
  449. w.Part0 = p
  450. w.Part1 = pm
  451. w.C0 = CFrame.new(0, 0.3, 0.06)
  452. w.C1 = CFrame.new()
  453. w.Parent = p
  454. local p = Instance.new("Part")
  455. p.Name = "BoltShaftI"
  456. p.formFactor = "Symmetric"
  457. p.Size = Vector3.new(1, 1, 1)
  458. p.BrickColor = BC
  459. p.Reflectance = MR
  460. p.Transparency = 0
  461. p.CanCollide = false
  462. p.Locked = true
  463. p.TopSurface = 0
  464. p.BottomSurface = 0
  465. p.Parent = model
  466. local m = Instance.new("SpecialMesh")
  467. m.MeshType = "Brick"
  468. m.Scale = Vector3.new(0.26, 1, 0.26)
  469. m.Parent = p
  470. local w = Instance.new("Weld")
  471. w.Part0 = p
  472. w.Part1 = pm
  473. w.C0 = CFrame.new(0, 0.06, 0.06)
  474. w.C1 = CFrame.new()
  475. w.Parent = p
  476. local p = Instance.new("Part")
  477. p.Name = "BoltKnobI"
  478. p.CanCollide = false
  479. p.formFactor = "Symmetric"
  480. p.Size = Vector3.new(1, 1, 1)
  481. p.BrickColor = BC
  482. p.Reflectance = MR
  483. p.Transparency = 0
  484. p.Locked = true
  485. p.TopSurface = 0
  486. p.BottomSurface = 0
  487. p.Parent = model
  488. local m = Instance.new("SpecialMesh")
  489. m.MeshType = "Brick"
  490. m.Scale = Vector3.new(0.3, 0.14, 0.14)
  491. m.Parent = p
  492. local w = Instance.new("Weld")
  493. w.Part0 = p
  494. w.Part1 = pm
  495. w.C0 = CFrame.new(0.2, -0.3, 0.06)
  496. w.C1 = CFrame.new()
  497. w.Parent = p
  498. local p = Instance.new("Part")
  499. p.Name = "BoltShaftO"
  500. p.formFactor = "Symmetric"
  501. p.Size = Vector3.new(1, 1, 1)
  502. p.BrickColor = BC
  503. p.Reflectance = MR
  504. p.Transparency = 1
  505. p.CanCollide = false
  506. p.Locked = true
  507. p.TopSurface = 0
  508. p.BottomSurface = 0
  509. p.Parent = model
  510. local m = Instance.new("SpecialMesh")
  511. m.MeshType = "Brick"
  512. m.Scale = Vector3.new(0.26, 1, 0.26)
  513. m.Parent = p
  514. local w = Instance.new("Weld")
  515. w.Part0 = p
  516. w.Part1 = pm
  517. w.C0 = CFrame.new(0, -0.06, 0.06)
  518. w.C1 = CFrame.new()
  519. w.Parent = p
  520. local p = Instance.new("Part")
  521. p.Name = "BoltKnobO"
  522. p.CanCollide = false
  523. p.formFactor = "Symmetric"
  524. p.Size = Vector3.new(1, 1, 1)
  525. p.BrickColor = BC
  526. p.Reflectance = MR
  527. p.Transparency = 1
  528. p.Locked = true
  529. p.TopSurface = 0
  530. p.BottomSurface = 0
  531. p.Parent = model
  532. local m = Instance.new("SpecialMesh")
  533. m.MeshType = "Brick"
  534. m.Scale = Vector3.new(0.3, 0.14, 0.14)
  535. m.Parent = p
  536. local w = Instance.new("Weld")
  537. w.Part0 = p
  538. w.Part1 = pm
  539. w.C0 = CFrame.new(0.2, -0.4, 0.06)
  540. w.C1 = CFrame.new()
  541. w.Parent = p
  542. local p = Instance.new("Part")
  543. p.Name = "Barrel 1"
  544. p.formFactor = "Symmetric"
  545. p.Size = Vector3.new(1, 1, 1)
  546. p.BrickColor = DC
  547. p.Reflectance = MR
  548. p.CanCollide = false
  549. p.Locked = true
  550. p.TopSurface = 0
  551. p.BottomSurface = 0
  552. p.Parent = model
  553. local m = Instance.new("CylinderMesh")
  554. m.Scale = Vector3.new(0.2, 4, 0.2)
  555. m.Parent = p
  556. local w = Instance.new("Weld")
  557. w.Part0 = p
  558. w.Part1 = pm
  559. w.C0 = CFrame.new(0, 2.6, 0.06)
  560. w.C1 = CFrame.new()
  561. w.Parent = p
  562. local p = Instance.new("Part")
  563. p.Name = "Muzzle"
  564. p.formFactor = "Symmetric"
  565. p.Size = Vector3.new(1, 1, 1)
  566. p.BrickColor = DC
  567. p.Reflectance = MR
  568. p.CanCollide = false
  569. p.Locked = true
  570. p.TopSurface = 0
  571. p.BottomSurface = 0
  572. p.Parent = model
  573. local m = Instance.new("CylinderMesh")
  574. m.Scale = Vector3.new(0.24, 0.8, 0.24)
  575. m.Parent = p
  576. local w = Instance.new("Weld")
  577. w.Part0 = p
  578. w.Part1 = pm
  579. w.C0 = CFrame.new(0, 4.2, 0.06)
  580. w.C1 = CFrame.new()
  581. w.Parent = p
  582. local s = Instance.new("Smoke")
  583. s.Enabled = false
  584. s.Name = "Smoke"
  585. s.RiseVelocity = -5
  586. s.Opacity = 0.5
  587. s.Color = Color3.new(75 / 225, 75 / 225, 75 / 225)
  588. s.Size = 2.4
  589. s.Parent = p
  590. local f = Instance.new("Fire")
  591. f.Enabled = false
  592. f.Name = "Fire"
  593. f.Heat = -20
  594. f.Size = 3.6
  595. f.Parent = p
  596. local p = Instance.new("Part")
  597. p.Name = "MuzzleHole"
  598. p.formFactor = "Symmetric"
  599. p.Size = Vector3.new(1, 1, 1)
  600. p.BrickColor = BrickColor.new("Really black")
  601. p.Reflectance = MR
  602. p.CanCollide = false
  603. p.Locked = true
  604. p.TopSurface = 0
  605. p.BottomSurface = 0
  606. p.Parent = model
  607. local m = Instance.new("CylinderMesh")
  608. m.Scale = Vector3.new(0.18, 0.8, 0.18)
  609. m.Parent = p
  610. local w = Instance.new("Weld")
  611. w.Part0 = p
  612. w.Part1 = pm
  613. w.C0 = CFrame.new(0, 4.203, 0.06)
  614. w.C1 = CFrame.new()
  615. w.Parent = p
  616. local p = Instance.new("Part")
  617. p.Name = "Silencer"
  618. p.formFactor = "Symmetric"
  619. p.Size = Vector3.new(1, 1, 1)
  620. p.BrickColor = BrickColor.new("Black")
  621. p.CanCollide = false
  622. p.Transparency = 1
  623. p.Locked = true
  624. p.TopSurface = 0
  625. p.BottomSurface = 0
  626. p.Parent = model
  627. local m = Instance.new("CylinderMesh")
  628. m.Scale = Vector3.new(0.28, 3, 0.28)
  629. m.Parent = p
  630. local w = Instance.new("Weld")
  631. w.Part0 = p
  632. w.Part1 = pm
  633. w.C0 = CFrame.new(0, 4, 0.06)
  634. w.C1 = CFrame.new()
  635. w.Parent = p
  636. local p = Instance.new("Part")
  637. p.Name = "GripStock"
  638. p.formFactor = "Symmetric"
  639. p.Size = Vector3.new(1, 1, 1)
  640. p.BrickColor = GC
  641. p.Reflectance = GR
  642. p.CanCollide = false
  643. p.Locked = true
  644. p.TopSurface = 0
  645. p.BottomSurface = 0
  646. p.Parent = model
  647. local m = Instance.new("BlockMesh")
  648. m.Scale = Vector3.new(0.3, 0.8, 0.3)
  649. m.Parent = p
  650. local w = Instance.new("Weld")
  651. w.Part0 = p
  652. w.Part1 = pm
  653. w.C0 = CFrame.new(0, -0.6, -0.75) * CFrame.fromEulerAnglesXYZ(math.rad(20), 0, 0)
  654. w.C1 = CFrame.new()
  655. w.Parent = p
  656. local p = Instance.new("Part") -- Standard Stock
  657. p.Name = "StockT"
  658. p.CanCollide = false
  659. p.formFactor = "Symmetric"
  660. p.Size = Vector3.new(1, 1, 1)
  661. p.BrickColor = GC
  662. p.Reflectance = GR
  663. p.Locked = true
  664. p.TopSurface = 0
  665. p.BottomSurface = 0
  666. p.Parent = model
  667. local m = Instance.new("BlockMesh")
  668. m.Scale = Vector3.new(0.3, 1.4, 0.25)
  669. m.Parent = p
  670. local w = Instance.new("Weld")
  671. w.Part0 = p
  672. w.Part1 = pm
  673. w.C0 = CFrame.new(0, -0.6, -0.1)
  674. w.C1 = CFrame.new()
  675. w.Parent = p
  676. local p = Instance.new("Part")
  677. p.Name = "CheekRest" --------------
  678. p.CanCollide = false
  679. p.formFactor = "Symmetric"
  680. p.Size = Vector3.new(1, 1, 1)
  681. p.BrickColor = DC
  682. p.Reflectance = MR
  683. p.Locked = true
  684. p.TopSurface = 0
  685. p.BottomSurface = 0
  686. p.Parent = model
  687. local m = Instance.new("SpecialMesh")
  688. m.MeshType = "Brick"
  689. m.Scale = Vector3.new(0.26, 0.6, 0.3)
  690. m.Parent = p
  691. local w = Instance.new("Weld")
  692. w.Part0 = p
  693. w.Part1 = pm
  694. w.C0 = CFrame.new(0, -0.84, -0.04)
  695. w.C1 = CFrame.new()
  696. w.Parent = p
  697. local p = Instance.new("Part")
  698. p.Name = "Stock1"
  699. p.CanCollide = false
  700. p.formFactor = "Symmetric"
  701. p.Size = Vector3.new(1, 1, 1)
  702. p.BrickColor = DC
  703. p.Reflectance = MR
  704. p.Locked = true
  705. p.TopSurface = 0
  706. p.BottomSurface = 0
  707. p.Parent = model
  708. local m = Instance.new("BlockMesh")
  709. m.Scale = Vector3.new(0.34, 0.4, 0.7)
  710. m.Parent = p
  711. local w = Instance.new("Weld")
  712. w.Part0 = p
  713. w.Part1 = pm
  714. w.C0 = CFrame.new(0, -1.38, -0.3) --* CFrame.fromEulerAnglesXYZ(math.rad(270), 0, math.rad(180))
  715. w.C1 = CFrame.new()
  716. w.Parent = p
  717. local p = Instance.new("Part")
  718. p.Name = "Stock2"
  719. p.CanCollide = false
  720. p.formFactor = "Symmetric"
  721. p.Size = Vector3.new(1, 1, 1)
  722. p.BrickColor = GC
  723. p.Reflectance = GR
  724. p.Locked = true
  725. p.TopSurface = 0
  726. p.BottomSurface = 0
  727. p.Parent = model
  728. local m = Instance.new("BlockMesh")
  729. m.Scale = Vector3.new(0.3, 0.4, 0.5)
  730. m.Parent = p
  731. local w = Instance.new("Weld")
  732. w.Part0 = p
  733. w.Part1 = pm
  734. w.C0 = CFrame.new(0, -0.38, -1) * CFrame.fromEulerAnglesXYZ(math.rad(270), 0, math.rad(180))
  735. w.C1 = CFrame.new()
  736. w.Parent = p--]]
  737. local p = Instance.new("Part") -------------- SCOPE
  738. p.Name = "Scope Base"
  739. p.formFactor = "Symmetric"
  740. p.CanCollide = false
  741. p.Size = Vector3.new(1, 1, 1)
  742. p.BrickColor = DC
  743. p.Reflectance = MR
  744. p.Locked = true
  745. p.TopSurface = 0
  746. p.BottomSurface = 0
  747. p.Parent = model
  748. local m = Instance.new("BlockMesh")
  749. m.Scale = Vector3.new(0.1, 0.14, 0.4)
  750. m.Parent = p
  751. local w = Instance.new("Weld")
  752. w.Part0 = p
  753. w.Part1 = pm
  754. w.C0 = CFrame.new(0, 0.1, 0.18)
  755. w.C1 = CFrame.new()
  756. w.Parent = p
  757. local p = Instance.new("Part")
  758. p.Name = "Scope Base"
  759. p.formFactor = "Symmetric"
  760. p.CanCollide = false
  761. p.Size = Vector3.new(1, 1, 1)
  762. p.BrickColor = DC
  763. p.Reflectance = MR
  764. p.Locked = true
  765. p.TopSurface = 0
  766. p.BottomSurface = 0
  767. p.Parent = model
  768. local m = Instance.new("BlockMesh")
  769. m.Scale = Vector3.new(0.1, 0.14, 0.4)
  770. m.Parent = p
  771. local w = Instance.new("Weld")
  772. w.Part0 = p
  773. w.Part1 = pm
  774. w.C0 = CFrame.new(0, 0.48, 0.18)
  775. w.C1 = CFrame.new()
  776. w.Parent = p
  777. local p = Instance.new("Part")
  778. p.Name = "Scope End 1" --End = Back
  779. p.CanCollide = false
  780. p.formFactor = "Symmetric"
  781. p.Size = Vector3.new(1, 1, 1)
  782. p.BrickColor = DC
  783. p.Reflectance = MR
  784. p.Locked = true
  785. p.TopSurface = 0
  786. p.BottomSurface = 0
  787. p.Parent = model
  788. local m = Instance.new("CylinderMesh")
  789. m.Scale = Vector3.new(0.24, 0.375, 0.24)
  790. m.Parent = p
  791. local w = Instance.new("Weld")
  792. w.Part0 = p
  793. w.Part1 = pm
  794. w.C0 = CFrame.new(0, -0.2, 0.38)
  795. w.C1 = CFrame.new()
  796. w.Parent = p
  797. local p = Instance.new("Part")
  798. p.Name = "Scope Center 1"
  799. p.CanCollide = false
  800. p.formFactor = "Symmetric"
  801. p.Size = Vector3.new(1, 1, 1)
  802. p.BrickColor = DC
  803. p.Reflectance = MR
  804. p.Locked = true
  805. p.TopSurface = 0
  806. p.BottomSurface = 0
  807. p.Parent = model
  808. local m = Instance.new("CylinderMesh")
  809. m.Scale = Vector3.new(0.2, 0.8, 0.2)
  810. m.Parent = p
  811. local w = Instance.new("Weld")
  812. w.Part0 = p
  813. w.Part1 = pm
  814. w.C0 = CFrame.new(0, 0.3, 0.38)
  815. w.C1 = CFrame.new()
  816. w.Parent = p
  817. local p = Instance.new("Part")
  818. p.Name = "Scope Front 1"
  819. p.CanCollide = false
  820. p.formFactor = "Symmetric"
  821. p.Size = Vector3.new(1, 1, 1)
  822. p.BrickColor = DC
  823. p.Reflectance = MR
  824. p.Locked = true
  825. p.TopSurface = 0
  826. p.BottomSurface = 0
  827. p.Parent = model
  828. local m = Instance.new("CylinderMesh")
  829. m.Scale = Vector3.new(0.28, 0.7, 0.28)
  830. m.Parent = p
  831. local w = Instance.new("Weld")
  832. w.Part0 = p
  833. w.Part1 = pm
  834. w.C0 = CFrame.new(0, 0.94, 0.38)
  835. w.C1 = CFrame.new()
  836. w.Parent = p
  837. local p = Instance.new("Part")
  838. p.Name = "Scope Window F"
  839. p.CanCollide = false
  840. p.formFactor = "Symmetric"
  841. p.Size = Vector3.new(1, 1, 1)
  842. p.BrickColor = BrickColor.new("White")
  843. p.Reflectance = 0.3
  844. p.Locked = true
  845. p.TopSurface = 0
  846. p.BottomSurface = 0
  847. p.Parent = model
  848. local m = Instance.new("CylinderMesh")
  849. m.Scale = Vector3.new(0.27, 0.7, 0.27)
  850. m.Offset = Vector3.new(0, -0.003 ,0)
  851. m.Parent = p
  852. local w = Instance.new("Weld")
  853. w.Part0 = p
  854. w.Part1 = pm
  855. w.C0 = CFrame.new(0, 0.94, 0.38)
  856. w.C1 = CFrame.new()
  857. w.Parent = p
  858. local p = Instance.new("Part")
  859. p.Name = "Scope Window B"
  860. p.CanCollide = false
  861. p.formFactor = "Symmetric"
  862. p.Size = Vector3.new(1, 1, 1)
  863. p.BrickColor = BrickColor.new("White")
  864. p.Reflectance = 0.3
  865. p.Locked = true
  866. p.TopSurface = 0
  867. p.BottomSurface = 0
  868. p.Parent = model
  869. local m = Instance.new("CylinderMesh")
  870. m.Scale = Vector3.new(0.23, 0.375, 0.23)
  871. m.Offset = Vector3.new(0, 0.003 ,0)
  872. m.Parent = p
  873. local w = Instance.new("Weld")
  874. w.Part0 = p
  875. w.Part1 = pm
  876. w.C0 = CFrame.new(0, -0.2, 0.38)
  877. w.C1 = CFrame.new()
  878. w.Parent = p--]]
  879. local p = Instance.new("Part") ---Bipod
  880. p.Name = "BipodM" --------------
  881. p.CanCollide = false
  882. p.formFactor = "Symmetric"
  883. p.Size = Vector3.new(1, 1, 1)
  884. p.BrickColor = DC
  885. p.Reflectance = MR
  886. p.Locked = true
  887. p.TopSurface = 0
  888. p.BottomSurface = 0
  889. p.Parent = model
  890. local m = Instance.new("BlockMesh")
  891. m.Scale = Vector3.new(0.17, 0.25, 0.2)
  892. m.Parent = p
  893. local w = Instance.new("Weld")
  894. w.Part0 = p
  895. w.Part1 = pm
  896. w.C0 = CFrame.new(0, 2, -0.35)
  897. w.C1 = CFrame.new()
  898. w.Parent = p
  899. local p = Instance.new("Part")
  900. p.Name = "BipodArm"
  901. p.formFactor = "Symmetric"
  902. p.Size = Vector3.new(1, 1, 1)
  903. p.CanCollide = false
  904. p.BrickColor = DC
  905. p.Reflectance = MR
  906. p.Locked = true
  907. p.TopSurface = 0
  908. p.BottomSurface = 0
  909. p.Parent = model
  910. local m = Instance.new("CylinderMesh")
  911. m.Scale = Vector3.new(0.15, 1, 0.15)
  912. m.Offset = Vector3.new(0, -0.44 ,0)
  913. m.Parent = p
  914. local w = Instance.new("Weld")
  915. w.Part0 = p
  916. w.Part1 = pm
  917. w.C0 = CFrame.new(-0.09, 2, -0.4)
  918. w.C1 = CFrame.new()
  919. w.Parent = p
  920. local p = Instance.new("Part")
  921. p.Name = "BipodArm"
  922. p.formFactor = "Symmetric"
  923. p.Size = Vector3.new(1, 1, 1)
  924. p.CanCollide = false
  925. p.BrickColor = DC
  926. p.Reflectance = MR
  927. p.Locked = true
  928. p.TopSurface = 0
  929. p.BottomSurface = 0
  930. p.Parent = model
  931. local m = Instance.new("CylinderMesh")
  932. m.Scale = Vector3.new(0.15, 1, 0.15)
  933. m.Offset = Vector3.new(0, -0.44 ,0)
  934. m.Parent = p
  935. local w = Instance.new("Weld")
  936. w.Part0 = p
  937. w.Part1 = pm
  938. w.C0 = CFrame.new(0.09, 2, -0.4)
  939. w.C1 = CFrame.new()
  940. w.Parent = p--]]
  941. return model
  942. end
  943.  
  944. function removeParts(format)
  945. if format == "RightHand" then
  946. pcall(function() Player.Character[Name]:Remove() end)
  947. elseif format == "LeftHand" then
  948. pcall(function() Player.Character[Name.. " (Left)"]:Remove() end)
  949. elseif format == "RightHolster" then
  950. pcall(function() Player.Character[Name.. " (Holstered)"]:Remove() end)
  951. elseif format == "LeftHolster" then
  952. pcall(function() Player.Character[Name.. " (Holstered, Left)"]:Remove() end)
  953. end
  954. end
  955.  
  956. function SetAngle(Joint, Angle, Character)
  957. if Character == nil then return false end
  958. local Joints = {
  959. Character.Torso:FindFirstChild("Right Shoulder 2"),
  960. Character.Torso:FindFirstChild("Left Shoulder 2"),
  961. Character.Torso:FindFirstChild("Right Hip 2"),
  962. Character.Torso:FindFirstChild("Left Hip 2")
  963. }
  964. if Joints[Joint] == nil then return false end
  965. if Joint == 1 or Joint == 3 then
  966. Joints[Joint].DesiredAngle = Angle
  967. end
  968. if Joint == 2 or Joint == 4 then
  969. Joints[Joint].DesiredAngle = -Angle
  970. end
  971. end
  972.  
  973. function ForceAngle(Joint, Angle, Character)
  974. if Character == nil then return false end
  975. local Joints = {
  976. Character.Torso:FindFirstChild("Right Shoulder 2"),
  977. Character.Torso:FindFirstChild("Left Shoulder 2"),
  978. Character.Torso:FindFirstChild("Right Hip 2"),
  979. Character.Torso:FindFirstChild("Left Hip 2")
  980. }
  981. if Joints[Joint] == nil then return false end
  982. if Joint == 1 or Joint == 3 then
  983. Joints[Joint].DesiredAngle = Angle
  984. Joints[Joint].CurrentAngle = Angle
  985. end
  986. if Joint == 2 or Joint == 4 then
  987. Joints[Joint].DesiredAngle = -Angle
  988. Joints[Joint].CurrentAngle = -Angle
  989. end
  990. end
  991.  
  992. function SetSpeed(Joint, Speed, Character)
  993. if Character == nil then return false end
  994. local Joints = {
  995. Character.Torso:FindFirstChild("Right Shoulder 2"),
  996. Character.Torso:FindFirstChild("Left Shoulder 2"),
  997. Character.Torso:FindFirstChild("Right Hip 2"),
  998. Character.Torso:FindFirstChild("Left Hip 2")
  999. }
  1000. if Joints[Joint] == nil then return false end
  1001. Joints[Joint].MaxVelocity = Speed
  1002. end
  1003.  
  1004. function DisableLimb(Limb, Character)
  1005. if Character == nil then return false end
  1006. if Character:FindFirstChild("Torso") == nil then return false end
  1007. local Joints = {
  1008. Character.Torso:FindFirstChild("Right Shoulder"),
  1009. Character.Torso:FindFirstChild("Left Shoulder"),
  1010. Character.Torso:FindFirstChild("Right Hip"),
  1011. Character.Torso:FindFirstChild("Left Hip")
  1012. }
  1013. local Limbs = {
  1014. Character:FindFirstChild("Right Arm"),
  1015. Character:FindFirstChild("Left Arm"),
  1016. Character:FindFirstChild("Right Leg"),
  1017. Character:FindFirstChild("Left Leg")
  1018. }
  1019. if Joints[Limb] == nil then return false end
  1020. if Limbs[Limb] == nil then return false end
  1021. local Joint = Instance.new("Motor")
  1022. Joint.Parent = Character.Torso
  1023. Joint.Part0 = Character.Torso
  1024. Joint.Part1 = Limbs[Limb]
  1025. if Limb == 1 then
  1026. Joint.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  1027. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  1028. Joint.Name = "Right Shoulder 2"
  1029. elseif Limb == 2 then
  1030. Joint.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1031. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1032. Joint.Name = "Left Shoulder 2"
  1033. elseif Limb == 3 then
  1034. Joint.C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  1035. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  1036. Joint.Name = "Right Hip 2"
  1037. elseif Limb == 4 then
  1038. Joint.C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1039. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1040. Joint.Name = "Left Hip 2"
  1041. end
  1042. Joint.MaxVelocity = Joints[Limb].MaxVelocity
  1043. Joint.CurrentAngle = Joints[Limb].CurrentAngle
  1044. Joint.DesiredAngle = Joints[Limb].DesiredAngle
  1045. Joints[Limb]:Remove()
  1046. end
  1047.  
  1048. function ResetLimbCFrame(Limb, Character)
  1049. if Character == nil then return false end
  1050. if Character.Parent == nil then return false end
  1051. if Character:FindFirstChild("Torso") == nil then return false end
  1052. local Joints = {
  1053. Character.Torso:FindFirstChild("Right Shoulder 2"),
  1054. Character.Torso:FindFirstChild("Left Shoulder 2"),
  1055. Character.Torso:FindFirstChild("Right Hip 2"),
  1056. Character.Torso:FindFirstChild("Left Hip 2")
  1057. }
  1058. local Limbs = {
  1059. Character:FindFirstChild("Right Arm"),
  1060. Character:FindFirstChild("Left Arm"),
  1061. Character:FindFirstChild("Right Leg"),
  1062. Character:FindFirstChild("Left Leg")
  1063. }
  1064. if Joints[Limb] == nil then return false end
  1065. if Limbs[Limb] == nil then return false end
  1066. if Limb == 1 then
  1067. Joints[Limb].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  1068. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  1069. elseif Limb == 2 then
  1070. Joints[Limb].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1071. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1072. elseif Limb == 3 then
  1073. Joints[Limb].C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  1074. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  1075. elseif Limb == 4 then
  1076. Joints[Limb].C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1077. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1078. end
  1079. end
  1080.  
  1081. function EnableLimb(Limb, Character)
  1082. if Character == nil then return false end
  1083. if Character:FindFirstChild("Torso") == nil then return false end
  1084. local Joints = {
  1085. Character.Torso:FindFirstChild("Right Shoulder 2"),
  1086. Character.Torso:FindFirstChild("Left Shoulder 2"),
  1087. Character.Torso:FindFirstChild("Right Hip 2"),
  1088. Character.Torso:FindFirstChild("Left Hip 2")
  1089. }
  1090. local Limbs = {
  1091. Character:FindFirstChild("Right Arm"),
  1092. Character:FindFirstChild("Left Arm"),
  1093. Character:FindFirstChild("Right Leg"),
  1094. Character:FindFirstChild("Left Leg")
  1095. }
  1096. if Joints[Limb] == nil then return false end
  1097. if Limbs[Limb] == nil then return false end
  1098. if Limb == 1 then
  1099. Joints[Limb].Name = "Right Shoulder"
  1100. elseif Limb == 2 then
  1101. Joints[Limb].Name = "Left Shoulder"
  1102. elseif Limb == 3 then
  1103. Joints[Limb].Name = "Right Hip"
  1104. elseif Limb == 4 then
  1105. Joints[Limb].Name = "Left Hip"
  1106. end
  1107. Animate = Character:FindFirstChild("Animate")
  1108. if Animate == nil then return false end
  1109. Animate = Animate:Clone()
  1110. Character.Animate:Remove()
  1111. Animate.Parent = Character
  1112. end
  1113.  
  1114. function playAnimation(format, mouse)
  1115. if format == "equip" then
  1116. EnableLimb(1, Player.Character)
  1117. EnableLimb(2, Player.Character)
  1118. DisableLimb(2, Player.Character)
  1119. SetSpeed(2, 0.1, Player.Character)
  1120. ForceAngle(2, 0, Player.Character)
  1121. SetAngle(2, math.rad(-50), Player.Character)
  1122. wait(0.25)
  1123. if Player.Character:FindFirstChild(Name.. " (Holstered)") == nil then makeParts("RightHolster") end
  1124. Player.Character[Name.. " (Holstered)"].Handle.Weld:Remove()
  1125. local w = Instance.new("Weld")
  1126. w.Part0 = Player.Character[Name.. " (Holstered)"].Handle
  1127. w.Part1 = Player.Character:FindFirstChild("Left Arm")
  1128. w.C0 = CFrame.new(0.5, -0.25, -0.75) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1129. w.C1 = CFrame.new() * CFrame.fromEulerAnglesXYZ(math.rad(50), 0, 0)
  1130. w.Parent = Player.Character[Name.. " (Holstered)"].Handle
  1131. SetAngle(2, 0, Player.Character)
  1132. wait(0.25)
  1133. DisableLimb(1, Player.Character)
  1134. ForceAngle(1, 0, Player.Character)
  1135. delay(0.3, function() Player.Character[Name.. " (Holstered)"].Handle.Equip:Play() end)
  1136. for i = 0, 1, 0.05 do
  1137. if Player.Character:FindFirstChild("Torso") ~= nil then
  1138. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1139. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1140. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new((-0.5 * i) + (1.5 * (1 - i)), 1.2 * i, 0.8 * i) * CFrame.fromEulerAnglesXYZ(math.rad(300 + ((1 - i) * 50)), math.rad(10), math.rad(-90) * i)
  1141. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  1142. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new((-0.9 * i) + (-1.5 * (1 - i)), -0.35 * i, 0.51 * i) * CFrame.fromEulerAnglesXYZ(math.rad(-90 * i), math.rad(-5 * i), 0)
  1143. w.C0 = CFrame.new(0.5 - (i * (0.5 * 2)), -0.25 - (i * (-0.25 * 2)), -0.75 - (i * (-0.75 * 2))) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 + (i * 180)), 0)
  1144. w.C1 = CFrame.new() * CFrame.fromEulerAnglesXYZ(math.rad(50 - i * 25), 0, -math.rad(i * 15))
  1145. wait()
  1146. else return false end
  1147. else return false end
  1148. end
  1149. return playAnimation("hold")
  1150. end
  1151. if format == "unequip" then
  1152. Player.Character[Name].Handle.Weld:Remove()
  1153. local w = Instance.new("Weld")
  1154. w.Part0 = Player.Character[Name].Handle
  1155. w.Part1 = Player.Character:FindFirstChild("Left Arm")
  1156. w.C0 = CFrame.new(0.5, -0.25, -0.75) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1157. w.C1 = CFrame.new() * CFrame.fromEulerAnglesXYZ(math.rad(50), 0, 0)
  1158. w.Parent = Player.Character[Name].Handle
  1159. for i = 1, 0, -0.05 do
  1160. if Player.Character:FindFirstChild("Torso") ~= nil then
  1161. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1162. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1163. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new((-0.5 * i) + (1.5 * (1 - i)), 1.2 * i, 0.8 * i) * CFrame.fromEulerAnglesXYZ(math.rad(300 + ((1 - i) * 50)), math.rad(10), math.rad(-90) * i)
  1164. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  1165. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new((-0.9 * i) + (-1.5 * (1 - i)), -0.35 * i, 0.51 * i) * CFrame.fromEulerAnglesXYZ(math.rad(-90 * i), math.rad(-5 * i), 0)
  1166. w.C0 = CFrame.new(0.5 - (i * (0.5 * 2)), -0.25 - (i * (-0.25 * 2)), -0.75 - (i * (-0.75 * 2))) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 + (i * 180)), 0)
  1167. w.C1 = CFrame.new() * CFrame.fromEulerAnglesXYZ(math.rad(50 - i * 25), 0, -math.rad(i * 15))
  1168. wait()
  1169. else return false end
  1170. else return false end
  1171. end
  1172. w.C0 = CFrame.new(0.5, -0.25, -0.75) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1173. w.C1 = CFrame.new() * CFrame.fromEulerAnglesXYZ(math.rad(50), 0, 0)
  1174. ResetLimbCFrame(1, Player.Character)
  1175. ResetLimbCFrame(2, Player.Character)
  1176. EnableLimb(1, Player.Character)
  1177. EnableLimb(2, Player.Character)
  1178. DisableLimb(2, Player.Character)
  1179. SetSpeed(2, 0.1, Player.Character)
  1180. ForceAngle(2, 0, Player.Character)
  1181. SetAngle(2, math.rad(-50), Player.Character)
  1182. wait(0.25)
  1183. SetAngle(2, 0, Player.Character)
  1184. removeParts("RightHand")
  1185. makeParts("RightHolster")
  1186. wait(0.25)
  1187. makeParts("RightHand")
  1188. removeParts("RightHolster")
  1189. return true
  1190. end
  1191. if format == "hold" then
  1192. if Player.Character:FindFirstChild("Torso") ~= nil then
  1193. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1194. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1195. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.5, 1.2, 0.8) * CFrame.fromEulerAnglesXYZ(math.rad(300), math.rad(10), math.rad(-90))
  1196. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  1197. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-0.9, -0.35, 0.51) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5), 0)
  1198. else return false end
  1199. else return false end
  1200. end
  1201. if format == "reload" then
  1202. Player.Character[Name].Handle.Equip:Play()
  1203. for i = 0, 10, 5 do
  1204. if Player.Character:FindFirstChild("Torso") ~= nil then
  1205. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil then
  1206. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1207. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.5 - (i / 25), 0.2, 0.2) * CFrame.fromEulerAnglesXYZ(math.rad(300 - i), math.rad(10 - i), math.rad(-90))
  1208. wait()
  1209. else return false end
  1210. else return false end
  1211. end
  1212. wait(0.1)
  1213. Player.Character[Name].BoltKnobI.Transparency = 1
  1214. Player.Character[Name].BoltShaftI.Transparency = 1
  1215. Player.Character[Name].BoltShaftO.Transparency = 0
  1216. Player.Character[Name].BoltKnobO.Transparency = 0
  1217. for i = 0, 10, 1.5 do
  1218. if Player.Character:FindFirstChild("Torso") ~= nil then
  1219. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil then
  1220. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1221. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.9, 0.2 - (i / 25), 0.2) * CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  1222. wait()
  1223. else return false end
  1224. else return false end
  1225. end
  1226. Player.Character[Name].Handle.Equip:Stop()
  1227. Player.Character[Name].Handle.Reload:Play()
  1228. Player.Character[Name].Magazine.Transparency = 1
  1229. magazineDrop = Player.Character[Name].Magazine:Clone()
  1230. magazineDrop.Transparency = 0
  1231. magazineDrop.CanCollide = true
  1232. magazineDrop.Parent = game.Workspace
  1233. coroutine.resume(coroutine.create(function(part) wait(4.5) for i = 0, 1, 0.1 do part.Transparency = i wait() end part:Remove() end), magazineDrop)
  1234. delay(0.1, function() magazineDrop.CanCollide = true end)
  1235. for i = 0, 25, 5 do
  1236. if Player.Character:FindFirstChild("Torso") ~= nil then
  1237. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1238. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1239. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.5 + (i / 60), 1.2 - (i / 20), 0.8 + (i / 35)) * CFrame.fromEulerAnglesXYZ(math.rad(300 - i), math.rad(10 + -i * 3.5), math.rad(-90))
  1240. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  1241. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-0.9, -0.35, 0.51) * CFrame.fromEulerAnglesXYZ(math.rad(-90 + i), math.rad(-5), 0)
  1242. wait()
  1243. else return false end
  1244. else return false end
  1245. end
  1246. magazineNew = Player.Character[Name].Magazine:Clone()
  1247. magazineNew.Name = "New Magazine"
  1248. magazineNew.Transparency = 0
  1249. magazineNew.Parent = Player.Character[Name]
  1250. local w = Instance.new("Weld")
  1251. w.Part0 = magazineNew
  1252. w.Part1 = Player.Character:FindFirstChild("Left Arm")
  1253. w.C0 = CFrame.new(0, 1.1, 0)
  1254. w.C1 = CFrame.new() * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  1255. w.Parent = magazineNew
  1256. wait(0.2)
  1257. for i = 25, 0, -5 do
  1258. if Player.Character:FindFirstChild("Torso") ~= nil then
  1259. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1260. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1261. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.5 + ((i + 10) / 60), 1.2 - ((i + 10) / 20), 0.8 + (i / 35)) * CFrame.fromEulerAnglesXYZ(math.rad(300 - (i - 10)), math.rad(10 + -i * 3.5), math.rad(-90))
  1262. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  1263. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-0.9, -0.35, 0.51) * CFrame.fromEulerAnglesXYZ(math.rad(-90 + i), math.rad(-5), 0)
  1264. wait()
  1265. else return false end
  1266. else return false end
  1267. end
  1268. Player.Character[Name].Magazine.Transparency = 0
  1269. Player.Character[Name]["New Magazine"]:Remove()
  1270. wait(0.8)
  1271. Player.Character[Name].Handle.Reload:Stop()
  1272. Player.Character[Name].Handle.Equip:Play()
  1273. for i = 10, 0, -1.5 do
  1274. if Player.Character:FindFirstChild("Torso") ~= nil then
  1275. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil then
  1276. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1277. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.9, 0.2 - (i / 25), 0.2) * CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  1278. wait()
  1279. else return false end
  1280. else return false end
  1281. end
  1282. Player.Character[Name].BoltKnobI.Transparency = 0
  1283. Player.Character[Name].BoltShaftI.Transparency = 0
  1284. Player.Character[Name].BoltShaftO.Transparency = 1
  1285. Player.Character[Name].BoltKnobO.Transparency = 1
  1286. for i = 10, 0, -5 do
  1287. if Player.Character:FindFirstChild("Torso") ~= nil then
  1288. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil then
  1289. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1290. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.5 - (i / 25), 0.2, 0.2) * CFrame.fromEulerAnglesXYZ(math.rad(300 - i), math.rad(10 - i), math.rad(-90))
  1291. wait()
  1292. else return false end
  1293. else return false end
  1294. end
  1295. for i = 10, 0, -5 do
  1296. if Player.Character:FindFirstChild("Torso") ~= nil then
  1297. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1298. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1299. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.5, 1.2, 0.8) * CFrame.fromEulerAnglesXYZ(math.rad(300), math.rad(10 + i), math.rad(-90))
  1300. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  1301. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-0.9, -0.35, 0.51) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - i), math.rad(-5), 0)
  1302. wait()
  1303. else return false end
  1304. else return false end
  1305. end
  1306. Player.Character[Name].Handle.Equip:Stop()
  1307. end
  1308. if format == "fire" then
  1309. if Player.Character[Name]:FindFirstChild("Handle") ~= nil then
  1310. if silenced then
  1311. Player.Character[Name].Handle.Fire:Stop()
  1312. Player.Character[Name].Handle.Fire.Volume = math.random(3, 8) / 10
  1313. Player.Character[Name].Handle.Fire.Pitch = math.random(20, 25) / 10
  1314. Player.Character[Name].Handle.Fire:Play()
  1315. --coroutine.resume(coroutine.create(function() for i = 0.8, 0, -0.075 do Player.Character[Name].Handle.Fire.Volume = i wait() end Player.Character[Name].Handle.Fire.Volume = 0 end))
  1316. CamShake(10, 2000)
  1317. else
  1318. Player.Character[Name].Handle.Fire:Stop()
  1319. Player.Character[Name].Handle.Fire.Volume = math.random(9, 10) / 10
  1320. Player.Character[Name].Handle.Fire.Pitch = 1
  1321. Player.Character[Name].Handle.Fire:Play()
  1322. --Player.Character[Name].Handle.Fire2:Play()
  1323. --coroutine.resume(coroutine.create(function() for i = 0.8, 0, -0.075 do Player.Character[Name].Handle.Fire.Volume = i wait() end Player.Character[Name].Handle.Fire.Volume = 0 end))
  1324. CamShake(10, 2000)
  1325. end
  1326. else return false end
  1327. if Player.Character[Name]:FindFirstChild("Muzzle") ~= nil then
  1328. coroutine.resume(coroutine.create(function() Player.Character[Name].Muzzle.Smoke.Enabled = true Player.Character[Name].Muzzle.Fire.Enabled = true wait(0.1) Player.Character[Name].Muzzle.Smoke.Enabled = false Player.Character[Name].Muzzle.Fire.Enabled = false end))
  1329. else return false end
  1330. for i = 0, 10, 5 do
  1331. if Player.Character:FindFirstChild("Torso") ~= nil then
  1332. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1333. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1334. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.5, 1.2, 0.8) * CFrame.fromEulerAnglesXYZ(math.rad(300), math.rad(10 + i), math.rad(-90))
  1335. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  1336. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-0.9, -0.35, 0.51) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - i), math.rad(-5), 0)
  1337. wait()
  1338. else return false end
  1339. else return false end
  1340. end
  1341. --[[for i = 10, 0, -5 do
  1342. if Player.Character:FindFirstChild("Torso") ~= nil then
  1343. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1344. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1345. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.5, 1.2, 0.8) * CFrame.fromEulerAnglesXYZ(math.rad(300), math.rad(10 + i), math.rad(-90))
  1346. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  1347. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-0.9, -0.35, 0.51) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - i), math.rad(-5), 0)
  1348. wait()
  1349. else return false end
  1350. else return false end
  1351. end--]]
  1352. wait(0.75) --Bolt Action
  1353. if silenced == true then
  1354. Player.Character[Name].Handle.Equip:Play()
  1355. end
  1356. for i = 0, 10, 5 do
  1357. if Player.Character:FindFirstChild("Torso") ~= nil then
  1358. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil then
  1359. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1360. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.5 - (i / 25), 0.2, 0.2) * CFrame.fromEulerAnglesXYZ(math.rad(300 - i), math.rad(10 - i), math.rad(-90))
  1361. wait()
  1362. else return false end
  1363. else return false end
  1364. end
  1365. wait(0.1)
  1366. for i = 0, 10, 1.5 do
  1367. if Player.Character:FindFirstChild("Torso") ~= nil then
  1368. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil then
  1369. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1370. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.9, 0.2 - (i / 25), 0.2) * CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  1371. wait()
  1372. else return false end
  1373. else return false end
  1374. end
  1375. Player.Character[Name].BoltKnobI.Transparency = 1
  1376. Player.Character[Name].BoltShaftI.Transparency = 1
  1377. Player.Character[Name].BoltShaftO.Transparency = 0
  1378. Player.Character[Name].BoltKnobO.Transparency = 0
  1379. makeShell(Player.Character[Name]:FindFirstChild("ShellOut"))
  1380. for i = 10, 0, -1.5 do
  1381. if Player.Character:FindFirstChild("Torso") ~= nil then
  1382. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil then
  1383. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1384. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.9, 0.2 - (i / 25), 0.2) * CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  1385. wait()
  1386. else return false end
  1387. else return false end
  1388. end
  1389. Player.Character[Name].BoltKnobI.Transparency = 0
  1390. Player.Character[Name].BoltShaftI.Transparency = 0
  1391. Player.Character[Name].BoltShaftO.Transparency = 1
  1392. Player.Character[Name].BoltKnobO.Transparency = 1
  1393. for i = 10, 0, -5 do
  1394. if Player.Character:FindFirstChild("Torso") ~= nil then
  1395. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil then
  1396. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1397. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.5 - (i / 25), 0.2, 0.2) * CFrame.fromEulerAnglesXYZ(math.rad(300 - i), math.rad(10 - i), math.rad(-90))
  1398. wait()
  1399. else return false end
  1400. else return false end
  1401. end
  1402. for i = 10, 0, -5 do
  1403. if Player.Character:FindFirstChild("Torso") ~= nil then
  1404. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1405. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1406. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.5, 1.2, 0.8) * CFrame.fromEulerAnglesXYZ(math.rad(300), math.rad(10 + i), math.rad(-90))
  1407. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  1408. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-0.9, -0.35, 0.51) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - i), math.rad(-5), 0)
  1409. wait()
  1410. else return false end
  1411. else return false end
  1412. end
  1413. end
  1414. return true
  1415. end
  1416.  
  1417. function CamShake(time, freq)
  1418. coroutine.resume(coroutine.create(function()
  1419. local cam = game:GetService("Workspace").CurrentCamera
  1420. local time = 10
  1421. local seed = Vector3.new(math.random(100, 200) / freq, math.random(100, 200) / freq, 0)
  1422. if math.random(1, 2) == 1 then seed = Vector3.new(-seed.x, seed.y, 0) end
  1423. if math.random(1, 2) == 1 then seed = Vector3.new(seed.x, -seed.y, 0) end
  1424. cam.CoordinateFrame = (CFrame.new(cam.Focus.p) * (cam.CoordinateFrame - cam.CoordinateFrame.p) * CFrame.fromEulerAnglesXYZ(seed.x * time, seed.y * time, 0)) * CFrame.new(0, 0, (cam.CoordinateFrame.p - cam.Focus.p).magnitude)
  1425. for i = 1, time do
  1426. cam.CoordinateFrame = (CFrame.new(cam.Focus.p) * (cam.CoordinateFrame - cam.CoordinateFrame.p) * CFrame.fromEulerAnglesXYZ(-seed.x, -seed.y, 0)) * CFrame.new(0, 0, (cam.CoordinateFrame.p - cam.Focus.p).magnitude)
  1427. wait()
  1428. end
  1429. end))
  1430. end
  1431.  
  1432. function makeShell(part)
  1433. if part == nil then return false end
  1434. local casing = Instance.new("Part")
  1435. casing.Name = "Shell"
  1436. casing.formFactor = "Symmetric"
  1437. casing.Size = Vector3.new(1, 1, 1)
  1438. casing.CFrame = CFrame.new(part.Position) * CFrame.fromEulerAnglesXYZ(math.rad(math.random(0, 360)), math.rad(math.random(0, 360)), math.rad(math.random(0, 360)))
  1439. casing.BrickColor = BrickColor.new("New Yeller")
  1440. local mesh = Instance.new("CylinderMesh")
  1441. mesh.Scale = Vector3.new(0.2, 0.6, 0.2)
  1442. mesh.Parent = casing
  1443. casing.Parent = game:GetService("Workspace")
  1444. casing:BreakJoints()
  1445. casing.Velocity = (part.CFrame.lookVector * 65) + Vector3.new(0, 10, 0)
  1446. coroutine.resume(coroutine.create(function() wait(4.5) for i = 0, 1, 0.1 do casing.Transparency = i wait() end casing:Remove() end))
  1447. end
  1448.  
  1449. function Weld(x, y)
  1450. local weld = Instance.new("Weld")
  1451. weld.Part0 = x
  1452. weld.Part1 = y
  1453. CJ = CFrame.new(x.Position)
  1454. C0 = x.CFrame:inverse() * CJ
  1455. C1 = y.CFrame:inverse() * CJ
  1456. weld.C0 = C0
  1457. weld.C1 = C1
  1458. weld.Parent = x
  1459. end
  1460.  
  1461. function tagHumanoid(humanoid)
  1462. local tag = Instance.new("ObjectValue")
  1463. tag.Name = "creator"
  1464. tag.Value = Player
  1465. tag.Parent = humanoid
  1466. local tag = Instance.new("StringValue")
  1467. tag.Name = "creatorType1"
  1468. tag.Value = Name
  1469. tag.Parent = humanoid
  1470. local tag = Instance.new("StringValue")
  1471. tag.Name = "creatorType2"
  1472. tag.Value = "shot"
  1473. tag.Parent = humanoid
  1474. end
  1475.  
  1476. function untagHumanoid(humanoid)
  1477. if humanoid ~= nil then
  1478. local tag = humanoid:FindFirstChild("creator")
  1479. if tag ~= nil then
  1480. tag:Remove()
  1481. end
  1482. local tag = humanoid:FindFirstChild("creatorType1")
  1483. if tag ~= nil then
  1484. tag:Remove()
  1485. end
  1486. local tag = humanoid:FindFirstChild("creatorType2")
  1487. if tag ~= nil then
  1488. tag:Remove()
  1489. end
  1490. end
  1491. end
  1492.  
  1493. function fire(startPoint, endPoint, hit)
  1494. local trail = Instance.new("Part")
  1495. trail.Name = "Bullet Trail"
  1496. trail.BrickColor = BrickColor.new("Bright yellow")
  1497. trail.TopSurface = 0
  1498. trail.BottomSurface = 0
  1499. trail.formFactor = 0
  1500. trail.Size = Vector3.new(1, 1, 1)
  1501. trail.Transparency = 0.6
  1502. trail.Anchored = true
  1503. trail.CanCollide = false
  1504. trail.CFrame = CFrame.new((startPoint + endPoint) / 2, endPoint)
  1505. trail.Parent = game:GetService("Workspace")
  1506. local mesh = Instance.new("SpecialMesh")
  1507. mesh.MeshType = "Brick"
  1508. mesh.Scale = Vector3.new(0.2, 0.2, (startPoint - endPoint).magnitude)
  1509. mesh.Parent = trail
  1510. coroutine.resume(coroutine.create(function(part) for i = 1, 10 do part.Mesh.Scale = Vector3.new(part.Mesh.Scale.x - 0.01, part.Mesh.Scale.y - 0.01, part.Mesh.Scale.z) wait() end part:Remove() end), trail)
  1511. if hit ~= nil then
  1512. if hit.Parent == nil then return end
  1513. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  1514. tagHumanoid(hit.Parent.Humanoid)
  1515. if hit.Name == "Head" then
  1516. hit.Parent.Humanoid:TakeDamage(damage * 10)
  1517. local e = Instance.new("Explosion")
  1518. e.BlastPressure = 10000000
  1519. e.BlastRadius = 1
  1520. e.Position = hit.Position
  1521. e.Parent = game:GetService("Workspace")
  1522. elseif hit.Name == "Torso" then
  1523. hit.Parent.Humanoid:TakeDamage(damage * 2)
  1524. local e = Instance.new("Explosion")
  1525. e.BlastPressure = 10000000
  1526. e.BlastRadius = 0.6
  1527. e.Position = hit.Position
  1528. e.Parent = game:GetService("Workspace")
  1529. else
  1530. hit.Parent.Humanoid:TakeDamage(damage)
  1531. local e = Instance.new("Explosion")
  1532. e.BlastPressure = 10000000
  1533. e.BlastRadius = 0.6
  1534. e.Position = hit.Position
  1535. e.Parent = game:GetService("Workspace")
  1536. end
  1537. if HP == true then
  1538. hit.Parent.Humanoid.Sit = true
  1539. end
  1540. delay(0.1, function() untagHumanoid(hit.Parent.Humanoid) end)
  1541. end
  1542. if hit.Anchored == false then
  1543. hit.Velocity = hit.Velocity + ((endPoint - startPoint).unit * (damage * 2))
  1544. end
  1545. end
  1546. end
  1547.  
  1548. function onButton1Down(mouse)
  1549. if selected == false then return end
  1550. if Player.Character:FindFirstChild(Name) ~= nil and Button1Down == false and canFire == true and (function() if dual == true then if Player.Character:FindFirstChild(Name.. " (Left)") ~= nil then return true else return false end else return true end end)() == true then
  1551. if Player.Character[Name]:FindFirstChild("Handle") == nil then return end
  1552. if Player.Character[Name]:FindFirstChild("Muzzle") == nil then return end
  1553. if dual == true then if Player.Character[Name.. " (Left)"]:FindFirstChild("Handle") == nil then return end end
  1554. if dual == true then if Player.Character[Name.. " (Left)"]:FindFirstChild("Muzzle") == nil then return end end
  1555. mouse.Icon = "http://www.roblox.com/asset/?id=49912389"
  1556. Button1Down = true
  1557. canFire = false
  1558. canFire2 = true
  1559. while canFire2 == true do
  1560. local humanoid = Player.Character:FindFirstChild("Humanoid")
  1561. if humanoid == nil then
  1562. canFire2 = false
  1563. break
  1564. end
  1565. if humanoid.Health <= 0 then
  1566. canFire2 = false
  1567. break
  1568. end
  1569. local fireLeft = false
  1570. if automatic == false and burst == false then
  1571. canFire2 = false
  1572. elseif automatic == false and burst == true then
  1573. if burstCount >= burstCountMax then
  1574. canFire2 = false
  1575. burstCount = 0
  1576. break
  1577. end
  1578. burstCount = burstCount + 1
  1579. elseif automatic == true and burst == false then
  1580. fireLeft = true
  1581. end
  1582. if magazine.Value > 0 then
  1583. magazine.Value = magazine.Value - 1
  1584. updateGui()
  1585. fire(Player.Character[Name].Muzzle.Position, mouse.Hit.p, mouse.Target)
  1586. coroutine.resume(coroutine.create(function()
  1587. if dual == true then
  1588. playAnimation("rightFire")
  1589. elseif dual == false then
  1590. playAnimation("fire")
  1591. end
  1592. end))
  1593. else
  1594. Player.Character[Name].Handle.Empty:Play()
  1595. end
  1596. if fireLeft == true and dual == true and automatic == true then
  1597. if magazine.Value > 0 then
  1598. coroutine.resume(coroutine.create(function()
  1599. wait(readyTime / 2)
  1600. magazine.Value = magazine.Value - 1
  1601. updateGui()
  1602. fire(Player.Character[Name.. " (Left)"].Muzzle.Position, mouse.Hit.p, mouse.Target)
  1603. playAnimation("leftFire")
  1604. end))
  1605. else
  1606. coroutine.resume(coroutine.create(function()
  1607. wait(readyTime / 2)
  1608. Player.Character[Name].Handle.Empty:Play()
  1609. end))
  1610. end
  1611. end
  1612. wait(readyTime)
  1613. end
  1614. mouse.Icon = "http://www.roblox.com/asset/?id=49912389"
  1615. canFire = true
  1616. end
  1617. end
  1618.  
  1619. function onButton1Up(mouse)
  1620. if selected == false then return end
  1621. Button1Down = false
  1622. canFire2 = false
  1623. burstCount = 0
  1624. while canFire == false do wait() end
  1625. if dual == true and automatic == false then
  1626. if Player.Character[Name.. " (Left)"]:FindFirstChild("Handle") == nil then return end
  1627. if Player.Character[Name.. " (Left)"]:FindFirstChild("Muzzle") == nil then return end
  1628. mouse.Icon = "http://www.roblox.com/asset/?id=49912389"
  1629. canFire = false
  1630. canFire2 = true
  1631. while canFire2 == true do
  1632. local humanoid = Player.Character:FindFirstChild("Humanoid")
  1633. if humanoid == nil then
  1634. canFire2 = false
  1635. break
  1636. end
  1637. if humanoid.Health <= 0 then
  1638. canFire2 = false
  1639. break
  1640. end
  1641. if burst == false then
  1642. canFire2 = false
  1643. elseif burst == true then
  1644. if burstCount >= burstCountMax then
  1645. canFire2 = false
  1646. burstCount = 0
  1647. break
  1648. end
  1649. burstCount = burstCount + 1
  1650. end
  1651. if magazine.Value <= 0 then
  1652. Player.Character[Name].Handle.Empty:Play()
  1653. else
  1654. coroutine.resume(coroutine.create(function()
  1655. playAnimation("leftFire")
  1656. end))
  1657. magazine.Value = magazine.Value - 1
  1658. updateGui()
  1659. fire(Player.Character[Name.. " (Left)"].Muzzle.Position, mouse.Hit.p, mouse.Target)
  1660. end
  1661. wait(readyTime)
  1662. end
  1663. mouse.Icon = "http://www.roblox.com/asset/?id=49912389"
  1664. canFire = true
  1665. end
  1666. end
  1667.  
  1668. function onKeyDown(key, mouse)
  1669. if selected == false then return end
  1670. key = key:lower()
  1671. if key == "q" and Button1Down == false and canFire == true then
  1672. if mouse.Target == nil then return end
  1673. if game:GetService("Players"):GetPlayerFromCharacter(mouse.Target.Parent) ~= nil then
  1674. if dual == true then onKeyDown("t", mouse) end
  1675. onDeselected(mouse)
  1676. removeParts("RightHolster")
  1677. script.Parent.Parent = game:GetService("Players"):GetPlayerFromCharacter(mouse.Target.Parent).Backpack
  1678. end
  1679. end
  1680. if key == "e" and Button1Down == false and canFire == true and canSilence == true then
  1681. if silenced then
  1682. silenced = false
  1683. if Player.Character:FindFirstChild(Name) == nil then return end
  1684. if Player.Character[Name]:FindFirstChild("Muzzle") == nil then return end
  1685. if Player.Character[Name]:FindFirstChild("Muzzle 2") == nil then return end
  1686. Player.Character[Name].Muzzle.Transparency = 1
  1687. Player.Character[Name].Muzzle.Name = "Silencer"
  1688. Player.Character[Name]["Muzzle 2"].Name = "Muzzle"
  1689. if dual == true then
  1690. if Player.Character[Name.. " (Left)"]:FindFirstChild("Muzzle") == nil then return end
  1691. if Player.Character[Name.. " (Left)"]:FindFirstChild("Muzzle 2") == nil then return end
  1692. Player.Character[Name.. " (Left)"].Muzzle.Transparency = 1
  1693. Player.Character[Name.. " (Left)"].Muzzle.Name = "Silencer"
  1694. Player.Character[Name.. " (Left)"]["Muzzle 2"].Name = "Muzzle"
  1695. end
  1696. else
  1697. silenced = true
  1698. if Player.Character:FindFirstChild(Name) == nil then return end
  1699. if Player.Character[Name]:FindFirstChild("Silencer") == nil then return end
  1700. if Player.Character[Name]:FindFirstChild("Muzzle") == nil then return end
  1701. Player.Character[Name].Silencer.Transparency = 0
  1702. Player.Character[Name].Muzzle.Name = "Muzzle 2"
  1703. Player.Character[Name].Silencer.Name = "Muzzle"
  1704. if dual == true then
  1705. if Player.Character[Name.. " (Left)"]:FindFirstChild("Silencer") == nil then return end
  1706. if Player.Character[Name.. " (Left)"]:FindFirstChild("Muzzle") == nil then return end
  1707. Player.Character[Name.. " (Left)"].Silencer.Transparency = 0
  1708. Player.Character[Name.. " (Left)"].Muzzle.Name = "Muzzle 2"
  1709. Player.Character[Name.. " (Left)"].Silencer.Name = "Muzzle"
  1710. end
  1711. end
  1712. end
  1713. if key == "r" and Button1Down == false and canFire == true then
  1714. if ammo.Value > 0 and magazine.Value ~= magazineMax.Value then
  1715. canFire = false
  1716. burstCount = 0
  1717. mouse.Icon = "http://www.roblox.com/asset/?id=49912389"
  1718. if magazine.Value > 0 then ammo.Value = ammo.Value + magazine.Value magazine.Value = 0 end
  1719. updateGui()
  1720. if dual == true then
  1721. playAnimation("reloadDual")
  1722. elseif dual == false then
  1723. playAnimation("reload")
  1724. end
  1725. if ammo.Value - magazineMax.Value < 0 then
  1726. magazine.Value = ammo.Value
  1727. ammo.Value = 0
  1728. elseif ammo.Value - magazineMax.Value >= 0 then
  1729. ammo.Value = ammo.Value - magazineMax.Value
  1730. magazine.Value = magazineMax.Value
  1731. end
  1732. updateGui()
  1733. mouse.Icon = "http://www.roblox.com/asset/?id=49912389"
  1734. canFire = true
  1735. end
  1736. end
  1737. if key == "t" and Button1Down == false and canFire == true and canDual == true then
  1738. canFire = false
  1739. if dual == false then
  1740. local weapon = nil
  1741. for _, p in pairs(Player.Backpack:GetChildren()) do
  1742. if p.Name == Name and p ~= script.Parent then weapon = p break end
  1743. end
  1744. if weapon ~= nil then
  1745. dual = true
  1746. weapon.Name = "Dual"
  1747. weapon.Parent = script
  1748. silenced = false
  1749. removeParts("RightHand")
  1750. makeParts("RightHand")
  1751. removeParts("RightHolster")
  1752. makeParts("LeftHolster")
  1753. playAnimation("leftEquip")
  1754. removeParts("LeftHolster")
  1755. makeParts("LeftHand")
  1756. magazineMax.Value = math.ceil(magazineMax.Value * 2)
  1757. ammoMax.Value = math.ceil(ammoMax.Value * 2)
  1758. magazine.Value = magazine.Value + weapon.Magazine.Value
  1759. ammo.Value = ammo.Value + weapon.Ammo.Value
  1760. updateGui()
  1761. end
  1762. elseif dual == true then
  1763. local weapon = script:FindFirstChild("Dual")
  1764. if weapon ~= nil then
  1765. dual = false
  1766. weapon.Name = Name
  1767. weapon.Parent = Player.Backpack
  1768. silenced = false
  1769. removeParts("RightHand")
  1770. makeParts("RightHand")
  1771. playAnimation("leftUnequip")
  1772. removeParts("LeftHand")
  1773. makeParts("RightHolster")
  1774. playAnimation("hold")
  1775. weapon.Magazine.Value = math.floor(magazine.Value / 2)
  1776. weapon.Ammo.Value = math.floor(ammo.Value / 2)
  1777. magazineMax.Value = math.ceil(magazineMax.Value / 2)
  1778. ammoMax.Value = math.ceil(ammoMax.Value / 2)
  1779. magazine.Value = math.ceil(magazine.Value / 2)
  1780. ammo.Value = math.ceil(ammo.Value / 2)
  1781. updateGui()
  1782. end
  1783. end
  1784. canFire = true
  1785. end
  1786. if key == "y" and canZoom == true then
  1787. if zoom == false then
  1788. zoom = true
  1789. local pos = mouse.Hit.p
  1790. local target = mouse.Target
  1791. local cam = game:GetService("Workspace").CurrentCamera
  1792. focus = Instance.new("Part", workspace)
  1793. focus.Anchored = true
  1794. focus.CanCollide = false
  1795. focus.Transparency = 1
  1796. focus.TopSurface = 0
  1797. focus.BottomSurface = 0
  1798. focus.formFactor = "Plate"
  1799. focus.Size = Vector3.new(0, 0, 0)
  1800. focus.CFrame = CFrame.new(pos) * (CFrame.new(Player.Character.Torso.CFrame.p, pos) - CFrame.new(Player.Character.Torso.CFrame.p, pos).p)
  1801. cam.CameraSubject = focus
  1802. cam.CameraType = "Attach"
  1803. while zoom == true and selected == true do
  1804. local set = false
  1805. if target ~= nil then
  1806. if target.Parent ~= nil then
  1807. if target.Anchored == false then
  1808. focus.CFrame = CFrame.new(target.CFrame.p) * (CFrame.new(Player.Character.Torso.CFrame.p, target.CFrame.p) - CFrame.new(Player.Character.Torso.CFrame.p, target.CFrame.p).p)
  1809. set = true
  1810. end
  1811. end
  1812. end
  1813. if set == false then
  1814. focus.CFrame = CFrame.new(pos) * (CFrame.new(Player.Character.Torso.CFrame.p, pos) - CFrame.new(Player.Character.Torso.CFrame.p, pos).p)
  1815. end
  1816. wait()
  1817. end
  1818. if focus ~= nil then focus:Remove() focus = nil end
  1819. local cam = game:GetService("Workspace").CurrentCamera
  1820. cam.CameraSubject = Player.Character:FindFirstChild("Humanoid")
  1821. cam.CameraType = "Custom"
  1822. else
  1823. zoom = false
  1824. end
  1825. end
  1826. if key == "u" and Button1Down == false and canFire == true then
  1827. if automatic == false and burst == false then
  1828. if switchToBurst == true then
  1829. burst = true
  1830. local m = Instance.new("Message", Player)
  1831. m.Text = "Burst"
  1832. pcall(function() Player.Character[Name].Handle.Switch:Play() end)
  1833. delay(2.5, function() m:Remove() end)
  1834. elseif switchToAutomatic == true then
  1835. automatic = true
  1836. local m = Instance.new("Message", Player)
  1837. m.Text = "Automatic"
  1838. pcall(function() Player.Character[Name].Handle.Switch:Play() end)
  1839. delay(2.5, function() m:Remove() end)
  1840. end
  1841. elseif automatic == false and burst == true then
  1842. if switchToAutomatic == true then
  1843. automatic = true
  1844. burst = false
  1845. local m = Instance.new("Message", Player)
  1846. m.Text = "Automatic"
  1847. pcall(function() Player.Character[Name].Handle.Switch:Play() end)
  1848. delay(2.5, function() m:Remove() end)
  1849. elseif switchToSingle == true then
  1850. burst = false
  1851. local m = Instance.new("Message", Player)
  1852. m.Text = "Single"
  1853. pcall(function() Player.Character[Name].Handle.Switch:Play() end)
  1854. delay(2.5, function() m:Remove() end)
  1855. end
  1856. elseif automatic == true and burst == false then
  1857. if switchToSingle == true then
  1858. automatic = false
  1859. local m = Instance.new("Message", Player)
  1860. m.Text = "Single"
  1861. pcall(function() Player.Character[Name].Handle.Switch:Play() end)
  1862. delay(2.5, function() m:Remove() end)
  1863. elseif switchToBurst == true then
  1864. automatic = false
  1865. burst = true
  1866. local m = Instance.new("Message", Player)
  1867. m.Text = "Burst"
  1868. pcall(function() Player.Character[Name].Handle.Switch:Play() end)
  1869. delay(2.5, function() m:Remove() end)
  1870. end
  1871. end
  1872. end
  1873. end
  1874.  
  1875. function onSelected(mouse)
  1876. if selected == true then return end
  1877. selected = true
  1878. canFire = false
  1879. mouse.Icon = "http://www.roblox.com/asset/?id=49912389"
  1880. while Player.Character:FindFirstChild("WeaponActivated") ~= nil do
  1881. if Player.Character.WeaponActivated.Value == nil then break end
  1882. if Player.Character.WeaponActivated.Value.Parent == nil then break end
  1883. wait()
  1884. end
  1885. updateGui()
  1886. local weapon = Instance.new("ObjectValue")
  1887. weapon.Name = "WeaponActivated"
  1888. weapon.Value = script.Parent
  1889. weapon.Parent = Player.Character
  1890. DisableLimb(1, Player.Character)
  1891. DisableLimb(2, Player.Character)
  1892. ForceAngle(1, 0, Player.Character)
  1893. ForceAngle(2, 0, Player.Character)
  1894. if dual == true then
  1895. coroutine.resume(coroutine.create(function() playAnimation("leftEquip") end))
  1896. playAnimation("rightEquip")
  1897. removeParts("LeftHolster")
  1898. makeParts("LeftHand")
  1899. else
  1900. playAnimation("equip")
  1901. end
  1902. removeParts("RightHolster")
  1903. makeParts("RightHand")
  1904. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  1905. mouse.Button1Up:connect(function() onButton1Up(mouse) end)
  1906. mouse.KeyDown:connect(function(key) onKeyDown(key, mouse) end)
  1907. mouse.Icon = "http://www.roblox.com/asset/?id=49912389"
  1908. canFire = true
  1909. end
  1910.  
  1911. function onDeselected(mouse)
  1912. if selected == false then return end
  1913. Button1Down = false
  1914. while canFire == false do
  1915. wait()
  1916. end
  1917. selected = false
  1918. if dual == true then
  1919. if math.random(1, 2) == 1 then
  1920. coroutine.resume(coroutine.create(function() playAnimation("leftUnequip") end))
  1921. wait(math.random(1, 10) / 10)
  1922. playAnimation("rightUnequip")
  1923. else
  1924. coroutine.resume(coroutine.create(function() playAnimation("rightUnequip") end))
  1925. wait(math.random(1, 10) / 10)
  1926. playAnimation("leftUnequip")
  1927. end
  1928. removeParts("LeftHand")
  1929. makeParts("LeftHolster")
  1930. else
  1931. playAnimation("unequip")
  1932. end
  1933. removeParts("RightHand")
  1934. makeParts("RightHolster")
  1935. ForceAngle(1, 0, Player.Character)
  1936. ForceAngle(2, 0, Player.Character)
  1937. ResetLimbCFrame(1, Player.Character)
  1938. ResetLimbCFrame(2, Player.Character)
  1939. EnableLimb(1, Player.Character)
  1940. EnableLimb(2, Player.Character)
  1941. silenced = false
  1942. if Player.PlayerGui:FindFirstChild(Name) ~= nil then Player.PlayerGui[Name]:Remove() end
  1943. if Player.Character:FindFirstChild("WeaponActivated") ~= nil then
  1944. if Player.Character.WeaponActivated.Value == script.Parent then
  1945. Player.Character.WeaponActivated:Remove()
  1946. end
  1947. end
  1948. while Player.Character:FindFirstChild("WeaponActivated") ~= nil do
  1949. if Player.Character.WeaponActivated.Value == nil then break end
  1950. if Player.Character.WeaponActivated.Value.Parent == nil then break end
  1951. wait()
  1952. end
  1953. end
  1954.  
  1955. if script.Parent.className ~= "HopperBin" then
  1956. if Player == nil then print("Error: Player not found!") return end
  1957. Tool = Instance.new("HopperBin")
  1958. Tool.Name = Name
  1959. Tool.Parent = Player.Backpack
  1960. script.Name = "Main"
  1961. script.Parent = Tool
  1962. elseif script.Parent.className == "HopperBin" then
  1963. while script.Parent.Parent.className ~= "Backpack" do
  1964. wait()
  1965. end
  1966. if script.Parent:FindFirstChild("MagazineMax") == nil then
  1967. magazineMax = Instance.new("NumberValue")
  1968. magazineMax.Name = "MagazineMax"
  1969. magazineMax.Value = 5
  1970. magazineMax.Parent = script.Parent
  1971. else
  1972. magazineMax = script.Parent.MagazineMax
  1973. end
  1974. if script.Parent:FindFirstChild("Magazine") == nil then
  1975. magazine = Instance.new("NumberValue")
  1976. magazine.Name = "Magazine"
  1977. magazine.Value = 0
  1978. magazine.Parent = script.Parent
  1979. else
  1980. magazine = script.Parent.Magazine
  1981. end
  1982. if script.Parent:FindFirstChild("AmmoMax") == nil then
  1983. ammoMax = Instance.new("NumberValue")
  1984. ammoMax.Name = "AmmoMax"
  1985. ammoMax.Value = 205
  1986. ammoMax.Parent = script.Parent
  1987. else
  1988. ammoMax = script.Parent.AmmoMax
  1989. end
  1990. if script.Parent:FindFirstChild("Ammo") == nil then
  1991. ammo = Instance.new("NumberValue")
  1992. ammo.Name = "Ammo"
  1993. ammo.Value = script.Parent.AmmoMax.Value
  1994. ammo.Parent = script.Parent
  1995. else
  1996. ammo = script.Parent.Ammo
  1997. end
  1998. Player = script.Parent.Parent.Parent
  1999. makeParts("RightHolster")
  2000. script.Parent.Selected:connect(onSelected)
  2001. script.Parent.Deselected:connect(onDeselected)
  2002. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement