TacoLuver123

Roblox Sniper Script

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