Advertisement
Hebablazin

Acid Gun

May 30th, 2016
341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 57.30 KB | None | 0 0
  1. --Acid Gun Gifted by machontz, Regular Script!
  2.  
  3. Player = game:GetService("Players").TheMoonlightGlows
  4. Character = Player.Character
  5. PlayerGui = Player.PlayerGui
  6. Backpack = Player.Backpack
  7. Torso = Character.Torso
  8. Head = Character.Head
  9. LeftArm = Character["Left Arm"]
  10. LeftLeg = Character["Left Leg"]
  11. RightArm = Character["Right Arm"]
  12. RightLeg = Character["Right Leg"]
  13. LS = Torso["Left Shoulder"]
  14. LH = Torso["Left Hip"]
  15. RS = Torso["Right Shoulder"]
  16. RH = Torso["Right Hip"]
  17. ModelName = "Weapon"
  18. attack = false
  19. attacktype = 1
  20. Hitdeb = 0
  21. Neck = Torso.Neck
  22. local neckcf0 = Neck.C0
  23. ----------------------------
  24. --Customize
  25. Ammo = 10000
  26. --if (string.match(Player.Unlocks.Value,"RasAlgethi Ammo+") ~= nil) then
  27. MaxAmmo = 10000000
  28. --else
  29. --MaxAmmo = 10000000
  30. --end
  31. mindamage = 12
  32. maxdamage = 30
  33. crtmaxdamage = 39
  34. omindamage = mindamage
  35. omaxdamage = maxdamage
  36. ocrtmaxdamage = crtmaxdamage
  37. crtrate = 100/5
  38. --100%/critpercentage
  39. oblkbrkr = 0
  40. blockbreaker = oblkbrkr
  41. spread = 2
  42. spread = spread*100
  43. Ammoregen = 20
  44. --if (string.match(Player.Unlocks.Value,"RasAlgethi Range+") ~= nil) then
  45. range = 700
  46. --else
  47. --range = 15000
  48. --end
  49. rangepower = 50
  50. CurrentAmmo = "Normal"
  51. handlecolor = BrickColor.new("Dark gray")
  52. bcolor = BrickColor.new("Pastel yellow")
  53. gemcolor = BrickColor.new("Black")
  54. ammotrail = BrickColor.new("Pastel brown")
  55. ToolName = "Ras Algethi"
  56. ---------------------------------------------------------------------------------------------------------------------------------------
  57. if Character:findFirstChild("EquippedVal",true) ~= nil then
  58. Character:findFirstChild("EquippedVal",true).Parent = nil
  59. end
  60. ev = Instance.new("BoolValue",Character)
  61. ev.Name = "EquippedVal"
  62. ev.Value = false
  63. if Character:findFirstChild("Block",true) ~= nil then
  64. Character:findFirstChild("Block",true).Parent = nil
  65. end
  66. --player
  67. player = nil
  68. --welds
  69. RW, LW , RWL, LWL = Instance.new("Weld"), Instance.new("Weld"), Instance.new("Weld"), Instance.new("Weld")
  70. --what anim
  71. anim = "none"
  72. --other var
  73. player = Player
  74. ch = Character
  75. --save shoulders
  76. AoETrue = {}
  77. RSH, LSH , RHL, LHL = ch.Torso["Right Shoulder"], ch.Torso["Left Shoulder"] , ch.Torso["Right Hip"] , ch.Torso["Left Hip"]
  78. function RWFunc()
  79. RW.Part1 = ch["Right Arm"]
  80. RSH.Part1 = nil
  81. end
  82. function LWFunc()
  83. LW.Part1 = ch["Left Arm"]
  84. LSH.Part1 = nil
  85. end
  86. function RWLFunc()
  87. RWL.Part1 = ch["Right Leg"]
  88. RHL.Part1 = nil
  89. ch["Right Leg"].Name = "RightLeg"
  90. RightLeg.CanCollide = false
  91. end
  92. function LWLFunc()
  93. LWL.Part1 = ch["Left Leg"]
  94. LHL.Part1 = nil
  95. ch["Left Leg"].Name = "LeftLeg"
  96. LeftLeg.CanCollide = true
  97. end
  98. function RWLRem()
  99. RightLeg.Name = "Right Leg"
  100. RWL.Part1 = nil
  101. RHL.Part1 = ch["Right Leg"]
  102. RightLeg.CanCollide = false
  103. end
  104. function LWLRem()
  105. LeftLeg.Name = "Left Leg"
  106. LWL.Part1 = nil
  107. LHL.Part1 = ch["Left Leg"]
  108. LeftLeg.CanCollide = false
  109. end
  110. function RWRem()
  111. RW.Part1 = nil
  112. RSH.Part1 = ch["Right Arm"]
  113. end
  114. function LWRem()
  115. LW.Part1 = nil
  116. LSH.Part1 = ch["Left Arm"]
  117. end
  118. if Character:findFirstChild(ModelName,true) ~= nil then
  119. Character:findFirstChild(ModelName,true).Parent = nil
  120. RHL.Part1 = ch["Right Leg"]
  121. LHL.Part1 = ch["Left Leg"]
  122. RSH.Part1 = ch["Right Arm"]
  123. LSH.Part1 = ch["Left Arm"]
  124. end
  125. local swordholder = Instance.new("Model")
  126. swordholder.Name = ModelName
  127. swordholder.Parent = Character
  128. --derp
  129. RW.Part0 = ch.Torso
  130. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  131. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  132. RW.Parent = swordholder
  133. --
  134. LW.Part0 = ch.Torso
  135. LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  136. LW.C1 = CFrame.new(0, 0.5, 0)
  137. LW.Parent = swordholder
  138. --
  139. RWL.Part0 = ch.Torso
  140. RWL.C0 = CFrame.new(1, -1, 0) * CFrame.Angles(0, 0, 0)
  141. RWL.C1 = CFrame.new(0.5, 1, 0)
  142. RWL.Parent = swordholder
  143. --
  144. LWL.Part0 = ch.Torso
  145. LWL.C0 = CFrame.new(-1, -1, 0) * CFrame.Angles(0, 0, 0)
  146. LWL.C1 = CFrame.new(-0.5, 1, 0)
  147. LWL.Parent = swordholder
  148. local msh1 = Instance.new("CylinderMesh")
  149. msh1.Scale = Vector3.new(1,1,1)
  150. local msh2 = Instance.new("BlockMesh")
  151. msh2.Scale = Vector3.new(1,1,1)
  152. local msh3 = Instance.new("CylinderMesh")
  153. msh3.Scale = Vector3.new(1,1,1)
  154. local msh4 = Instance.new("CylinderMesh")
  155. msh4.Scale = Vector3.new(1,1,1)
  156. local msh5 = Instance.new("CylinderMesh")
  157. msh5.Scale = Vector3.new(1,1,1)
  158. local msh6 = Instance.new("BlockMesh")
  159. msh6.Scale = Vector3.new(1,1,1)
  160. local torsc = false
  161. for i,z in pairs(Character:GetChildren()) do
  162. if z.className == "CharacterMesh" then
  163. if z.BodyPart == Enum.BodyPart.Torso then
  164. torsc = true
  165. end
  166. end
  167. end
  168. if torsc then
  169. msh7 = Instance.new("SpecialMesh")
  170. msh7.MeshId = "http://www.roblox.com/asset/?id=3270017"
  171. msh7.Scale = Vector3.new(2.01,1,1.01)
  172. msh7.Scale = Vector3.new(2.01,1,1.01)
  173. else
  174. msh7 = Instance.new("BlockMesh")
  175. msh7.Scale = Vector3.new(2.01,0.1,1.01)
  176. end
  177. local msh8 = Instance.new("SpecialMesh")
  178. msh8.MeshId = "http://www.roblox.com/asset/?id=3270017"
  179. msh8.Scale = Vector3.new(0.5,0.5,7)
  180. msh8.Scale = Vector3.new(0.5,0.5,7)
  181. local msh9 = Instance.new("BlockMesh")
  182. msh9.Scale = Vector3.new(1,1,1)
  183. local prt1 = Instance.new("Part")
  184. prt1.formFactor = 3
  185. prt1.CanCollide = false
  186. prt1.Name = "Handle"
  187. prt1.Locked = true
  188. prt1.Size = Vector3.new(0.3,1,0.3)
  189. prt1.Parent = swordholder
  190. msh1.Parent = prt1
  191. prt1.BrickColor = handlecolor
  192. local prt2 = Instance.new("Part")
  193. prt2.formFactor = 3
  194. prt2.CanCollide = false
  195. prt2.Name = "Handle2"
  196. prt2.Locked = true
  197. prt2.Size = Vector3.new(0.5,0.2,1.5)
  198. prt2.Parent = swordholder
  199. msh2.Parent = prt2
  200. prt2.BrickColor = handlecolor
  201. local prt3 = Instance.new("Part")
  202. prt3.formFactor = 3
  203. prt3.CanCollide = false
  204. prt3.Name = "Handle3"
  205. prt3.Locked = true
  206. prt3.Size = Vector3.new(0.7,1.2,0.7)
  207. prt3.Parent = swordholder
  208. msh3.Parent = prt3
  209. prt3.BrickColor = bcolor
  210. local prt4 = Instance.new("Part")
  211. prt4.formFactor = 3
  212. prt4.CanCollide = false
  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")
  220. prt5.formFactor = 3
  221. prt5.CanCollide = false
  222. prt5.Name = "Barrel"
  223. prt5.Locked = true
  224. prt5.Size = Vector3.new(0.4,2.5,0.4)
  225. prt5.Parent = swordholder
  226. msh5.Parent = prt5
  227. prt5.BrickColor = handlecolor
  228. local prt6 = Instance.new("Part")
  229. prt6.formFactor = 3
  230. prt6.CanCollide = false
  231. prt6.Name = "BarrelHandle"
  232. prt6.Locked = true
  233. prt6.Size = Vector3.new(0.3,1,0.3)
  234. prt6.Parent = swordholder
  235. msh6.Parent = prt6
  236. prt6.BrickColor = handlecolor
  237. local prt7 = Instance.new("Part")
  238. prt7.formFactor = 3
  239. prt7.CanCollide = false
  240. prt7.Name = "HolsterStrap"
  241. prt7.Locked = true
  242. prt7.Size = Vector3.new(1,1,1)
  243. prt7.Parent = swordholder
  244. msh7.Parent = prt7
  245. prt7.BrickColor = handlecolor
  246. local prt8 = Instance.new("Part")
  247. prt8.formFactor = 3
  248. prt8.CanCollide = false
  249. prt8.Name = "Holster"
  250. prt8.Locked = true
  251. prt8.Size = Vector3.new(1,1,1)
  252. prt8.Parent = swordholder
  253. msh8.Parent = prt8
  254. prt8.BrickColor = handlecolor
  255. local prt9 = Instance.new("Part")
  256. prt9.formFactor = 3
  257. prt9.CanCollide = false
  258. prt9.Name = "AmmoHolster"
  259. prt9.Locked = true
  260. prt9.Size = Vector3.new(0.2,1,0.7)
  261. prt9.Parent = swordholder
  262. msh9.Parent = prt9
  263. prt9.BrickColor = handlecolor
  264. local w1 = Instance.new("Weld")
  265. w1.Parent = prt1
  266. w1.Part0 = prt1
  267. local w2 = Instance.new("Weld")
  268. w2.Parent = prt2
  269. w2.Part0 = prt2
  270. w2.Part1 = prt1
  271. w2.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  272. w2.C0 = CFrame.Angles(math.rad(0), 0, 0) * CFrame.new(0, 0.6,0.5)
  273. local w3 = Instance.new("Weld")
  274. w3.Parent = prt3
  275. w3.Part0 = prt3
  276. w3.Part1 = prt2
  277. w3.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  278. w3.C0 = CFrame.Angles(math.rad(90+45), 0, 0) * CFrame.new(0, 0.25,-0.5)
  279. local w4 = Instance.new("Weld")
  280. w4.Parent = prt4
  281. w4.Part0 = prt4
  282. w4.Part1 = prt2
  283. w4.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  284. w4.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,0.5)
  285. local w5 = Instance.new("Weld")
  286. w5.Parent = prt5
  287. w5.Part0 = prt5
  288. w5.Part1 = prt3
  289. w5.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  290. w5.C0 = CFrame.Angles(math.rad(0), 0, 0) * CFrame.new(0, 1.5,0)
  291. local w6 = Instance.new("Weld")
  292. w6.Parent = prt6
  293. w6.Part0 = prt6
  294. w6.Part1 = prt3
  295. w6.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  296. w6.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 1.5,-0.5)
  297. local w7 = Instance.new("Weld")
  298. w7.Parent = prt7
  299. w7.Part0 = prt7
  300. w7.Part1 = Torso
  301. w7.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  302. if torsc then
  303. w7.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 1,0)
  304. else
  305. w7.C0 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1,0)
  306. end
  307. local w8 = Instance.new("Weld")
  308. w8.Parent = prt8
  309. w8.Part0 = prt8
  310. w8.Part1 = Torso
  311. w8.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  312. w8.C0 = CFrame.Angles(math.rad(45), 0, 0) * CFrame.new(-1.1, 1-0.25,0)
  313. local w9 = Instance.new("Weld")
  314. w9.Parent = prt9
  315. w9.Part0 = prt9
  316. w9.Part1 = Torso
  317. w9.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  318. w9.C0 = CFrame.Angles(math.rad(45), 0, 0) * CFrame.new(1, 0.75,-0.5)
  319. local RAP = Instance.new("Part")
  320. RAP.formFactor = 0
  321. RAP.CanCollide = false
  322. RAP.Name = "RAPart"
  323. RAP.Locked = true
  324. RAP.Size = Vector3.new(1,1,1)
  325. RAP.Parent = swordholder
  326. RAP.Transparency = 1
  327. local w = Instance.new("Weld")
  328. w.Parent = RAP
  329. w.Part0 = RAP
  330. w.Part1 = RightArm
  331. w.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0,0)
  332. w.C0 = CFrame.fromEulerAnglesXYZ(math.rad(0), 0, 0) * CFrame.new(0, 1, 0)
  333. function unequipweld()
  334. w1.Part1 = Torso
  335. w1.C1 = CFrame.fromEulerAnglesXYZ(0, math.rad(0), math.rad(0)) * CFrame.new(0, 0,0)
  336. w1.C0 = CFrame.fromEulerAnglesXYZ(math.rad(180),math.rad(-0), math.rad(0)) * CFrame.new(-1.15, 1, -0.6)
  337. end
  338. unequipweld()
  339. function equipweld()
  340. w1.Part0 = prt1
  341. w1.Part1 = RAP
  342. w1.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0,0)
  343. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  344. end
  345. function ss(parent,p) --Slash
  346. local SlashSound = Instance.new("Sound")
  347. SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
  348. SlashSound.Parent = parent
  349. SlashSound.Volume = .7
  350. SlashSound.Pitch = p
  351. SlashSound.PlayOnRemove = true
  352. coroutine.resume(coroutine.create(function()
  353. wait()
  354. SlashSound.Parent = nil
  355. end))
  356. end
  357. function uss(parent,p) --unsheath
  358. local SlashSound = Instance.new("Sound")
  359. SlashSound.SoundId = "rbxasset://sounds\\unsheath.wav"
  360. SlashSound.Parent = parent
  361. SlashSound.Volume = .7
  362. SlashSound.Pitch = p
  363. SlashSound.PlayOnRemove = true
  364. coroutine.resume(coroutine.create(function()
  365. wait()
  366. SlashSound.Parent = nil
  367. end))
  368. end
  369. function cs(parent,p) --Magic Charge
  370. local SlashSound = Instance.new("Sound")
  371. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2101137"
  372. SlashSound.Parent = parent
  373. SlashSound.Parent = parent
  374. SlashSound.Volume = .7
  375. SlashSound.Pitch = p
  376. SlashSound.PlayOnRemove = true
  377. coroutine.resume(coroutine.create(function()
  378. wait()
  379. SlashSound.Parent = nil
  380. end))
  381. end
  382. function ls(parent,p) --Lazer Sound
  383. local SlashSound = Instance.new("Sound")
  384. SlashSound.SoundId = "http://www.roblox.com/asset?id=1369158"
  385. SlashSound.Parent = parent
  386. SlashSound.Parent = parent
  387. SlashSound.Volume = .7
  388. SlashSound.Pitch = p
  389. SlashSound.PlayOnRemove = true
  390. coroutine.resume(coroutine.create(function()
  391. wait()
  392. SlashSound.Parent = nil
  393. end))
  394. end
  395. function ts(parent,p)
  396. local SlashSound = Instance.new("Sound")
  397. SlashSound.SoundId = "http://www.roblox.com/asset/?id=12222030"
  398. SlashSound.Parent = parent
  399. SlashSound.Parent = parent
  400. SlashSound.Volume = .7
  401. SlashSound.Pitch = p
  402. SlashSound.PlayOnRemove = true
  403. coroutine.resume(coroutine.create(function()
  404. wait()
  405. SlashSound.Parent = nil
  406. end))
  407. end
  408. function fs(parent,p) --Fire Sound
  409. local SlashSound = Instance.new("Sound")
  410. SlashSound.SoundId = "http://www.roblox.com/asset/?id=31758982"
  411. SlashSound.Parent = parent
  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 ms(parent,p) --Metal Cling Sound
  422. local SlashSound = Instance.new("Sound")
  423. SlashSound.SoundId = "rbxasset://sounds\\metal.ogg"
  424. SlashSound.Parent = parent
  425. SlashSound.Volume = 5
  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 bs(parent,p) --Berserk Sound
  434. local SlashSound = Instance.new("Sound")
  435. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2676305"
  436. SlashSound.Parent = parent
  437. SlashSound.Parent = parent
  438. SlashSound.Volume = 1
  439. SlashSound.Pitch = p
  440. SlashSound.PlayOnRemove = true
  441. coroutine.resume(coroutine.create(function()
  442. wait()
  443. SlashSound.Parent = nil
  444. end))
  445. end
  446. function hs(parent,p) --Ammo Hit Sound
  447. ms(parent,p)
  448. end
  449. function as(parent,p) --Gun Shoot Sound
  450. local SlashSound = Instance.new("Sound")
  451. SlashSound.SoundId = "http://roblox.com/asset/?id=10209257"
  452. SlashSound.Parent = parent
  453. SlashSound.Volume = 0.5
  454. SlashSound.Pitch = p
  455. SlashSound.PlayOnRemove = true
  456. coroutine.resume(coroutine.create(function()
  457. wait()
  458. SlashSound.Parent = nil
  459. end))
  460. end
  461. function ars(parent,p) --Gun Reload Sound
  462. local SlashSound = Instance.new("Sound")
  463. SlashSound.SoundId = "http://roblox.com/asset/?id=10209869"
  464. SlashSound.Parent = parent
  465. SlashSound.Parent = parent
  466. SlashSound.Volume = 1
  467. SlashSound.Pitch = p
  468. SlashSound.PlayOnRemove = true
  469. coroutine.resume(coroutine.create(function()
  470. wait()
  471. SlashSound.Parent = nil
  472. end))
  473. end
  474. --
  475. --
  476. function returndmg()
  477. mindamage = omindamage
  478. maxdamage = omaxdamage
  479. crtmaxdamage = ocrtmaxdamage
  480. end
  481. function subdmg(sub)
  482. mindamage = omindamage - sub
  483. maxdamage = omaxdamage - sub
  484. crtmaxdamage = ocrtmaxdamage - sub
  485. end
  486. function prcntdmg(sub)
  487. mindamage = math.floor(omindamage - (omindamage*(sub/100)))
  488. maxdamage = math.floor(omaxdamage - (omaxdamage*(sub/100)))
  489. crtmaxdamage = math.floor(ocrtmaxdamage - (ocrtmaxdamage*(sub/100)))
  490. end
  491. function tagHumanoid(humanoid, player)
  492. local creator_tag = Instance.new("ObjectValue")
  493. creator_tag.Value = player
  494. creator_tag.Name = "creator"
  495. creator_tag.Parent = humanoid
  496. end
  497. function untagHumanoid(humanoid)
  498. if humanoid ~= nil then
  499. local tag = humanoid:findFirstChild("creator")
  500. if tag ~= nil then
  501. tag.Parent = nil
  502. end
  503. end
  504. end
  505. local function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  506. return game.Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  507. end
  508. function hideanim()
  509. attack = true
  510. ars(Head,0.85)
  511. for i = 0.25 ,1 ,0.25 do
  512. wait()
  513. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  514. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-15*i), 0, 0)
  515. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40),math.rad(0),math.rad(25+10*i))
  516. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  517. w3.C0 = CFrame.Angles(math.rad(90+25*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  518. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5*i),0,math.rad(0))
  519. end
  520. for i = 0.1 ,1 ,0.1 do
  521. wait()
  522. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  523. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(10-10*i), 0, 0)
  524. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40),math.rad(0),math.rad(35+10*i))
  525. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  526. w3.C0 = CFrame.Angles(math.rad(115+20*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  527. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5-5*i),0,math.rad(0))
  528. end
  529. for i = 0.1 ,1 ,0.1 do
  530. wait()
  531. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90-130*i),math.rad(0),math.rad(-60+60*i))
  532. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0)
  533. 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))
  534. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  535. w3.C0 = CFrame.Angles(math.rad(135), 0, 0) * CFrame.new(0, 0.25,-0.5)
  536. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-10+40*i),0,math.rad(-30*i))
  537. end
  538. unequipweld()
  539. for i = 0.1 ,1 ,0.1 do
  540. wait()
  541. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(-20+20*i),math.rad(0),math.rad(0))
  542. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0)
  543. 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))
  544. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  545. w3.C0 = CFrame.Angles(math.rad(135), 0, 0) * CFrame.new(0, 0.25,-0.5)
  546. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(30-30*i),0,math.rad(-30+30*i))
  547. end
  548. Neck.C0 = neckcf0
  549. RWRem()
  550. LWRem()
  551. attack = false
  552. end
  553. function equipanim()
  554. attack = true
  555. RWFunc()
  556. w3.C0 = CFrame.Angles(math.rad(135), 0, 0) * CFrame.new(0, 0.25,-0.5)
  557. for i = 0.1 ,1 ,0.1 do
  558. wait()
  559. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(-20*i),math.rad(0),math.rad(0))
  560. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  561. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
  562. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  563. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(30*i),0,math.rad(-30*i))
  564. end
  565. equipweld()
  566. ars(Head,1)
  567. for i = 0.1 ,1 ,0.1 do
  568. wait()
  569. RW.C0 = CFrame.new(1.5, 0.5, -0.25*i) * CFrame.Angles(math.rad(-20+130*i),math.rad(0),math.rad(0))
  570. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  571. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
  572. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  573. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(30-35*i),0,math.rad(-30))
  574. end
  575. LWFunc()
  576. for i = 0.1 ,1 ,0.1 do
  577. wait()
  578. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(110-20*i),math.rad(0),math.rad(-60*i))
  579. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25*i), 0, 0)
  580. LW.C0 = CFrame.new(-1.5, 0.5, -0.5*i) * CFrame.Angles(math.rad(40*i),math.rad(0),math.rad(25*i))
  581. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  582. w3.C0 = CFrame.Angles(math.rad(135-45*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  583. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5+5*i),0,math.rad(-30+30*i))
  584. end
  585. Neck.C0 = neckcf0
  586. attack = false
  587. end
  588. function faketors()
  589. local T = Instance.new("Part")
  590. T.formFactor = 0
  591. T.CanCollide = false
  592. T.Name = "FakeTorso"
  593. T.Locked = true
  594. T.Size = Torso.Size
  595. T.Parent = swordholder
  596. T.Transparency = 1
  597. T.BrickColor = Torso.BrickColor
  598. for i,z in pairs(Character:GetChildren()) do
  599. if z.className == "CharacterMesh" then
  600. if z.BodyPart == Enum.BodyPart.Torso then
  601. local SM = Instance.new("SpecialMesh",T)
  602. SM.MeshId = "http://www.roblox.com/asset/?id=" .. z.MeshId
  603. if z.BaseTextureId ~= 0 then
  604. SM.TextureId = z.BaseTextureId
  605. elseif z.OverlayTextureId ~= 0 then
  606. SM.TextureId = z.OverlayTextureId
  607. else
  608. SM.TextureId = ""
  609. end
  610. end
  611. end
  612. end
  613. local wt = Instance.new("Weld")
  614. wt.Parent = T
  615. wt.Part0 = T
  616. wt.Part1 = Torso
  617. RW.Part0 = T
  618. LW.Part0 = T
  619. T.Transparency = 0
  620. Torso.Transparency = 1
  621. RHL.Part0 = T
  622. LHL.Part0 = T
  623. return wt,T
  624. end
  625. if (script.Parent.className ~= "HopperBin") then
  626. Tool = Instance.new("HopperBin")
  627. Tool.Parent = Backpack
  628. Tool.Name = ToolName
  629. script.Parent = Tool
  630. end
  631. Bin = script.Parent
  632. function damagesplat(dmg,hit,crit,blocked)
  633. local mo = Instance.new("Model")
  634. mo.Name = dmg
  635. local pa = Instance.new("Part",mo)
  636. pa.formFactor = 3
  637. pa.Size = Vector3.new(0.8,0.3,0.8)
  638. if crit then
  639. pa.BrickColor = BrickColor.new("Bright yellow")
  640. elseif not crit then
  641. pa.BrickColor = BrickColor.new("Bright red")
  642. end
  643. if blocked then pa.BrickColor = BrickColor.new("Bright blue") end
  644. pa.CFrame = CFrame.new(hit.Position) * CFrame.new(0, 3, 0)
  645. pa.Name = "Head"
  646. local hah = Instance.new("Humanoid")
  647. hah.Parent = mo
  648. hah.MaxHealth = 0
  649. hah.Health = 0
  650. local bp = Instance.new("BodyPosition")
  651. bp.P = 14000
  652. bp.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  653. bp.position = hit.Position + Vector3.new(0, 5, 0)
  654. coroutine.resume(coroutine.create(function()
  655. wait()
  656. mo.Parent = workspace
  657. bp.Parent = pa
  658. wait(1.4)
  659. mo:remove()
  660. end))
  661. return pa
  662. end
  663. function damage(hum,dmg,critornot)
  664. local pa = damagesplat(dmg,hum.Torso,critornot)
  665. hum:TakeDamage(dmg)
  666. coroutine.resume(coroutine.create(function()
  667. tagHumanoid(hum,Player)
  668. wait(1)
  669. untagHumanoid(hum)
  670. end))
  671. return pa
  672. end
  673. function AddAmmo(add)
  674. Ammo = Ammo + add
  675. if Ammo > MaxAmmo then
  676. Ammo = MaxAmmo
  677. end
  678. end
  679. function ADmg(humm,hit,pos)
  680. if CurrentAmmo == "Normal" then
  681. if humm.Parent:findFirstChild("Block") ~= nil then
  682. if humm.Parent.Block.Value then
  683. damagesplat(0,humm.Torso,false,true)
  684. return
  685. end
  686. end
  687. prcntdmg(0)
  688. if critrandomizer ~= 1 then
  689. local rndmdamage = math.random(mindamage,maxdamage)
  690. damage(humm,rndmdamage,false)
  691. elseif critrandomizer == 1 then
  692. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  693. damage(humm,rndmdamage,true)
  694. end
  695. elseif CurrentAmmo == "Poison" then
  696. if humm.Parent:findFirstChild("Block") ~= nil then
  697. if humm.Parent.Block.Value then
  698. damagesplat(0,humm.Torso,false,true)
  699. return
  700. end
  701. end
  702. prcntdmg(25)
  703. if critrandomizer ~= 1 then
  704. local rndmdamage = math.random(mindamage,maxdamage)
  705. damage(humm,rndmdamage,false)
  706. elseif critrandomizer == 1 then
  707. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  708. damage(humm,rndmdamage,true)
  709. end
  710. if math.random(1,5) == 1 then
  711. local poisoncount = math.random(2,10)
  712. coroutine.resume(coroutine.create(function()
  713. repeat
  714. wait(1.5)
  715. poisoncount = poisoncount - 1
  716. local rndmdamage = math.floor(math.random(1,5)/2)
  717. local pa = damage(humm,rndmdamage,false)
  718. pa.BrickColor = BrickColor.new("Alder")
  719. until poisoncount <= 0
  720. end))
  721. end
  722. elseif CurrentAmmo == "Knockback" then
  723. if humm.Parent:findFirstChild("Block") ~= nil then
  724. if humm.Parent.Block.Value then
  725. damagesplat(0,humm.Torso,false,true)
  726. return
  727. end
  728. end
  729. prcntdmg(25)
  730. if critrandomizer ~= 1 then
  731. local rndmdamage = math.random(mindamage,maxdamage)
  732. damage(humm,rndmdamage,false)
  733. elseif critrandomizer == 1 then
  734. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  735. damage(humm,rndmdamage,true)
  736. end
  737. local vel = Instance.new("BodyVelocity",humm.Torso)
  738. vel.maxForce = Vector3.new(1,1,1) * math.huge
  739. vel.P = vel.P * 5
  740. vel.velocity = Vector3.new(0,1,0) + CFrame.new(Torso.Position,humm.Torso.Position).lookVector * 10
  741. coroutine.resume(coroutine.create(function()
  742. wait() wait() wait() wait()
  743. vel.Parent=nil
  744. end))
  745. returndmg()
  746. end
  747. end
  748. function OT(hit) --Normal Damage
  749. if Hitdeb == 1 then return end
  750. if hit.Parent == nil then return end
  751. local hum = hit.Parent:findFirstChild("Humanoid") if hum ~= nil and hum ~= Character.Humanoid then
  752. if hum.Health <= 0 then return end
  753. if hit.Parent:findFirstChild("Block") ~= nil then
  754. if hit.Parent.Block.Value then
  755. damagesplat(0,hum.Torso,false,true)
  756. Hitdeb = 1
  757. if hit.Parent.Block:findFirstChild("BlockPower") ~= nil then
  758. if hit.Parent.Block.BlockPower.Value <= 1 then
  759. hit.Parent.Block.Value = false
  760. elseif hit.Parent.Block.BlockPower.Value > 1 then
  761. local critrandomizer = math.random(crtrate)
  762. if critrandomizer ~= 1 then
  763. hit.Parent.Block.BlockPower.Value = hit.Parent.Block.BlockPower.Value - blockbreaker
  764. elseif critrandomizer == 1 then
  765. hit.Parent.Block.BlockPower.Value = hit.Parent.Block.BlockPower.Value - blockbreaker + 2
  766. end
  767. end
  768. end
  769. return end end
  770. local critrandomizer = math.random(crtrate)
  771. if critrandomizer ~= 1 then
  772. local rndmdamage = math.random(mindamage,maxdamage)
  773. damage(hum,rndmdamage,false)
  774. elseif critrandomizer == 1 then
  775. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  776. damage(hum,rndmdamage,true)
  777. end
  778. Hitdeb = 1
  779. end
  780. end
  781. function AoE(p,magnitude)
  782. local c = game.Workspace:GetChildren();
  783. for i = 1, #c do
  784. local hum = c[i]:findFirstChild("Humanoid")
  785. if hum ~= nil and hum.Health ~= 0 then
  786. local head = c[i]:findFirstChild("Head");
  787. if head ~= nil then
  788. local mag = (head.Position - p).magnitude;
  789. if mag <= magnitude and c[i].Name ~= Character.Name then
  790. local foundd = false
  791. for ii = 1 , #AoETrue do
  792. if AoETrue[ii] == c[i].Name then
  793. foundd = true
  794. end
  795. end
  796. if foundd then
  797. end
  798. --
  799. if not foundd then
  800. local critrandomizer = math.random(crtrate)
  801. if critrandomizer ~= 1 then
  802. local rndmdamage = math.random(mindamage,maxdamage)
  803. damage(hum,rndmdamage,false)
  804. elseif critrandomizer == 1 then
  805. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  806. damage(hum,rndmdamage,true)
  807. end
  808. table.insert(AoETrue,c[i].Name)
  809. end
  810. end
  811. end
  812. end
  813. end
  814. for ii = 1 , #AoETrue do
  815. table.remove(AoETrue,#AoETrue)
  816. end
  817. end
  818. --
  819. --
  820. function effect(Color,Ref,LP,P1)
  821. local effectsmsh = Instance.new("BlockMesh")
  822. effectsmsh.Scale = Vector3.new(1,1,1)
  823. effectsmsh.Name = "Mesh"
  824. local effectsg = Instance.new("Part")
  825. effectsg.formFactor = 3
  826. effectsg.CanCollide = false
  827. effectsg.Name = "Eff"
  828. effectsg.Locked = true
  829. effectsg.Anchored = true
  830. effectsg.Size = Vector3.new(0.2,1,0.2)
  831. effectsg.Parent = swordholder
  832. effectsmsh.Parent = effectsg
  833. effectsg.BrickColor = BrickColor.new(Color)
  834. effectsg.Reflectance = Ref
  835. local point1 = P1
  836. local mg = (LP.p - point1.p).magnitude
  837. effectsg.Size = Vector3.new(0.2,mg,0.2)
  838. effectsg.CFrame = CFrame.new((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
  839. coroutine.resume(coroutine.create(function()
  840. for i = 0 , 1 , 0.1 do
  841. wait()
  842. effectsg.Transparency = 1*i
  843. effectsmsh.Scale = Vector3.new(1-1*i,1,1-1*i)
  844. end
  845. wait()
  846. effectsg.Parent = nil
  847. end))
  848. end
  849. --
  850. con = nil
  851. function dmgcnnct()
  852. if con ~= nil then
  853. con:disconnect()
  854. Hitdeb = 0
  855. end
  856. con = prt11.Touched:connect(OT)
  857. end
  858. function dmgdc()
  859. if con ~= nil then
  860. con:disconnect()
  861. Hitdeb = 0
  862. end
  863. end
  864. function rptddmg(value,des,inc)
  865. coroutine.resume(coroutine.create(function()
  866. repeat
  867. wait(inc)
  868. Hitdeb = 0
  869. until value == des
  870. end))
  871. end
  872. function atktype(s,e)
  873. coroutine.resume(coroutine.create(function ()
  874. attacktype = e
  875. wait(0.25)
  876. attacktype = s
  877. end))
  878. end
  879. function shoottrail(mouse)
  880. local p1 = (prt5.CFrame * CFrame.new(0,-prt5.Size.y/2,0)).p
  881. local spreadvector = (Vector3.new(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread)) / 100) * (p1-mouse.Hit.p).magnitude/100
  882. local dir = CFrame.new((p1+mouse.Hit.p)/2,mouse.Hit.p+spreadvector)
  883. local hit,pos = rayCast(p1,dir.lookVector,10,Character)
  884. local rangepos = range
  885. local function drawtrail(From,To)
  886. local effectsmsh = Instance.new("CylinderMesh")
  887. effectsmsh.Scale = Vector3.new(1,1,1)
  888. effectsmsh.Name = "Mesh"
  889. local effectsg = Instance.new("Part")
  890. effectsg.formFactor = 3
  891. effectsg.CanCollide = false
  892. effectsg.Name = "Eff"
  893. effectsg.Locked = true
  894. effectsg.Anchored = true
  895. effectsg.Size = Vector3.new(0.2,0.2,0.2)
  896. effectsg.Parent = swordholder
  897. effectsmsh.Parent = effectsg
  898. effectsg.BrickColor = ammotrail
  899. effectsg.Reflectance = 0.25
  900. local LP = From
  901. local point1 = To
  902. local mg = (LP - point1).magnitude
  903. effectsmsh.Scale = Vector3.new(1,mg*5,1)
  904. effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
  905. coroutine.resume(coroutine.create(function()
  906. for i = 0 , 1 , 0.1 do
  907. wait()
  908. effectsg.Transparency = 1*i
  909. effectsmsh.Scale = Vector3.new(1-1*i,mg*5,1-1*i)
  910. end
  911. effectsg.Parent = nil
  912. end))
  913. end
  914. local newpos = p1
  915. local inc = rangepower
  916. repeat
  917. wait()
  918. rangepos = rangepos - 10
  919. dir = dir * CFrame.Angles(math.rad(-0.1),0,0)
  920. hit,pos = rayCast(newpos,dir.lookVector,inc,Character)
  921. drawtrail(newpos,pos)
  922. newpos = newpos + (dir.lookVector * inc)
  923. if inc >= 20 then
  924. inc = inc - 10
  925. end
  926. if hit ~= nil then
  927. rangepos = 0
  928. end
  929. until rangepos <= 0
  930. if hit ~= nil then
  931. hs(Head,1)
  932. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  933. hum = hit.Parent.Humanoid
  934. ADmg(hum,hit,pos)
  935. elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  936. hum = hit.Parent.Parent.Humanoid
  937. ADmg(hum,hit,pos)
  938. end
  939. end
  940. end
  941. function Ready(mouse)
  942. if Ammo <= 0 then Reload() return end
  943. attack = true
  944. local wt,t = faketors()
  945. w7.Part1 = t
  946. w8.Part1 = t
  947. w9.Part1 = t
  948. Character.Humanoid.WalkSpeed = 5
  949. for i = 0.2 , 1 , 0.2 do
  950. wait()
  951. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  952. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-15*i), 0, 0)
  953. 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))
  954. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  955. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  956. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  957. wt.C0 = CFrame.Angles(0, math.rad(50*i), 0)
  958. end
  959. for i = 0.2 , 1 , 0.2 do
  960. wait()
  961. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  962. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(10-10*i), 0, 0)
  963. 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))
  964. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  965. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  966. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  967. wt.C0 = CFrame.Angles(0, math.rad(50+10*i), 0)
  968. end
  969. wait() wait()
  970. repeat
  971. wait()
  972. as(Head,1)
  973. coroutine.resume(coroutine.create(function()
  974. for z = 1 ,2 do
  975. coroutine.resume(coroutine.create(function()
  976. local meshb1 = Instance.new("BlockMesh")
  977. meshb1.Scale = Vector3.new(1,1,1)
  978. local shellb1 = Instance.new("Part")
  979. meshb1.Parent = shellb1
  980. shellb1.Anchored = true
  981. shellb1.formFactor = 3
  982. shellb1.Size = Vector3.new(0.3,0.3,0.3) * (math.random(100,300)/100)
  983. 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)
  984. shellb1.Parent = swordholder
  985. shellb1.Transparency = 0
  986. if math.random(1,2) == 1 then
  987. shellb1.BrickColor = BrickColor.new("Bright red")
  988. else
  989. shellb1.BrickColor = BrickColor.new("Bright orange")
  990. end
  991. shellb1.CanCollide = false
  992. local incre = math.random(0,60)/100
  993. for i = 0 , 1 , 0.1 do
  994. wait()
  995. shellb1.CFrame = shellb1.CFrame + Torso.CFrame.lookVector*incre
  996. shellb1.Transparency = 1*i
  997. meshb1.Scale = Vector3.new(1+1*i,1+1*i,1+1*i)
  998. end
  999. shellb1.Parent=nil
  1000. end))
  1001. end
  1002. shoottrail(mouse)
  1003. end))
  1004. Ammo = Ammo - 1
  1005. for i = 0.5 , 1 , 0.5 do
  1006. wait()
  1007. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1008. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-5*i), 0, 0)
  1009. LW.C0 = CFrame.new(-1.5, 0.5, -0) * CFrame.Angles(math.rad(95+5*i),math.rad(0),math.rad(25))
  1010. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1011. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1012. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1013. wt.C0 = CFrame.Angles(0, math.rad(60), 0)
  1014. end
  1015. for i = 0.5 , 1 , 0.5 do
  1016. wait()
  1017. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1018. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-5+5*i), 0, 0)
  1019. LW.C0 = CFrame.new(-1.5, 0.5, -0) * CFrame.Angles(math.rad(100-5*i),math.rad(0),math.rad(25))
  1020. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1021. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1022. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1023. wt.C0 = CFrame.Angles(0, math.rad(60), 0)
  1024. end
  1025. until not keyhold or Ammo <= 0
  1026. for i = 0.2 , 1 , 0.2 do
  1027. wait()
  1028. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1029. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15*i), 0, 0)
  1030. LW.C0 = CFrame.new(-1.5, 0.5, -0.25*i) * CFrame.Angles(math.rad(95-25*i),math.rad(0),math.rad(25))
  1031. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1032. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1033. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1034. wt.C0 = CFrame.Angles(0, math.rad(60-60*i), 0)
  1035. end
  1036. w7.Part1 = Torso
  1037. w8.Part1 = Torso
  1038. w9.Part1 = Torso
  1039. RW.Part0 = Torso
  1040. LW.Part0 = Torso
  1041. Torso.Transparency = 0
  1042. RHL.Part0 = Torso
  1043. LHL.Part0 = Torso
  1044. t.Parent = nil
  1045. Character.Humanoid.WalkSpeed = 14
  1046. for i = 0.2 , 1 , 0.2 do
  1047. wait()
  1048. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1049. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15+10*i), 0, 0)
  1050. 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))
  1051. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1052. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1053. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1054. end
  1055. wait(0.25)
  1056. attack = false
  1057. end
  1058. function Reload()
  1059. attack = true
  1060. ars(Head,0.75)
  1061. for i = 0.1 , 1 , 0.1 do
  1062. wait()
  1063. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+20*i))
  1064. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-45*i), 0, 0)
  1065. 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))
  1066. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1067. w3.C0 = CFrame.Angles(math.rad(90+90*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1068. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-10*i),0,math.rad(-20*i))
  1069. end
  1070. for i = 0.2 , 1 , 0.2 do
  1071. wait()
  1072. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-40))
  1073. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-20+20*i), 0, 0)
  1074. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(-20+40*i),math.rad(0),math.rad(10-10*i))
  1075. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1076. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1077. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-10+20*i),0,math.rad(-20))
  1078. end
  1079. for i = 0.2 , 1 , 0.2 do
  1080. wait()
  1081. 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))
  1082. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(45*i), 0, 0)
  1083. 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))
  1084. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1085. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1086. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(10+10*i),0,math.rad(-20+10*i))
  1087. end
  1088. AddAmmo(Ammoregen)
  1089. for i = 0.2 , 1 , 0.2 do
  1090. wait()
  1091. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-45))
  1092. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(45+5*i), 0, 0)
  1093. LW.C0 = CFrame.new(-1, 0.5, -0.5) * CFrame.Angles(math.rad(100-10*i),math.rad(0),math.rad(45))
  1094. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1095. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1096. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(20+5*i),0,math.rad(-10+5*i))
  1097. end
  1098. for i = 0.1 , 1 , 0.1 do
  1099. wait()
  1100. 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))
  1101. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(50-25*i), 0, 0)
  1102. 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))
  1103. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1104. w3.C0 = CFrame.Angles(math.rad(180-90*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1105. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(25-25*i),0,math.rad(-5+5*i))
  1106. end
  1107. Neck.C0 = neckcf0
  1108. attack = false
  1109. end
  1110. function NormalAmmo()
  1111. attack = true
  1112. for i = 0.1 , 1 , 0.1 do
  1113. wait()
  1114. RW.C0 = CFrame.new(1.5-0.5*i, 0.5, -0.5*i) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1115. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  1116. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40+60*i),math.rad(0),math.rad(25+20*i))
  1117. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1118. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1119. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5*i),0,0)
  1120. end
  1121. ars(Head,1)
  1122. for i = 0.2 , 1 , 0.2 do
  1123. wait()
  1124. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1125. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  1126. LW.C0 = CFrame.new(-1.5+0.25*i, 0.5, -0.5) * CFrame.Angles(math.rad(100),math.rad(0),math.rad(45))
  1127. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1128. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1129. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5-2.5*i),0,0)
  1130. end
  1131. for i = 0.1 , 1 , 0.2 do
  1132. wait()
  1133. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1134. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  1135. LW.C0 = CFrame.new(-1.25-0.25*i, 0.5, -0.5+0.25*i) * CFrame.Angles(math.rad(100+20*i),math.rad(0),math.rad(45))
  1136. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1137. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1138. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(2.5+2.5*i),0,0)
  1139. end
  1140. for i = 0.1 , 1 , 0.2 do
  1141. wait()
  1142. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1143. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-10*i), 0, 0)
  1144. LW.C0 = CFrame.new(-1.5, 0.5, -0.25-0.25*i) * CFrame.Angles(math.rad(120-45*i),math.rad(0),math.rad(45))
  1145. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1146. w3.C0 = CFrame.Angles(math.rad(90+90*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1147. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5),0,0)
  1148. end
  1149. for i = 0.1 , 1 , 0.1 do
  1150. wait()
  1151. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1152. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15), 0, 0)
  1153. LW.C0 = CFrame.new(-1.5, 0.5+0.25*i, -0.5) * CFrame.Angles(math.rad(75+60*i),math.rad(0),math.rad(45))
  1154. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1155. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1156. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5-10*i),0,0)
  1157. end
  1158. for i = 0.2 , 1 , 0.1 do
  1159. wait()
  1160. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1161. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15), 0, 0)
  1162. LW.C0 = CFrame.new(-1.5, 0.75, -0.5) * CFrame.Angles(math.rad(135-20*i),math.rad(0),math.rad(45))
  1163. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1164. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1165. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5+2.5*i),0,0)
  1166. end
  1167. CurrentAmmo = "Normal"
  1168. ammotrail = BrickColor.new("White")
  1169. ars(Head,2)
  1170. for i = 0.2 , 1 , 0.1 do
  1171. wait()
  1172. 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(-60))
  1173. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15-15*i), 0, 0)
  1174. LW.C0 = CFrame.new(-1.5, 0.75-0.25*i, -0.5) * CFrame.Angles(math.rad(115-75*i),math.rad(0),math.rad(45-20*i))
  1175. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1176. w3.C0 = CFrame.Angles(math.rad(180-90*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1177. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-2.5+2.5*i),0,0)
  1178. end
  1179. for i = 0.2 , 1 , 0.1 do
  1180. wait()
  1181. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1182. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25*i), 0, 0)
  1183. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40),math.rad(0),math.rad(25))
  1184. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1185. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1186. end
  1187. attack = false
  1188. end
  1189. function PoisonAmmo()
  1190. attack = true
  1191. for i = 0.1 , 1 , 0.1 do
  1192. wait()
  1193. RW.C0 = CFrame.new(1.5-0.5*i, 0.5, -0.5*i) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1194. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  1195. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40+60*i),math.rad(0),math.rad(25+20*i))
  1196. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1197. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1198. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5*i),0,0)
  1199. end
  1200. ars(Head,1)
  1201. for i = 0.2 , 1 , 0.2 do
  1202. wait()
  1203. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1204. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  1205. LW.C0 = CFrame.new(-1.5+0.25*i, 0.5, -0.5) * CFrame.Angles(math.rad(100),math.rad(0),math.rad(45))
  1206. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1207. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1208. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5-2.5*i),0,0)
  1209. end
  1210. for i = 0.1 , 1 , 0.2 do
  1211. wait()
  1212. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1213. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  1214. LW.C0 = CFrame.new(-1.25-0.25*i, 0.5, -0.5+0.25*i) * CFrame.Angles(math.rad(100+20*i),math.rad(0),math.rad(45))
  1215. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1216. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1217. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(2.5+2.5*i),0,0)
  1218. end
  1219. for i = 0.1 , 1 , 0.2 do
  1220. wait()
  1221. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1222. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-10*i), 0, 0)
  1223. LW.C0 = CFrame.new(-1.5, 0.5, -0.25-0.25*i) * CFrame.Angles(math.rad(120-45*i),math.rad(0),math.rad(45))
  1224. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1225. w3.C0 = CFrame.Angles(math.rad(90+90*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1226. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5),0,0)
  1227. end
  1228. for i = 0.1 , 1 , 0.1 do
  1229. wait()
  1230. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1231. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15), 0, 0)
  1232. LW.C0 = CFrame.new(-1.5, 0.5+0.25*i, -0.5) * CFrame.Angles(math.rad(75+60*i),math.rad(0),math.rad(45))
  1233. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1234. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1235. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5-10*i),0,0)
  1236. end
  1237. for i = 0.2 , 1 , 0.1 do
  1238. wait()
  1239. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1240. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15), 0, 0)
  1241. LW.C0 = CFrame.new(-1.5, 0.75, -0.5) * CFrame.Angles(math.rad(135-20*i),math.rad(0),math.rad(45))
  1242. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1243. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1244. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5+2.5*i),0,0)
  1245. end
  1246. CurrentAmmo = "Poison"
  1247. ammotrail = BrickColor.new("Bright violet")
  1248. ars(Head,2)
  1249. for i = 0.2 , 1 , 0.1 do
  1250. wait()
  1251. 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(-60))
  1252. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15-15*i), 0, 0)
  1253. LW.C0 = CFrame.new(-1.5, 0.75-0.25*i, -0.5) * CFrame.Angles(math.rad(115-75*i),math.rad(0),math.rad(45-20*i))
  1254. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1255. w3.C0 = CFrame.Angles(math.rad(180-90*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1256. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-2.5+2.5*i),0,0)
  1257. end
  1258. for i = 0.2 , 1 , 0.1 do
  1259. wait()
  1260. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1261. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25*i), 0, 0)
  1262. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40),math.rad(0),math.rad(25))
  1263. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1264. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1265. end
  1266. attack = false
  1267. coroutine.resume(coroutine.create(function()
  1268. repeat
  1269. wait(0.25+0.75*math.random())
  1270. if Ammo ~= 0 then
  1271. local meshb1 = Instance.new("SpecialMesh")
  1272. meshb1.Scale = Vector3.new(1,1,1)
  1273. meshb1.MeshType = "Sphere"
  1274. local shellb1 = Instance.new("Part")
  1275. meshb1.Parent = shellb1
  1276. shellb1.Anchored = true
  1277. shellb1.formFactor = 3
  1278. shellb1.Size = Vector3.new(0.3,0.3,0.3)
  1279. shellb1.CFrame = CFrame.new((prt5.CFrame * CFrame.new(0,-prt5.Size.y/2,0)).p)
  1280. shellb1.Parent = swordholder
  1281. shellb1.Transparency = 0
  1282. shellb1.BrickColor = BrickColor.new("Alder")
  1283. shellb1.CanCollide = false
  1284. for i = 0 , 1 , 0.1 do
  1285. wait()
  1286. shellb1.CFrame = shellb1.CFrame + Vector3.new(0,-0.15,0)
  1287. shellb1.Transparency = 1*i
  1288. meshb1.Scale = Vector3.new(1,1+3*i,1)
  1289. end
  1290. shellb1.Parent=nil
  1291. end
  1292. until CurrentAmmo ~= "Poison"
  1293. end))
  1294. end
  1295. function KBAmmo()
  1296. attack = true
  1297. for i = 0.1 , 1 , 0.1 do
  1298. wait()
  1299. RW.C0 = CFrame.new(1.5-0.5*i, 0.5, -0.5*i) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1300. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  1301. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40+60*i),math.rad(0),math.rad(25+20*i))
  1302. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1303. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1304. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5*i),0,0)
  1305. end
  1306. ars(Head,1)
  1307. for i = 0.2 , 1 , 0.2 do
  1308. wait()
  1309. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1310. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  1311. LW.C0 = CFrame.new(-1.5+0.25*i, 0.5, -0.5) * CFrame.Angles(math.rad(100),math.rad(0),math.rad(45))
  1312. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1313. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1314. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5-2.5*i),0,0)
  1315. end
  1316. for i = 0.1 , 1 , 0.2 do
  1317. wait()
  1318. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1319. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  1320. LW.C0 = CFrame.new(-1.25-0.25*i, 0.5, -0.5+0.25*i) * CFrame.Angles(math.rad(100+20*i),math.rad(0),math.rad(45))
  1321. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1322. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1323. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(2.5+2.5*i),0,0)
  1324. end
  1325. for i = 0.1 , 1 , 0.2 do
  1326. wait()
  1327. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1328. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-10*i), 0, 0)
  1329. LW.C0 = CFrame.new(-1.5, 0.5, -0.25-0.25*i) * CFrame.Angles(math.rad(120-45*i),math.rad(0),math.rad(45))
  1330. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1331. w3.C0 = CFrame.Angles(math.rad(90+90*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1332. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5),0,0)
  1333. end
  1334. for i = 0.1 , 1 , 0.1 do
  1335. wait()
  1336. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1337. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15), 0, 0)
  1338. LW.C0 = CFrame.new(-1.5, 0.5+0.25*i, -0.5) * CFrame.Angles(math.rad(75+60*i),math.rad(0),math.rad(45))
  1339. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1340. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1341. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5-10*i),0,0)
  1342. end
  1343. for i = 0.2 , 1 , 0.1 do
  1344. wait()
  1345. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1346. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15), 0, 0)
  1347. LW.C0 = CFrame.new(-1.5, 0.75, -0.5) * CFrame.Angles(math.rad(135-20*i),math.rad(0),math.rad(45))
  1348. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1349. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1350. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5+2.5*i),0,0)
  1351. end
  1352. CurrentAmmo = "Knockback"
  1353. ammotrail = BrickColor.new("Black")
  1354. ars(Head,2)
  1355. for i = 0.2 , 1 , 0.1 do
  1356. wait()
  1357. 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(-60))
  1358. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15-15*i), 0, 0)
  1359. LW.C0 = CFrame.new(-1.5, 0.75-0.25*i, -0.5) * CFrame.Angles(math.rad(115-75*i),math.rad(0),math.rad(45-20*i))
  1360. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1361. w3.C0 = CFrame.Angles(math.rad(180-90*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1362. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-2.5+2.5*i),0,0)
  1363. end
  1364. for i = 0.2 , 1 , 0.1 do
  1365. wait()
  1366. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1367. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25*i), 0, 0)
  1368. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40),math.rad(0),math.rad(25))
  1369. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1370. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1371. end
  1372. attack = false
  1373. end
  1374. function AimedReady(mouse)
  1375. if Ammo <= 0 then Reload() return end
  1376. attack = true
  1377. local wt,t = faketors()
  1378. w7.Part1 = t
  1379. w8.Part1 = t
  1380. w9.Part1 = t
  1381. Character.Humanoid.WalkSpeed = 5
  1382. for i = 0.2 , 1 , 0.2 do
  1383. wait()
  1384. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1385. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-15*i), 0, 0)
  1386. 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))
  1387. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1388. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1389. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1390. wt.C0 = CFrame.Angles(0, math.rad(50*i), 0)
  1391. Neck.C0 = neckcf0 * CFrame.Angles(0,math.rad(-20*i),0)
  1392. end
  1393. for i = 0.2 , 1 , 0.2 do
  1394. wait()
  1395. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1396. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(10-10*i), 0, 0)
  1397. 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))
  1398. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1399. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1400. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1401. wt.C0 = CFrame.Angles(0, math.rad(50+10*i), 0)
  1402. end
  1403. wait() wait()
  1404. local orispread = spread
  1405. spread = 0
  1406. repeat
  1407. wait(0.15)
  1408. as(Head,1)
  1409. coroutine.resume(coroutine.create(function()
  1410. for z = 1 ,2 do
  1411. coroutine.resume(coroutine.create(function()
  1412. local meshb1 = Instance.new("BlockMesh")
  1413. meshb1.Scale = Vector3.new(1,1,1)
  1414. local shellb1 = Instance.new("Part")
  1415. meshb1.Parent = shellb1
  1416. shellb1.Anchored = true
  1417. shellb1.formFactor = 3
  1418. shellb1.Size = Vector3.new(0.3,0.3,0.3) * (math.random(100,300)/100)
  1419. 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)
  1420. shellb1.Parent = swordholder
  1421. shellb1.Transparency = 0
  1422. if math.random(1,2) == 1 then
  1423. shellb1.BrickColor = BrickColor.new("Bright red")
  1424. else
  1425. shellb1.BrickColor = BrickColor.new("Bright orange")
  1426. end
  1427. shellb1.CanCollide = false
  1428. local incre = math.random(0,60)/100
  1429. for i = 0 , 1 , 0.1 do
  1430. wait()
  1431. shellb1.CFrame = shellb1.CFrame + Torso.CFrame.lookVector*incre
  1432. shellb1.Transparency = 1*i
  1433. meshb1.Scale = Vector3.new(1+1*i,1+1*i,1+1*i)
  1434. end
  1435. shellb1.Parent=nil
  1436. end))
  1437. end
  1438. shoottrail(mouse)
  1439. end))
  1440. Ammo = Ammo - 1
  1441. for i = 0.5 , 1 , 0.5 do
  1442. wait()
  1443. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1444. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-5*i), 0, 0)
  1445. LW.C0 = CFrame.new(-1.5, 0.5, -0) * CFrame.Angles(math.rad(95+5*i),math.rad(0),math.rad(25))
  1446. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1447. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1448. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1449. wt.C0 = CFrame.Angles(0, math.rad(60), 0)
  1450. Neck.C0 = neckcf0 * CFrame.Angles(0,math.rad(-20+5*i),0)
  1451. end
  1452. for i = 0.5 , 1 , 0.5 do
  1453. wait()
  1454. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1455. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-5+5*i), 0, 0)
  1456. LW.C0 = CFrame.new(-1.5, 0.5, -0) * CFrame.Angles(math.rad(100-5*i),math.rad(0),math.rad(25))
  1457. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1458. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1459. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1460. wt.C0 = CFrame.Angles(0, math.rad(60), 0)
  1461. Neck.C0 = neckcf0 * CFrame.Angles(0,math.rad(-15-5*i),0)
  1462. end
  1463. until not buttonhold or Ammo <= 0
  1464. spread = orispread
  1465. for i = 0.2 , 1 , 0.2 do
  1466. wait()
  1467. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1468. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15*i), 0, 0)
  1469. LW.C0 = CFrame.new(-1.5, 0.5, -0.25*i) * CFrame.Angles(math.rad(95-25*i),math.rad(0),math.rad(25))
  1470. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1471. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1472. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1473. wt.C0 = CFrame.Angles(0, math.rad(60-60*i), 0)
  1474. Neck.C0 = neckcf0 * CFrame.Angles(0,math.rad(-20+20*i),0)
  1475. end
  1476. w7.Part1 = Torso
  1477. w8.Part1 = Torso
  1478. w9.Part1 = Torso
  1479. RW.Part0 = Torso
  1480. LW.Part0 = Torso
  1481. Torso.Transparency = 0
  1482. RHL.Part0 = Torso
  1483. LHL.Part0 = Torso
  1484. t.Parent = nil
  1485. Character.Humanoid.WalkSpeed = 14
  1486. for i = 0.2 , 1 , 0.2 do
  1487. wait()
  1488. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1489. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15+10*i), 0, 0)
  1490. 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))
  1491. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1492. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1493. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1494. end
  1495. wait(0.25)
  1496. attack = false
  1497. end
  1498. function returnwelds()
  1499. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1500. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  1501. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40),math.rad(0),math.rad(25))
  1502. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1503. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1504. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1505. RWL.C0 = CFrame.new(1, -1, 0) * CFrame.Angles(0, 0, 0)
  1506. RWL.C1 = CFrame.new(0.5, 1, 0)
  1507. LWL.C0 = CFrame.new(-1, -1, 0) * CFrame.Angles(0, 0, 0)
  1508. LWL.C1 = CFrame.new(-0.5, 1, 0)
  1509. Neck.C0 = neckcf0
  1510. end
  1511. keyhold = false
  1512. function ob1d(mouse)
  1513. hold = true
  1514. if attack then return end
  1515. keyhold = true
  1516. Ready(mouse)
  1517. end
  1518. function ob1u(mouse)
  1519. keyhold = false
  1520. end
  1521. buttonhold = false
  1522. function key(key,mouse)
  1523. if attack then return end
  1524. if key == "f" then
  1525. Reload()
  1526. end
  1527. if key == "q" then
  1528. buttonhold = true
  1529. AimedReady(mouse)
  1530. end
  1531. if key == "e" then
  1532. NormalAmmo()
  1533. end
  1534. if key == "r" then --and (string.match(Player.Unlocks.Value,"Poison Ammo") ~= nil) then
  1535. PoisonAmmo()
  1536. end
  1537. if key == "t" then --and (string.match(Player.Unlocks.Value,"Knockback ammo") ~= nil) then
  1538. KBAmmo()
  1539. end
  1540. end
  1541. function key2(key)
  1542. if key == "f" or key == "q" then
  1543. buttonhold = false
  1544. end
  1545. end
  1546. function s(mouse)
  1547. repeat wait() until not attack
  1548. repeat wait() until not ev.Value
  1549. mouse.Button1Down:connect(function() ob1d(mouse) end)
  1550. mouse.Button1Up:connect(function() ob1u(mouse) end)
  1551. mouse.KeyDown:connect(function(ke) key(ke,mouse) end)
  1552. mouse.KeyUp:connect(key2)
  1553. equipanim()
  1554. ev.Value = true
  1555. end
  1556. function ds(mouse)
  1557. keyhold = false
  1558. repeat wait() until not attack
  1559. repeat wait() until ev.Value
  1560. hideanim()
  1561. wait(0.1)
  1562. ev.Value = false
  1563. end
  1564. Bin.Selected:connect(s)
  1565. Bin.Deselected:connect(ds)
  1566. if PlayerGui:findFirstChild("AmmoMeter") ~= nil then
  1567. PlayerGui:findFirstChild("AmmoMeter").Parent = nil
  1568. end
  1569. coroutine.resume(coroutine.create(function()
  1570. local SG = Instance.new("ScreenGui",PlayerGui)
  1571. SG.Name = "AmmoMeter"
  1572. local frame = Instance.new("Frame",SG)
  1573. frame.Size = UDim2.new(0.2,0,0.1,0)
  1574. frame.Position = UDim2.new(0.5-0.1,0,0.05,0)
  1575. frame.BackgroundColor3 = BrickColor.new("Brown").Color
  1576. local Ammotext = Instance.new("TextLabel",frame)
  1577. Ammotext.Size = UDim2.new(1,0,0.35,0)
  1578. Ammotext.BackgroundTransparency = 1
  1579. Ammotext.Text = "Ammo"
  1580. Ammotext.FontSize = "Size18"
  1581. Ammotext.TextColor3 = BrickColor.new("White").Color
  1582. local backing = Instance.new("ImageLabel",frame)
  1583. backing.Size = UDim2.new(0.8,0,0.45,0)
  1584. backing.Image = "http://www.roblox.com/asset/?id=48965808"
  1585. backing.Position = UDim2.new(0.1,0,0.45,0)
  1586. backing.Position = UDim2.new(0.1,0,0.45,0)
  1587. backing.BackgroundColor3 = BrickColor.new("Black").Color
  1588. local img = Instance.new("ImageLabel",backing)
  1589. img.Size = UDim2.new(1,0,1,0)
  1590. img.Image = "http://www.roblox.com/asset/?id=48965808"
  1591. img.Position = UDim2.new(0,0,0,0)
  1592. img.Position = UDim2.new(0,0,0,0)
  1593. img.BackgroundColor3 = BrickColor.new("Brown").Color
  1594. local percent = Instance.new("TextLabel",backing)
  1595. percent.Size = UDim2.new(1,0,1,0)
  1596. percent.BackgroundTransparency = 1
  1597. percent.TextColor3 = BrickColor.new("White").Color
  1598. percent.Text = Ammo.."/".. MaxAmmo
  1599. percent.FontSize = "Size18"
  1600. local currentam = Instance.new("TextLabel",frame)
  1601. currentam.Size = UDim2.new(0.5,0,0.25,0)
  1602. currentam.Position = UDim2.new(0,0,1,0)
  1603. currentam.BackgroundTransparency = 0
  1604. currentam.BackgroundColor3 = BrickColor.new("Brown").Color
  1605. currentam.TextColor3 = BrickColor.new("White").Color
  1606. currentam.Text = CurrentAmmo
  1607. currentam.FontSize = "Size18"
  1608. repeat
  1609. wait()
  1610. pcall(function()
  1611. img.Size = UDim2.new(1*(Ammo/MaxAmmo),0,1,0)
  1612. percent.Text = Ammo.."/".. MaxAmmo
  1613. currentam.Text = CurrentAmmo
  1614. end)
  1615. until SG.Parent == nil
  1616. end))
  1617. Character.Humanoid.WalkSpeed = 50
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement