Advertisement
Guest User

wow

a guest
Feb 20th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 34.81 KB | None | 0 0
  1.  
  2. --[[
  3. Archer script made by Fenrier.
  4. Made for an upcoming game I will be making. Don't expect it to be out anytime soon though.
  5. And hello hacker :D
  6. Have fun with my scripts by the way c:
  7. ]]
  8. Player = game:GetService("Players").LocalPlayer
  9. Character = Player.Character
  10. PlayerGui = Player.PlayerGui
  11. Backpack = Player.Backpack
  12. Torso = Character.Torso
  13. Head = Character.Head
  14. Humanoid = Character.Humanoid
  15. LeftArm = Character["Left Arm"]
  16. LeftLeg = Character["Left Leg"]
  17. RightArm = Character["Right Arm"]
  18. RightLeg = Character["Right Leg"]
  19. LS = Torso["Left Shoulder"]
  20. LH = Torso["Left Hip"]
  21. RS = Torso["Right Shoulder"]
  22. RH = Torso["Right Hip"]
  23. Neck = Torso.Neck
  24. it=Instance.new
  25. vt=Vector3.new
  26. cf=CFrame.new
  27. euler=CFrame.fromEulerAnglesXYZ
  28. angles=CFrame.Angles
  29. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  30. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  31. RootPart=Character.HumanoidRootPart
  32. RootJoint=RootPart.RootJoint
  33. RootCF=euler(-1.57,0,3.14)
  34. attack = false
  35. attacktype = 1
  36. damage = 5
  37. oridamage = 30
  38. attackdebounce = false
  39. ssdebounce=false
  40. MMouse=nil
  41. combo=0
  42. --player
  43. player = nil
  44. --save shoulders
  45. RSH, LSH = nil, nil
  46. --welds
  47. RW, LW = Instance.new("Weld"), Instance.new("Weld")
  48. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  49.  
  50.  
  51. if Character:findFirstChild("Crossbow",true) ~= nil then
  52. Character:findFirstChild("Crossbow",true).Parent = nil
  53. end
  54.  
  55.  
  56. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  57. local fp = it("Part")
  58. fp.formFactor = formfactor
  59. fp.Parent = parent
  60. fp.Reflectance = reflectance
  61. fp.Transparency = transparency
  62. fp.CanCollide = false
  63. fp.Locked=true
  64. fp.BrickColor = brickcolor
  65. fp.Name = name
  66. fp.Size = size
  67. fp.Position = Torso.Position
  68. fp.BottomSurface="Smooth"
  69. fp.TopSurface="Smooth"
  70. fp:BreakJoints()
  71. return fp
  72. end
  73.  
  74. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  75. local mesh = it(Mesh)
  76. mesh.Parent = part
  77. if Mesh=="SpecialMesh" then
  78. mesh.MeshType = meshtype
  79. mesh.MeshId = meshid
  80. end
  81. mesh.Offset=offset
  82. mesh.Scale=scale
  83. return mesh
  84. end
  85.  
  86. function weld(parent,part0,part1,c0)
  87. local weld = it("Weld")
  88. weld.Parent = parent
  89. weld.Part0 = part0
  90. weld.Part1 = part1
  91. weld.C0 = c0
  92. return weld
  93. end
  94.  
  95. local modelzorz = Instance.new("Model")
  96. modelzorz.Parent = Character
  97. modelzorz.Name = "Crossbow"
  98.  
  99. local prt1=part(3,modelzorz,0,0,Torso.BrickColor,"Part1",vt(1,1,1))
  100. local prt2=part(3,modelzorz,0,0,BrickColor.new("Institutional white"),"Part2",vt(1,1,1))
  101. local prt3=part(3,modelzorz,0,0,BrickColor.new("Institutional white"),"Part3",vt(1,1,1))
  102. local prt4=part(3,modelzorz,0,0,BrickColor.new("Institutional white"),"Part4",vt(1,1,1))
  103. local prt5=part(3,modelzorz,0,0,BrickColor.new("Cyan"),"Part5",vt(1,1,1))
  104. local prt6=part(3,modelzorz,0,0,BrickColor.new("Cyan"),"Part6",vt(1,1,1))
  105. local prt7=part(3,modelzorz,0,0,BrickColor.new("Cyan"),"Part7",vt(1,1,1))
  106. local prt8=part(3,modelzorz,0,0,BrickColor.new("Cyan"),"Part8",vt(1,1,1))
  107. local prt9=part(3,modelzorz,0,0,BrickColor.new("Cyan"),"Part9",vt(1,1,1))
  108. local prt10=part(3,modelzorz,0,0,BrickColor.new("Institutional white"),"Part10",vt(1,1,1))
  109. local prt11=part(3,modelzorz,0,0,BrickColor.new("Cyan"),"Part11",vt(1,1,1))
  110. local prt12=part(3,modelzorz,0,0,BrickColor.new("Institutional white"),"Part12",vt(1,1,1))
  111. local prt13=part(3,modelzorz,0,0,BrickColor.new("New Yeller"),"Part13",vt(1,1,1))
  112. local prt14=part(3,modelzorz,0,0,BrickColor.new("New Yeller"),"Part14",vt(1,1,1))
  113. local prt15=part(3,modelzorz,0,1,BrickColor.new("New Yeller"),"StringGuide",vt(0.2,0.2,0.2))
  114. local prt16=part(3,modelzorz,0,0.5,BrickColor.new("Toothpaste"),"Part16",vt(1,1,1))
  115. coroutine.resume(coroutine.create(function()
  116. while true do
  117. wait(0)
  118. for i=0.5,0.9,0.01 do
  119. wait()
  120. prt16.Transparency=i
  121. end
  122. for i=0.9,0.5,-0.01 do
  123. wait()
  124. prt16.Transparency=i
  125. end
  126. end
  127. end))
  128.  
  129. local msh1=mesh("BlockMesh",prt1,"","",vt(0,0,0),vt(0.4,0.8,0.4))
  130. local msh2=mesh("BlockMesh",prt2,"","",vt(0,0,0),vt(0.8,0.5,2.5))
  131. local msh3=mesh("BlockMesh",prt3,"","",vt(0,0,0),vt(0.5,0.49,3))
  132. local msh4=mesh("BlockMesh",prt4,"","",vt(0,0,0),vt(0.2,0.21,3))
  133. local msh5=mesh("CylinderMesh",prt5,"","",vt(0,0,0),vt(0.1,2.99,0.1))
  134. local msh6=mesh("CylinderMesh",prt6,"","",vt(0,0,0),vt(0.1,2.99,0.1))
  135. local msh7=mesh("BlockMesh",prt7,"","",vt(0,0,0),vt(0.5,0.5,0.5))
  136. local msh8=mesh("CylinderMesh",prt8,"","",vt(0,0,0),vt(0.13,1,0.13))
  137. local msh9=mesh("CylinderMesh",prt9,"","",vt(0,0,0),vt(0.13,0.8,0.13))
  138. local msh10=mesh("BlockMesh",prt10,"","",vt(0,0,0),vt(0.4,0.1,1))
  139. local msh11=mesh("CylinderMesh",prt11,"","",vt(0,0,0),vt(0.13,0.8,0.13))
  140. local msh12=mesh("BlockMesh",prt12,"","",vt(0,0,0),vt(0.4,0.1,1))
  141. local msh13=mesh("CylinderMesh",prt13,"","",vt(0,0,0),vt(0.1,0.11,0.1))
  142. local msh14=mesh("CylinderMesh",prt14,"","",vt(0,0,0),vt(0.1,0.11,0.1))
  143. local msh16=mesh("SpecialMesh",prt16,"Sphere","",vt(0,0,0),vt(1,1,1))
  144.  
  145. local wld1=weld(prt1,prt1,Torso,euler(0.5+1.57,0,0)*cf(-0.5,-1.5,-1))
  146. local wld2=weld(prt2,prt2,prt1,euler(-0.5,0,0)*cf(0,-0.5,0.2))
  147. local wld3=weld(prt3,prt3,prt2,euler(0,0,0)*cf(0,0,0.8))
  148. local wld4=weld(prt4,prt4,prt3,euler(0,0,0)*cf(0,-0.15,0.3))
  149. local wld5=weld(prt5,prt5,prt4,euler(1.57,0,0)*cf(0.1,-0.1,0))
  150. local wld6=weld(prt6,prt6,prt4,euler(1.57,0,0)*cf(-0.1,-0.1,0))
  151. local wld7=weld(prt7,prt7,prt4,euler(1.57,0,0)*cf(0,0,-1.5))
  152. local wld8=weld(prt8,prt8,prt4,euler(0,0,1.57)*cf(0,-0.05,1.45))
  153. local wld9=weld(prt9,prt9,prt8,euler(0.5,0,0)*cf(0,0.5,0))
  154. local wld10=weld(prt10,prt10,prt9,euler(-0.7,0,0)*cf(0,0.6,-0.25))
  155. local wld11=weld(prt11,prt11,prt8,euler(-0.5,0,0)*cf(0,-0.5,0))
  156. local wld12=weld(prt12,prt12,prt11,euler(0.7,0,0)*cf(0,-0.6,-0.25))
  157. local wld13=weld(prt13,prt13,prt10,euler(0,0,0)*cf(0.08,-0.01,-0.4))
  158. local wld14=weld(prt14,prt14,prt12,euler(0,0,0)*cf(0.08,0.01,-0.4))
  159. local wld15=weld(prt15,prt15,prt2,euler(0,0,-1.57)*cf(0,-0.3,1.65))
  160. local wld16=weld(prt16,prt16,prt7,euler(0,0,0)*cf(0,0,0))
  161.  
  162. local string1=part(3,modelzorz,0,0,BrickColor.new("Toothpaste"),"String1",vt(0.5,1,0.5))
  163. local stringmsh1=mesh("CylinderMesh",string1,"","",vt(0,0,0),vt(0.1,1,0.1))
  164. local stringwld1=weld(string1,string1,prt13,euler(0,0,0)*cf(0,0,0))
  165. local string2=part(3,modelzorz,0,0,BrickColor.new("Toothpaste"),"String1",vt(0.5,1,0.5))
  166. local stringmsh2=mesh("CylinderMesh",string2,"","",vt(0,0,0),vt(0.1,1,0.1))
  167. local stringwld2=weld(string2,string2,prt14,euler(0,0,0)*cf(0,0,0))
  168.  
  169. local strmdl = "Arrow"
  170. coroutine.resume(coroutine.create(function()
  171. repeat
  172. wait(0)
  173. local top = prt13.CFrame
  174. local bottom = prt14.CFrame
  175. local oristrpos
  176. if strmdl == "Bow" then
  177. oristrpos = CFrame.new((top.p+bottom.p)/2)
  178. elseif strmdl == "Arrow" then
  179. oristrpos = prt15.CFrame
  180. end
  181. local mg1 = (top.p - oristrpos.p).magnitude
  182. local mg2 = (bottom.p - oristrpos.p).magnitude
  183. --string1.Size = Vector3.new(0.2,mg1,0.2)
  184. --string1.CFrame = CFrame.new((top.p+oristrpos.p)/2,oristrpos.p) * CFrame.Angles(math.rad(90),0,0)
  185. --stringwld1.C0=CFrame.new((top.p+oristrpos.p)/2,oristrpos.p) * CFrame.Angles(math.rad(90),0,0)
  186. stringmsh1.Scale=vt(0.1,mg1,0.1)
  187. basecf=prt13.CFrame
  188. cff=CFrame.new(prt13.CFrame*angles(1.57,0,0).p,prt15.Position)*angles(math.rad(90),0,0)*cf(0,-mg1/2,0)
  189. hit2=string1
  190. hit=prt15
  191. stringwld1.Parent=string1
  192. stringwld1.Part0=hit2
  193. stringwld1.Part1=hit
  194. HitPos=cff.p
  195. local CJ = CFrame.new(HitPos)
  196. local C0=cff:inverse() *CJ
  197. local C1=hit.CFrame:inverse() * CJ
  198. stringwld1.C0=C0
  199. stringwld1.C1=C1
  200.  
  201. stringmsh2.Scale=vt(0.1,mg2,0.1)
  202. cff2=CFrame.new(prt14.CFrame*angles(1.57,0,0).p,prt15.Position)*angles(math.rad(90),0,0)*cf(0,-mg2/2,0)
  203. hit3=string2
  204. hit2=prt15
  205. stringwld2.Parent=string2
  206. stringwld2.Part0=hit3
  207. stringwld2.Part1=hit2
  208. HitPos2=cff2.p
  209. local CJ2 = CFrame.new(HitPos2)
  210. local C02=cff2:inverse() *CJ
  211. local C12=hit2.CFrame:inverse() * CJ
  212. stringwld2.C0=C02
  213. stringwld2.C1=C12
  214.  
  215. --[[string2.Size = Vector3.new(0.2,mg2,0.2)
  216. string2.CFrame = CFrame.new((bottom.p+oristrpos.p)/2,oristrpos.p) * CFrame.Angles(math.rad(90),0,0)]]
  217. until false
  218. end))
  219.  
  220.  
  221. if (script.Parent.className ~= "HopperBin") then
  222. Tool = Instance.new("HopperBin")
  223. Tool.Parent = Backpack
  224. Tool.Name = "Crossbow"
  225. script.Parent = Tool
  226. end
  227. Bin = script.Parent
  228.  
  229. local bg = it("BodyGyro")
  230. bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  231. bg.P = 20e+003
  232. bg.Parent = nil
  233.  
  234. so = function(id,par,vol,pit)
  235. coroutine.resume(coroutine.create(function()
  236. local sou = Instance.new("Sound",par or workspace)
  237. sou.Volume=vol
  238. sou.Pitch=pit or 1
  239. sou.SoundId=id
  240. wait()
  241. sou:play()
  242. wait(6)
  243. sou:Remove()
  244. end))
  245. end
  246.  
  247. function unequipweld()
  248. wld1.Part1=Torso
  249. wld1.C0=euler(0.5+1.57,0,0)*cf(-0.5,-1.5,-1)
  250. RootJoint.C0=RootCF
  251. end
  252.  
  253. function equipweld()
  254. wld1.Part1=RightArm
  255. wld1.C0=euler(0.5+1.57,0,0)*cf(0,1,0)
  256. RootJoint.C0=RootCF
  257. end
  258.  
  259. function hideanim()
  260. equipped=false
  261. wait(0.1)
  262. bg.Parent=nil
  263. unequipweld()
  264. end
  265.  
  266. function equipanim()
  267. equipped=true
  268. wait(0.1)
  269. equipweld()
  270. RW.C0=cf(1.5, 0.5, 0) * euler(0.8,0,0)
  271. RW.C1=cf(0, 0.5, 0) * euler(0,0.2,-0.2)
  272. LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2)
  273. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  274. end
  275.  
  276. function Melee()
  277. attack=false
  278. SpecialEffect()
  279. for i=0,1,0.1 do
  280. wait()
  281. RW.C0=cf(1.5-0.5*i, 0.5, -0.5*i) * euler(0.8+0.77*i,0,0)
  282. RW.C1=cf(0, 0.5, 0) * euler(0,0.2-1.77*i,-0.2+0.8*i)
  283. end
  284. bg.Parent=Torso
  285. CF = Torso.CFrame
  286. con1=prt2.Touched:connect(function(hit) Damagefunc1(hit,20,20) end)
  287. con2=prt3.Touched:connect(function(hit) Damagefunc1(hit,20,20) end)
  288. so("http://roblox.com/asset/?id=10209640",LeftArm,1,0.8)
  289. for i=0,1,0.1 do
  290. wait()
  291. RW.C0=cf(1.5-0.5+0.5*i, 0.5, -0.5+0.5*i) * euler(1.57,0,0)
  292. RW.C1=cf(0, 0.5, 0) * euler(0,-1.57,0.6-2.17*i)
  293. LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2-1.37*i)
  294. bg.cframe=CF*euler(0,-6.283*i,0)
  295. end
  296. con1:disconnect()
  297. con2:disconnect()
  298. bg.Parent=nil
  299. for i=0,1,0.1 do
  300. wait()
  301. RW.C0=cf(1.5, 0.5, 0) * euler(1.57-0.77*i,0,0)
  302. RW.C1=cf(0, 0.5, 0) * euler(0,-1.57+1.77*i,-1.57+1.37*i)
  303. LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2-1.37+1.37*i)
  304. end
  305. attack=false
  306. end
  307.  
  308. function TripleShot()
  309. attack=false
  310. SpecialEffect()
  311. Humanoid.WalkSpeed=5
  312. holding=true
  313. for i=0,.1,.1 do
  314. wait()
  315. RW.C0=cf(1.5, 0.5, 0) * euler(0.8-0.2*i,0,0)
  316. RW.C1=cf(0, 0.5, 0) * euler(0,0.2,-0.2)
  317. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.6*i,0,-0.2+0.4*i)
  318. LW.C1=cf(0, 0.5, 0) * euler(0,-1.57*i,0)
  319. end
  320. local arrow=part(3,modelzorz,0,0,BrickColor.new("Toothpaste"),"Arrow",vt(1,1,1))
  321. local arrowmsh=mesh("SpecialMesh",arrow,"FileMesh","http://www.roblox.com/asset/?id=15887356",vt(0,0,0),vt(1,1,2))
  322. arrowmsh.VertexColor=vt(1,1,1)
  323. --arrowmsh.TextureId="http://www.roblox.com/asset/?id=15886781"
  324. local arrowwld=weld(arrow,arrow,LeftArm,euler(0,0,0)*cf(0,1,0))
  325. for i=0,1,0.1 do
  326. wait()
  327. Torso.Neck.C0=necko*euler(0.3*i,0,0)
  328. RW.C0=cf(1.5, 0.5, 0) * euler(0.6,0,0)
  329. RW.C1=cf(0, 0.5, 0) * euler(0,0.2-0.2*i,-0.2+0.2*i)
  330. LW.C0=cf(-1.5, 0.5, -0.2*i) * euler(-0.6+1.7*i,0,0.2)
  331. LW.C1=cf(0, 0.5, 0) * euler(0,-1.57+3.14*i,0)
  332. wld1.C0=euler(0.5+1.57,0,1.57*i)*cf(0,1,0)
  333. arrowwld.C0=euler(0,0,1.57*i)*cf(0,1,-1*i)
  334. end
  335. arrowwld.Part1=prt4
  336. arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5)
  337. for i=0,1,0.1 do
  338. wait()
  339. LW.C0=cf(-1.5+0.5*i, 0.5, -0.2-0.3*i) * euler(1.1-0.1*i,0,0.2+0.3*i)
  340. LW.C1=cf(0, 0.5, 0) * euler(0,1.57,0)
  341. arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5-1.5*i)
  342. wld15.C0=euler(0,0,-1.57)*cf(0,-0.3,1.65-2*i)
  343. end
  344. coroutine.resume(coroutine.create(function()
  345. wait()
  346. while holding==true do
  347. wait(0)
  348. bg.Parent = RootPart
  349. local pos4 = vt(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  350. bg.cframe = cf(RootPart.Position,pos4) * euler(0,0,0) * cf(0,0,0)
  351. end
  352. bg.Parent=nil
  353. end))
  354. for i=0,1,0.1 do
  355. wait()
  356. Torso.Neck.C0=necko*euler(0.3-0.3*i,0,-1.57*i)
  357. RootJoint.C0=RootCF*euler(0,0,1.57*i)
  358. RW.C0=cf(1.5, 0.5, 0) * euler(0.6-0.6*i,0,1.57*i)
  359. RW.C1=cf(0, 0.5, 0) * euler(0,1.57*i,0)
  360. LW.C0=cf(-1.5+0.5-0.5*i, 0.5, -0.5+0.5*i) * euler(1-1*i,0,0.5-0.7*i)
  361. LW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.57*i,0)
  362. wld1.C0=euler(0.5+1.57,0,1.57-1.57*i)*cf(0,1,0)
  363. end
  364. wait(0.2)
  365. arrowfft=arrow:Clone()
  366. arrowfft.Parent=arrow.Parent
  367. arrowfft.CFrame=arrow.CFrame
  368. arrowfft.Anchored=true
  369. fftmsh=arrowfft.Mesh
  370. coroutine.resume(coroutine.create(function(Arrow,Mesh)
  371. for i=0,1,0.1 do
  372. wait()
  373. Arrow.Transparency=i
  374. Mesh.Scale=Mesh.Scale+vt(0.5,0.5,0.5)
  375. end
  376. Arrow.Parent=nil
  377. end),arrowfft,fftmsh)
  378. for i=1,3 do
  379. spread=1
  380. so("http://www.roblox.com/asset/?id=16211041",prt8,1,1)
  381. shoottrail(mouse,prt8)
  382. end
  383. spread=0
  384. arrow.Parent=nil
  385. wld15.C0=euler(0,0,-1.57)*cf(0,-0.3,1.65)
  386. for i=0,.1,.1 do
  387. wait()
  388. Torso.Neck.C0=necko*euler(0,0.2*i,-1.57)
  389. RW.C0=cf(1.5, 0.5, 0) * euler(0,0,1.57+0.2*i)
  390. end
  391. for i=0,.1,.1 do
  392. wait()
  393. Torso.Neck.C0=necko*euler(0,0.2+0.1*i,-1.57)
  394. RW.C0=cf(1.5, 0.5, 0) * euler(0,0,1.57+0.2+0.1*i)
  395. end
  396. Humanoid.WalkSpeed=16
  397. holding=false
  398. for i=0,1,0.1 do
  399. wait()
  400. Torso.Neck.C0=necko*euler(0,0.3-0.3*i,-1.57+1.57*i)
  401. RootJoint.C0=RootCF*euler(0,0,1.57-1.57*i)
  402. RW.C0=cf(1.5, 0.5, 0) * euler(0.8*i,0,1.87-1.87*i)
  403. RW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.37*i,-0.2*i)
  404. end
  405. attack=false
  406. end
  407.  
  408. function SpiritArrows()
  409. attack=false
  410. SpecialEffect()
  411. Humanoid.WalkSpeed=16
  412. holding=true
  413. spread=0
  414. for i=0,.1,.1 do
  415. wait()
  416. RW.C0=cf(1.5, 0.5, 0) * euler(0.8-0.2*i,0,0)
  417. RW.C1=cf(0, 0.5, 0) * euler(0,0.2,-0.2)
  418. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.6*i,0,-0.2+0.4*i)
  419. LW.C1=cf(0, 0.5, 0) * euler(0,-1.57*i,0)
  420. end
  421. local arrow=part(3,modelzorz,0.5,0,BrickColor.new("Toothpaste"),"Arrow",vt(1,1,1))
  422. local arrowmsh=mesh("SpecialMesh",arrow,"FileMesh","http://www.roblox.com/asset/?id=15887356",vt(0,0,0),vt(1,1,2))
  423. arrowmsh.VertexColor=vt(1,1,1)
  424. --arrowmsh.TextureId="http://www.roblox.com/asset/?id=15886781"
  425. local arrowwld=weld(arrow,arrow,LeftArm,euler(0,0,0)*cf(0,1,0))
  426. for i=0,1,0.1 do
  427. wait()
  428. Torso.Neck.C0=necko*euler(0.3*i,0,0)
  429. RW.C0=cf(1.5, 0.5, 0) * euler(0.6,0,0)
  430. RW.C1=cf(0, 0.5, 0) * euler(0,0.2-0.2*i,-0.2+0.2*i)
  431. LW.C0=cf(-1.5, 0.5, -0.2*i) * euler(-0.6+1.7*i,0,0.2)
  432. LW.C1=cf(0, 0.5, 0) * euler(0,-1.57+3.14*i,0)
  433. wld1.C0=euler(0.5+1.57,0,1.57*i)*cf(0,1,0)
  434. arrowwld.C0=euler(0,0,1.57*i)*cf(0,1,-1*i)
  435. end
  436. arrowwld.Part1=prt4
  437. arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5)
  438. for i=0,1,0.1 do
  439. wait()
  440. LW.C0=cf(-1.5+0.5*i, 0.5, -0.2-0.3*i) * euler(1.1-0.1*i,0,0.2+0.3*i)
  441. LW.C1=cf(0, 0.5, 0) * euler(0,1.57,0)
  442. arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5-1.5*i)
  443. wld15.C0=euler(0,0,-1.57)*cf(0,-0.3,1.65-2*i)
  444. end
  445. coroutine.resume(coroutine.create(function()
  446. wait()
  447. while holding==true do
  448. wait(0)
  449. bg.Parent = RootPart
  450. local pos4 = vt(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  451. bg.cframe = cf(RootPart.Position,pos4) * euler(0,0,0) * cf(0,0,0)
  452. end
  453. bg.Parent=nil
  454. end))
  455. for i=0,1,0.1 do
  456. wait()
  457. Torso.Neck.C0=necko*euler(0.3-0.3*i,0,-1.57*i)
  458. RootJoint.C0=RootCF*euler(0,0,1.57*i)
  459. RW.C0=cf(1.5, 0.5, 0) * euler(0.6-0.6*i,0,1.57*i)
  460. RW.C1=cf(0, 0.5, 0) * euler(0,1.57*i,0)
  461. LW.C0=cf(-1.5+0.5-0.5*i, 0.5, -0.5+0.5*i) * euler(1-1*i,0,0.5-0.7*i)
  462. LW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.57*i,0)
  463. wld1.C0=euler(0.5+1.57,0,1.57-1.57*i)*cf(0,1,0)
  464. end
  465. arrowlimit=0
  466. makearrow=false
  467. while holding==true do
  468. wait(0)
  469. coroutine.resume(coroutine.create(function()
  470. if makearrow==false then
  471. makearrow=true
  472. if arrowlimit<=1000 then
  473. arrowlimit=arrowlimit+1
  474. local arrowclone=part(3,modelzorz,0.5,1,BrickColor.new("Toothpaste"),"Arrow",vt(1,1,1))
  475. local arrowmshclone=mesh("SpecialMesh",arrowclone,"FileMesh","http://www.roblox.com/asset/?id=15887356",vt(0,0,0),vt(1,1,2))
  476. arrowmsh.VertexColor=vt(1,1,1)
  477. local arrowwldclone=weld(arrowclone,arrowclone,arrow,euler(0,0,3.14)*cf(math.random(-8,8),math.random(-3,3),math.random(-8,8)))
  478. coroutine.resume(coroutine.create(function(Arrow)
  479. for i=1,0.3,-0.05 do
  480. wait()
  481. Arrow.Transparency=i
  482. end
  483. while holding==true do
  484. wait()
  485. end
  486. Arrow.Anchored=true
  487. if Arrow:findFirstChild("Weld")~=nil then
  488. Arrow.Weld.Parent=nil
  489. end
  490. wait(math.random()-math.random())
  491. so("http://www.roblox.com/asset/?id=16211041",Arrow,1,1)
  492. shoottrail(mouse,Arrow)
  493. Arrow.Parent=nil
  494. end),arrowclone)
  495. end
  496. wait(math.random())
  497. makearrow=false
  498. end
  499. end))
  500. end
  501. arrowfft=arrow:Clone()
  502. arrowfft.Parent=arrow.Parent
  503. arrowfft.CFrame=arrow.CFrame
  504. arrowfft.Anchored=true
  505. fftmsh=arrowfft.Mesh
  506. coroutine.resume(coroutine.create(function(Arrow,Mesh)
  507. for i=0,1,0.1 do
  508. wait()
  509. Arrow.Transparency=i
  510. Mesh.Scale=Mesh.Scale+vt(0.2,0.2,0.2)
  511. end
  512. Arrow.Parent=nil
  513. end),arrowfft,fftmsh)
  514. so("http://www.roblox.com/asset/?id=16211041",prt8,1,1)
  515. shoottrail(mouse,prt8)
  516. arrow.Parent=nil
  517. wld15.C0=euler(0,0,-1.57)*cf(0,-0.3,1.65)
  518. for i=0,.1,.1 do
  519. wait()
  520. Torso.Neck.C0=necko*euler(0,0.2*i,-1.57)
  521. RW.C0=cf(1.5, 0.5, 0) * euler(0,0,1.57+0.2*i)
  522. end
  523. for i=0,.1,.1 do
  524. wait()
  525. Torso.Neck.C0=necko*euler(0,0.2+0.1*i,-1.57)
  526. RW.C0=cf(1.5, 0.5, 0) * euler(0,0,1.57+0.2+0.1*i)
  527. end
  528. Humanoid.WalkSpeed=16
  529. for i=0,1,0.1 do
  530. wait()
  531. Torso.Neck.C0=necko*euler(0,0.3-0.3*i,-1.57+1.57*i)
  532. RootJoint.C0=RootCF*euler(0,0,1.57-1.57*i)
  533. RW.C0=cf(1.5, 0.5, 0) * euler(0.8*i,0,1.87-1.87*i)
  534. RW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.37*i,-0.2*i)
  535. end
  536. spread=0
  537. attack=false
  538. end
  539.  
  540. function Decimate()
  541. attack=false
  542. Humanoid.WalkSpeed=16
  543. print("Archer SS initiated.")
  544. SpecialEffect()
  545. prt16.Parent=nil
  546. holding=true
  547. coroutine.resume(coroutine.create(function()
  548. wait()
  549. while holding==true do
  550. wait(0)
  551. bg.Parent = RootPart
  552. local pos4 = vt(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  553. bg.cframe = cf(RootPart.Position,pos4) * euler(0,0,0) * cf(0,0,0)
  554. end
  555. bg.Parent=nil
  556. end))
  557. so("http://roblox.com/asset/?id=2101144",arrow,1,1)
  558. local arrow=part(3,modelzorz,0,1,BrickColor.new("Toothpaste"),"Arrow",vt(1,1,1))
  559. local arrowmsh=mesh("SpecialMesh",arrow,"FileMesh","http://www.roblox.com/asset/?id=15887356",vt(0,0,0),vt(2,2,4))
  560. local arrowwld=weld(arrow,arrow,LeftArm,euler(-1.57,0,0)*cf(0,2,0))
  561. for i=0,1,0.1 do
  562. wait()
  563. arrow.Transparency=arrow.Transparency-0.05
  564. arrowwld.C0=euler(-1.57+0.2*i,0,0)*cf(-0.5*i,2,-0.5*i)
  565. Torso.Neck.C0=necko*euler(0,0.3*i,-1.57*i)
  566. RootJoint.C0=RootCF*euler(0,0,1.57*i)
  567. RW.C0=cf(1.5, 0.5, -0.5*i) * euler(0.8+2.2*i,0,0)
  568. RW.C1=cf(0, 0.5, 0) * euler(0,0.2-1.77*i,-0.2+0.2*i)
  569. LW.C0=cf(-1.5+1.8*i, 0.5+2*i, -0.5*i) * euler(3.1*i,0,-0.2+0.6*i)
  570. LW.C1=cf(0, 0.5, 0) * euler(0,1.57*i,0)
  571. end
  572. arrowwld.Part1=prt4
  573. arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5)
  574. for i=0,1,0.05 do
  575. wait()
  576. Torso.Neck.C0=necko*euler(0,0.3-0.1*i,-1.57)
  577. LW.C0=cf(-1.5+1.8, 2.5-1.5*i, -0.5) * euler(3.1,0,0.4)
  578. arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5-1*i)
  579. wld15.C0=euler(0,0,-1.57)*cf(0,-0.3,1.65-4*i)
  580. end
  581. for i=0,1,0.05 do
  582. wait()
  583. Torso.Neck.C0=necko*euler(0,0.2-0.2*i,-1.57)
  584. RW.C0=cf(1.5, 0.5, -0.5) * euler(3+0.14*i,0,0)
  585. RW.C1=cf(0, 0.5, 0) * euler(0,-1.57,-1.57*i)
  586. LW.C0=cf(-1.5+1.8, 1, -0.5) * euler(3.1,0,0.4+1.17*i)
  587. LW.C1=cf(0, 0.5, 0) * euler(0,1.57,0)
  588. end
  589. while holding==true do
  590. wait()
  591. end
  592. so("http://www.roblox.com/asset/?id=16211041",prt8,1,1)
  593. SSshoottrail(mouse,prt8)
  594. arrow.Parent=nil
  595. Humanoid.WalkSpeed=16
  596. for i=0,.1,.1 do
  597. wait()
  598. Torso.Neck.C0=necko*euler(0,0.3*i,-1.57)
  599. RW.C0=cf(1.5, 0.5, -0.5) * euler(3.24,0,0)
  600. RW.C1=cf(0, 0.5, 0) * euler(0,-1.57,-1.57+1*i)
  601. LW.C0=cf(-1.5+1.8, 1, -0.5) * euler(3.1,0,1.57-1*i)
  602. LW.C1=cf(0, 0.5, 0) * euler(0,1.57,0)
  603. wld15.C0=euler(0,0,-1.57)*cf(0,-0.3,1.65)
  604. end
  605. for i=0,1,0.1 do
  606. wait()
  607. Torso.Neck.C0=necko*euler(0,0.3+0.1*i,-1.57)
  608. RW.C0=cf(1.5, 0.5, -0.5) * euler(3.24,0,0)
  609. RW.C1=cf(0, 0.5, 0) * euler(0,-1.57,-1.57+1+0.1*i)
  610. LW.C0=cf(-1.5+1.8, 1, -0.5) * euler(3.1,0,1.57-1-0.1*i)
  611. LW.C1=cf(0, 0.5, 0) * euler(0,1.57,0)
  612. wld15.C0=euler(0,0,-1.57)*cf(0,-0.3,1.65)
  613. end
  614. for i=0,1,0.05 do
  615. wait()
  616. Torso.Neck.C0=necko*euler(0,0.4-0.4*i,-1.57+1.57*i)
  617. RootJoint.C0=RootCF*euler(0,0,1.57-1.57*i)
  618. RW.C0=cf(1.5, 0.5, -0.5+0.5*i) * euler(3.24-2.44*i,0,0)
  619. RW.C1=cf(0, 0.5, 0) * euler(0,-1.57+1.77*i,-0.47+0.27*i)
  620. LW.C0=cf(-1.5+1.8-1.8*i, 1-0.5*i, -0.5+0.5*i) * euler(3.1-3.1*i,0,0.47-0.67*i)
  621. LW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.57*i,0)
  622. end
  623. attack=false
  624. end
  625.  
  626. function MagicCircle(brickcolor,cframe,x1,y1,z1,x2,y2,z2,x3,y3,z3)
  627. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  628. prt.Anchored=true
  629. prt.CFrame=cframe*cf(x2,y2,z2)
  630. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  631. coroutine.resume(coroutine.create(function()
  632. for i=0,1,0.1 do
  633. wait()
  634. prt.CFrame=prt.CFrame
  635. prt.Transparency=i
  636. msh.Scale=msh.Scale+vt(x3,y3,z3)
  637. end
  638. prt.Parent=nil
  639. end))
  640. end
  641.  
  642. function SpecialEffect()
  643. local prt=part(3,workspace,1,0,BrickColor.new("Toothpaste"),"Part",vt(1,1,1))
  644. prt.Anchored=true
  645. prt.CFrame=Torso.CFrame
  646. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5))
  647. coroutine.resume(coroutine.create(function(Part,Mesh)
  648. for i=0,.1,.1 do
  649. wait(0)
  650. Part.Transparency=i
  651. Mesh.Scale=Mesh.Scale+vt(10,10,10)
  652. end
  653. prt.Parent=nil
  654. end),prt,msh)
  655. end
  656.  
  657. Damagefunc1=function(hit,Damage,Knockback)
  658. if hit.Parent==nil then
  659. return
  660. end
  661. CPlayer=Bin
  662. h=hit.Parent:FindFirstChild("Humanoid")
  663. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  664. if attackdebounce == false then
  665. attackdebounce = true
  666. coroutine.resume(coroutine.create(function()
  667. wait(0.2)
  668. attackdebounce = false
  669. end))
  670. Damage=Damage
  671. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  672. return
  673. end]]
  674. -- hs(hit,1.2)
  675. c=Instance.new("ObjectValue")
  676. c.Name="creator"
  677. c.Value=game.Players.LocalPlayer
  678. c.Parent=h
  679. game:GetService("Debris"):AddItem(c,.5)
  680. Damage=Damage+math.random(0,10)
  681. -- h:TakeDamage(Damage)
  682. h.Health=h.Health-Damage
  683.  
  684. showDamage(hit.Parent,Damage,.5)
  685. vp=Instance.new("BodyVelocity")
  686. vp.P=500
  687. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  688. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  689. vp.velocity=Head.CFrame.lookVector*Knockback+Head.Velocity/1.05
  690. if Knockback>0 then
  691. vp.Parent=hit.Parent.Torso
  692. end
  693. rl=Instance.new("BodyAngularVelocity")
  694. rl.P=3000
  695. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  696. rl.angularvelocity=Vector3.new(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  697. -- rl.Parent=hit
  698. coroutine.resume(coroutine.create(function(vel)
  699. wait(1)
  700. vel:Remove()
  701. end),rl)
  702. game:GetService("Debris"):AddItem(vp,.25)
  703. game:GetService("Debris"):AddItem(r,.5)
  704. c=Instance.new("ObjectValue")
  705. c.Name="creator"
  706. c.Value=Player
  707. c.Parent=h
  708. game:GetService("Debris"):AddItem(c,.5)
  709. CRIT=false
  710. hitDeb=true
  711. AttackPos=6
  712. end
  713. end
  714. end
  715.  
  716. Damagefunc2=function(hit,Damage,Knockback)
  717. if hit.Parent==nil then
  718. return
  719. end
  720. CPlayer=Bin
  721. blocked=false
  722. h=hit.Parent:FindFirstChild("Humanoid")
  723. if h~=nil and hit.Parent:FindFirstChild("Torso")~=nil then
  724. Damage=Damage
  725. c=it("ObjectValue")
  726. c.Name="creator"
  727. c.Value=game.Players.LocalPlayer
  728. c.Parent=h
  729. game:GetService("Debris"):AddItem(c,.5)
  730. -- print(c.Value)
  731. --[[ if math.random(0,99)+math.random()<=7.8 then
  732. CRIT=true
  733. Damage=Damage*2
  734. s=it("Sound")
  735. s.SoundId="http://www.roblox.com/asset/?id=2801263"
  736. s.Volume=1
  737. s.Pitch=2
  738. s.Parent=hit
  739. s.PlayOnRemove=true
  740. s.Parent=nil
  741.  
  742. end]]
  743. Damage=Damage+math.random(0,10)
  744. -- Blood(hit.CFrame*cf(math.random(-10,10)/10,math.random(-10,10)/10,0),math.floor(Damage/2))
  745. block=hit.Parent:findFirstChild("Block")
  746. if block~=nil then
  747. print("herp")
  748. if block.Value>0 then
  749. blocked=true
  750. block.Value=block.Value-3
  751. print(block.Value)
  752. end
  753. end
  754. if blocked==false then
  755. -- h:TakeDamage(Damage)
  756. h.Health=h.Health-Damage
  757.  
  758. showDamage(hit.Parent,Damage,.5)
  759. else
  760. h.Health=h.Health-1
  761.  
  762. showDamage(hit.Parent,1,.5)
  763. end
  764. --if blocked==false then
  765. --end
  766. local bodyVelocity=Instance.new("BodyVelocity")
  767. bodyVelocity.velocity=angle*40+Vector3.new(0,0,0)
  768. bodyVelocity.P=5000
  769. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  770. bodyVelocity.Parent=hit
  771. coroutine.resume(coroutine.create(function(Vel)
  772. wait(1)
  773. Vel:Remove()
  774. end),bodyVelocity)
  775. game:GetService("Debris"):AddItem(vp,1)
  776. c=it("ObjectValue")
  777. c.Name="creator"
  778. c.Value=Player
  779. c.Parent=h
  780. game:GetService("Debris"):AddItem(c,.5)
  781. CRIT=false
  782. hitDeb=true
  783. AttackPos=6
  784. end
  785. end
  786.  
  787. showDamage=function(Char,Dealt,du)
  788. m=Instance.new("Model")
  789. m.Name=tostring(Dealt)
  790. h=Instance.new("Humanoid")
  791. h.Health=0
  792. h.MaxHealth=0
  793. h.Parent=m
  794. c=Instance.new("Part")
  795. c.Transparency=0
  796. c.BrickColor=BrickColor:Red()
  797. if CRIT==true then
  798. c.BrickColor=BrickColor.new("Really red")
  799. end
  800. c.Name="Head"
  801. c.TopSurface=0
  802. c.BottomSurface=0
  803. c.formFactor="Plate"
  804. c.Size=Vector3.new(1,.4,1)
  805. ms=Instance.new("CylinderMesh")
  806. ms.Scale=Vector3.new(.8,.8,.8)
  807. if CRIT==true then
  808. ms.Scale=Vector3.new(1,1.25,1)
  809. end
  810. ms.Parent=c
  811. c.Reflectance=0
  812. Instance.new("BodyGyro").Parent=c
  813. c.Parent=m
  814. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  815. f=Instance.new("BodyPosition")
  816. f.P=2000
  817. f.D=100
  818. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  819. f.position=c.Position+Vector3.new(0,3,0)
  820. f.Parent=c
  821. game:GetService("Debris"):AddItem(m,.5+du)
  822. c.CanCollide=false
  823. m.Parent=workspace
  824. c.CanCollide=false
  825. end
  826.  
  827. local function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  828. return game.Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  829. end
  830.  
  831. spread=0
  832. range=500
  833. rangepower=50
  834. function shoottrail(mouse,baseprt)
  835. coroutine.resume(coroutine.create(function(v)
  836. local spreadvector = (Vector3.new(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread))) * (baseprt.Position-MMouse.Hit.p).magnitude/100
  837. local dir = CFrame.new((baseprt.Position+MMouse.Hit.p)/2,MMouse.Hit.p+spreadvector)
  838. local hit,pos = rayCast(baseprt.Position,dir.lookVector,10,Character)
  839. local rangepos = range
  840. local function drawtrail(From,To)
  841. local effectsmsh = Instance.new("CylinderMesh")
  842. effectsmsh.Scale = Vector3.new(1,1,1)
  843. effectsmsh.Name = "Mesh"
  844. local effectsg = Instance.new("Part")
  845. effectsg.formFactor = 3
  846. effectsg.CanCollide = false
  847. effectsg.Name = "Eff"
  848. effectsg.Locked = true
  849. effectsg.Anchored = true
  850. effectsg.Size = Vector3.new(0.2,0.2,0.2)
  851. effectsg.Parent = modelzorz
  852. effectsmsh.Parent = effectsg
  853. effectsg.BrickColor = BrickColor.new("Toothpaste")
  854. effectsg.Reflectance = 0.25
  855. local LP = From
  856. local point1 = To
  857. local mg = (LP - point1).magnitude
  858. effectsmsh.Scale = Vector3.new(1.5,mg*5,1.5)
  859. effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
  860. coroutine.resume(coroutine.create(function()
  861. for i = 0 , 1 , 0.1 do
  862. wait()
  863. effectsg.Transparency = 1*i
  864. effectsmsh.Scale = Vector3.new(1-1*i,mg*5,1-1*i)
  865. end
  866. effectsg.Parent = nil
  867. end))
  868. end
  869. local newpos = baseprt.Position
  870. local inc = rangepower
  871. repeat
  872. wait() wait()
  873. rangepos = rangepos - 10
  874. dir = dir * CFrame.Angles(math.rad(-1),0,0)
  875. hit,pos = rayCast(newpos,dir.lookVector,inc,Character)
  876. drawtrail(newpos,pos)
  877. newpos = newpos + (dir.lookVector * inc)
  878. if inc >= 20 then
  879. inc = inc - 10
  880. end
  881. if hit ~= nil then
  882. rangepos = 0
  883. end
  884. until rangepos <= 0
  885. if hit ~= nil then
  886. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  887. hum = hit.Parent.Humanoid
  888. tTorso=hit.Parent.Torso
  889. Damagefunc2(hit,10,30)
  890. --ADmg(hum,hit)
  891. elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  892. hum = hit.Parent.Parent.Humanoid
  893. tTorso=hit.Parent.Parent.Torso
  894. Damagefunc2(hit.Parent.Parent.Torso,10,30)
  895. --ADmg(hum,hit)
  896. end
  897. end
  898. end))
  899. end
  900.  
  901. function SSshoottrail(mouse,baseprt)
  902. coroutine.resume(coroutine.create(function(v)
  903. local spreadvector = (Vector3.new(0,0,0)) * (baseprt.Position-MMouse.Hit.p).magnitude/100
  904. local dir = CFrame.new((baseprt.Position+MMouse.Hit.p)/2,MMouse.Hit.p+spreadvector)
  905. local hit,pos = rayCast(baseprt.Position,dir.lookVector,10,Character)
  906. local rangepos = range
  907. local function drawtrail(From,To)
  908. local effectsmsh = Instance.new("CylinderMesh")
  909. effectsmsh.Scale = Vector3.new(1,1,1)
  910. effectsmsh.Name = "Mesh"
  911. local effectsg = Instance.new("Part")
  912. effectsg.formFactor = 3
  913. effectsg.CanCollide = false
  914. effectsg.Name = "Eff"
  915. effectsg.Locked = true
  916. effectsg.Anchored = true
  917. effectsg.Size = Vector3.new(0.2,0.2,0.2)
  918. effectsg.Parent = modelzorz
  919. effectsmsh.Parent = effectsg
  920. effectsg.BrickColor = BrickColor.new("Toothpaste")
  921. --effectsg.Reflectance = 0.25
  922. effectsg.Transparency=0.5
  923. local LP = From
  924. local point1 = To
  925. local mg = (LP - point1).magnitude
  926. effectsmsh.Scale = Vector3.new(2.5,mg*5,2.5)
  927. effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
  928. coroutine.resume(coroutine.create(function()
  929. for i = 0 , 1 , 0.1 do
  930. wait()
  931. --effectsg.Transparency = 1*i
  932. effectsmsh.Scale = Vector3.new(2.5-2.5*i,mg*5,2.5-2.5*i)
  933. end
  934. effectsg.Parent = nil
  935. end))
  936. end
  937. local newpos = baseprt.Position
  938. local inc = rangepower-30
  939. repeat
  940. wait() wait()
  941. rangepos = rangepos - 5
  942. hit,pos = rayCast(newpos,dir.lookVector,inc,Character)
  943. drawtrail(newpos,pos)
  944. --newpos = newpos + (dir.lookVector * inc)
  945. local list = game.Workspace:children()
  946. local torso = nil
  947. local dist = 100
  948. local temp = nil
  949. local human = nil
  950. local temp2 = nil
  951. for x = 1, #list do
  952. temp2 = list[x]
  953. if (temp2.className == "Model") and (temp2.Name~=Character.Name) then
  954. temp = temp2:findFirstChild("Torso")
  955. human = temp2:findFirstChild("Humanoid")
  956. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  957. if (temp.Position - pos).magnitude < dist then
  958. torso = temp
  959. dist = (temp.Position - pos).magnitude
  960. end
  961. end
  962. end
  963. end
  964. newpos = newpos + (dir.lookVector * inc)
  965. if torso~=nil then
  966. spreadvector = (Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5)))
  967. dir=CFrame.new(pos,torso.Position+spreadvector)
  968. end
  969. if hit ~= nil then
  970. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  971. MagicCircle(BrickColor.new("Toothpaste"),CFrame.new(pos),5,5,5,0,0,0,10,10,10)
  972. hum = hit.Parent.Humanoid
  973. tTorso=hit.Parent.Torso
  974. Damagefunc1(hit,10,0)
  975. --ADmg(hum,hit)
  976. elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  977. MagicCircle(BrickColor.new("Toothpaste"),CFrame.new(pos),5,5,5,0,0,0,10,10,10)
  978. hum = hit.Parent.Parent.Humanoid
  979. tTorso=hit.Parent.Parent.Torso
  980. Damagefunc1(hit.Parent.Parent.Torso,10,0)
  981. --ADmg(hum,hit)
  982. end
  983. end
  984. until rangepos <= 0
  985. end))
  986. end
  987.  
  988. function findNearestTorso(pos)
  989. local list = game.Workspace:children()
  990. local torso = nil
  991. local dist = distance
  992. local temp = nil
  993. local human = nil
  994. local temp2 = nil
  995. for x = 1, #list do
  996. temp2 = list[x]
  997. if (temp2.className == "Model") and (temp2 ~= Character) then
  998. temp = temp2:findFirstChild("Torso")
  999. human = temp2:findFirstChild("Humanoid")
  1000. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  1001. if (temp.Position - pos).magnitude < dist then
  1002. torso = temp
  1003. dist = (temp.Position - pos).magnitude
  1004. end
  1005. end
  1006. end
  1007. end
  1008. return torso
  1009. end
  1010.  
  1011. function ArrowIn()
  1012. attack=false
  1013. Humanoid.WalkSpeed=10
  1014. for i=0,.1,.1 do
  1015. wait()
  1016. RW.C0=cf(1.5, 0.5, 0) * euler(0.8-0.2*i,0,0)
  1017. RW.C1=cf(0, 0.5, 0) * euler(0,0.2,-0.2)
  1018. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.6*i,0,-0.2+0.4*i)
  1019. LW.C1=cf(0, 0.5, 0) * euler(0,-1.57*i,0)
  1020. end
  1021. local arrow=part(3,modelzorz,0,0,BrickColor.new("Toothpaste"),"Arrow",vt(1,1,1))
  1022. local arrowmsh=mesh("SpecialMesh",arrow,"FileMesh","http://www.roblox.com/asset/?id=15887356",vt(0,0,0),vt(1,1,2))
  1023. arrowmsh.TextureId="http://www.roblox.com/asset/?id=15886781"
  1024. local arrowwld=weld(arrow,arrow,LeftArm,euler(0,0,0)*cf(0,1,0))
  1025. for i=0,.1,.1 do
  1026. wait()
  1027. Torso.Neck.C0=necko*euler(0.3*i,0,0)
  1028. RW.C0=cf(1.5, 0.5, 0) * euler(0.6,0,0)
  1029. RW.C1=cf(0, 0.5, 0) * euler(0,0.2-0.2*i,-0.2+0.2*i)
  1030. LW.C0=cf(-1.5, 0.5, -0.2*i) * euler(-0.6+1.7*i,0,0.2)
  1031. LW.C1=cf(0, 0.5, 0) * euler(0,-1.57+3.14*i,0)
  1032. wld1.C0=euler(0.5+1.57,0,1.57*i)*cf(0,1,0)
  1033. arrowwld.C0=euler(0,0,1.57*i)*cf(0,1,-1*i)
  1034. end
  1035. arrowwld.Part1=prt4
  1036. arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5)
  1037. for i=0,.1,.1 do
  1038. wait()
  1039. LW.C0=cf(-1.5+0.5*i, 0.5, -0.2-0.3*i) * euler(1.1-0.1*i,0,0.2+0.3*i)
  1040. LW.C1=cf(0, 0.5, 0) * euler(0,1.57,0)
  1041. arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5-1.5*i)
  1042. wld15.C0=euler(0,0,-1.57)*cf(0,-0.3,1.65-2*i)
  1043. end
  1044. coroutine.resume(coroutine.create(function()
  1045. wait()
  1046. while attack==true do
  1047. wait(0)
  1048. bg.Parent = RootPart
  1049. local pos4 = vt(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  1050. bg.cframe = cf(RootPart.Position,pos4) * euler(0,0,0) * cf(0,0,0)
  1051. end
  1052. bg.Parent=nil
  1053. end))
  1054. for i=0,.1,.1 do
  1055. wait()
  1056. Torso.Neck.C0=necko*euler(0.3-0.3*i,0,-1.57*i)
  1057. RootJoint.C0=RootCF*euler(0,0,1.57*i)
  1058. RW.C0=cf(1.5, 0.5, 0) * euler(0.6-0.6*i,0,1.57*i)
  1059. RW.C1=cf(0, 0.5, 0) * euler(0,1.57*i,0)
  1060. LW.C0=cf(-1.5+0.5-0.5*i, 0.5, -0.5+0.5*i) * euler(1-1*i,0,0.5-0.7*i)
  1061. LW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.57*i,0)
  1062. wld1.C0=euler(0.5+1.57,0,1.57-1.57*i)*cf(0,1,0)
  1063. end
  1064. while hold==true do
  1065. wait(0)
  1066. end
  1067. so("http://www.roblox.com/asset/?id=16211041",prt8,1,1)
  1068. arrow.Parent=nil
  1069. shoottrail(mouse,prt8)
  1070. wld15.C0=euler(0,0,-1.57)*cf(0,-0.3,1.65)
  1071. for i=0,.1,.1 do
  1072. wait()
  1073. Torso.Neck.C0=necko*euler(0,0.2*i,-1.57)
  1074. RW.C0=cf(1.5, 0.5, 0) * euler(0,0,1.57+0.2*i)
  1075. end
  1076. for i=0,.1,.1 do
  1077. wait()
  1078. Torso.Neck.C0=necko*euler(0,0.2+0.1*i,-1.57)
  1079. RW.C0=cf(1.5, 0.5, 0) * euler(0,0,1.57+0.2+0.1*i)
  1080. end
  1081. attack=false
  1082. end
  1083.  
  1084. function ob1d(mouse)
  1085. if attack == true then return end
  1086. hold=true
  1087. ArrowIn()
  1088. end
  1089.  
  1090. function ob1u(mouse)
  1091. hold = false
  1092. repeat wait() until attack==false
  1093. Humanoid.WalkSpeed=16
  1094. for i=0,1,0.1 do
  1095. wait()
  1096. Torso.Neck.C0=necko*euler(0,0.3-0.3*i,-1.57+1.57*i)
  1097. RootJoint.C0=RootCF*euler(0,0,1.57-1.57*i)
  1098. RW.C0=cf(1.5, 0.5, 0) * euler(0.8*i,0,1.87-1.87*i)
  1099. RW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.37*i,-0.2*i)
  1100. end
  1101. Torso.Neck.C0=necko
  1102. wld1.C0=euler(0.5+1.57,0,0)*cf(0,1,0)
  1103. wld15.C0=euler(0,0,-1.57)*cf(0,-0.3,1.65)
  1104. RW.C0=cf(1.5, 0.5, 0) * euler(0.8,0,0)
  1105. RW.C1=cf(0, 0.5, 0) * euler(0,0.2,-0.2)
  1106. LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2)
  1107. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  1108. end
  1109.  
  1110. buttonhold = false
  1111.  
  1112. eul=0
  1113. function key(key)
  1114. if attack == true then return end
  1115. if key=="z" then
  1116. Melee()
  1117. end
  1118. if key=="x" then
  1119. TripleShot()
  1120. end
  1121. if key=="c" then
  1122. SpiritArrows()
  1123. end
  1124. if key=="v" then
  1125. ssdebounce=true
  1126. coroutine.resume(coroutine.create(function()
  1127. wait(80)
  1128. ssdebounce=false
  1129. prt16.Parent=modelzorz
  1130. wld16.Parent=prt16
  1131. end))
  1132. Decimate()
  1133. end
  1134. end
  1135.  
  1136. function key2(key)
  1137. if key=="c" or key=="v" then
  1138. holding=false
  1139. end
  1140. end
  1141.  
  1142. function s(mouse)
  1143. mouse.Button1Down:connect(function() ob1d(mouse) end)
  1144. mouse.Button1Up:connect(function() ob1u(mouse) end)
  1145. mouse.KeyDown:connect(key)
  1146. mouse.KeyUp:connect(key2)
  1147. unsheathed = true
  1148. player = Player
  1149. ch = Character
  1150. MMouse = mouse
  1151. RSH = ch.Torso["Right Shoulder"]
  1152. LSH = ch.Torso["Left Shoulder"]
  1153. --
  1154. RSH.Parent = nil
  1155. LSH.Parent = nil
  1156. --
  1157. RW.Part0 = ch.Torso
  1158. RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  1159. RW.C1 = CFrame.new(0, 0.5, 0)
  1160. RW.Part1 = ch["Right Arm"]
  1161. RW.Parent = ch.Torso
  1162. --_G.R = RW
  1163. --
  1164. LW.Part0 = ch.Torso
  1165. LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  1166. LW.C1 = CFrame.new(0, 0.5, 0)
  1167. LW.Part1 = ch["Left Arm"]
  1168. LW.Parent = ch.Torso
  1169. --_G.L = LW
  1170. --
  1171. equipanim()
  1172. end
  1173.  
  1174. function ds(mouse)
  1175. hideanim()
  1176. wait(0)
  1177. RW.Parent = nil
  1178. LW.Parent = nil
  1179. RSH.Parent = player.Character.Torso
  1180. LSH.Parent = player.Character.Torso
  1181. end
  1182.  
  1183. Bin.Selected:connect(s)
  1184. Bin.Deselected:connect(ds)
  1185. print("Crossbow loaded.")
  1186. -- mediafire
  1187. --[[
  1188. Copyrighted (C) Fenrier 2013
  1189. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement