Advertisement
astronaut32

crossbow

Jun 21st, 2015
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 44.42 KB | None | 0 0
  1.  
  2.  
  3. ------------------------------------------------------------------------------------------------------------------------------
  4. Player = game.Players.LocalPlayer
  5. Character = Player.Character
  6.  
  7. PlayerGui = Player.PlayerGui
  8.  
  9. Backpack = Player.Backpack
  10.  
  11. Torso = Character.Torso
  12.  
  13. Head = Character.Head
  14.  
  15. Humanoid = Character.Humanoid
  16.  
  17. LeftArm = Character["Left Arm"]
  18.  
  19. LeftLeg = Character["Left Leg"]
  20.  
  21. RightArm = Character["Right Arm"]
  22.  
  23. RightLeg = Character["Right Leg"]
  24.  
  25. LS = Torso["Left Shoulder"]
  26.  
  27. LH = Torso["Left Hip"]
  28.  
  29. RS = Torso["Right Shoulder"]
  30.  
  31. RH = Torso["Right Hip"]
  32.  
  33. Neck = Torso.Neck
  34.  
  35. it=Instance.new
  36.  
  37. vt=Vector3.new
  38.  
  39. cf=CFrame.new
  40.  
  41. euler=CFrame.fromEulerAnglesXYZ
  42.  
  43. angles=CFrame.Angles
  44.  
  45. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  46.  
  47. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  48.  
  49. attack = false
  50.  
  51. attacktype = 1
  52.  
  53. damage = 5
  54.  
  55. oridamage = 50
  56.  
  57. attackdebounce = false
  58.  
  59. ssdebounce=false
  60.  
  61. MMouse=nil
  62.  
  63. combo=0
  64.  
  65. --player
  66.  
  67. player = nil
  68.  
  69. --save shoulders
  70.  
  71. RSH, LSH = nil, nil
  72.  
  73. --welds
  74.  
  75. RW, LW = Instance.new("Weld"), Instance.new("Weld")
  76.  
  77. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  78.  
  79.  
  80.  
  81.  
  82.  
  83. if Character:findFirstChild("Crossbow",true) ~= nil then
  84.  
  85. Character:findFirstChild("Crossbow",true).Parent = nil
  86.  
  87. end
  88.  
  89.  
  90.  
  91.  
  92.  
  93. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  94.  
  95. local fp = it("Part")
  96.  
  97. fp.formFactor = formfactor
  98.  
  99. fp.Parent = parent
  100.  
  101. fp.Reflectance = reflectance
  102.  
  103. fp.Transparency = transparency
  104.  
  105. fp.CanCollide = false
  106.  
  107. fp.Locked=true
  108.  
  109. fp.BrickColor = brickcolor
  110.  
  111. fp.Name = name
  112.  
  113. fp.Size = size
  114.  
  115. fp.Position = Torso.Position
  116.  
  117. fp.BottomSurface="Smooth"
  118.  
  119. fp.TopSurface="Smooth"
  120.  
  121. fp:BreakJoints()
  122.  
  123. return fp
  124.  
  125. end
  126.  
  127.  
  128.  
  129. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  130.  
  131. local mesh = it(Mesh)
  132.  
  133. mesh.Parent = part
  134.  
  135. if Mesh=="SpecialMesh" then
  136.  
  137. mesh.MeshType = meshtype
  138.  
  139. mesh.MeshId = meshid
  140.  
  141. end
  142.  
  143. mesh.Offset=offset
  144.  
  145. mesh.Scale=scale
  146.  
  147. return mesh
  148.  
  149. end
  150.  
  151.  
  152.  
  153. function weld(parent,part0,part1,c0)
  154.  
  155. local weld = it("Weld")
  156.  
  157. weld.Parent = parent
  158.  
  159. weld.Part0 = part0
  160.  
  161. weld.Part1 = part1
  162.  
  163. weld.C0 = c0
  164.  
  165. return weld
  166.  
  167. end
  168.  
  169.  
  170.  
  171. local modelzorz = Instance.new("Model")
  172.  
  173. modelzorz.Parent = Character
  174.  
  175. modelzorz.Name = "Crossbow"
  176.  
  177.  
  178.  
  179. local prt1=part(3,modelzorz,0,0,Torso.BrickColor,"Part1",vt(1,1,1))
  180.  
  181. local prt2=part(3,modelzorz,0,0,BrickColor.new("Lime green"),"Part2",vt(1,1,1))
  182.  
  183. local prt3=part(3,modelzorz,0,0,BrickColor.new("Lime green"),"Part3",vt(1,1,1))
  184.  
  185. local prt4=part(3,modelzorz,0,0,BrickColor.new("Lime green"),"Part4",vt(1,1,1))
  186.  
  187. local prt5=part(3,modelzorz,0,0,BrickColor.new("Blue"),"Part5",vt(1,1,1))
  188.  
  189. local prt6=part(3,modelzorz,0,0,BrickColor.new("Blue"),"Part6",vt(1,1,1))
  190.  
  191. local prt7=part(3,modelzorz,0,0,BrickColor.new("Blue"),"Part7",vt(1,1,1))
  192.  
  193. local prt8=part(3,modelzorz,0,0,BrickColor.new("Bluen"),"Part8",vt(1,1,1))
  194.  
  195. local prt9=part(3,modelzorz,0,0,BrickColor.new("Lime green"),"Part9",vt(1,1,1))
  196.  
  197. local prt10=part(3,modelzorz,0,0,BrickColor.new("Lime green"),"Part10",vt(1,1,1))
  198.  
  199. local prt11=part(3,modelzorz,0,0,BrickColor.new("Lime green"),"Part11",vt(1,1,1))
  200.  
  201. local prt12=part(3,modelzorz,0,0,BrickColor.new("Lime green"),"Part12",vt(1,1,1))
  202.  
  203. local prt13=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part13",vt(1,1,1))
  204.  
  205. local prt14=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part14",vt(1,1,1))
  206.  
  207. local prt15=part(3,modelzorz,0,1,BrickColor.new("Black"),"StringGuide",vt(0.2,0.2,0.2))
  208.  
  209.  
  210.  
  211. local msh1=mesh("BlockMesh",prt1,"","",vt(0,0,0),vt(0.4,0.8,0.4))
  212.  
  213. local msh2=mesh("BlockMesh",prt2,"","",vt(0,0,0),vt(0.8,0.5,2.5))
  214.  
  215. local msh3=mesh("BlockMesh",prt3,"","",vt(0,0,0),vt(0.5,0.49,3))
  216.  
  217. local msh4=mesh("BlockMesh",prt4,"","",vt(0,0,0),vt(0.2,0.21,3))
  218.  
  219. local msh5=mesh("CylinderMesh",prt5,"","",vt(0,0,0),vt(0.1,2.99,0.1))
  220.  
  221. local msh6=mesh("CylinderMesh",prt6,"","",vt(0,0,0),vt(0.1,2.99,0.1))
  222.  
  223. local msh7=mesh("BlockMesh",prt7,"","",vt(0,0,0),vt(0.5,0.5,0.5))
  224.  
  225. local msh8=mesh("CylinderMesh",prt8,"","",vt(0,0,0),vt(0.13,1,0.13))
  226.  
  227. local msh9=mesh("CylinderMesh",prt9,"","",vt(0,0,0),vt(0.13,0.8,0.13))
  228.  
  229. local msh10=mesh("BlockMesh",prt10,"","",vt(0,0,0),vt(0.4,0.1,1))
  230.  
  231. local msh11=mesh("CylinderMesh",prt11,"","",vt(0,0,0),vt(0.13,0.8,0.13))
  232.  
  233. local msh12=mesh("BlockMesh",prt12,"","",vt(0,0,0),vt(0.4,0.1,1))
  234.  
  235. local msh13=mesh("CylinderMesh",prt13,"","",vt(0,0,0),vt(0.1,0.11,0.1))
  236.  
  237. local msh14=mesh("CylinderMesh",prt14,"","",vt(0,0,0),vt(0.1,0.11,0.1))
  238.  
  239.  
  240.  
  241. local wld1=weld(prt1,prt1,Torso,euler(0.5+1.57,0,0)*cf(-0.5,-1.5,-1))
  242.  
  243. local wld2=weld(prt2,prt2,prt1,euler(-0.5,0,0)*cf(0,-0.5,0.2))
  244.  
  245. local wld3=weld(prt3,prt3,prt2,euler(0,0,0)*cf(0,0,0.8))
  246.  
  247. local wld4=weld(prt4,prt4,prt3,euler(0,0,0)*cf(0,-0.15,0.3))
  248.  
  249. local wld5=weld(prt5,prt5,prt4,euler(1.57,0,0)*cf(0.1,-0.1,0))
  250.  
  251. local wld6=weld(prt6,prt6,prt4,euler(1.57,0,0)*cf(-0.1,-0.1,0))
  252.  
  253. local wld7=weld(prt7,prt7,prt4,euler(1.57,0,0)*cf(0,0,-1.5))
  254.  
  255. local wld8=weld(prt8,prt8,prt4,euler(0,0,1.57)*cf(0,-0.05,1.45))
  256.  
  257. local wld9=weld(prt9,prt9,prt8,euler(0.5,0,0)*cf(0,0.5,0))
  258.  
  259. local wld10=weld(prt10,prt10,prt9,euler(-0.7,0,0)*cf(0,0.6,-0.25))
  260.  
  261. local wld11=weld(prt11,prt11,prt8,euler(-0.5,0,0)*cf(0,-0.5,0))
  262.  
  263. local wld12=weld(prt12,prt12,prt11,euler(0.7,0,0)*cf(0,-0.6,-0.25))
  264.  
  265. local wld13=weld(prt13,prt13,prt10,euler(0,0,0)*cf(0.08,-0.01,-0.4))
  266.  
  267. local wld14=weld(prt14,prt14,prt12,euler(0,0,0)*cf(0.08,0.01,-0.4))
  268.  
  269. local wld15=weld(prt15,prt15,prt2,euler(0,0,0)*cf(0,-0.3,1.65))
  270.  
  271.  
  272.  
  273. local string1=part(3,modelzorz,0,0,BrickColor.new("White"),"String1",vt(1,1,1))
  274.  
  275. string1.Anchored=true
  276.  
  277. local stringmsh1=mesh("CylinderMesh",string1,"","",vt(0,0,0),vt(0.1,1,0.1))
  278.  
  279. local string2=part(3,modelzorz,0,0,BrickColor.new("White"),"String1",vt(1,1,1))
  280.  
  281. string2.Anchored=true
  282.  
  283. local stringmsh2=mesh("CylinderMesh",string2,"","",vt(0,0,0),vt(0.1,1,0.1))
  284.  
  285.  
  286.  
  287. local strmdl = "Arrow"
  288.  
  289. coroutine.resume(coroutine.create(function()
  290.  
  291. repeat
  292.  
  293. wait(0)
  294.  
  295. local top = prt13.CFrame
  296.  
  297. local bottom = prt14.CFrame
  298.  
  299. local oristrpos
  300.  
  301. if strmdl == "Bow" then
  302.  
  303. oristrpos = CFrame.new((top.p+bottom.p)/2)
  304.  
  305. elseif strmdl == "Arrow" then
  306.  
  307. oristrpos = prt15.CFrame
  308.  
  309. end
  310.  
  311. local mg1 = (top.p - oristrpos.p).magnitude
  312.  
  313. local mg2 = (bottom.p - oristrpos.p).magnitude
  314.  
  315. string1.Size = Vector3.new(0.2,mg1,0.2)
  316.  
  317. string1.CFrame = CFrame.new((top.p+oristrpos.p)/2,oristrpos.p) * CFrame.Angles(math.rad(90),0,0)
  318.  
  319. string2.Size = Vector3.new(0.2,mg2,0.2)
  320.  
  321. string2.CFrame = CFrame.new((bottom.p+oristrpos.p)/2,oristrpos.p) * CFrame.Angles(math.rad(90),0,0)
  322.  
  323. until false
  324.  
  325. end))
  326.  
  327.  
  328.  
  329.  
  330.  
  331. if (script.Parent.className ~= "HopperBin") then
  332.  
  333. Tool = Instance.new("HopperBin")
  334.  
  335. Tool.Parent = Backpack
  336.  
  337. Tool.Name = "Crossbow"
  338.  
  339. script.Parent = Tool
  340.  
  341. end
  342.  
  343. Bin = script.Parent
  344.  
  345.  
  346.  
  347. local bg = it("BodyGyro")
  348.  
  349. bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  350.  
  351. bg.P = 20e+003
  352.  
  353. bg.Parent = nil
  354.  
  355.  
  356.  
  357. so = function(id,par,vol,pit)
  358.  
  359. coroutine.resume(coroutine.create(function()
  360.  
  361. local sou = Instance.new("Sound",par or workspace)
  362.  
  363. sou.Volume=vol
  364.  
  365. sou.Pitch=pit or 1
  366.  
  367. sou.SoundId=id
  368.  
  369. wait()
  370.  
  371. sou:play()
  372.  
  373. wait(6)
  374.  
  375. sou:Remove()
  376.  
  377. end))
  378.  
  379. end
  380.  
  381.  
  382.  
  383. function unequipweld()
  384.  
  385. wld1.Part1=Torso
  386.  
  387. wld1.C0=euler(0.5+1.57,0,0)*cf(-0.5,-1.5,-1)
  388.  
  389. end
  390.  
  391.  
  392.  
  393. function equipweld()
  394.  
  395. wld1.Part1=RightArm
  396.  
  397. wld1.C0=euler(0.5+1.57,0,0)*cf(0,1,0)
  398.  
  399. end
  400.  
  401.  
  402.  
  403. function hideanim()
  404.  
  405. equipped=false
  406.  
  407. wait(0.1)
  408.  
  409. bg.Parent=nil
  410.  
  411. unequipweld()
  412.  
  413. end
  414.  
  415.  
  416.  
  417. function equipanim()
  418.  
  419. equipped=true
  420.  
  421. wait(0.1)
  422.  
  423. equipweld()
  424.  
  425. RW.C0=cf(1.5, 0.5, 0) * euler(0.8,0,0)
  426.  
  427. RW.C1=cf(0, 0.5, 0) * euler(0,0.2,-0.2)
  428.  
  429. LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2)
  430.  
  431. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  432.  
  433. end
  434.  
  435.  
  436.  
  437. function Melee()
  438.  
  439. attack=true
  440.  
  441. SpecialEffect()
  442.  
  443. for i=0,1,0.1 do
  444.  
  445. wait()
  446.  
  447. RW.C0=cf(1.5-0.5*i, 0.5, -0.5*i) * euler(0.8+0.77*i,0,0)
  448.  
  449. RW.C1=cf(0, 0.5, 0) * euler(0,0.2-1.77*i,-0.2+0.8*i)
  450.  
  451. end
  452.  
  453. bg.Parent=Torso
  454.  
  455. CF = Torso.CFrame
  456.  
  457. con1=prt2.Touched:connect(function(hit) Damagefunc1(hit,20,20) end)
  458.  
  459. con2=prt3.Touched:connect(function(hit) Damagefunc1(hit,20,20) end)
  460.  
  461. so("http://roblox.com/asset/?id=10209640",LeftArm,1,0.8)
  462.  
  463. for i=0,1,0.1 do
  464.  
  465. wait()
  466.  
  467. RW.C0=cf(1.5-0.5+0.5*i, 0.5, -0.5+0.5*i) * euler(1.57,0,0)
  468.  
  469. RW.C1=cf(0, 0.5, 0) * euler(0,-1.57,0.6-2.17*i)
  470.  
  471. LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2-1.37*i)
  472.  
  473. bg.cframe=CF*euler(0,-6.283*i,0)
  474.  
  475. end
  476.  
  477. con1:disconnect()
  478.  
  479. con2:disconnect()
  480.  
  481. bg.Parent=nil
  482.  
  483. for i=0,1,0.1 do
  484.  
  485. wait()
  486.  
  487. RW.C0=cf(1.5, 0.5, 0) * euler(1.57-0.77*i,0,0)
  488.  
  489. RW.C1=cf(0, 0.5, 0) * euler(0,-1.57+1.77*i,-1.57+1.37*i)
  490.  
  491. LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2-1.37+1.37*i)
  492.  
  493. end
  494.  
  495. attack=false
  496.  
  497. end
  498.  
  499.  
  500.  
  501. function TripleShot()
  502.  
  503. attack=true
  504.  
  505. SpecialEffect()
  506.  
  507. Humanoid.WalkSpeed=5
  508.  
  509. holding=true
  510.  
  511. for i=0,1,0.2 do
  512.  
  513. wait()
  514.  
  515. RW.C0=cf(1.5, 0.5, 0) * euler(0.8-0.2*i,0,0)
  516.  
  517. RW.C1=cf(0, 0.5, 0) * euler(0,0.2,-0.2)
  518.  
  519. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.6*i,0,-0.2+0.4*i)
  520.  
  521. LW.C1=cf(0, 0.5, 0) * euler(0,-1.57*i,0)
  522.  
  523. end
  524.  
  525. local arrow=part(3,modelzorz,0,0,BrickColor.new("White"),"Arrow",vt(1,1,1))
  526.  
  527. local arrowmsh=mesh("SpecialMesh",arrow,"FileMesh","http://www.roblox.com/asset/?id=15887356",vt(0,0,0),vt(1,1,2))
  528.  
  529. arrowmsh.VertexColor=vt(1,1,1)
  530.  
  531. --arrowmsh.TextureId="http://www.roblox.com/asset/?id=15886781"
  532.  
  533. local arrowwld=weld(arrow,arrow,LeftArm,euler(0,0,0)*cf(0,1,0))
  534.  
  535. for i=0,1,0.1 do
  536.  
  537. wait()
  538.  
  539. Torso.Neck.C0=necko*euler(0.3*i,0,0)
  540.  
  541. RW.C0=cf(1.5, 0.5, 0) * euler(0.6,0,0)
  542.  
  543. RW.C1=cf(0, 0.5, 0) * euler(0,0.2-0.2*i,-0.2+0.2*i)
  544.  
  545. LW.C0=cf(-1.5, 0.5, -0.2*i) * euler(-0.6+1.7*i,0,0.2)
  546.  
  547. LW.C1=cf(0, 0.5, 0) * euler(0,-1.57+3.14*i,0)
  548.  
  549. wld1.C0=euler(0.5+1.57,0,1.57*i)*cf(0,1,0)
  550.  
  551. arrowwld.C0=euler(0,0,1.57*i)*cf(0,1,-1*i)
  552.  
  553. end
  554.  
  555. arrowwld.Part1=prt4
  556.  
  557. arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5)
  558.  
  559. for i=0,1,0.1 do
  560.  
  561. wait()
  562.  
  563. 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)
  564.  
  565. LW.C1=cf(0, 0.5, 0) * euler(0,1.57,0)
  566.  
  567. arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5-1.5*i)
  568.  
  569. wld15.C0=euler(0,0,0)*cf(0,-0.3,1.65-2*i)
  570.  
  571. end
  572.  
  573. coroutine.resume(coroutine.create(function()
  574.  
  575. wait()
  576.  
  577. while holding==true do
  578.  
  579. wait(0)
  580.  
  581. bg.Parent = Torso
  582.  
  583. local pos4 = vt(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  584.  
  585. bg.cframe = cf(Torso.Position,pos4) * euler(0,1.57,0) * cf(0,0,0)
  586.  
  587. end
  588.  
  589. bg.Parent=nil
  590.  
  591. end))
  592.  
  593. for i=0,1,0.1 do
  594.  
  595. wait()
  596.  
  597. Torso.Neck.C0=necko*euler(0.3-0.3*i,0,-1.57*i)
  598.  
  599. RW.C0=cf(1.5, 0.5, 0) * euler(0.6-0.6*i,0,1.57*i)
  600.  
  601. RW.C1=cf(0, 0.5, 0) * euler(0,1.57*i,0)
  602.  
  603. 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)
  604.  
  605. LW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.57*i,0)
  606.  
  607. wld1.C0=euler(0.5+1.57,0,1.57-1.57*i)*cf(0,1,0)
  608.  
  609. end
  610.  
  611. wait(0.2)
  612.  
  613. arrowfft=arrow:Clone()
  614.  
  615. arrowfft.Parent=arrow.Parent
  616.  
  617. arrowfft.CFrame=arrow.CFrame
  618.  
  619. arrowfft.Anchored=true
  620.  
  621. fftmsh=arrowfft.Mesh
  622.  
  623. coroutine.resume(coroutine.create(function(Arrow,Mesh)
  624.  
  625. for i=0,1,0.1 do
  626.  
  627. wait()
  628.  
  629. Arrow.Transparency=i
  630.  
  631. Mesh.Scale=Mesh.Scale+vt(0.5,0.5,0.5)
  632.  
  633. end
  634.  
  635. Arrow.Parent=nil
  636.  
  637. end),arrowfft,fftmsh)
  638.  
  639. for i=1,3 do
  640.  
  641. spread=1
  642.  
  643. so("http://www.roblox.com/asset/?id=16211041",prt8,1,1)
  644.  
  645. shoottrail(mouse,prt8)
  646.  
  647. end
  648.  
  649. spread=0
  650.  
  651. arrow.Parent=nil
  652.  
  653. wld15.C0=euler(0,0,0)*cf(0,-0.3,1.65)
  654.  
  655. for i=0,1,0.2 do
  656.  
  657. wait()
  658.  
  659. Torso.Neck.C0=necko*euler(0,0.2*i,-1.57)
  660.  
  661. RW.C0=cf(1.5, 0.5, 0) * euler(0,0,1.57+0.2*i)
  662.  
  663. end
  664.  
  665. for i=0,1,0.2 do
  666.  
  667. wait()
  668.  
  669. Torso.Neck.C0=necko*euler(0,0.2+0.1*i,-1.57)
  670.  
  671. RW.C0=cf(1.5, 0.5, 0) * euler(0,0,1.57+0.2+0.1*i)
  672.  
  673. end
  674.  
  675. Humanoid.WalkSpeed=16
  676.  
  677. holding=false
  678.  
  679. for i=0,1,0.1 do
  680.  
  681. wait()
  682.  
  683. Torso.Neck.C0=necko*euler(0,0.3-0.3*i,-1.57+1.57*i)
  684.  
  685. RW.C0=cf(1.5, 0.5, 0) * euler(0.8*i,0,1.87-1.87*i)
  686.  
  687. RW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.37*i,-0.2*i)
  688.  
  689. end
  690.  
  691. attack=false
  692.  
  693. end
  694.  
  695.  
  696.  
  697. function SpiritArrows()
  698.  
  699. attack=true
  700.  
  701. SpecialEffect()
  702.  
  703. Humanoid.WalkSpeed=0
  704.  
  705. holding=true
  706.  
  707. spread=2
  708.  
  709. for i=0,1,0.2 do
  710.  
  711. wait()
  712.  
  713. RW.C0=cf(1.5, 0.5, 0) * euler(0.8-0.2*i,0,0)
  714.  
  715. RW.C1=cf(0, 0.5, 0) * euler(0,0.2,-0.2)
  716.  
  717. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.6*i,0,-0.2+0.4*i)
  718.  
  719. LW.C1=cf(0, 0.5, 0) * euler(0,-1.57*i,0)
  720.  
  721. end
  722.  
  723. local arrow=part(3,modelzorz,0.5,0,BrickColor.new("White"),"Arrow",vt(1,1,1))
  724.  
  725. local arrowmsh=mesh("SpecialMesh",arrow,"FileMesh","http://www.roblox.com/asset/?id=15887356",vt(0,0,0),vt(1,1,2))
  726.  
  727. arrowmsh.VertexColor=vt(1,1,1)
  728.  
  729. --arrowmsh.TextureId="http://www.roblox.com/asset/?id=15886781"
  730.  
  731. local arrowwld=weld(arrow,arrow,LeftArm,euler(0,0,0)*cf(0,1,0))
  732.  
  733. for i=0,1,0.1 do
  734.  
  735. wait()
  736.  
  737. Torso.Neck.C0=necko*euler(0.3*i,0,0)
  738.  
  739. RW.C0=cf(1.5, 0.5, 0) * euler(0.6,0,0)
  740.  
  741. RW.C1=cf(0, 0.5, 0) * euler(0,0.2-0.2*i,-0.2+0.2*i)
  742.  
  743. LW.C0=cf(-1.5, 0.5, -0.2*i) * euler(-0.6+1.7*i,0,0.2)
  744.  
  745. LW.C1=cf(0, 0.5, 0) * euler(0,-1.57+3.14*i,0)
  746.  
  747. wld1.C0=euler(0.5+1.57,0,1.57*i)*cf(0,1,0)
  748.  
  749. arrowwld.C0=euler(0,0,1.57*i)*cf(0,1,-1*i)
  750.  
  751. end
  752.  
  753. arrowwld.Part1=prt4
  754.  
  755. arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5)
  756.  
  757. for i=0,1,0.1 do
  758.  
  759. wait()
  760.  
  761. 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)
  762.  
  763. LW.C1=cf(0, 0.5, 0) * euler(0,1.57,0)
  764.  
  765. arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5-1.5*i)
  766.  
  767. wld15.C0=euler(0,0,0)*cf(0,-0.3,1.65-2*i)
  768.  
  769. end
  770.  
  771. coroutine.resume(coroutine.create(function()
  772.  
  773. wait()
  774.  
  775. while holding==true do
  776.  
  777. wait(0)
  778.  
  779. bg.Parent = Torso
  780.  
  781. local pos4 = vt(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  782.  
  783. bg.cframe = cf(Torso.Position,pos4) * euler(0,1.57,0) * cf(0,0,0)
  784.  
  785. end
  786.  
  787. bg.Parent=nil
  788.  
  789. end))
  790.  
  791. for i=0,1,0.1 do
  792.  
  793. wait()
  794.  
  795. Torso.Neck.C0=necko*euler(0.3-0.3*i,0,-1.57*i)
  796.  
  797. RW.C0=cf(1.5, 0.5, 0) * euler(0.6-0.6*i,0,1.57*i)
  798.  
  799. RW.C1=cf(0, 0.5, 0) * euler(0,1.57*i,0)
  800.  
  801. 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)
  802.  
  803. LW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.57*i,0)
  804.  
  805. wld1.C0=euler(0.5+1.57,0,1.57-1.57*i)*cf(0,1,0)
  806.  
  807. end
  808.  
  809. arrowlimit=0
  810.  
  811. makearrow=false
  812.  
  813. while holding==true do
  814.  
  815. wait(0)
  816.  
  817. coroutine.resume(coroutine.create(function()
  818.  
  819. if makearrow==false then
  820.  
  821. makearrow=true
  822.  
  823. if arrowlimit<=7 then
  824.  
  825. arrowlimit=arrowlimit+1
  826.  
  827. local arrowclone=part(3,modelzorz,0.5,1,BrickColor.new("White"),"Arrow",vt(1,1,1))
  828.  
  829. local arrowmshclone=mesh("SpecialMesh",arrowclone,"FileMesh","http://www.roblox.com/asset/?id=15887356",vt(0,0,0),vt(1,1,2))
  830.  
  831. arrowmsh.VertexColor=vt(1,1,1)
  832.  
  833. local arrowwldclone=weld(arrowclone,arrowclone,arrow,euler(0,0,3.14)*cf(math.random(-8,8),math.random(-3,3),math.random(-8,8)))
  834.  
  835. coroutine.resume(coroutine.create(function(Arrow)
  836.  
  837. for i=1,0.3,-0.05 do
  838.  
  839. wait()
  840.  
  841. Arrow.Transparency=i
  842.  
  843. end
  844.  
  845. while holding==true do
  846.  
  847. wait()
  848.  
  849. end
  850.  
  851. Arrow.Anchored=true
  852.  
  853. if Arrow:findFirstChild("Weld")~=nil then
  854.  
  855. Arrow.Weld.Parent=nil
  856.  
  857. end
  858.  
  859. wait(math.random()-math.random())
  860.  
  861. so("http://www.roblox.com/asset/?id=16211041",Arrow,1,1)
  862.  
  863. shoottrail(mouse,Arrow)
  864.  
  865. Arrow.Parent=nil
  866.  
  867. end),arrowclone)
  868.  
  869. end
  870.  
  871. wait(math.random())
  872.  
  873. makearrow=false
  874.  
  875. end
  876.  
  877. end))
  878.  
  879. end
  880.  
  881. arrowfft=arrow:Clone()
  882.  
  883. arrowfft.Parent=arrow.Parent
  884.  
  885. arrowfft.CFrame=arrow.CFrame
  886.  
  887. arrowfft.Anchored=true
  888.  
  889. fftmsh=arrowfft.Mesh
  890.  
  891. coroutine.resume(coroutine.create(function(Arrow,Mesh)
  892.  
  893. for i=0,1,0.1 do
  894.  
  895. wait()
  896.  
  897. Arrow.Transparency=i
  898.  
  899. Mesh.Scale=Mesh.Scale+vt(0.2,0.2,0.2)
  900.  
  901. end
  902.  
  903. Arrow.Parent=nil
  904.  
  905. end),arrowfft,fftmsh)
  906.  
  907. so("http://www.roblox.com/asset/?id=16211041",prt8,1,1)
  908.  
  909. shoottrail(mouse,prt8)
  910.  
  911. arrow.Parent=nil
  912.  
  913. wld15.C0=euler(0,0,0)*cf(0,-0.3,1.65)
  914.  
  915. for i=0,1,0.2 do
  916.  
  917. wait()
  918.  
  919. Torso.Neck.C0=necko*euler(0,0.2*i,-1.57)
  920.  
  921. RW.C0=cf(1.5, 0.5, 0) * euler(0,0,1.57+0.2*i)
  922.  
  923. end
  924.  
  925. for i=0,1,0.2 do
  926.  
  927. wait()
  928.  
  929. Torso.Neck.C0=necko*euler(0,0.2+0.1*i,-1.57)
  930.  
  931. RW.C0=cf(1.5, 0.5, 0) * euler(0,0,1.57+0.2+0.1*i)
  932.  
  933. end
  934.  
  935. Humanoid.WalkSpeed=16
  936.  
  937. for i=0,1,0.1 do
  938.  
  939. wait()
  940.  
  941. Torso.Neck.C0=necko*euler(0,0.3-0.3*i,-1.57+1.57*i)
  942.  
  943. RW.C0=cf(1.5, 0.5, 0) * euler(0.8*i,0,1.87-1.87*i)
  944.  
  945. RW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.37*i,-0.2*i)
  946.  
  947. end
  948.  
  949. spread=0
  950.  
  951. attack=false
  952.  
  953. end
  954.  
  955.  
  956.  
  957. function Decimate()
  958.  
  959. attack=true
  960.  
  961. Humanoid.WalkSpeed=0
  962.  
  963. print("Archer SS initiated.")
  964.  
  965. SpecialEffect()
  966.  
  967. holding=true
  968.  
  969. coroutine.resume(coroutine.create(function()
  970.  
  971. wait()
  972.  
  973. while holding==true do
  974.  
  975. wait(0)
  976.  
  977. bg.Parent = Torso
  978.  
  979. local pos4 = vt(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  980.  
  981. bg.cframe = cf(Torso.Position,pos4) * euler(0,1.57,0) * cf(0,0,0)
  982.  
  983. end
  984.  
  985. bg.Parent=nil
  986.  
  987. end))
  988.  
  989. so("http://roblox.com/asset/?id=2101144",arrow,1,1)
  990.  
  991. local arrow=part(3,modelzorz,0,1,BrickColor.new("White"),"Arrow",vt(1,1,1))
  992.  
  993. local arrowmsh=mesh("SpecialMesh",arrow,"FileMesh","http://www.roblox.com/asset/?id=15887356",vt(0,0,0),vt(2,2,4))
  994.  
  995. local arrowwld=weld(arrow,arrow,LeftArm,euler(-1.57,0,0)*cf(0,2,0))
  996.  
  997. for i=0,1,0.1 do
  998.  
  999. wait()
  1000.  
  1001. arrow.Transparency=arrow.Transparency-0.05
  1002.  
  1003. arrowwld.C0=euler(-1.57+0.2*i,0,0)*cf(-0.5*i,2,-0.5*i)
  1004.  
  1005. Torso.Neck.C0=necko*euler(0,0.3*i,-1.57*i)
  1006.  
  1007. RW.C0=cf(1.5, 0.5, -0.5*i) * euler(0.8+2.2*i,0,0)
  1008.  
  1009. RW.C1=cf(0, 0.5, 0) * euler(0,0.2-1.77*i,-0.2+0.2*i)
  1010.  
  1011. 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)
  1012.  
  1013. LW.C1=cf(0, 0.5, 0) * euler(0,1.57*i,0)
  1014.  
  1015. end
  1016.  
  1017. arrowwld.Part1=prt4
  1018.  
  1019. arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5)
  1020.  
  1021. for i=0,1,0.05 do
  1022.  
  1023. wait()
  1024.  
  1025. Torso.Neck.C0=necko*euler(0,0.3-0.1*i,-1.57)
  1026.  
  1027. LW.C0=cf(-1.5+1.8, 2.5-1.5*i, -0.5) * euler(3.1,0,0.4)
  1028.  
  1029. arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5-1*i)
  1030.  
  1031. wld15.C0=euler(0,0,0)*cf(0,-0.3,1.65-4*i)
  1032.  
  1033. end
  1034.  
  1035. for i=0,1,0.05 do
  1036.  
  1037. wait()
  1038.  
  1039. Torso.Neck.C0=necko*euler(0,0.2-0.2*i,-1.57)
  1040.  
  1041. RW.C0=cf(1.5, 0.5, -0.5) * euler(3+0.14*i,0,0)
  1042.  
  1043. RW.C1=cf(0, 0.5, 0) * euler(0,-1.57,-1.57*i)
  1044.  
  1045. LW.C0=cf(-1.5+1.8, 1, -0.5) * euler(3.1,0,0.4+1.17*i)
  1046.  
  1047. LW.C1=cf(0, 0.5, 0) * euler(0,1.57,0)
  1048.  
  1049. end
  1050.  
  1051. while holding==true do
  1052.  
  1053. wait()
  1054.  
  1055. end
  1056.  
  1057. so("http://www.roblox.com/asset/?id=16211041",prt8,1,1)
  1058.  
  1059. SSshoottrail(mouse,prt8)
  1060.  
  1061. arrow.Parent=nil
  1062.  
  1063. Humanoid.WalkSpeed=16
  1064.  
  1065. for i=0,1,0.2 do
  1066.  
  1067. wait()
  1068.  
  1069. Torso.Neck.C0=necko*euler(0,0.3*i,-1.57)
  1070.  
  1071. RW.C0=cf(1.5, 0.5, -0.5) * euler(3.24,0,0)
  1072.  
  1073. RW.C1=cf(0, 0.5, 0) * euler(0,-1.57,-1.57+1*i)
  1074.  
  1075. LW.C0=cf(-1.5+1.8, 1, -0.5) * euler(3.1,0,1.57-1*i)
  1076.  
  1077. LW.C1=cf(0, 0.5, 0) * euler(0,1.57,0)
  1078.  
  1079. wld15.C0=euler(0,0,0)*cf(0,-0.3,1.65)
  1080.  
  1081. end
  1082.  
  1083. for i=0,1,0.1 do
  1084.  
  1085. wait()
  1086.  
  1087. Torso.Neck.C0=necko*euler(0,0.3+0.1*i,-1.57)
  1088.  
  1089. RW.C0=cf(1.5, 0.5, -0.5) * euler(3.24,0,0)
  1090.  
  1091. RW.C1=cf(0, 0.5, 0) * euler(0,-1.57,-1.57+1+0.1*i)
  1092.  
  1093. LW.C0=cf(-1.5+1.8, 1, -0.5) * euler(3.1,0,1.57-1-0.1*i)
  1094.  
  1095. LW.C1=cf(0, 0.5, 0) * euler(0,1.57,0)
  1096.  
  1097. wld15.C0=euler(0,0,0)*cf(0,-0.3,1.65)
  1098.  
  1099. end
  1100.  
  1101. for i=0,1,0.05 do
  1102.  
  1103. wait()
  1104.  
  1105. Torso.Neck.C0=necko*euler(0,0.4-0.4*i,-1.57+1.57*i)
  1106.  
  1107. RW.C0=cf(1.5, 0.5, -0.5+0.5*i) * euler(3.24-2.44*i,0,0)
  1108.  
  1109. RW.C1=cf(0, 0.5, 0) * euler(0,-1.57+1.77*i,-0.47+0.27*i)
  1110.  
  1111. 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)
  1112.  
  1113. LW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.57*i,0)
  1114.  
  1115. end
  1116.  
  1117. attack=false
  1118.  
  1119. end
  1120.  
  1121.  
  1122.  
  1123. function MagicCircle(brickcolor,cframe,x1,y1,z1,x2,y2,z2,x3,y3,z3)
  1124.  
  1125. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1126.  
  1127. prt.Anchored=true
  1128.  
  1129. prt.CFrame=cframe*cf(x2,y2,z2)
  1130.  
  1131. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  1132.  
  1133. coroutine.resume(coroutine.create(function()
  1134.  
  1135. for i=0,1,0.1 do
  1136.  
  1137. wait()
  1138.  
  1139. prt.CFrame=prt.CFrame
  1140.  
  1141. prt.Transparency=i
  1142.  
  1143. msh.Scale=msh.Scale+vt(x3,y3,z3)
  1144.  
  1145. end
  1146.  
  1147. prt.Parent=nil
  1148.  
  1149. end))
  1150.  
  1151. end
  1152.  
  1153.  
  1154.  
  1155. function SpecialEffect()
  1156.  
  1157. local prt=part(3,workspace,1,0,BrickColor.new("White"),"Part",vt(1,1,1))
  1158.  
  1159. prt.Anchored=true
  1160.  
  1161. prt.CFrame=Torso.CFrame
  1162.  
  1163. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5))
  1164.  
  1165. coroutine.resume(coroutine.create(function(Part,Mesh)
  1166.  
  1167. for i=0,1,0.2 do
  1168.  
  1169. wait(0)
  1170.  
  1171. Part.Transparency=i
  1172.  
  1173. Mesh.Scale=Mesh.Scale+vt(10,10,10)
  1174.  
  1175. end
  1176.  
  1177. prt.Parent=nil
  1178.  
  1179. end),prt,msh)
  1180.  
  1181. end
  1182.  
  1183.  
  1184.  
  1185. Damagefunc1=function(hit,Damage,Knockback)
  1186.  
  1187. if hit.Parent==nil then
  1188.  
  1189. return
  1190.  
  1191. end
  1192.  
  1193. CPlayer=Bin
  1194.  
  1195. h=hit.Parent:FindFirstChild("Humanoid")
  1196.  
  1197. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  1198.  
  1199. if attackdebounce == false then
  1200.  
  1201. attackdebounce = true
  1202.  
  1203. coroutine.resume(coroutine.create(function()
  1204.  
  1205. wait(0.2)
  1206.  
  1207. attackdebounce = false
  1208.  
  1209. end))
  1210.  
  1211. Damage=Damage
  1212.  
  1213. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  1214.  
  1215. return
  1216.  
  1217. end]]
  1218.  
  1219. -- hs(hit,1.2)
  1220.  
  1221. c=Instance.new("ObjectValue")
  1222.  
  1223. c.Name="creator"
  1224.  
  1225. c.Value=game.Players.LocalPlayer
  1226.  
  1227. c.Parent=h
  1228.  
  1229. game:GetService("Debris"):AddItem(c,.5)
  1230.  
  1231. Damage=Damage+math.random(0,10)
  1232.  
  1233. -- h:TakeDamage(Damage)
  1234.  
  1235. h.Health=h.Health-Damage
  1236.  
  1237. showDamage(hit.Parent,Damage,.5)
  1238.  
  1239. vp=Instance.new("BodyVelocity")
  1240.  
  1241. vp.P=500
  1242.  
  1243. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  1244.  
  1245. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  1246.  
  1247. vp.velocity=Head.CFrame.lookVector*Knockback+Head.Velocity/1.05
  1248.  
  1249. if Knockback>0 then
  1250.  
  1251. vp.Parent=hit.Parent.Torso
  1252.  
  1253. end
  1254.  
  1255. rl=Instance.new("BodyAngularVelocity")
  1256.  
  1257. rl.P=3000
  1258.  
  1259. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1260.  
  1261. rl.angularvelocity=Vector3.new(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1262.  
  1263. rl.Parent=hit
  1264.  
  1265. coroutine.resume(coroutine.create(function(vel)
  1266.  
  1267. wait(1)
  1268.  
  1269. vel:Remove()
  1270.  
  1271. end),rl)
  1272.  
  1273. game:GetService("Debris"):AddItem(vp,.25)
  1274.  
  1275. game:GetService("Debris"):AddItem(r,.5)
  1276.  
  1277. c=Instance.new("ObjectValue")
  1278.  
  1279. c.Name="creator"
  1280.  
  1281. c.Value=Player
  1282.  
  1283. c.Parent=h
  1284.  
  1285. game:GetService("Debris"):AddItem(c,.5)
  1286.  
  1287. CRIT=false
  1288.  
  1289. hitDeb=true
  1290.  
  1291. AttackPos=6
  1292.  
  1293. end
  1294.  
  1295. end
  1296.  
  1297. end
  1298.  
  1299.  
  1300.  
  1301. Damagefunc2=function(hit,Damage,Knockback)
  1302.  
  1303. if hit.Parent==nil then
  1304.  
  1305. return
  1306.  
  1307. end
  1308.  
  1309. CPlayer=Bin
  1310.  
  1311. blocked=false
  1312.  
  1313. h=hit.Parent:FindFirstChild("Humanoid")
  1314.  
  1315. if h~=nil and hit.Parent:FindFirstChild("Torso")~=nil then
  1316.  
  1317. Damage=Damage
  1318.  
  1319. c=it("ObjectValue")
  1320.  
  1321. c.Name="creator"
  1322.  
  1323. c.Value=game.Players.LocalPlayer
  1324.  
  1325. c.Parent=h
  1326.  
  1327. game:GetService("Debris"):AddItem(c,.5)
  1328.  
  1329. -- print(c.Value)
  1330.  
  1331. --[[ if math.random(0,99)+math.random()<=7.8 then
  1332.  
  1333. CRIT=true
  1334.  
  1335. Damage=Damage*2
  1336.  
  1337. s=it("Sound")
  1338.  
  1339. s.SoundId="http://www.roblox.com/asset/?id=2801263"
  1340.  
  1341. s.Volume=1
  1342.  
  1343. s.Pitch=2
  1344.  
  1345. s.Parent=hit
  1346.  
  1347. s.PlayOnRemove=true
  1348.  
  1349. s.Parent=nil
  1350.  
  1351.  
  1352.  
  1353. end]]
  1354.  
  1355. Damage=Damage+math.random(0,10)
  1356.  
  1357. -- Blood(hit.CFrame*cf(math.random(-10,10)/10,math.random(-10,10)/10,0),math.floor(Damage/2))
  1358.  
  1359. block=hit.Parent:findFirstChild("Block")
  1360.  
  1361. if block~=nil then
  1362.  
  1363. print("herp")
  1364.  
  1365. if block.Value>0 then
  1366.  
  1367. blocked=true
  1368.  
  1369. block.Value=block.Value-3
  1370.  
  1371. print(block.Value)
  1372.  
  1373. end
  1374.  
  1375. end
  1376.  
  1377. if blocked==false then
  1378.  
  1379. -- h:TakeDamage(Damage)
  1380.  
  1381. h.Health=h.Health-Damage
  1382.  
  1383. showDamage(hit.Parent,Damage,.5)
  1384.  
  1385. else
  1386.  
  1387. h:TakeDamage(1)
  1388.  
  1389. showDamage(hit.Parent,1,.5)
  1390.  
  1391. end
  1392.  
  1393. --if blocked==false then
  1394.  
  1395. --end
  1396.  
  1397. local bodyVelocity=Instance.new("BodyVelocity")
  1398.  
  1399. bodyVelocity.velocity=angle*40+Vector3.new(0,0,0)
  1400.  
  1401. bodyVelocity.P=5000
  1402.  
  1403. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1404.  
  1405. bodyVelocity.Parent=hit
  1406.  
  1407. coroutine.resume(coroutine.create(function(Vel)
  1408.  
  1409. wait(1)
  1410.  
  1411. Vel:Remove()
  1412.  
  1413. end),bodyVelocity)
  1414.  
  1415. game:GetService("Debris"):AddItem(vp,1)
  1416.  
  1417. c=it("ObjectValue")
  1418.  
  1419. c.Name="creator"
  1420.  
  1421. c.Value=Player
  1422.  
  1423. c.Parent=h
  1424.  
  1425. game:GetService("Debris"):AddItem(c,.5)
  1426.  
  1427. CRIT=false
  1428.  
  1429. hitDeb=true
  1430.  
  1431. AttackPos=6
  1432.  
  1433. end
  1434.  
  1435. end
  1436.  
  1437.  
  1438.  
  1439. showDamage=function(Char,Dealt,du)
  1440.  
  1441. m=Instance.new("Model")
  1442.  
  1443. m.Name=tostring(Dealt)
  1444.  
  1445. h=Instance.new("Humanoid")
  1446.  
  1447. h.Health=0
  1448.  
  1449. h.MaxHealth=0
  1450.  
  1451. h.Parent=m
  1452.  
  1453. c=Instance.new("Part")
  1454.  
  1455. c.Transparency=0
  1456.  
  1457. c.BrickColor=BrickColor:Red()
  1458.  
  1459. if CRIT==true then
  1460.  
  1461. c.BrickColor=BrickColor.new("Really red")
  1462.  
  1463. end
  1464.  
  1465. c.Name="Head"
  1466.  
  1467. c.TopSurface=0
  1468.  
  1469. c.BottomSurface=0
  1470.  
  1471. c.formFactor="Plate"
  1472.  
  1473. c.Size=Vector3.new(1,.4,1)
  1474.  
  1475. ms=Instance.new("CylinderMesh")
  1476.  
  1477. ms.Scale=Vector3.new(.8,.8,.8)
  1478.  
  1479. if CRIT==true then
  1480.  
  1481. ms.Scale=Vector3.new(1,1.25,1)
  1482.  
  1483. end
  1484.  
  1485. ms.Parent=c
  1486.  
  1487. c.Reflectance=0
  1488.  
  1489. Instance.new("BodyGyro").Parent=c
  1490.  
  1491. c.Parent=m
  1492.  
  1493. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1494.  
  1495. f=Instance.new("BodyPosition")
  1496.  
  1497. f.P=2000
  1498.  
  1499. f.D=100
  1500.  
  1501. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1502.  
  1503. f.position=c.Position+Vector3.new(0,3,0)
  1504.  
  1505. f.Parent=c
  1506.  
  1507. game:GetService("Debris"):AddItem(m,.5+du)
  1508.  
  1509. c.CanCollide=false
  1510.  
  1511. m.Parent=workspace
  1512.  
  1513. c.CanCollide=false
  1514.  
  1515. end
  1516.  
  1517.  
  1518.  
  1519. local function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  1520.  
  1521. return game.Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  1522.  
  1523. end
  1524.  
  1525.  
  1526.  
  1527. spread=0
  1528.  
  1529. range=500
  1530.  
  1531. rangepower=50
  1532.  
  1533. function shoottrail(mouse,baseprt)
  1534.  
  1535. coroutine.resume(coroutine.create(function(v)
  1536.  
  1537. local spreadvector = (Vector3.new(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread))) * (baseprt.Position-MMouse.Hit.p).magnitude/100
  1538.  
  1539. local dir = CFrame.new((baseprt.Position+MMouse.Hit.p)/2,MMouse.Hit.p+spreadvector)
  1540.  
  1541. local hit,pos = rayCast(baseprt.Position,dir.lookVector,10,Character)
  1542.  
  1543. local rangepos = range
  1544.  
  1545. local function drawtrail(From,To)
  1546.  
  1547. local effectsmsh = Instance.new("CylinderMesh")
  1548.  
  1549. effectsmsh.Scale = Vector3.new(1,1,1)
  1550.  
  1551. effectsmsh.Name = "Mesh"
  1552.  
  1553. local effectsg = Instance.new("Part")
  1554.  
  1555. effectsg.formFactor = 3
  1556.  
  1557. effectsg.CanCollide = false
  1558.  
  1559. effectsg.Name = "Eff"
  1560.  
  1561. effectsg.Locked = true
  1562.  
  1563. effectsg.Anchored = true
  1564.  
  1565. effectsg.Size = Vector3.new(0.2,0.2,0.2)
  1566.  
  1567. effectsg.Parent = modelzorz
  1568.  
  1569. effectsmsh.Parent = effectsg
  1570.  
  1571. effectsg.BrickColor = BrickColor.new("White")
  1572.  
  1573. effectsg.Reflectance = 0.25
  1574.  
  1575. local LP = From
  1576.  
  1577. local point1 = To
  1578.  
  1579. local mg = (LP - point1).magnitude
  1580.  
  1581. effectsmsh.Scale = Vector3.new(1.5,mg*5,1.5)
  1582.  
  1583. effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
  1584.  
  1585. coroutine.resume(coroutine.create(function()
  1586.  
  1587. for i = 0 , 1 , 0.1 do
  1588.  
  1589. wait()
  1590.  
  1591. effectsg.Transparency = 1*i
  1592.  
  1593. effectsmsh.Scale = Vector3.new(1-1*i,mg*5,1-1*i)
  1594.  
  1595. end
  1596.  
  1597. effectsg.Parent = nil
  1598.  
  1599. end))
  1600.  
  1601. end
  1602.  
  1603. local newpos = baseprt.Position
  1604.  
  1605. local inc = rangepower
  1606.  
  1607. repeat
  1608.  
  1609. wait() wait()
  1610.  
  1611. rangepos = rangepos - 10
  1612.  
  1613. dir = dir * CFrame.Angles(math.rad(-1),0,0)
  1614.  
  1615. hit,pos = rayCast(newpos,dir.lookVector,inc,Character)
  1616.  
  1617. drawtrail(newpos,pos)
  1618.  
  1619. newpos = newpos + (dir.lookVector * inc)
  1620.  
  1621. if inc >= 20 then
  1622.  
  1623. inc = inc - 10
  1624.  
  1625. end
  1626.  
  1627. if hit ~= nil then
  1628.  
  1629. rangepos = 0
  1630.  
  1631. end
  1632.  
  1633. until rangepos <= 0
  1634.  
  1635. if hit ~= nil then
  1636.  
  1637. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  1638.  
  1639. hum = hit.Parent.Humanoid
  1640.  
  1641. tTorso=hit.Parent.Torso
  1642.  
  1643. Damagefunc2(hit,20,30)
  1644.  
  1645. --ADmg(hum,hit)
  1646.  
  1647. elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  1648.  
  1649. hum = hit.Parent.Parent.Humanoid
  1650.  
  1651. tTorso=hit.Parent.Parent.Torso
  1652.  
  1653. Damagefunc2(hit.Parent.Parent.Torso,20,30)
  1654.  
  1655. --ADmg(hum,hit)
  1656.  
  1657. end
  1658.  
  1659. end
  1660.  
  1661. end))
  1662.  
  1663. end
  1664.  
  1665.  
  1666.  
  1667. function SSshoottrail(mouse,baseprt)
  1668.  
  1669. coroutine.resume(coroutine.create(function(v)
  1670.  
  1671. local spreadvector = (Vector3.new(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread))) * (baseprt.Position-MMouse.Hit.p).magnitude/100
  1672.  
  1673. local dir = CFrame.new((baseprt.Position+MMouse.Hit.p)/2,MMouse.Hit.p+spreadvector)
  1674.  
  1675. local hit,pos = rayCast(baseprt.Position,dir.lookVector,10,Character)
  1676.  
  1677. local rangepos = range
  1678.  
  1679. local function drawtrail(From,To)
  1680.  
  1681. local effectsmsh = Instance.new("CylinderMesh")
  1682.  
  1683. effectsmsh.Scale = Vector3.new(1,1,1)
  1684.  
  1685. effectsmsh.Name = "Mesh"
  1686.  
  1687. local effectsg = Instance.new("Part")
  1688.  
  1689. effectsg.formFactor = 3
  1690.  
  1691. effectsg.CanCollide = false
  1692.  
  1693. effectsg.Name = "Eff"
  1694.  
  1695. effectsg.Locked = true
  1696.  
  1697. effectsg.Anchored = true
  1698.  
  1699. effectsg.Size = Vector3.new(0.2,0.2,0.2)
  1700.  
  1701. effectsg.Parent = modelzorz
  1702.  
  1703. effectsmsh.Parent = effectsg
  1704.  
  1705. effectsg.BrickColor = BrickColor.new("White")
  1706.  
  1707. effectsg.Reflectance = 0.25
  1708.  
  1709. local LP = From
  1710.  
  1711. local point1 = To
  1712.  
  1713. local mg = (LP - point1).magnitude
  1714.  
  1715. effectsmsh.Scale = Vector3.new(2.5,mg*5,2.5)
  1716.  
  1717. effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
  1718.  
  1719. coroutine.resume(coroutine.create(function()
  1720.  
  1721. for i = 0 , 1 , 0.1 do
  1722.  
  1723. wait()
  1724.  
  1725. effectsg.Transparency = 1*i
  1726.  
  1727. effectsmsh.Scale = Vector3.new(2.5-2.5*i,mg*5,2.5-2.5*i)
  1728.  
  1729. end
  1730.  
  1731. effectsg.Parent = nil
  1732.  
  1733. end))
  1734.  
  1735. end
  1736.  
  1737. local newpos = baseprt.Position
  1738.  
  1739. local inc = rangepower
  1740.  
  1741. repeat
  1742.  
  1743. wait() wait()
  1744.  
  1745. rangepos = rangepos - 5
  1746.  
  1747. hit,pos = rayCast(newpos,dir.lookVector,inc,Character)
  1748.  
  1749. drawtrail(newpos,pos)
  1750.  
  1751. newpos = newpos + (dir.lookVector * inc)
  1752.  
  1753. dir = CFrame.new(pos,MMouse.Hit.p)
  1754.  
  1755. if hit ~= nil then
  1756.  
  1757. MagicCircle(BrickColor.new("White"),CFrame.new(pos),5,5,5,0,0,0,10,10,10)
  1758.  
  1759. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  1760.  
  1761. hum = hit.Parent.Humanoid
  1762.  
  1763. tTorso=hit.Parent.Torso
  1764.  
  1765. Damagefunc1(hit,60,100)
  1766.  
  1767. --ADmg(hum,hit)
  1768.  
  1769. elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  1770.  
  1771. hum = hit.Parent.Parent.Humanoid
  1772.  
  1773. tTorso=hit.Parent.Parent.Torso
  1774.  
  1775. Damagefunc1(hit.Parent.Parent.Torso,60,100)
  1776.  
  1777. --ADmg(hum,hit)
  1778.  
  1779. end
  1780.  
  1781. end
  1782.  
  1783. until rangepos <= 0
  1784.  
  1785. end))
  1786.  
  1787. end
  1788.  
  1789.  
  1790.  
  1791. function ArrowIn()
  1792.  
  1793. attack=true
  1794.  
  1795. for i=0,1,0.2 do
  1796.  
  1797. wait()
  1798.  
  1799. RW.C0=cf(1.5, 0.5, 0) * euler(0.8-0.2*i,0,0)
  1800.  
  1801. RW.C1=cf(0, 0.5, 0) * euler(0,0.2,-0.2)
  1802.  
  1803. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.6*i,0,-0.2+0.4*i)
  1804.  
  1805. LW.C1=cf(0, 0.5, 0) * euler(0,-1.57*i,0)
  1806.  
  1807. end
  1808.  
  1809. local arrow=part(3,modelzorz,0,0,BrickColor.new("White"),"Arrow",vt(1,1,1))
  1810.  
  1811. local arrowmsh=mesh("SpecialMesh",arrow,"FileMesh","http://www.roblox.com/asset/?id=15887356",vt(0,0,0),vt(1,1,2))
  1812.  
  1813. arrowmsh.TextureId="http://www.roblox.com/asset/?id=15886781"
  1814.  
  1815. local arrowwld=weld(arrow,arrow,LeftArm,euler(0,0,0)*cf(0,1,0))
  1816.  
  1817. for i=0,1,0.2 do
  1818.  
  1819. wait()
  1820.  
  1821. Torso.Neck.C0=necko*euler(0.3*i,0,0)
  1822.  
  1823. RW.C0=cf(1.5, 0.5, 0) * euler(0.6,0,0)
  1824.  
  1825. RW.C1=cf(0, 0.5, 0) * euler(0,0.2-0.2*i,-0.2+0.2*i)
  1826.  
  1827. LW.C0=cf(-1.5, 0.5, -0.2*i) * euler(-0.6+1.7*i,0,0.2)
  1828.  
  1829. LW.C1=cf(0, 0.5, 0) * euler(0,-1.57+3.14*i,0)
  1830.  
  1831. wld1.C0=euler(0.5+1.57,0,1.57*i)*cf(0,1,0)
  1832.  
  1833. arrowwld.C0=euler(0,0,1.57*i)*cf(0,1,-1*i)
  1834.  
  1835. end
  1836.  
  1837. arrowwld.Part1=prt4
  1838.  
  1839. arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5)
  1840.  
  1841. for i=0,1,0.2 do
  1842.  
  1843. wait()
  1844.  
  1845. 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)
  1846.  
  1847. LW.C1=cf(0, 0.5, 0) * euler(0,1.57,0)
  1848.  
  1849. arrowwld.C0=euler(3.14,0,0)*cf(0,-0.15,2.5-1.5*i)
  1850.  
  1851. wld15.C0=euler(0,0,0)*cf(0,-0.3,1.65-2*i)
  1852.  
  1853. end
  1854.  
  1855. coroutine.resume(coroutine.create(function()
  1856.  
  1857. wait()
  1858.  
  1859. while attack==true do
  1860.  
  1861. wait(0)
  1862.  
  1863. bg.Parent = Torso
  1864.  
  1865. local pos4 = vt(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
  1866.  
  1867. bg.cframe = cf(Torso.Position,pos4) * euler(0,1.57,0) * cf(0,0,0)
  1868.  
  1869. end
  1870.  
  1871. bg.Parent=nil
  1872.  
  1873. end))
  1874.  
  1875. for i=0,1,0.2 do
  1876.  
  1877. wait()
  1878.  
  1879. Torso.Neck.C0=necko*euler(0.3-0.3*i,0,-1.57*i)
  1880.  
  1881. RW.C0=cf(1.5, 0.5, 0) * euler(0.6-0.6*i,0,1.57*i)
  1882.  
  1883. RW.C1=cf(0, 0.5, 0) * euler(0,1.57*i,0)
  1884.  
  1885. 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)
  1886.  
  1887. LW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.57*i,0)
  1888.  
  1889. wld1.C0=euler(0.5+1.57,0,1.57-1.57*i)*cf(0,1,0)
  1890.  
  1891. end
  1892.  
  1893. while hold==true do
  1894.  
  1895. wait(0)
  1896.  
  1897. end
  1898.  
  1899. so("http://www.roblox.com/asset/?id=16211041",prt8,1,1)
  1900.  
  1901. arrow.Parent=nil
  1902.  
  1903. shoottrail(mouse,prt8)
  1904.  
  1905. wld15.C0=euler(0,0,0)*cf(0,-0.3,1.65)
  1906.  
  1907. for i=0,1,0.2 do
  1908.  
  1909. wait()
  1910.  
  1911. Torso.Neck.C0=necko*euler(0,0.2*i,-1.57)
  1912.  
  1913. RW.C0=cf(1.5, 0.5, 0) * euler(0,0,1.57+0.2*i)
  1914.  
  1915. end
  1916.  
  1917. for i=0,1,0.2 do
  1918.  
  1919. wait()
  1920.  
  1921. Torso.Neck.C0=necko*euler(0,0.2+0.1*i,-1.57)
  1922.  
  1923. RW.C0=cf(1.5, 0.5, 0) * euler(0,0,1.57+0.2+0.1*i)
  1924.  
  1925. end
  1926.  
  1927. attack=false
  1928.  
  1929. end
  1930.  
  1931.  
  1932.  
  1933. function ob1d(mouse)
  1934.  
  1935. if attack == true then return end
  1936.  
  1937. hold=true
  1938.  
  1939. ArrowIn()
  1940.  
  1941. end
  1942.  
  1943.  
  1944.  
  1945. function ob1u(mouse)
  1946.  
  1947. hold = false
  1948.  
  1949. repeat wait() until attack==false
  1950.  
  1951. for i=0,1,0.1 do
  1952.  
  1953. wait()
  1954.  
  1955. Torso.Neck.C0=necko*euler(0,0.3-0.3*i,-1.57+1.57*i)
  1956.  
  1957. RW.C0=cf(1.5, 0.5, 0) * euler(0.8*i,0,1.87-1.87*i)
  1958.  
  1959. RW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.37*i,-0.2*i)
  1960.  
  1961. end
  1962.  
  1963. Torso.Neck.C0=necko
  1964.  
  1965. wld1.C0=euler(0.5+1.57,0,0)*cf(0,1,0)
  1966.  
  1967. wld15.C0=euler(0,0,0)*cf(0,-0.3,1.65)
  1968.  
  1969. RW.C0=cf(1.5, 0.5, 0) * euler(0.8,0,0)
  1970.  
  1971. RW.C1=cf(0, 0.5, 0) * euler(0,0.2,-0.2)
  1972.  
  1973. LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2)
  1974.  
  1975. LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
  1976.  
  1977. end
  1978.  
  1979.  
  1980.  
  1981. buttonhold = false
  1982.  
  1983.  
  1984.  
  1985. eul=0
  1986.  
  1987. function key(key)
  1988.  
  1989. if attack == true then return end
  1990.  
  1991. if key=="z" then
  1992.  
  1993. Melee()
  1994.  
  1995. end
  1996.  
  1997. if key=="x" then
  1998.  
  1999. TripleShot()
  2000.  
  2001. end
  2002.  
  2003. if key=="c" then
  2004.  
  2005. SpiritArrows()
  2006.  
  2007. end
  2008.  
  2009. if key=="v" and ssdebounce==false then
  2010.  
  2011. --ssdebounce=true
  2012.  
  2013. coroutine.resume(coroutine.create(function()
  2014.  
  2015. wait(30)
  2016.  
  2017. ssdebounce=false
  2018.  
  2019. end))
  2020.  
  2021. Decimate()
  2022.  
  2023. end
  2024.  
  2025. end
  2026.  
  2027.  
  2028.  
  2029. function key2(key)
  2030.  
  2031. if key=="c" or key=="v" then
  2032.  
  2033. holding=false
  2034.  
  2035. end
  2036.  
  2037. end
  2038.  
  2039.  
  2040.  
  2041. function s(mouse)
  2042.  
  2043. mouse.Button1Down:connect(function() ob1d(mouse) end)
  2044.  
  2045. mouse.Button1Up:connect(function() ob1u(mouse) end)
  2046.  
  2047. mouse.KeyDown:connect(key)
  2048.  
  2049. mouse.KeyUp:connect(key2)
  2050.  
  2051. unsheathed = true
  2052.  
  2053. player = Player
  2054.  
  2055. ch = Character
  2056.  
  2057. MMouse = mouse
  2058.  
  2059. RSH = ch.Torso["Right Shoulder"]
  2060.  
  2061. LSH = ch.Torso["Left Shoulder"]
  2062.  
  2063. --
  2064.  
  2065. RSH.Parent = nil
  2066.  
  2067. LSH.Parent = nil
  2068.  
  2069. --
  2070.  
  2071. RW.Part0 = ch.Torso
  2072.  
  2073. RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  2074.  
  2075. RW.C1 = CFrame.new(0, 0.5, 0)
  2076.  
  2077. RW.Part1 = ch["Right Arm"]
  2078.  
  2079. RW.Parent = ch.Torso
  2080.  
  2081. --_G.R = RW
  2082.  
  2083. --
  2084.  
  2085. LW.Part0 = ch.Torso
  2086.  
  2087. LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  2088.  
  2089. LW.C1 = CFrame.new(0, 0.5, 0)
  2090.  
  2091. LW.Part1 = ch["Left Arm"]
  2092.  
  2093. LW.Parent = ch.Torso
  2094.  
  2095. --_G.L = LW
  2096.  
  2097. --
  2098.  
  2099. equipanim()
  2100.  
  2101. end
  2102.  
  2103.  
  2104.  
  2105. function ds(mouse)
  2106.  
  2107. hideanim()
  2108.  
  2109. wait(0)
  2110.  
  2111. RW.Parent = nil
  2112.  
  2113. LW.Parent = nil
  2114.  
  2115. RSH.Parent = player.Character.Torso
  2116.  
  2117. LSH.Parent = player.Character.Torso
  2118.  
  2119. end
  2120.  
  2121.  
  2122.  
  2123. Bin.Selected:connect(s)
  2124.  
  2125. Bin.Deselected:connect(ds)
  2126.  
  2127. print("Crossbow loaded.")
  2128.  
  2129. -- mediafire
  2130.  
  2131. --[[
  2132.  
  2133. Copyrighted (C) Fenrier 2013
  2134.  
  2135. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement