HandsomelyMario34

Untitled

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