Mito91231

Untitled

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