Advertisement
memberhero

Gun Halfy Fixed I Think?

Dec 28th, 2017
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 116.58 KB | None | 0 0
  1. ---leaked gun script by memberhero have fun
  2. value = Instance.new("BoolValue",game.Workspace)
  3. value.Name = "Value1"--Keep or a error will show up when you press h and q
  4. Player = game:GetService("Players").LocalPlayer
  5. Character = Player.Character
  6. PlayerGui = Player.PlayerGui
  7. Backpack = Player.Backpack
  8. Torso = Character.Torso
  9. Head = Character.Head
  10. LeftArm = Character["Left Arm"]
  11. LeftLeg = Character["Left Leg"]
  12. RightArm = Character["Right Arm"]
  13. RightLeg = Character["Right Leg"]
  14. LS = Torso["Left Shoulder"]
  15. LH = Torso["Left Hip"]
  16. RS = Torso["Right Shoulder"]
  17. RH = Torso["Right Hip"]
  18. it=Instance.new
  19. vt=Vector3.new
  20. cf=CFrame.new
  21. euler=CFrame.fromEulerAnglesXYZ
  22. angles=CFrame.Angles
  23. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  24. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  25. ModelName = "Weapon"
  26. attack = false
  27. attacktype = 1
  28. Hitdeb = 0
  29. Neck = Torso.Neck
  30. local neckcf0 = Neck.C0
  31. ----------------------------
  32. --Customize
  33. Ammo = 6
  34. MaxAmmo = 6
  35. mindamage = 5
  36. maxdamage = 5
  37. crtmaxdamage = 10
  38. reloadspeed=1
  39. attackspeed=1
  40. GunzerkDuration=100
  41. twobullets=false
  42. omindamage = mindamage
  43. omaxdamage = maxdamage
  44. ocrtmaxdamage = crtmaxdamage
  45. crtrate = 100/5
  46. --100%/critpercentage
  47. oblkbrkr = 1
  48. blockbreaker = oblkbrkr
  49. spread = 1
  50. spread = spread*100
  51. Ammoregen = 5
  52. range = 100
  53. rangepower = 100
  54. CurrentAmmo = "Normal"
  55. attackdebounce = false
  56. poisoncounter=0
  57. Gunzerkering=false
  58. firingdebounce1=false
  59. firingdebounce2=false
  60. aiming=false
  61. local LastPoint1 = nil
  62. local LastPoint2 = nil
  63. critical=false
  64. dodging=false
  65. holdforward=true
  66. resting=false
  67. hifiving=false
  68. blastcannonmode=false
  69. handlecolor = BrickColor.new("Navy blue")
  70. bcolor = BrickColor.new("White")
  71. gemcolor = BrickColor.new("Black")
  72. ammotrail = BrickColor.new("White")
  73. ToolName = "Romandan"
  74. ---------------------------------------------------------------------------------------------------------------------------------------
  75. if Character:findFirstChild("EquippedVal",true) ~= nil then
  76. Character:findFirstChild("EquippedVal",true).Parent = nil
  77. end
  78. ev = it("BoolValue",Character)
  79. ev.Name = "EquippedVal"
  80. ev.Value = false
  81. if Character:findFirstChild("Block",true) ~= nil then
  82. Character:findFirstChild("Block",true).Parent = nil
  83. end
  84. --player
  85. player = nil
  86. --welds
  87. RW, LW , RWL, LWL = it("Weld"), it("Weld"), it("Weld"), it("Weld")
  88. --what anim
  89. anim = "none"
  90. --other var
  91. player = Player
  92. ch = Character
  93. --save shoulders
  94. AoETrue = {}
  95. RSH, LSH , RHL, LHL = ch.Torso["Right Shoulder"], ch.Torso["Left Shoulder"] , ch.Torso["Right Hip"] , ch.Torso["Left Hip"]
  96. function RWFunc()
  97. RW.Part1 = ch["Right Arm"]
  98. RSH.Part1 = nil
  99. end
  100. function LWFunc()
  101. LW.Part1 = ch["Left Arm"]
  102. LSH.Part1 = nil
  103. end
  104. function RWLFunc()
  105. RWL.Part1 = ch["Right Leg"]
  106. RHL.Part1 = nil
  107. ch["Right Leg"].Name = "RightLeg"
  108. RightLeg.CanCollide = false
  109. end
  110. function LWLFunc()
  111. LWL.Part1 = ch["Left Leg"]
  112. LHL.Part1 = nil
  113. ch["Left Leg"].Name = "LeftLeg"
  114. LeftLeg.CanCollide = true
  115. end
  116. function RWLRem()
  117. RightLeg.Name = "Right Leg"
  118. RWL.Part1 = nil
  119. RHL.Part1 = ch["Right Leg"]
  120. RightLeg.CanCollide = false
  121. end
  122. function LWLRem()
  123. LeftLeg.Name = "Left Leg"
  124. LWL.Part1 = nil
  125. LHL.Part1 = ch["Left Leg"]
  126. LeftLeg.CanCollide = false
  127. end
  128. function RWRem()
  129. RW.Part1 = nil
  130. RSH.Part1 = ch["Right Arm"]
  131. end
  132. function LWRem()
  133. LW.Part1 = nil
  134. LSH.Part1 = ch["Left Arm"]
  135. end
  136. if Character:findFirstChild(ModelName,true) ~= nil then
  137. Character:findFirstChild(ModelName,true).Parent = nil
  138. RHL.Part1 = ch["Right Leg"]
  139. LHL.Part1 = ch["Left Leg"]
  140. RSH.Part1 = ch["Right Arm"]
  141. LSH.Part1 = ch["Left Arm"]
  142. end
  143. if Character:findFirstChild("BlastCannon",true) ~= nil then
  144. Character:findFirstChild("BlastCannon",true).Parent = nil
  145. end
  146. if Character:findFirstChild("HighFive",true) ~= nil then
  147. Character:findFirstChild("HighFive",true).Parent=nil
  148. end
  149. local hifivevalue=it("BoolValue")
  150. hifivevalue.Parent=Character
  151. hifivevalue.Name="HighFive"
  152. hifivevalue.Value=false
  153. local swordholder = it("Model")
  154. swordholder.Name = ModelName
  155. swordholder.Parent = Character
  156. --derp
  157. RW.Part0 = ch.Torso
  158. RW.C0 = cf(1.5, 0.5, 0) * euler(0, 0, 0)
  159. RW.C1 = cf(0, 0.5, 0) * euler(0, 0, 0)
  160. RW.Parent = swordholder
  161. --
  162. LW.Part0 = ch.Torso
  163. LW.C0 = cf(-1.5, 0.5, 0) --* euler(1.7, 0, 0.8)
  164. LW.C1 = cf(0, 0.5, 0)
  165. LW.Parent = swordholder
  166. --
  167. RWL.Part0 = ch.Torso
  168. RWL.C0 = cf(1, -1, 0) * angles(0, 0, 0)
  169. RWL.C1 = cf(0.5, 1, 0)
  170. RWL.Parent = swordholder
  171. --
  172. LWL.Part0 = ch.Torso
  173. LWL.C0 = cf(-1, -1, 0) * angles(0, 0, 0)
  174. LWL.C1 = cf(-0.5, 1, 0)
  175. LWL.Parent = swordholder
  176. local msh1 = it("CylinderMesh")
  177. msh1.Scale = vt(0.2,1,0.2)
  178. local msh2 = it("CylinderMesh")
  179. msh2.Scale = vt(0.5,0.8,0.5)
  180. local msh3 = it("BlockMesh")
  181. msh3.Scale = vt(0.25,1,0.1)
  182. local msh4 = it("CylinderMesh")
  183. msh4.Scale = vt(0.2,1,0.2)
  184. local msh4b = it("CylinderMesh")
  185. msh4b.Scale = vt(0.15,1.01,0.15)
  186. local msh5 = it("CylinderMesh")
  187. msh5.Scale = vt(0.4,1,0.4)
  188. local msh6 = it("BlockMesh")
  189. msh6.Scale = vt(0.5,0.5,0.5)
  190. local msh7 = it("BlockMesh")
  191. msh7.Scale = vt(0.2,1.45,0.25)
  192. local msh8 = it("BlockMesh")
  193. msh8.Scale = vt(0.3,1,0.2)
  194. local prt1 = it("Part")
  195. prt1.formFactor = 3
  196. prt1.CanCollide = true
  197. prt1.Name = "Handle"
  198. prt1.Locked = true
  199. prt1.Size = vt(1,1,1)
  200. prt1.Parent = swordholder
  201. msh1.Parent = prt1
  202. prt1.BrickColor = handlecolor
  203. local prt2 = it("Part")
  204. prt2.formFactor = 3
  205. prt2.CanCollide = true
  206. prt2.Name = "Barrel"
  207. prt2.Locked = true
  208. prt2.Size = vt(1,1,1)
  209. prt2.Parent = swordholder
  210. msh2.Parent = prt2
  211. prt2.BrickColor = bcolor
  212. local prt3 = it("Part")
  213. prt3.formFactor = 3
  214. prt3.CanCollide = true
  215. prt3.Name = "BarrelPlate"
  216. prt3.Locked = true
  217. prt3.Size = vt(1,1.5,1)
  218. prt3.Parent = swordholder
  219. msh3.Parent = prt3
  220. prt3.BrickColor = handlecolor
  221. local prt4 = it("Part")
  222. prt4.formFactor = 3
  223. prt4.CanCollide = true
  224. prt4.Name = "LongBarrel"
  225. prt4.Locked = true
  226. prt4.Size = vt(1,1.5,1)
  227. prt4.Parent = swordholder
  228. msh4.Parent = prt4
  229. prt4.BrickColor = handlecolor
  230. local prt4b = it("Part")
  231. prt4b.formFactor = 3
  232. prt4b.CanCollide = true
  233. prt4b.Name = "LongBarrel2"
  234. prt4b.Locked = true
  235. prt4b.Size = vt(1,1.5,1)
  236. prt4b.Parent = swordholder
  237. msh4b.Parent = prt4b
  238. prt4b.BrickColor = BrickColor.new("Really black")
  239. local prt5 = it("Part")
  240. prt5.formFactor = 3
  241. prt5.CanCollide = true
  242. prt5.Name = "RearLongBarrel"
  243. prt5.Locked = true
  244. prt5.Size = vt(1,1,1)
  245. prt5.Parent = swordholder
  246. msh5.Parent = prt5
  247. prt5.BrickColor = handlecolor
  248. local prt6 = it("Part")
  249. prt6.formFactor = 3
  250. prt6.CanCollide = false
  251. prt6.Name = "Aimer"
  252. prt6.Locked = true
  253. prt6.Size = vt(0.2,0.2,0.2)
  254. prt6.Parent = swordholder
  255. msh6.Parent = prt6
  256. prt6.BrickColor = handlecolor
  257. local prt7 = it("Part")
  258. prt7.formFactor = 3
  259. prt7.CanCollide = false
  260. prt7.Name = "BottomBarrel"
  261. prt7.Locked = true
  262. prt7.Size = vt(1,1,1)
  263. prt7.Parent = swordholder
  264. msh7.Parent = prt7
  265. prt7.BrickColor = handlecolor
  266. local prt8 = it("Part")
  267. prt8.formFactor = 3
  268. prt8.CanCollide = false
  269. prt8.Name = "BarrelTop"
  270. prt8.Locked = true
  271. prt8.Size = vt(1,1,1)
  272. prt8.Parent = swordholder
  273. msh8.Parent = prt8
  274. prt8.BrickColor = handlecolor
  275. local w1 = it("Weld")
  276. w1.Parent = prt1
  277. w1.Part0 = prt1
  278. w1.C1 = euler(0, 0, 0) * cf(0, 0,0)
  279. w1.C0 = euler(math.rad(90),math.rad(0), 0) * cf(-1, 1, -0.25)
  280. local w2 = it("Weld")
  281. w2.Parent = prt2
  282. w2.Part0 = prt2
  283. w2.Part1 = prt1
  284. w2.C1 = euler(0, 0, 0) * cf(0, -0.16, 0)
  285. w2.C0 = euler(math.rad(180), 0,0) * cf(0, -0.75, 0.25)
  286. local w3 = it("Weld")
  287. w3.Parent = prt3
  288. w3.Part0 = prt3
  289. w3.Part1 = prt1
  290. w3.C1 = euler(0, 0, 0) * cf(0, 0, 0)
  291. w3.C0 = euler(math.rad(90), 0,0) * cf(0, -0.5, -0.25)
  292. local w4 = it("Weld")
  293. w4.Parent = prt4
  294. w4.Part0 = prt4
  295. w4.Part1 = prt2
  296. w4.C1 = euler(0, 0, 0) * cf(0, 0, 0.16)
  297. w4.C0 = euler(0, 0,0) * cf(0, -1, 0)
  298. local w4b = it("Weld")
  299. w4b.Parent = prt4b
  300. w4b.Part0 = prt4b
  301. w4b.Part1 = prt4
  302. w4b.C1 = euler(0,0,0) * cf(0, 0, 0)
  303. w4b.C0 = euler(0,0,0) * cf(0, 0, 0)
  304. local w5 = it("Weld")
  305. w5.Parent = prt5
  306. w5.Part0 = prt5
  307. w5.Part1 = prt1
  308. w5.C1 = euler(0, 0, 0) * cf(0, 0, 0)
  309. w5.C0 = euler(math.rad(90), 0,0) * cf(0, -0.65, -0.1)
  310. local w6 = it("Weld")
  311. w6.Parent = prt6
  312. w6.Part0 = prt6
  313. w6.Part1 = prt4
  314. w6.C1 = euler(0, 0, 0) * cf(0, 0, 0.14)
  315. --w6.C0 = euler(0, math.rad(45),math.rad(0)) * cf(0, -1.65, -0.09)
  316. w6.C0 = euler(0, math.rad(45),math.rad(0)) * cf(0, -.65, 0.05)
  317. local w7 = it("Weld")
  318. w7.Parent = prt7
  319. w7.Part0 = prt7
  320. w7.Part1 = prt4
  321. w7.C1 = euler(0, 0, 0) * cf(0, 0, 0)
  322. w7.C0 = euler(0, 0,0) * cf(0, 0, 0.08)
  323. local w10 = it("Weld")
  324. w10.Parent = prt8
  325. w10.Part0 = prt8
  326. w10.Part1 = prt5
  327. w10.C1 = euler(0, 0, 0) * cf(0, -0.8, 0)
  328. w10.C0 = euler(0, 0,0) * cf(0, -0.3, -0.2)
  329. numb=0
  330. for i=0,5 do
  331. local msha = it("CylinderMesh")
  332. msha.Scale = vt(0.15,0.51,0.15)
  333. local prta = it("Part")
  334. prta.formFactor = 3
  335. prta.CanCollide = true
  336. prta.Name = "Ammo"
  337. prta.Locked = true
  338. prta.Size = vt(1,1,1)
  339. prta.Parent = prt2
  340. msha.Parent = prta
  341. prta.BrickColor = BrickColor.new("Black")
  342. local wa = it("Weld")
  343. wa.Parent = prta
  344. wa.Part0 = prta
  345. wa.Part1 = prt2
  346. wa.C1 = euler(0, 0, 0) * cf(0, 0, 0)
  347. wa.C0 = cf(0, -0.15, 0.19) * euler(0, numb, 0)
  348. numb=numb+1.046666667
  349. coroutine.resume(coroutine.create(function(Part)
  350. while prt2.Parent~=nil do
  351. wait()
  352. Part.Transparency=prt2.Transparency
  353. end
  354. end),prta)
  355. end
  356. newgun=swordholder:Clone()
  357. newgun.Name="WeaponClone"
  358. local newmsh1 = it("CylinderMesh")
  359. newmsh1.Scale = vt(1,1,1)
  360. local newmsh2 = it("BlockMesh")
  361. newmsh2.Scale = vt(1,1,1)
  362. local newmsh3 = it("CylinderMesh")
  363. newmsh3.Scale = vt(1,1,1)
  364. local newmsh4 = it("CylinderMesh")
  365. newmsh4.Scale = vt(1,1,1)
  366. local newmsh5 = it("CylinderMesh")
  367. newmsh5.Scale = vt(1,1,1)
  368. local newmsh6 = it("BlockMesh")
  369. newmsh6.Scale = vt(1,1,1)
  370. local newprt1 = it("Part")
  371. newprt1.formFactor = 3
  372. newprt1.CanCollide = true
  373. newprt1.Name = "Handle"
  374. newprt1.Locked = true
  375. newprt1.Size = vt(0.3,1,0.3)
  376. newprt1.Parent = newgun
  377. newmsh1.Parent = newprt1
  378. newprt1.BrickColor = handlecolor
  379. local newprt2 = it("Part")
  380. newprt2.formFactor = 3
  381. newprt2.CanCollide = true
  382. newprt2.Name = "Handle2"
  383. newprt2.Locked = true
  384. newprt2.Size = vt(0.5,0.2,1.5)
  385. newprt2.Parent = newgun
  386. newmsh2.Parent = newprt2
  387. newprt2.BrickColor = handlecolor
  388. local newprt3 = it("Part")
  389. newprt3.formFactor = 3
  390. newprt3.CanCollide = false
  391. newprt3.Name = "Handle3"
  392. newprt3.Locked = true
  393. newprt3.Size = vt(0.7,1.2,0.7)
  394. newprt3.Parent = newgun
  395. newmsh3.Parent = newprt3
  396. newprt3.BrickColor = BrickColor.new("White")
  397. local newprt4 = it("Part")
  398. newprt4.formFactor = 3
  399. newprt4.CanCollide = true
  400. newprt4.Name = "BackBarrel"
  401. newprt4.Locked = true
  402. newprt4.Size = vt(0.5,1.2,0.5)
  403. newprt4.Parent = newgun
  404. newmsh4.Parent = newprt4
  405. newprt4.BrickColor = handlecolor
  406. local newprt5 = it("Part")
  407. newprt5.formFactor = 3
  408. newprt5.CanCollide = true
  409. newprt5.Name = "Barrel"
  410. newprt5.Locked = true
  411. newprt5.Size = vt(0.4,2.5,0.4)
  412. newprt5.Parent = newgun
  413. newmsh5.Parent = newprt5
  414. newprt5.BrickColor = handlecolor
  415. local newprt6 = it("Part")
  416. newprt6.formFactor = 3
  417. newprt6.CanCollide = false
  418. newprt6.Name = "BarrelHandle"
  419. newprt6.Locked = true
  420. newprt6.Size = vt(0.3,1,0.3)
  421. newprt6.Parent = newgun
  422. newmsh6.Parent = newprt6
  423. newprt6.BrickColor = handlecolor
  424. local neww1 = it("Weld")
  425. neww1.Parent = newprt1
  426. neww1.Part0 = newprt1
  427. neww1.Name = "Weld1"
  428. local neww2 = it("Weld")
  429. neww2.Parent = newprt2
  430. neww2.Part0 = newprt2
  431. neww2.Part1 = newprt1
  432. neww2.Name = "Weld2"
  433. neww2.C1 = cf(0, 0,0) * angles(0, 0, 0)
  434. neww2.C0 = angles(math.rad(0), 0, 0) * cf(0, 0.6,0.5)
  435. local neww3 = it("Weld")
  436. neww3.Parent = newprt3
  437. neww3.Part0 = newprt3
  438. neww3.Part1 = newprt2
  439. neww3.C1 = cf(0, 0,0) * angles(0, 0, 0)
  440. neww3.C0 = angles(math.rad(90), 0, 0) * cf(0, 0.25,-0.5)
  441. local neww4 = it("Weld")
  442. neww4.Parent = newprt4
  443. neww4.Part0 = newprt4
  444. neww4.Part1 = newprt2
  445. neww4.C1 = cf(0, 0,0) * angles(0, 0, 0)
  446. neww4.C0 = angles(math.rad(90), 0, 0) * cf(0, 0.25,0.5)
  447. local neww5 = it("Weld")
  448. neww5.Parent = newprt5
  449. neww5.Part0 = newprt5
  450. neww5.Part1 = newprt3
  451. neww5.C1 = cf(0, 0,0) * angles(0, 0, 0)
  452. neww5.C0 = angles(math.rad(0), 0, 0) * cf(0, 1.5,0)
  453. local neww6 = it("Weld")
  454. neww6.Parent = newprt6
  455. neww6.Part0 = newprt6
  456. neww6.Part1 = newprt3
  457. neww6.C1 = cf(0, 0,0) * angles(0, 0, 0)
  458. neww6.C0 = angles(math.rad(90), 0, 0) * cf(0, 1.5,-0.5)
  459. if torsc then
  460. holstermsh1 = it("SpecialMesh")
  461. holstermsh1.MeshId = "http://www.roblox.com/asset/?id=3270017"
  462. holstermsh1.Scale = vt(2.01,1,1.01)
  463. else
  464. holstermsh1 = it("BlockMesh")
  465. holstermsh1.Scale = vt(2.01,0.1,1.01)
  466. end
  467. local holstermsh2 = it("SpecialMesh")
  468. holstermsh2.MeshId = "http://www.roblox.com/asset/?id=3270017"
  469. holstermsh2.Scale = vt(0.5,0.5,7)
  470. local holstermsh3 = it("BlockMesh")
  471. holstermsh3.Scale = vt(1,1,1)
  472. local holster1 = it("Part")
  473. holster1.formFactor = 3
  474. holster1.CanCollide = false
  475. holster1.Name = "HolsterStrap"
  476. holster1.Locked = true
  477. holster1.Size = vt(1,1,1)
  478. holster1.Parent = swordholder
  479. holstermsh1.Parent = holster1
  480. holster1.BrickColor = handlecolor
  481. local holster2 = it("Part")
  482. holster2.formFactor = 3
  483. holster2.CanCollide = false
  484. holster2.Name = "Holster"
  485. holster2.Locked = true
  486. holster2.Size = vt(1,1,1)
  487. --holster2.Parent = swordholder
  488. holstermsh2.Parent = holster2
  489. holster2.BrickColor = handlecolor
  490. local holster3 = it("Part")
  491. holster3.formFactor = 3
  492. holster3.CanCollide = false
  493. holster3.Name = "AmmoHolster"
  494. holster3.Locked = true
  495. holster3.Size = vt(0.2,1,0.7)
  496. holster3.Parent = swordholder
  497. holstermsh3.Parent = holster3
  498. holster3.BrickColor = handlecolor
  499. local w7 = it("Weld")
  500. w7.Parent = holster1
  501. w7.Part0 = holster1
  502. w7.Part1 = Torso
  503. w7.C1 = cf(0, 0,0) * angles(0, 0, 0)
  504. if torsc then
  505. w7.C0 = angles(math.rad(90), 0, 0) * cf(0, 1,0)
  506. else
  507. w7.C0 = angles(0, 0, 0) * cf(0, 1,0)
  508. end
  509. local w8 = it("Weld")
  510. w8.Parent = holster2
  511. w8.Part0 = holster2
  512. w8.Part1 = Torso
  513. w8.C1 = cf(0, 0,0) * angles(0, 0, 0)
  514. w8.C0 = angles(math.rad(45), 0, 0) * cf(-1.1, 1-0.25,0)
  515. local w9 = it("Weld")
  516. w9.Parent = holster3
  517. w9.Part0 = holster3
  518. w9.Part1 = Torso
  519. w9.C1 = cf(0, 0,0) * angles(0, 0, 0)
  520. w9.C0 = angles(math.rad(45), 0, 0) * cf(1, 0.75,-0.5)
  521. local model2 = it("Model")
  522. model2.Name = "BlastCannon"
  523. model2.Parent = Character
  524. local prt16 = it("Part")
  525. prt16.formFactor = 1
  526. prt16.Parent = model2
  527. prt16.Reflectance = 0.2
  528. prt16.CanCollide = false
  529. prt16.BrickColor = BrickColor.new("Black")
  530. prt16.Name = "CannonHandle1"
  531. prt16.Size = vt(1,2,1)
  532. prt16.Position = Torso.Position
  533. local prt17 = it("Part")
  534. prt17.formFactor = 1
  535. prt17.Parent = model2
  536. prt17.Reflectance = 0.2
  537. prt17.CanCollide = false
  538. prt17.BrickColor = BrickColor.new("Black")
  539. prt17.Name = "CannonHandle2"
  540. prt17.Size = vt(1,1,1)
  541. prt17.Position = Torso.Position
  542. local prt18 = it("Part")
  543. prt18.formFactor = 1
  544. prt18.Parent = model2
  545. prt18.Reflectance = 0.2
  546. prt18.CanCollide = false
  547. prt18.BrickColor = BrickColor.new("Black")
  548. prt18.Name = "CannonPart1"
  549. prt18.Size = vt(1,2,1)
  550. prt18.Position = Torso.Position
  551. local prt19 = it("Part")
  552. prt19.formFactor = 1
  553. prt19.Parent = model2
  554. prt19.Reflectance = 0.2
  555. prt19.CanCollide = false
  556. prt19.BrickColor = BrickColor.new("Black")
  557. prt19.Name = "CannonPart2"
  558. prt19.Size = vt(1,2,1)
  559. prt19.Position = Torso.Position
  560. local prt20 = it("Part")
  561. prt20.formFactor = 1
  562. prt20.Parent = model2
  563. prt20.Reflectance = 0.2
  564. prt20.CanCollide = false
  565. prt20.BrickColor = BrickColor.new("White")
  566. prt20.Name = "CannonHandle3"
  567. prt20.Size = vt(1,2,1)
  568. prt20.Position = Torso.Position
  569. local prt21 = it("Part")
  570. prt21.formFactor = 1
  571. prt21.Parent = model2
  572. prt21.Reflectance = 0.2
  573. prt21.CanCollide = false
  574. prt21.BrickColor = BrickColor.new("Black")
  575. prt21.Name = "CannonPart3"
  576. prt21.Size = vt(1,2,1)
  577. prt21.Position = Torso.Position
  578. local prt22 = it("Part")
  579. prt22.formFactor = 1
  580. prt22.Parent = model2
  581. prt22.Reflectance = 0.2
  582. prt22.CanCollide = false
  583. prt22.BrickColor = BrickColor.new("Black")
  584. prt22.Name = "CannonPart4"
  585. prt22.Size = vt(1,2,1)
  586. prt22.Position = Torso.Position
  587. local prt23 = it("Part")
  588. prt23.formFactor = 1
  589. prt23.Parent = model2
  590. prt23.Reflectance = 0.2
  591. prt23.CanCollide = false
  592. prt23.BrickColor = BrickColor.new("Medium stone grey")
  593. prt23.Name = "CannonPart5"
  594. prt23.Size = vt(1,1,1)
  595. prt23.Position = Torso.Position
  596. local prt24 = it("Part")
  597. prt24.formFactor = 1
  598. prt24.Parent = model2
  599. prt24.Reflectance = 0
  600. prt24.CanCollide = false
  601. prt24.BrickColor = BrickColor.new("Black")
  602. prt24.Name = "CannonPart6"
  603. prt24.Size = vt(1,1,1)
  604. prt24.Position = Torso.Position
  605. local prt25 = it("Part")
  606. prt25.formFactor = 1
  607. prt25.Parent = model2
  608. prt25.Reflectance = 0.2
  609. prt25.CanCollide = false
  610. prt25.BrickColor = BrickColor.new("Medium stone grey")
  611. prt25.Name = "CannonPart7"
  612. prt25.Size = vt(1,2,1)
  613. prt25.Position = Torso.Position
  614. local prt26 = it("Part")
  615. prt26.formFactor = 1
  616. prt26.Parent = model2
  617. prt26.Reflectance = 0.2
  618. prt26.CanCollide = false
  619. prt26.BrickColor = BrickColor.new("Medium stone grey")
  620. prt26.Name = "CannonPart8"
  621. prt26.Size = vt(1,1,1)
  622. prt26.Position = Torso.Position
  623. local prt27 = it("Part")
  624. prt27.formFactor = 1
  625. prt27.Parent = model2
  626. prt27.Reflectance = 0
  627. prt27.CanCollide = false
  628. prt27.BrickColor = BrickColor.new("Black")
  629. prt27.Name = "CannonPart9"
  630. prt27.Size = vt(1,1,1)
  631. prt27.Position = Torso.Position
  632. local prt28 = it("Part")
  633. prt28.formFactor = 1
  634. prt28.Parent = model2
  635. prt28.Reflectance = 0
  636. prt28.CanCollide = false
  637. prt28.BrickColor = BrickColor.new("Black")
  638. prt28.Name = "CannonPart10"
  639. prt28.Size = vt(1,1,1)
  640. prt28.Position = Torso.Position
  641. local prt29 = it("Part")
  642. prt29.formFactor = 1
  643. prt29.Parent = model2
  644. prt29.Reflectance = 0.2
  645. prt29.CanCollide = false
  646. prt29.BrickColor = BrickColor.new("Black")
  647. prt29.Name = "CannonPart11"
  648. prt29.Size = vt(1,2,1)
  649. prt29.Position = Torso.Position
  650. local prt30 = it("Part")
  651. prt30.formFactor = 1
  652. prt30.Parent = model2
  653. prt30.Reflectance = 0
  654. prt30.CanCollide = false
  655. prt30.BrickColor = BrickColor.new("Bright blue")
  656. prt30.Name = "CannonPart12"
  657. prt30.Size = vt(1,2,1)
  658. prt30.Position = Torso.Position
  659. local prt31 = it("Part")
  660. prt31.formFactor = 1
  661. prt31.Parent = model2
  662. prt31.Reflectance = 0
  663. prt31.CanCollide = false
  664. prt31.BrickColor = BrickColor.new("Black")
  665. prt31.Name = "CannonPart13"
  666. prt31.Size = vt(1,2,1)
  667. prt31.Position = Torso.Position
  668. local msh16 = it("BlockMesh")
  669. msh16.Parent = prt16
  670. msh16.Scale = vt(0.5,0.6,0.5)
  671. local msh17 = it("BlockMesh")
  672. msh17.Parent = prt17
  673. msh17.Scale = vt(0.6,0.3,0.6)
  674. local msh18 = it("BlockMesh")
  675. msh18.Parent = prt18
  676. msh18.Scale = vt(0.7,0.5,0.7)
  677. local msh19 = it("BlockMesh")
  678. msh19.Parent = prt19
  679. msh19.Scale = vt(0.7,0.8,0.8)
  680. local msh20 = it("BlockMesh")
  681. msh20.Parent = prt20
  682. msh20.Scale = vt(0.59,0.79,0.69)
  683. msh20.Scale = vt(0.69,0.79,0.69)
  684. local msh21 = it("BlockMesh")
  685. msh21.Parent = prt21
  686. msh21.Scale = vt(0.7,0.65,0.7)
  687. local msh22 = it("BlockMesh")
  688. msh22.Parent = prt22
  689. msh22.Scale = vt(0.7,1.2,0.7)
  690. local msh23 = it("CylinderMesh")
  691. msh23.Parent = prt23
  692. msh23.Scale = vt(0.5,0.5,0.5)
  693. local msh24 = it("CylinderMesh")
  694. msh24.Parent = prt24
  695. msh24.Scale = vt(0.4,0.51,0.4)
  696. local msh25 = it("CylinderMesh")
  697. msh25.Parent = prt25
  698. msh25.Scale = vt(0.5,0.9,0.5)
  699. local msh26 = it("CylinderMesh")
  700. msh26.Parent = prt26
  701. msh26.Scale = vt(0.4,0.5,0.4)
  702. local msh27 = it("CylinderMesh")
  703. msh27.Parent = prt27
  704. msh27.Scale = vt(0.3,0.51,0.3)
  705. local msh28 = it("CylinderMesh")
  706. msh28.Parent = prt28
  707. msh28.Scale = vt(0.6,0.51,0.6)
  708. local msh29 = it("BlockMesh")
  709. msh29.Parent = prt29
  710. msh29.Scale = vt(0.7,0.65,1)
  711. local msh30 = it("CylinderMesh")
  712. msh30.Parent = prt30
  713. msh30.Scale = vt(1,0.65,1.2)
  714. local msh31 = it("BlockMesh")
  715. msh31.Parent = prt31
  716. msh31.Scale = vt(0.9,0.9,0.5)
  717. local wld16 = it("Weld")
  718. wld16.Parent = prt16
  719. wld16.Part0 = prt16
  720. wld16.Part1 = Torso
  721. wld16.C0 = euler(math.rad(90),0,0) * cf(0.6,-0.5,-2.2)
  722. local wld17 = it("Weld")
  723. wld17.Parent = prt17
  724. wld17.Part0 = prt17
  725. wld17.Part1 = prt16
  726. wld17.C0 = euler(0,0,0) * cf(0,0.45,0)
  727. local wld18 = it("Weld")
  728. wld18.Parent = prt18
  729. wld18.Part0 = prt18
  730. wld18.Part1 = prt16
  731. wld18.C0 = euler(0,0,0) * cf(0,-1,0)
  732. local wld19 = it("Weld")
  733. wld19.Parent = prt19
  734. wld19.Part0 = prt19
  735. wld19.Part1 = prt18
  736. wld19.C0 = euler(math.rad(90),0,0) * cf(0,-0.4,-0.45)
  737. local wld20 = it("Weld")
  738. wld20.Parent = prt20
  739. wld20.Part0 = prt20
  740. wld20.Part1 = prt19
  741. wld20.C0 = euler(0,0,0) * cf(0,0,0.5)
  742. local wld21 = it("Weld")
  743. wld21.Parent = prt21
  744. wld21.Part0 = prt21
  745. wld21.Part1 = prt19
  746. wld21.C0 = euler(math.rad(90),0,0) * cf(0,1.1,0.25)
  747. local wld22 = it("Weld")
  748. wld22.Parent = prt22
  749. wld22.Part0 = prt22
  750. wld22.Part1 = prt18
  751. wld22.C0 = euler(math.rad(90),0,0) * cf(0,-0.4,1.1)
  752. local wld23 = it("Weld")
  753. wld23.Parent = prt23
  754. wld23.Part0 = prt23
  755. wld23.Part1 = prt22
  756. wld23.C0 = euler(0,0,0) * cf(0,-1.3,0)
  757. local wld24 = it("Weld")
  758. wld24.Parent = prt24
  759. wld24.Part0 = prt24
  760. wld24.Part1 = prt23
  761. wld24.C0 = euler(0,0,0) * cf(0,0,0)
  762. local wld25 = it("Weld")
  763. wld25.Parent = prt25
  764. wld25.Part0 = prt25
  765. wld25.Part1 = prt18
  766. wld25.C0 = euler(math.rad(90),0,0) * cf(0,0.3,1.1)
  767. local wld26 = it("Weld")
  768. wld26.Parent = prt26
  769. wld26.Part0 = prt26
  770. wld26.Part1 = prt25
  771. wld26.C0 = euler(0,0,0) * cf(0,-1,0)
  772. local wld27 = it("Weld")
  773. wld27.Parent = prt27
  774. wld27.Part0 = prt27
  775. wld27.Part1 = prt26
  776. wld27.C0 = euler(0,0,0) * cf(0,0,0)
  777. local wld28 = it("Weld")
  778. wld28.Parent = prt28
  779. wld28.Part0 = prt28
  780. wld28.Part1 = prt25
  781. wld28.C0 = euler(0,0,0) * cf(0,0,0)
  782. local wld29 = it("Weld")
  783. wld29.Parent = prt29
  784. wld29.Part0 = prt29
  785. wld29.Part1 = prt21
  786. wld29.C0 = euler(0,0,0) * cf(0,0,0.8)
  787. local wld30 = it("Weld")
  788. wld30.Parent = prt30
  789. wld30.Part0 = prt30
  790. wld30.Part1 = prt29
  791. wld30.C0 = euler(math.rad(90),0,0) * cf(0,0,-0.2)
  792. local wld31 = it("Weld")
  793. wld31.Parent = prt31
  794. wld31.Part0 = prt31
  795. wld31.Part1 = prt18
  796. wld31.C0 = euler(math.rad(90),0,0) * cf(0,-0.4,0.5)
  797. local RAP = it("Part")
  798. RAP.formFactor = 0
  799. RAP.CanCollide = false
  800. RAP.Name = "RAPart"
  801. RAP.Locked = true
  802. RAP.Size = vt(1,1,1)
  803. RAP.Parent = swordholder
  804. RAP.Transparency = 1
  805. local w = it("Weld")
  806. w.Parent = RAP
  807. w.Part0 = RAP
  808. w.Part1 = RightArm
  809. w.C1 = euler(0, 0, 0) * cf(0, 0,0)
  810. w.C0 = euler(math.rad(0), 0, 0) * cf(0, 1, 0)
  811. saydebounce=false
  812. function Say(type)
  813. --[[if saydebounce==false then
  814. saydebounce=true
  815. if type=="Gunzerking" then
  816. Sayings={"TIME TO OVERCOMPENSATE!","DUAL WIELD, BABY!","DOUBLE THE FUN!","THIS IS RIDICULOUS!","AHAHAHAH, YOU'RE ALL GONNA DIE!"}
  817. elseif type=="KilledGunzerk" then
  818. Sayings={"THIS IS RIDICULOUS!","GET OFF MY PLANE!","Smile, son of a...!","WAHAHAHAHAH!","DIE, BITCHES!"}
  819. elseif type=="NoAmmo" then
  820. Sayings={"Bullets schmullets.","I need more gun!","Damn! Out of ammo!"}
  821. elseif type=="Killed" then
  822. Sayings={"Hell yeah!","It's been revoked!","Scream for me!","Get off my plane!"}
  823. elseif type=="Shooting" then
  824. Sayings={"BULLETS FOR EVERYONE!","NEVER ENDING FIRE!","AHAHAHAHAH!","DIE ALREADY!","NOT ENOUGH BULLETS!"}
  825. elseif type=="FacepalmTaunt" then
  826. Sayings={"Ugh.","You've gotta be kidding me.","Pathetic."}
  827. end
  828. if math.random(1,3)==1 then
  829. game:GetService("Chat"):Chat(Character,Sayings[math.random(1,#Sayings)],2)
  830. end
  831. coroutine.resume(coroutine.create(function()
  832. wait(1)
  833. saydebounce=false
  834. end))
  835. end]]
  836. end
  837. function unequipweld()
  838. w1.Part1 = Torso
  839. w1.C1 = euler(0, 0, 0) * cf(0, 0,0)
  840. w1.C0 = euler(math.rad(90),math.rad(0), 0) * cf(-1, 1, -0.25)
  841. end
  842. unequipweld()
  843. function equipweld()
  844. w1.Part0 = prt1
  845. w1.Part1 = RAP
  846. w1.C1 = euler(0, 0, 0) * cf(0, 0,0)
  847. w1.C0 = angles(math.rad(90), math.rad(0), math.rad(0)) * cf(0, 0, 0)
  848. end
  849. so = function(id,par,vol,pit)
  850. coroutine.resume(coroutine.create(function()
  851. local sou = it("Sound",par or workspace)
  852. sou.Volume=vol
  853. sou.Pitch=pit or 1
  854. sou.SoundId=id
  855. wait()
  856. sou:play()
  857. wait(6)
  858. sou:Remove()
  859. end))
  860. end
  861. function ss(parent,p) --Slash
  862. so("rbxasset://sounds\\swordslash.wav",parent,.7,p)
  863. --[[local SlashSound = it("Sound")
  864. SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
  865. SlashSound.Parent = parent
  866. SlashSound.Volume = .7
  867. SlashSound.Pitch = p
  868. SlashSound.PlayOnRemove = true
  869. coroutine.resume(coroutine.create(function()
  870. wait()
  871. SlashSound.Parent = nil
  872. end))]]
  873. end
  874. function uss(parent,p) --unsheath
  875. so("rbxasset://sounds\\unsheath.wav",parent,.7,p)
  876. --[[local SlashSound = it("Sound")
  877. SlashSound.SoundId = "rbxasset://sounds\\unsheath.wav"
  878. SlashSound.Parent = parent
  879. SlashSound.Volume = .7
  880. SlashSound.Pitch = p
  881. SlashSound.PlayOnRemove = true
  882. coroutine.resume(coroutine.create(function()
  883. wait()
  884. SlashSound.Parent = nil
  885. end))]]
  886. end
  887. function cs(parent,p) --Magic Charge
  888. so("http://www.roblox.com/asset/?id=2101137",parent,.7,p)
  889. --[[local SlashSound = it("Sound")
  890. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2101137"
  891. SlashSound.Parent = parent
  892. SlashSound.Volume = .7
  893. SlashSound.Pitch = p
  894. SlashSound.PlayOnRemove = true
  895. coroutine.resume(coroutine.create(function()
  896. wait()
  897. SlashSound.Parent = nil
  898. end))]]
  899. end
  900. function ls(parent,p) --Lazer Sound
  901. so("http://www.roblox.com/asset?id=1369158",parent,.7,p)
  902. --[[local SlashSound = it("Sound")
  903. SlashSound.SoundId = "http://www.roblox.com/asset?id=1369158"
  904. SlashSound.Parent = parent
  905. SlashSound.Volume = .7
  906. SlashSound.Pitch = p
  907. SlashSound.PlayOnRemove = true
  908. coroutine.resume(coroutine.create(function()
  909. wait()
  910. SlashSound.Parent = nil
  911. end))]]
  912. end
  913. function ts(parent,p)
  914. so("http://www.roblox.com/asset/?id=12222030",parent,.7,p)
  915. --[[local SlashSound = it("Sound")
  916. SlashSound.SoundId = "http://www.roblox.com/asset/?id=12222030"
  917. SlashSound.Parent = parent
  918. SlashSound.Volume = .7
  919. SlashSound.Pitch = p
  920. SlashSound.PlayOnRemove = true
  921. coroutine.resume(coroutine.create(function()
  922. wait()
  923. SlashSound.Parent = nil
  924. end))]]
  925. end
  926. function fs(parent,p) --Fire Sound
  927. so("http://www.roblox.com/asset/?id=2697431",parent,.7,p)
  928. --[[local SlashSound = it("Sound")
  929. SlashSound.SoundId = "http://www.roblox.com/asset/?id=31758982"
  930. SlashSound.Parent = parent
  931. SlashSound.Volume = .7
  932. SlashSound.Pitch = p
  933. SlashSound.PlayOnRemove = true
  934. coroutine.resume(coroutine.create(function()
  935. wait()
  936. SlashSound.Parent = nil
  937. end))]]
  938. end
  939. function ms(parent,p) --Metal Cling Sound
  940. so("rbxasset://sounds\\metal.ogg",parent,1,p)
  941. --[[local SlashSound = it("Sound")
  942. SlashSound.SoundId = "rbxasset://sounds\\metal.ogg"
  943. SlashSound.Parent = parent
  944. SlashSound.Volume = 5
  945. SlashSound.Pitch = p
  946. SlashSound.PlayOnRemove = true
  947. coroutine.resume(coroutine.create(function()
  948. wait()
  949. SlashSound.Parent = nil
  950. end))]]
  951. end
  952. function bs(parent,p) --Berserk Sound
  953. so("http://www.roblox.com/asset/?id=2676305",parent,1,p)
  954. --[[local SlashSound = it("Sound")
  955. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2676305"
  956. SlashSound.Parent = parent
  957. SlashSound.Volume = 1
  958. SlashSound.Pitch = p
  959. SlashSound.PlayOnRemove = true
  960. coroutine.resume(coroutine.create(function()
  961. wait()
  962. SlashSound.Parent = nil
  963. end))]]
  964. end
  965. function hs(parent,p) --Ammo Hit Sound
  966. --ms(parent,p)
  967. end
  968. function as(parent,p) --Gun Shoot Sound
  969. so("http://www.roblox.com/asset/?id=134589225",parent,0.5,p)
  970. --[[local SlashSound = it("Sound")
  971. SlashSound.SoundId = "http://roblox.com/asset/?id=10209257"
  972. SlashSound.Parent = parent
  973. SlashSound.Volume = 0.5
  974. SlashSound.Pitch = p
  975. SlashSound.PlayOnRemove = true
  976. coroutine.resume(coroutine.create(function()
  977. wait()
  978. SlashSound.Parent = nil
  979. end))]]
  980. end
  981. function as2(parent,p) --Gun Shoot Sound 2
  982. so("http://www.roblox.com/asset/?id=134589225",parent,0.7,p)
  983. --[[local SlashSound = it("Sound")
  984. SlashSound.SoundId = "http://roblox.com/asset/?id=97848313"
  985. SlashSound.Parent = parent
  986. SlashSound.Volume = 0.7
  987. SlashSound.Pitch = p
  988. SlashSound.PlayOnRemove = true
  989. coroutine.resume(coroutine.create(function()
  990. wait()
  991. SlashSound.Parent = nil
  992. end))]]
  993. end
  994. function ars(parent,p) --Gun Reload Sound
  995. so("http://roblox.com/asset/?id=10209869",parent,1,p)
  996. --[[local SlashSound = it("Sound")
  997. SlashSound.SoundId = "http://roblox.com/asset/?id=10209869"
  998. SlashSound.Parent = parent
  999. SlashSound.Volume = 1
  1000. SlashSound.Pitch = p
  1001. SlashSound.PlayOnRemove = true
  1002. coroutine.resume(coroutine.create(function()
  1003. wait()
  1004. SlashSound.Parent = nil
  1005. end))]]
  1006. end
  1007. --
  1008. --
  1009. function returndmg()
  1010. mindamage = omindamage
  1011. maxdamage = omaxdamage
  1012. crtmaxdamage = ocrtmaxdamage
  1013. end
  1014. function subdmg(sub)
  1015. mindamage = omindamage - sub
  1016. maxdamage = omaxdamage - sub
  1017. crtmaxdamage = ocrtmaxdamage - sub
  1018. end
  1019. function prcntdmg(sub)
  1020. mindamage = math.floor(omindamage - (omindamage*(sub/100)))
  1021. maxdamage = math.floor(omaxdamage - (omaxdamage*(sub/100)))
  1022. crtmaxdamage = math.floor(ocrtmaxdamage - (ocrtmaxdamage*(sub/100)))
  1023. end
  1024. function tagHumanoid(humanoid, player)
  1025. local creator_tag = it("ObjectValue")
  1026. creator_tag.Value = player
  1027. creator_tag.Name = "creator"
  1028. creator_tag.Parent = humanoid
  1029. end
  1030. function untagHumanoid(humanoid)
  1031. if humanoid ~= nil then
  1032. local tag = humanoid:findFirstChild("creator")
  1033. if tag ~= nil then
  1034. tag.Parent = nil
  1035. end
  1036. end
  1037. end
  1038. local function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  1039. return game.Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  1040. end
  1041. function hideanim()
  1042. attack = true
  1043. ars(Head,0.85)
  1044. for i = 0.25 ,1 ,0.25 do
  1045. wait()
  1046. w10.C1 = euler(0, 0, 0) * cf(0, -0.8*i, 0)
  1047. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90),math.rad(0),math.rad(-60+60*i))
  1048. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25+25*i), 0, 0)
  1049. Neck.C0 = neckcf0 * angles(math.rad(5*i),0,math.rad(-30*i))
  1050. end
  1051. for i = 0.1 ,1 ,0.2 do
  1052. wait()
  1053. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90),math.rad(0),math.rad(0))
  1054. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(50-70*i), 0, 0)
  1055. w2.C0 = euler(math.rad(90+90*i), 0,0) * cf(0, -0.75, 0.25)
  1056. Neck.C0 = neckcf0 * angles(math.rad(5-10*i),0,math.rad(-30))
  1057. end
  1058. for i = 0.1 ,1 ,0.1 do
  1059. wait()
  1060. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90),math.rad(0),math.rad(0))
  1061. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(50-70-10*i), 0, 0)
  1062. w2.C0 = euler(math.rad(90+90), 0,0) * cf(0, -0.75, 0.25)
  1063. Neck.C0 = neckcf0 * angles(math.rad(5-10-5*i),0,math.rad(-30))
  1064. end
  1065. for i = 0.1 ,1 ,0.1 do
  1066. wait()
  1067. RW.C0 = cf(1.5, 0.5, -0.25+0.25*i) * angles(math.rad(90-110*i),math.rad(0),math.rad(0))
  1068. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(-30+30*i), 0, 0)
  1069. Neck.C0 = neckcf0 * angles(math.rad(-10+40*i),0,math.rad(-30))
  1070. end
  1071. unequipweld()
  1072. for i = 0.1 ,1 ,0.1 do
  1073. wait()
  1074. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(-20+20*i),math.rad(0),math.rad(0))
  1075. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(0), 0, 0)
  1076. Neck.C0 = neckcf0 * angles(math.rad(30-30*i),0,math.rad(-30+30*i))
  1077. end
  1078. Neck.C0 = neckcf0
  1079. RWRem()
  1080. LWRem()
  1081. attack = false
  1082. end
  1083. function equipanim()
  1084. attack = true
  1085. RWFunc()
  1086. for i = 0.1 ,1 ,0.1 do
  1087. wait()
  1088. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(-20*i),math.rad(0),math.rad(0))
  1089. RW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  1090. Neck.C0 = neckcf0 * angles(math.rad(30*i),0,math.rad(-30*i))
  1091. end
  1092. equipweld()
  1093. ars(Head,1)
  1094. for i = 0.1 ,1 ,0.1 do
  1095. wait()
  1096. RW.C0 = cf(1.5, 0.5, -0.25*i) * angles(math.rad(-20+130*i),math.rad(0),math.rad(0))
  1097. RW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  1098. w2.C0 = euler(math.rad(180-90*i), 0,0) * cf(0, -0.75, 0.25)
  1099. Neck.C0 = neckcf0 * angles(math.rad(30-35*i),0,math.rad(-30))
  1100. end
  1101. --LWFunc()
  1102. for i = 0.1 ,1 ,0.1 do
  1103. wait()
  1104. w10.C1 = euler(0, 0, 0) * cf(0, -0.8+0.8*i, 0)
  1105. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(110-20*i),math.rad(0),math.rad(-60*i))
  1106. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25*i), 0, 0)
  1107. Neck.C0 = neckcf0 * angles(math.rad(-5+5*i),0,math.rad(-30+30*i))
  1108. end
  1109. Neck.C0 = neckcf0
  1110. attack = false
  1111. end
  1112. function faketors()
  1113. local T = it("Part")
  1114. T.formFactor = 0
  1115. T.CanCollide = false
  1116. T.Name = "FakeTorso"
  1117. T.Locked = true
  1118. T.Size = Torso.Size
  1119. T.Parent = swordholder
  1120. T.Transparency = 1
  1121. T.BrickColor = Torso.BrickColor
  1122. for i,z in pairs(Character:GetChildren()) do
  1123. if z.className == "CharacterMesh" then
  1124. if z.BodyPart == Enum.BodyPart.Torso then
  1125. local SM = it("SpecialMesh",T)
  1126. SM.MeshId = "http://www.roblox.com/asset/?id=" .. z.MeshId
  1127. if z.BaseTextureId ~= 0 then
  1128. SM.TextureId = z.BaseTextureId
  1129. elseif z.OverlayTextureId ~= 0 then
  1130. SM.TextureId = z.OverlayTextureId
  1131. else
  1132. SM.TextureId = ""
  1133. end
  1134. end
  1135. end
  1136. end
  1137. local wt = it("Weld")
  1138. wt.Parent = T
  1139. wt.Part0 = T
  1140. wt.Part1 = Torso
  1141. RW.Part0 = T
  1142. LW.Part0 = T
  1143. T.Transparency = 0
  1144. Torso.Transparency = 1
  1145. RHL.Part0 = T
  1146. LHL.Part0 = T
  1147. return wt,T
  1148. end
  1149. if (script.Parent.className ~= "HopperBin") then
  1150. Tool = it("HopperBin")
  1151. Tool.Parent = Backpack
  1152. Tool.Name = ToolName
  1153. script.Parent = Tool
  1154. end
  1155. Bin = script.Parent
  1156. function damagesplat(dmg,hit,crit,blocked)
  1157. local mo = it("Model")
  1158. mo.Name = dmg
  1159. local pa = it("Part",mo)
  1160. pa.formFactor = 3
  1161. if critical==false then
  1162. pa.Size = vt(0.8,0.3,0.8)
  1163. else
  1164. pa.Size = vt(0.8*1.5,0.3*2,0.8*1.5)
  1165. end
  1166. if critical==true then
  1167. pa.BrickColor = BrickColor.new("Really red")
  1168. elseif critical==false then
  1169. pa.BrickColor = BrickColor.new("Bright red")
  1170. end
  1171. if blocked then pa.BrickColor = BrickColor.new("Bright blue") end
  1172. pa.CFrame = cf(hit.Position) * cf(0, 3, 0)
  1173. pa.Name = "Head"
  1174. local hah = it("Humanoid")
  1175. hah.Parent = mo
  1176. hah.MaxHealth = 0
  1177. hah.Health = 0
  1178. local bp = it("BodyPosition")
  1179. bp.P = 14000
  1180. bp.maxForce = vt(math.huge, math.huge, math.huge)
  1181. bp.position = hit.Position + vt(0, 5, 0)
  1182. coroutine.resume(coroutine.create(function()
  1183. wait()
  1184. mo.Parent = workspace
  1185. bp.Parent = pa
  1186. wait(1.4)
  1187. mo:remove()
  1188. end))
  1189. return pa
  1190. end
  1191. function damage(hum,dmg,critornot)
  1192. local pa = damagesplat(dmg,hum.Torso,critornot)
  1193. --hum:TakeDamage(dmg)
  1194. hum.Health=hum.Health-dmg
  1195. coroutine.resume(coroutine.create(function()
  1196. tagHumanoid(hum,Player)
  1197. wait(1)
  1198. untagHumanoid(hum)
  1199. end))
  1200. return pa
  1201. end
  1202. function AddAmmo(add)
  1203. Ammo = Ammo + add
  1204. if Ammo > MaxAmmo then
  1205. Ammo = MaxAmmo
  1206. end
  1207. end
  1208. Enemy=nil
  1209. function ADmg(humm,hit,pos)
  1210. if Enemy==nil then
  1211. Enemy=hit.Parent
  1212. end
  1213. coroutine.resume(coroutine.create(function()
  1214. wait(1)
  1215. print(Enemy.Humanoid.Health)
  1216. if Enemy.Humanoid.Health==0 then
  1217. if Gunzerkering==false then
  1218. Say("Killed")
  1219. else
  1220. Say("KilledGunzerk")
  1221. end
  1222. end
  1223. if attack==false and Enemy~=nil then
  1224. --- Did=HP-Enemy.Humanoid.Health
  1225. --- print("Did "..Did.." Damage")
  1226. Enemy=nil
  1227. --- HP=0
  1228. end
  1229. end))
  1230. if CurrentAmmo == "Normal" then
  1231. if humm.Parent:findFirstChild("Block") ~= nil then
  1232. if humm.Parent.Block.Value then
  1233. damagesplat(0,humm.Torso,false,true)
  1234. return
  1235. end
  1236. end
  1237. if guntype=="Revolver" then
  1238. if critical==true then
  1239. prcntdmg(-75)
  1240. else
  1241. prcntdmg(0)
  1242. end
  1243. elseif guntype=="Machine Gun" then
  1244. prcntdmg(60)
  1245. end
  1246. if critrandomizer ~= 1 then
  1247. local rndmdamage = math.random(mindamage,maxdamage)
  1248. damage(humm,rndmdamage,false)
  1249. elseif critrandomizer == 1 then
  1250. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  1251. damage(humm,rndmdamage,true)
  1252. end
  1253. local vel = it("BodyVelocity",humm.Torso)
  1254. vel.maxForce = vt(1,1,1) * math.huge
  1255. vel.P = vel.P * 5
  1256. vel.velocity = vt(0,1,0) + cf(Torso.Position,humm.Torso.Position).lookVector * 10
  1257. coroutine.resume(coroutine.create(function()
  1258. wait() wait() wait() wait()
  1259. vel.Parent=nil
  1260. end))
  1261. end
  1262. end
  1263. function OT(hit) --Normal Damage
  1264. if Hitdeb == 1 then return end
  1265. if hit.Parent == nil then return end
  1266. local hum = hit.Parent:findFirstChild("Humanoid") if hum ~= nil and hum ~= Character.Humanoid then
  1267. if hum.Health <= 0 then return end
  1268. if hit.Parent:findFirstChild("Block") ~= nil then
  1269. if hit.Parent.Block.Value then
  1270. damagesplat(0,hum.Torso,false,true)
  1271. Hitdeb = 1
  1272. if hit.Parent.Block:findFirstChild("BlockPower") ~= nil then
  1273. if hit.Parent.Block.BlockPower.Value <= 1 then
  1274. hit.Parent.Block.Value = false
  1275. elseif hit.Parent.Block.BlockPower.Value > 1 then
  1276. local critrandomizer = math.random(crtrate)
  1277. if critrandomizer ~= 1 then
  1278. hit.Parent.Block.BlockPower.Value = hit.Parent.Block.BlockPower.Value - blockbreaker
  1279. elseif critrandomizer == 1 then
  1280. hit.Parent.Block.BlockPower.Value = hit.Parent.Block.BlockPower.Value - blockbreaker + 2
  1281. end
  1282. end
  1283. end
  1284. return end end
  1285. local critrandomizer = math.random(crtrate)
  1286. if critrandomizer ~= 1 then
  1287. local rndmdamage = math.random(mindamage,maxdamage)
  1288. damage(hum,rndmdamage,false)
  1289. elseif critrandomizer == 1 then
  1290. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  1291. damage(hum,rndmdamage,true)
  1292. end
  1293. Hitdeb = 1
  1294. end
  1295. end
  1296. function AoE(p,magnitude)
  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 mag = (head.Position - p).magnitude;
  1304. if mag <= magnitude and c[i].Name ~= Character.Name then
  1305. local foundd = false
  1306. for ii = 1 , #AoETrue do
  1307. if AoETrue[ii] == c[i].Name then
  1308. foundd = true
  1309. end
  1310. end
  1311. if foundd then
  1312. end
  1313. --
  1314. if not foundd then
  1315. local critrandomizer = math.random(crtrate)
  1316. if critrandomizer ~= 1 then
  1317. local rndmdamage = math.random(mindamage,maxdamage)
  1318. damage(hum,rndmdamage,false)
  1319. elseif critrandomizer == 1 then
  1320. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  1321. damage(hum,rndmdamage,true)
  1322. end
  1323. table.insert(AoETrue,c[i].Name)
  1324. end
  1325. end
  1326. end
  1327. end
  1328. end
  1329. for ii = 1 , #AoETrue do
  1330. table.remove(AoETrue,#AoETrue)
  1331. end
  1332. end
  1333. --
  1334. --
  1335. function effect(Color,Ref,LP,P1)
  1336. local effectsmsh = it("BlockMesh")
  1337. effectsmsh.Scale = vt(1,1,1)
  1338. effectsmsh.Name = "Mesh"
  1339. local effectsg = it("Part")
  1340. effectsg.formFactor = 3
  1341. effectsg.CanCollide = false
  1342. effectsg.Name = "Eff"
  1343. effectsg.Locked = true
  1344. effectsg.Anchored = true
  1345. effectsg.Size = vt(0.2,1,0.2)
  1346. effectsg.Parent = swordholder
  1347. effectsmsh.Parent = effectsg
  1348. effectsg.BrickColor = BrickColor.new(Color)
  1349. effectsg.Reflectance = Ref
  1350. local point1 = P1
  1351. local mg = (LP.p - point1.p).magnitude
  1352. effectsg.Size = vt(0.2,mg,0.2)
  1353. effectsg.CFrame = cf((LP.p+point1.p)/2,point1.p) * angles(math.rad(90),0,0)
  1354. coroutine.resume(coroutine.create(function()
  1355. for i = 0 , 1 , 0.1 do
  1356. wait()
  1357. effectsg.Transparency = 1*i
  1358. effectsmsh.Scale = vt(0.5-0.5*i,1,0.5-0.5*i)
  1359. end
  1360. wait()
  1361. effectsg.Parent = nil
  1362. end))
  1363. end
  1364. --
  1365. con = nil
  1366. function dmgcnnct()
  1367. if con ~= nil then
  1368. con:disconnect()
  1369. Hitdeb = 0
  1370. end
  1371. con = prt11.Touched:connect(OT)
  1372. end
  1373. function dmgdc()
  1374. if con ~= nil then
  1375. con:disconnect()
  1376. Hitdeb = 0
  1377. end
  1378. end
  1379. function rptddmg(value,des,inc)
  1380. coroutine.resume(coroutine.create(function()
  1381. repeat
  1382. wait(inc)
  1383. Hitdeb = 0
  1384. until value == des
  1385. end))
  1386. end
  1387. function atktype(s,e)
  1388. coroutine.resume(coroutine.create(function ()
  1389. attacktype = e
  1390. wait(0.25)
  1391. attacktype = s
  1392. end))
  1393. end
  1394. function EVENMOARMAGIX2(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  1395. local msh1 = it("SpecialMesh")
  1396. msh1.Scale = vt(0.5,0.5,0.5)
  1397. msh1.MeshType = "Sphere"
  1398. S=it("Part")
  1399. S.Name="Effect"
  1400. S.formFactor=0
  1401. S.Size=vt(x1,y1,z1)
  1402. S.BrickColor=color
  1403. S.Reflectance = 0
  1404. S.TopSurface=0
  1405. S.BottomSurface=0
  1406. S.Transparency=0
  1407. S.Anchored=true
  1408. S.CanCollide=false
  1409. S.CFrame=part
  1410. S.Parent=workspace
  1411. msh1.Parent = S
  1412. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 14 do Part.Mesh.Scale = Part.Mesh.Scale + vt(1,1,1) Part.Transparency=Part.Transparency+0.1 wait() end Part.Parent=nil end),S,S.CFrame)
  1413. end
  1414. guntype="Revolver"
  1415. function shoottrail(mouse)
  1416. spread = 0
  1417. range = 400
  1418. rangepower = 100
  1419. --local p1 = (prt5.CFrame * cf(0,-prt5.Size.y/4,0)).p
  1420. local p1 = (prt4.CFrame * cf(0,prt4.Size.y/2,0)).p
  1421. local spreadvector = (vt(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread)) / 100) * (p1-mouse.Hit.p).magnitude/100
  1422. local dir = cf((p1+mouse.Hit.p)/2,mouse.Hit.p+spreadvector)
  1423. local hit,pos = rayCast(p1,dir.lookVector,10,Character)
  1424. local rangepos = range
  1425. local function drawtrail(From,To)
  1426. local effectsmsh = it("CylinderMesh")
  1427. effectsmsh.Scale = vt(1,1,1)
  1428. effectsmsh.Name = "Mesh"
  1429. local effectsg = it("Part")
  1430. effectsg.formFactor = 3
  1431. effectsg.CanCollide = false
  1432. effectsg.Name = "Eff"
  1433. effectsg.Locked = true
  1434. effectsg.Anchored = true
  1435. effectsg.Size = vt(0.2,0.2,0.2)
  1436. effectsg.Parent = swordholder
  1437. effectsmsh.Parent = effectsg
  1438. effectsg.BrickColor = ammotrail
  1439. effectsg.Reflectance = 0.25
  1440. local LP = From
  1441. local point1 = To
  1442. local mg = (LP - point1).magnitude
  1443. effectsmsh.Scale = vt(1,mg*5,1)
  1444. effectsg.CFrame = cf((LP+point1)/2,point1) * angles(math.rad(90),0,0)
  1445. coroutine.resume(coroutine.create(function()
  1446. for i = 0 , 1 , 0.1 do
  1447. wait()
  1448. effectsg.Transparency = 1*i
  1449. effectsmsh.Scale = vt(1-1*i,mg*5,1-1*i)
  1450. end
  1451. effectsg.Parent = nil
  1452. end))
  1453. end
  1454. local newpos = p1
  1455. local inc = rangepower
  1456. repeat
  1457. wait()
  1458. rangepos = rangepos - 10
  1459. dir = dir * angles(math.rad(-0.1),0,0)
  1460. hit,pos = rayCast(newpos,dir.lookVector,inc,Character)
  1461. drawtrail(newpos,pos)
  1462. newpos = newpos + (dir.lookVector * inc)
  1463. if inc >= 20 then
  1464. inc = inc - 10
  1465. end
  1466. if hit ~= nil then
  1467. rangepos = 0
  1468. end
  1469. until rangepos <= 0
  1470. if hit ~= nil then
  1471. hs(Head,1)
  1472. print(hit.Name)
  1473. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  1474. critical=false
  1475. if hit.Name=="Head" then
  1476. coroutine.resume(coroutine.create(function(HeadPart)
  1477. for i=0,0.5,0.1 do
  1478. wait()
  1479. HeadPart.Velocity=vt(0,60,0)
  1480. end
  1481. end),hit)
  1482. print("CRITICAL")
  1483. critical=true
  1484. p=it("Part")
  1485. p.Parent=workspace
  1486. p.CanCollide=false
  1487. p.Transparency=1
  1488. p.CFrame=hit.CFrame
  1489. p.Anchored=true
  1490. local GUI = it("BillboardGui")
  1491. GUI.Adornee = p
  1492. GUI.Parent = p
  1493. GUI.Active = true
  1494. GUI.Enabled = true
  1495. GUI.Size = UDim2.new(1, 0, 1, 0)
  1496. GUI.StudsOffset = vt(0, 4, 0)
  1497. local Chat = it("TextLabel")
  1498. Chat.Parent = GUI
  1499. Chat.FontSize = "Size12"
  1500. Chat.Position = UDim2.new(0.599999964, 0, 0, 0)
  1501. Chat.Visible = true
  1502. Chat.Text = "Critical!"
  1503. coroutine.resume(coroutine.create(function(Part)
  1504. for i=0,4,0.1 do
  1505. wait()
  1506. Part.CFrame=Part.CFrame*cf(0,0.05,0)
  1507. end
  1508. Part.Parent=nil
  1509. end),p)
  1510. for i=0,7 do
  1511. Blood=it("Part")
  1512. Blood.Name="Blood"
  1513. Blood.TopSurface="Smooth"
  1514. Blood.BottomSurface="Smooth"
  1515. Blood.formFactor="Plate"
  1516. Blood.BrickColor=BrickColor:Red()
  1517. Blood.Size=vt(1,.4,1)
  1518. Blood.Velocity=vt(math.random(-4,4),math.random(5,25),math.random(-4,4))
  1519. Blood.CFrame=hit.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1520. Blood.Parent=workspace
  1521. Blood.Velocity=vt(math.random(-20,20),math.random(20,50),math.random(-20,20))
  1522. Blood.CanCollide=false
  1523. coroutine.resume(coroutine.create(function(blod)
  1524. wait(0.1)
  1525. blod.CanCollide=true
  1526. wait(5)
  1527. blod.Parent = nil
  1528. end),Blood)
  1529. end
  1530. end
  1531. hum = hit.Parent.Humanoid
  1532. attackdebounce=false
  1533. guntype="Revolver"
  1534. ADmg(hum,hit,pos)
  1535. elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  1536. if hit.Parent.className == "Hat" then
  1537. hatCF=hit.CFrame
  1538. coroutine.resume(coroutine.create(function(hat)
  1539. hat.Handle:BreakJoints()
  1540. hat.Handle.CFrame=hatCF
  1541. hat.Handle.CanCollide=true
  1542. hat.Handle.Velocity=vt(math.random(-10,10),40,math.random(-10,10))
  1543. wait(3)
  1544. hatCF=hat.Handle.CFrame
  1545. hat.Parent=workspace
  1546. for i=0,4,0.2 do
  1547. wait()
  1548. hat.Handle.CFrame=hatCF
  1549. hat.Handle.Velocity=vt(math.random(-5,5),20,math.random(-5,5))
  1550. end
  1551. end),hit.Parent)
  1552. --[[hit:BreakJoints()
  1553. hit.CFrame=CF
  1554. hit.Velocity = vt(math.random(-5,5),20,math.random(-5,5)) ]]
  1555. print("BREAKHAT")
  1556. else
  1557. hum = hit.Parent.Parent.Humanoid
  1558. attackdebounce=false
  1559. guntype="Revolver"
  1560. ADmg(hum,hit,pos)
  1561. end
  1562. critical=false
  1563. end
  1564. print(critical)
  1565. end
  1566. end
  1567. function shoottrail2(mouse)
  1568. spread = 1
  1569. spread = spread*100
  1570. range = 100
  1571. rangepower = 100
  1572. local p1 = (prt26.CFrame * cf(0,prt26.Size.y/4,0)).p
  1573. local spreadvector = (vt(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread)) / 100) * (p1-mouse.Hit.p).magnitude/100
  1574. local dir = cf((p1+mouse.Hit.p)/2,mouse.Hit.p+spreadvector)
  1575. local hit,pos = rayCast(p1,dir.lookVector,10,Character)
  1576. local rangepos = range
  1577. local function drawtrail(From,To)
  1578. local effectsmsh = it("CylinderMesh")
  1579. effectsmsh.Scale = vt(1,1,1)
  1580. effectsmsh.Name = "Mesh"
  1581. local effectsg = it("Part")
  1582. effectsg.formFactor = 3
  1583. effectsg.CanCollide = false
  1584. effectsg.Name = "Eff"
  1585. effectsg.Locked = true
  1586. effectsg.Anchored = true
  1587. effectsg.Size = vt(0.2,0.2,0.2)
  1588. effectsg.Parent = swordholder
  1589. effectsmsh.Parent = effectsg
  1590. effectsg.BrickColor = ammotrail
  1591. effectsg.Reflectance = 0.25
  1592. local LP = From
  1593. local point1 = To
  1594. local mg = (LP - point1).magnitude
  1595. effectsmsh.Scale = vt(1,mg*5,1)
  1596. effectsg.CFrame = cf((LP+point1)/2,point1) * angles(math.rad(90),0,0)
  1597. coroutine.resume(coroutine.create(function()
  1598. for i = 0 , 1 , 0.1 do
  1599. wait()
  1600. effectsg.Transparency = 1*i
  1601. effectsmsh.Scale = vt(1-1*i,mg*5,1-1*i)
  1602. end
  1603. effectsg.Parent = nil
  1604. end))
  1605. end
  1606. local newpos = p1
  1607. local inc = rangepower
  1608. repeat
  1609. wait()
  1610. rangepos = rangepos - 10
  1611. dir = dir * angles(math.rad(-0.1),0,0)
  1612. hit,pos = rayCast(newpos,dir.lookVector,inc,Character)
  1613. drawtrail(newpos,pos)
  1614. newpos = newpos + (dir.lookVector * inc)
  1615. if inc >= 20 then
  1616. inc = inc - 10
  1617. end
  1618. if hit ~= nil then
  1619. rangepos = 0
  1620. end
  1621. until rangepos <= 0
  1622. if CurrentAmmo=="Explosion" then
  1623. b=math.random(1,3)
  1624. if b==1 then
  1625. EVENMOARMAGIX2(cf(newpos),1,1,1,0,0,0,0,0,0,BrickColor.new("Bright red"))
  1626. local c = game.Workspace:GetChildren();
  1627. for i = 1, #c do
  1628. local hum = c[i]:findFirstChild("Humanoid")
  1629. if hum ~= nil and hum.Health ~= 0 then
  1630. local head = c[i]:findFirstChild("Head");
  1631. if head ~= nil then
  1632. local targ = head.Position - newpos;
  1633. local mag = targ.magnitude;
  1634. if mag <= 10 and c[i].Name ~= Player.Name then
  1635. attackdebounce=false
  1636. guntype="Machine Gun"
  1637. ADmg(hum,hit,pos)
  1638. end
  1639. end
  1640. end
  1641. end
  1642. end
  1643. end
  1644. if hit ~= nil then
  1645. hs(Head,1)
  1646. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  1647. hum = hit.Parent.Humanoid
  1648. attackdebounce=false
  1649. guntype="Machine Gun"
  1650. ADmg(hum,hit,pos)
  1651. elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  1652. hum = hit.Parent.Parent.Humanoid
  1653. attackdebounce=false
  1654. guntype="Machine Gun"
  1655. ADmg(hum,hit,pos)
  1656. end
  1657. end
  1658. end
  1659. function shoottrail3(mouse)
  1660. spread = 1.5
  1661. spread = spread*100
  1662. range = 2000
  1663. rangepower = 10
  1664. local spreadvector = (Vector3.new(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread)) / 100) * (prt24.Position-mouse.Hit.p).magnitude/100
  1665. local dir = CFrame.new((prt24.Position+mouse.Hit.p)/2,mouse.Hit.p+spreadvector)
  1666. local hit,pos = rayCast(prt24.Position,dir.lookVector,10,Character)
  1667. local rangepos = range
  1668. local function drawtrail(From,To)
  1669. local effectsmsh = Instance.new("CylinderMesh")
  1670. effectsmsh.Scale = Vector3.new(1,1,1)
  1671. effectsmsh.Name = "Mesh"
  1672. local effectsg = Instance.new("Part")
  1673. effectsg.formFactor = 3
  1674. effectsg.CanCollide = false
  1675. effectsg.Name = "Eff"
  1676. effectsg.Locked = true
  1677. effectsg.Anchored = true
  1678. effectsg.Size = Vector3.new(0.2,0.2,0.2)
  1679. effectsg.Parent = swordholder
  1680. effectsmsh.Parent = effectsg
  1681. effectsg.BrickColor = BrickColor.new("White")
  1682. effectsg.Reflectance = 0.25
  1683. local LP = From
  1684. local point1 = To
  1685. local mg = (LP - point1).magnitude
  1686. effectsmsh.Scale = Vector3.new(5,mg*5,5)
  1687. effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
  1688. coroutine.resume(coroutine.create(function()
  1689. for i = 0 , 1 , 0.1 do
  1690. wait()
  1691. effectsg.Transparency = 1*i
  1692. effectsmsh.Scale = Vector3.new(5-5*i,mg*5,5-5*i)
  1693. end
  1694. effectsg.Parent = nil
  1695. end))
  1696. end
  1697. local newpos = prt24.Position
  1698. local inc = rangepower
  1699. repeat
  1700. wait() wait()
  1701. rangepos = rangepos - 10
  1702. dir = dir * CFrame.Angles(math.rad(-2),0,0)
  1703. hit,pos = rayCast(newpos,dir.lookVector,inc,Character)
  1704. drawtrail(newpos,pos)
  1705. newpos = newpos + (dir.lookVector * inc)
  1706. if inc >= 20 then
  1707. inc = inc - 10
  1708. end
  1709. if hit ~= nil then
  1710. rangepos = 0
  1711. end
  1712. until rangepos <= 0
  1713. EVENMOARMAGIX2(cf(newpos),5,5,5,0,0,0,0,0,0,BrickColor.new("White"))
  1714. WaveEffect2(cf(newpos),15,15,15,0,0,0,1,0,0,BrickColor.new("Bright blue"))
  1715. WaveEffect2(cf(newpos),15,15,15,0,0,0,-1,0,0,BrickColor.new("Bright blue"))
  1716. local c = game.Workspace:GetChildren();
  1717. for i = 1, #c do
  1718. local hum = c[i]:findFirstChild("Humanoid")
  1719. if hum ~= nil and hum.Health ~= 0 then
  1720. local head = c[i]:findFirstChild("Head");
  1721. if head ~= nil then
  1722. local targ = head.Position - newpos;
  1723. local mag = targ.magnitude;
  1724. if mag <= 15 and c[i].Name ~= Player.Name then
  1725. print("derp")
  1726. newpos2=newpos
  1727. Damagefunc2(head,30,0.1)
  1728. end
  1729. end
  1730. end
  1731. end
  1732. if hit ~= nil then
  1733. hs(Head,1)
  1734. local effectsmsh = Instance.new("SpecialMesh")
  1735. effectsmsh.MeshId = "http://www.roblox.com/asset/?id=15887356"
  1736. effectsmsh.TextureId = "http://www.roblox.com/asset/?id=15886781"
  1737. effectsmsh.Scale = Vector3.new(1,1,2.5)
  1738. local effectsg = Instance.new("Part")
  1739. effectsg.formFactor = 3
  1740. effectsg.Transparency = 1
  1741. effectsg.CanCollide = false
  1742. effectsg.Name = "Arrow"
  1743. effectsg.Locked = true
  1744. effectsg.Size = Vector3.new(0.2,0.2,0.2)
  1745. effectsg.Parent = workspace
  1746. effectsmsh.Parent = effectsg
  1747. effectsg.CFrame = CFrame.new(newpos,pos) + CFrame.new(newpos,pos).lookVector*2.5*2
  1748. local weld = Instance.new("Weld")
  1749. weld.Part0 = effectsg
  1750. weld.Part1 = hit
  1751. local HitPos = effectsg.Position + CFrame.new(newpos,pos).lookVector*0.75
  1752. local CJ = CFrame.new(HitPos)
  1753. local C0 = effectsg.CFrame:inverse() * CJ
  1754. local C1 = hit.CFrame:inverse() * CJ
  1755. weld.C0 = C0
  1756. weld.C1 = C1
  1757. weld.Parent = effectsg
  1758. coroutine.resume(coroutine.create(function()
  1759. wait(15)
  1760. effectsg.Parent = nil
  1761. end))
  1762. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  1763. --hum = hit.Parent.Humanoid
  1764. --tTorso=hit.Parent.Torso
  1765. --ADmg(hum,hit)
  1766. local critrandomizer = math.random(crtrate)
  1767. --damagesplat(critrandomizer,hit.Parent.Torso,false,true)
  1768. --_G.Damage(tTorso,game.Players.NoobMaster936,math.huge,"Bow")
  1769. elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  1770. --hum = hit.Parent.Parent.Humanoid
  1771. --tTorso=hit.Parent.Parent.Torso
  1772. --ADmg(hum,hit)
  1773. --damagesplat(critrandomizer,hit.Parent.Parent.Torso,false,true)
  1774. --_G.Damage(tTorso,game.Players.NoobMaster936,math.huge,"Bow")
  1775. end
  1776. end
  1777. end
  1778. function EVENMOARMAGIX2(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  1779. local msh1 = it("SpecialMesh")
  1780. msh1.Scale = vt(0.5,0.5,0.5)
  1781. msh1.MeshType = "Sphere"
  1782. S=it("Part")
  1783. S.Name="Effect"
  1784. S.formFactor=0
  1785. S.Size=vt(x1,y1,z1)
  1786. S.BrickColor=color
  1787. S.Reflectance = 0
  1788. S.TopSurface=0
  1789. S.BottomSurface=0
  1790. S.Transparency=0
  1791. S.Anchored=true
  1792. S.CanCollide=false
  1793. S.CFrame=part
  1794. S.Parent=workspace
  1795. msh1.Parent = S
  1796. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 14 do Part.Mesh.Scale = Part.Mesh.Scale + vt(1,1,1) Part.Transparency=Part.Transparency+0.1 wait() end Part.Parent=nil end),S,S.CFrame)
  1797. end
  1798. function WaveEffect2(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  1799. local msh1 = it("SpecialMesh")
  1800. msh1.Scale = vt(x1,y1,z1)
  1801. msh1.MeshId = "http://www.roblox.com/asset/?id=3270017"
  1802. S=it("Part")
  1803. S.Name="Effect"
  1804. S.formFactor=0
  1805. S.Size=vt(1,1,1)
  1806. S.BrickColor=color
  1807. S.Reflectance = 0
  1808. S.TopSurface=0
  1809. S.BottomSurface=0
  1810. S.Transparency=0
  1811. S.Anchored=true
  1812. S.CanCollide=false
  1813. S.CFrame=part*cf(x2,y2,z2)*euler(x3,y3,z3)
  1814. S.Parent=workspace
  1815. msh1.Parent = S
  1816. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 27 do Part.Mesh.Scale = Part.Mesh.Scale + vt(3,3,3) Part.Transparency=i*.05 wait() end Part.Parent=nil end),S,S.CFrame)
  1817. end
  1818. Damagefunc2=function(hit,Damage,Knockback)
  1819. --[[ if attackdebounce == false then
  1820. attackdebounce = true
  1821. coroutine.resume(coroutine.create(function()
  1822. wait(0.1)
  1823. attackdebounce = false
  1824. end)) ]]
  1825. if hit.Parent==nil then
  1826. return
  1827. end
  1828. CPlayer=Bin
  1829. blocked=false
  1830. h=hit.Parent:FindFirstChild("Humanoid")
  1831. if h~=nil and hit.Parent.Name~=game.workspace.Value1.Value and hit.Parent:FindFirstChild("Torso")~=nil then
  1832. Damage=Damage
  1833. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  1834. return
  1835. end]]
  1836. c=it("ObjectValue")
  1837. c.Name="creator"
  1838. c.Value=game.Players.LocalPlayer
  1839. c.Parent=h
  1840. game:GetService("Debris"):AddItem(c,.5)
  1841. -- print(c.Value)
  1842. Damage=Damage+math.random(0,10)
  1843. -- Blood(hit.CFrame*cf(math.random(-10,10)/10,math.random(-10,10)/10,0),math.floor(Damage/2))
  1844. block=hit.Parent:findFirstChild("Block")
  1845. if block~=nil then
  1846. print("herp")
  1847. if block.Value>0 then
  1848. blocked=true
  1849. block.Value=block.Value-3
  1850. print(block.Value)
  1851. end
  1852. end
  1853. if blocked==false then
  1854. h:TakeDamage(Damage)
  1855. showDamage(hit.Parent,Damage,.5)
  1856. else
  1857. h:TakeDamage(1)
  1858. showDamage(hit.Parent,1,.5)
  1859. end
  1860. print(newpos2)
  1861. --if blocked==false then
  1862. local angle = (hit.Position-(newpos2+Vector3.new(0,-3,0))).unit
  1863. hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  1864. rl=Instance.new("BodyAngularVelocity")
  1865. rl.P=3000
  1866. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1867. rl.angularvelocity=Vector3.new(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1868. rl.Parent=hit
  1869. coroutine.resume(coroutine.create(function(vel)
  1870. wait(1)
  1871. vel:Remove()
  1872. end),rl)
  1873. --end
  1874. local bodyVelocity=Instance.new("BodyVelocity")
  1875. bodyVelocity.velocity=angle*40+Vector3.new(0,35,0)
  1876. bodyVelocity.P=5000
  1877. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1878. bodyVelocity.Parent=hit
  1879. coroutine.resume(coroutine.create(function(Vel)
  1880. wait(0.7)
  1881. Vel:Remove()
  1882. end),bodyVelocity)
  1883. game:GetService("Debris"):AddItem(vp,1)
  1884. c=it("ObjectValue")
  1885. c.Name="creator"
  1886. c.Value=Player
  1887. c.Parent=h
  1888. game:GetService("Debris"):AddItem(c,.5)
  1889. CRIT=false
  1890. hitDeb=true
  1891. AttackPos=6
  1892. end
  1893. -- end
  1894. end
  1895. showDamage=function(Char,Dealt,du)
  1896. m=it("Model")
  1897. m.Name=tostring(Dealt)
  1898. h=it("Humanoid")
  1899. h.Health=0
  1900. h.MaxHealth=0
  1901. h.Parent=m
  1902. c=it("Part")
  1903. c.Transparency=0
  1904. c.BrickColor=BrickColor:Red()
  1905. if CRIT==true then
  1906. c.BrickColor=BrickColor.new("Really red")
  1907. end
  1908. if blocked==true then
  1909. c.BrickColor=BrickColor.new("Bright blue")
  1910. end
  1911. c.Name="Head"
  1912. c.TopSurface=0
  1913. c.BottomSurface=0
  1914. c.formFactor="Plate"
  1915. c.Size=vt(1,.4,1)
  1916. ms=it("CylinderMesh")
  1917. ms.Scale=vt(.8,.8,.8)
  1918. if CRIT==true then
  1919. ms.Scale=vt(1.25,1.5,1.25)
  1920. end
  1921. ms.Parent=c
  1922. c.Reflectance=0
  1923. it("BodyGyro").Parent=c
  1924. c.Parent=m
  1925. c.CFrame=cf(Char["Head"].CFrame.p+vt(0,1.5,0))
  1926. f=it("BodyPosition")
  1927. f.P=2000
  1928. f.D=100
  1929. f.maxForce=vt(math.huge,math.huge,math.huge)
  1930. f.position=c.Position+vt(0,3,0)
  1931. f.Parent=c
  1932. game:GetService("Debris"):AddItem(m,.5+du)
  1933. c.CanCollide=false
  1934. m.Parent=workspace
  1935. c.CanCollide=false
  1936. end
  1937. function Melee()
  1938. attack=true
  1939. guntype="Machine Gun"
  1940. for i = 0.1 ,1 ,0.1 do
  1941. wait()
  1942. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90+80*i),math.rad(0),math.rad(-60+80*i))
  1943. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  1944. Neck.C0 = neckcf0 * angles(math.rad(-20*i),0,math.rad(-10*i))
  1945. end
  1946. con1=RightArm.Touched:connect(function(hit)
  1947. hum=hit.Parent:FindFirstChild("Humanoid")
  1948. if hum~=nil then
  1949. if attackdebounce == false then
  1950. attackdebounce = true
  1951. coroutine.resume(coroutine.create(function()
  1952. wait(0.1)
  1953. attackdebounce = false
  1954. end))
  1955. ADmg(hum,hit,pos)
  1956. end
  1957. end
  1958. end)
  1959. con2=prt4.Touched:connect(function(hit)
  1960. hum=hit.Parent:FindFirstChild("Humanoid")
  1961. if hum~=nil then
  1962. if attackdebounce == false then
  1963. attackdebounce = true
  1964. coroutine.resume(coroutine.create(function()
  1965. wait(0.1)
  1966. attackdebounce = false
  1967. end))
  1968. ADmg(hum,hit,pos)
  1969. end
  1970. end
  1971. end)
  1972. for i = 0 ,1 ,0.2 do
  1973. wait()
  1974. RW.C0 = cf(1.5-0.5*i, 0.5, -0.25-0.25*i) * angles(math.rad(90+80-80*i),math.rad(0),math.rad(-60+80-60*i))
  1975. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), math.rad(30*i), 0)
  1976. Neck.C0 = neckcf0 * angles(math.rad(-20+40*i),0,math.rad(-10+20*i))
  1977. end
  1978. con1:disconnect()
  1979. con2:disconnect()
  1980. for i = 0 ,1 ,0.1 do
  1981. wait()
  1982. RW.C0 = cf(1.5-0.5+0.5*i, 0.5, -0.25-0.25+0.25*i) * angles(math.rad(90),math.rad(0),math.rad(-60+80-60-20*i))
  1983. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), math.rad(30-30*i), 0)
  1984. Neck.C0 = neckcf0 * angles(math.rad(-20+40-20*i),0,math.rad(-10+20-10*i))
  1985. end
  1986. guntype="Revolver"
  1987. attack=false
  1988. end
  1989. function Ready(mouse)
  1990. if Ammo <= 0 then Reload2() return end
  1991. attack = true
  1992. local wt,t = faketors()
  1993. LWFunc()
  1994. w7.Part1 = t
  1995. w8.Part1 = t
  1996. w9.Part1 = t
  1997. wld16.Part1 = t
  1998. Character.Humanoid.WalkSpeed = 5
  1999. for i = 0 , 1 , 0.3 do
  2000. wait(0)
  2001. RW.C0 = cf(1.5, 0.5, -0.25+0.25*i) * angles(math.rad(90),math.rad(0),math.rad(-60+150*i))
  2002. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-25*i), 0, 0)
  2003. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(10*i),math.rad(0),math.rad(-15*i))
  2004. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2005. wt.C0 = angles(0, math.rad(-90*i), 0)
  2006. end
  2007. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90),math.rad(0),math.rad(90))
  2008. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(0), 0, 0)
  2009. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(10),math.rad(0),math.rad(-15))
  2010. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2011. wt.C0 = angles(0, math.rad(-90), 0)
  2012. wait() wait()
  2013. repeat
  2014. as2(Head,0.5+math.random())
  2015. coroutine.resume(coroutine.create(function()
  2016. for z = 1 ,2 do
  2017. coroutine.resume(coroutine.create(function()
  2018. local meshb1 = it("BlockMesh")
  2019. meshb1.Scale = vt(1,1,1)
  2020. local shellb1 = it("Part")
  2021. meshb1.Parent = shellb1
  2022. shellb1.Anchored = true
  2023. shellb1.formFactor = 3
  2024. shellb1.Size = vt(0.3,0.3,0.3) * (math.random(100,300)/100)
  2025. shellb1.CFrame = cf((prt6.CFrame * cf(0,-prt6.Size.y/2,0)).p) * angles(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)
  2026. shellb1.Parent = Character
  2027. shellb1.Transparency = 0
  2028. if math.random(1,2) == 1 then
  2029. shellb1.BrickColor = BrickColor.new("Bright red")
  2030. else
  2031. shellb1.BrickColor = BrickColor.new("Bright orange")
  2032. end
  2033. shellb1.CanCollide = false
  2034. local incre = math.random(0,60)/100
  2035. for i = 0 , 1 , 0.1 do
  2036. wait()
  2037. shellb1.CFrame = shellb1.CFrame + Torso.CFrame.lookVector*incre
  2038. shellb1.Transparency = 1*i
  2039. meshb1.Scale = vt(1+1*i,1+1*i,1+1*i)
  2040. end
  2041. shellb1.Parent=nil
  2042. end))
  2043. end
  2044. coroutine.resume(coroutine.create(function()
  2045. shoottrail(mouse)
  2046. end))
  2047. end))
  2048. Ammo = Ammo - 1
  2049. for i = 0.5 , 1 , 0.5*attackspeed do
  2050. wait(0)
  2051. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90),math.rad(0),math.rad(90))
  2052. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(-20*i), 0, 0)
  2053. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(10),math.rad(0),math.rad(-15))
  2054. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2055. --wt.C0 = angles(0, math.rad(-90), 0)
  2056. end
  2057. for i = 0.5 , 1 , 0.5*attackspeed do
  2058. wait(0)
  2059. w2.C0 = euler(math.rad(90), 0,1.04667*i) * cf(0, -0.75, 0.25)
  2060. w4.C1 = euler(0, -1.04667*i, 0) * cf(0, 0, 0.14)
  2061. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90),math.rad(0),math.rad(90))
  2062. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(-20+20*i), 0, 0)
  2063. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(10),math.rad(0),math.rad(-15))
  2064. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2065. --wt.C0 = angles(0, math.rad(-90), 0)
  2066. end
  2067. w2.C0 = euler(math.rad(90), 0,0) * cf(0, -0.75, 0.25)
  2068. w4.C1 = euler(0, 0, 0) * cf(0, 0, 0.14)
  2069. wait(0.3)
  2070. until not keyhold or Ammo <= 0
  2071. if Ammo==0 then
  2072. Say("NoAmmo")
  2073. end
  2074. for i = 0.2 , 1 , 0.2 do
  2075. wait(0)
  2076. RW.C0 = cf(1.5, 0.5, -0.25*i) * angles(math.rad(90),math.rad(0),math.rad(90-150*i))
  2077. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25*i), 0, 0)
  2078. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(10-10*i),math.rad(0),math.rad(-15+15*i))
  2079. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2080. wt.C0 = angles(0, math.rad(-90+90*i), 0)
  2081. end
  2082. LWRem()
  2083. w7.Part1 = Torso
  2084. w8.Part1 = Torso
  2085. w9.Part1 = Torso
  2086. wld16.Part1 = Torso
  2087. RW.Part0 = Torso
  2088. LW.Part0 = Torso
  2089. Torso.Transparency = 0
  2090. RHL.Part0 = Torso
  2091. LHL.Part0 = Torso
  2092. t.Parent = nil
  2093. Character.Humanoid.WalkSpeed = 14
  2094. wait(0.25)
  2095. attack = false
  2096. end
  2097. function GunzerkReady(mouse)
  2098. attack = true
  2099. Character.Humanoid.WalkSpeed = 5
  2100. for i = 0.2 , 1 , 0.2 do
  2101. wait(0)
  2102. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(50+30*i),math.rad(20),math.rad(-5+3*i))
  2103. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(0), 0, 0)
  2104. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(50+30*i),math.rad(-20),math.rad(5-3*i))
  2105. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2106. end
  2107. for i = 0.2 , 1 , 0.2 do
  2108. wait(0)
  2109. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(50+30+10*i),math.rad(20),math.rad(-5+3+2*i))
  2110. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(0), 0, 0)
  2111. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(50+30+10*i),math.rad(-20),math.rad(5-3-2*i))
  2112. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2113. end
  2114. wait() wait()
  2115. repeat
  2116. wait()
  2117. if math.random(1,20)==1 then
  2118. Say("Shooting")
  2119. end
  2120. coroutine.resume(coroutine.create(function()
  2121. if firingdebounce1==false then
  2122. firingdebounce1=true
  2123. wait()
  2124. as2(Head,1)
  2125. coroutine.resume(coroutine.create(function()
  2126. for z = 1 ,2 do
  2127. coroutine.resume(coroutine.create(function()
  2128. local meshb1 = it("BlockMesh")
  2129. meshb1.Scale = vt(1,1,1)
  2130. local shellb1 = it("Part")
  2131. meshb1.Parent = shellb1
  2132. shellb1.Anchored = true
  2133. shellb1.formFactor = 3
  2134. shellb1.Size = vt(0.3,0.3,0.3) * (math.random(100,300)/100)
  2135. shellb1.CFrame = cf((prt6.CFrame * cf(0,-prt6.Size.y/2,0)).p) * angles(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)
  2136. shellb1.Parent = Character
  2137. shellb1.Transparency = 0
  2138. if math.random(1,2) == 1 then
  2139. shellb1.BrickColor = BrickColor.new("Bright red")
  2140. else
  2141. shellb1.BrickColor = BrickColor.new("Bright orange")
  2142. end
  2143. shellb1.CanCollide = false
  2144. local incre = math.random(0,60)/100
  2145. for i = 0 , 1 , 0.1 do
  2146. wait()
  2147. shellb1.CFrame = shellb1.CFrame + Torso.CFrame.lookVector*incre
  2148. shellb1.Transparency = 1*i
  2149. meshb1.Scale = vt(1+1*i,1+1*i,1+1*i)
  2150. end
  2151. shellb1.Parent=nil
  2152. end))
  2153. end
  2154. coroutine.resume(coroutine.create(function()
  2155. shoottrail(mouse)
  2156. end))
  2157. end))
  2158. for i = 0.5 , 1 , 0.5*attackspeed do
  2159. wait(0)
  2160. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90+10*i),math.rad(20),math.rad(0))
  2161. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(0), 0, 0)
  2162. end
  2163. for i = 0.5 , 1 , 0.5*attackspeed do
  2164. wait(0)
  2165. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90+10-10*i),math.rad(20),math.rad(0))
  2166. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(0), 0, 0)
  2167. end
  2168. wait(0.3)
  2169. firingdebounce1=false
  2170. end
  2171. end))
  2172. coroutine.resume(coroutine.create(function()
  2173. if firingdebounce2==false then
  2174. firingdebounce2=true
  2175. poisoncounter=math.random(1,5)
  2176. wait()
  2177. as(Head,1)
  2178. coroutine.resume(coroutine.create(function()
  2179. for z = 1 ,2 do
  2180. coroutine.resume(coroutine.create(function()
  2181. local meshb1 = it("BlockMesh")
  2182. meshb1.Scale = vt(1,1,1)
  2183. local shellb1 = it("Part")
  2184. meshb1.Parent = shellb1
  2185. shellb1.Anchored = true
  2186. shellb1.formFactor = 3
  2187. shellb1.Size = vt(0.3,0.3,0.3) * (math.random(100,300)/100)
  2188. shellb1.CFrame = cf((newprt5.CFrame * cf(0,-newprt5.Size.y/2,0)).p) * angles(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)
  2189. shellb1.Parent = Character
  2190. shellb1.Transparency = 0
  2191. if math.random(1,2) == 1 then
  2192. shellb1.BrickColor = BrickColor.new("Bright red")
  2193. else
  2194. shellb1.BrickColor = BrickColor.new("Bright orange")
  2195. end
  2196. shellb1.CanCollide = false
  2197. local incre = math.random(0,60)/100
  2198. for i = 0 , 1 , 0.1 do
  2199. wait()
  2200. shellb1.CFrame = shellb1.CFrame + Torso.CFrame.lookVector*incre
  2201. shellb1.Transparency = 1*i
  2202. meshb1.Scale = vt(1+1*i,1+1*i,1+1*i)
  2203. end
  2204. shellb1.Parent=nil
  2205. end))
  2206. end
  2207. coroutine.resume(coroutine.create(function()
  2208. shoottrail2(mouse)
  2209. end))
  2210. end))
  2211. for i = 0.5 , 1 , 0.5*attackspeed do
  2212. wait(0)
  2213. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(90+10*i),math.rad(-20),math.rad(0))
  2214. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2215. end
  2216. for i = 0.5 , 1 , 0.5*attackspeed do
  2217. wait(0)
  2218. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(90+10-10*i),math.rad(-20),math.rad(0))
  2219. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2220. end
  2221. firingdebounce2=false
  2222. end
  2223. end))
  2224. until not keyhold or Ammo <= 0 or GunzerkDuration==0
  2225. for i = 0.2 , 1 , 0.2 do
  2226. wait(0)
  2227. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90-30*i),math.rad(20),math.rad(-3*i))
  2228. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(0), 0, 0)
  2229. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(90-30*i),math.rad(-20),math.rad(3*i))
  2230. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2231. end
  2232. Character.Humanoid.WalkSpeed = 14
  2233. for i = 0.2 , 1 , 0.2 do
  2234. wait(0)
  2235. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90-30-10*i),math.rad(20),math.rad(-3-2*i))
  2236. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(0), 0, 0)
  2237. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(90-30-10*i),math.rad(-20),math.rad(3+2*i))
  2238. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2239. end
  2240. wait(0.25)
  2241. attack = false
  2242. end
  2243. function Reload2()
  2244. attack=true
  2245. LWFunc()
  2246. for i = 0.2 , 1 , 0.3 do
  2247. wait(0)
  2248. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90),math.rad(0),math.rad(-60+20*i))
  2249. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-30*i), 0, 0)
  2250. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(0),math.rad(0),math.rad(0))
  2251. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2252. w2.C0 = euler(math.rad(90+90*i), 0,0) * cf(0, -0.75, 0.25)
  2253. w10.C1 = euler(0, 0, 0) * cf(0, -0.8*i, 0)
  2254. Neck.C0 = neckcf0 * angles(math.rad(-5*i),0,math.rad(-10*i))
  2255. end
  2256. for i = 0.2 , 1 , 0.3 do
  2257. wait(0)
  2258. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90),math.rad(0),math.rad(-60+20+10*i))
  2259. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-30-10*i), 0, 0)
  2260. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(0),math.rad(0),math.rad(0))
  2261. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2262. w2.C0 = euler(math.rad(180), 0,0) * cf(0, -0.75, 0.25)
  2263. Neck.C0 = neckcf0 * angles(math.rad(-5-5*i),0,math.rad(-10))
  2264. end
  2265. for i = 0.2 , 1 , 0.2 do
  2266. wait(0)
  2267. RW.C0 = cf(1.5-0.5*i, 0.5, -0.25-0.25*i) * angles(math.rad(90),math.rad(0),math.rad(-60+20+10-10*i))
  2268. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-30-10+40*i), 0, 0)
  2269. LW.C0 = cf(-1.5+0.5*i, 0.5, -0.5*i) * angles(math.rad(90*i),math.rad(0),math.rad(20*i))
  2270. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2271. w2.C0 = euler(math.rad(180), 0,0) * cf(0, -0.75, 0.25)
  2272. Neck.C0 = neckcf0 * angles(math.rad(-5-5+20*i),0,math.rad(-10+10*i))
  2273. end
  2274. derp1=prt2:Clone()
  2275. derp1.Parent=swordholder
  2276. derp1.Transparency=0
  2277. wldderp=it("Weld")
  2278. wldderp.Parent=derp1
  2279. wldderp.Part0=derp1
  2280. wldderp.Part1=LeftArm
  2281. wldderp.C0=angles(math.rad(100),math.rad(180-20),0)*cf(-0.2,1.2,0)
  2282. prt2.Transparency=1
  2283. for i = 0 , 1 , 0.2 do
  2284. wait(0)
  2285. RW.C0 = cf(1.5-0.5, 0.5, -0.5) * angles(math.rad(90),math.rad(0),math.rad(-60+20))
  2286. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-30-10+40+5*i), 0, 0)
  2287. LW.C0 = cf(-1.5+0.5-0.5*i, 0.5, -0.5+0.5*i) * angles(math.rad(90+10*i),math.rad(0),math.rad(20-40*i))
  2288. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2289. w2.C0 = euler(math.rad(180), 0,0) * cf(0, -0.75, 0.25)
  2290. wldderp.C0=angles(math.rad(100-10*i),math.rad(180-20+20*i),0)*cf(-0.2+0.2*i,1.2-0.2*i,0)
  2291. Neck.C0 = neckcf0 * angles(math.rad(-5-5+20-10*i),0,math.rad(-10+10+20*i))
  2292. end
  2293. for i = 0 , 1 , 0.2 do
  2294. wait(0)
  2295. RW.C0 = cf(1.5-0.5, 0.5, -0.5) * angles(math.rad(90),math.rad(0),math.rad(-60+20))
  2296. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-30-10+40+5+5*i), 0, 0)
  2297. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(100-120*i),math.rad(0),math.rad(-20+30*i))
  2298. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2299. w2.C0 = euler(math.rad(180), 0,0) * cf(0, -0.75, 0.25)
  2300. wldderp.C0=angles(math.rad(90),math.rad(180),0)*cf(0,1,0)
  2301. Neck.C0 = neckcf0 * angles(math.rad(-5-5+20-10+20*i),0,math.rad(-10+10+20))
  2302. end
  2303. for i = 0 , 1 , 0.2 do
  2304. wait(0)
  2305. RW.C0 = cf(1.5-0.5, 0.5, -0.5) * angles(math.rad(90),math.rad(0),math.rad(-60+20))
  2306. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-30-10+40+5+5-5*i), 0, 0)
  2307. LW.C0 = cf(-1.5+0.5*i, 0.5, -0.5*i) * angles(math.rad(100-120+150*i),math.rad(0),math.rad(-20+30+10*i))
  2308. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2309. w2.C0 = euler(math.rad(180), 0,0) * cf(0, -0.75, 0.25)
  2310. wldderp.C0=angles(math.rad(90+10*i),math.rad(180-20*i),0)*cf(-0.2*i,1+0.2*i,0)
  2311. Neck.C0 = neckcf0 * angles(math.rad(-5-5+20-10+20-30*i),0,math.rad(-10+10+20-20*i))
  2312. end
  2313. for i = 0 , 1 , 0.2 do
  2314. wait(0)
  2315. RW.C0 = cf(1.5-0.5, 0.5, -0.5) * angles(math.rad(90),math.rad(0),math.rad(-60+20))
  2316. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-30-10+40+5+5-5-5*i), 0, 0)
  2317. LW.C0 = cf(-1.5+0.5, 0.5, -0.5) * angles(math.rad(100-120+150-40*i),math.rad(0),math.rad(-20+30+10))
  2318. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2319. w2.C0 = euler(math.rad(180), 0,0) * cf(0, -0.75, 0.25)
  2320. Neck.C0 = neckcf0 * angles(math.rad(-5-5+20-10+20-30+20*i),0,math.rad(0))
  2321. end
  2322. Ammo = MaxAmmo
  2323. derp1.Parent=nil
  2324. prt2.Transparency=0
  2325. for i = 0 , 1 , 0.2 do
  2326. wait(0)
  2327. RW.C0 = cf(1.5-0.5, 0.5, -0.5) * angles(math.rad(90),math.rad(0),math.rad(-60+20))
  2328. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-50*i), 0, 0)
  2329. LW.C0 = cf(-1.5+0.5-0.5*i, 0.5, -0.5+0.5*i) * angles(math.rad(90-90*i),math.rad(0),math.rad(20-20*i))
  2330. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2331. w2.C0 = euler(math.rad(180-90*i), 0,0) * cf(0, -0.75, 0.25)
  2332. Neck.C0 = neckcf0 * angles(math.rad(-5-5+20-10+20-30+20-30*i),0,math.rad(0))
  2333. end
  2334. for i = 0 , 1 , 0.2 do
  2335. wait(0)
  2336. w10.C1 = euler(0, 0, 0) * cf(0, -0.8+0.8*i, 0)
  2337. RW.C0 = cf(1.5-0.5+0.5*i, 0.5, -0.5) * angles(math.rad(90),math.rad(0),math.rad(-60+20-20*i))
  2338. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-50+50*i), 0, 0)
  2339. Neck.C0 = neckcf0 * angles(math.rad(-5-5+20-10+20-30+20-30+20*i),0,math.rad(0))
  2340. end
  2341. Neck.C0 = neckcf0 * angles(math.rad(0),0,math.rad(0))
  2342. w2.C0 = euler(math.rad(90), 0,0) * cf(0, -0.75, 0.25)
  2343. LWRem()
  2344. attack=false
  2345. end
  2346. function BlasterMode()
  2347. attack=true
  2348. blastcannonmode=true
  2349. prt5.CanCollide=false
  2350. prt6.CanCollide=false
  2351. LWFunc()
  2352. for i=0,1,0.1 do
  2353. wait()
  2354. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90-90*i),math.rad(0),math.rad(-60+60*i))
  2355. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  2356. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(200*i),math.rad(0),math.rad(20*i))
  2357. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2358. Neck.C0 = neckcf0 * angles(math.rad(-20*i),0,math.rad(30*i))
  2359. end
  2360. unequipweld()
  2361. wld16.Part1 = LeftArm
  2362. wld16.C0 = euler(-1.3,0,0) * cf(-0.5,0.2,2)
  2363. wld16.C1 = euler(0,0,-0.3) * cf(0,0,0)
  2364. Character.Humanoid.WalkSpeed=12
  2365. for i=0,1,0.1 do
  2366. wait()
  2367. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90-90+25*i),math.rad(0),math.rad(-60+60+10*i))
  2368. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  2369. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(200-130*i),math.rad(0),math.rad(20-30*i))
  2370. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2371. Neck.C0 = neckcf0 * angles(math.rad(-20+20*i),0,math.rad(30-10*i))
  2372. wld16.C0 = euler(-1.3+2.87*i,0,0) * cf(-0.5+0.5*i,0.2+0.8*i,2-2*i)
  2373. wld16.C1 = euler(0,0,-0.3+0.3*i) * cf(0,0,0)
  2374. end
  2375. for i=0,1,0.1 do
  2376. wait()
  2377. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90-90+25),math.rad(0),math.rad(-60+60+10))
  2378. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  2379. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(200-130-10*i),math.rad(0),math.rad(20-30))
  2380. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2381. Neck.C0 = neckcf0 * angles(0,0,math.rad(30-10-20*i))
  2382. end
  2383. attack=false
  2384. end
  2385. function EndBlasterMode()
  2386. attack=true
  2387. blastcannonmode=false
  2388. for i=0,1,0.1 do
  2389. wait()
  2390. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90-90+25-25*i),math.rad(0),math.rad(-60+60+10-10*i))
  2391. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  2392. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(200-140+140*i),math.rad(0),math.rad(-10+40*i))
  2393. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2394. Neck.C0 = neckcf0 * angles(math.rad(-20*i),0,math.rad(30*i))
  2395. wld16.C0 = euler(1.57-2.87*i,0,0) * cf(-0.5*i,1-0.8*i,2*i)
  2396. wld16.C1 = euler(0,0,-0.3*i) * cf(0,0,0)
  2397. end
  2398. equipweld()
  2399. wld16.Part1 = Torso
  2400. wld16.C0 = euler(math.rad(90),0,0) * cf(0.6,-0.5,-2.2)
  2401. wld16.C1 = euler(0,0,0) * cf(0,0,0)
  2402. Character.Humanoid.WalkSpeed=14
  2403. for i=0,1,0.1 do
  2404. wait()
  2405. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90-90+90*i),math.rad(0),math.rad(-60*i))
  2406. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  2407. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(200-200*i),math.rad(0),math.rad(30-30*i))
  2408. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2409. Neck.C0 = neckcf0 * angles(math.rad(-20+20*i),0,math.rad(30-30*i))
  2410. end
  2411. LWRem()
  2412. prt5.CanCollide=true
  2413. prt6.CanCollide=true
  2414. attack=false
  2415. end
  2416. function CannonShoot(mouse)
  2417. attack = true
  2418. readyblast=true
  2419. Character.Humanoid.WalkSpeed = 0.01
  2420. offset=(Torso.Position.y-mouse.Hit.p.y)/60
  2421. mag=(Torso.Position-mouse.Hit.p).magnitude/80
  2422. offset=offset/mag
  2423. for i = 0 , 1 , 0.1 do
  2424. wait(0)
  2425. RW.C0 = cf(1.5-1.4*i, 0.5, -0.25-0.45*i) * angles(math.rad(25+115*i),math.rad(0),math.rad(10-80*i))
  2426. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-25*i), math.rad(20*i), 0)
  2427. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(60+30*i),math.rad(0),math.rad(-10+10*i))
  2428. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2429. end
  2430. coroutine.resume(coroutine.create(function()
  2431. while readyblast==true do
  2432. wait()
  2433. offset=(Torso.Position.y-mouse.Hit.p.y)/60
  2434. mag=(Torso.Position-mouse.Hit.p).magnitude/80
  2435. offset=offset/mag
  2436. Torso.Neck.C1=necko2*euler(-offset,0,0)
  2437. RW.C0 = cf(0.1, 0.5, -0.7) * angles(math.rad(140),math.rad(0),math.rad(-70))
  2438. RW.C1 = cf(0, 0.5, 0) * angles(offset, math.rad(20), 0)
  2439. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(90),math.rad(0),math.rad(0))
  2440. LW.C1 = cf(0, 0.5, 0) * angles(offset, 0, 0)
  2441. end
  2442. end))
  2443. clone=prt31:Clone()
  2444. clone.Parent=prt31
  2445. prt31.Transparency=1
  2446. clonewld=Instance.new("Weld")
  2447. clonewld.Parent=clone
  2448. clonewld.Part0=clone
  2449. clonewld.Part1=prt31
  2450. clone2=prt30:Clone()
  2451. clone2.Parent=prt30
  2452. prt30.Transparency=1
  2453. clonewld2=Instance.new("Weld")
  2454. clonewld2.Parent=clone2
  2455. clonewld2.Part0=clone2
  2456. clonewld2.Part1=prt30
  2457. for i=0,1,0.1 do
  2458. wait(0.1)
  2459. clonewld2.C0 = euler(0,0,0) * cf(0,0.5*i,0)
  2460. end
  2461. for i=0,1,0.1 do
  2462. wait(0)
  2463. clonewld.C0 = euler(0,0,0) * cf(0,-0.7*i,0)
  2464. end
  2465. coroutine.resume(coroutine.create(function()
  2466. for z = 1 ,4 do
  2467. coroutine.resume(coroutine.create(function()
  2468. local meshb1 = it("BlockMesh")
  2469. meshb1.Scale = vt(1,1,1)
  2470. local shellb1 = it("Part")
  2471. meshb1.Parent = shellb1
  2472. shellb1.Anchored = true
  2473. shellb1.formFactor = 3
  2474. shellb1.Size = vt(0.3,0.3,0.3) * (math.random(100,300)/100)
  2475. shellb1.CFrame = cf((prt24.CFrame * cf(0,prt24.Size.y/2,0)).p) * angles(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)
  2476. shellb1.Parent = Character
  2477. shellb1.Transparency = 0
  2478. if math.random(1,2) == 1 then
  2479. shellb1.BrickColor = BrickColor.new("Bright red")
  2480. else
  2481. shellb1.BrickColor = BrickColor.new("Bright orange")
  2482. end
  2483. shellb1.CanCollide = false
  2484. local incre = math.random(0,60)/100
  2485. for i = 0 , 1 , 0.1 do
  2486. wait()
  2487. shellb1.CFrame = shellb1.CFrame + Torso.CFrame.lookVector*incre
  2488. shellb1.Transparency = 1*i
  2489. meshb1.Scale = vt(1+1*i,1+1*i,1+1*i)
  2490. end
  2491. shellb1.Parent=nil
  2492. end))
  2493. end
  2494. end))
  2495. readyblast=false
  2496. fs(Head,0.2)
  2497. as(Head,0.4)
  2498. coroutine.resume(coroutine.create(function()
  2499. shoottrail3(mouse)
  2500. end))
  2501. for i=0,1,0.2 do
  2502. wait()
  2503. clonewld2.C0 = euler(0,0,0) * cf(0,0.5-0.25*i,0)
  2504. clonewld.C0 = euler(0,0,0) * cf(0,-0.7+0.35*i,0)
  2505. Torso.Neck.C1=necko2*euler(-offset,0,0)
  2506. RW.C0 = cf(0.1, 0.5, -0.7) * angles(math.rad(140+20*i),math.rad(0),math.rad(-70))
  2507. RW.C1 = cf(0, 0.5, 0) * angles(offset, math.rad(20), 0)
  2508. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(90+20*i),math.rad(0),math.rad(0))
  2509. LW.C1 = cf(0, 0.5, 0) * angles(offset, 0, 0)
  2510. end
  2511. for i=0,1,0.2 do
  2512. wait()
  2513. clonewld2.C0 = euler(0,0,0) * cf(0,0.5-0.25-0.25*i,0)
  2514. clonewld.C0 = euler(0,0,0) * cf(0,-0.7+0.35+0.35*i,0)
  2515. Torso.Neck.C1=necko2*euler(-offset,0,0)
  2516. RW.C0 = cf(0.1, 0.5, -0.7) * angles(math.rad(140+20+10*i),math.rad(0),math.rad(-70))
  2517. RW.C1 = cf(0, 0.5, 0) * angles(offset, math.rad(20), 0)
  2518. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(90+20+10*i),math.rad(0),math.rad(0))
  2519. LW.C1 = cf(0, 0.5, 0) * angles(offset, 0, 0)
  2520. end
  2521. wait(0.1)
  2522. for i=0,1,0.05 do
  2523. wait()
  2524. Torso.Neck.C1=necko2*euler(-offset+offset*i,0,0)
  2525. RW.C0 = cf(0.1+1.4*i, 0.5, -0.7+0.45*i) * angles(math.rad(170-170*i),math.rad(0),math.rad(-70+80*i))
  2526. RW.C1 = cf(0, 0.5, 0) * angles(offset+(-offset+math.rad(25))*i, math.rad(20-20*i), 0)
  2527. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(120-60*i),math.rad(0),math.rad(-10*i))
  2528. LW.C1 = cf(0, 0.5, 0) * angles(offset-offset*i, 0, 0)
  2529. end
  2530. --[[local wt,t = faketors()
  2531. w7.Part1 = t
  2532. w8.Part1 = t
  2533. w9.Part1 = t
  2534. w1.Part1 = t
  2535. for i = 0 , 1 , 0.05 do
  2536. wait(0)
  2537. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(60+30*i),math.rad(0),math.rad(-10-30*i))
  2538. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2539. wt.C0 = angles(0, math.rad(40*i), 0)
  2540. end
  2541. --wait(1)
  2542. clone=prt20:Clone()
  2543. clone.Parent=prt20
  2544. prt20.Transparency=1
  2545. clonewld=Instance.new("Weld")
  2546. clonewld.Parent=clone
  2547. clonewld.Part0=clone
  2548. clonewld.Part1=prt20
  2549. for i=0,1,0.1 do
  2550. wait(0.1)
  2551. clonewld.C0 = euler(0,math.rad(90*i),0) * cf(0,-0.2*i,0.2*i)
  2552. end
  2553. wait() wait()
  2554. repeat
  2555. as(Head,0.5+math.random())
  2556. coroutine.resume(coroutine.create(function()
  2557. for z = 1 ,2 do
  2558. coroutine.resume(coroutine.create(function()
  2559. local meshb1 = it("BlockMesh")
  2560. meshb1.Scale = vt(1,1,1)
  2561. local shellb1 = it("Part")
  2562. meshb1.Parent = shellb1
  2563. shellb1.Anchored = true
  2564. shellb1.formFactor = 3
  2565. shellb1.Size = vt(0.3,0.3,0.3) * (math.random(100,300)/100)
  2566. shellb1.CFrame = cf((prt26.CFrame * cf(0,prt26.Size.y/2,0)).p) * angles(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)
  2567. shellb1.Parent = Character
  2568. shellb1.Transparency = 0
  2569. if math.random(1,2) == 1 then
  2570. shellb1.BrickColor = BrickColor.new("Bright red")
  2571. else
  2572. shellb1.BrickColor = BrickColor.new("Bright orange")
  2573. end
  2574. shellb1.CanCollide = false
  2575. local incre = math.random(0,60)/100
  2576. for i = 0 , 1 , 0.1 do
  2577. wait()
  2578. shellb1.CFrame = shellb1.CFrame + Torso.CFrame.lookVector*incre
  2579. shellb1.Transparency = 1*i
  2580. meshb1.Scale = vt(1+1*i,1+1*i,1+1*i)
  2581. end
  2582. shellb1.Parent=nil
  2583. end))
  2584. end
  2585. coroutine.resume(coroutine.create(function()
  2586. shoottrail2(mouse)
  2587. end))
  2588. end))
  2589. wait(0.2)
  2590. until not keyhold
  2591. for i = 0 , 1 , 0.05 do
  2592. wait(0)
  2593. clonewld.C0 = euler(0,math.rad(90-90*i),0) * cf(0,-0.2+0.2*i,0.2-0.2*i)
  2594. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(60+30-30*i),math.rad(0),math.rad(-10-30+30*i))
  2595. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2596. wt.C0 = angles(0, math.rad(40-40*i), 0)
  2597. end
  2598. clone.Parent=nil
  2599. prt20.Transparency=0
  2600. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(0),math.rad(0),math.rad(10))
  2601. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  2602. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(60),math.rad(0),math.rad(-10))
  2603. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2604. wt.C0 = angles(0, math.rad(0), 0)
  2605. w7.Part1 = Torso
  2606. w8.Part1 = Torso
  2607. w9.Part1 = Torso
  2608. w1.Part1 = Torso
  2609. RW.Part0 = Torso
  2610. LW.Part0 = Torso
  2611. Torso.Transparency = 0
  2612. RHL.Part0 = Torso
  2613. LHL.Part0 = Torso
  2614. t.Parent = nil
  2615. wait(0.25) ]]
  2616. Torso.Neck.C1=necko2
  2617. clone.Parent=nil
  2618. prt31.Transparency=0
  2619. clone2.Parent=nil
  2620. prt30.Transparency=0
  2621. Character.Humanoid.WalkSpeed = 12
  2622. attack = false
  2623. wait(0.2)
  2624. Torso.Neck.C1=necko2
  2625. end
  2626. function BlasterShoot(mouse)
  2627. attack = true
  2628. local wt,t = faketors()
  2629. w7.Part1 = t
  2630. w8.Part1 = t
  2631. w9.Part1 = t
  2632. w1.Part1 = t
  2633. Character.Humanoid.WalkSpeed = 0.01
  2634. for i = 0 , 1 , 0.05 do
  2635. wait(0)
  2636. RW.C0 = cf(1.5-1.5*i, 0.5, -0.25-0.45*i) * angles(math.rad(25+115*i),math.rad(0),math.rad(10-80*i))
  2637. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-25*i), math.rad(20*i), 0)
  2638. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(60+30*i),math.rad(0),math.rad(-10-30*i))
  2639. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2640. wt.C0 = angles(0, math.rad(40*i), 0)
  2641. end
  2642. --wait(1)
  2643. clone=prt20:Clone()
  2644. clone.Parent=prt20
  2645. prt20.Transparency=1
  2646. clonewld=Instance.new("Weld")
  2647. clonewld.Parent=clone
  2648. clonewld.Part0=clone
  2649. clonewld.Part1=prt20
  2650. for i=0,1,0.1 do
  2651. wait(0.1)
  2652. clonewld.C0 = euler(0,math.rad(90*i*i),0) * cf(0,-0.2*i,0.2*i)
  2653. end
  2654. --[[RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90),math.rad(0),math.rad(90))
  2655. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(0), 0, 0)
  2656. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(10),math.rad(0),math.rad(-15))
  2657. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2658. wt.C0 = angles(0, math.rad(-90), 0) ]]
  2659. minigunspin=false
  2660. doingminigun=true
  2661. repeat
  2662. coroutine.resume(coroutine.create(function()
  2663. if minigunspin==false and doingminigun==true then
  2664. minigunspin=true
  2665. for i=0,1,0.02 do
  2666. if doingminigun==true then
  2667. wait()
  2668. clonewld.C0 = euler(0,math.rad(90+360*i),0) * cf(0,-0.2,0.2)
  2669. end
  2670. end
  2671. minigunspin=false
  2672. end
  2673. end))
  2674. as(Head,0.5+math.random())
  2675. coroutine.resume(coroutine.create(function()
  2676. for z = 1 ,2 do
  2677. coroutine.resume(coroutine.create(function()
  2678. local meshb1 = it("BlockMesh")
  2679. meshb1.Scale = vt(1,1,1)
  2680. local shellb1 = it("Part")
  2681. meshb1.Parent = shellb1
  2682. shellb1.Anchored = true
  2683. shellb1.formFactor = 3
  2684. shellb1.Size = vt(0.3,0.3,0.3) * (math.random(100,300)/100)
  2685. shellb1.CFrame = cf((prt26.CFrame * cf(0,prt26.Size.y/2,0)).p) * angles(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)
  2686. shellb1.Parent = Character
  2687. shellb1.Transparency = 0
  2688. if math.random(1,2) == 1 then
  2689. shellb1.BrickColor = BrickColor.new("Bright red")
  2690. else
  2691. shellb1.BrickColor = BrickColor.new("Bright orange")
  2692. end
  2693. shellb1.CanCollide = false
  2694. local incre = math.random(0,60)/100
  2695. for i = 0 , 1 , 0.1 do
  2696. wait()
  2697. shellb1.CFrame = shellb1.CFrame + Torso.CFrame.lookVector*incre
  2698. shellb1.Transparency = 1*i
  2699. meshb1.Scale = vt(1+1*i,1+1*i,1+1*i)
  2700. end
  2701. shellb1.Parent=nil
  2702. end))
  2703. end
  2704. coroutine.resume(coroutine.create(function()
  2705. shoottrail2(mouse)
  2706. end))
  2707. end))
  2708. --[[for i = 0.5 , 1 , 0.5*attackspeed do
  2709. wait(0)
  2710. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90),math.rad(0),math.rad(90))
  2711. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(-20*i), 0, 0)
  2712. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(10),math.rad(0),math.rad(-15))
  2713. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2714. --wt.C0 = angles(0, math.rad(-90), 0)
  2715. end
  2716. for i = 0.5 , 1 , 0.5*attackspeed do
  2717. wait(0)
  2718. w2.C0 = euler(math.rad(90), 0,1.04667*i) * cf(0, -0.75, 0.25)
  2719. w4.C1 = euler(0, -1.04667*i, 0) * cf(0, 0, 0.14)
  2720. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90),math.rad(0),math.rad(90))
  2721. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(-20+20*i), 0, 0)
  2722. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(10),math.rad(0),math.rad(-15))
  2723. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2724. --wt.C0 = angles(0, math.rad(-90), 0)
  2725. end
  2726. w2.C0 = euler(math.rad(90), 0,0) * cf(0, -0.75, 0.25)
  2727. w4.C1 = euler(0, 0, 0) * cf(0, 0, 0.14)]]
  2728. wait(0.2)
  2729. until not keyhold
  2730. doingminigun=false
  2731. --[[for i = 0.2 , 1 , 0.2 do
  2732. wait(0)
  2733. RW.C0 = cf(1.5, 0.5, -0.25*i) * angles(math.rad(90),math.rad(0),math.rad(90-150*i))
  2734. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25*i), 0, 0)
  2735. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(10-10*i),math.rad(0),math.rad(-15+15*i))
  2736. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2737. wt.C0 = angles(0, math.rad(-90+90*i), 0)
  2738. end
  2739. LWRem() ]]
  2740. for i = 0 , 1 , 0.05 do
  2741. wait(0)
  2742. clonewld.C0 = euler(0,math.rad(90+90*i),0) * cf(0,-0.2+0.2*i,0.2-0.2*i)
  2743. RW.C0 = cf(1.5-1.5+1.5*i, 0.5, -0.25-0.45+0.45*i) * angles(math.rad(25+115-115*i),math.rad(0),math.rad(10-80+80*i))
  2744. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25*i), math.rad(20-20*i), 0)
  2745. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(60+30-30*i),math.rad(0),math.rad(-10-30+30*i))
  2746. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2747. wt.C0 = angles(0, math.rad(40-40*i), 0)
  2748. end
  2749. clone.Parent=nil
  2750. prt20.Transparency=0
  2751. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(25),math.rad(0),math.rad(10))
  2752. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  2753. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(60),math.rad(0),math.rad(-10))
  2754. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2755. wt.C0 = angles(0, math.rad(0), 0)
  2756. w7.Part1 = Torso
  2757. w8.Part1 = Torso
  2758. w9.Part1 = Torso
  2759. w1.Part1 = Torso
  2760. RW.Part0 = Torso
  2761. LW.Part0 = Torso
  2762. Torso.Transparency = 0
  2763. RHL.Part0 = Torso
  2764. LHL.Part0 = Torso
  2765. t.Parent = nil
  2766. Character.Humanoid.WalkSpeed = 12
  2767. wait(0.25)
  2768. attack = false
  2769. end
  2770. function Gunzerker()
  2771. LWFunc()
  2772. attack=true
  2773. Gunzerkering=true
  2774. for i = 0.1 , 1 , 0.1 do
  2775. wait()
  2776. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90),math.rad(0),math.rad(-60+60*i))
  2777. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  2778. LW.C0 = cf(-1.5, 0.5, -0.5+0.5*i) * angles(math.rad(40-60*i),math.rad(0),math.rad(25-25*i))
  2779. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2780. Neck.C0 = neckcf0 * angles(math.rad(5*i),0,0)
  2781. end
  2782. newgun.Parent=workspace
  2783. newprt3.BrickColor=BrickColor.new("White")
  2784. neww1.Parent=newprt1
  2785. neww2.Parent=newprt2
  2786. neww3.Parent=newprt3
  2787. neww4.Parent=newprt4
  2788. neww5.Parent=newprt5
  2789. neww6.Parent=newprt6
  2790. neww1.Part0 = newprt1
  2791. neww1.Part1 = LeftArm
  2792. neww1.C1 = euler(0, 0, 0) * cf(0, 0,0)
  2793. neww1.C0 = angles(math.rad(-90), math.rad(0), math.rad(0)) * cf(0, 1, 0)
  2794. Say("Gunzerking")
  2795. for i = 0.1 , 1 , 0.15 do
  2796. wait()
  2797. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90+10*i),math.rad(0),math.rad(0))
  2798. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-25*i), 0, 0)
  2799. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(40-60+120*i),math.rad(0),math.rad(0))
  2800. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2801. Neck.C0 = neckcf0 * angles(math.rad(5-10*i),0,0)
  2802. end
  2803. for i = 0.1 , 1 , 0.2 do
  2804. wait()
  2805. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90+10+10*i),math.rad(0),math.rad(0))
  2806. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(0), 0, 0)
  2807. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(40-60+120+10*i),math.rad(0),math.rad(0))
  2808. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2809. Neck.C0 = neckcf0 * angles(math.rad(5-10-5*i),0,0)
  2810. end
  2811. for i = 0.1 , 1 , 0.15 do
  2812. wait()
  2813. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(110-60*i),math.rad(20*i),math.rad(-5*i))
  2814. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(0), 0, 0)
  2815. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(110-60*i),math.rad(-20*i),math.rad(5*i))
  2816. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2817. Neck.C0 = neckcf0 * angles(math.rad(5-10-5+10*i),0,0)
  2818. end
  2819. attack=false
  2820. end
  2821. function ChangeAmmoAnim(ammo,trail,derpcol)
  2822. for i = 0.1 , 1 , 0.1 do
  2823. wait()
  2824. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90),math.rad(0),math.rad(-60+10*i))
  2825. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-10*i), 0, 0)
  2826. LW.C0 = cf(-1.5, 0.5, -0.5) * angles(math.rad(40+60*i),math.rad(0),math.rad(25))
  2827. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2828. w3.C0 = angles(math.rad(90), 0, 0) * cf(0, 0.25,-0.5)
  2829. Neck.C0 = neckcf0 * angles(math.rad(-5*i),0,0)
  2830. end
  2831. for i = 0.1 , 1 , 0.15 do
  2832. wait()
  2833. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90),math.rad(0),math.rad(-60+10))
  2834. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-10+5*i), 0, 0)
  2835. LW.C0 = cf(-1.5+0.5*i, 0.5, -0.5) * angles(math.rad(40+60-50*i),math.rad(0),math.rad(25+20*i))
  2836. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2837. w3.C0 = angles(math.rad(90+90*i), 0, 0) * cf(0, 0.25,-0.5)
  2838. Neck.C0 = neckcf0 * angles(math.rad(-5+20*i),0,0)
  2839. end
  2840. for i = 0.1 , 1 , 0.1 do
  2841. wait()
  2842. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90),math.rad(0),math.rad(-60+10))
  2843. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-10+5+5*i), 0, 0)
  2844. LW.C0 = cf(-1.5+0.5, 0.5, -0.5) * angles(math.rad(40+60-50+50*i),math.rad(0),math.rad(25+20))
  2845. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2846. w3.C0 = angles(math.rad(180), 0, 0) * cf(0, 0.25,-0.5)
  2847. Neck.C0 = neckcf0 * angles(math.rad(-5+20-10*i),0,0)
  2848. end
  2849. derpd=prt3:Clone()
  2850. derpd.Parent=swordholder
  2851. derpd.Transparency=0
  2852. derpdw=it("Weld")
  2853. derpdw.Parent=swordholder
  2854. derpdw.Part0=derpd
  2855. derpdw.Part1=LeftArm
  2856. derpdw.C0=angles(math.rad(90),math.rad(-30),0)*cf(-0.4,0.8,0)
  2857. prt3.Transparency=1
  2858. wait(0.1)
  2859. for i = 0.1 , 1 , 0.1 do
  2860. wait()
  2861. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90),math.rad(0),math.rad(-60+10))
  2862. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-10+5+5+5*i), 0, 0)
  2863. LW.C0 = cf(-1.5+0.5-0.5*i, 0.5, -0.5+0.5*i) * angles(math.rad(40+60-50+50+10*i),math.rad(0),math.rad(25+20-30*i))
  2864. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2865. w3.C0 = angles(math.rad(180), 0, 0) * cf(0, 0.25,-0.5)
  2866. Neck.C0 = neckcf0 * angles(math.rad(-5+20-10-5*i),0,0)
  2867. derpdw.C0=angles(math.rad(90),math.rad(-30+30*i),0)*cf(-0.4+0.4*i,0.8+0.2*i,0)
  2868. end
  2869. for i = 0.1 , 1 , 0.2 do
  2870. wait()
  2871. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90),math.rad(0),math.rad(-60+10))
  2872. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-10+5+5+5), 0, 0)
  2873. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(40+60-50+50+10-140*i),math.rad(0),math.rad(25+20-30))
  2874. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2875. w3.C0 = angles(math.rad(180), 0, 0) * cf(0, 0.25,-0.5)
  2876. Neck.C0 = neckcf0 * angles(math.rad(-5+20-10-5+30*i),0,math.rad(20*i))
  2877. derpdw.C0=angles(math.rad(90),math.rad(0),0)*cf(0,1,0)
  2878. end
  2879. CurrentAmmo = ammo
  2880. ammotrail = BrickColor.new(trail)
  2881. derpd.BrickColor=BrickColor.new(derpcol)
  2882. prt3.BrickColor=BrickColor.new(derpcol)
  2883. for i = 0.1 , 1 , 0.1 do
  2884. wait()
  2885. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90),math.rad(0),math.rad(-60+10))
  2886. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-10+5+5+5), 0, 0)
  2887. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(40+60-50+50+10-140+140*i),math.rad(0),math.rad(25+20-30+30*i))
  2888. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2889. w3.C0 = angles(math.rad(180), 0, 0) * cf(0, 0.25,-0.5)
  2890. Neck.C0 = neckcf0 * angles(math.rad(-5+20-10-5+30-30*i),0,math.rad(20-20*i))
  2891. derpdw.C0=angles(math.rad(90),math.rad(0),0)*cf(0,1,0)
  2892. end
  2893. for i = 0.1 , 1 , 0.1 do
  2894. wait()
  2895. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90),math.rad(0),math.rad(-60+10))
  2896. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-10+5+5+5-5*i), 0, 0)
  2897. LW.C0 = cf(-1.5+0.5*i, 0.5, -0.5*i) * angles(math.rad(40+60-50+50+10-10*i),math.rad(0),math.rad(25+20))
  2898. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2899. w3.C0 = angles(math.rad(180), 0, 0) * cf(0, 0.25,-0.5)
  2900. Neck.C0 = neckcf0 * angles(math.rad(-5+20-10-5+5*i),0,0)
  2901. derpdw.C0=angles(math.rad(90),math.rad(-30*i),0)*cf(-0.4*i,1-0.2*i,0)
  2902. end
  2903. prt3.Transparency=0
  2904. derpd.Parent=nil
  2905. for i = 0.1 , 1 , 0.1 do
  2906. wait()
  2907. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90),math.rad(0),math.rad(-60+10))
  2908. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-10+5+5+5-5-5*i), 0, 0)
  2909. LW.C0 = cf(-1.5+0.5, 0.5, -0.5) * angles(math.rad(40+60-50+50-60*i),math.rad(0),math.rad(25+20))
  2910. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2911. w3.C0 = angles(math.rad(180), 0, 0) * cf(0, 0.25,-0.5)
  2912. Neck.C0 = neckcf0 * angles(math.rad(-5+20-10+10*i),0,0)
  2913. end
  2914. for i = 0.1 , 1 , 0.15 do
  2915. wait()
  2916. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90),math.rad(0),math.rad(-60+10))
  2917. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-10+5+5+5-5-5-5*i), 0, 0)
  2918. LW.C0 = cf(-1.5+0.5-0.5*i, 0.5, -0.5) * angles(math.rad(40+60*i),math.rad(0),math.rad(25+20-20*i))
  2919. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2920. w3.C0 = angles(math.rad(180-90*i), 0, 0) * cf(0, 0.25,-0.5)
  2921. Neck.C0 = neckcf0 * angles(math.rad(-5+20-20*i),0,0)
  2922. end
  2923. for i = 0.1 , 1 , 0.1 do
  2924. wait()
  2925. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90),math.rad(0),math.rad(-60+10-10*i))
  2926. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-10+10*i), 0, 0)
  2927. LW.C0 = cf(-1.5, 0.5, -0.5) * angles(math.rad(40+60-60*i),math.rad(0),math.rad(25))
  2928. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2929. w3.C0 = angles(math.rad(90), 0, 0) * cf(0, 0.25,-0.5)
  2930. Neck.C0 = neckcf0 * angles(math.rad(-5+5*i),0,0)
  2931. end
  2932. end
  2933. function DodgeBack()
  2934. attack=true
  2935. dodging=true
  2936. LWFunc()
  2937. vel = it("BodyVelocity")
  2938. vel.Parent = Head
  2939. vel.maxForce = vt(4e+005,4e+005,4e+005)*1
  2940. vel.velocity = Head.CFrame.lookVector * -60
  2941. vel2 = it("BodyGyro")
  2942. vel2.Parent = Head
  2943. vel2.maxTorque = vt(4e+005,4e+005,4e+005)*math.huge
  2944. vel2.P = 50e+003
  2945. vel2.cframe=Torso.CFrame
  2946. neckcf0=Neck.C0
  2947. for i = 0.1 , 1 , 0.2 do
  2948. wait()
  2949. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90),math.rad(0),math.rad(-60+150*i))
  2950. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  2951. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(0),math.rad(-20*i),math.rad(-90*i))
  2952. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2953. Neck.C0 = neckcf0 * angles(0,0,math.rad(70*i))
  2954. end
  2955. wait(0.2)
  2956. dodging=false
  2957. vel.Parent=nil
  2958. for i = 0.1 , 1 , 0.1 do
  2959. wait()
  2960. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90),math.rad(0),math.rad(-60+150-150*i))
  2961. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  2962. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(0),math.rad(-20+20*i),math.rad(-90+90*i))
  2963. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2964. Neck.C0 = neckcf0 * angles(0,0,math.rad(70-70*i))
  2965. end
  2966. LWRem()
  2967. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90),math.rad(0),math.rad(-60))
  2968. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  2969. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(0),math.rad(0),math.rad(0))
  2970. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  2971. Neck.C0 = neckcf0 * angles(0,0,math.rad(0))
  2972. vel2.Parent=nil
  2973. attack=false
  2974. end
  2975. function DodgeForward()
  2976. attack=true
  2977. dodging=true
  2978. LWFunc()
  2979. vel=it("BodyVelocity")
  2980. vel.Parent=Head
  2981. vel.maxForce=vt(4e+005,4e+005,4e+005)*1
  2982. vel.velocity=Head.CFrame.lookVector * 60
  2983. vel2=it("BodyGyro")
  2984. vel2.Parent=Head
  2985. vel2.maxTorque=vt(4e+005,4e+005,4e+005)*math.huge
  2986. vel2.P=50e+003
  2987. vel2.cframe=Torso.CFrame
  2988. neckcf0=Neck.C0
  2989. for i = 0.1 , 1 , 0.2 do
  2990. wait()
  2991. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90-120*i),math.rad(0),math.rad(-60+60*i))
  2992. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(-30*i),math.rad(0),math.rad(0))
  2993. Neck.C0 = neckcf0 * angles(0,0,math.rad(0))
  2994. end
  2995. wait(0.2)
  2996. if holdforward==true then
  2997. --vel.velocity = (Head.CFrame.lookVector+vt(0,1,0)) * 50
  2998. vel.velocity = (Head.CFrame.lookVector*90)+(vt(0,1,0)*50)
  2999. CF=Torso.CFrame
  3000. RWLFunc()
  3001. LWLFunc()
  3002. for i=0,1,0.1 do
  3003. wait()
  3004. vel2.cframe=CF*euler(math.rad(-360*i),0,0)
  3005. RWL.C0 = cf(1, -1, -1*i)*euler(-1.57*i,0,0)
  3006. LWL.C0 = cf(-1, -1+1*i, -1*i)*euler(0,0,0)
  3007. end
  3008. vel2.cframe=CF
  3009. vel.Parent=nil
  3010. for i=0,1,0.1 do
  3011. wait()
  3012. vel2.cframe=CF*euler(0,math.rad(180*i),0)
  3013. RWL.C0 = cf(1, -1, -1+1*i)*euler(-1.57+1.57*i,0,0)
  3014. LWL.C0 = cf(-1, -1+1-1*i, -1+1*i)*euler(0,0,0)
  3015. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90-120),math.rad(0),math.rad(90*i))
  3016. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(-30),math.rad(0),math.rad(-90*i))
  3017. end
  3018. RWL.C0 = cf(1, -1, 0) * angles(0, 0, 0)
  3019. RWL.C1 = cf(0.5, 1, 0)
  3020. RWLRem()
  3021. LWLRem()
  3022. vel2.Parent=nil
  3023. for i=0,1,0.1 do
  3024. wait()
  3025. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90-120+120*i),math.rad(0),math.rad(90-150*i))
  3026. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(-30+30*i),math.rad(0),math.rad(-90+90*i))
  3027. end
  3028. dodging=false
  3029. LWRem()
  3030. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90),math.rad(0),math.rad(-60))
  3031. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  3032. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(0),math.rad(0),math.rad(0))
  3033. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  3034. Neck.C0 = neckcf0 * angles(0,0,math.rad(0))
  3035. else
  3036. dodging=false
  3037. vel.Parent=nil
  3038. vel2.Parent=nil
  3039. for i = 0.1 , 1 , 0.2 do
  3040. wait()
  3041. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90-120+120*i),math.rad(0),math.rad(-60+60-60*i))
  3042. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(-30+30*i),math.rad(0),math.rad(0))
  3043. Neck.C0 = neckcf0 * angles(0,0,math.rad(0))
  3044. end
  3045. LWRem()
  3046. end
  3047. attack=false
  3048. end
  3049. function DodgeLeft()
  3050. attack=true
  3051. dodging=true
  3052. LWFunc()
  3053. CF=Head.CFrame*euler(0,1.57,0)
  3054. vel = it("BodyVelocity")
  3055. vel.Parent = Torso
  3056. vel.maxForce = vt(4e+005,4e+005,4e+005)*1
  3057. vel.velocity = CF.lookVector * 70
  3058. vel2 = it("BodyGyro")
  3059. vel2.Parent = Head
  3060. vel2.maxTorque = vt(4e+005,4e+005,4e+005)*math.huge
  3061. vel2.P = 50e+003
  3062. vel2.cframe=Torso.CFrame
  3063. CF2=Torso.CFrame
  3064. for i=0,1,0.1 do
  3065. wait()
  3066. CF=Torso.CFrame*euler(0,1.57,0)
  3067. vel.velocity = CF.lookVector * 60
  3068. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90),math.rad(0),math.rad(-60+150*i))
  3069. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-25*i), 0, 0)
  3070. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(0),math.rad(0),math.rad(-90*i))
  3071. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  3072. vel2.cframe=CF2*euler(0,-1.57*i,0)
  3073. end
  3074. vel.Parent=nil
  3075. for i=0,1,0.2 do
  3076. wait()
  3077. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90),math.rad(0),math.rad(-60+150-150*i))
  3078. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-25+25*i), 0, 0)
  3079. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(0),math.rad(0),math.rad(-90+90*i))
  3080. end
  3081. vel2.Parent=nil
  3082. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90),math.rad(0),math.rad(-60))
  3083. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  3084. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(0),math.rad(0),math.rad(0))
  3085. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  3086. Neck.C0 = neckcf0 * angles(0,0,math.rad(0))
  3087. LWRem()
  3088. dodging=false
  3089. attack=false
  3090. end
  3091. function DodgeRight()
  3092. attack=true
  3093. dodging=true
  3094. LWFunc()
  3095. CF=Head.CFrame*euler(0,-1.57,0)
  3096. vel = it("BodyVelocity")
  3097. vel.Parent = Torso
  3098. vel.maxForce = vt(4e+005,4e+005,4e+005)*1
  3099. vel.velocity = CF.lookVector * 70
  3100. vel2 = it("BodyGyro")
  3101. vel2.Parent = Head
  3102. vel2.maxTorque = vt(4e+005,4e+005,4e+005)*math.huge
  3103. vel2.P = 50e+003
  3104. vel2.cframe=Torso.CFrame
  3105. CF2=Torso.CFrame
  3106. for i=0,1,0.1 do
  3107. wait()
  3108. CF=Torso.CFrame*euler(0,-1.57,0)
  3109. vel.velocity = CF.lookVector * 60
  3110. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90),math.rad(0),math.rad(-60+150*i))
  3111. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-25*i), 0, 0)
  3112. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(0),math.rad(0),math.rad(-90*i))
  3113. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  3114. vel2.cframe=CF2*euler(0,1.57*i,0)
  3115. end
  3116. vel.Parent=nil
  3117. vel2.Parent=nil
  3118. for i=0,1,0.2 do
  3119. wait()
  3120. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90),math.rad(0),math.rad(-60+150-150*i))
  3121. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25-25+25*i), 0, 0)
  3122. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(0),math.rad(0),math.rad(-90+90*i))
  3123. end
  3124. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90),math.rad(0),math.rad(-60))
  3125. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  3126. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(0),math.rad(0),math.rad(0))
  3127. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  3128. Neck.C0 = neckcf0 * angles(0,0,math.rad(0))
  3129. LWRem()
  3130. dodging=false
  3131. attack=false
  3132. end
  3133. function Action1()
  3134. prt5.CanCollide=false
  3135. prt6.CanCollide=false
  3136. attack=true
  3137. LWFunc()
  3138. for i = 0 , 1 , 0.1 do
  3139. wait(0)
  3140. RW.C0 = cf(1.5, 0.5, -0.25+0.25*i) * angles(math.rad(90-60*i),math.rad(0),math.rad(-60+60*i))
  3141. LW.C0 = cf(-1.5+0.5*i, 0.5, 0) * angles(math.rad(130*i),math.rad(0),math.rad(40*i))
  3142. Neck.C0 = neckcf0 * angles(math.rad(20*i),0,math.rad(20*i))
  3143. end
  3144. Say("FacepalmTaunt")
  3145. for i = 0 , 1 , 0.2 do
  3146. wait(0)
  3147. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90-60-10*i),math.rad(0),math.rad(0))
  3148. LW.C0 = cf(-1.5+0.5, 0.5, 0) * angles(math.rad(130),math.rad(0),math.rad(40))
  3149. Neck.C0 = neckcf0 * angles(math.rad(20),0,math.rad(20+10*i))
  3150. end
  3151. for i = 0 , 1 , 0.2 do
  3152. wait(0)
  3153. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90-60-10-10*i),math.rad(0),math.rad(0))
  3154. LW.C0 = cf(-1.5+0.5, 0.5, 0) * angles(math.rad(130),math.rad(0),math.rad(40))
  3155. Neck.C0 = neckcf0 * angles(math.rad(20),0,math.rad(20+10-10*i))
  3156. end
  3157. for i = 0 , 1 , 0.2 do
  3158. wait(0)
  3159. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90-60-10-10+10*i),math.rad(0),math.rad(0))
  3160. LW.C0 = cf(-1.5+0.5, 0.5, 0) * angles(math.rad(130),math.rad(0),math.rad(40))
  3161. Neck.C0 = neckcf0 * angles(math.rad(20),0,math.rad(20+10*i))
  3162. end
  3163. for i = 0 , 1 , 0.2 do
  3164. wait(0)
  3165. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90-60-10-10+10+10*i),math.rad(0),math.rad(0))
  3166. LW.C0 = cf(-1.5+0.5, 0.5, 0) * angles(math.rad(130),math.rad(0),math.rad(40))
  3167. Neck.C0 = neckcf0 * angles(math.rad(20),0,math.rad(20+10-10*i))
  3168. end
  3169. for i = 0 , 1 , 0.1 do
  3170. wait(0)
  3171. RW.C0 = cf(1.5, 0.5, -0.25*i) * angles(math.rad(90-60+60*i),math.rad(0),math.rad(-60*i))
  3172. LW.C0 = cf(-1.5+0.5-0.5*i, 0.5, 0) * angles(math.rad(130-130*i),math.rad(0),math.rad(40-40*i))
  3173. Neck.C0 = neckcf0 * angles(math.rad(20-20*i),0,math.rad(20-20*i))
  3174. end
  3175. LWRem()
  3176. attack=false
  3177. prt5.CanCollide=true
  3178. prt6.CanCollide=true
  3179. end
  3180. function Action2()
  3181. Character.Humanoid.WalkSpeed=0
  3182. attack=true
  3183. LWFunc()
  3184. TorsCF=Torso.CFrame
  3185. for i = 0 , 1 , 0.1 do
  3186. wait(0)
  3187. Torso.CFrame=TorsCF*angles(0,math.rad(-90*i),0)
  3188. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90),math.rad(0),math.rad(-60+150*i))
  3189. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(0),math.rad(0),math.rad(-180*i))
  3190. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, math.rad(0))
  3191. Neck.C0 = neckcf0 * angles(math.rad(0),0,math.rad(90*i))
  3192. end
  3193. for i = 0 , 1 , 0.2 do
  3194. wait(0)
  3195. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90),math.rad(0),math.rad(-60+150))
  3196. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(30*i),math.rad(0),math.rad(-180+100*i))
  3197. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, math.rad(0))
  3198. Neck.C0 = neckcf0 * angles(math.rad(0),0,math.rad(90))
  3199. end
  3200. for i = 0 , 1 , 0.2 do
  3201. wait(0)
  3202. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90),math.rad(0),math.rad(-60+150))
  3203. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(30),math.rad(0),math.rad(-180+100+10*i))
  3204. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, math.rad(0))
  3205. Neck.C0 = neckcf0 * angles(math.rad(0),0,math.rad(90))
  3206. end
  3207. wait(0.5)
  3208. TorsCF=Torso.CFrame
  3209. for i = 0 , 1 , 0.1 do
  3210. wait(0)
  3211. Torso.CFrame=TorsCF*angles(0,math.rad(90*i),0)
  3212. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90),math.rad(0),math.rad(-60+150-150*i))
  3213. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(30-30*i),math.rad(0),math.rad(-70+70*i))
  3214. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, math.rad(0))
  3215. Neck.C0 = neckcf0 * angles(math.rad(0),0,math.rad(90-90*i))
  3216. end
  3217. LWRem()
  3218. attack=false
  3219. Character.Humanoid.WalkSpeed=14
  3220. end
  3221. bodpos=it("BodyPosition")
  3222. bodpos.P=2000
  3223. bodpos.D=100
  3224. bodpos.maxForce=vt(math.huge,math.huge,math.huge)
  3225. bodgy=it("BodyGyro")
  3226. bodgy.maxTorque=vt(4e+005,4e+005,4e+005)*math.huge
  3227. bodgy.P=50e+003
  3228. function Sit()
  3229. bodpos.position=Torso.Position-vt(0,3,0)
  3230. bodpos.Parent=Torso
  3231. bodgy.cframe=Torso.CFrame
  3232. bodgy.Parent=Head
  3233. LWFunc()
  3234. RWLFunc()
  3235. LWLFunc()
  3236. for i=0,1,0.1 do
  3237. wait()
  3238. bodgy.cframe=Torso.CFrame*euler(0.07*i,0,0)
  3239. RWL.C0 = cf(0.5+0.1*i,-1.5+0.6*i,-0.7*i) * euler(1.2*i,0,0.5*i)
  3240. RWL.C1 = cf(0,0.5,0) * euler(0,0,0)
  3241. LWL.C0 = cf(-0.5-0.1*i,-1.5+0.6*i,-0.7*i) * euler(1.2*i,0,-0.5*i)
  3242. LWL.C1 = cf(0,0.5,0) * euler(0,0,0)
  3243. RW.C0 = cf(1.5, 0.5, -0.25-0.25*i) * angles(math.rad(90-50*i),math.rad(0),math.rad(-60+10*i))
  3244. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), math.rad(-90*i), 0)
  3245. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(-20*i),math.rad(0),math.rad(0))
  3246. end
  3247. end
  3248. function GetUp()
  3249. for i=0,1,0.1 do
  3250. wait()
  3251. bodgy.cframe=Torso.CFrame*euler(-0.07*i,0,0)
  3252. RWL.C0 = cf(0.5+0.1-0.1*i,-1.5+0.6-0.6*i,-0.7+0.7*i) * euler(1.2-1.2*i,0,0.5-0.5*i)
  3253. LWL.C0 = cf(-0.5-0.1+0.1*i,-1.5+0.6-0.6*i,-0.7+0.7*i) * euler(1.2-1.2*i,0,-0.5+0.5*i)
  3254. RW.C0 = cf(1.5, 0.5, -0.25-0.25+0.25*i) * angles(math.rad(90-50+50*i),math.rad(0),math.rad(-60+10-10*i))
  3255. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), math.rad(-90+90*i), 0)
  3256. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(-20+20*i),math.rad(0),math.rad(0))
  3257. end
  3258. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90),math.rad(0),math.rad(-60))
  3259. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), math.rad(0), 0)
  3260. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(0),math.rad(0),math.rad(0))
  3261. bodpos.Parent=nil
  3262. bodgy.Parent=nil
  3263. LWRem()
  3264. RWLRem()
  3265. LWLRem()
  3266. end
  3267. function Hi5()
  3268. prt5.CanCollide=false
  3269. prt6.CanCollide=false
  3270. attack=true
  3271. didhifive=false
  3272. detecthifive=false
  3273. LWFunc()
  3274. bodpos.Parent=Torso
  3275. bodpos.position=Torso.Position
  3276. bodgy.cframe=Torso.CFrame
  3277. bodgy.Parent=Head
  3278. for i=0,1,0.2 do
  3279. wait()
  3280. Neck.C0 = neckcf0 * angles(math.rad(0),0,math.rad(20*i))
  3281. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90-100*i),math.rad(0),math.rad(-60+60*i))
  3282. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  3283. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(150*i),math.rad(-20*i),math.rad(0))
  3284. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  3285. end
  3286. coroutine.resume(coroutine.create(function()
  3287. print("herp")
  3288. while hifiving==true do
  3289. wait(0)
  3290. hifivevalue.Value=true
  3291. local hitted,post = rayCast(Torso.Position,Head.CFrame.lookVector,6,Character)
  3292. if hitted~=nil then
  3293. if hitted.Parent:findFirstChild("HighFive")~=nil then
  3294. if hitted.Parent:findFirstChild("HighFive").Value==true then
  3295. wait(0.8)
  3296. print("HI FIVE")
  3297. didhifive=true
  3298. hifiving=false
  3299. for i=0,1,0.1 do
  3300. wait(0.05)
  3301. Neck.C0 = neckcf0 * angles(math.rad(0),0,math.rad(20-30*i))
  3302. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(-10),math.rad(0),math.rad(0))
  3303. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  3304. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(150-170*i),math.rad(-20),math.rad(0))
  3305. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  3306. end
  3307. hifivevalue.Value=false
  3308. for i=0,1,0.1 do
  3309. wait()
  3310. Neck.C0 = neckcf0 * angles(math.rad(0),0,math.rad(-10-10*i))
  3311. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(-10),math.rad(0),math.rad(20*i))
  3312. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  3313. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(-20+220*i),math.rad(-20+20*i),math.rad(0))
  3314. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  3315. end
  3316. for i=0,1,0.1 do
  3317. wait()
  3318. Neck.C0 = neckcf0 * angles(math.rad(0),0,math.rad(-20+60*i))
  3319. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(-10),math.rad(0),math.rad(20))
  3320. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  3321. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(200-70*i),math.rad(0),math.rad(0))
  3322. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  3323. end
  3324. for i=0,1,0.1 do
  3325. wait()
  3326. Neck.C0 = neckcf0 * angles(math.rad(0),0,math.rad(-20+60-30*i))
  3327. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(-10),math.rad(0),math.rad(20))
  3328. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  3329. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(200-70+50*i),math.rad(0),math.rad(0))
  3330. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  3331. end
  3332. for i=0,1,0.1 do
  3333. wait()
  3334. Neck.C0 = neckcf0 * angles(math.rad(0),0,math.rad(10-10*i))
  3335. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(-10+100*i),math.rad(0),math.rad(20-80*i))
  3336. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  3337. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(180-180*i),math.rad(0),math.rad(0))
  3338. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  3339. end
  3340. bodpos.Parent=nil
  3341. bodgy.Parent=nil
  3342. hifivevalue.Value=false
  3343. LWRem()
  3344. Neck.C0 = neckcf0
  3345. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90),math.rad(0),math.rad(-60))
  3346. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  3347. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(0),math.rad(0),math.rad(0))
  3348. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  3349. prt5.CanCollide=true
  3350. prt6.CanCollide=true
  3351. else
  3352. print("No hi five :c")
  3353. end
  3354. end
  3355. else
  3356. print("DERP")
  3357. end
  3358. end
  3359. end))
  3360. while hifiving==true and detecthifive==false do
  3361. wait()
  3362. end
  3363. if didhifive==false then
  3364. for i=0,1,0.2 do
  3365. wait()
  3366. Neck.C0 = neckcf0 * angles(math.rad(0),0,math.rad(20-20*i))
  3367. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90-100+100*i),math.rad(0),math.rad(-60*i))
  3368. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  3369. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(150-150*i),math.rad(-20+20*i),math.rad(0))
  3370. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  3371. end
  3372. bodpos.Parent=nil
  3373. bodgy.Parent=nil
  3374. hifivevalue.Value=false
  3375. LWRem()
  3376. Neck.C0 = neckcf0
  3377. RW.C0 = cf(1.5, 0.5, -0.25) * angles(math.rad(90),math.rad(0),math.rad(-60))
  3378. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  3379. LW.C0 = cf(-1.5, 0.5, 0) * angles(math.rad(0),math.rad(0),math.rad(0))
  3380. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  3381. prt5.CanCollide=true
  3382. prt6.CanCollide=true
  3383. else
  3384. --wait(2)
  3385. end
  3386. attack=false
  3387. end
  3388. function NormalAmmo()
  3389. attack = true
  3390. ChangeAmmoAnim("Normal","White","White")
  3391. attack = false
  3392. end
  3393. function effect(Color,Ref,LP,P1,returnn)
  3394. local effectsmsh = it("BlockMesh")
  3395. effectsmsh.Scale = vt(1,1,1)
  3396. effectsmsh.Name = "Mesh"
  3397. local effectsg = it("Part")
  3398. effectsg.formFactor = 3
  3399. effectsg.CanCollide = false
  3400. effectsg.Name = "Eff"
  3401. effectsg.Locked = true
  3402. effectsg.Anchored = true
  3403. effectsg.Size = vt(0.2,1,0.2)
  3404. effectsg.Parent = swordholder
  3405. effectsmsh.Parent = effectsg
  3406. effectsg.BrickColor = BrickColor.new(Color)
  3407. effectsg.Reflectance = Ref
  3408. local point1 = P1
  3409. local mg = (LP.p - point1.p).magnitude
  3410. effectsg.Size = vt(0.2,mg,0.2)
  3411. effectsg.CFrame = cf((LP.p+point1.p)/2,point1.p) * angles(math.rad(90),0,0)
  3412. if returnn then return effectsg end
  3413. effectsmsh.Scale = vt(0.2,0.2,0.2)
  3414. coroutine.resume(coroutine.create(function()
  3415. if not returnn then
  3416. for i = 0 , 1 , 0.1 do
  3417. wait()
  3418. effectsg.Transparency = 1*i
  3419. effectsmsh.Scale = vt(0.2-0.2*i,1,0.2-0.2*i)
  3420. end
  3421. wait()
  3422. effectsg.Parent = nil
  3423. end
  3424. end))
  3425. end
  3426. function returnwelds()
  3427. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90),math.rad(0),math.rad(-60))
  3428. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  3429. LW.C0 = cf(-1.5, 0.5, -0.5) * angles(math.rad(40),math.rad(0),math.rad(25))
  3430. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  3431. w3.C0 = angles(math.rad(90), 0, 0) * cf(0, 0.25,-0.5)
  3432. w1.C0 = angles(math.rad(-90), math.rad(0), math.rad(0)) * cf(0, 0, 0)
  3433. RWL.C0 = cf(1, -1, 0) * angles(0, 0, 0)
  3434. RWL.C1 = cf(0.5, 1, 0)
  3435. LWL.C0 = cf(-1, -1, 0) * angles(0, 0, 0)
  3436. LWL.C1 = cf(-0.5, 1, 0)
  3437. Neck.C0 = neckcf0
  3438. end
  3439. keyhold = false
  3440. function ob1d(mouse)
  3441. hold = true
  3442. if attack then return end
  3443. keyhold = true
  3444. if blastcannonmode==true then
  3445. BlasterShoot(mouse)
  3446. end
  3447. if blastcannonmode==true then return end
  3448. if Gunzerkering==true then
  3449. GunzerkReady(mouse)
  3450. else
  3451. Ready(mouse)
  3452. end
  3453. end
  3454. function ob1u(mouse)
  3455. keyhold = false
  3456. end
  3457. buttonhold = false
  3458. function key(key,mouse)
  3459. if attack then return end
  3460. if key=="h" then
  3461. if blastcannonmode==false then
  3462. BlasterMode()
  3463. else
  3464. EndBlasterMode()
  3465. end
  3466. end
  3467. if key=="q" and blastcannonmode==true then
  3468. CannonShoot(mouse)
  3469. end
  3470. if blastcannonmode==true then return end
  3471. if key=="f" and GunzerkDuration==1000 then
  3472. Gunzerker()
  3473. coroutine.resume(coroutine.create(function()
  3474. local meh = Character
  3475. local rprt1 = it("Part")
  3476. rprt1.Parent = meh
  3477. rprt1.BrickColor = BrickColor.new("Bright red")
  3478. rprt1.CanCollide = false
  3479. rprt1.Name = "RedEye"
  3480. local rmsh1 = it("CylinderMesh")
  3481. rmsh1.Parent = rprt1
  3482. rmsh1.Scale = vt(0.035,0.2,0.035)
  3483. local rwld1 = it("Weld")
  3484. rwld1.Parent = rprt1
  3485. rwld1.Part0 = rprt1
  3486. rwld1.Part1 = meh.Head
  3487. rwld1.C0 = euler(1.57,0,0) * cf(0.1,-0.18,0.5)
  3488. local rprt2 = it("Part")
  3489. rprt2.Parent = meh
  3490. rprt2.BrickColor = BrickColor.new("Bright red")
  3491. rprt2.CanCollide = false
  3492. rprt2.Name = "RedEye"
  3493. local rmsh2 = it("CylinderMesh")
  3494. rmsh2.Parent = rprt2
  3495. rmsh2.Scale = vt(0.035,0.2,0.035)
  3496. local wld2 = it("Weld")
  3497. wld2.Parent = rprt2
  3498. wld2.Part0 = rprt2
  3499. wld2.Part1 = meh.Head
  3500. wld2.C0 = euler(1.57,0,0) * cf(-0.1,-0.18,0.5)
  3501. local LastPoint1 = rprt1.CFrame * cf(0,rprt1.Size.Y/10,0)
  3502. local LastPoint2 = rprt2.CFrame * cf(0,rprt2.Size.Y/10,0)
  3503. while GunzerkDuration~=0 do
  3504. wait(0)
  3505. GunzerkDuration=GunzerkDuration-2
  3506. local Point1 = rprt1.CFrame * cf(0,rprt1.Size.Y/10,0)
  3507. effect("Bright red",0.5,LastPoint1,Point1)
  3508. LastPoint1 = Point1
  3509. local Point2 = rprt2.CFrame * cf(0,rprt2.Size.Y/10,0)
  3510. effect("Bright red",0.5,LastPoint2,Point2)
  3511. LastPoint2 = Point2
  3512. end
  3513. Gunzerkering=false
  3514. while attack==true do
  3515. wait()
  3516. end
  3517. LWRem()
  3518. rprt1.Parent=nil
  3519. rprt2.Parent=nil
  3520. newgun.Parent=nil
  3521. RW.C0 = cf(1.5, 0.5, 0) * angles(math.rad(90),math.rad(0),math.rad(-60))
  3522. RW.C1 = cf(0, 0.5, 0) * angles(math.rad(25), 0, 0)
  3523. LW.C0 = cf(-1.5, 0.5, -0.5) * angles(math.rad(40),math.rad(0),math.rad(25))
  3524. LW.C1 = cf(0, 0.5, 0) * angles(0, 0, 0)
  3525. Neck.C0 = neckcf0 * angles(math.rad(0),0,0)
  3526. wait()
  3527. while GunzerkDuration~=1000 and Gunzerkering==false do
  3528. wait()
  3529. GunzerkDuration=GunzerkDuration+2
  3530. end
  3531. end))
  3532. end
  3533. if Gunzerkering~=true then
  3534. if key == "r" then
  3535. if Ammo~=MaxAmmo then
  3536. Reload2()
  3537. end
  3538. end
  3539. if key == "e" then
  3540. critical=false
  3541. Melee()
  3542. end
  3543. --[[DODGE ANIMATIONS]]--
  3544. if key=="b" then
  3545. DodgeBack()
  3546. end
  3547. if key=="g" then
  3548. DodgeForward()
  3549. holdforward=true
  3550. end
  3551. if key=="v" then
  3552. DodgeLeft()
  3553. end
  3554. if key=="n" then
  3555. DodgeRight()
  3556. end
  3557. --[[TAUNT ANIMATIONS]]--
  3558. if key=="z" then
  3559. Action1()
  3560. end
  3561. if key=="x" then
  3562. Action2()
  3563. end
  3564. if key=="c" then
  3565. if resting==false then
  3566. resting=true
  3567. Sit()
  3568. else
  3569. resting=false
  3570. GetUp()
  3571. end
  3572. end
  3573. if key=="t" then
  3574. hifiving=true
  3575. Hi5()
  3576. end
  3577. end
  3578. end
  3579. function key2(key)
  3580. if key == "f" or key == "q" then
  3581. buttonhold = false
  3582. end
  3583. if key=="g" then
  3584. holdforward=false
  3585. end
  3586. if key=="t" then
  3587. hifiving=false
  3588. end
  3589. end
  3590. function s(mouse)
  3591. repeat wait() until not attack
  3592. repeat wait() until not ev.Value
  3593. mouse.Button1Down:connect(function() ob1d(mouse) end)
  3594. mouse.Button1Up:connect(function() ob1u(mouse) end)
  3595. mouse.KeyDown:connect(function(ke) key(ke,mouse) end)
  3596. mouse.KeyUp:connect(key2)
  3597. equipanim()
  3598. ev.Value = true
  3599. end
  3600. function ds(mouse)
  3601. keyhold = false
  3602. repeat wait() until not attack
  3603. repeat wait() until ev.Value
  3604. hideanim()
  3605. wait(0.1)
  3606. ev.Value = false
  3607. end
  3608. Bin.Selected:connect(s)
  3609. Bin.Deselected:connect(ds)
  3610. if PlayerGui:findFirstChild("AmmoMeter") ~= nil then
  3611. PlayerGui:findFirstChild("AmmoMeter").Parent = nil
  3612. end
  3613. coroutine.resume(coroutine.create(function()
  3614. local SG = it("ScreenGui",PlayerGui)
  3615. SG.Name = "AmmoMeter"
  3616. local frame = it("Frame",SG)
  3617. frame.Size = UDim2.new(0.2,0,0.1,0)
  3618. frame.Position = UDim2.new(0.5-0.1,0,0.05,0)
  3619. frame.BackgroundColor3 = BrickColor.new("Brown").Color
  3620. local Ammotext = it("TextLabel",frame)
  3621. Ammotext.Size = UDim2.new(1,0,0.35,0)
  3622. Ammotext.BackgroundTransparency = 1
  3623. Ammotext.Text = "Ammo"
  3624. Ammotext.FontSize = "Size10"
  3625. Ammotext.TextColor3 = BrickColor.new("White").Color
  3626. local backing = it("ImageLabel",frame)
  3627. backing.Size = UDim2.new(0.8,0,0.2,0)
  3628. backing.Image = "http://www.roblox.com/asset/?id=48965808"
  3629. backing.Position = UDim2.new(0.1,0,0.3,0)
  3630. backing.BackgroundColor3 = BrickColor.new("Black").Color
  3631. local img = it("ImageLabel",backing)
  3632. img.Size = UDim2.new(1,0,1,0)
  3633. img.Image = "http://www.roblox.com/asset/?id=48965808"
  3634. img.Position = UDim2.new(0,0,0,0)
  3635. img.BackgroundColor3 = BrickColor.new("Brown").Color
  3636. local percent = it("TextLabel",backing)
  3637. percent.Size = UDim2.new(1,0,1,0)
  3638. percent.BackgroundTransparency = 1
  3639. percent.TextColor3 = BrickColor.new("White").Color
  3640. percent.Text = Ammo.."/".. MaxAmmo
  3641. percent.FontSize = "Size10"
  3642. local Gunzerktext = it("TextLabel",frame)
  3643. Gunzerktext.Size = UDim2.new(1,0,1.2,0)
  3644. Gunzerktext.BackgroundTransparency = 1
  3645. Gunzerktext.Text = "Gunzerk Duration"
  3646. Gunzerktext.FontSize = "Size10"
  3647. Gunzerktext.TextColor3 = BrickColor.new("White").Color
  3648. local Gunzerkbacking = it("ImageLabel",frame)
  3649. Gunzerkbacking.Size = UDim2.new(0.8,0,0.2,0)
  3650. Gunzerkbacking.Image = "http://www.roblox.com/asset/?id=48965808"
  3651. Gunzerkbacking.Position = UDim2.new(0.1,0,0.75,0)
  3652. Gunzerkbacking.BackgroundColor3 = BrickColor.new("Black").Color
  3653. local Gunzerkimg = it("ImageLabel",Gunzerkbacking)
  3654. Gunzerkimg.Size = UDim2.new(1,0,1,0)
  3655. Gunzerkimg.Image = "http://www.roblox.com/asset/?id=48965808"
  3656. Gunzerkimg.Position = UDim2.new(0,0,0,0)
  3657. Gunzerkimg.BackgroundColor3 = BrickColor.new("Brown").Color
  3658. local currentam = it("TextLabel",frame)
  3659. currentam.Size = UDim2.new(0.5,0,0.25,0)
  3660. currentam.Position = UDim2.new(0,0,1,0)
  3661. currentam.BackgroundTransparency = 0
  3662. currentam.BackgroundColor3 = BrickColor.new("Brown").Color
  3663. currentam.TextColor3 = BrickColor.new("White").Color
  3664. currentam.Text = CurrentAmmo
  3665. currentam.FontSize = "Size18"
  3666. repeat
  3667. wait()
  3668. pcall(function()
  3669. img.Size = UDim2.new(1*(Ammo/MaxAmmo),0,1,0)
  3670. percent.Text = Ammo.."/".. MaxAmmo
  3671. Gunzerkimg.Size = UDim2.new(1*(GunzerkDuration/1000),0,1,0)
  3672. currentam.Text = CurrentAmmo
  3673. end)
  3674. until SG.Parent == nil
  3675. end))
  3676. --[[coroutine.resume(coroutine.create(function()
  3677. swordholder.Parent = workspace
  3678. for i=0,9999999999 do
  3679. wait()
  3680. if swordholder.Parent==nil then
  3681. wait(1)
  3682. swordholder.Parent = workspace
  3683. prt1.Parent = swordholder
  3684. prt2.Parent = swordholder
  3685. prt3.Parent = swordholder
  3686. prt4.Parent = swordholder
  3687. prt5.Parent = swordholder
  3688. prt6.Parent = swordholder
  3689. holster1.Parent = swordholder
  3690. --holster2.Parent = swordholder
  3691. holster3.Parent = swordholder
  3692. w1.Parent=prt1
  3693. w2.Parent=prt2
  3694. w3.Parent=prt3
  3695. w4.Parent=prt4
  3696. w5.Parent=prt5
  3697. w6.Parent=prt6
  3698. w7.Parent=holster1
  3699. w8.Parent=holster2
  3700. w9.Parent=holster3
  3701. if Gunzerkering==true then
  3702. newgun.Parent = workspace
  3703. newprt1.Parent = newgun
  3704. newprt2.Parent = newgun
  3705. newprt3.Parent = newgun
  3706. newprt4.Parent = newgun
  3707. newprt5.Parent = newgun
  3708. newprt6.Parent = newgun
  3709. neww1.Parent=newprt1
  3710. neww2.Parent=newprt2
  3711. neww3.Parent=newprt3
  3712. neww4.Parent=newprt4
  3713. neww5.Parent=newprt5
  3714. neww6.Parent=newprt6
  3715. end
  3716. end
  3717. end
  3718. end))]]
  3719. coroutine.resume(coroutine.create(function()
  3720. for i=0,9999999999 do
  3721. wait()
  3722. if Character.Humanoid.Health==0 then
  3723. swordholder.Parent=workspace
  3724. prt1.Parent = swordholder
  3725. prt2.Parent = swordholder
  3726. prt3.Parent = swordholder
  3727. prt4.Parent = swordholder
  3728. prt5.Parent = swordholder
  3729. prt6.Parent = swordholder
  3730. holster1.Parent = swordholder
  3731. holster3.Parent = swordholder
  3732. w1.Parent=prt1
  3733. w2.Parent=prt2
  3734. w3.Parent=prt3
  3735. w4.Parent=prt4
  3736. w5.Parent=prt5
  3737. w6.Parent=prt6
  3738. w7.Parent=holster1
  3739. w8.Parent=holster2
  3740. w9.Parent=holster3
  3741. end
  3742. end
  3743. end))
  3744. testpart=it("Part")
  3745. testpart.Parent=swordholder
  3746. testpart.Anchored=true
  3747. testpart.CanCollide=false
  3748. testpart.Transparency=1
  3749. scarfp2=it("Part")
  3750. scarfp2.Parent=swordholder
  3751. scarfp2.Anchored=true
  3752. scarfp2.CanCollide=false
  3753. scarfp2.Transparency=1
  3754. cf=cf
  3755. euler=euler
  3756. coroutine.resume(coroutine.create(function()
  3757. while true do
  3758. wait(0)
  3759. if dodging==true then
  3760. scarfp2.CFrame = cf(Torso.Position, testpart.Position) *cf(0,0,0)
  3761. scarfp2.CFrame = scarfp2.CFrame + scarfp2.CFrame.lookVector * 0.5
  3762. scarfp2.CFrame = scarfp2.CFrame * cf(0,0,-0.5) * euler(1.57,0,0)
  3763. testpart.CFrame=cf(Torso.Position-Torso.Velocity) *cf(0,-1,0)
  3764. coroutine.resume(coroutine.create(function()
  3765. for i=0,2 do
  3766. Part=it("Part")
  3767. Mesh=it("CylinderMesh")
  3768. Mesh.Parent=Part
  3769. Mesh.Scale=vt(0.3,2,0.3)
  3770. Part.Parent=swordholder
  3771. Part.CanCollide=false
  3772. Part.BrickColor=BrickColor.new("Navy blue")
  3773. Part.Size=vt(1,1,1)
  3774. Part.Transparency=0.2
  3775. Part.Anchored=true
  3776. Part.CFrame=scarfp2.CFrame*cf(math.random(-2,1)+math.random(),math.random(-2,1)+math.random(),math.random(-2,1)+math.random())
  3777. coroutine.resume(coroutine.create(function(derpPart)
  3778. for i=0,1,0.1 do
  3779. wait()
  3780. derpPart.Transparency=derpPart.Transparency+0.05
  3781. end
  3782. derpPart.Parent=nil
  3783. end),Part)
  3784. end
  3785. end))
  3786. end
  3787. end
  3788. end))
  3789. Character.Humanoid.WalkSpeed = 14
  3790. -- mediafire
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement