datderpdoe2

lol shru shru shrub

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