Advertisement
mathmasterphil

Ras

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