Advertisement
SOCHILDISHHH

M1

Feb 8th, 2016
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 82.05 KB | None | 0 0
  1.  
  2.  
  3. --[[
  4. Script shared by eletronix ]]
  5.  
  6. if script == nil then return end
  7.  
  8.  
  9. Player = script:FindFirstChild("Player") ~= nil and script.Player.Value or game.Players.LocalPlayer
  10. Name = "M110 SASS"
  11. MC = BrickColor.new("Brick yellow")
  12. DC = BrickColor.new("Black")
  13. GC = BrickColor.new("Brick yellow")
  14. MR = 0
  15. GR = 0
  16. MagSize = 10
  17. Sight = 1
  18. Grip = 2
  19. Reliability = 75
  20. AimSpeed = 8
  21. Ready = true
  22. Jammed = false
  23. Attachment = false
  24. Mode = 0
  25. WSPenalty = 12
  26. Spread = 1000000
  27. selected = false
  28. canDual = false
  29. dual = false
  30. Button1Down = false
  31. damage = 32
  32. canFire = true
  33. canFire2 = false
  34. readyTime = 0.4
  35. automatic = false
  36. burst = false
  37. burstCount = 0
  38. burstCountMax = 3
  39. canSilence = false
  40. silenced = false
  41. canZoom = false
  42. zoom = false
  43. switchToSingle = false
  44. switchToBurst = false
  45. switchToAutomatic = false
  46.  
  47.  
  48. ammoGui = Instance.new("ScreenGui")
  49. ammoGui.Name = Name
  50. local frame = Instance.new("Frame")
  51. frame.Name = "Frame"
  52. frame.Size = UDim2.new(0, 165, 0, 60)
  53. frame.Position = UDim2.new(0, 0, 1, -400)
  54. frame.BackgroundColor3 = Color3.new(1, 1, 1)
  55. frame.BorderColor3 = Color3.new(0, 0, 0)
  56. frame.Parent = ammoGui
  57. local label = Instance.new("TextLabel")
  58. label.Name = "Weapon"
  59. label.Text = "Weapon: " ..Name
  60. label.Size = UDim2.new(1, 0, 0, 20)
  61. label.Position = UDim2.new(0, 0, 0, 0)
  62. label.BackgroundColor3 = Color3.new(1, 0, 0)
  63. label.BorderColor3 = Color3.new(0, 0, 0)
  64. label.Parent = frame
  65. local label = Instance.new("TextLabel")
  66. label.Name = "MagazinePrefix"
  67. label.Text = " Magazine:"
  68. label.TextXAlignment = "Left"
  69. label.Size = UDim2.new(1, 0, 0, 20)
  70. label.Position = UDim2.new(0, 0, 0, 20)
  71. label.BackgroundColor3 = Color3.new(1, 1, 1)
  72. label.BorderColor3 = Color3.new(0, 0, 0)
  73. label.Parent = frame
  74. local label = Instance.new("TextLabel")
  75. label.Name = "Magazine"
  76. label.Text = "0/0"
  77. label.TextXAlignment = "Right"
  78. label.Size = UDim2.new(1, 0, 0, 20)
  79. label.Position = UDim2.new(0, -10, 0, 20)
  80. label.BackgroundTransparency = 1
  81. label.BorderSizePixel = 0
  82. label.Parent = frame
  83. local label = Instance.new("TextLabel")
  84. label.Name = "AmmoPrefix"
  85. label.Text = " 7.62x51mm:"
  86. label.TextXAlignment = "Left"
  87. label.Size = UDim2.new(1, 0, 0, 20)
  88. label.Position = UDim2.new(0, 0, 0, 40)
  89. label.BackgroundColor3 = Color3.new(1, 1, 1)
  90. label.BorderColor3 = Color3.new(0, 0, 0)
  91. label.Parent = frame
  92. local label = Instance.new("TextLabel")
  93. label.Name = "Ammo"
  94. label.Text = "0/0"
  95. label.TextXAlignment = "Right"
  96. label.Size = UDim2.new(1, 0, 0, 20)
  97. label.Position = UDim2.new(0, -10, 0, 40)
  98. label.BackgroundTransparency = 1
  99. label.BorderSizePixel = 0
  100. label.Parent = frame
  101.  
  102.  
  103. function updateGui()
  104. if selected == false then return end
  105. if Player:FindFirstChild("PlayerGui") == nil then Instance.new("PlayerGui").Parent = Player end
  106. if Player.PlayerGui:FindFirstChild(Name) == nil then
  107. ammoGui:Clone().Parent = Player.PlayerGui
  108. end
  109. Player.PlayerGui[Name].Frame.Magazine.Text = tostring(magazine.Value).. "/" ..tostring(magazineMax.Value)
  110. Player.PlayerGui[Name].Frame.Ammo.Text = tostring(ammo.Value).. "/" ..tostring(ammoMax.Value)
  111. end
  112.  
  113.  
  114. function makeParts(format)
  115. local model = Instance.new("Model")
  116. model.Name = Name
  117. local pm = Instance.new("Part")
  118. pm.Name = "Handle"
  119. pm.formFactor = "Symmetric"
  120. pm.Size = Vector3.new(1, 1, 1)
  121. pm.BrickColor = MC
  122. pm.Reflectance = MR
  123. pm.CanCollide = false
  124. pm.Locked = true
  125. pm.TopSurface = 0
  126. pm.BottomSurface = 0
  127. pm.Parent = model
  128. local m = Instance.new("BlockMesh")
  129. m.Scale = Vector3.new(0.3, 1.1, 0.41)
  130. m.Offset = Vector3.new(0, -0.14, 0.07)
  131. m.Parent = pm
  132. if format ~= nil then
  133. local w = Instance.new("Weld")
  134. w.Part0 = pm
  135. if format == "RightHand" then
  136. w.Part1 = Player.Character:FindFirstChild("Right Arm")
  137. w.C0 = CFrame.new(0, 1.15, 0.7)
  138. w.C1 = CFrame.new()
  139. elseif format == "RightHolster" then
  140. w.Part1 = Player.Character:FindFirstChild("Torso")
  141. w.C0 = CFrame.new(0.65, -0.85, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(32), math.rad(-90), 0)
  142. w.C1 = CFrame.new()
  143. model.Name = Name.. " (Holstered)"
  144. end
  145. w.Parent = pm
  146. model.Parent = Player.Character
  147. end
  148. --[[
  149. sniper1 http://www.roblox.com/asset/?id=1868836
  150. equip http://www.roblox.com/asset/?id=13510737
  151. fire1 http://www.roblox.com/asset/?id=2760979
  152. fire2 http://www.roblox.com/asset/?id=13510352
  153. fire3 http://www.roblox.com/asset/?id=2692806
  154. fire4 http://www.roblox.com/asset/?id=2691586
  155. fire5 http://www.roblox.com/asset/?id=2920959
  156. fire6 http://www.roblox.com/asset/?id=2697431
  157. fire7 http://www.roblox.com/asset/?id=2920959
  158. reload1 http://www.roblox.com/asset/?id=2691591
  159. reload2 http://www.roblox.com/asset/?id=2697432
  160. reload3 http://www.roblox.com/asset/?id=2920960
  161. reload4 http://www.roblox.com/asset/?id=2761842
  162. shotgun1 http://www.roblox.com/asset/?id=2697294
  163. --]]
  164. local s = Instance.new("Sound")
  165. s.Name = "Fire"
  166. s.SoundId = "http://www.roblox.com/Asset/?id=10209875"
  167. s.Volume = 1
  168. s.Pitch = 1.4
  169. s.Looped = false
  170. s.Parent = pm
  171. local s = Instance.new("Sound")
  172. s.Name = "Fire2"
  173. s.SoundId = "http://roblox.com/asset/?id=2691586"
  174. s.Volume = 1
  175. s.Pitch = 3
  176. s.Looped = false
  177. s.Parent = pm
  178. local s = Instance.new("Sound")
  179. s.Name = "Lock"
  180. s.SoundId = "http://www.roblox.com/Asset/?id=10209845"
  181. s.Volume = 1
  182. s.Pitch = 3
  183. s.Looped = false
  184. s.Parent = pm
  185. local s = Instance.new("Sound")
  186. s.Name = "Jam"
  187. s.SoundId = "http://www.roblox.com/Asset/?id=10209636"
  188. s.Volume = 1
  189. s.Pitch = 2
  190. s.Looped = false
  191. s.Parent = pm
  192. local s = Instance.new("Sound")
  193. s.Name = "Release"
  194. s.SoundId = "http://www.roblox.com/Asset/?id=10209813"
  195. s.Volume = 1
  196. s.Pitch = 4
  197. s.Looped = false
  198. s.Parent = pm
  199. local s = Instance.new("Sound")
  200. s.Name = "Reload"
  201. s.SoundId = "http://www.roblox.com/asset/?id=2697295"
  202. s.Volume = 1
  203. s.Pitch = 7.5
  204. s.Looped = false
  205. s.Parent = pm
  206. local s = Instance.new("Sound")
  207. s.Name = "Empty"
  208. s.SoundId = "http://www.roblox.com/asset/?id=2697295"
  209. s.Volume = 1
  210. s.Pitch = 5
  211. s.Looped = false
  212. s.Parent = pm
  213. local s = Instance.new("Sound")
  214. s.Name = "Switch"
  215. s.SoundId = "http://www.roblox.com/asset/?id=2697295"
  216. s.Volume = 1
  217. s.Pitch = 10
  218. s.Looped = false
  219. s.Parent = pm
  220. local s = Instance.new("Sound")
  221. s.Name = "Equip"
  222. s.SoundId = "http://www.roblox.com/Asset/?id=10209845"
  223. s.Volume = 1
  224. s.Pitch = 1
  225. s.Looped = false
  226. s.Parent = pm
  227. local s = Instance.new("Sound")
  228. s.Name = "Bullet"
  229. s.SoundId = "http://www.roblox.com/Asset/?id=18426149"
  230. s.Volume = 1
  231. s.Pitch = 1
  232. s.Looped = false
  233. s.Parent = pm
  234. local p = Instance.new("Part")
  235. p.Name = "ShellOut"
  236. p.formFactor = "Symmetric"
  237. p.Size = Vector3.new(1, 1, 1)
  238. p.Transparency = 1
  239. p.Locked = true
  240. p.CanCollide = false
  241. p.TopSurface = 0
  242. p.BottomSurface = 0
  243. p.Parent = model
  244. local w = Instance.new("Weld")
  245. w.Part0 = p
  246. w.Part1 = pm
  247. w.C0 = CFrame.new(0, 0, 1) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  248. w.C1 = CFrame.new()
  249. w.Parent = p
  250. local p = Instance.new("Part")
  251. p.Name = "Grip"
  252. p.formFactor = "Symmetric"
  253. p.Size = Vector3.new(1, 1, 1)
  254. p.BrickColor = GC
  255. p.Reflectance = GR
  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.29, 0.38, 0.7)
  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.15, -0.5) * CFrame.fromEulerAnglesXYZ(math.rad(15), 0, 0)
  268. w.C1 = CFrame.new()
  269. w.Parent = p
  270. local p = Instance.new("Part")
  271. p.Name = "Magazine 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.3, 0.46, 0.4)
  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.46, -0.21)
  288. w.C1 = CFrame.new()
  289. w.Parent = p
  290. local p = Instance.new("Part")
  291. p.Name = "MagazineHole"
  292. p.formFactor = "Symmetric"
  293. p.Size = Vector3.new(1, 1, 1)
  294. p.BrickColor = BrickColor.new("Really black")
  295. p.CanCollide = false
  296. p.Locked = true
  297. p.TopSurface = 0
  298. p.BottomSurface = 0
  299. p.Parent = model
  300. local m = Instance.new("BlockMesh")
  301. m.Scale = Vector3.new(0.28, 0.44, 0.405)
  302. m.Parent = p
  303. local w = Instance.new("Weld")
  304. w.Part0 = p
  305. w.Part1 = pm
  306. w.C0 = CFrame.new(0, 0.46, -0.21)
  307. w.C1 = CFrame.new()
  308. w.Parent = p
  309. local pm2 = Instance.new("Part")
  310. pm2.Name = "Magazine"
  311. pm2.formFactor = "Symmetric"
  312. pm2.Size = Vector3.new(1, 1, 1)
  313. pm2.BrickColor = BrickColor.new("Dark stone grey")
  314. pm2.Locked = true
  315. pm2.CanCollide = false
  316. pm2.TopSurface = 0
  317. pm2.BottomSurface = 0
  318. pm2.Parent = model
  319. local m = Instance.new("BlockMesh")
  320. m.Scale = Vector3.new(0.25, 0.43, 0.6)
  321. m.Parent = pm2
  322. local w = Instance.new("Weld")
  323. w.Part0 = pm2
  324. w.Part1 = pm
  325. w.C0 = CFrame.new(0, 0.46, -0.45)
  326. w.C1 = CFrame.new()
  327. w.Parent = pm2
  328. local p = Instance.new("Part")
  329. p.Name = "MagPull"
  330. p.formFactor = "Symmetric"
  331. p.Size = Vector3.new(1, 1, 1)
  332. p.BrickColor = BrickColor.new("Black")
  333. p.Locked = true
  334. p.CanCollide = false
  335. p.TopSurface = 0
  336. p.BottomSurface = 0
  337. p.Parent = model
  338. local m = Instance.new("BlockMesh")
  339. m.Scale = Vector3.new(0.26, 0.44, 0.2)
  340. m.Parent = p
  341. local w = Instance.new("Weld")
  342. w.Part0 = p
  343. w.Part1 = pm2
  344. w.C0 = CFrame.new(0, 0, -0.1)
  345. w.C1 = CFrame.new()
  346. w.Parent = p
  347. local p = Instance.new("Part")
  348. p.Name = "Trigger Housing"
  349. p.formFactor = "Symmetric"
  350. p.Size = Vector3.new(1, 1, 1)
  351. p.BrickColor = MC
  352. p.Reflectance = MR
  353. p.CanCollide = false
  354. p.Locked = true
  355. p.TopSurface = 0
  356. p.BottomSurface = 0
  357. p.Parent = model
  358. local m = Instance.new("BlockMesh")
  359. m.Scale = Vector3.new(0.1, 0.4, 0.025)
  360. m.Parent = p
  361. local w = Instance.new("Weld")
  362. w.Part0 = p
  363. w.Part1 = pm
  364. w.C0 = CFrame.new(0, 0.1, -0.37)
  365. w.C1 = CFrame.new()
  366. w.Parent = p
  367. local p = Instance.new("Part")
  368. p.Name = "Trigger"
  369. p.formFactor = "Symmetric"
  370. p.Size = Vector3.new(1, 1, 1)
  371. p.BrickColor = MC
  372. p.Reflectance = MR
  373. p.CanCollide = false
  374. p.Locked = true
  375. p.TopSurface = 0
  376. p.BottomSurface = 0
  377. p.Parent = model
  378. local m = Instance.new("BlockMesh")
  379. m.Scale = Vector3.new(0.1, 0.05, 0.15)
  380. m.Parent = p
  381. local w = Instance.new("Weld")
  382. w.Part0 = p
  383. w.Part1 = pm
  384. w.C0 = CFrame.new(0, 0.03, -0.275)
  385. w.C1 = CFrame.new()
  386. w.Parent = p
  387. local p = Instance.new("Part")
  388. p.Name = "ForeBarrel"
  389. p.CanCollide = false
  390. p.formFactor = "Symmetric"
  391. p.Size = Vector3.new(1, 1, 1)
  392. p.BrickColor = GC
  393. p.Reflectance = GR
  394. p.Locked = true
  395. p.TopSurface = 0
  396. p.BottomSurface = 0
  397. p.Parent = model
  398. local m = Instance.new("CylinderMesh")
  399. m.Scale = Vector3.new(0.36, 1.2, 0.36)
  400. m.Parent = p
  401. local w = Instance.new("Weld")
  402. w.Part0 = p
  403. w.Part1 = pm
  404. w.C0 = CFrame.new(0, 1.285, -0.04)
  405. w.C1 = CFrame.new()
  406. w.Parent = p
  407. local p = Instance.new("Part")
  408. p.Name = "Rail"
  409. p.CanCollide = false
  410. p.formFactor = "Symmetric"
  411. p.Size = Vector3.new(1, 1, 1)
  412. p.BrickColor = DC
  413. p.Locked = true
  414. p.TopSurface = 0
  415. p.BottomSurface = 0
  416. p.Parent = model
  417. local m = Instance.new("BlockMesh")
  418. m.Scale = Vector3.new(0.36, 1, 0.16)
  419. m.Parent = p
  420. local w = Instance.new("Weld")
  421. w.Part0 = p
  422. w.Part1 = pm
  423. w.C0 = CFrame.new(0, 1.19, -0.04)
  424. w.C1 = CFrame.new()
  425. w.Parent = p
  426. local p = Instance.new("Part")
  427. p.Name = "Rail"
  428. p.CanCollide = false
  429. p.formFactor = "Symmetric"
  430. p.Size = Vector3.new(1, 1, 1)
  431. p.BrickColor = GC
  432. p.Reflectance = MR
  433. p.Locked = true
  434. p.TopSurface = 0
  435. p.BottomSurface = 0
  436. p.Parent = model
  437. local m = Instance.new("BlockMesh")
  438. m.Scale = Vector3.new(0.38, 0.5, 0.18)
  439. m.Parent = p
  440. local w = Instance.new("Weld")
  441. w.Part0 = p
  442. w.Part1 = pm
  443. w.C0 = CFrame.new(0, 0.938, -0.04)
  444. w.C1 = CFrame.new()
  445. w.Parent = p
  446. local p = Instance.new("Part")
  447. p.Name = "Rail"
  448. p.CanCollide = false
  449. p.formFactor = "Symmetric"
  450. p.Size = Vector3.new(1, 1, 1)
  451. p.BrickColor = GC
  452. p.Reflectance = MR
  453. p.Locked = true
  454. p.TopSurface = 0
  455. p.BottomSurface = 0
  456. p.Parent = model
  457. local m = Instance.new("BlockMesh")
  458. m.Scale = Vector3.new(0.18, 2.08, 0.38)
  459. m.Parent = p
  460. local w = Instance.new("Weld")
  461. w.Part0 = p
  462. w.Part1 = pm
  463. w.C0 = CFrame.new(0, 0.65, -0.04)
  464. w.C1 = CFrame.new()
  465. w.Parent = p
  466. local p = Instance.new("Part")
  467. p.Name = "Center" --------------
  468. p.CanCollide = false
  469. p.formFactor = "Symmetric"
  470. p.Size = Vector3.new(1, 1, 1)
  471. p.BrickColor = MC
  472. p.Reflectance = MR
  473. p.Locked = true
  474. p.TopSurface = 0
  475. p.BottomSurface = 0
  476. p.Parent = model
  477. local m = Instance.new("CylinderMesh")
  478. m.Scale = Vector3.new(0.32, 1.1, 0.32)
  479. m.Parent = p
  480. local w = Instance.new("Weld")
  481. w.Part0 = p
  482. w.Part1 = pm
  483. w.C0 = CFrame.new(0, 0.14, -0.04)
  484. w.C1 = CFrame.new()
  485. w.Parent = p
  486. local p = Instance.new("Part")
  487. p.Name = "CHandleC" --------------
  488. p.CanCollide = false
  489. p.formFactor = "Symmetric"
  490. p.Size = Vector3.new(1, 1, 1)
  491. p.BrickColor = DC
  492. p.Locked = true
  493. p.TopSurface = 0
  494. p.BottomSurface = 0
  495. p.Parent = model
  496. local m = Instance.new("CylinderMesh")
  497. m.Scale = Vector3.new(0.32, 0.1, 0.32)
  498. m.Parent = p
  499. local w = Instance.new("Weld")
  500. w.Part0 = p
  501. w.Part1 = pm
  502. w.C0 = CFrame.new(0, -0.08, -0.38) * CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0)
  503. w.C1 = CFrame.new()
  504. w.Parent = p
  505. local p = Instance.new("Part")
  506. p.Name = "CHandleB" --------------
  507. p.CanCollide = false
  508. p.formFactor = "Symmetric"
  509. p.Size = Vector3.new(1, 1, 1)
  510. p.BrickColor = DC
  511. p.Transparency = 1
  512. p.Locked = true
  513. p.TopSurface = 0
  514. p.BottomSurface = 0
  515. p.Parent = model
  516. local m = Instance.new("CylinderMesh")
  517. m.Scale = Vector3.new(0.32, 0.1, 0.32)
  518. m.Parent = p
  519. local w = Instance.new("Weld")
  520. w.Part0 = p
  521. w.Part1 = pm
  522. w.C0 = CFrame.new(0, -0.08, -0.72) * CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0)
  523. w.C1 = CFrame.new()
  524. w.Parent = p
  525. local p = Instance.new("Part")
  526. p.Name = "CHandleB1" --------------
  527. p.CanCollide = false
  528. p.formFactor = "Symmetric"
  529. p.Size = Vector3.new(1, 1, 1)
  530. p.BrickColor = DC
  531. p.Transparency = 1
  532. p.Locked = true
  533. p.TopSurface = 0
  534. p.BottomSurface = 0
  535. p.Parent = model
  536. local m = Instance.new("BlockMesh")
  537. m.Scale = Vector3.new(0.15, 0.8, 0.1)
  538. m.Parent = p
  539. local w = Instance.new("Weld")
  540. w.Part0 = p
  541. w.Part1 = pm
  542. w.C0 = CFrame.new(0, -0.3, 0.08)
  543. w.C1 = CFrame.new()
  544. w.Parent = p
  545. local p = Instance.new("Part")
  546. p.Name = "Bolt" --------------
  547. p.CanCollide = false
  548. p.formFactor = "Symmetric"
  549. p.Size = Vector3.new(1, 1, 1)
  550. p.BrickColor = BrickColor.new("Dark stone grey")
  551. p.Locked = true
  552. p.TopSurface = 0
  553. p.BottomSurface = 0
  554. p.Parent = model
  555. local m = Instance.new("CylinderMesh")
  556. m.Name = "Mesh"
  557. m.Scale = Vector3.new(0.14, 0.3, 0.14)
  558. m.Offset = Vector3.new(0, 0, 0)
  559. m.Parent = p
  560. local w = Instance.new("Weld")
  561. w.Part0 = p
  562. w.Part1 = pm
  563. w.C0 = CFrame.new(-0.1, 0.4, -0.04)
  564. w.C1 = CFrame.new()
  565. w.Parent = p
  566. local p = Instance.new("Part")
  567. p.Name = "DustCover" --------------
  568. p.CanCollide = false
  569. p.formFactor = "Symmetric"
  570. p.Size = Vector3.new(1, 1, 1)
  571. p.BrickColor = DC
  572. p.Locked = true
  573. p.TopSurface = 0
  574. p.BottomSurface = 0
  575. p.Parent = model
  576. local m = Instance.new("BlockMesh")
  577. m.Name = "Mesh"
  578. m.Scale = Vector3.new(0.14, 0.34, 0.14)
  579. m.Offset = Vector3.new(0, 0, 0)
  580. m.Parent = p
  581. local w = Instance.new("Weld")
  582. w.Part0 = p
  583. w.Part1 = pm
  584. w.C0 = CFrame.new(-0.105, 0.4, -0.06) * CFrame.fromEulerAnglesXYZ(0, math.rad(-6), 0)
  585. w.C1 = CFrame.new()
  586. w.Parent = p
  587. local p = Instance.new("Part")
  588. p.Name = "Barrel Support"
  589. p.formFactor = "Symmetric"
  590. p.Size = Vector3.new(1, 1, 1)
  591. p.BrickColor = DC
  592. p.Reflectance = MR
  593. p.CanCollide = false
  594. p.Locked = true
  595. p.TopSurface = 0
  596. p.BottomSurface = 0
  597. p.Parent = model
  598. local m = Instance.new("SpecialMesh")
  599. m.MeshType = "Sphere"
  600. m.Scale = Vector3.new(0.24, 0.24, 0.24)
  601. m.Parent = p
  602. local w = Instance.new("Weld")
  603. w.Part0 = p
  604. w.Part1 = pm
  605. w.C0 = CFrame.new(0, 1.88, -0.04)
  606. w.C1 = CFrame.new()
  607. w.Parent = p
  608. local p = Instance.new("Part")
  609. p.Name = "Barrel 1"
  610. p.formFactor = "Symmetric"
  611. p.Size = Vector3.new(1, 1, 1)
  612. p.BrickColor = DC
  613. p.Reflectance = MR
  614. p.CanCollide = false
  615. p.Locked = true
  616. p.TopSurface = 0
  617. p.BottomSurface = 0
  618. p.Parent = model
  619. local m = Instance.new("CylinderMesh")
  620. m.Scale = Vector3.new(0.15, 0.8, 0.15)
  621. m.Parent = p
  622. local w = Instance.new("Weld")
  623. w.Part0 = p
  624. w.Part1 = pm
  625. w.C0 = CFrame.new(0, 2.2, -0.04)
  626. w.C1 = CFrame.new()
  627. w.Parent = p
  628. local p = Instance.new("Part")
  629. p.Name = "Hole"
  630. p.formFactor = "Symmetric"
  631. p.Size = Vector3.new(1, 1, 1)
  632. p.BrickColor = BrickColor.new("Really black")
  633. p.CanCollide = false
  634. p.Locked = true
  635. p.TopSurface = 0
  636. p.BottomSurface = 0
  637. p.Parent = model
  638. local m = Instance.new("CylinderMesh")
  639. m.Scale = Vector3.new(0.12, 0.4, 0.12)
  640. m.Parent = p
  641. local w = Instance.new("Weld")
  642. w.Part0 = p
  643. w.Part1 = pm
  644. w.C0 = CFrame.new(0, 2.504, -0.04)
  645. w.C1 = CFrame.new()
  646. w.Parent = p
  647. local p = Instance.new("Part")
  648. if silenced == false then
  649. p.Name = "Muzzle"
  650. else
  651. p.Name = "Muzzle 2"
  652. end
  653. p.formFactor = "Symmetric"
  654. p.Size = Vector3.new(1, 1, 1)
  655. p.BrickColor = DC
  656. p.Reflectance = MR
  657. p.CanCollide = false
  658. p.Locked = true
  659. p.TopSurface = 0
  660. p.BottomSurface = 0
  661. p.Parent = model
  662. local m = Instance.new("CylinderMesh")
  663. m.Scale = Vector3.new(0.18, 0.4, 0.18)
  664. m.Parent = p
  665. local w = Instance.new("Weld")
  666. w.Part0 = p
  667. w.Part1 = pm
  668. w.C0 = CFrame.new(0, 2.5, -0.04)
  669. w.C1 = CFrame.new()
  670. w.Parent = p
  671. local s = Instance.new("Smoke")
  672. s.Enabled = false
  673. s.Name = "Smoke"
  674. s.RiseVelocity = -5
  675. s.Opacity = 0.3
  676. s.Color = Color3.new(75 / 225, 75 / 225, 75 / 225)
  677. s.Size = 1
  678. s.Parent = p
  679. local f = Instance.new("Fire")
  680. f.Enabled = false
  681. f.Name = "Fire"
  682. f.Heat = -35
  683. f.Size = 1
  684. f.Parent = p
  685. local p = Instance.new("Part")
  686. if silenced == false then
  687. p.Name = "Silencer"
  688. else
  689. p.Name = "Muzzle"
  690. end
  691. p.formFactor = "Symmetric"
  692. p.Size = Vector3.new(1, 1, 1)
  693. p.BrickColor = BrickColor.new("Black")
  694. p.CanCollide = false
  695. if silenced == false then
  696. p.Transparency = 1
  697. else
  698. p.Transparency = 0
  699. end
  700. p.Locked = true
  701. p.TopSurface = 0
  702. p.BottomSurface = 0
  703. p.Parent = model
  704. local m = Instance.new("CylinderMesh")
  705. m.Scale = Vector3.new(0.2, 1.4, 0.2)
  706. m.Parent = p
  707. local w = Instance.new("Weld")
  708. w.Part0 = p
  709. w.Part1 = pm
  710. w.C0 = CFrame.new(0, 2.4, -0.04)
  711. w.C1 = CFrame.new()
  712. w.Parent = p
  713. local p = Instance.new("Part")
  714. p.Name = "Silencer1"
  715. p.formFactor = "Symmetric"
  716. p.Size = Vector3.new(1, 1, 1)
  717. p.BrickColor = BrickColor.new("Really black")
  718. p.CanCollide = false
  719. if silenced == false then
  720. p.Transparency = 1
  721. else
  722. p.Transparency = 0
  723. end
  724. p.Locked = true
  725. p.TopSurface = 0
  726. p.BottomSurface = 0
  727. p.Parent = model
  728. local m = Instance.new("CylinderMesh")
  729. m.Scale = Vector3.new(0.12, 1.403, 0.12)
  730. m.Parent = p
  731. local w = Instance.new("Weld")
  732. w.Part0 = p
  733. w.Part1 = pm
  734. w.C0 = CFrame.new(0, 2.4, -0.04)
  735. w.C1 = CFrame.new()
  736. w.Parent = p
  737. local p = Instance.new("Part") -- Standard Stock
  738. p.Name = "StockC"
  739. p.CanCollide = false
  740. p.formFactor = "Symmetric"
  741. p.Size = Vector3.new(1, 1, 1)
  742. p.BrickColor = DC
  743. p.Reflectance = GR
  744. p.Locked = true
  745. p.TopSurface = 0
  746. p.BottomSurface = 0
  747. p.Parent = model
  748. local m = Instance.new("CylinderMesh")
  749. m.Scale = Vector3.new(0.2, 1, 0.2)
  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.6, -0.1)
  755. w.C1 = CFrame.new()
  756. w.Parent = p
  757. local pt = Instance.new("Part")
  758. pt.Name = "StockT"
  759. pt.CanCollide = false
  760. pt.formFactor = "Symmetric"
  761. pt.Size = Vector3.new(1, 1, 1)
  762. pt.BrickColor = GC
  763. pt.Reflectance = GR
  764. pt.Locked = true
  765. pt.TopSurface = 0
  766. pt.BottomSurface = 0
  767. pt.Parent = model
  768. local m = Instance.new("CylinderMesh")
  769. m.Scale = Vector3.new(0.25, 0.8, 0.25)
  770. m.Offset = Vector3.new(0, 0.4, 0)
  771. m.Parent = pt
  772. local w = Instance.new("Weld")
  773. w.Part0 = pt
  774. w.Part1 = pm
  775. if selected == true then
  776. w.C0 = CFrame.new(0, -0.9, -0.1)
  777. else
  778. w.C0 = CFrame.new(0, -0.4, -0.1)
  779. end
  780. w.C1 = CFrame.new()
  781. w.Parent = pt
  782. local p = Instance.new("Part")
  783. p.Name = "StockAngle1"
  784. p.CanCollide = false
  785. p.formFactor = "Symmetric"
  786. p.Size = Vector3.new(1, 1, 1)
  787. p.BrickColor = GC
  788. p.Reflectance = GR
  789. p.Locked = true
  790. p.TopSurface = 0
  791. p.BottomSurface = 0
  792. p.Parent = model
  793. local m = Instance.new("SpecialMesh")
  794. m.MeshType = "Wedge"
  795. m.Scale = Vector3.new(0.2, 0.5, 0.5)
  796. m.Parent = p
  797. local w = Instance.new("Weld")
  798. w.Part0 = p
  799. w.Part1 = pt
  800. w.C0 = CFrame.new(0, -0.3, -0.55) * CFrame.fromEulerAnglesXYZ(math.rad(270), 0, math.rad(180))
  801. w.C1 = CFrame.new()
  802. w.Parent = p
  803. local p = Instance.new("Part")
  804. p.Name = "StockAngle2"
  805. p.CanCollide = false
  806. p.formFactor = "Symmetric"
  807. p.Size = Vector3.new(1, 1, 1)
  808. p.BrickColor = GC
  809. p.Reflectance = GR
  810. p.Locked = true
  811. p.TopSurface = 0
  812. p.BottomSurface = 0
  813. p.Parent = model
  814. local m = Instance.new("SpecialMesh")
  815. m.MeshType = "Wedge"
  816. m.Scale = Vector3.new(0.2, 0.4, 0.6)
  817. m.Parent = p
  818. local w = Instance.new("Weld")
  819. w.Part0 = p
  820. w.Part1 = pt
  821. w.C0 = CFrame.new(0, -0.24, -0.3) * CFrame.fromEulerAnglesXYZ(math.rad(270), 0, math.rad(180))
  822. w.C1 = CFrame.new()
  823. w.Parent = p--]]
  824. local p = Instance.new("Part")
  825. p.Name = "BoltHole" --------------
  826. p.CanCollide = false
  827. p.formFactor = "Symmetric"
  828. p.Size = Vector3.new(1, 1, 1)
  829. p.BrickColor = BrickColor.new("Really black")
  830. p.Locked = true
  831. p.TopSurface = 0
  832. p.BottomSurface = 0
  833. p.Parent = model
  834. local m = Instance.new("CylinderMesh")
  835. m.Scale = Vector3.new(0.13, 0.29, 0.13)
  836. m.Parent = p
  837. local w = Instance.new("Weld")
  838. w.Part0 = p
  839. w.Part1 = pm
  840. w.C0 = CFrame.new(-0.1, 0.4, -0.04)
  841. w.C1 = CFrame.new()
  842. w.Parent = p
  843. if Sight == 0 then
  844. local p = Instance.new("Part")
  845. p.Name = "Frontsight"
  846. p.formFactor = "Symmetric"
  847. p.Size = Vector3.new(1, 1, 1)
  848. p.BrickColor = DC
  849. p.Reflectance = MR
  850. p.CanCollide = false
  851. p.Locked = true
  852. p.TopSurface = 0
  853. p.BottomSurface = 0
  854. p.Parent = model
  855. local m = Instance.new("BlockMesh")
  856. m.Scale = Vector3.new(0.08, 0.1, 0.3)
  857. m.Parent = p
  858. local w = Instance.new("Weld")
  859. w.Part0 = p
  860. w.Part1 = pm
  861. w.C0 = CFrame.new(0, 2.1, 0.1)
  862. w.C1 = CFrame.new()
  863. w.Parent = p
  864. local p = Instance.new("Part")
  865. p.Name = "Frontsight"
  866. p.formFactor = "Symmetric"
  867. p.Size = Vector3.new(1, 1, 1)
  868. p.BrickColor = DC
  869. p.Reflectance = MR
  870. p.CanCollide = false
  871. p.Locked = true
  872. p.TopSurface = 0
  873. p.BottomSurface = 0
  874. p.Parent = model
  875. local m = Instance.new("CylinderMesh")
  876. m.Scale = Vector3.new(0.1, 0.1, 0.1)
  877. m.Parent = p
  878. local w = Instance.new("Weld")
  879. w.Part0 = p
  880. w.Part1 = pm
  881. w.C0 = CFrame.new(0, 2.1, 0.26)
  882. w.C1 = CFrame.new()
  883. w.Parent = p
  884. local p = Instance.new("Part")
  885. p.Name = "Rearsight"
  886. p.CanCollide = false
  887. p.formFactor = "Symmetric"
  888. p.Size = Vector3.new(1, 1, 1)
  889. p.BrickColor = DC
  890. p.Reflectance = MR
  891. p.Locked = true
  892. p.TopSurface = 0
  893. p.BottomSurface = 0
  894. p.Parent = model
  895. local m = Instance.new("BlockMesh")
  896. m.Scale = Vector3.new(0.22, 0.25, 0.2)
  897. m.Parent = p
  898. local w = Instance.new("Weld")
  899. w.Part0 = p
  900. w.Part1 = pm
  901. w.C0 = CFrame.new(0, -0.2, 0.1)
  902. w.C1 = CFrame.new()
  903. w.Parent = p
  904. local p = Instance.new("Part")
  905. p.Name = "Rearsight"
  906. p.CanCollide = false
  907. p.formFactor = "Symmetric"
  908. p.Size = Vector3.new(1, 1, 1)
  909. p.BrickColor = DC
  910. p.Reflectance = MR
  911. p.Locked = true
  912. p.TopSurface = 0
  913. p.BottomSurface = 0
  914. p.Parent = model
  915. local m = Instance.new("BlockMesh")
  916. m.Scale = Vector3.new(0.08, 0.08, 0.2)
  917. m.Offset = Vector3.new(0.07, 0, 0)
  918. m.Parent = p
  919. local w = Instance.new("Weld")
  920. w.Part0 = p
  921. w.Part1 = pm
  922. w.C0 = CFrame.new(0, -0.2, 0.16)
  923. w.C1 = CFrame.new()
  924. w.Parent = p
  925. local p = Instance.new("Part")
  926. p.Name = "Rearsight"
  927. p.CanCollide = false
  928. p.formFactor = "Symmetric"
  929. p.Size = Vector3.new(1, 1, 1)
  930. p.BrickColor = DC
  931. p.Reflectance = MR
  932. p.Locked = true
  933. p.TopSurface = 0
  934. p.BottomSurface = 0
  935. p.Parent = model
  936. local m = Instance.new("BlockMesh")
  937. m.Scale = Vector3.new(0.08, 0.08, 0.2)
  938. m.Offset = Vector3.new(-0.07, 0, 0)
  939. m.Parent = p
  940. local w = Instance.new("Weld")
  941. w.Part0 = p
  942. w.Part1 = pm
  943. w.C0 = CFrame.new(0, -0.2, 0.16)
  944. w.C1 = CFrame.new()
  945. w.Parent = p
  946. elseif Sight == 1 then
  947. canZoom = true
  948. local p = Instance.new("Part") -------------- SCOPE
  949. p.Name = "Scope Base"
  950. p.formFactor = "Symmetric"
  951. p.CanCollide = false
  952. p.Size = Vector3.new(1, 1, 1)
  953. p.BrickColor = DC
  954. p.Reflectance = MR
  955. p.Locked = true
  956. p.TopSurface = 0
  957. p.BottomSurface = 0
  958. p.Parent = model
  959. local m = Instance.new("BlockMesh")
  960. m.Scale = Vector3.new(0.1, 0.14, 0.4)
  961. m.Parent = p
  962. local w = Instance.new("Weld")
  963. w.Part0 = p
  964. w.Part1 = pm
  965. w.C0 = CFrame.new(0, 0.1, 0.1)
  966. w.C1 = CFrame.new()
  967. w.Parent = p
  968. local p = Instance.new("Part")
  969. p.Name = "Scope Base"
  970. p.formFactor = "Symmetric"
  971. p.CanCollide = false
  972. p.Size = Vector3.new(1, 1, 1)
  973. p.BrickColor = DC
  974. p.Reflectance = MR
  975. p.Locked = true
  976. p.TopSurface = 0
  977. p.BottomSurface = 0
  978. p.Parent = model
  979. local m = Instance.new("BlockMesh")
  980. m.Scale = Vector3.new(0.1, 0.14, 0.4)
  981. m.Parent = p
  982. local w = Instance.new("Weld")
  983. w.Part0 = p
  984. w.Part1 = pm
  985. w.C0 = CFrame.new(0, 0.48, 0.1)
  986. w.C1 = CFrame.new()
  987. w.Parent = p
  988. local p = Instance.new("Part")
  989. p.Name = "Scope End 1" --End = Back
  990. p.CanCollide = false
  991. p.formFactor = "Symmetric"
  992. p.Size = Vector3.new(1, 1, 1)
  993. p.BrickColor = DC
  994. p.Reflectance = MR
  995. p.Locked = true
  996. p.TopSurface = 0
  997. p.BottomSurface = 0
  998. p.Parent = model
  999. local m = Instance.new("CylinderMesh")
  1000. m.Scale = Vector3.new(0.24, 0.375, 0.24)
  1001. m.Parent = p
  1002. local w = Instance.new("Weld")
  1003. w.Part0 = p
  1004. w.Part1 = pm
  1005. w.C0 = CFrame.new(0, -0.2, 0.3)
  1006. w.C1 = CFrame.new()
  1007. w.Parent = p
  1008. local p = Instance.new("Part")
  1009. p.Name = "Scope Center 1"
  1010. p.CanCollide = false
  1011. p.formFactor = "Symmetric"
  1012. p.Size = Vector3.new(1, 1, 1)
  1013. p.BrickColor = DC
  1014. p.Reflectance = MR
  1015. p.Locked = true
  1016. p.TopSurface = 0
  1017. p.BottomSurface = 0
  1018. p.Parent = model
  1019. local m = Instance.new("CylinderMesh")
  1020. m.Scale = Vector3.new(0.2, 0.8, 0.2)
  1021. m.Parent = p
  1022. local w = Instance.new("Weld")
  1023. w.Part0 = p
  1024. w.Part1 = pm
  1025. w.C0 = CFrame.new(0, 0.3, 0.3)
  1026. w.C1 = CFrame.new()
  1027. w.Parent = p
  1028. local p = Instance.new("Part")
  1029. p.Name = "Scope Front 1"
  1030. p.CanCollide = false
  1031. p.formFactor = "Symmetric"
  1032. p.Size = Vector3.new(1, 1, 1)
  1033. p.BrickColor = DC
  1034. p.Reflectance = MR
  1035. p.Locked = true
  1036. p.TopSurface = 0
  1037. p.BottomSurface = 0
  1038. p.Parent = model
  1039. local m = Instance.new("CylinderMesh")
  1040. m.Scale = Vector3.new(0.28, 0.7, 0.28)
  1041. m.Parent = p
  1042. local w = Instance.new("Weld")
  1043. w.Part0 = p
  1044. w.Part1 = pm
  1045. w.C0 = CFrame.new(0, 0.94, 0.3)
  1046. w.C1 = CFrame.new()
  1047. w.Parent = p
  1048. local p = Instance.new("Part")
  1049. p.Name = "Scope Window F"
  1050. p.CanCollide = false
  1051. p.formFactor = "Symmetric"
  1052. p.Size = Vector3.new(1, 1, 1)
  1053. p.BrickColor = BrickColor.new("White")
  1054. p.Reflectance = 0.3
  1055. p.Locked = true
  1056. p.TopSurface = 0
  1057. p.BottomSurface = 0
  1058. p.Parent = model
  1059. local m = Instance.new("CylinderMesh")
  1060. m.Scale = Vector3.new(0.27, 0.7, 0.27)
  1061. m.Offset = Vector3.new(0, -0.003 ,0)
  1062. m.Parent = p
  1063. local w = Instance.new("Weld")
  1064. w.Part0 = p
  1065. w.Part1 = pm
  1066. w.C0 = CFrame.new(0, 0.94, 0.3)
  1067. w.C1 = CFrame.new()
  1068. w.Parent = p
  1069. local p = Instance.new("Part")
  1070. p.Name = "Scope Window B"
  1071. p.CanCollide = false
  1072. p.formFactor = "Symmetric"
  1073. p.Size = Vector3.new(1, 1, 1)
  1074. p.BrickColor = BrickColor.new("White")
  1075. p.Reflectance = 0.3
  1076. p.Locked = true
  1077. p.TopSurface = 0
  1078. p.BottomSurface = 0
  1079. p.Parent = model
  1080. local m = Instance.new("CylinderMesh")
  1081. m.Scale = Vector3.new(0.23, 0.375, 0.23)
  1082. m.Offset = Vector3.new(0, 0.003 ,0)
  1083. m.Parent = p
  1084. local w = Instance.new("Weld")
  1085. w.Part0 = p
  1086. w.Part1 = pm
  1087. w.C0 = CFrame.new(0, -0.2, 0.3)
  1088. w.C1 = CFrame.new()
  1089. w.Parent = p
  1090. elseif Sight == 2 then
  1091. local p = Instance.new("Part")
  1092. p.Name = "SightBottom"
  1093. p.CanCollide = false
  1094. p.formFactor = "Symmetric"
  1095. p.Size = Vector3.new(1, 1, 1)
  1096. p.BrickColor = DC
  1097. p.Reflectance = MR
  1098. p.Locked = true
  1099. p.TopSurface = 0
  1100. p.BottomSurface = 0
  1101. p.Parent = model
  1102. local m = Instance.new("BlockMesh")
  1103. m.Scale = Vector3.new(0.2, 0.5, 0.18)
  1104. m.Parent = p
  1105. local w = Instance.new("Weld")
  1106. w.Part0 = p
  1107. w.Part1 = pm
  1108. w.C0 = CFrame.new(0, 0.25, 0.12)
  1109. w.C1 = CFrame.new()
  1110. w.Parent = p
  1111. local p = Instance.new("Part")
  1112. p.Name = "Image"
  1113. p.CanCollide = false
  1114. p.formFactor = "Symmetric"
  1115. p.Size = Vector3.new(1, 1, 1)
  1116. p.BrickColor = MC
  1117. p.Transparency = 1
  1118. p.Locked = true
  1119. p.TopSurface = 0
  1120. p.BottomSurface = 0
  1121. p.Parent = model
  1122. local d = Instance.new("Decal")
  1123. d.Face = "Top"
  1124. d.Texture = "http://www.roblox.com/asset/?id=29712167"
  1125. d.Parent = p
  1126. local m = Instance.new("BlockMesh")
  1127. m.Scale = Vector3.new(0.1, 0.001, 0.1)
  1128. m.Parent = p
  1129. local w = Instance.new("Weld")
  1130. w.Part0 = p
  1131. w.Part1 = pm
  1132. w.C0 = CFrame.new(0, 0.1, 0.25)
  1133. w.C1 = CFrame.new()
  1134. w.Parent = p
  1135. local p = Instance.new("Part")
  1136. p.Name = "SightCube"
  1137. p.CanCollide = false
  1138. p.formFactor = "Symmetric"
  1139. p.Size = Vector3.new(1, 1, 1)
  1140. p.BrickColor = DC
  1141. p.Reflectance = MR
  1142. p.Transparency = 0.8
  1143. p.Locked = true
  1144. p.TopSurface = 0
  1145. p.BottomSurface = 0
  1146. p.Parent = model
  1147. local m = Instance.new("BlockMesh")
  1148. m.Scale = Vector3.new(0.25, 0.25, 0.25)
  1149. m.Parent = p
  1150. local w = Instance.new("Weld")
  1151. w.Part0 = p
  1152. w.Part1 = pm
  1153. w.C0 = CFrame.new(0, 0.1, 0.25)
  1154. w.C1 = CFrame.new()
  1155. w.Parent = p
  1156. local p = Instance.new("Part")
  1157. p.Name = "SightBox"
  1158. p.CanCollide = false
  1159. p.formFactor = "Symmetric"
  1160. p.Size = Vector3.new(1, 1, 1)
  1161. p.BrickColor = DC
  1162. p.Reflectance = MR
  1163. p.Locked = true
  1164. p.TopSurface = 0
  1165. p.BottomSurface = 0
  1166. p.Parent = model
  1167. local m = Instance.new("BlockMesh")
  1168. m.Scale = Vector3.new(0.05, 0.25, 0.25)
  1169. m.Offset = Vector3.new(0.1, 0, 0)
  1170. m.Parent = p
  1171. local w = Instance.new("Weld")
  1172. w.Part0 = p
  1173. w.Part1 = pm
  1174. w.C0 = CFrame.new(0, 0.1, 0.25)
  1175. w.C1 = CFrame.new()
  1176. w.Parent = p
  1177. local p = Instance.new("Part")
  1178. p.Name = "SightBox"
  1179. p.CanCollide = false
  1180. p.formFactor = "Symmetric"
  1181. p.Size = Vector3.new(1, 1, 1)
  1182. p.BrickColor = DC
  1183. p.Reflectance = MR
  1184. p.Locked = true
  1185. p.TopSurface = 0
  1186. p.BottomSurface = 0
  1187. p.Parent = model
  1188. local m = Instance.new("BlockMesh")
  1189. m.Scale = Vector3.new(0.05, 0.25, 0.25)
  1190. m.Offset = Vector3.new(-0.1, 0, 0)
  1191. m.Parent = p
  1192. local w = Instance.new("Weld")
  1193. w.Part0 = p
  1194. w.Part1 = pm
  1195. w.C0 = CFrame.new(0, 0.1, 0.25)
  1196. w.C1 = CFrame.new()
  1197. w.Parent = p
  1198. local p = Instance.new("Part")
  1199. p.Name = "SightBox"
  1200. p.CanCollide = false
  1201. p.formFactor = "Symmetric"
  1202. p.Size = Vector3.new(1, 1, 1)
  1203. p.BrickColor = DC
  1204. p.Reflectance = MR
  1205. p.Locked = true
  1206. p.TopSurface = 0
  1207. p.BottomSurface = 0
  1208. p.Parent = model
  1209. local m = Instance.new("BlockMesh")
  1210. m.Scale = Vector3.new(0.25, 0.25, 0.05)
  1211. m.Offset = Vector3.new(0, 0, -0.1)
  1212. m.Parent = p
  1213. local w = Instance.new("Weld")
  1214. w.Part0 = p
  1215. w.Part1 = pm
  1216. w.C0 = CFrame.new(0, 0.1, 0.25)
  1217. w.C1 = CFrame.new()
  1218. w.Parent = p
  1219. local p = Instance.new("Part")
  1220. p.Name = "SightBox"
  1221. p.CanCollide = false
  1222. p.formFactor = "Symmetric"
  1223. p.Size = Vector3.new(1, 1, 1)
  1224. p.BrickColor = DC
  1225. p.Reflectance = MR
  1226. p.Locked = true
  1227. p.TopSurface = 0
  1228. p.BottomSurface = 0
  1229. p.Parent = model
  1230. local m = Instance.new("BlockMesh")
  1231. m.Scale = Vector3.new(0.25, 0.25, 0.05)
  1232. m.Offset = Vector3.new(0, 0, 0.1)
  1233. m.Parent = p
  1234. local w = Instance.new("Weld")
  1235. w.Part0 = p
  1236. w.Part1 = pm
  1237. w.C0 = CFrame.new(0, 0.1, 0.25)
  1238. w.C1 = CFrame.new()
  1239. w.Parent = p
  1240. else end
  1241. if Grip == 1 then
  1242. local p = Instance.new("Part") --------------- ForeGrip Attachment
  1243. p.Name = "ForeGrip"
  1244. p.formFactor = "Symmetric"
  1245. p.Size = Vector3.new(1, 1, 1)
  1246. p.BrickColor = BrickColor.new("Black")
  1247. p.CanCollide = false
  1248. p.Locked = true
  1249. p.TopSurface = 0
  1250. p.BottomSurface = 0
  1251. p.Parent = model
  1252. local m = Instance.new("CylinderMesh")
  1253. m.Scale = Vector3.new(0.25, 0.6, 0.25)
  1254. m.Parent = p
  1255. local w = Instance.new("Weld")
  1256. w.Part0 = p
  1257. w.Part1 = pm
  1258. w.C0 = CFrame.new(0, 0.4, 1.1) * CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0)
  1259. w.C1 = CFrame.new()
  1260. w.Parent = p
  1261. elseif Grip == 2 then
  1262. local p = Instance.new("Part") ---Bipod
  1263. p.Name = "BipodM" --------------
  1264. p.CanCollide = false
  1265. p.formFactor = "Symmetric"
  1266. p.Size = Vector3.new(1, 1, 1)
  1267. p.BrickColor = DC
  1268. p.Reflectance = MR
  1269. p.Locked = true
  1270. p.TopSurface = 0
  1271. p.BottomSurface = 0
  1272. p.Parent = model
  1273. local m = Instance.new("BlockMesh")
  1274. m.Scale = Vector3.new(0.17, 0.25, 0.2)
  1275. m.Parent = p
  1276. local w = Instance.new("Weld")
  1277. w.Part0 = p
  1278. w.Part1 = pm
  1279. w.C0 = CFrame.new(0, 1, -0.25)
  1280. w.C1 = CFrame.new()
  1281. w.Parent = p
  1282. local p = Instance.new("Part")
  1283. p.Name = "BipodArm"
  1284. p.formFactor = "Symmetric"
  1285. p.Size = Vector3.new(1, 1, 1)
  1286. p.CanCollide = false
  1287. p.BrickColor = DC
  1288. p.Reflectance = MR
  1289. p.Locked = true
  1290. p.TopSurface = 0
  1291. p.BottomSurface = 0
  1292. p.Parent = model
  1293. local m = Instance.new("CylinderMesh")
  1294. m.Scale = Vector3.new(0.15, 1, 0.15)
  1295. m.Offset = Vector3.new(0, -0.44 ,0)
  1296. m.Parent = p
  1297. local w = Instance.new("Weld")
  1298. w.Part0 = p
  1299. w.Part1 = pm
  1300. w.C0 = CFrame.new(-0.09, 1, -0.3)
  1301. w.C1 = CFrame.new()
  1302. w.Parent = p
  1303. local p = Instance.new("Part")
  1304. p.Name = "BipodArm"
  1305. p.formFactor = "Symmetric"
  1306. p.Size = Vector3.new(1, 1, 1)
  1307. p.CanCollide = false
  1308. p.BrickColor = DC
  1309. p.Reflectance = MR
  1310. p.Locked = true
  1311. p.TopSurface = 0
  1312. p.BottomSurface = 0
  1313. p.Parent = model
  1314. local m = Instance.new("CylinderMesh")
  1315. m.Scale = Vector3.new(0.15, 1, 0.15)
  1316. m.Offset = Vector3.new(0, -0.44 ,0)
  1317. m.Parent = p
  1318. local w = Instance.new("Weld")
  1319. w.Part0 = p
  1320. w.Part1 = pm
  1321. w.C0 = CFrame.new(0.09, 1, -0.3)
  1322. w.C1 = CFrame.new()
  1323. w.Parent = p--]]
  1324. else end
  1325. if Attachment == true then
  1326. local p = Instance.new("Part")
  1327. p.Name = "LaserPod"
  1328. p.formFactor = "Symmetric"
  1329. p.Size = Vector3.new(1, 1, 1)
  1330. p.CanCollide = false
  1331. p.BrickColor = DC
  1332. p.Reflectance = MR
  1333. p.Locked = true
  1334. p.TopSurface = 0
  1335. p.BottomSurface = 0
  1336. p.Parent = model
  1337. local m = Instance.new("BlockMesh")
  1338. m.Scale = Vector3.new(0.1, 0.35, 0.25)
  1339. m.Parent = p
  1340. local w = Instance.new("Weld")
  1341. w.Part0 = p
  1342. w.Part1 = pm
  1343. w.C0 = CFrame.new(-0.22, 1.8, -0.04)
  1344. w.C1 = CFrame.new()
  1345. w.Parent = p--]]
  1346. local p = Instance.new("Part")
  1347. p.Name = "LaserPod"
  1348. p.formFactor = "Symmetric"
  1349. p.Size = Vector3.new(1, 1, 1)
  1350. p.CanCollide = false
  1351. p.BrickColor = DC
  1352. p.Reflectance = MR
  1353. p.Locked = true
  1354. p.TopSurface = 0
  1355. p.BottomSurface = 0
  1356. p.Parent = model
  1357. local m = Instance.new("CylinderMesh")
  1358. m.Scale = Vector3.new(0.12, 0.35, 0.12)
  1359. m.Parent = p
  1360. local w = Instance.new("Weld")
  1361. w.Part0 = p
  1362. w.Part1 = pm
  1363. w.C0 = CFrame.new(-0.22, 1.8, 0.1)
  1364. w.C1 = CFrame.new()
  1365. w.Parent = p
  1366. local p = Instance.new("Part")
  1367. p.Name = "Laser"
  1368. p.CanCollide = false
  1369. p.formFactor = "Symmetric"
  1370. p.Size = Vector3.new(1, 1, 1)
  1371. p.BrickColor = BrickColor.new("Bright red")
  1372. p.Locked = true
  1373. if selected == true and Mode == 1 then
  1374. p.Transparency = 0.4
  1375. else
  1376. p.Transparency = 1
  1377. end
  1378. p.TopSurface = 0
  1379. p.BottomSurface = 0
  1380. p.Parent = model
  1381. local m = Instance.new("BlockMesh")
  1382. m.Scale = Vector3.new(0.01, 500, 0.01)
  1383. m.Offset = Vector3.new(0, -250, 0)
  1384. m.Parent = p
  1385. local w = Instance.new("Weld")
  1386. w.Part0 = p
  1387. w.Part1 = pm
  1388. w.C0 = CFrame.new(-0.22, 1.8, 0.1)
  1389. w.C1 = CFrame.new()
  1390. w.Parent = p
  1391. local p = Instance.new("Part")
  1392. p.Name = "LaserPod"
  1393. p.formFactor = "Symmetric"
  1394. p.Size = Vector3.new(1, 1, 1)
  1395. p.CanCollide = false
  1396. p.BrickColor = DC
  1397. p.Reflectance = MR
  1398. p.Locked = true
  1399. p.TopSurface = 0
  1400. p.BottomSurface = 0
  1401. p.Parent = model
  1402. local m = Instance.new("CylinderMesh")
  1403. m.Scale = Vector3.new(0.12, 0.35, 0.12)
  1404. m.Parent = p
  1405. local w = Instance.new("Weld")
  1406. w.Part0 = p
  1407. w.Part1 = pm
  1408. w.C0 = CFrame.new(-0.22, 1.8, -0.14)
  1409. w.C1 = CFrame.new()
  1410. w.Parent = p
  1411. else end
  1412. return model
  1413. end
  1414.  
  1415.  
  1416. function removeParts(format)
  1417. if format == "RightHand" then
  1418. pcall(function() Player.Character[Name]:Remove() end)
  1419. elseif format == "LeftHand" then
  1420. pcall(function() Player.Character[Name.. " (Left)"]:Remove() end)
  1421. elseif format == "RightHolster" then
  1422. pcall(function() Player.Character[Name.. " (Holstered)"]:Remove() end)
  1423. elseif format == "LeftHolster" then
  1424. pcall(function() Player.Character[Name.. " (Holstered, Left)"]:Remove() end)
  1425. end
  1426. end
  1427.  
  1428.  
  1429. function SetAngle(Joint, Angle, Character)
  1430. if Character == nil then return false end
  1431. local Joints = {
  1432. Character.Torso:FindFirstChild("Right Shoulder 2"),
  1433. Character.Torso:FindFirstChild("Left Shoulder 2"),
  1434. Character.Torso:FindFirstChild("Right Hip 2"),
  1435. Character.Torso:FindFirstChild("Left Hip 2")
  1436. }
  1437. if Joints[Joint] == nil then return false end
  1438. if Joint == 1 or Joint == 3 then
  1439. Joints[Joint].DesiredAngle = Angle
  1440. end
  1441. if Joint == 2 or Joint == 4 then
  1442. Joints[Joint].DesiredAngle = -Angle
  1443. end
  1444. end
  1445.  
  1446.  
  1447. function ForceAngle(Joint, Angle, Character)
  1448. if Character == nil then return false end
  1449. local Joints = {
  1450. Character.Torso:FindFirstChild("Right Shoulder 2"),
  1451. Character.Torso:FindFirstChild("Left Shoulder 2"),
  1452. Character.Torso:FindFirstChild("Right Hip 2"),
  1453. Character.Torso:FindFirstChild("Left Hip 2")
  1454. }
  1455. if Joints[Joint] == nil then return false end
  1456. if Joint == 1 or Joint == 3 then
  1457. Joints[Joint].DesiredAngle = Angle
  1458. Joints[Joint].CurrentAngle = Angle
  1459. end
  1460. if Joint == 2 or Joint == 4 then
  1461. Joints[Joint].DesiredAngle = -Angle
  1462. Joints[Joint].CurrentAngle = -Angle
  1463. end
  1464. end
  1465.  
  1466.  
  1467. function SetSpeed(Joint, Speed, Character)
  1468. if Character == nil then return false end
  1469. local Joints = {
  1470. Character.Torso:FindFirstChild("Right Shoulder 2"),
  1471. Character.Torso:FindFirstChild("Left Shoulder 2"),
  1472. Character.Torso:FindFirstChild("Right Hip 2"),
  1473. Character.Torso:FindFirstChild("Left Hip 2")
  1474. }
  1475. if Joints[Joint] == nil then return false end
  1476. Joints[Joint].MaxVelocity = Speed
  1477. end
  1478.  
  1479.  
  1480. function DisableLimb(Limb, Character)
  1481. if Character == nil then return false end
  1482. if Character:FindFirstChild("Torso") == nil then return false end
  1483. local Joints = {
  1484. Character.Torso:FindFirstChild("Right Shoulder"),
  1485. Character.Torso:FindFirstChild("Left Shoulder"),
  1486. Character.Torso:FindFirstChild("Right Hip"),
  1487. Character.Torso:FindFirstChild("Left Hip")
  1488. }
  1489. local Limbs = {
  1490. Character:FindFirstChild("Right Arm"),
  1491. Character:FindFirstChild("Left Arm"),
  1492. Character:FindFirstChild("Right Leg"),
  1493. Character:FindFirstChild("Left Leg")
  1494. }
  1495. if Joints[Limb] == nil then return false end
  1496. if Limbs[Limb] == nil then return false end
  1497. local Joint = Instance.new("Motor")
  1498. Joint.Parent = Character.Torso
  1499. Joint.Part0 = Character.Torso
  1500. Joint.Part1 = Limbs[Limb]
  1501. if Limb == 1 then
  1502. Joint.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  1503. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  1504. Joint.Name = "Right Shoulder 2"
  1505. elseif Limb == 2 then
  1506. Joint.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1507. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1508. Joint.Name = "Left Shoulder 2"
  1509. elseif Limb == 3 then
  1510. Joint.C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  1511. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  1512. Joint.Name = "Right Hip 2"
  1513. elseif Limb == 4 then
  1514. Joint.C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1515. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1516. Joint.Name = "Left Hip 2"
  1517. end
  1518. Joint.MaxVelocity = Joints[Limb].MaxVelocity
  1519. Joint.CurrentAngle = Joints[Limb].CurrentAngle
  1520. Joint.DesiredAngle = Joints[Limb].DesiredAngle
  1521. Joints[Limb]:Remove()
  1522. end
  1523.  
  1524.  
  1525. function ResetLimbCFrame(Limb, Character)
  1526. if Character == nil then return false end
  1527. if Character.Parent == nil then return false end
  1528. if Character:FindFirstChild("Torso") == nil then return false end
  1529. local Joints = {
  1530. Character.Torso:FindFirstChild("Right Shoulder 2"),
  1531. Character.Torso:FindFirstChild("Left Shoulder 2"),
  1532. Character.Torso:FindFirstChild("Right Hip 2"),
  1533. Character.Torso:FindFirstChild("Left Hip 2")
  1534. }
  1535. local Limbs = {
  1536. Character:FindFirstChild("Right Arm"),
  1537. Character:FindFirstChild("Left Arm"),
  1538. Character:FindFirstChild("Right Leg"),
  1539. Character:FindFirstChild("Left Leg")
  1540. }
  1541. if Joints[Limb] == nil then return false end
  1542. if Limbs[Limb] == nil then return false end
  1543. if Limb == 1 then
  1544. Joints[Limb].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  1545. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  1546. elseif Limb == 2 then
  1547. Joints[Limb].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1548. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1549. elseif Limb == 3 then
  1550. Joints[Limb].C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  1551. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  1552. elseif Limb == 4 then
  1553. Joints[Limb].C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1554. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1555. end
  1556. end
  1557.  
  1558.  
  1559. function EnableLimb(Limb, Character)
  1560. if Character == nil then return false end
  1561. if Character:FindFirstChild("Torso") == nil then return false end
  1562. local Joints = {
  1563. Character.Torso:FindFirstChild("Right Shoulder 2"),
  1564. Character.Torso:FindFirstChild("Left Shoulder 2"),
  1565. Character.Torso:FindFirstChild("Right Hip 2"),
  1566. Character.Torso:FindFirstChild("Left Hip 2")
  1567. }
  1568. local Limbs = {
  1569. Character:FindFirstChild("Right Arm"),
  1570. Character:FindFirstChild("Left Arm"),
  1571. Character:FindFirstChild("Right Leg"),
  1572. Character:FindFirstChild("Left Leg")
  1573. }
  1574. if Joints[Limb] == nil then return false end
  1575. if Limbs[Limb] == nil then return false end
  1576. if Limb == 1 then
  1577. Joints[Limb].Name = "Right Shoulder"
  1578. elseif Limb == 2 then
  1579. Joints[Limb].Name = "Left Shoulder"
  1580. elseif Limb == 3 then
  1581. Joints[Limb].Name = "Right Hip"
  1582. elseif Limb == 4 then
  1583. Joints[Limb].Name = "Left Hip"
  1584. end
  1585. Animate = Character:FindFirstChild("Animate")
  1586. if Animate == nil then return false end
  1587. Animate = Animate:Clone()
  1588. Character.Animate:Remove()
  1589. Animate.Parent = Character
  1590. end
  1591.  
  1592.  
  1593. function playAnimation(format, mouse)
  1594. if format == "equip" then
  1595. if Ready == true then
  1596. Player.Character.Humanoid.WalkSpeed = AimSpeed
  1597. else end
  1598. EnableLimb(1, Player.Character)
  1599. EnableLimb(2, Player.Character)
  1600. DisableLimb(2, Player.Character)
  1601. SetSpeed(2, 0.1, Player.Character)
  1602. ForceAngle(2, 0, Player.Character)
  1603. SetAngle(2, math.rad(-50), Player.Character)
  1604. wait(0.25)
  1605. if Player.Character:FindFirstChild(Name.. " (Holstered)") == nil then makeParts("RightHolster") end
  1606. Player.Character[Name.. " (Holstered)"].Handle.Weld:Remove()
  1607. local w = Instance.new("Weld")
  1608. w.Part0 = Player.Character[Name.. " (Holstered)"].Handle
  1609. w.Part1 = Player.Character:FindFirstChild("Left Arm")
  1610. w.C0 = CFrame.new(0.5, -0.25, -0.75) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1611. w.C1 = CFrame.new() * CFrame.fromEulerAnglesXYZ(math.rad(50), 0, 0)
  1612. w.Parent = Player.Character[Name.. " (Holstered)"].Handle
  1613. SetAngle(2, 0, Player.Character)
  1614. wait(0.25)
  1615. DisableLimb(1, Player.Character)
  1616. ForceAngle(1, 0, Player.Character)
  1617. delay(0.3, function() Player.Character[Name.. " (Holstered)"].Handle.Equip:Play() end)
  1618. for i = 0, 1, 0.05 do
  1619. if Player.Character:FindFirstChild("Torso") ~= nil then
  1620. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1621. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1622. 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)
  1623. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  1624. 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)
  1625. 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)
  1626. w.C1 = CFrame.new() * CFrame.fromEulerAnglesXYZ(math.rad(50 - i * 25), 0, -math.rad(i * 15))
  1627. wait()
  1628. else return false end
  1629. else return false end
  1630. end
  1631. return playAnimation("hold")
  1632. end
  1633. if format == "unequip" then
  1634. if Ready == true then
  1635. Player.Character.Humanoid.WalkSpeed = 16
  1636. else end
  1637. Player.Character[Name].Handle.Weld:Remove()
  1638. local w = Instance.new("Weld")
  1639. w.Part0 = Player.Character[Name].Handle
  1640. w.Part1 = Player.Character:FindFirstChild("Left Arm")
  1641. w.C0 = CFrame.new(0.5, -0.25, -0.75) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1642. w.C1 = CFrame.new() * CFrame.fromEulerAnglesXYZ(math.rad(50), 0, 0)
  1643. w.Parent = Player.Character[Name].Handle
  1644. for i = 1, 0, -0.05 do
  1645. if Player.Character:FindFirstChild("Torso") ~= nil then
  1646. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1647. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1648. 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)
  1649. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  1650. 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)
  1651. 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)
  1652. w.C1 = CFrame.new() * CFrame.fromEulerAnglesXYZ(math.rad(50 - i * 25), 0, -math.rad(i * 15))
  1653. wait()
  1654. else return false end
  1655. else return false end
  1656. end
  1657. w.C0 = CFrame.new(0.5, -0.25, -0.75) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1658. w.C1 = CFrame.new() * CFrame.fromEulerAnglesXYZ(math.rad(50), 0, 0)
  1659. ResetLimbCFrame(1, Player.Character)
  1660. ResetLimbCFrame(2, Player.Character)
  1661. EnableLimb(1, Player.Character)
  1662. EnableLimb(2, Player.Character)
  1663. DisableLimb(2, Player.Character)
  1664. SetSpeed(2, 0.1, Player.Character)
  1665. ForceAngle(2, 0, Player.Character)
  1666. SetAngle(2, math.rad(-50), Player.Character)
  1667. wait(0.25)
  1668. SetAngle(2, 0, Player.Character)
  1669. removeParts("RightHand")
  1670. makeParts("RightHolster")
  1671. wait(0.25)
  1672. makeParts("RightHand")
  1673. removeParts("RightHolster")
  1674. return true
  1675. end
  1676. if format == "hold" then
  1677. if Ready == false then
  1678. for i = 0, 15, 5 do
  1679. if Player.Character:FindFirstChild("Torso") ~= nil then
  1680. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1681. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1682. 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))
  1683. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  1684. 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)
  1685. wait()
  1686. else return false end
  1687. else return false end
  1688. end
  1689. else
  1690. for i = 15, 0, -5 do
  1691. if Player.Character:FindFirstChild("Torso") ~= nil then
  1692. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1693. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1694. 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))
  1695. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  1696. 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)
  1697. wait()
  1698. else return false end
  1699. else return false end
  1700. end
  1701. end
  1702. end
  1703. if format == "ready" then
  1704. if Ready == true then
  1705. for i = 0, 15, 5 do
  1706. if Player.Character:FindFirstChild("Torso") ~= nil then
  1707. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1708. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1709. 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))
  1710. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  1711. 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)
  1712. wait()
  1713. else return false end
  1714. else return false end
  1715. end
  1716. else
  1717. for i = 15, 0, -5 do
  1718. if Player.Character:FindFirstChild("Torso") ~= nil then
  1719. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1720. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1721. 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))
  1722. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  1723. 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)
  1724. wait()
  1725. else return false end
  1726. else return false end
  1727. end
  1728. end
  1729. end
  1730. if format == "reload" then
  1731. for i = 5, 0, -1 do
  1732. if Player.Character:FindFirstChild("Torso") ~= nil then
  1733. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1734. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1735. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.3, 0.75, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(315 + (i * 1.5)), math.rad(i * 4), math.rad(-90))
  1736. wait()
  1737. else return false end
  1738. else return false end
  1739. end
  1740. coroutine.resume(coroutine.create(function()
  1741. for i = 0, 25, 5 do
  1742. if Player.Character:FindFirstChild("Torso") ~= nil then
  1743. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1744. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  1745. 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)
  1746. wait()
  1747. else return false end
  1748. else return false end
  1749. end
  1750. end))
  1751. Player.Character[Name].Handle.Release:Play()
  1752. Player.Character[Name].Magazine.Transparency = 1
  1753. Player.Character[Name].MagPull.Transparency = 1
  1754. local Mag = Instance.new("Model")
  1755. Mag.Name = "Spent Magazine"
  1756. local source = Player.Character[Name]:FindFirstChild("Magazine")
  1757. if source == nil then return end
  1758. source = source:Clone()
  1759. source.CanCollide = true
  1760. source.Transparency = 0
  1761. source.Parent = Mag
  1762. coroutine.resume(coroutine.create(function() wait(4.5) for i = 0, 1, 0.1 do source.Transparency = i wait() end source:Remove() end))
  1763. for _, Part in pairs(Player.Character[Name]:GetChildren()) do
  1764. if Part.Name == "MagPull" then
  1765. local new = Part:Clone()
  1766. new.Parent = Mag
  1767. new.Transparency = 0
  1768. new.CanCollide = true
  1769. local w = Instance.new("Weld", new)
  1770. w.Part0 = w.Parent
  1771. w.Part1 = source
  1772. w.C0 = Part.Weld.C0
  1773. w.C1 = Part.Weld.C1
  1774. coroutine.resume(coroutine.create(function() wait(4.5) for i = 0, 1, 0.1 do new.Transparency = i wait() end new:Remove() end))
  1775. else end
  1776. end
  1777. Mag.Parent = game.Workspace
  1778. for i = 0, 25, 5 do
  1779. if Player.Character:FindFirstChild("Torso") ~= nil then
  1780. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1781. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1782. 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))
  1783. wait()
  1784. else return false end
  1785. else return false end
  1786. end
  1787. magazineNew = Player.Character[Name].Magazine:Clone()
  1788. magazineNew.Name = "New Magazine"
  1789. magazineNew.Transparency = 0
  1790. magazineNew.Parent = Player.Character[Name]
  1791. local w = Instance.new("Weld")
  1792. w.Part0 = magazineNew
  1793. w.Part1 = Player.Character:FindFirstChild("Left Arm")
  1794. w.C0 = CFrame.new(0, 1.1, 0)
  1795. w.C1 = CFrame.new() * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  1796. w.Parent = magazineNew
  1797. wait(0.2)
  1798. for i = 25, 0, -5 do
  1799. if Player.Character:FindFirstChild("Torso") ~= nil then
  1800. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1801. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1802. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.3 + ((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))
  1803. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  1804. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-0.9 + ((25 - i) / 30), -0.35, 0.51 + ((25 - i) / 25)) * CFrame.fromEulerAnglesXYZ(math.rad(-90 + i), math.rad(-5), math.rad((25 * 2) - (i * 2)))
  1805. wait()
  1806. else return false end
  1807. else return false end
  1808. end
  1809. Player.Character[Name].Magazine.Transparency = 0
  1810. Player.Character[Name].MagPull.Transparency = 0
  1811. CamShake(1, 30000)
  1812. CamShake(1, -30000)
  1813. Player.Character[Name]["New Magazine"]:Remove()
  1814. wait(0.1)
  1815. if Player.Character:FindFirstChild("Torso") ~= nil then
  1816. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1817. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1818. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.3, 1.2, 0.8) * CFrame.fromEulerAnglesXYZ(math.rad(300), math.rad(10), math.rad(-90))
  1819. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  1820. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-0.9, -0.35, 0.51) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5), 0)
  1821. else return false end
  1822. else return false end
  1823. Player.Character[Name].Handle.Reload:Play()
  1824. Player.Character[Name].Handle.Jam:Play()
  1825. wait(0.2)
  1826. if magazine.Value == 0 or Jammed == true then
  1827. playAnimation("charge")
  1828. else
  1829. playAnimation("hold")
  1830. end
  1831. end
  1832. if format == "charge" then
  1833. Player.Character[Name].Handle.Weld:Remove()
  1834. local w = Instance.new("Weld")
  1835. w.Part0 = Player.Character[Name].Handle
  1836. w.Part1 = Player.Character:FindFirstChild("Left Arm")
  1837. w.C0 = CFrame.new(-0.85, -0.3, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(15), math.rad(90), 0)
  1838. w.C1 = CFrame.new(0, 0.4, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(40), 0, 0)
  1839. w.Parent = Player.Character[Name].Handle
  1840. if Player.Character:FindFirstChild("Torso") ~= nil then
  1841. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1842. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1843. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.4, 0.9, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(280), math.rad(-10), math.rad(-90))
  1844. else return false end
  1845. else return false end
  1846. wait(0.2)
  1847. Player.Character[Name].Handle.Equip:Play()
  1848. Player.Character[Name].CHandleC.Transparency = 1
  1849. Player.Character[Name].CHandleB.Transparency = 0
  1850. Player.Character[Name].CHandleB1.Transparency = 0
  1851. Player.Character[Name].Bolt.Mesh.Offset = Vector3.new(0, 0.115, 0)
  1852. Player.Character[Name].Bolt.Mesh.Scale = Vector3.new(0.14, 0.1, 0.14)
  1853. Player.Character[Name].DustCover.Mesh.Offset = Vector3.new(0, 0, 0.115)
  1854. Jammed = false
  1855. if magazine.Value ~= 0 then
  1856. makeShell(Player.Character[Name]:FindFirstChild("ShellOut"))
  1857. else end
  1858. for i = 0, 1, 0.25 do
  1859. if Player.Character:FindFirstChild("Torso") ~= nil then
  1860. if Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1861. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  1862. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-1.2, 0 - (i / 1.5), 0.9) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5), 0)
  1863. wait()
  1864. else return false end
  1865. else return false end
  1866. end
  1867. wait(0.08)
  1868. Player.Character[Name].CHandleC.Transparency = 0
  1869. Player.Character[Name].CHandleB.Transparency = 1
  1870. Player.Character[Name].CHandleB1.Transparency = 1
  1871. Player.Character[Name].Bolt.Mesh.Offset = Vector3.new(0, 0, 0)
  1872. Player.Character[Name].Bolt.Mesh.Scale = Vector3.new(0.14, 0.3, 0.14)
  1873. wait(0.02)
  1874. removeParts("RightHand")
  1875. makeParts("RightHand")
  1876. Player.Character[Name].DustCover.Mesh.Offset = Vector3.new(0, 0, 0.115)
  1877. playAnimation("hold")
  1878. return true
  1879. end
  1880. if format == "fire" then
  1881. Player.Character[Name].Bolt.Mesh.Offset = Vector3.new(0, 0.115, 0)
  1882. Player.Character[Name].Bolt.Mesh.Scale = Vector3.new(0.14, 0.1, 0.14)
  1883. Player.Character[Name].DustCover.Mesh.Offset = Vector3.new(0, 0, 0.115)
  1884. makeShell(Player.Character[Name]:FindFirstChild("ShellOut"))
  1885. if Player.Character[Name]:FindFirstChild("Handle") ~= nil then
  1886. if silenced then
  1887. Player.Character[Name].Handle.Fire2.Volume = math.random(3, 8) / 10
  1888. Player.Character[Name].Handle.Fire2.Pitch = math.random(1.8, 2)
  1889. Player.Character[Name].Handle.Fire2:Play()
  1890. CamShake(10, 3000)
  1891. else
  1892. Player.Character[Name].Handle.Fire.Volume = math.random(9, 10) / 10
  1893. Player.Character[Name].Handle.Fire:Play()
  1894. CamShake(10, 3000)
  1895. end
  1896. else return false end
  1897. if Player.Character[Name]:FindFirstChild("Muzzle") ~= nil then
  1898. if silenced == false then
  1899. 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))
  1900. else end
  1901. else return false end
  1902. for i = 0, 6, 3 do
  1903. if Player.Character:FindFirstChild("Torso") ~= nil then
  1904. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1905. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1906. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.3, 1.2, 0.8) * CFrame.fromEulerAnglesXYZ(math.rad(300), math.rad(10 + i), math.rad(-90))
  1907. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  1908. 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)
  1909. wait()
  1910. else return false end
  1911. else return false end
  1912. end
  1913. if magazine.Value ~= 0 then
  1914. Player.Character[Name].Bolt.Mesh.Offset = Vector3.new(0, 0, 0)
  1915. Player.Character[Name].Bolt.Mesh.Scale = Vector3.new(0.14, 0.3, 0.14)
  1916. elseif magazine.Value == 0 then
  1917. Player.Character[Name].Handle.Lock:Play()
  1918. end
  1919. if math.random(1, Reliability) == 1 then
  1920. Jammed = true
  1921. Player.Character[Name].Handle.Jam:Play()
  1922. end
  1923. for i = 6, 0, -3 do
  1924. if Player.Character:FindFirstChild("Torso") ~= nil then
  1925. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1926. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  1927. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.3, 1.2, 0.8) * CFrame.fromEulerAnglesXYZ(math.rad(300), math.rad(10 + i), math.rad(-90))
  1928. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  1929. 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)
  1930. wait()
  1931. else return false end
  1932. else return false end
  1933. end
  1934. end
  1935. return true
  1936. end
  1937.  
  1938.  
  1939. function CamShake(time, freq)
  1940. coroutine.resume(coroutine.create(function()
  1941. local cam = game:GetService("Workspace").CurrentCamera
  1942. local time = 10
  1943. local seed = Vector3.new(math.random(100, 200) / freq, math.random(100, 200) / freq, 0)
  1944. if math.random(1, 2) == 1 then seed = Vector3.new(-seed.x, seed.y, 0) end
  1945. if math.random(1, 2) == 1 then seed = Vector3.new(seed.x, -seed.y, 0) end
  1946. 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)
  1947. for i = 1, time do
  1948. 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)
  1949. wait()
  1950. end
  1951. end))
  1952. end
  1953.  
  1954.  
  1955. function makeShell(part)
  1956. if part == nil then return false end
  1957. local casing = Instance.new("Part")
  1958. casing.Name = "Shell"
  1959. casing.formFactor = "Custom"
  1960. casing.Size = Vector3.new(0.2, 0.25, 0.2)
  1961. 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)))
  1962. casing.BrickColor = BrickColor.new("New Yeller")
  1963. local mesh = Instance.new("CylinderMesh")
  1964. mesh.Scale = Vector3.new(0.4, 1, 0.4)
  1965. mesh.Parent = casing
  1966. casing.Parent = game:GetService("Workspace")
  1967. casing:BreakJoints()
  1968. casing.Velocity = (part.CFrame.lookVector * 50) + Vector3.new(0, 10, 0)
  1969. coroutine.resume(coroutine.create(function() wait(4.5) for i = 0, 1, 0.1 do casing.Transparency = i wait() end casing:Remove() end))
  1970. end
  1971.  
  1972.  
  1973. function Weld(x, y)
  1974. local weld = Instance.new("Weld")
  1975. weld.Part0 = x
  1976. weld.Part1 = y
  1977. CJ = CFrame.new(x.Position)
  1978. C0 = x.CFrame:inverse() * CJ
  1979. C1 = y.CFrame:inverse() * CJ
  1980. weld.C0 = C0
  1981. weld.C1 = C1
  1982. weld.Parent = x
  1983. end
  1984.  
  1985.  
  1986. function tagHumanoid(humanoid)
  1987. local tag = Instance.new("ObjectValue")
  1988. tag.Name = "creator"
  1989. tag.Value = Player
  1990. tag.Parent = humanoid
  1991. local tag = Instance.new("StringValue")
  1992. tag.Name = "creatorType1"
  1993. tag.Value = Name
  1994. tag.Parent = humanoid
  1995. local tag = Instance.new("StringValue")
  1996. tag.Name = "creatorType2"
  1997. tag.Value = "shot"
  1998. tag.Parent = humanoid
  1999. end
  2000.  
  2001.  
  2002. function untagHumanoid(humanoid)
  2003. if humanoid ~= nil then
  2004. local tag = humanoid:FindFirstChild("creator")
  2005. if tag ~= nil then
  2006. tag:Remove()
  2007. end
  2008. local tag = humanoid:FindFirstChild("creatorType1")
  2009. if tag ~= nil then
  2010. tag:Remove()
  2011. end
  2012. local tag = humanoid:FindFirstChild("creatorType2")
  2013. if tag ~= nil then
  2014. tag:Remove()
  2015. end
  2016. end
  2017. end
  2018.  
  2019.  
  2020. function fire(startPoint, endPoint, hit)
  2021. local trail = Instance.new("Part")
  2022. trail.Name = "Bullet Trail"
  2023. trail.BrickColor = BrickColor.new("Dark stone grey")
  2024. trail.TopSurface = 0
  2025. trail.BottomSurface = 0
  2026. trail.formFactor = 0
  2027. trail.Size = Vector3.new(1, 1, 1)
  2028. trail.Transparency = 0.5
  2029. trail.Anchored = true
  2030. trail.CanCollide = false
  2031. trail.CFrame = CFrame.new((startPoint + endPoint) / 2, endPoint)
  2032. trail.Parent = game:GetService("Workspace")
  2033. local mesh = Instance.new("SpecialMesh")
  2034. mesh.MeshType = "Brick"
  2035. mesh.Scale = Vector3.new(0.1, 0.1, (startPoint - endPoint).magnitude)
  2036. mesh.Parent = trail
  2037. 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)
  2038. if hit ~= nil then
  2039. if hit.Parent == nil then return end
  2040. if hit.Parent.ClassName == "Hat" then
  2041. if hit.Parent.Parent.Humanoid ~= nil then
  2042. hit.Parent.Parent.Humanoid:TakeDamage(damage * 5)
  2043. end
  2044. end
  2045. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  2046. tagHumanoid(hit.Parent.Humanoid)
  2047. if hit.Name == "Head" then
  2048. hit.Parent.Humanoid:TakeDamage(damage * 10)
  2049. elseif hit.Name == "Torso" then
  2050. hit.Parent.Humanoid:TakeDamage(damage * 2)
  2051. elseif hit.Name == "Left Leg" then
  2052. hit.Parent.Humanoid:TakeDamage(damage)
  2053. hit.Parent.Humanoid.Sit = true
  2054. elseif hit.Name == "Right Leg" then
  2055. hit.Parent.Humanoid:TakeDamage(damage)
  2056. hit.Parent.Humanoid.Sit = true
  2057. else
  2058. hit.Parent.Humanoid:TakeDamage(damage)
  2059. end
  2060. if math.random(1, 10) == 1 then
  2061. hit.Parent.Humanoid.Sit = true
  2062. end
  2063. delay(0.1, function() untagHumanoid(hit.Parent.Humanoid) end)
  2064. end
  2065. if hit.Anchored == false then
  2066. hit.Velocity = hit.Velocity + ((endPoint - startPoint).unit * (damage * 2))
  2067. end
  2068. end
  2069. end
  2070.  
  2071.  
  2072. function onButton1Down(mouse)
  2073. if selected == false then return end
  2074. 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
  2075. if Player.Character[Name]:FindFirstChild("Handle") == nil then return end
  2076. if Player.Character[Name]:FindFirstChild("Muzzle") == nil then return end
  2077. if dual == true then if Player.Character[Name.. " (Left)"]:FindFirstChild("Handle") == nil then return end end
  2078. if dual == true then if Player.Character[Name.. " (Left)"]:FindFirstChild("Muzzle") == nil then return end end
  2079. mouse.Icon = "http://www.roblox.com/asset/?id=66839997"
  2080. Button1Down = true
  2081. canFire = false
  2082. canFire2 = true
  2083. while canFire2 == true do
  2084. local humanoid = Player.Character:FindFirstChild("Humanoid")
  2085. if humanoid == nil then
  2086. canFire2 = false
  2087. break
  2088. end
  2089. if humanoid.Health <= 0 then
  2090. canFire2 = false
  2091. break
  2092. end
  2093. local fireLeft = false
  2094. if automatic == false and burst == false then
  2095. canFire2 = false
  2096. elseif automatic == false and burst == true then
  2097. if burstCount >= burstCountMax then
  2098. canFire2 = false
  2099. burstCount = 0
  2100. break
  2101. end
  2102. burstCount = burstCount + 1
  2103. elseif automatic == true and burst == false then
  2104. fireLeft = true
  2105. end
  2106. if Jammed ~= true and Ready == true then
  2107. if magazine.Value > 0 then
  2108. magazine.Value = magazine.Value - 1
  2109. updateGui()
  2110. if silenced == true then
  2111. CamShake(1, Spread)
  2112. else end
  2113. fire(Player.Character[Name].Muzzle.Position, mouse.Hit.p, mouse.Target)
  2114. coroutine.resume(coroutine.create(function()
  2115. if dual == true then
  2116. playAnimation("rightFire")
  2117. elseif dual == false then
  2118. playAnimation("fire")
  2119. end
  2120. end))
  2121. else
  2122. Player.Character[Name].Handle.Empty:Play()
  2123. end
  2124. else
  2125. Player.Character[Name].Handle.Jam:Play()
  2126. end
  2127. if fireLeft == true and dual == true and automatic == true then
  2128. if magazine.Value > 0 then
  2129. coroutine.resume(coroutine.create(function()
  2130. wait(readyTime / 2)
  2131. magazine.Value = magazine.Value - 1
  2132. updateGui()
  2133. fire(Player.Character[Name.. " (Left)"].Muzzle.Position, mouse.Hit.p, mouse.Target)
  2134. playAnimation("leftFire")
  2135. end))
  2136. else
  2137. coroutine.resume(coroutine.create(function()
  2138. wait(readyTime / 2)
  2139. Player.Character[Name].Handle.Empty:Play()
  2140. end))
  2141. end
  2142. end
  2143. wait(readyTime)
  2144. end
  2145. mouse.Icon = "http://www.roblox.com/asset/?id=66839997"
  2146. canFire = true
  2147. end
  2148. end
  2149.  
  2150.  
  2151. function onButton1Up(mouse)
  2152. if selected == false then return end
  2153. Button1Down = false
  2154. canFire2 = false
  2155. burstCount = 0
  2156. while canFire == false do wait() end
  2157. if dual == true and automatic == false then
  2158. if Player.Character[Name.. " (Left)"]:FindFirstChild("Handle") == nil then return end
  2159. if Player.Character[Name.. " (Left)"]:FindFirstChild("Muzzle") == nil then return end
  2160. mouse.Icon = "http://www.roblox.com/asset/?id=66839997"
  2161. canFire = false
  2162. canFire2 = true
  2163. while canFire2 == true do
  2164. local humanoid = Player.Character:FindFirstChild("Humanoid")
  2165. if humanoid == nil then
  2166. canFire2 = false
  2167. break
  2168. end
  2169. if humanoid.Health <= 0 then
  2170. canFire2 = false
  2171. break
  2172. end
  2173. if burst == false then
  2174. canFire2 = false
  2175. elseif burst == true then
  2176. if burstCount >= burstCountMax then
  2177. canFire2 = false
  2178. burstCount = 0
  2179. break
  2180. end
  2181. burstCount = burstCount + 1
  2182. end
  2183. if magazine.Value <= 0 then
  2184. Player.Character[Name].Handle.Empty:Play()
  2185. else
  2186. coroutine.resume(coroutine.create(function()
  2187. playAnimation("leftFire")
  2188. end))
  2189. magazine.Value = magazine.Value - 1
  2190. updateGui()
  2191. fire(Player.Character[Name.. " (Left)"].Muzzle.Position, mouse.Hit.p, mouse.Target)
  2192. end
  2193. wait(readyTime)
  2194. end
  2195. mouse.Icon = "http://www.roblox.com/asset/?id=66839997"
  2196. canFire = true
  2197. end
  2198. end
  2199.  
  2200.  
  2201. function onKeyDown(key, mouse)
  2202. if selected == false then return end
  2203. key = key:lower()
  2204. if key == "q" and Button1Down == false and canFire == true then
  2205. if mouse.Target == nil then return end
  2206. if game:GetService("Players"):GetPlayerFromCharacter(mouse.Target.Parent) ~= nil then
  2207. if dual == true then onKeyDown("t", mouse) end
  2208. onDeselected(mouse)
  2209. removeParts("RightHolster")
  2210. script.Parent.Parent = game:GetService("Players"):GetPlayerFromCharacter(mouse.Target.Parent).Backpack
  2211. end
  2212. end
  2213. if key == "e" and Button1Down == false and canFire == true and canSilence == true then
  2214. if silenced then
  2215. silenced = false
  2216. if Player.Character:FindFirstChild(Name) == nil then return end
  2217. if Player.Character[Name]:FindFirstChild("Muzzle") == nil then return end
  2218. if Player.Character[Name]:FindFirstChild("Muzzle 2") == nil then return end
  2219. Player.Character[Name].Muzzle.Transparency = 1
  2220. Player.Character[Name].Silencer1.Transparency = 1
  2221. Player.Character[Name].Muzzle.Name = "Silencer"
  2222. Player.Character[Name]["Muzzle 2"].Name = "Muzzle"
  2223. if dual == true then
  2224. if Player.Character[Name.. " (Left)"]:FindFirstChild("Muzzle") == nil then return end
  2225. if Player.Character[Name.. " (Left)"]:FindFirstChild("Muzzle 2") == nil then return end
  2226. Player.Character[Name.. " (Left)"].Muzzle.Transparency = 1
  2227. Player.Character[Name.. " (Left)"].Muzzle.Name = "Silencer"
  2228. Player.Character[Name.. " (Left)"]["Muzzle 2"].Name = "Muzzle"
  2229. end
  2230. else
  2231. silenced = true
  2232. if Player.Character:FindFirstChild(Name) == nil then return end
  2233. if Player.Character[Name]:FindFirstChild("Silencer") == nil then return end
  2234. if Player.Character[Name]:FindFirstChild("Muzzle") == nil then return end
  2235. Player.Character[Name].Silencer.Transparency = 0
  2236. Player.Character[Name].Silencer1.Transparency = 0
  2237. Player.Character[Name].Muzzle.Name = "Muzzle 2"
  2238. Player.Character[Name].Silencer.Name = "Muzzle"
  2239. if dual == true then
  2240. if Player.Character[Name.. " (Left)"]:FindFirstChild("Silencer") == nil then return end
  2241. if Player.Character[Name.. " (Left)"]:FindFirstChild("Muzzle") == nil then return end
  2242. Player.Character[Name.. " (Left)"].Silencer.Transparency = 0
  2243. Player.Character[Name.. " (Left)"].Muzzle.Name = "Muzzle 2"
  2244. Player.Character[Name.. " (Left)"].Silencer.Name = "Muzzle"
  2245. end
  2246. end
  2247. end
  2248. if key == "r" and Button1Down == false and canFire == true then
  2249. if ammo.Value > 0 and magazine.Value ~= magazineMax.Value + 1 then
  2250. canFire = false
  2251. burstCount = 0
  2252. mouse.Icon = "http://www.roblox.com/asset/?id=66839997"
  2253. if magazine.Value > 0 then magazine.Value = 1 end
  2254. updateGui()
  2255. if dual == true then
  2256. playAnimation("reloadDual")
  2257. elseif dual == false then
  2258. playAnimation("reload")
  2259. end
  2260. if ammo.Value - magazineMax.Value < 0 then
  2261. magazine.Value = ammo.Value
  2262. ammo.Value = 0
  2263. elseif ammo.Value - magazineMax.Value >= 0 then
  2264. ammo.Value = ammo.Value - magazineMax.Value
  2265. magazine.Value = magazine.Value + MagSize
  2266. end
  2267. updateGui()
  2268. mouse.Icon = "http://www.roblox.com/asset/?id=66839997"
  2269. canFire = true
  2270. end
  2271. end
  2272. if key == "t" and Button1Down == false and canFire == true and canDual == true then
  2273. canFire = false
  2274. if dual == false then
  2275. local weapon = nil
  2276. for _, p in pairs(Player.Backpack:GetChildren()) do
  2277. if p.Name == Name and p ~= script.Parent then weapon = p break end
  2278. end
  2279. if weapon ~= nil then
  2280. dual = true
  2281. weapon.Name = "Dual"
  2282. weapon.Parent = script
  2283. silenced = false
  2284. removeParts("RightHand")
  2285. makeParts("RightHand")
  2286. removeParts("RightHolster")
  2287. makeParts("LeftHolster")
  2288. playAnimation("leftEquip")
  2289. removeParts("LeftHolster")
  2290. makeParts("LeftHand")
  2291. magazineMax.Value = math.ceil(magazineMax.Value * 2)
  2292. ammoMax.Value = math.ceil(ammoMax.Value * 2)
  2293. magazine.Value = magazine.Value + weapon.Magazine.Value
  2294. ammo.Value = ammo.Value + weapon.Ammo.Value
  2295. updateGui()
  2296. end
  2297. elseif dual == true then
  2298. local weapon = script:FindFirstChild("Dual")
  2299. if weapon ~= nil then
  2300. dual = false
  2301. weapon.Name = Name
  2302. weapon.Parent = Player.Backpack
  2303. silenced = false
  2304. removeParts("RightHand")
  2305. makeParts("RightHand")
  2306. playAnimation("leftUnequip")
  2307. removeParts("LeftHand")
  2308. makeParts("RightHolster")
  2309. playAnimation("hold")
  2310. weapon.Magazine.Value = math.floor(magazine.Value / 2)
  2311. weapon.Ammo.Value = math.floor(ammo.Value / 2)
  2312. magazineMax.Value = math.ceil(magazineMax.Value / 2)
  2313. ammoMax.Value = math.ceil(ammoMax.Value / 2)
  2314. magazine.Value = math.ceil(magazine.Value / 2)
  2315. ammo.Value = math.ceil(ammo.Value / 2)
  2316. updateGui()
  2317. end
  2318. end
  2319. canFire = true
  2320. end
  2321. if key == "y" and canZoom == true then
  2322. if zoom == false then
  2323. zoom = true
  2324. local pos = mouse.Hit.p
  2325. local target = mouse.Target
  2326. local cam = game:GetService("Workspace").CurrentCamera
  2327. focus = Instance.new("Part", workspace)
  2328. focus.Anchored = true
  2329. focus.CanCollide = false
  2330. focus.Transparency = 1
  2331. focus.TopSurface = 0
  2332. focus.BottomSurface = 0
  2333. focus.formFactor = "Plate"
  2334. focus.Size = Vector3.new(0, 0, 0)
  2335. focus.CFrame = CFrame.new(pos) * (CFrame.new(Player.Character.Torso.CFrame.p, pos) - CFrame.new(Player.Character.Torso.CFrame.p, pos).p)
  2336. cam.CameraSubject = focus
  2337. cam.CameraType = "Attach"
  2338. while zoom == true and selected == true do
  2339. local set = false
  2340. if target ~= nil then
  2341. if target.Parent ~= nil then
  2342. if target.Anchored == false then
  2343. 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)
  2344. set = true
  2345. end
  2346. end
  2347. end
  2348. if set == false then
  2349. focus.CFrame = CFrame.new(pos) * (CFrame.new(Player.Character.Torso.CFrame.p, pos) - CFrame.new(Player.Character.Torso.CFrame.p, pos).p)
  2350. end
  2351. wait()
  2352. end
  2353. if focus ~= nil then focus:Remove() focus = nil end
  2354. local cam = game:GetService("Workspace").CurrentCamera
  2355. cam.CameraSubject = Player.Character:FindFirstChild("Humanoid")
  2356. cam.CameraType = "Custom"
  2357. else
  2358. zoom = false
  2359. end
  2360. end
  2361. if key == "u" and Button1Down == false and canFire == true then
  2362. if automatic == false and burst == false then
  2363. if switchToBurst == true then
  2364. burst = true
  2365. local m = Instance.new("Message", Player)
  2366. m.Text = "Burst"
  2367. pcall(function() Player.Character[Name].Handle.Switch:Play() end)
  2368. delay(2.5, function() m:Remove() end)
  2369. elseif switchToAutomatic == true then
  2370. automatic = true
  2371. local m = Instance.new("Message", Player)
  2372. m.Text = "Automatic"
  2373. pcall(function() Player.Character[Name].Handle.Switch:Play() end)
  2374. delay(2.5, function() m:Remove() end)
  2375. end
  2376. elseif automatic == false and burst == true then
  2377. if switchToAutomatic == true then
  2378. automatic = true
  2379. burst = false
  2380. local m = Instance.new("Message", Player)
  2381. m.Text = "Automatic"
  2382. pcall(function() Player.Character[Name].Handle.Switch:Play() end)
  2383. delay(2.5, function() m:Remove() end)
  2384. elseif switchToSingle == true then
  2385. burst = false
  2386. local m = Instance.new("Message", Player)
  2387. m.Text = "Single"
  2388. pcall(function() Player.Character[Name].Handle.Switch:Play() end)
  2389. delay(2.5, function() m:Remove() end)
  2390. end
  2391. elseif automatic == true and burst == false then
  2392. if switchToSingle == true then
  2393. automatic = false
  2394. local m = Instance.new("Message", Player)
  2395. m.Text = "Single"
  2396. pcall(function() Player.Character[Name].Handle.Switch:Play() end)
  2397. delay(2.5, function() m:Remove() end)
  2398. elseif switchToBurst == true then
  2399. automatic = false
  2400. burst = true
  2401. local m = Instance.new("Message", Player)
  2402. m.Text = "Burst"
  2403. pcall(function() Player.Character[Name].Handle.Switch:Play() end)
  2404. delay(2.5, function() m:Remove() end)
  2405. end
  2406. end
  2407. end
  2408. if key == "f" and Button1Down == false and canFire == true and Attachment == true then
  2409. if Mode == 1 and Mode ~= 0 then
  2410. Player.Character[Name].Handle.Switch:Play()
  2411. Player.Character[Name].Laser.Transparency = 1
  2412. Mode = 0
  2413. elseif Mode == 0 and Mode ~= 1 then
  2414. Player.Character[Name].Handle.Switch:Play()
  2415. Player.Character[Name].Laser.Transparency = 0.4
  2416. Mode = 1
  2417. end
  2418. end
  2419. if key == "c" and Button1Down == false and canFire == true then
  2420. if magazine.Value ~= 0 then
  2421. canFire = false
  2422. burstCount = 0
  2423. if magazine.Value ~= 0 then magazine.Value = magazine.Value - 1 end
  2424. updateGui()
  2425. playAnimation("charge")
  2426. canFire = true
  2427. end
  2428. end
  2429. if key == "x" and canFire == true then
  2430. canFire = false
  2431. playAnimation("ready")
  2432. if Ready == false then
  2433. Player.Character.Humanoid.WalkSpeed = AimSpeed
  2434. Ready = true
  2435. else
  2436. Player.Character.Humanoid.WalkSpeed = 16
  2437. Ready = false
  2438. end
  2439. canFire = true
  2440. end
  2441. end
  2442.  
  2443.  
  2444. function onSelected(mouse)
  2445. if selected == true then return end
  2446. selected = true
  2447. canFire = false
  2448. mouse.Icon = "http://www.roblox.com/asset/?id=66839997"
  2449. while Player.Character:FindFirstChild("WeaponActivated") ~= nil do
  2450. if Player.Character.WeaponActivated.Value == nil then break end
  2451. if Player.Character.WeaponActivated.Value.Parent == nil then break end
  2452. wait()
  2453. end
  2454. updateGui()
  2455. local weapon = Instance.new("ObjectValue")
  2456. weapon.Name = "WeaponActivated"
  2457. weapon.Value = script.Parent
  2458. weapon.Parent = Player.Character
  2459. DisableLimb(1, Player.Character)
  2460. DisableLimb(2, Player.Character)
  2461. ForceAngle(1, 0, Player.Character)
  2462. ForceAngle(2, 0, Player.Character)
  2463. if dual == true then
  2464. coroutine.resume(coroutine.create(function() playAnimation("leftEquip") end))
  2465. playAnimation("rightEquip")
  2466. removeParts("LeftHolster")
  2467. makeParts("LeftHand")
  2468. else
  2469. playAnimation("equip")
  2470. end
  2471. removeParts("RightHolster")
  2472. makeParts("RightHand")
  2473. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  2474. mouse.Button1Up:connect(function() onButton1Up(mouse) end)
  2475. mouse.KeyDown:connect(function(key) onKeyDown(key, mouse) end)
  2476. mouse.Icon = "http://www.roblox.com/asset/?id=66839997"
  2477. canFire = true
  2478. end
  2479.  
  2480.  
  2481. function onDeselected(mouse)
  2482. if selected == false then return end
  2483. Button1Down = false
  2484. while canFire == false do
  2485. wait()
  2486. end
  2487. selected = false
  2488. if dual == true then
  2489. if math.random(1, 2) == 1 then
  2490. coroutine.resume(coroutine.create(function() playAnimation("leftUnequip") end))
  2491. wait(math.random(1, 10) / 10)
  2492. playAnimation("rightUnequip")
  2493. else
  2494. coroutine.resume(coroutine.create(function() playAnimation("rightUnequip") end))
  2495. wait(math.random(1, 10) / 10)
  2496. playAnimation("leftUnequip")
  2497. end
  2498. removeParts("LeftHand")
  2499. makeParts("LeftHolster")
  2500. else
  2501. playAnimation("unequip")
  2502. end
  2503. removeParts("RightHand")
  2504. makeParts("RightHolster")
  2505. ForceAngle(1, 0, Player.Character)
  2506. ForceAngle(2, 0, Player.Character)
  2507. ResetLimbCFrame(1, Player.Character)
  2508. ResetLimbCFrame(2, Player.Character)
  2509. EnableLimb(1, Player.Character)
  2510. EnableLimb(2, Player.Character)
  2511. if Player.PlayerGui:FindFirstChild(Name) ~= nil then Player.PlayerGui[Name]:Remove() end
  2512. if Player.Character:FindFirstChild("WeaponActivated") ~= nil then
  2513. if Player.Character.WeaponActivated.Value == script.Parent then
  2514. Player.Character.WeaponActivated:Remove()
  2515. end
  2516. end
  2517. while Player.Character:FindFirstChild("WeaponActivated") ~= nil do
  2518. if Player.Character.WeaponActivated.Value == nil then break end
  2519. if Player.Character.WeaponActivated.Value.Parent == nil then break end
  2520. wait()
  2521. end
  2522. end
  2523.  
  2524.  
  2525. if script.Parent.className ~= "HopperBin" then
  2526. if Player == nil then print("Error: Player not found!") return end
  2527. Tool = Instance.new("HopperBin")
  2528. Tool.Name = Name
  2529. Tool.Parent = Player.Backpack
  2530. script.Name = "Main"
  2531. script.Parent = Tool
  2532. end wait() if script.Parent.className == "HopperBin" then
  2533. while script.Parent.Parent.className ~= "Backpack" do
  2534. wait()
  2535. end
  2536. if script.Parent:FindFirstChild("MagazineMax") == nil then
  2537. magazineMax = Instance.new("NumberValue")
  2538. magazineMax.Name = "MagazineMax"
  2539. magazineMax.Value = 10
  2540. magazineMax.Parent = script.Parent
  2541. else
  2542. magazineMax = script.Parent.MagazineMax
  2543. end
  2544. if script.Parent:FindFirstChild("Magazine") == nil then
  2545. magazine = Instance.new("NumberValue")
  2546. magazine.Name = "Magazine"
  2547. magazine.Value = 0
  2548. magazine.Parent = script.Parent
  2549. else
  2550. magazine = script.Parent.Magazine
  2551. end
  2552. if script.Parent:FindFirstChild("AmmoMax") == nil then
  2553. ammoMax = Instance.new("NumberValue")
  2554. ammoMax.Name = "AmmoMax"
  2555. ammoMax.Value = 110
  2556. ammoMax.Parent = script.Parent
  2557. else
  2558. ammoMax = script.Parent.AmmoMax
  2559. end
  2560. if script.Parent:FindFirstChild("Ammo") == nil then
  2561. ammo = Instance.new("NumberValue")
  2562. ammo.Name = "Ammo"
  2563. ammo.Value = script.Parent.AmmoMax.Value
  2564. ammo.Parent = script.Parent
  2565. else
  2566. ammo = script.Parent.Ammo
  2567. end
  2568. Player = script.Parent.Parent.Parent
  2569. makeParts("RightHolster")
  2570. script.Parent.Selected:connect(onSelected)
  2571. script.Parent.Deselected:connect(onDeselected)
  2572. end
  2573.  
  2574. --mediafire
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement