Advertisement
Mito91231

Untitled

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