Advertisement
Jaden11

My gun script

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