Roblox_Xploits

Acid gun

Aug 25th, 2016
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 85.19 KB | None | 0 0
  1. Player = game:GetService("Players").LocalPlayer -- grg instead of putting your name u can just put LocalPlayer in it
  2. Character = Player.Character
  3. PlayerGui = Player.PlayerGui
  4. Backpack = Player.Backpack
  5. Torso = Character.Torso
  6. Head = Character.Head
  7. LeftArm = Character["Left Arm"]
  8. LeftLeg = Character["Left Leg"]
  9. RightArm = Character["Right Arm"]
  10. RightLeg = Character["Right Leg"]
  11. LS = Torso["Left Shoulder"]
  12. LH = Torso["Left Hip"]
  13. RS = Torso["Right Shoulder"]
  14. RH = Torso["Right Hip"]
  15. ModelName = "Weapon"
  16. attack = false
  17. attacktype = 1
  18. Hitdeb = 0
  19. Neck = Torso.Neck
  20. local neckcf0 = Neck.C0
  21. ----------------------------
  22. --Customize
  23. Ammo = 200
  24. MaxAmmo = 200
  25. mindamage = 10
  26. maxdamage = 30
  27. crtmaxdamage = 50
  28. reloadspeed=5
  29. attackspeed=5
  30. GunzerkDuration=1000
  31. twobullets=false
  32. omindamage = mindamage
  33. omaxdamage = maxdamage
  34. ocrtmaxdamage = crtmaxdamage
  35. crtrate = 100/5
  36. --100%/critpercentage
  37. oblkbrkr = 1
  38. blockbreaker = oblkbrkr
  39. spread = 1
  40. spread = spread*100
  41. Ammoregen = 5
  42. range = 400
  43. rangepower = 50
  44. CurrentAmmo = "Normal"
  45. attackdebounce = false
  46. poisoncounter=0
  47. Gunzerkering=false
  48. firingdebounce1=false
  49. firingdebounce2=false
  50. handlecolor = BrickColor.new("Navy blue")
  51. bcolor = BrickColor.new("White")
  52. gemcolor = BrickColor.new("Black")
  53. ammotrail = BrickColor.new("White")
  54. ToolName = "Ras Algethi"
  55. ---------------------------------------------------------------------------------------------------------------------------------------
  56. if Character:findFirstChild("EquippedVal",true) ~= nil then
  57. Character:findFirstChild("EquippedVal",true).Parent = nil
  58. end
  59. ev = Instance.new("BoolValue",Character)
  60. ev.Name = "EquippedVal"
  61. ev.Value = false
  62. if Character:findFirstChild("Block",true) ~= nil then
  63. Character:findFirstChild("Block",true).Parent = nil
  64. end
  65. --player
  66. player = nil
  67. --welds
  68. RW, LW , RWL, LWL = Instance.new("Weld"), Instance.new("Weld"), Instance.new("Weld"), Instance.new("Weld")
  69. --what anim
  70. anim = "none"
  71. --other var
  72. player = Player
  73. ch = Character
  74. --save shoulders
  75. AoETrue = {}
  76. RSH, LSH , RHL, LHL = ch.Torso["Right Shoulder"], ch.Torso["Left Shoulder"] , ch.Torso["Right Hip"] , ch.Torso["Left Hip"]
  77. function RWFunc()
  78. RW.Part1 = ch["Right Arm"]
  79. RSH.Part1 = nil
  80. end
  81. function LWFunc()
  82. LW.Part1 = ch["Left Arm"]
  83. LSH.Part1 = nil
  84. end
  85. function RWLFunc()
  86. RWL.Part1 = ch["Right Leg"]
  87. RHL.Part1 = nil
  88. ch["Right Leg"].Name = "RightLeg"
  89. RightLeg.CanCollide = false
  90. end
  91. function LWLFunc()
  92. LWL.Part1 = ch["Left Leg"]
  93. LHL.Part1 = nil
  94. ch["Left Leg"].Name = "LeftLeg"
  95. LeftLeg.CanCollide = true
  96. end
  97. function RWLRem()
  98. RightLeg.Name = "Right Leg"
  99. RWL.Part1 = nil
  100. RHL.Part1 = ch["Right Leg"]
  101. RightLeg.CanCollide = false
  102. end
  103. function LWLRem()
  104. LeftLeg.Name = "Left Leg"
  105. LWL.Part1 = nil
  106. LHL.Part1 = ch["Left Leg"]
  107. LeftLeg.CanCollide = false
  108. end
  109. function RWRem()
  110. RW.Part1 = nil
  111. RSH.Part1 = ch["Right Arm"]
  112. end
  113. function LWRem()
  114. LW.Part1 = nil
  115. LSH.Part1 = ch["Left Arm"]
  116. end
  117. if Character:findFirstChild(ModelName,true) ~= nil then
  118. Character:findFirstChild(ModelName,true).Parent = nil
  119. RHL.Part1 = ch["Right Leg"]
  120. LHL.Part1 = ch["Left Leg"]
  121. RSH.Part1 = ch["Right Arm"]
  122. LSH.Part1 = ch["Left Arm"]
  123. end
  124. local swordholder = Instance.new("Model",Character)
  125. swordholder.Name = ModelName
  126. --derp
  127. RW.Part0 = ch.Torso
  128. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  129. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  130. RW.Parent = swordholder
  131. --
  132. LW.Part0 = ch.Torso
  133. LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  134. LW.C1 = CFrame.new(0, 0.5, 0)
  135. LW.Parent = swordholder
  136. --
  137. RWL.Part0 = ch.Torso
  138. RWL.C0 = CFrame.new(1, -1, 0) * CFrame.Angles(0, 0, 0)
  139. RWL.C1 = CFrame.new(0.5, 1, 0)
  140. RWL.Parent = swordholder
  141. --
  142. LWL.Part0 = ch.Torso
  143. LWL.C0 = CFrame.new(-1, -1, 0) * CFrame.Angles(0, 0, 0)
  144. LWL.C1 = CFrame.new(-0.5, 1, 0)
  145. LWL.Parent = swordholder
  146. local msh1 = Instance.new("CylinderMesh")
  147. msh1.Scale = Vector3.new(1,1,1)
  148. local msh2 = Instance.new("BlockMesh")
  149. msh2.Scale = Vector3.new(1,1,1)
  150. local msh3 = Instance.new("CylinderMesh")
  151. msh3.Scale = Vector3.new(1,1,1)
  152. local msh4 = Instance.new("CylinderMesh")
  153. msh4.Scale = Vector3.new(1,1,1)
  154. local msh5 = Instance.new("CylinderMesh")
  155. msh5.Scale = Vector3.new(1,1,1)
  156. local msh6 = Instance.new("BlockMesh")
  157. msh6.Scale = Vector3.new(1,1,1)
  158. local torsc = false
  159. for i,z in pairs(Character:GetChildren()) do
  160. if z.className == "CharacterMesh" then
  161. if z.BodyPart == Enum.BodyPart.Torso then
  162. torsc = true
  163. end
  164. end
  165. end
  166. if torsc then
  167. msh7 = Instance.new("SpecialMesh")
  168. msh7.MeshId = "http://www.roblox.com/asset/?id=3270017"
  169. msh7.Scale = Vector3.new(2.01,1,1.01)
  170. else
  171. msh7 = Instance.new("BlockMesh")
  172. msh7.Scale = Vector3.new(2.01,0.1,1.01)
  173. end
  174. local msh8 = Instance.new("SpecialMesh")
  175. msh8.MeshId = "http://www.roblox.com/asset/?id=3270017"
  176. msh8.Scale = Vector3.new(0.5,0.5,7)
  177. local msh9 = Instance.new("BlockMesh")
  178. msh9.Scale = Vector3.new(1,1,1)
  179. local prt1 = Instance.new("Part",Character)
  180. prt1.Material = "SmoothPlastic"
  181. prt1.formFactor = 3
  182. prt1.CanCollide = true
  183. prt1.Name = "Handle"
  184. prt1.Locked = true
  185. prt1.Size = Vector3.new(0.3,1,0.3)
  186. prt1.Parent = swordholder
  187. msh1.Parent = prt1
  188. prt1.BrickColor = handlecolor
  189. local prt2 = Instance.new("Part",Character)
  190. prt2.Material = "SmoothPlastic"
  191. prt2.formFactor = 3
  192. prt2.CanCollide = true
  193. prt2.Name = "Handle2"
  194. prt2.Locked = true
  195. prt2.Size = Vector3.new(0.5,0.2,1.5)
  196. prt2.Parent = swordholder
  197. msh2.Parent = prt2
  198. prt2.BrickColor = handlecolor
  199. local prt3 = Instance.new("Part",Character)
  200. prt3.Material = "SmoothPlastic"
  201. prt3.formFactor = 3
  202. prt3.CanCollide = false
  203. prt3.Name = "Handle3"
  204. prt3.Locked = true
  205. prt3.Size = Vector3.new(0.7,1.2,0.7)
  206. prt3.Parent = swordholder
  207. msh3.Parent = prt3
  208. prt3.BrickColor = bcolor
  209. local prt4 = Instance.new("Part",Character)
  210. prt4.Material = "SmoothPlastic"
  211. prt4.formFactor = 3
  212. prt4.CanCollide = true
  213. prt4.Name = "BackBarrel"
  214. prt4.Locked = true
  215. prt4.Size = Vector3.new(0.5,1.2,0.5)
  216. prt4.Parent = swordholder
  217. msh4.Parent = prt4
  218. prt4.BrickColor = handlecolor
  219. local prt5 = Instance.new("Part",Character)
  220. prt5.Material = "SmoothPlastic"
  221. prt5.formFactor = 3
  222. prt5.CanCollide = true
  223. prt5.Name = "Barrel"
  224. prt5.Locked = true
  225. prt5.Size = Vector3.new(0.4,2.5,0.4)
  226. prt5.Parent = swordholder
  227. msh5.Parent = prt5
  228. prt5.BrickColor = handlecolor
  229. local prt6 = Instance.new("Part",Character)
  230. prt6.Material = "SmoothPlastic"
  231. prt6.formFactor = 3
  232. prt6.CanCollide = false
  233. prt6.Name = "BarrelHandle"
  234. prt6.Locked = true
  235. prt6.Size = Vector3.new(0.3,1,0.3)
  236. prt6.Parent = swordholder
  237. msh6.Parent = prt6
  238. prt6.BrickColor = handlecolor
  239. local prt7 = Instance.new("Part",Character)
  240. prt7.Material = "SmoothPlastic"
  241. prt7.formFactor = 3
  242. prt7.CanCollide = false
  243. prt7.Name = "HolsterStrap"
  244. prt7.Locked = true
  245. prt7.Size = Vector3.new(1,1,1)
  246. prt7.Parent = swordholder
  247. msh7.Parent = prt7
  248. prt7.BrickColor = handlecolor
  249. local prt8 = Instance.new("Part",Character)
  250. prt8.Material = "SmoothPlastic"
  251. prt8.formFactor = 3
  252. prt8.CanCollide = false
  253. prt8.Name = "Holster"
  254. prt8.Locked = true
  255. prt8.Size = Vector3.new(1,1,1)
  256. prt8.Parent = swordholder
  257. msh8.Parent = prt8
  258. prt8.BrickColor = handlecolor
  259. local prt9 = Instance.new("Part",Character)
  260. prt9.Material = "SmoothPlastic"
  261. prt9.formFactor = 3
  262. prt9.CanCollide = false
  263. prt9.Name = "AmmoHolster"
  264. prt9.Locked = true
  265. prt9.Size = Vector3.new(0.2,1,0.7)
  266. prt9.Parent = swordholder
  267. msh9.Parent = prt9
  268. prt9.BrickColor = handlecolor
  269. local w1 = Instance.new("Weld")
  270. w1.Parent = prt1
  271. w1.Part0 = prt1
  272. w1.Name = "Weld1"
  273. local w2 = Instance.new("Weld")
  274. w2.Parent = prt2
  275. w2.Part0 = prt2
  276. w2.Part1 = prt1
  277. w2.Name = "Weld2"
  278. w2.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  279. w2.C0 = CFrame.Angles(math.rad(0), 0, 0) * CFrame.new(0, 0.6,0.5)
  280. local w3 = Instance.new("Weld")
  281. w3.Parent = prt3
  282. w3.Part0 = prt3
  283. w3.Part1 = prt2
  284. w3.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  285. w3.C0 = CFrame.Angles(math.rad(90+45), 0, 0) * CFrame.new(0, 0.25,-0.5)
  286. local w4 = Instance.new("Weld")
  287. w4.Parent = prt4
  288. w4.Part0 = prt4
  289. w4.Part1 = prt2
  290. w4.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  291. w4.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,0.5)
  292. local w5 = Instance.new("Weld")
  293. w5.Parent = prt5
  294. w5.Part0 = prt5
  295. w5.Part1 = prt3
  296. w5.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  297. w5.C0 = CFrame.Angles(math.rad(0), 0, 0) * CFrame.new(0, 1.5,0)
  298. local w6 = Instance.new("Weld")
  299. w6.Parent = prt6
  300. w6.Part0 = prt6
  301. w6.Part1 = prt3
  302. w6.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  303. w6.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 1.5,-0.5)
  304. local w7 = Instance.new("Weld")
  305. w7.Parent = prt7
  306. w7.Part0 = prt7
  307. w7.Part1 = Torso
  308. w7.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  309. if torsc then
  310. w7.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 1,0)
  311. else
  312. w7.C0 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1,0)
  313. end
  314. local w8 = Instance.new("Weld")
  315. w8.Parent = prt8
  316. w8.Part0 = prt8
  317. w8.Part1 = Torso
  318. w8.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  319. w8.C0 = CFrame.Angles(math.rad(45), 0, 0) * CFrame.new(-1.1, 1-0.25,0)
  320. local w9 = Instance.new("Weld")
  321. w9.Parent = prt9
  322. w9.Part0 = prt9
  323. w9.Part1 = Torso
  324. w9.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  325. w9.C0 = CFrame.Angles(math.rad(45), 0, 0) * CFrame.new(1, 0.75,-0.5)
  326. newgun=swordholder:Clone()
  327. newgun.Name="WeaponClone"
  328. newprt1=newgun.Handle
  329. newprt2=newgun.Handle2
  330. newprt3=newgun.Handle3
  331. newprt4=newgun.BackBarrel
  332. newprt5=newgun.Barrel
  333. newprt6=newgun.BarrelHandle
  334. newgun.HolsterStrap:Remove()
  335. newgun.Holster:Remove()
  336. newgun.AmmoHolster:Remove()
  337. newgun:BreakJoints()
  338. local neww1 = Instance.new("Weld")
  339. neww1.Parent = newprt1
  340. neww1.Part0 = newprt1
  341. local neww2 = Instance.new("Weld")
  342. neww2.Parent = newprt2
  343. neww2.Part0 = newprt2
  344. neww2.Part1 = newprt1
  345. neww2.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  346. neww2.C0 = CFrame.Angles(math.rad(0), 0, 0) * CFrame.new(0, 0.6,0.5)
  347. local neww3 = Instance.new("Weld")
  348. neww3.Parent = newprt3
  349. neww3.Part0 = newprt3
  350. neww3.Part1 = newprt2
  351. neww3.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  352. neww3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  353. local neww4 = Instance.new("Weld")
  354. neww4.Parent = newprt4
  355. neww4.Part0 = newprt4
  356. neww4.Part1 = newprt2
  357. neww4.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  358. neww4.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,0.5)
  359. local neww5 = Instance.new("Weld")
  360. neww5.Parent = newprt5
  361. neww5.Part0 = newprt5
  362. neww5.Part1 = newprt3
  363. neww5.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  364. neww5.C0 = CFrame.Angles(math.rad(0), 0, 0) * CFrame.new(0, 1.5,0)
  365. local neww6 = Instance.new("Weld")
  366. neww6.Parent = newprt6
  367. neww6.Part0 = newprt6
  368. neww6.Part1 = newprt3
  369. neww6.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  370. neww6.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 1.5,-0.5)
  371. local RAP = Instance.new("Part")
  372. RAP.formFactor = 0
  373. RAP.CanCollide = false
  374. RAP.Name = "RAPart"
  375. RAP.Locked = true
  376. RAP.Size = Vector3.new(1,1,1)
  377. RAP.Parent = swordholder
  378. RAP.Transparency = 1
  379. local w = Instance.new("Weld")
  380. w.Parent = RAP
  381. w.Part0 = RAP
  382. w.Part1 = RightArm
  383. w.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0,0)
  384. w.C0 = CFrame.fromEulerAnglesXYZ(math.rad(0), 0, 0) * CFrame.new(0, 1, 0)
  385. function unequipweld()
  386. w1.Part1 = Torso
  387. w1.C1 = CFrame.fromEulerAnglesXYZ(0, math.rad(0), math.rad(0)) * CFrame.new(0, 0,0)
  388. w1.C0 = CFrame.fromEulerAnglesXYZ(math.rad(180),math.rad(-0), math.rad(0)) * CFrame.new(-1.15, 1, -0.6)
  389. end
  390. unequipweld()
  391. function equipweld()
  392. w1.Part0 = prt1
  393. w1.Part1 = RAP
  394. w1.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0,0)
  395. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  396. end
  397. function ss(parent,p) --Slash
  398. local SlashSound = Instance.new("Sound")
  399. SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
  400. SlashSound.Parent = parent
  401. SlashSound.Volume = .7
  402. SlashSound.Pitch = p
  403. SlashSound.PlayOnRemove = true
  404. coroutine.resume(coroutine.create(function()
  405. wait()
  406. SlashSound.Parent = nil
  407. end))
  408. end
  409. function uss(parent,p) --unsheath
  410. local SlashSound = Instance.new("Sound")
  411. SlashSound.SoundId = "rbxasset://sounds\\unsheath.wav"
  412. SlashSound.Parent = parent
  413. SlashSound.Volume = .7
  414. SlashSound.Pitch = p
  415. SlashSound.PlayOnRemove = true
  416. coroutine.resume(coroutine.create(function()
  417. wait()
  418. SlashSound.Parent = nil
  419. end))
  420. end
  421. function cs(parent,p) --Magic Charge
  422. local SlashSound = Instance.new("Sound")
  423. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2101137"
  424. SlashSound.Parent = parent
  425. SlashSound.Volume = .7
  426. SlashSound.Pitch = p
  427. SlashSound.PlayOnRemove = true
  428. coroutine.resume(coroutine.create(function()
  429. wait()
  430. SlashSound.Parent = nil
  431. end))
  432. end
  433. function ls(parent,p) --Lazer Sound
  434. local SlashSound = Instance.new("Sound")
  435. SlashSound.SoundId = "http://www.roblox.com/asset?id=1369158"
  436. SlashSound.Parent = parent
  437. SlashSound.Volume = .7
  438. SlashSound.Pitch = p
  439. SlashSound.PlayOnRemove = true
  440. coroutine.resume(coroutine.create(function()
  441. wait()
  442. SlashSound.Parent = nil
  443. end))
  444. end
  445. function ts(parent,p)
  446. local SlashSound = Instance.new("Sound")
  447. SlashSound.SoundId = "http://www.roblox.com/asset/?id=12222030"
  448. SlashSound.Parent = parent
  449. SlashSound.Volume = .7
  450. SlashSound.Pitch = p
  451. SlashSound.PlayOnRemove = true
  452. coroutine.resume(coroutine.create(function()
  453. wait()
  454. SlashSound.Parent = nil
  455. end))
  456. end
  457. function fs(parent,p) --Fire Sound
  458. local SlashSound = Instance.new("Sound")
  459. SlashSound.SoundId = "http://www.roblox.com/asset/?id=31758982"
  460. SlashSound.Parent = parent
  461. SlashSound.Volume = .7
  462. SlashSound.Pitch = p
  463. SlashSound.PlayOnRemove = true
  464. coroutine.resume(coroutine.create(function()
  465. wait()
  466. SlashSound.Parent = nil
  467. end))
  468. end
  469. function ms(parent,p) --Metal Cling Sound
  470. local SlashSound = Instance.new("Sound")
  471. SlashSound.SoundId = "rbxasset://sounds\\metal.ogg"
  472. SlashSound.Parent = parent
  473. SlashSound.Volume = 5
  474. SlashSound.Pitch = p
  475. SlashSound.PlayOnRemove = true
  476. coroutine.resume(coroutine.create(function()
  477. wait()
  478. SlashSound.Parent = nil
  479. end))
  480. end
  481. function bs(parent,p) --Berserk Sound
  482. local SlashSound = Instance.new("Sound")
  483. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2676305"
  484. SlashSound.Parent = parent
  485. SlashSound.Volume = 1
  486. SlashSound.Pitch = p
  487. SlashSound.PlayOnRemove = true
  488. coroutine.resume(coroutine.create(function()
  489. wait()
  490. SlashSound.Parent = nil
  491. end))
  492. end
  493. function hs(parent,p) --Ammo Hit Sound
  494. ms(parent,p)
  495. end
  496. function as(parent,p) --Gun Shoot Sound
  497. local SlashSound = Instance.new("Sound")
  498. SlashSound.SoundId = "http://roblox.com/asset/?id=10209257"
  499. SlashSound.Parent = parent
  500. SlashSound.Volume = 0.5
  501. SlashSound.Pitch = p
  502. SlashSound.PlayOnRemove = true
  503. coroutine.resume(coroutine.create(function()
  504. wait()
  505. SlashSound.Parent = nil
  506. end))
  507. end
  508. function ars(parent,p) --Gun Reload Sound
  509. local SlashSound = Instance.new("Sound")
  510. SlashSound.SoundId = "http://roblox.com/asset/?id=10209869"
  511. SlashSound.Parent = parent
  512. SlashSound.Volume = 1
  513. SlashSound.Pitch = p
  514. SlashSound.PlayOnRemove = true
  515. coroutine.resume(coroutine.create(function()
  516. wait()
  517. SlashSound.Parent = nil
  518. end))
  519. end
  520. --
  521. --
  522. function returndmg()
  523. mindamage = omindamage
  524. maxdamage = omaxdamage
  525. crtmaxdamage = ocrtmaxdamage
  526. end
  527. function subdmg(sub)
  528. mindamage = omindamage - sub
  529. maxdamage = omaxdamage - sub
  530. crtmaxdamage = ocrtmaxdamage - sub
  531. end
  532. function prcntdmg(sub)
  533. mindamage = math.floor(omindamage - (omindamage*(sub/100)))
  534. maxdamage = math.floor(omaxdamage - (omaxdamage*(sub/100)))
  535. crtmaxdamage = math.floor(ocrtmaxdamage - (ocrtmaxdamage*(sub/100)))
  536. end
  537. function tagHumanoid(humanoid, player)
  538. local creator_tag = Instance.new("ObjectValue")
  539. creator_tag.Value = player
  540. creator_tag.Name = "creator"
  541. creator_tag.Parent = humanoid
  542. end
  543. function untagHumanoid(humanoid)
  544. if humanoid ~= nil then
  545. local tag = humanoid:findFirstChild("creator")
  546. if tag ~= nil then
  547. tag.Parent = nil
  548. end
  549. end
  550. end
  551. local function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  552. return game.Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  553. end
  554. function hideanim()
  555. attack = true
  556. ars(Head,0.85)
  557. for i = 0.25 ,1 ,0.25 do
  558. wait()
  559. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  560. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-15*i), 0, 0)
  561. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40),math.rad(0),math.rad(25+10*i))
  562. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  563. w3.C0 = CFrame.Angles(math.rad(90+25*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  564. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5*i),0,math.rad(0))
  565. end
  566. for i = 0.1 ,1 ,0.1 do
  567. wait()
  568. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  569. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(10-10*i), 0, 0)
  570. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40),math.rad(0),math.rad(35+10*i))
  571. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  572. w3.C0 = CFrame.Angles(math.rad(115+20*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  573. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5-5*i),0,math.rad(0))
  574. end
  575. for i = 0.1 ,1 ,0.1 do
  576. wait()
  577. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90-130*i),math.rad(0),math.rad(-60+60*i))
  578. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0)
  579. LW.C0 = CFrame.new(-1.5, 0.5, -0.5+0.25*i) * CFrame.Angles(math.rad(40-20*i),math.rad(0),math.rad(45-22.5*i))
  580. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  581. w3.C0 = CFrame.Angles(math.rad(135), 0, 0) * CFrame.new(0, 0.25,-0.5)
  582. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-10+40*i),0,math.rad(-30*i))
  583. end
  584. unequipweld()
  585. for i = 0.1 ,1 ,0.1 do
  586. wait()
  587. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(-20+20*i),math.rad(0),math.rad(0))
  588. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0)
  589. LW.C0 = CFrame.new(-1.5, 0.5, -0.25+0.25*i) * CFrame.Angles(math.rad(20-20*i),math.rad(0),math.rad(22.5-22.5*i))
  590. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  591. w3.C0 = CFrame.Angles(math.rad(135), 0, 0) * CFrame.new(0, 0.25,-0.5)
  592. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(30-30*i),0,math.rad(-30+30*i))
  593. end
  594. Neck.C0 = neckcf0
  595. RWRem()
  596. LWRem()
  597. attack = false
  598. end
  599. function equipanim()
  600. attack = true
  601. RWFunc()
  602. w3.C0 = CFrame.Angles(math.rad(135), 0, 0) * CFrame.new(0, 0.25,-0.5)
  603. for i = 0.1 ,1 ,0.1 do
  604. wait()
  605. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(-20*i),math.rad(0),math.rad(0))
  606. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  607. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
  608. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  609. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(30*i),0,math.rad(-30*i))
  610. end
  611. equipweld()
  612. ars(Head,1)
  613. for i = 0.1 ,1 ,0.1 do
  614. wait()
  615. RW.C0 = CFrame.new(1.5, 0.5, -0.25*i) * CFrame.Angles(math.rad(-20+130*i),math.rad(0),math.rad(0))
  616. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  617. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
  618. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  619. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(30-35*i),0,math.rad(-30))
  620. end
  621. LWFunc()
  622. for i = 0.1 ,1 ,0.1 do
  623. wait()
  624. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(110-20*i),math.rad(0),math.rad(-60*i))
  625. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25*i), 0, 0)
  626. LW.C0 = CFrame.new(-1.5, 0.5, -0.5*i) * CFrame.Angles(math.rad(40*i),math.rad(0),math.rad(25*i))
  627. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  628. w3.C0 = CFrame.Angles(math.rad(135-45*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  629. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5+5*i),0,math.rad(-30+30*i))
  630. end
  631. Neck.C0 = neckcf0
  632. attack = false
  633. end
  634. function faketors()
  635. local T = Instance.new("Part")
  636. T.Material = "SmoothPlastic"
  637. T.formFactor = 0
  638. T.CanCollide = false
  639. T.Name = "FakeTorso"
  640. T.Locked = true
  641. T.Size = Torso.Size
  642. T.Parent = swordholder
  643. T.Transparency = 1
  644. T.BrickColor = Torso.BrickColor
  645. for i,z in pairs(Character:GetChildren()) do
  646. if z.className == "CharacterMesh" then
  647. if z.BodyPart == Enum.BodyPart.Torso then
  648. local SM = Instance.new("SpecialMesh",T)
  649. SM.MeshId = "http://www.roblox.com/asset/?id=" .. z.MeshId
  650. if z.BaseTextureId ~= 0 then
  651. SM.TextureId = z.BaseTextureId
  652. elseif z.OverlayTextureId ~= 0 then
  653. SM.TextureId = z.OverlayTextureId
  654. else
  655. SM.TextureId = ""
  656. end
  657. end
  658. end
  659. end
  660. local wt = Instance.new("Weld")
  661. wt.Parent = T
  662. wt.Part0 = T
  663. wt.Part1 = Torso
  664. RW.Part0 = T
  665. LW.Part0 = T
  666. T.Transparency = 0
  667. Torso.Transparency = 1
  668. RHL.Part0 = T
  669. LHL.Part0 = T
  670. return wt,T
  671. end
  672. if (script.Parent.className ~= "HopperBin") then
  673. Tool = Instance.new("HopperBin")
  674. Tool.Parent = Backpack
  675. Tool.Name = ToolName
  676. script.Parent = Tool
  677. end
  678. Bin = script.Parent
  679. function damagesplat(dmg,hit,crit,blocked)
  680. local mo = Instance.new("Model")
  681. mo.Name = dmg
  682. local pa = Instance.new("Part",mo)
  683. pa.Material = "SmoothPlastic"
  684. pa.formFactor = 3
  685. pa.Size = Vector3.new(0.8,0.3,0.8)
  686. if crit then
  687. pa.BrickColor = BrickColor.new("Bright yellow")
  688. elseif not crit then
  689. pa.BrickColor = BrickColor.new("Bright red")
  690. end
  691. if blocked then pa.BrickColor = BrickColor.new("Bright blue") end
  692. pa.CFrame = CFrame.new(hit.Position) * CFrame.new(0, 3, 0)
  693. pa.Name = "Head"
  694. local hah = Instance.new("Humanoid")
  695. hah.Parent = mo
  696. hah.MaxHealth = 0
  697. hah.Health = 0
  698. local bp = Instance.new("BodyPosition")
  699. bp.P = 14000
  700. bp.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  701. bp.position = hit.Position + Vector3.new(0, 5, 0)
  702. coroutine.resume(coroutine.create(function()
  703. wait()
  704. mo.Parent = workspace
  705. bp.Parent = pa
  706. wait(1.4)
  707. mo:remove()
  708. end))
  709. return pa
  710. end
  711. function damage(hum,dmg,critornot)
  712. local pa = damagesplat(dmg,hum.Torso,critornot)
  713. hum:TakeDamage(dmg)
  714. coroutine.resume(coroutine.create(function()
  715. tagHumanoid(hum,Player)
  716. wait(1)
  717. untagHumanoid(hum)
  718. end))
  719. return pa
  720. end
  721. function AddAmmo(add)
  722. Ammo = Ammo + add
  723. if Ammo > MaxAmmo then
  724. Ammo = MaxAmmo
  725. end
  726. end
  727. function ADmg(humm,hit,pos)
  728. if CurrentAmmo == "Normal" then
  729. if humm.Parent:findFirstChild("Block") ~= nil then
  730. if humm.Parent.Block.Value then
  731. damagesplat(0,humm.Torso,false,true)
  732. return
  733. end
  734. end
  735. prcntdmg(-25)
  736. if critrandomizer ~= 1 then
  737. local rndmdamage = math.random(mindamage,maxdamage)
  738. damage(humm,rndmdamage,false)
  739. elseif critrandomizer == 1 then
  740. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  741. damage(humm,rndmdamage,true)
  742. end
  743. elseif CurrentAmmo == "Poison" then
  744. if humm.Parent:findFirstChild("Block") ~= nil then
  745. if humm.Parent.Block.Value then
  746. damagesplat(0,humm.Torso,false,true)
  747. return
  748. end
  749. end
  750. prcntdmg(15)
  751. if critrandomizer ~= 1 then
  752. local rndmdamage = math.random(mindamage,maxdamage)
  753. damage(humm,rndmdamage,false)
  754. elseif critrandomizer == 1 then
  755. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  756. damage(humm,rndmdamage,true)
  757. end
  758. if poisoncounter==1 then
  759. local poisoncount = math.random(2,10)
  760. coroutine.resume(coroutine.create(function()
  761. repeat
  762. wait(1.5)
  763. poisoncount = poisoncount - 1
  764. local rndmdamage = math.floor(math.random(1,5)/2)
  765. local pa = damage(humm,rndmdamage,false)
  766. pa.BrickColor = BrickColor.new("Alder")
  767. until poisoncount <= 0
  768. end))
  769. end
  770. elseif CurrentAmmo == "Explosion" then
  771. if humm.Parent:findFirstChild("Block") ~= nil then
  772. if humm.Parent.Block.Value then
  773. damagesplat(0,humm.Torso,false,true)
  774. return
  775. end
  776. end
  777. prcntdmg(0)
  778. if critrandomizer ~= 1 then
  779. local rndmdamage = math.random(mindamage,maxdamage)
  780. damage(humm,rndmdamage,false)
  781. elseif critrandomizer == 1 then
  782. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  783. damage(humm,rndmdamage,true)
  784. end
  785. elseif CurrentAmmo == "Herpity" then
  786. if humm.Parent:findFirstChild("Block") ~= nil then
  787. if humm.Parent.Block.Value then
  788. damagesplat(0,humm.Torso,false,true)
  789. return
  790. end
  791. end
  792. prcntdmg(0)
  793. if critrandomizer ~= 1 then
  794. local rndmdamage = math.random(mindamage,maxdamage)
  795. damage(humm,rndmdamage,false)
  796. elseif critrandomizer == 1 then
  797. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  798. damage(humm,rndmdamage,true)
  799. end
  800. if humm.Parent:findFirstChild("Torso")~=nil then
  801. humm.Parent.Torso.RotVelocity=Vector3.new(math.random(-50000,50000),math.random(-50000,50000),math.random(-50000,50000))
  802. r=it("BodyAngularVelocity")
  803. r.P=3000
  804. r.maxTorque=vt(500000000,50000000000,500000000)*50000
  805. r.angularvelocity=vt(math.random(-500,500),math.random(-500,500),math.random(-500,500))
  806. r.Parent=humm.Parent.Torso
  807. coroutine.resume(coroutine.create(function()
  808. for i=1,5000000000000 do
  809. wait()
  810. r.angularvelocity=vt(math.random(-500,500),math.random(-500,500),math.random(-500,500))
  811. end
  812. r.Parent=nil
  813. end))
  814. end
  815. elseif CurrentAmmo == "Bees" then
  816. if humm.Parent:findFirstChild("Block") ~= nil then
  817. if humm.Parent.Block.Value then
  818. damagesplat(0,humm.Torso,false,true)
  819. return
  820. end
  821. end
  822. prcntdmg(0)
  823. if critrandomizer ~= 1 then
  824. local rndmdamage = math.random(mindamage,maxdamage)
  825. damage(humm,rndmdamage,false)
  826. elseif critrandomizer == 1 then
  827. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  828. damage(humm,rndmdamage,true)
  829. end
  830. if humm.Parent:findFirstChild("Torso")~=nil then
  831. humm.Parent.Torso.RotVelocity=Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360))
  832. coroutine.resume(coroutine.create(function()
  833. victim=humm.Parent
  834. d=true
  835. for i=1, 40 do
  836. m=Instance.new("Model")
  837. m.Name="BEE"
  838. p=Instance.new("Part")
  839. p.Material = "SmoothPlastic"
  840. p.CanCollide=false
  841. p.Name="Head"
  842. p.Parent=m
  843. mz=Instance.new("SpecialMesh")
  844. mz.Scale=Vector3.new(.225,.25,.225)
  845. p.BrickColor=BrickColor.new("Bright yellow")
  846. p.Size=Vector3.new(1,1,1)
  847. p.CFrame=victim.Torso.CFrame+Vector3.new(math.random(-10,10),50,math.random(-10,10))
  848. mz.Parent=p
  849. m.Parent=workspace
  850. b=Instance.new("BodyPosition")
  851. b.P=8000
  852. b.D=200
  853. b.maxForce=Vector3.new(5000,5000,5000)*50000000
  854. b.position=p.Position
  855. b.Parent=p
  856. coroutine.resume(coroutine.create(function(f)
  857. while f.Parent~=nil do
  858. f.BodyPosition.position=f.Position:Lerp(victim.Torso.Position+Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5))*2,.75)
  859. wait(.1)
  860. end
  861. end),p)
  862. m.Parent=victim
  863. p.Touched:connect(function(hit)
  864. if hit.Parent~=nil then
  865. if hit.Parent==victim then
  866. if d==true then
  867. d=false
  868. hit.Parent.Humanoid.Health=hit.Parent.Humanoid.Health-15
  869. hit.Parent.Torso.Velocity=Vector3.new(math.random(-5,5)/5,math.random(-5,5),math.random(-5,5)/5)
  870. hit.Parent.Torso.CFrame=hit.Parent.Torso.CFrame*CFrame.new(0,1,0)*CFrame.fromEulerAnglesXYZ(math.random(-20,20)/20,math.random(-20,20)/30,.01)
  871. hit.Parent.Humanoid.Jump=true
  872. wait(math.random(10,20)/5)
  873. d=true
  874. end
  875. end
  876. end
  877. end)
  878. wait()
  879. end
  880. end))
  881. end
  882. elseif CurrentAmmo == "derp" then
  883. if humm.Parent:findFirstChild("Block") ~= nil then
  884. if humm.Parent.Block.Value then
  885. damagesplat(0,humm.Torso,false,true)
  886. return
  887. end
  888. end
  889. prcntdmg(0)
  890. if critrandomizer ~= 1 then
  891. local rndmdamage = math.random(mindamage,maxdamage)
  892. damage(humm,rndmdamage,false)
  893. elseif critrandomizer == 1 then
  894. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  895. damage(humm,rndmdamage,true)
  896. end
  897. if humm.Parent:findFirstChild("Torso")~=nil then
  898. coroutine.resume(coroutine.create(function()
  899. Headt=humm.Parent.Torso.Neck
  900. LeftArmt=humm.Parent.Torso["Left Shoulder"]
  901. RightArmt=humm.Parent.Torso["Right Shoulder"]
  902. LeftLegt=humm.Parent.Torso["Left Hip"]
  903. RightLegt=humm.Parent.Torso["Right Hip"]
  904. derptable={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"}
  905. pootisss=""..tostring(derptable[math.random(1,25)])..""..tostring(derptable[math.random(1,25)])..""..tostring(derptable[math.random(1,25)])..""..tostring(derptable[math.random(1,25)])..""..tostring(derptable[math.random(1,25)])..""..tostring(derptable[math.random(1,25)])..""..tostring(derptable[math.random(1,25)])..""..tostring(derptable[math.random(1,25)])..""..tostring(derptable[math.random(1,25)])..""
  906. coroutine.resume(coroutine.create(function()
  907. while true do
  908. wait()
  909. Headt.C0=Headt.C0*CFrame.fromEulerAnglesXYZ(0,0,0.5)
  910. LeftArmt.C0=LeftArmt.C0*CFrame.fromEulerAnglesXYZ(0,0,0.5)
  911. RightArmt.C0=RightArmt.C0*CFrame.fromEulerAnglesXYZ(0,0,0.5)
  912. LeftLegt.C0=LeftLegt.C0*CFrame.fromEulerAnglesXYZ(0,0,0.5)
  913. RightLegt.C0=RightLegt.C0*CFrame.fromEulerAnglesXYZ(0,0,0.5)
  914. humm.Parent.Humanoid.PlatformStand=true
  915. humm.Parent.Torso.RotVelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  916. pootisss=""..tostring(derptable[math.random(1,25)])..""..tostring(derptable[math.random(1,25)])..""..tostring(derptable[math.random(1,25)])..""..tostring(derptable[math.random(1,25)])..""..tostring(derptable[math.random(1,25)])..""..tostring(derptable[math.random(1,25)])..""..tostring(derptable[math.random(1,25)])..""..tostring(derptable[math.random(1,25)])..""..tostring(derptable[math.random(1,25)])..""
  917. game:GetService("Chat"):Chat(humm.Parent,pootisss,1)
  918. end
  919. end))
  920. end))
  921. end
  922. elseif CurrentAmmo == "Troll" then
  923. if humm.Parent:findFirstChild("Block") ~= nil then
  924. if humm.Parent.Block.Value then
  925. damagesplat(0,humm.Torso,false,true)
  926. return
  927. end
  928. end
  929. prcntdmg(0)
  930. if critrandomizer ~= 1 then
  931. local rndmdamage = math.random(mindamage,maxdamage)
  932. damage(humm,rndmdamage,false)
  933. elseif critrandomizer == 1 then
  934. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  935. damage(humm,rndmdamage,true)
  936. end
  937. if humm.Parent:findFirstChild("Torso")~=nil then
  938. coroutine.resume(coroutine.create(function()
  939. c=humm.Parent:children()
  940. for i=1,#c do
  941. m=Instance.new("BlockMesh")
  942. m.Parent=c[i]
  943. m.Scale=Vector3.new(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  944. coroutine.resume(coroutine.create(function(mesh)
  945. while true do
  946. wait()
  947. mesh.Scale=Vector3.new(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  948. end
  949. end),m)
  950. end
  951. end))
  952. end
  953. elseif CurrentAmmo == "suparKnockback" then
  954. if humm.Parent:findFirstChild("Block") ~= nil then
  955. if humm.Parent.Block.Value then
  956. damagesplat(0,humm.Torso,false,true)
  957. return
  958. end
  959. end
  960. prcntdmg(25)
  961. if critrandomizer ~= 1 then
  962. local rndmdamage = math.random(mindamage,maxdamage)
  963. damage(humm,rndmdamage,false)
  964. elseif critrandomizer == 1 then
  965. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  966. damage(humm,rndmdamage,true)
  967. end
  968. local vel = Instance.new("BodyVelocity",humm.Torso)
  969. vel.maxForce = Vector3.new(1,1,1) * math.huge
  970. vel.P = vel.P * 5
  971. vel.velocity = Vector3.new(0,1,0) + CFrame.new(Torso.Position,humm.Torso.Position).lookVector * 1000
  972. coroutine.resume(coroutine.create(function()
  973. wait() wait() wait() wait()
  974. vel.Parent=nil
  975. end))
  976. elseif CurrentAmmo == "Knockback" then
  977. if humm.Parent:findFirstChild("Block") ~= nil then
  978. if humm.Parent.Block.Value then
  979. damagesplat(0,humm.Torso,false,true)
  980. return
  981. end
  982. end
  983. prcntdmg(0)
  984. if critrandomizer ~= 1 then
  985. local rndmdamage = math.random(mindamage,maxdamage)
  986. damage(humm,rndmdamage,false)
  987. elseif critrandomizer == 1 then
  988. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  989. damage(humm,rndmdamage,true)
  990. end
  991. local vel = Instance.new("BodyVelocity",humm.Torso)
  992. vel.maxForce = Vector3.new(1,1,1) * math.huge
  993. vel.P = vel.P * 5
  994. vel.velocity = Vector3.new(0,1,0) + CFrame.new(Torso.Position,humm.Torso.Position).lookVector * 10
  995. coroutine.resume(coroutine.create(function()
  996. wait() wait() wait() wait()
  997. vel.Parent=nil
  998. end))
  999. returndmg()
  1000. end
  1001. end
  1002. function OT(hit) --Normal Damage
  1003. if Hitdeb == 1 then return end
  1004. if hit.Parent == nil then return end
  1005. local hum = hit.Parent:findFirstChild("Humanoid") if hum ~= nil and hum ~= Character.Humanoid then
  1006. if hum.Health <= 0 then return end
  1007. if hit.Parent:findFirstChild("Block") ~= nil then
  1008. if hit.Parent.Block.Value then
  1009. damagesplat(0,hum.Torso,false,true)
  1010. Hitdeb = 1
  1011. if hit.Parent.Block:findFirstChild("BlockPower") ~= nil then
  1012. if hit.Parent.Block.BlockPower.Value <= 1 then
  1013. hit.Parent.Block.Value = false
  1014. elseif hit.Parent.Block.BlockPower.Value > 1 then
  1015. local critrandomizer = math.random(crtrate)
  1016. if critrandomizer ~= 1 then
  1017. hit.Parent.Block.BlockPower.Value = hit.Parent.Block.BlockPower.Value - blockbreaker
  1018. elseif critrandomizer == 1 then
  1019. hit.Parent.Block.BlockPower.Value = hit.Parent.Block.BlockPower.Value - blockbreaker + 2
  1020. end
  1021. end
  1022. end
  1023. return end end
  1024. local critrandomizer = math.random(crtrate)
  1025. if critrandomizer ~= 1 then
  1026. local rndmdamage = math.random(mindamage,maxdamage)
  1027. damage(hum,rndmdamage,false)
  1028. elseif critrandomizer == 1 then
  1029. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  1030. damage(hum,rndmdamage,true)
  1031. end
  1032. Hitdeb = 1
  1033. end
  1034. end
  1035. function AoE(p,magnitude)
  1036. local c = game.Workspace:GetChildren();
  1037. for i = 1, #c do
  1038. local hum = c[i]:findFirstChild("Humanoid")
  1039. if hum ~= nil and hum.Health ~= 0 then
  1040. local head = c[i]:findFirstChild("Head");
  1041. if head ~= nil then
  1042. local mag = (head.Position - p).magnitude;
  1043. if mag <= magnitude and c[i].Name ~= Character.Name then
  1044. local foundd = false
  1045. for ii = 1 , #AoETrue do
  1046. if AoETrue[ii] == c[i].Name then
  1047. foundd = true
  1048. end
  1049. end
  1050. if foundd then
  1051. end
  1052. --
  1053. if not foundd then
  1054. local critrandomizer = math.random(crtrate)
  1055. if critrandomizer ~= 1 then
  1056. local rndmdamage = math.random(mindamage,maxdamage)
  1057. damage(hum,rndmdamage,false)
  1058. elseif critrandomizer == 1 then
  1059. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  1060. damage(hum,rndmdamage,true)
  1061. end
  1062. table.insert(AoETrue,c[i].Name)
  1063. end
  1064. end
  1065. end
  1066. end
  1067. end
  1068. for ii = 1 , #AoETrue do
  1069. table.remove(AoETrue,#AoETrue)
  1070. end
  1071. end
  1072. --
  1073. --
  1074. function effect(Color,Ref,LP,P1)
  1075. local effectsmsh = Instance.new("BlockMesh")
  1076. effectsmsh.Scale = Vector3.new(1,1,1)
  1077. effectsmsh.Name = "Mesh"
  1078. local effectsg = Instance.new("Part")
  1079. effectsg.Material = "SmoothPlastic"
  1080. effectsg.formFactor = 3
  1081. effectsg.CanCollide = false
  1082. effectsg.Name = "Eff"
  1083. effectsg.Locked = true
  1084. effectsg.Anchored = true
  1085. effectsg.Size = Vector3.new(0.2,1,0.2)
  1086. effectsg.Parent = swordholder
  1087. effectsmsh.Parent = effectsg
  1088. effectsg.BrickColor = BrickColor.new(Color)
  1089. effectsg.Reflectance = Ref
  1090. local point1 = P1
  1091. local mg = (LP.p - point1.p).magnitude
  1092. effectsg.Size = Vector3.new(0.2,mg,0.2)
  1093. effectsg.CFrame = CFrame.new((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
  1094. coroutine.resume(coroutine.create(function()
  1095. for i = 0 , 1 , 0.1 do
  1096. wait()
  1097. effectsg.Transparency = 1*i
  1098. effectsmsh.Scale = Vector3.new(1-1*i,1,1-1*i)
  1099. end
  1100. wait()
  1101. effectsg.Parent = nil
  1102. end))
  1103. end
  1104. --
  1105. con = nil
  1106. function dmgcnnct()
  1107. if con ~= nil then
  1108. con:disconnect()
  1109. Hitdeb = 0
  1110. end
  1111. con = prt11.Touched:connect(OT)
  1112. end
  1113. function dmgdc()
  1114. if con ~= nil then
  1115. con:disconnect()
  1116. Hitdeb = 0
  1117. end
  1118. end
  1119. function rptddmg(value,des,inc)
  1120. coroutine.resume(coroutine.create(function()
  1121. repeat
  1122. wait(inc)
  1123. Hitdeb = 0
  1124. until value == des
  1125. end))
  1126. end
  1127. function atktype(s,e)
  1128. coroutine.resume(coroutine.create(function ()
  1129. attacktype = e
  1130. wait(0.25)
  1131. attacktype = s
  1132. end))
  1133. end
  1134. function EVENMOARMAGIX2(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  1135. local msh1 = Instance.new("SpecialMesh")
  1136. msh1.Scale = Vector3.new(0.5,0.5,0.5)
  1137. msh1.MeshType = "Sphere"
  1138. S=Instance.new("Part")
  1139. S.Material = "SmoothPlastic"
  1140. S.Name="Effect"
  1141. S.formFactor=0
  1142. S.Size=Vector3.new(x1,y1,z1)
  1143. S.BrickColor=color
  1144. S.Reflectance = 0
  1145. S.TopSurface=0
  1146. S.BottomSurface=0
  1147. S.Transparency=0
  1148. S.Anchored=true
  1149. S.CanCollide=false
  1150. S.CFrame=part
  1151. S.Parent=workspace
  1152. msh1.Parent = S
  1153. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 14 do Part.Mesh.Scale = Part.Mesh.Scale + Vector3.new(1,1,1) Part.Transparency=Part.Transparency+0.1 wait() end Part.Parent=nil end),S,S.CFrame)
  1154. end
  1155. function shoottrail(mouse)
  1156. local p1 = (prt5.CFrame * CFrame.new(0,-prt5.Size.y/2,0)).p
  1157. local spreadvector = (Vector3.new(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread)) / 100) * (p1-mouse.Hit.p).magnitude/100
  1158. local dir = CFrame.new((p1+mouse.Hit.p)/2,mouse.Hit.p+spreadvector)
  1159. local hit,pos = rayCast(p1,dir.lookVector,10,Character)
  1160. local rangepos = range
  1161. local function drawtrail(From,To)
  1162. local effectsmsh = Instance.new("CylinderMesh")
  1163. effectsmsh.Scale = Vector3.new(1,1,1)
  1164. effectsmsh.Name = "Mesh"
  1165. local effectsg = Instance.new("Part")
  1166. effectsg.Material = "SmoothPlastic"
  1167. if poisoncounter==1 then
  1168. local derpsmoke=Instance.new("Smoke")
  1169. derpsmoke.Parent=effectsg
  1170. derpsmoke.Color=Color3.new(0,0,154)
  1171. --derpsmoke.Opacity=0.05
  1172. --derpsmoke.Size=0.5
  1173. end
  1174. effectsg.formFactor = 3
  1175. effectsg.CanCollide = false
  1176. effectsg.Name = "Eff"
  1177. effectsg.Locked = true
  1178. effectsg.Anchored = true
  1179. effectsg.Size = Vector3.new(0.2,0.2,0.2)
  1180. effectsg.Parent = swordholder
  1181. effectsmsh.Parent = effectsg
  1182. effectsg.BrickColor = ammotrail
  1183. effectsg.Reflectance = 0.25
  1184. local LP = From
  1185. local point1 = To
  1186. local mg = (LP - point1).magnitude
  1187. effectsmsh.Scale = Vector3.new(1,mg*5,1)
  1188. effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
  1189. coroutine.resume(coroutine.create(function()
  1190. for i = 0 , 1 , 0.1 do
  1191. wait()
  1192. effectsg.Transparency = 1*i
  1193. effectsmsh.Scale = Vector3.new(1-1*i,mg*5,1-1*i)
  1194. end
  1195. effectsg.Parent = nil
  1196. end))
  1197. end
  1198. local newpos = p1
  1199. local inc = rangepower
  1200. repeat
  1201. wait()
  1202. rangepos = rangepos - 10
  1203. dir = dir * CFrame.Angles(math.rad(-0.1),0,0)
  1204. hit,pos = rayCast(newpos,dir.lookVector,inc,Character)
  1205. drawtrail(newpos,pos)
  1206. newpos = newpos + (dir.lookVector * inc)
  1207. if inc >= 20 then
  1208. inc = inc - 10
  1209. end
  1210. if hit ~= nil then
  1211. rangepos = 0
  1212. end
  1213. until rangepos <= 0
  1214. if CurrentAmmo=="Explosion" then
  1215. b=math.random(1,3)
  1216. if b==1 then
  1217. EVENMOARMAGIX2(CFrame.new(newpos),1,1,1,0,0,0,0,0,0,BrickColor.new("Bright red"))
  1218. local c = game.Workspace:GetChildren();
  1219. for i = 1, #c do
  1220. local hum = c[i]:findFirstChild("Humanoid")
  1221. if hum ~= nil and hum.Health ~= 0 then
  1222. local head = c[i]:findFirstChild("Head");
  1223. if head ~= nil then
  1224. local targ = head.Position - newpos;
  1225. local mag = targ.magnitude;
  1226. if mag <= 10 and c[i].Name ~= Player.Name then
  1227. attackdebounce=false
  1228. ADmg(hum,hit,pos)
  1229. end
  1230. end
  1231. end
  1232. end
  1233. end
  1234. end
  1235. if hit ~= nil then
  1236. hs(Head,1)
  1237. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  1238. hum = hit.Parent.Humanoid
  1239. attackdebounce=false
  1240. ADmg(hum,hit,pos)
  1241. elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  1242. hum = hit.Parent.Parent.Humanoid
  1243. attackdebounce=false
  1244. ADmg(hum,hit,pos)
  1245. end
  1246. end
  1247. end
  1248. function shoottrail2(mouse)
  1249. local p1 = (newprt5.CFrame * CFrame.new(0,-newprt5.Size.y/2,0)).p
  1250. local spreadvector = (Vector3.new(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread)) / 100) * (p1-mouse.Hit.p).magnitude/100
  1251. local dir = CFrame.new((p1+mouse.Hit.p)/2,mouse.Hit.p+spreadvector)
  1252. local hit,pos = rayCast(p1,dir.lookVector,10,Character)
  1253. local rangepos = range
  1254. local function drawtrail(From,To)
  1255. local effectsmsh = Instance.new("CylinderMesh")
  1256. effectsmsh.Scale = Vector3.new(1,1,1)
  1257. effectsmsh.Name = "Mesh"
  1258. local effectsg = Instance.new("Part")
  1259. if poisoncounter==1 then
  1260. local derpsmoke=Instance.new("Smoke")
  1261. derpsmoke.Parent=effectsg
  1262. derpsmoke.Color=Color3.new(0,0,154)
  1263. --derpsmoke.Opacity=0.05
  1264. --derpsmoke.Size=0.5
  1265. end
  1266. effectsg.formFactor = 3
  1267. effectsg.CanCollide = false
  1268. effectsg.Name = "Eff"
  1269. effectsg.Locked = true
  1270. effectsg.Anchored = true
  1271. effectsg.Size = Vector3.new(0.2,0.2,0.2)
  1272. effectsg.Parent = swordholder
  1273. effectsmsh.Parent = effectsg
  1274. effectsg.BrickColor = ammotrail
  1275. effectsg.Reflectance = 0.25
  1276. local LP = From
  1277. local point1 = To
  1278. local mg = (LP - point1).magnitude
  1279. effectsmsh.Scale = Vector3.new(1,mg*5,1)
  1280. effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
  1281. coroutine.resume(coroutine.create(function()
  1282. for i = 0 , 1 , 0.1 do
  1283. wait()
  1284. effectsg.Transparency = 1*i
  1285. effectsmsh.Scale = Vector3.new(1-1*i,mg*5,1-1*i)
  1286. end
  1287. effectsg.Parent = nil
  1288. end))
  1289. end
  1290. local newpos = p1
  1291. local inc = rangepower
  1292. repeat
  1293. wait()
  1294. rangepos = rangepos - 10
  1295. dir = dir * CFrame.Angles(math.rad(-0.1),0,0)
  1296. hit,pos = rayCast(newpos,dir.lookVector,inc,Character)
  1297. drawtrail(newpos,pos)
  1298. newpos = newpos + (dir.lookVector * inc)
  1299. if inc >= 20 then
  1300. inc = inc - 10
  1301. end
  1302. if hit ~= nil then
  1303. rangepos = 0
  1304. end
  1305. until rangepos <= 0
  1306. if CurrentAmmo=="Explosion" then
  1307. b=math.random(1,3)
  1308. if b==1 then
  1309. EVENMOARMAGIX2(CFrame.new(newpos),1,1,1,0,0,0,0,0,0,BrickColor.new("Bright red"))
  1310. local c = game.Workspace:GetChildren();
  1311. for i = 1, #c do
  1312. local hum = c[i]:findFirstChild("Humanoid")
  1313. if hum ~= nil and hum.Health ~= 0 then
  1314. local head = c[i]:findFirstChild("Head");
  1315. if head ~= nil then
  1316. local targ = head.Position - newpos;
  1317. local mag = targ.magnitude;
  1318. if mag <= 10 and c[i].Name ~= Player.Name then
  1319. attackdebounce=false
  1320. ADmg(hum,hit,pos)
  1321. end
  1322. end
  1323. end
  1324. end
  1325. end
  1326. end
  1327. if hit ~= nil then
  1328. hs(Head,1)
  1329. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  1330. hum = hit.Parent.Humanoid
  1331. attackdebounce=false
  1332. ADmg(hum,hit,pos)
  1333. elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  1334. hum = hit.Parent.Parent.Humanoid
  1335. attackdebounce=false
  1336. ADmg(hum,hit,pos)
  1337. end
  1338. end
  1339. end
  1340. function Melee()
  1341. attack=true
  1342. local wt,t = faketors()
  1343. w7.Part1 = t
  1344. w8.Part1 = t
  1345. w9.Part1 = t
  1346. for i = 0 , 1 , 0.1 do
  1347. wait()
  1348. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1349. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-15*i), 0, 0)
  1350. LW.C0 = CFrame.new(-1.5, 0.5, -0.5+0.25*i) * CFrame.Angles(math.rad(40+50*i),math.rad(0),math.rad(25))
  1351. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1352. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1353. w1.Part1=LeftArm
  1354. w1.C0 = CFrame.Angles(math.rad(-80), math.rad(-55+145*i), math.rad(90)) * CFrame.new(-1.3, 1, 0)
  1355. wt.C0 = CFrame.Angles(0, math.rad(100*i), 0)
  1356. end
  1357. con1=prt5.Touched:connect(function(hit)
  1358. hum=hit.Parent:FindFirstChild("Humanoid")
  1359. if hum~=nil then
  1360. if attackdebounce == false then
  1361. attackdebounce = true
  1362. coroutine.resume(coroutine.create(function()
  1363. wait(0.1)
  1364. attackdebounce = false
  1365. end))
  1366. ADmg(hum,hit,pos)
  1367. end
  1368. end
  1369. end)
  1370. con2=prt5.Touched:connect(function(hit)
  1371. hum=hit.Parent:FindFirstChild("Humanoid")
  1372. if hum~=nil then
  1373. if attackdebounce == false then
  1374. attackdebounce = true
  1375. coroutine.resume(coroutine.create(function()
  1376. wait(0.1)
  1377. attackdebounce = false
  1378. end))
  1379. ADmg(hum,hit,pos)
  1380. end
  1381. end
  1382. end)
  1383. for i = 0 , 1 , 0.15 do
  1384. wait()
  1385. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+160*i))
  1386. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-15), 0, 0)
  1387. LW.C0 = CFrame.new(-1.5, 0.5, -0.5+0.25) * CFrame.Angles(math.rad(40+50),math.rad(0),math.rad(25-50*i))
  1388. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1389. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1390. w1.Part1=LeftArm
  1391. w1.C0 = CFrame.Angles(math.rad(-80+80*i), math.rad(-55+145), math.rad(90)) * CFrame.new(-1.3+1*i, 1+1.5*i, 0)
  1392. wt.C0 = CFrame.Angles(0, math.rad(100-200*i), 0)
  1393. end
  1394. for i = 0 , 1 , 0.1 do
  1395. wait()
  1396. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+150))
  1397. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-15), 0, 0)
  1398. LW.C0 = CFrame.new(-1.5, 0.5, -0.5+0.25) * CFrame.Angles(math.rad(40+50),math.rad(0),math.rad(25-50-10*i))
  1399. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1400. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1401. w1.Part1=LeftArm
  1402. w1.C0 = CFrame.Angles(math.rad(-80+80), math.rad(-55+145), math.rad(90)) * CFrame.new(-1.3+1, 1+1.5, 0)
  1403. wt.C0 = CFrame.Angles(0, math.rad(100-200-10*i), 0)
  1404. end
  1405. con1:disconnect()
  1406. con2:disconnect()
  1407. for i = 0 , 1 , 0.1 do
  1408. wait()
  1409. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+150-150*i))
  1410. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-15+15*i), 0, 0)
  1411. LW.C0 = CFrame.new(-1.5, 0.5, -0.5+0.25-0.25*i) * CFrame.Angles(math.rad(40+50-50*i),math.rad(0),math.rad(25-50-10+60*i))
  1412. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1413. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1414. w1.Part1=LeftArm
  1415. w1.C0 = CFrame.Angles(math.rad(-80+80-80*i), math.rad(-55+145-145*i), math.rad(90)) * CFrame.new(-1.3+1-1*i, 1+1.5-1.5*i, 0)
  1416. wt.C0 = CFrame.Angles(0, math.rad(100-200-10+110*i), 0)
  1417. end
  1418. w1.Part1 = RAP
  1419. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1420. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  1421. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40),math.rad(0),math.rad(25))
  1422. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1423. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1424. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1425. wt.C0 = CFrame.Angles(0, 0, 0)
  1426. w7.Part1 = Torso
  1427. w8.Part1 = Torso
  1428. w9.Part1 = Torso
  1429. RW.Part0 = Torso
  1430. LW.Part0 = Torso
  1431. Torso.Transparency = 0
  1432. RHL.Part0 = Torso
  1433. LHL.Part0 = Torso
  1434. t.Parent = nil
  1435. attack=false
  1436. end
  1437. function Ready(mouse)
  1438. if Ammo <= 0 then Reload() return end
  1439. attack = true
  1440. local wt,t = faketors()
  1441. w7.Part1 = t
  1442. w8.Part1 = t
  1443. w9.Part1 = t
  1444. Character.Humanoid.WalkSpeed = 5
  1445. for i = 0.2 , 1 , 0.2 do
  1446. wait(0)
  1447. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1448. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-15*i), 0, 0)
  1449. LW.C0 = CFrame.new(-1.5, 0.5, -0.5+0.25*i) * CFrame.Angles(math.rad(40+35*i),math.rad(0),math.rad(25))
  1450. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1451. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1452. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1453. wt.C0 = CFrame.Angles(0, math.rad(50*i), 0)
  1454. end
  1455. for i = 0.2 , 1 , 0.2 do
  1456. wait(0)
  1457. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1458. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(10-10*i), 0, 0)
  1459. LW.C0 = CFrame.new(-1.5, 0.5, -0.25+0.25*i) * CFrame.Angles(math.rad(75+20*i),math.rad(0),math.rad(25))
  1460. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1461. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1462. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1463. wt.C0 = CFrame.Angles(0, math.rad(50+10*i), 0)
  1464. end
  1465. wait() wait()
  1466. repeat
  1467. poisoncounter=math.random(1,5)
  1468. wait()
  1469. as(Head,1)
  1470. coroutine.resume(coroutine.create(function()
  1471. for z = 1 ,2 do
  1472. coroutine.resume(coroutine.create(function()
  1473. local meshb1 = Instance.new("BlockMesh")
  1474. meshb1.Scale = Vector3.new(1,1,1)
  1475. local shellb1 = Instance.new("Part")
  1476. shellb1.material = "SmoothPlastic"
  1477. meshb1.Parent = shellb1
  1478. shellb1.Anchored = true
  1479. shellb1.formFactor = 3
  1480. shellb1.Size = Vector3.new(0.3,0.3,0.3) * (math.random(100,300)/100)
  1481. shellb1.CFrame = CFrame.new((prt5.CFrame * CFrame.new(0,-prt5.Size.y/2,0)).p) * CFrame.Angles(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)
  1482. shellb1.Parent = Character
  1483. shellb1.Transparency = 0
  1484. if math.random(1,2) == 1 then
  1485. shellb1.BrickColor = BrickColor.new("Bright red")
  1486. else
  1487. shellb1.BrickColor = BrickColor.new("Bright orange")
  1488. end
  1489. shellb1.CanCollide = false
  1490. local incre = math.random(0,60)/100
  1491. for i = 0 , 1 , 0.1 do
  1492. wait()
  1493. shellb1.CFrame = shellb1.CFrame + Torso.CFrame.lookVector*incre
  1494. shellb1.Transparency = 1*i
  1495. meshb1.Scale = Vector3.new(1+1*i,1+1*i,1+1*i)
  1496. end
  1497. shellb1.Parent=nil
  1498. end))
  1499. end
  1500. coroutine.resume(coroutine.create(function()
  1501. shoottrail(mouse)
  1502. end))
  1503. if twobullets==true then
  1504. shoottrail(mouse)
  1505. end
  1506. end))
  1507. Ammo = Ammo - 1
  1508. for i = 0.5 , 1 , 0.5*attackspeed do
  1509. wait(0)
  1510. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1511. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-5*i), 0, 0)
  1512. LW.C0 = CFrame.new(-1.5, 0.5, -0) * CFrame.Angles(math.rad(95+5*i),math.rad(0),math.rad(25))
  1513. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1514. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1515. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1516. wt.C0 = CFrame.Angles(0, math.rad(60), 0)
  1517. end
  1518. for i = 0.5 , 1 , 0.5*attackspeed do
  1519. wait(0)
  1520. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1521. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-5+5*i), 0, 0)
  1522. LW.C0 = CFrame.new(-1.5, 0.5, -0) * CFrame.Angles(math.rad(100-5*i),math.rad(0),math.rad(25))
  1523. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1524. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1525. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1526. wt.C0 = CFrame.Angles(0, math.rad(60), 0)
  1527. end
  1528. until not keyhold or Ammo <= 0
  1529. for i = 0.2 , 1 , 0.2 do
  1530. wait(0)
  1531. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1532. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15*i), 0, 0)
  1533. LW.C0 = CFrame.new(-1.5, 0.5, -0.25*i) * CFrame.Angles(math.rad(95-25*i),math.rad(0),math.rad(25))
  1534. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1535. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1536. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1537. wt.C0 = CFrame.Angles(0, math.rad(60-60*i), 0)
  1538. end
  1539. w7.Part1 = Torso
  1540. w8.Part1 = Torso
  1541. w9.Part1 = Torso
  1542. RW.Part0 = Torso
  1543. LW.Part0 = Torso
  1544. Torso.Transparency = 0
  1545. RHL.Part0 = Torso
  1546. LHL.Part0 = Torso
  1547. t.Parent = nil
  1548. Character.Humanoid.WalkSpeed = 14
  1549. for i = 0.2 , 1 , 0.2 do
  1550. wait(0)
  1551. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1552. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15+10*i), 0, 0)
  1553. LW.C0 = CFrame.new(-1.5, 0.5, -0.25-0.25*i) * CFrame.Angles(math.rad(70-30*i),math.rad(0),math.rad(25))
  1554. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1555. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1556. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1557. end
  1558. wait(0.25)
  1559. attack = false
  1560. end
  1561. function GunzerkReady(mouse)
  1562. if Ammo <= 0 then Reload() return end
  1563. attack = true
  1564. Character.Humanoid.WalkSpeed = 5
  1565. for i = 0.2 , 1 , 0.2 do
  1566. wait(0)
  1567. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(50+30*i),math.rad(0),math.rad(-5+3*i))
  1568. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0)
  1569. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(50+30*i),math.rad(0),math.rad(5-3*i))
  1570. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1571. end
  1572. for i = 0.2 , 1 , 0.2 do
  1573. wait(0)
  1574. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(50+30+10*i),math.rad(0),math.rad(-5+3+2*i))
  1575. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0)
  1576. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(50+30+10*i),math.rad(0),math.rad(5-3-2*i))
  1577. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1578. end
  1579. wait() wait()
  1580. repeat
  1581. wait()
  1582. coroutine.resume(coroutine.create(function()
  1583. if firingdebounce1==false then
  1584. firingdebounce1=true
  1585. poisoncounter=math.random(1,5)
  1586. wait()
  1587. as(Head,1)
  1588. coroutine.resume(coroutine.create(function()
  1589. for z = 1 ,2 do
  1590. coroutine.resume(coroutine.create(function()
  1591. local meshb1 = Instance.new("BlockMesh")
  1592. meshb1.Scale = Vector3.new(1,1,1)
  1593. local shellb1 = Instance.new("Part")
  1594. shellb1.Material = "SmoothPlastic"
  1595. meshb1.Parent = shellb1
  1596. shellb1.Anchored = true
  1597. shellb1.formFactor = 3
  1598. shellb1.Size = Vector3.new(0.3,0.3,0.3) * (math.random(100,300)/100)
  1599. shellb1.CFrame = CFrame.new((prt5.CFrame * CFrame.new(0,-prt5.Size.y/2,0)).p) * CFrame.Angles(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)
  1600. shellb1.Parent = Character
  1601. shellb1.Transparency = 0
  1602. if math.random(1,2) == 1 then
  1603. shellb1.BrickColor = BrickColor.new("Bright red")
  1604. else
  1605. shellb1.BrickColor = BrickColor.new("Bright orange")
  1606. end
  1607. shellb1.CanCollide = false
  1608. local incre = math.random(0,60)/100
  1609. for i = 0 , 1 , 0.1 do
  1610. wait()
  1611. shellb1.CFrame = shellb1.CFrame + Torso.CFrame.lookVector*incre
  1612. shellb1.Transparency = 1*i
  1613. meshb1.Scale = Vector3.new(1+1*i,1+1*i,1+1*i)
  1614. end
  1615. shellb1.Parent=nil
  1616. end))
  1617. end
  1618. coroutine.resume(coroutine.create(function()
  1619. shoottrail(mouse)
  1620. end))
  1621. end))
  1622. for i = 0.5 , 1 , 0.5*attackspeed do
  1623. wait(0)
  1624. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90+10*i),math.rad(0),math.rad(0))
  1625. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0)
  1626. end
  1627. for i = 0.5 , 1 , 0.5*attackspeed do
  1628. wait(0)
  1629. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90+10-10*i),math.rad(0),math.rad(0))
  1630. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0)
  1631. end
  1632. firingdebounce1=false
  1633. end
  1634. end))
  1635. coroutine.resume(coroutine.create(function()
  1636. if firingdebounce2==false then
  1637. firingdebounce2=true
  1638. poisoncounter=math.random(1,5)
  1639. wait(0.1)
  1640. as(Head,1)
  1641. coroutine.resume(coroutine.create(function()
  1642. for z = 1 ,2 do
  1643. coroutine.resume(coroutine.create(function()
  1644. local meshb1 = Instance.new("BlockMesh")
  1645. meshb1.Scale = Vector3.new(1,1,1)
  1646. local shellb1 = Instance.new("Part")
  1647. shellb1.Material = "SmoothPlastic"
  1648. meshb1.Parent = shellb1
  1649. shellb1.Anchored = true
  1650. shellb1.formFactor = 3
  1651. shellb1.Size = Vector3.new(0.3,0.3,0.3) * (math.random(100,300)/100)
  1652. shellb1.CFrame = CFrame.new((newprt5.CFrame * CFrame.new(0,-newprt5.Size.y/2,0)).p) * CFrame.Angles(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)
  1653. shellb1.Parent = Character
  1654. shellb1.Transparency = 0
  1655. if math.random(1,2) == 1 then
  1656. shellb1.BrickColor = BrickColor.new("Bright red")
  1657. else
  1658. shellb1.BrickColor = BrickColor.new("Bright orange")
  1659. end
  1660. shellb1.CanCollide = false
  1661. local incre = math.random(0,60)/100
  1662. for i = 0 , 1 , 0.1 do
  1663. wait()
  1664. shellb1.CFrame = shellb1.CFrame + Torso.CFrame.lookVector*incre
  1665. shellb1.Transparency = 1*i
  1666. meshb1.Scale = Vector3.new(1+1*i,1+1*i,1+1*i)
  1667. end
  1668. shellb1.Parent=nil
  1669. end))
  1670. end
  1671. coroutine.resume(coroutine.create(function()
  1672. shoottrail2(mouse)
  1673. end))
  1674. end))
  1675. for i = 0.5 , 1 , 0.5*attackspeed do
  1676. wait(0)
  1677. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(90+10*i),math.rad(0),math.rad(0))
  1678. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1679. end
  1680. for i = 0.5 , 1 , 0.5*attackspeed do
  1681. wait(0)
  1682. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(90+10-10*i),math.rad(0),math.rad(0))
  1683. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1684. end
  1685. firingdebounce2=false
  1686. end
  1687. end))
  1688. until not keyhold or Ammo <= 0 or GunzerkDuration==0
  1689. for i = 0.2 , 1 , 0.2 do
  1690. wait(0)
  1691. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90-30*i),math.rad(0),math.rad(-3*i))
  1692. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0)
  1693. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(90-30*i),math.rad(0),math.rad(3*i))
  1694. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1695. end
  1696. Character.Humanoid.WalkSpeed = 14
  1697. for i = 0.2 , 1 , 0.2 do
  1698. wait(0)
  1699. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90-30-10*i),math.rad(0),math.rad(-3-2*i))
  1700. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0)
  1701. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(90-30-10*i),math.rad(0),math.rad(3+2*i))
  1702. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1703. end
  1704. wait(0.25)
  1705. attack = false
  1706. end
  1707. function Reload()
  1708. attack = true
  1709. while buttonhold==true do
  1710. wait()
  1711. ars(Head,0.75)
  1712. for i = 0.1 , 1 , 0.1*reloadspeed do
  1713. wait()
  1714. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+20*i))
  1715. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-45*i), 0, 0)
  1716. LW.C0 = CFrame.new(-1.5, 0.5, -0.5+0.5*i) * CFrame.Angles(math.rad(40-60*i),math.rad(0),math.rad(25-15*i))
  1717. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1718. w3.C0 = CFrame.Angles(math.rad(90+90*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1719. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-10*i),0,math.rad(-20*i))
  1720. end
  1721. for i = 0.2 , 1 , 0.2*reloadspeed do
  1722. wait()
  1723. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-40))
  1724. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-20+20*i), 0, 0)
  1725. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(-20+40*i),math.rad(0),math.rad(10-10*i))
  1726. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1727. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1728. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-10+20*i),0,math.rad(-20))
  1729. end
  1730. for i = 0.2 , 1 , 0.2*reloadspeed do
  1731. wait()
  1732. RW.C0 = CFrame.new(1.5-0.5*i, 0.5, -0.5*i) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-40-5*i))
  1733. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(45*i), 0, 0)
  1734. LW.C0 = CFrame.new(-1.5+0.5*i, 0.5, -0.5*i) * CFrame.Angles(math.rad(20+80*i),math.rad(0),math.rad(45*i))
  1735. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1736. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1737. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(10+10*i),0,math.rad(-20+10*i))
  1738. end
  1739. AddAmmo(Ammoregen)
  1740. for i = 0.2 , 1 , 0.2*reloadspeed do
  1741. wait()
  1742. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-45))
  1743. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(45+5*i), 0, 0)
  1744. LW.C0 = CFrame.new(-1, 0.5, -0.5) * CFrame.Angles(math.rad(100-10*i),math.rad(0),math.rad(45))
  1745. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1746. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1747. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(20+5*i),0,math.rad(-10+5*i))
  1748. end
  1749. for i = 0.1 , 1 , 0.1*reloadspeed do
  1750. wait()
  1751. RW.C0 = CFrame.new(1+0.5*i, 0.5, -0.5+0.5*i) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-45-15*i))
  1752. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(50-25*i), 0, 0)
  1753. LW.C0 = CFrame.new(-1-0.5*i, 0.5, -0.5) * CFrame.Angles(math.rad(90-60*i),math.rad(0),math.rad(45-20*i))
  1754. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1755. w3.C0 = CFrame.Angles(math.rad(180-90*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1756. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(25-25*i),0,math.rad(-5+5*i))
  1757. end
  1758. Neck.C0 = neckcf0
  1759. end
  1760. attack = false
  1761. end
  1762. function Reload2()
  1763. attack=true
  1764. for i = 0.1 , 1 , 0.1 do
  1765. wait()
  1766. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+10*i))
  1767. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-25*i), 0, 0)
  1768. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40+60*i),math.rad(0),math.rad(25))
  1769. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1770. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1771. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5*i),0,math.rad(20*i))
  1772. end
  1773. derp=prt6:Clone()
  1774. prt6.Transparency=1
  1775. prt6.CanCollide=false
  1776. derp.Parent=workspace
  1777. derp.CFrame=prt6.CFrame
  1778. derp.CanCollide=true
  1779. coroutine.resume(coroutine.create(function(Part)
  1780. wait(5)
  1781. Part.CanCollide=false
  1782. wait(3)
  1783. Part.Parent=nil
  1784. end),derp)
  1785. for i = 0.1 , 1 , 0.2 do
  1786. wait()
  1787. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+10))
  1788. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-25+5*i), 0, 0)
  1789. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40+60-30*i),math.rad(0),math.rad(25))
  1790. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1791. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1792. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5+5*i),0,math.rad(20))
  1793. end
  1794. for i = 0.1 , 1 , 0.1 do
  1795. wait()
  1796. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+10))
  1797. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-25+5), 0, 0)
  1798. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40+60-30-5*i),math.rad(0),math.rad(25))
  1799. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1800. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1801. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5+5+5*i),0,math.rad(20))
  1802. end
  1803. for i = 0.1 , 1 , 0.1 do
  1804. wait()
  1805. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+10))
  1806. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-25+5+10*i), 0, 0)
  1807. LW.C0 = CFrame.new(-1.5, 0.5, -0.5+0.5*i) * CFrame.Angles(math.rad(40+60-30-5-100*i),math.rad(0),math.rad(25-10*i))
  1808. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1809. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1810. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5+5+5+10*i),0,math.rad(20+20*i))
  1811. end
  1812. derp2=prt6:Clone()
  1813. derp2.Parent=swordholder
  1814. derp2.Transparency=0
  1815. wldderp=Instance.new("Weld")
  1816. wldderp.Parent=derp
  1817. wldderp.Part0=derp2
  1818. wldderp.Part1=LeftArm
  1819. wldderp.C0=CFrame.Angles(math.rad(90),0,0)*CFrame.new(0,1,0)
  1820. for i = 0.1 , 1 , 0.1 do
  1821. wait()
  1822. wldderp.C0=CFrame.Angles(math.rad(90-5*i),0,0)*CFrame.new(0,1+0.1*i,0.2*i)
  1823. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+10))
  1824. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-25+5+10-10*i), 0, 0)
  1825. LW.C0 = CFrame.new(-1.5, 0.5, -0.5+0.5-0.5*i) * CFrame.Angles(math.rad(40+60-30-5-100+120*i),math.rad(0),math.rad(25-10+10*i))
  1826. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1827. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1828. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5+5+5+10-10*i),0,math.rad(20+20-20*i))
  1829. end
  1830. derp2.Parent=nil
  1831. prt6.Transparency=0
  1832. prt6.CanCollide=false
  1833. for i = 0.1 , 1 , 0.1 do
  1834. wait()
  1835. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+10-10*i))
  1836. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-25+5+10*i), 0, 0)
  1837. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40+60-30-5-100+120-70*i),math.rad(0),math.rad(25))
  1838. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1839. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(30*i), math.rad(0)) * CFrame.new(0, 0, 0)
  1840. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5+5+5),0,math.rad(20))
  1841. end
  1842. for i = 0.1 , 1 , 0.2 do
  1843. wait()
  1844. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90+30*i),math.rad(0),math.rad(-60+10-10))
  1845. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-25+5+10), 0, 0)
  1846. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40+60-30-5-100+120-70+50*i),math.rad(0),math.rad(25))
  1847. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1848. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(30), math.rad(0)) * CFrame.new(0, 0, 0)
  1849. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5+5+5-10*i),0,math.rad(20))
  1850. end
  1851. Ammo = MaxAmmo
  1852. for i = 0.1 , 1 , 0.1 do
  1853. wait()
  1854. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90+30-30*i),math.rad(0),math.rad(-60))
  1855. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15+10*i), 0, 0)
  1856. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(65-40*i),math.rad(0),math.rad(25))
  1857. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1858. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(30-30*i), math.rad(0)) * CFrame.new(0, 0, 0)
  1859. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5-5*i),0,math.rad(20-20*i))
  1860. end
  1861. attack=false
  1862. end
  1863. function Gunzerker()
  1864. attack=true
  1865. Gunzerkering=true
  1866. for i = 0.1 , 1 , 0.1 do
  1867. wait()
  1868. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+60*i))
  1869. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  1870. LW.C0 = CFrame.new(-1.5, 0.5, -0.5+0.5*i) * CFrame.Angles(math.rad(40-60*i),math.rad(0),math.rad(25-25*i))
  1871. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1872. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5*i),0,0)
  1873. end
  1874. newgun.Parent=workspace
  1875. newprt3.BrickColor=prt3.BrickColor
  1876. neww1.Parent=newprt1
  1877. neww2.Parent=newprt2
  1878. neww3.Parent=newprt3
  1879. neww4.Parent=newprt4
  1880. neww5.Parent=newprt5
  1881. neww6.Parent=newprt6
  1882. neww1.Part0 = newprt1
  1883. neww1.Part1 = LeftArm
  1884. neww1.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0,0)
  1885. neww1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 1, 0)
  1886. print(newgun)
  1887. for i = 0.1 , 1 , 0.15 do
  1888. wait()
  1889. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90+10*i),math.rad(0),math.rad(0))
  1890. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-25*i), 0, 0)
  1891. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(40-60+120*i),math.rad(0),math.rad(0))
  1892. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1893. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5-10*i),0,0)
  1894. end
  1895. for i = 0.1 , 1 , 0.2 do
  1896. wait()
  1897. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90+10+10*i),math.rad(0),math.rad(0))
  1898. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0)
  1899. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(40-60+120+10*i),math.rad(0),math.rad(0))
  1900. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1901. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5-10-5*i),0,0)
  1902. end
  1903. for i = 0.1 , 1 , 0.15 do
  1904. wait()
  1905. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(110-60*i),math.rad(0),math.rad(-5*i))
  1906. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0)
  1907. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(110-60*i),math.rad(0),math.rad(5*i))
  1908. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1909. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5-10-5+10*i),0,0)
  1910. end
  1911. attack=false
  1912. end
  1913. function ChangeAmmoAnim(ammo,trail,derpcol)
  1914. for i = 0.1 , 1 , 0.1 do
  1915. wait()
  1916. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+10*i))
  1917. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-10*i), 0, 0)
  1918. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40+60*i),math.rad(0),math.rad(25))
  1919. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1920. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1921. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5*i),0,0)
  1922. end
  1923. for i = 0.1 , 1 , 0.15 do
  1924. wait()
  1925. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+10))
  1926. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-10+5*i), 0, 0)
  1927. LW.C0 = CFrame.new(-1.5+0.5*i, 0.5, -0.5) * CFrame.Angles(math.rad(40+60-50*i),math.rad(0),math.rad(25+20*i))
  1928. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1929. w3.C0 = CFrame.Angles(math.rad(90+90*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1930. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5+20*i),0,0)
  1931. end
  1932. for i = 0.1 , 1 , 0.1 do
  1933. wait()
  1934. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+10))
  1935. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-10+5+5*i), 0, 0)
  1936. LW.C0 = CFrame.new(-1.5+0.5, 0.5, -0.5) * CFrame.Angles(math.rad(40+60-50+50*i),math.rad(0),math.rad(25+20))
  1937. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1938. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1939. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5+20-10*i),0,0)
  1940. end
  1941. derpd=prt3:Clone()
  1942. derpd.Parent=swordholder
  1943. derpd.Transparency=0
  1944. derpdw=Instance.new("Weld")
  1945. derpdw.Parent=swordholder
  1946. derpdw.Part0=derpd
  1947. derpdw.Part1=LeftArm
  1948. derpdw.C0=CFrame.Angles(math.rad(90),math.rad(-30),0)*CFrame.new(-0.4,0.8,0)
  1949. prt3.Transparency=1
  1950. wait(0.1)
  1951. for i = 0.1 , 1 , 0.1 do
  1952. wait()
  1953. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+10))
  1954. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-10+5+5+5*i), 0, 0)
  1955. LW.C0 = CFrame.new(-1.5+0.5-0.5*i, 0.5, -0.5+0.5*i) * CFrame.Angles(math.rad(40+60-50+50+10*i),math.rad(0),math.rad(25+20-30*i))
  1956. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1957. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1958. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5+20-10-5*i),0,0)
  1959. derpdw.C0=CFrame.Angles(math.rad(90),math.rad(-30+30*i),0)*CFrame.new(-0.4+0.4*i,0.8+0.2*i,0)
  1960. end
  1961. for i = 0.1 , 1 , 0.2 do
  1962. wait()
  1963. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+10))
  1964. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-10+5+5+5), 0, 0)
  1965. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(40+60-50+50+10-140*i),math.rad(0),math.rad(25+20-30))
  1966. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1967. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1968. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5+20-10-5+30*i),0,math.rad(20*i))
  1969. derpdw.C0=CFrame.Angles(math.rad(90),math.rad(0),0)*CFrame.new(0,1,0)
  1970. end
  1971. CurrentAmmo = ammo
  1972. ammotrail = BrickColor.new(trail)
  1973. derpd.BrickColor=BrickColor.new(derpcol)
  1974. prt3.BrickColor=BrickColor.new(derpcol)
  1975. for i = 0.1 , 1 , 0.1 do
  1976. wait()
  1977. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+10))
  1978. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-10+5+5+5), 0, 0)
  1979. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(40+60-50+50+10-140+140*i),math.rad(0),math.rad(25+20-30+30*i))
  1980. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1981. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1982. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5+20-10-5+30-30*i),0,math.rad(20-20*i))
  1983. derpdw.C0=CFrame.Angles(math.rad(90),math.rad(0),0)*CFrame.new(0,1,0)
  1984. end
  1985. for i = 0.1 , 1 , 0.1 do
  1986. wait()
  1987. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+10))
  1988. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-10+5+5+5-5*i), 0, 0)
  1989. LW.C0 = CFrame.new(-1.5+0.5*i, 0.5, -0.5*i) * CFrame.Angles(math.rad(40+60-50+50+10-10*i),math.rad(0),math.rad(25+20))
  1990. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1991. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1992. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5+20-10-5+5*i),0,0)
  1993. derpdw.C0=CFrame.Angles(math.rad(90),math.rad(-30*i),0)*CFrame.new(-0.4*i,1-0.2*i,0)
  1994. end
  1995. prt3.Transparency=0
  1996. derpd.Parent=nil
  1997. for i = 0.1 , 1 , 0.1 do
  1998. wait()
  1999. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+10))
  2000. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-10+5+5+5-5-5*i), 0, 0)
  2001. LW.C0 = CFrame.new(-1.5+0.5, 0.5, -0.5) * CFrame.Angles(math.rad(40+60-50+50-60*i),math.rad(0),math.rad(25+20))
  2002. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2003. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2004. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5+20-10+10*i),0,0)
  2005. end
  2006. for i = 0.1 , 1 , 0.15 do
  2007. wait()
  2008. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+10))
  2009. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-10+5+5+5-5-5-5*i), 0, 0)
  2010. LW.C0 = CFrame.new(-1.5+0.5-0.5*i, 0.5, -0.5) * CFrame.Angles(math.rad(40+60*i),math.rad(0),math.rad(25+20-20*i))
  2011. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2012. w3.C0 = CFrame.Angles(math.rad(180-90*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2013. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5+20-20*i),0,0)
  2014. end
  2015. for i = 0.1 , 1 , 0.1 do
  2016. wait()
  2017. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+10-10*i))
  2018. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-10+10*i), 0, 0)
  2019. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40+60-60*i),math.rad(0),math.rad(25))
  2020. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2021. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2022. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5+5*i),0,0)
  2023. end
  2024. end
  2025. function NormalAmmo()
  2026. attack = true
  2027. ChangeAmmoAnim("Normal","White","White")
  2028. attack = false
  2029. end
  2030. function PoisonAmmo()
  2031. attack = true
  2032. ChangeAmmoAnim("Poison","Bright violet","Bright violet")
  2033. attack = false
  2034. coroutine.resume(coroutine.create(function()
  2035. repeat
  2036. wait(0.25+0.75*math.random())
  2037. if Ammo ~= 0 then
  2038. local meshb1 = Instance.new("SpecialMesh")
  2039. meshb1.Scale = Vector3.new(1,1,1)
  2040. meshb1.MeshType = "Sphere"
  2041. local shellb1 = Instance.new("Part")
  2042. shellb1.Material = "SmoothPlastic"
  2043. meshb1.Parent = shellb1
  2044. shellb1.Anchored = true
  2045. shellb1.formFactor = 3
  2046. shellb1.Size = Vector3.new(0.3,0.3,0.3)
  2047. shellb1.CFrame = CFrame.new((prt5.CFrame * CFrame.new(0,-prt5.Size.y/2,0)).p)
  2048. shellb1.Parent = swordholder
  2049. shellb1.Transparency = 0
  2050. shellb1.BrickColor = BrickColor.new("Alder")
  2051. shellb1.CanCollide = false
  2052. for i = 0 , 1 , 0.1 do
  2053. wait()
  2054. shellb1.CFrame = shellb1.CFrame + Vector3.new(0,-0.15,0)
  2055. shellb1.Transparency = 1*i
  2056. meshb1.Scale = Vector3.new(1,1+3*i,1)
  2057. end
  2058. shellb1.Parent=nil
  2059. end
  2060. until CurrentAmmo ~= "Poison"
  2061. end))
  2062. end
  2063. function KBAmmo()
  2064. attack = true
  2065. ChangeAmmoAnim("Knockback","Black","Black")
  2066. attack = false
  2067. end
  2068. function ExplodeAmmo()
  2069. attack = true
  2070. ChangeAmmoAnim("Explosion","Bright red","Bright red")
  2071. attack = false
  2072. end
  2073. function HerpAmmo()
  2074. attack = true
  2075. ChangeAmmoAnim("Herpity","White","Really red")
  2076. attack = false
  2077. coroutine.resume(coroutine.create(function()
  2078. repeat
  2079. wait()
  2080. ammotrail = BrickColor:random()
  2081. until CurrentAmmo ~= "Herpity"
  2082. end))
  2083. end
  2084. function suparKnockbackAmmo()
  2085. attack = true
  2086. ChangeAmmoAnim("suparKnockback","White","Really blue")
  2087. CurrentAmmo = "suparKnockback"
  2088. attack = false
  2089. coroutine.resume(coroutine.create(function()
  2090. repeat
  2091. wait()
  2092. ammotrail = BrickColor:random()
  2093. until CurrentAmmo ~= "suparKnockback"
  2094. end))
  2095. end
  2096. function BeesAmmo()
  2097. attack = true
  2098. ChangeAmmoAnim("Bees","White","New Yeller")
  2099. attack = false
  2100. coroutine.resume(coroutine.create(function()
  2101. repeat
  2102. wait()
  2103. ammotrail = BrickColor:random()
  2104. until CurrentAmmo ~= "Bees"
  2105. end))
  2106. end
  2107. function derpAmmo()
  2108. attack = true
  2109. ChangeAmmoAnim("derp","White","Bright green")
  2110. attack = false
  2111. coroutine.resume(coroutine.create(function()
  2112. repeat
  2113. wait()
  2114. ammotrail = BrickColor:random()
  2115. until CurrentAmmo ~= "derp"
  2116. end))
  2117. end
  2118. function TrollAmmo()
  2119. attack = true
  2120. ChangeAmmoAnim("Troll","White","Cyan")
  2121. attack = false
  2122. coroutine.resume(coroutine.create(function()
  2123. repeat
  2124. wait()
  2125. ammotrail = BrickColor:random()
  2126. until CurrentAmmo ~= "Troll"
  2127. end))
  2128. end
  2129. function AimedReady(mouse)
  2130. if Ammo <= 0 then Reload() return end
  2131. attack = true
  2132. local wt,t = faketors()
  2133. w7.Part1 = t
  2134. w8.Part1 = t
  2135. w9.Part1 = t
  2136. Character.Humanoid.WalkSpeed = 5
  2137. for i = 0.2 , 1 , 0.2 do
  2138. wait(0)
  2139. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2140. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-15*i), 0, 0)
  2141. LW.C0 = CFrame.new(-1.5, 0.5, -0.5+0.25*i) * CFrame.Angles(math.rad(40+35*i),math.rad(0),math.rad(25))
  2142. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2143. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2144. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  2145. wt.C0 = CFrame.Angles(0, math.rad(50*i), 0)
  2146. Neck.C0 = neckcf0 * CFrame.Angles(0,math.rad(-20*i),0)
  2147. end
  2148. for i = 0.2 , 1 , 0.2 do
  2149. wait(0)
  2150. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2151. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(10-10*i), 0, 0)
  2152. LW.C0 = CFrame.new(-1.5, 0.5, -0.25+0.25*i) * CFrame.Angles(math.rad(75+20*i),math.rad(0),math.rad(25))
  2153. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2154. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2155. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  2156. wt.C0 = CFrame.Angles(0, math.rad(50+10*i), 0)
  2157. end
  2158. wait() wait()
  2159. local orispread = spread
  2160. spread = 0
  2161. repeat
  2162. poisoncounter=math.random(1,5)
  2163. wait(0.5)
  2164. as(Head,1)
  2165. coroutine.resume(coroutine.create(function()
  2166. for z = 1 ,2 do
  2167. coroutine.resume(coroutine.create(function()
  2168. local meshb1 = Instance.new("BlockMesh")
  2169. meshb1.Scale = Vector3.new(1,1,1)
  2170. local shellb1 = Instance.new("Part")
  2171. shellb1.Material = "SmoothPlastic"
  2172. meshb1.Parent = shellb1
  2173. shellb1.Anchored = true
  2174. shellb1.formFactor = 3
  2175. shellb1.Size = Vector3.new(0.3,0.3,0.3) * (math.random(100,300)/100)
  2176. shellb1.CFrame = CFrame.new((prt5.CFrame * CFrame.new(0,-prt5.Size.y/2,0)).p) * CFrame.Angles(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)
  2177. shellb1.Parent = Character
  2178. shellb1.Transparency = 0
  2179. if math.random(1,2) == 1 then
  2180. shellb1.BrickColor = BrickColor.new("Bright red")
  2181. else
  2182. shellb1.BrickColor = BrickColor.new("Bright orange")
  2183. end
  2184. shellb1.CanCollide = false
  2185. local incre = math.random(0,60)/100
  2186. for i = 0 , 1 , 0.1 do
  2187. wait()
  2188. shellb1.CFrame = shellb1.CFrame + Torso.CFrame.lookVector*incre
  2189. shellb1.Transparency = 1*i
  2190. meshb1.Scale = Vector3.new(1+1*i,1+1*i,1+1*i)
  2191. end
  2192. shellb1.Parent=nil
  2193. end))
  2194. end
  2195. shoottrail(mouse)
  2196. end))
  2197. Ammo = Ammo - 1
  2198. for i = 0.5 , 1 , 0.5 do
  2199. wait(0)
  2200. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2201. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-5*i), 0, 0)
  2202. LW.C0 = CFrame.new(-1.5, 0.5, -0) * CFrame.Angles(math.rad(95+5*i),math.rad(0),math.rad(25))
  2203. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2204. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2205. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  2206. wt.C0 = CFrame.Angles(0, math.rad(60), 0)
  2207. Neck.C0 = neckcf0 * CFrame.Angles(0,math.rad(-20+5*i),0)
  2208. end
  2209. for i = 0.5 , 1 , 0.5 do
  2210. wait(0)
  2211. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2212. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-5+5*i), 0, 0)
  2213. LW.C0 = CFrame.new(-1.5, 0.5, -0) * CFrame.Angles(math.rad(100-5*i),math.rad(0),math.rad(25))
  2214. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2215. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2216. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  2217. wt.C0 = CFrame.Angles(0, math.rad(60), 0)
  2218. Neck.C0 = neckcf0 * CFrame.Angles(0,math.rad(-15-5*i),0)
  2219. end
  2220. until not buttonhold or Ammo <= 0
  2221. spread = orispread
  2222. for i = 0.2 , 1 , 0.2 do
  2223. wait(0)
  2224. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2225. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15*i), 0, 0)
  2226. LW.C0 = CFrame.new(-1.5, 0.5, -0.25*i) * CFrame.Angles(math.rad(95-25*i),math.rad(0),math.rad(25))
  2227. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2228. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2229. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  2230. wt.C0 = CFrame.Angles(0, math.rad(60-60*i), 0)
  2231. Neck.C0 = neckcf0 * CFrame.Angles(0,math.rad(-20+20*i),0)
  2232. end
  2233. w7.Part1 = Torso
  2234. w8.Part1 = Torso
  2235. w9.Part1 = Torso
  2236. RW.Part0 = Torso
  2237. LW.Part0 = Torso
  2238. Torso.Transparency = 0
  2239. RHL.Part0 = Torso
  2240. LHL.Part0 = Torso
  2241. t.Parent = nil
  2242. Character.Humanoid.WalkSpeed = 14
  2243. for i = 0.2 , 1 , 0.2 do
  2244. wait(0)
  2245. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2246. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15+10*i), 0, 0)
  2247. LW.C0 = CFrame.new(-1.5, 0.5, -0.25-0.25*i) * CFrame.Angles(math.rad(70-30*i),math.rad(0),math.rad(25))
  2248. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2249. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2250. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  2251. end
  2252. wait(0.25)
  2253. attack = false
  2254. end
  2255. function returnwelds()
  2256. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2257. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  2258. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40),math.rad(0),math.rad(25))
  2259. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2260. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2261. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  2262. RWL.C0 = CFrame.new(1, -1, 0) * CFrame.Angles(0, 0, 0)
  2263. RWL.C1 = CFrame.new(0.5, 1, 0)
  2264. LWL.C0 = CFrame.new(-1, -1, 0) * CFrame.Angles(0, 0, 0)
  2265. LWL.C1 = CFrame.new(-0.5, 1, 0)
  2266. Neck.C0 = neckcf0
  2267. end
  2268. keyhold = false
  2269. function ob1d(mouse)
  2270. hold = true
  2271. if attack then return end
  2272. keyhold = true
  2273. if Gunzerkering==true then
  2274. GunzerkReady(mouse)
  2275. else
  2276. Ready(mouse)
  2277. end
  2278. end
  2279. function ob1u(mouse)
  2280. keyhold = false
  2281. end
  2282. buttonhold = false
  2283. function key(key,mouse)
  2284. if attack then return end
  2285. if key=="h" and GunzerkDuration==1000 then
  2286. Gunzerker()
  2287. coroutine.resume(coroutine.create(function()
  2288. while GunzerkDuration~=0 do
  2289. wait(0)
  2290. GunzerkDuration=GunzerkDuration-2
  2291. end
  2292. Gunzerkering=false
  2293. while attack==true do
  2294. wait()
  2295. end
  2296. newgun.Parent=nil
  2297. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2298. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  2299. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40),math.rad(0),math.rad(25))
  2300. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2301. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(0),0,0)
  2302. wait()
  2303. while GunzerkDuration~=1000 and Gunzerkering==false do
  2304. wait()
  2305. GunzerkDuration=GunzerkDuration+2
  2306. end
  2307. end))
  2308. end
  2309. if Gunzerkering~=true then
  2310. if key == "f" then
  2311. if Ammo~=MaxAmmo then
  2312. Reload2()
  2313. end
  2314. end
  2315. if key == "q" then
  2316. buttonhold = true
  2317. AimedReady(mouse)
  2318. end
  2319. if key == "g" then
  2320. Melee()
  2321. end
  2322. if key == "e" then
  2323. NormalAmmo()
  2324. end
  2325. if key == "r" then
  2326. PoisonAmmo()
  2327. end
  2328. if key == "t" then
  2329. KBAmmo()
  2330. end
  2331. if key == "y" then
  2332. ExplodeAmmo()
  2333. end
  2334. --[[DERP AMMO]]--
  2335. if key == "z" then
  2336. HerpAmmo()
  2337. end
  2338. if key == "x" then
  2339. suparKnockbackAmmo()
  2340. end
  2341. if key == "c" then
  2342. TrollAmmo()
  2343. end
  2344. if key == "v" then
  2345. derpAmmo()
  2346. end
  2347. if key=="b" then
  2348. BeesAmmo()
  2349. end
  2350. end
  2351. end
  2352. function key2(key)
  2353. if key == "f" or key == "q" then
  2354. buttonhold = false
  2355. end
  2356. end
  2357. function s(mouse)
  2358. repeat wait() until not attack
  2359. repeat wait() until not ev.Value
  2360. mouse.Button1Down:connect(function() ob1d(mouse) end)
  2361. mouse.Button1Up:connect(function() ob1u(mouse) end)
  2362. mouse.KeyDown:connect(function(ke) key(ke,mouse) end)
  2363. mouse.KeyUp:connect(key2)
  2364. equipanim()
  2365. ev.Value = true
  2366. end
  2367. function ds(mouse)
  2368. keyhold = false
  2369. repeat wait() until not attack
  2370. repeat wait() until ev.Value
  2371. hideanim()
  2372. wait(0.1)
  2373. ev.Value = false
  2374. end
  2375. Bin.Selected:connect(s)
  2376. Bin.Deselected:connect(ds)
  2377. if PlayerGui:findFirstChild("AmmoMeter") ~= nil then
  2378. PlayerGui:findFirstChild("AmmoMeter").Parent = nil
  2379. end
  2380. coroutine.resume(coroutine.create(function()
  2381. local SG = Instance.new("ScreenGui",PlayerGui)
  2382. SG.Name = "AmmoMeter"
  2383. local frame = Instance.new("Frame",SG)
  2384. frame.Size = UDim2.new(0.2,0,0.1,0)
  2385. frame.Position = UDim2.new(0.5-0.1,0,0.05,0)
  2386. frame.BackgroundColor3 = BrickColor.new("Brown").Color
  2387. local Ammotext = Instance.new("TextLabel",frame)
  2388. Ammotext.Size = UDim2.new(1,0,0.35,0)
  2389. Ammotext.BackgroundTransparency = 1
  2390. Ammotext.Text = "Ammo"
  2391. Ammotext.FontSize = "Size10"
  2392. Ammotext.TextColor3 = BrickColor.new("White").Color
  2393. local backing = Instance.new("ImageLabel",frame)
  2394. backing.Size = UDim2.new(0.8,0,0.2,0)
  2395. backing.Image = "http://www.roblox.com/asset/?id=48965808"
  2396. backing.Position = UDim2.new(0.1,0,0.3,0)
  2397. backing.BackgroundColor3 = BrickColor.new("Black").Color
  2398. local img = Instance.new("ImageLabel",backing)
  2399. img.Size = UDim2.new(1,0,1,0)
  2400. img.Image = "http://www.roblox.com/asset/?id=48965808"
  2401. img.Position = UDim2.new(0,0,0,0)
  2402. img.BackgroundColor3 = BrickColor.new("Brown").Color
  2403. local percent = Instance.new("TextLabel",backing)
  2404. percent.Size = UDim2.new(1,0,1,0)
  2405. percent.BackgroundTransparency = 1
  2406. percent.TextColor3 = BrickColor.new("White").Color
  2407. percent.Text = Ammo.."/".. MaxAmmo
  2408. percent.FontSize = "Size10"
  2409. local Gunzerktext = Instance.new("TextLabel",frame)
  2410. Gunzerktext.Size = UDim2.new(1,0,1.2,0)
  2411. Gunzerktext.BackgroundTransparency = 1
  2412. Gunzerktext.Text = "Gunzerk Duration"
  2413. Gunzerktext.FontSize = "Size10"
  2414. Gunzerktext.TextColor3 = BrickColor.new("White").Color
  2415. local Gunzerkbacking = Instance.new("ImageLabel",frame)
  2416. Gunzerkbacking.Size = UDim2.new(0.8,0,0.2,0)
  2417. Gunzerkbacking.Image = "http://www.roblox.com/asset/?id=48965808"
  2418. Gunzerkbacking.Position = UDim2.new(0.1,0,0.75,0)
  2419. Gunzerkbacking.BackgroundColor3 = BrickColor.new("Black").Color
  2420. local Gunzerkimg = Instance.new("ImageLabel",Gunzerkbacking)
  2421. Gunzerkimg.Size = UDim2.new(1,0,1,0)
  2422. Gunzerkimg.Image = "http://www.roblox.com/asset/?id=48965808"
  2423. Gunzerkimg.Position = UDim2.new(0,0,0,0)
  2424. Gunzerkimg.BackgroundColor3 = BrickColor.new("Brown").Color
  2425. local currentam = Instance.new("TextLabel",frame)
  2426. currentam.Size = UDim2.new(0.5,0,0.25,0)
  2427. currentam.Position = UDim2.new(0,0,1,0)
  2428. currentam.BackgroundTransparency = 0
  2429. currentam.BackgroundColor3 = BrickColor.new("Brown").Color
  2430. currentam.TextColor3 = BrickColor.new("White").Color
  2431. currentam.Text = CurrentAmmo
  2432. currentam.FontSize = "Size18"
  2433. repeat
  2434. wait()
  2435. pcall(function()
  2436. img.Size = UDim2.new(1*(Ammo/MaxAmmo),0,1,0)
  2437. percent.Text = Ammo.."/".. MaxAmmo
  2438. Gunzerkimg.Size = UDim2.new(1*(GunzerkDuration/1000),0,1,0)
  2439. currentam.Text = CurrentAmmo
  2440. end)
  2441. until SG.Parent == nil
  2442. end))
  2443. coroutine.resume(coroutine.create(function()
  2444. swordholder.Parent = workspace
  2445. for i=0,9999999999 do
  2446. wait()
  2447. if swordholder.Parent==nil then
  2448. wait(0.3)
  2449. swordholder.Parent = workspace
  2450. prt1.Parent = swordholder
  2451. prt2.Parent = swordholder
  2452. prt3.Parent = swordholder
  2453. prt4.Parent = swordholder
  2454. prt5.Parent = swordholder
  2455. prt6.Parent = swordholder
  2456. prt7.Parent = swordholder
  2457. prt8.Parent = swordholder
  2458. prt9.Parent = swordholder
  2459. w1.Parent=prt1
  2460. w2.Parent=prt2
  2461. w3.Parent=prt3
  2462. w4.Parent=prt4
  2463. w5.Parent=prt5
  2464. w6.Parent=prt6
  2465. w7.Parent=prt7
  2466. w8.Parent=prt8
  2467. w9.Parent=prt9
  2468. if Gunzerkering==true then
  2469. newgun.Parent = workspace
  2470. newprt1.Parent = newgun
  2471. newprt2.Parent = newgun
  2472. newprt3.Parent = newgun
  2473. newprt4.Parent = newgun
  2474. newprt5.Parent = newgun
  2475. newprt6.Parent = newgun
  2476. neww1.Parent=newprt1
  2477. neww2.Parent=newprt2
  2478. neww3.Parent=newprt3
  2479. neww4.Parent=newprt4
  2480. neww5.Parent=newprt5
  2481. neww6.Parent=newprt6
  2482. end
  2483. end
  2484. end
  2485. end))
  2486. Character.Humanoid.WalkSpeed = 14
  2487. -- mediafire
Add Comment
Please, Sign In to add comment