Advertisement
aidanthescriptor101

boss

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