Advertisement
KHSora455

Acid Gun

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