idkllal

Untitled

Mar 16th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.04 KB | None | 0 0
  1.  
  2.  
  3. Player = game.Players.LocalPlayer
  4. Character = Player.Character
  5. script.Parent = Character
  6.  
  7. --[[ * Fire Handle * ]]--
  8.  
  9. pcall(function() Character.Gun:Remove() end)
  10.  
  11. Gun = Instance.new("Model")
  12. Gun.Name = "Gun"
  13. Gun.Parent = Character
  14.  
  15. --[[ * Arm Weld * ]]--
  16.  
  17. ArmWeld = Instance.new("Weld")
  18. ArmWeld.Parent = Character["Torso"]
  19. ArmWeld.Part0 = ArmWeld.Parent
  20. ArmWeld.Part1 = Character["Right Arm"]
  21. ArmWeld.C0 = CFrame.new(1.5,0.5,-0.5) * CFrame.fromEulerAnglesXYZ(math.pi/2,0,0)
  22.  
  23. --[[ * Arm Weld * ]]--
  24.  
  25. ArmWeldR = Instance.new("Weld")
  26. ArmWeldR.Parent = Character["Torso"]
  27. ArmWeldR.Part0 = ArmWeldR.Parent
  28. ArmWeldR.Part1 = Character["Left Arm"]
  29. ArmWeldR.C0 = CFrame.new(-1.5,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  30.  
  31. --[[ * Neck Weld * ]]--
  32.  
  33. Neck = Instance.new("Weld")
  34. Neck.Parent = Character["Torso"]
  35. Neck.Part0 = Neck.Parent
  36. Neck.Part1 = Character["Head"]
  37. Neck.C0 = CFrame.new(0,1.5,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  38.  
  39. --[[ * Handle * ]]--
  40.  
  41. Handle = Instance.new("Part")
  42. Handle.formFactor = "Custom"
  43. Handle.Locked = true
  44. Handle.CanCollide = false
  45. Handle.BrickColor = BrickColor.new("Medium stone grey")
  46. Handle.Anchored = false
  47. Handle.Size = Vector3.new(0.25,0.7,0.25)
  48. Handle.TopSurface = 0
  49. Handle.BottomSurface = 0
  50. Handle.Parent = Gun
  51. MeshA = Instance.new("BlockMesh",Handle)
  52. WeldA = Instance.new("Weld")
  53. WeldA.Parent = Handle
  54. WeldA.Part0 = Character["Right Arm"]
  55. WeldA.Part1 = Handle
  56. WeldA.C0 = CFrame.new(0,-1.1,-0.2) * CFrame.Angles(-math.pi/2-0.1,0,0)
  57.  
  58. --[[ * Cartrage * ]]--
  59.  
  60. Cartrage = Instance.new("Part")
  61. Cartrage.formFactor = "Custom"
  62. Cartrage.Locked = true
  63. Cartrage.CanCollide = false
  64. Cartrage.BrickColor = BrickColor.new("Really black")
  65. Cartrage.Anchored = false
  66. Cartrage.Size = Vector3.new(0.2,0.5,0.2)
  67. Cartrage.TopSurface = 0
  68. Cartrage.BottomSurface = 0
  69. Cartrage.Parent = Gun
  70. MeshB = Instance.new("BlockMesh",Cartrage)
  71. WeldB = Instance.new("Weld")
  72. WeldB.Parent = Cartrage
  73. WeldB.Part0 = Handle
  74. WeldB.Part1 = Cartrage
  75. WeldB.C0 = CFrame.new(0,0,0) * CFrame.Angles(0,0,0)
  76.  
  77. --[[ * Trigger * ]]--
  78.  
  79. Trigger = Instance.new("Part")
  80. Trigger.formFactor = "Custom"
  81. Trigger.Locked = true
  82. Trigger.CanCollide = false
  83. Trigger.BrickColor = BrickColor.new("Really black")
  84. Trigger.Anchored = false
  85. Trigger.Size = Vector3.new(0.2,0.4,0.4)
  86. Trigger.TopSurface = 0
  87. Trigger.BottomSurface = 0
  88. Trigger.Parent = Gun
  89. MeshB = Instance.new("BlockMesh",Trigger)
  90. WeldB = Instance.new("Weld")
  91. WeldB.Parent = Trigger
  92. WeldB.Part0 = Handle
  93. WeldB.Part1 = Trigger
  94. WeldB.C0 = CFrame.new(0,0.21,-0.09) * CFrame.Angles(0,0,0)
  95.  
  96. --[[ * BWall * ]]--
  97.  
  98. BWall = Instance.new("Part")
  99. BWall.formFactor = "Custom"
  100. BWall.Locked = true
  101. BWall.CanCollide = false
  102. BWall.BrickColor = BrickColor.new("Medium stone grey")
  103. BWall.Anchored = false
  104. BWall.Size = Vector3.new(0.25,0.6,0.25)
  105. BWall.TopSurface = 0
  106. BWall.BottomSurface = 0
  107. BWall.Parent = Gun
  108. MeshB = Instance.new("BlockMesh",BWall)
  109. WeldB = Instance.new("Weld")
  110. WeldB.Parent = BWall
  111. WeldB.Part0 = Handle
  112. WeldB.Part1 = BWall
  113. WeldB.C0 = CFrame.new(0,0.3,-0.3) * CFrame.Angles(math.pi/2+0.1,0,0)
  114.  
  115. --[[ * CWall * ]]--
  116.  
  117. CWall = Instance.new("Part")
  118. CWall.formFactor = "Custom"
  119. CWall.Locked = true
  120. CWall.CanCollide = false
  121. CWall.BrickColor = BrickColor.new("Really black")
  122. CWall.Anchored = false
  123. CWall.Size = Vector3.new(0.3,0.6,0.2)
  124. CWall.TopSurface = 0
  125. CWall.BottomSurface = 0
  126. CWall.Parent = Gun
  127. MeshB = Instance.new("BlockMesh",CWall)
  128. WeldB = Instance.new("Weld")
  129. WeldB.Parent = CWall
  130. WeldB.Part0 = Handle
  131. WeldB.Part1 = CWall
  132. WeldB.C0 = CFrame.new(0,0.4,-0.3) * CFrame.Angles(math.pi/2+0.1,0,0)
  133.  
  134. --[[ * ButA * ]]--
  135.  
  136. ButA = Instance.new("Part")
  137. ButA.formFactor = "Custom"
  138. ButA.Locked = true
  139. ButA.CanCollide = false
  140. ButA.BrickColor = BrickColor.new("Really black")
  141. ButA.Anchored = false
  142. ButA.Size = Vector3.new(0.3,0.6,0.3)
  143. ButA.TopSurface = 0
  144. ButA.BottomSurface = 0
  145. ButA.Parent = Gun
  146. MeshB = Instance.new("CylinderMesh",ButA)
  147. WeldB = Instance.new("Weld")
  148. WeldB.Parent = ButA
  149. WeldB.Part0 = Handle
  150. WeldB.Part1 = ButA
  151. WeldB.C0 = CFrame.new(0.1,0.4,-0.3) * CFrame.Angles(math.pi/2+0.1,0,0)
  152.  
  153. --[[ * ButB * ]]--
  154.  
  155. ButB = Instance.new("Part")
  156. ButB.formFactor = "Custom"
  157. ButB.Locked = true
  158. ButB.CanCollide = false
  159. ButB.BrickColor = BrickColor.new("Really black")
  160. ButB.Anchored = false
  161. ButB.Size = Vector3.new(0.3,0.6,0.3)
  162. ButB.TopSurface = 0
  163. ButB.BottomSurface = 0
  164. ButB.Parent = Gun
  165. MeshB = Instance.new("CylinderMesh",ButB)
  166. WeldB = Instance.new("Weld")
  167. WeldB.Parent = ButB
  168. WeldB.Part0 = Handle
  169. WeldB.Part1 = ButB
  170. WeldB.C0 = CFrame.new(-0.1,0.4,-0.3) * CFrame.Angles(math.pi/2+0.1,0,0)
  171.  
  172. --[[ * Hinge * ]]--
  173.  
  174. Hinge = Instance.new("Part")
  175. Hinge.formFactor = "Custom"
  176. Hinge.Locked = true
  177. Hinge.CanCollide = false
  178. Hinge.BrickColor = BrickColor.new("Medium stone grey")
  179. Hinge.Anchored = false
  180. Hinge.Size = Vector3.new(0.2,0.25,0.2)
  181. Hinge.TopSurface = 0
  182. Hinge.BottomSurface = 0
  183. Hinge.Parent = Gun
  184. MeshB = Instance.new("CylinderMesh",Hinge)
  185. WeldQ = Instance.new("Weld")
  186. WeldQ.Parent = Hinge
  187. WeldQ.Part0 = Handle
  188. WeldQ.Part1 = Hinge
  189. WeldQ.C0 = CFrame.new(0,0.3,-0.6) * CFrame.Angles(math.pi/2+0.1,0,math.pi/2)
  190.  
  191. --[[ * HingeP * ]]--
  192.  
  193. HingeP = Instance.new("Part")
  194. HingeP.formFactor = "Custom"
  195. HingeP.Locked = true
  196. HingeP.CanCollide = false
  197. HingeP.BrickColor = BrickColor.new("Medium stone grey")
  198. HingeP.Anchored = false
  199. HingeP.Size = Vector3.new(0.2,0.5,0.2)
  200. HingeP.TopSurface = 0
  201. HingeP.BottomSurface = 0
  202. HingeP.Parent = Gun
  203. MeshB = Instance.new("CylinderMesh",HingeP)
  204. WeldB = Instance.new("Weld")
  205. WeldB.Parent = HingeP
  206. WeldB.Part0 = Hinge
  207. WeldB.Part1 = HingeP
  208. WeldB.C0 = CFrame.new(-0.25,0,0) * CFrame.Angles(0,0,math.pi/2)
  209.  
  210. --[[ * BarrelA * ]]--
  211.  
  212. BarrelA = Instance.new("Part")
  213. BarrelA.formFactor = "Custom"
  214. BarrelA.Locked = true
  215. BarrelA.CanCollide = false
  216. BarrelA.BrickColor = BrickColor.new("Really black")
  217. BarrelA.Anchored = false
  218. BarrelA.Size = Vector3.new(0.3,1.5,0.3)
  219. BarrelA.TopSurface = 0
  220. BarrelA.BottomSurface = 0
  221. BarrelA.Parent = Gun
  222. MeshB = Instance.new("CylinderMesh",BarrelA)
  223. WeldB = Instance.new("Weld")
  224. WeldB.Parent = BarrelA
  225. WeldB.Part0 = Hinge
  226. WeldB.Part1 = BarrelA
  227. WeldB.C0 = CFrame.new(-0.75,0.1,-0.125) * CFrame.Angles(0,0,math.pi/2)
  228.  
  229. --[[ * BarrelB * ]]--
  230.  
  231. BarrelB = Instance.new("Part")
  232. BarrelB.formFactor = "Custom"
  233. BarrelB.Locked = true
  234. BarrelB.CanCollide = false
  235. BarrelB.BrickColor = BrickColor.new("Really black")
  236. BarrelB.Anchored = false
  237. BarrelB.Size = Vector3.new(0.3,1.5,0.3)
  238. BarrelB.TopSurface = 0
  239. BarrelB.BottomSurface = 0
  240. BarrelB.Parent = Gun
  241. MeshB = Instance.new("CylinderMesh",BarrelB)
  242. WeldB = Instance.new("Weld")
  243. WeldB.Parent = BarrelB
  244. WeldB.Part0 = Hinge
  245. WeldB.Part1 = BarrelB
  246. WeldB.C0 = CFrame.new(-0.75,-0.1,-0.125) * CFrame.Angles(0,0,math.pi/2)
  247.  
  248. --[[ * Variables * ]]--
  249.  
  250. Head = false
  251. Ammo = 2
  252. Arms = false
  253. Hopper = Instance.new("HopperBin")
  254.  
  255. function TName()
  256. Hopper.Name = "Gun: "..Ammo
  257. end
  258.  
  259. --[[ * Animation * ]]--
  260.  
  261. function ArmsOn()
  262. for i = 1,10 do wait()
  263. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/10/2,-math.pi/11/2/2,math.pi/10/2/2)
  264. ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0.1,0.05,-0.05)
  265. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(0,0,-math.pi/10/2/2/2)
  266. ArmWeld.C0 = ArmWeld.C0 + Vector3.new(-0.05,0,0.09)
  267. end
  268. end
  269.  
  270. function ArmsOff()
  271. for i = 1,10 do wait()
  272. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0.1,0.05,-0.05)
  273. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/10/2,math.pi/11/2/2,-math.pi/10/2/2)
  274. ArmWeld.C0 = ArmWeld.C0 - Vector3.new(-0.05,0,0.09)
  275. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(0,0,math.pi/10/2/2/2)
  276. end
  277. for i = 1,3 do wait()
  278. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(0,0,0.05)
  279. end
  280. ArmWeldR.C0 = CFrame.new(-1.5,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  281. end
  282.  
  283. function SuicideYes()
  284. for i = 1,10 do wait()
  285. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(0,0,math.pi/10/2/2)
  286. WeldA.C0 = WeldA.C0 * CFrame.Angles(0,math.pi/11,0)
  287. end
  288. end
  289.  
  290. function SuicideNo()
  291. for i = 1,10 do wait()
  292. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(0,0,-math.pi/10/2/2)
  293. WeldA.C0 = WeldA.C0 * CFrame.Angles(0,-math.pi/11,0)
  294. end
  295. end
  296.  
  297. function Reload()
  298. if Ammo == 0 then
  299. if Head == true then SuicideNo() end
  300. NewSoundI("http://www.roblox.com/Asset/?id=2761842",10,1,Handle,1.2)
  301. if Arms == false then
  302. for i = 1,10 do wait()
  303. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/10/2,-math.pi/11/2/2,math.pi/10/2/2)
  304. ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0.1,0.05,-0.05)
  305. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(0,0,-math.pi/10/2/2/2)
  306. ArmWeld.C0 = ArmWeld.C0 + Vector3.new(-0.05,0,0.09)
  307. end
  308. end
  309. for i = 1,10 do wait()
  310. WeldQ.C0 = WeldQ.C0 * CFrame.Angles(0,math.pi/10/2/2,0)
  311. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/10/2/2/2,0,0)
  312. end
  313. for i = 1,10 do wait()
  314. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/10/2/2/2,0,0)
  315. end
  316. for i = 1,9 do wait()
  317. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0.1,0.05,-0.05)
  318. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/10/2,math.pi/11/2/2,-math.pi/10/2/2)
  319. end
  320. for i = 1,3 do wait()
  321. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(-0.1,0.05,-0.05)
  322. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/10/2,math.pi/11/2/2,math.pi/10/2/2)
  323. end
  324. for i = 1,3 do wait()
  325. ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(-0.1,0.05,-0.05)
  326. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/10/2,-math.pi/11/2/2,-math.pi/10/2/2)
  327. end
  328. for i = 1,9 do wait()
  329. ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0.1,0.05,-0.05)
  330. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/10/2,-math.pi/11/2/2,math.pi/10/2/2)
  331. end
  332. for i = 1,5 do wait()
  333. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/4/2/2/2,0,0)
  334. end
  335. Ammo = 1
  336. TName()
  337. NewSound("http://www.roblox.com/Asset/?id=13510352",2,10,Handle)
  338. for i = 1,5 do wait()
  339. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/4/2/2/2,0,0)
  340. end
  341. NewSound("http://www.roblox.com/Asset/?id=13510352",2,10,Handle)
  342. for i = 1,9 do wait()
  343. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0.1,0.05,-0.05)
  344. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/10/2,math.pi/11/2/2,-math.pi/10/2/2)
  345. end
  346. for i = 1,3 do wait()
  347. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(-0.1,0.05,-0.05)
  348. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/10/2,math.pi/11/2/2,math.pi/10/2/2)
  349. end
  350. for i = 1,3 do wait()
  351. ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(-0.1,0.05,-0.05)
  352. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/10/2,-math.pi/11/2/2,-math.pi/10/2/2)
  353. end
  354. for i = 1,9 do wait()
  355. ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0.1,0.05,-0.05)
  356. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/10/2,-math.pi/11/2/2,math.pi/10/2/2)
  357. end
  358. for i = 1,5 do wait()
  359. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/4/2/2/2,0,0)
  360. end
  361. Ammo = 2
  362. TName()
  363. NewSound("http://www.roblox.com/Asset/?id=13510352",2,10,Handle)
  364. for i = 1,5 do wait()
  365. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/4/2/2/2,0,0)
  366. end
  367. NewSound("http://www.roblox.com/Asset/?id=13510352",2,10,Handle)
  368. for i = 1,10 do wait()
  369. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/10/2,math.pi/11/2/2,-math.pi/10/2/2)
  370. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0.1,0.05,-0.05)
  371. end
  372. for i = 1,10 do wait()
  373. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(0,0,0.05)
  374. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(0,0,math.pi/10/2/2/2)
  375. ArmWeld.C0 = ArmWeld.C0 - Vector3.new(-0.05,0,0.09)
  376. end
  377. ArmWeldR.C0 = CFrame.new(-1.5,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  378. NewSound("http://www.roblox.com/Asset/?id=10209881",10,0.9,Handle)
  379. for i = 1,5 do wait()
  380. WeldQ.C0 = WeldQ.C0 * CFrame.Angles(0,-math.pi/5/2/2,0)
  381. ArmWeld.C0 = ArmWeld.C0 * CFrame.new(0,0,-0.1) * CFrame.Angles(math.pi/5/2/2,0,0)
  382. end
  383. for i = 1,10 do wait()
  384. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(-math.pi/10/2/2,0,0) * CFrame.new(0,0,0.05)
  385. end
  386. ArmWeld.C0 = CFrame.new(1.5,0.5,-0.5) * CFrame.fromEulerAnglesXYZ(math.pi/2,0,0)
  387. Ammo = 2
  388. TName()
  389. if Head == true then SuicideYes() end
  390. if Arms == true then ArmsOn() end
  391. elseif Ammo ~= 0 then
  392. if Arms == false then ArmsOn() end
  393. wait(0.1)
  394. NewSound("http://www.roblox.com/Asset/?id=10209881",10,1,Handle)
  395. for i = 1,10 do wait()
  396. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0,0,0.1)
  397. end
  398. --Ammo = Ammo - 1
  399. TName()
  400. for i = 1,10 do wait()
  401. ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0,0,0.1)
  402. end
  403. if Arms == false then ArmsOff() end
  404. end
  405. end
  406.  
  407. function Shoot()
  408. NewSound("http://www.roblox.com/Asset/?id=2691586",10,1,Handle)
  409. if Arms == false then
  410. for i = 1,5 do wait()
  411. ArmWeld.C0 = ArmWeld.C0 * CFrame.new(0,0,-0.1) * CFrame.Angles(math.pi/5/2/2,0,0)
  412. WeldA.C0 = WeldA.C0 * CFrame.Angles(0.2,0,0)
  413. end
  414. for i = 1,10 do wait()
  415. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(-math.pi/10/2/2,0,0) * CFrame.new(0,0,0.05)
  416. WeldA.C0 = WeldA.C0 * CFrame.Angles(-0.1,0,0)
  417. end
  418. if Arms == false then ArmsOn() end
  419. wait(0.05)
  420. NewSound("http://www.roblox.com/Asset/?id=10209881",10,1,Handle)
  421. for i = 1,5 do wait()
  422. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0,0,0.2)
  423. end
  424. Ammo = Ammo - 1 TName()
  425. wait(0.1)
  426. for i = 1,5 do wait()
  427. ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0,0,0.2)
  428. end
  429. if Arms == false then ArmsOff() end
  430. elseif Arms == true then
  431. for i = 1,5 do wait()
  432. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/4/2/2/2,0,0)
  433. ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0,0.2,0)
  434. ArmWeld.C0 = ArmWeld.C0 * CFrame.new(0,0,-0.1) * CFrame.Angles(math.pi/5/2/2,0,0)
  435. WeldA.C0 = WeldA.C0 * CFrame.Angles(0.2,0,0)
  436. end
  437. for i = 1,10 do wait()
  438. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/8/2/2/2,0,0)
  439. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0,0.1,0)
  440. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(-math.pi/10/2/2,0,0) * CFrame.new(0,0,0.05)
  441. WeldA.C0 = WeldA.C0 * CFrame.Angles(-0.1,0,0)
  442. end
  443. NewSound("http://www.roblox.com/Asset/?id=10209881",10,1,Handle)
  444. for i = 1,5 do wait()
  445. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0,0,0.2)
  446. end
  447. Ammo = Ammo - 1 TName()
  448. wait(0.1)
  449. for i = 1,5 do wait()
  450. ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0,0,0.2)
  451. end
  452. end
  453. end
  454.  
  455. --[[ * Sound * ]]--
  456.  
  457. function NewSound(ID,V,P,N)
  458. coroutine.resume(coroutine.create(function()
  459. local SoundD = Instance.new("Sound")
  460. SoundD.SoundId = ID
  461. SoundD.Volume = V
  462. SoundD.Pitch = P
  463. SoundD.Parent = N
  464. SoundD:Play()
  465. while SoundD.IsPlaying do wait() end
  466. SoundD:Remove()
  467. end))
  468. end
  469.  
  470. function NewSoundI(ID,V,P,N,I)
  471. coroutine.resume(coroutine.create(function()
  472. local SoundD = Instance.new("Sound")
  473. SoundD.SoundId = ID
  474. SoundD.Volume = V
  475. SoundD.Pitch = P
  476. SoundD.Parent = N
  477. SoundD:Play()
  478. wait(I)
  479. SoundD:Stop()
  480. wait()
  481. SoundD:Remove()
  482. end))
  483. end
  484.  
  485. --[[ * Tool * ]]--
  486.  
  487. if script.Parent.Name == Player.Name then
  488. Hopper = Instance.new("HopperBin")
  489. Hopper.Name = "Gun"
  490. Hopper.Parent = Player.Backpack
  491. end
  492.  
  493. Blah = true
  494. ABC = BarrelA.CFrame
  495.  
  496. function Clicked(Mouse)
  497. if Blah == true then
  498. Blah = false
  499. if Ammo == 0 then
  500. Reload()
  501. else
  502. if Head == true then Character.Head:BreakJoints() return end
  503. coroutine.resume(coroutine.create(function()
  504. Mouse.Target:BreakJoints()
  505. end))
  506. Shoot()
  507. end
  508. Blah = true
  509. return
  510. end
  511. end
  512.  
  513. function onKeyDown(key)
  514. if Blah == true then
  515. Blah = false
  516.  
  517. if key == "p" then
  518. NewSound("",10,0.5,Handle)
  519. end
  520.  
  521. if key == "0" or key == "/" then
  522. if not Head then
  523. if Arms == false then
  524. ArmsOn()
  525. Arms = true
  526. elseif Arms == true then
  527. ArmsOff()
  528. Arms = false
  529. end
  530. end
  531. end
  532.  
  533. if key == "" then
  534. if not Head then
  535. if Arms then ArmsOff() Arms = false end
  536. SuicideYes()
  537. Head = true
  538. elseif Head then
  539. SuicideNo()
  540. if Arms then ArmsOn() end
  541. Head = false
  542. end
  543. end
  544.  
  545. if key == "r" then
  546. Reload()
  547. end
  548.  
  549. Blah = true
  550. return
  551. end
  552. end
  553.  
  554. function Selected(Mouse)
  555. Mouse.Icon = "rbxasset://textures\\GunCursor.png"
  556. Mouse.KeyDown:connect(onKeyDown)
  557. Mouse.Button1Down:connect(function()Clicked(Mouse)end)
  558. TName()
  559. if Blah then
  560. Blah = false
  561. if not Arms then
  562. ArmsOn()
  563. Arms = true
  564. end
  565. Blah = true
  566. end
  567. end
  568.  
  569. function Deselected(Mouse)
  570. if Blah then
  571. Blah = false
  572. if Arms then
  573. ArmsOff()
  574. Arms = false
  575. end
  576. Blah = true
  577. end
  578. end
  579.  
  580. function Dead()
  581. for i,v in pairs(Character:GetChildren()) do
  582. pcall(function() v.Anchored = true end)
  583. if v.Name == "Head" then v.Anchored = false v.Velocity = Vector3.new(10,0,10) end
  584. for i,a in pairs(v:GetChildren()) do pcall(function() a.Anchored = true end) end
  585. end
  586. end
  587.  
  588. Character.Humanoid.Died:connect(Dead)
  589. Hopper.Selected:connect(Selected)
  590. Hopper.Deselected:connect(Deselected)
Add Comment
Please, Sign In to add comment