Advertisement
Mito91231

Untitled

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