Advertisement
ChronoShindo

Dual Sword

Jun 22nd, 2016
713
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.29 KB | None | 0 0
  1. --[[
  2.  
  3. ]]
  4. Player = game:GetService("Players").LocalPlayer
  5. Character = Player.Character
  6. PlayerGui = Player.PlayerGui
  7. Backpack = Player.Backpack
  8. Torso = Character.Torso
  9. Head = Character.Head
  10. Humanoid = Character.Humanoid
  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. Neck = Torso.Neck
  20. it=Instance.new
  21. vt=Vector3.new
  22. cf=CFrame.new
  23. euler=CFrame.fromEulerAnglesXYZ
  24. angles=CFrame.Angles
  25. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  26. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  27. attack = false
  28. attacktype = 1
  29. damage = 5
  30. oridamage = 50
  31. attackdebounce = false
  32. ssdebounce=false
  33. MMouse=nil
  34. combo=0
  35. --player
  36. player = nil
  37. --save shoulders
  38. RSH, LSH = nil, nil
  39. --welds
  40. RW, LW = Instance.new("Weld"), Instance.new("Weld")
  41. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  42.  
  43.  
  44. if Character:findFirstChild("Dual Swords",true) ~= nil then
  45. Character:findFirstChild("Dual Swords",true).Parent = nil
  46. end
  47.  
  48.  
  49. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  50. local fp = it("Part")
  51. fp.formFactor = formfactor
  52. fp.Parent = parent
  53. fp.Reflectance = reflectance
  54. fp.Transparency = transparency
  55. fp.CanCollide = false
  56. fp.Locked=true
  57. fp.BrickColor = brickcolor
  58. fp.Name = name
  59. fp.Size = size
  60. fp.Position = Torso.Position
  61. fp.BottomSurface="Smooth"
  62. fp.TopSurface="Smooth"
  63. fp:BreakJoints()
  64. return fp
  65. end
  66.  
  67. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  68. local mesh = it(Mesh)
  69. mesh.Parent = part
  70. if Mesh=="SpecialMesh" then
  71. mesh.MeshType = meshtype
  72. mesh.MeshId = meshid
  73. end
  74. mesh.Offset=offset
  75. mesh.Scale=scale
  76. return mesh
  77. end
  78.  
  79. function weld(parent,part0,part1,c0)
  80. local weld = it("Weld")
  81. weld.Parent = parent
  82. weld.Part0 = part0
  83. weld.Part1 = part1
  84. weld.C0 = c0
  85. return weld
  86. end
  87.  
  88. local modelzorz = Instance.new("Model")
  89. modelzorz.Parent = Character
  90. modelzorz.Name = "Dual Swords"
  91.  
  92. local prt1=part(3,modelzorz,0,0,Torso.BrickColor,"Part1",vt(0.3,0.5,0.3))
  93. local prt2=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part2",vt(0.25,1.5,0.25))
  94. local prt4=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part4",vt(0.3,0.6,0.21))
  95. local prt5=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part5",vt(0.25,0.6,0.16))
  96. local prt6=part(3,modelzorz,0.3,0,BrickColor.new("White"),"Part6",vt(0.25,3,0.16))
  97. local prt7=part(3,modelzorz,0.3,0,BrickColor.new("White"),"Part7",vt(0.1,0.5,0.25))
  98. local prt8=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part8",vt(0.2,1.5,0.2))
  99. local prt9=part(3,modelzorz,0,1,BrickColor.new("Black"),"Hitbox",vt(0.5,4,0.5))
  100.  
  101. local msh1=mesh("BlockMesh",prt1,"","",vt(0,0,0),vt(1,1,1))
  102. local msh2=mesh("BlockMesh",prt2,"","",vt(0,0,0),vt(1,1,1))
  103. local msh4=mesh("BlockMesh",prt4,"","",vt(0,0,0),vt(1,1,1))
  104. local msh5=mesh("BlockMesh",prt5,"","",vt(0,0,0),vt(1,1,1))
  105. local msh6=mesh("BlockMesh",prt6,"","",vt(0,0,0),vt(1,1,0.25))
  106. local msh7=mesh("SpecialMesh",prt7,"Wedge","",vt(0,0,0),vt(0.25,1,1))
  107. local msh8=mesh("CylinderMesh",prt8,"","",vt(0,0,0),vt(1,1,1))
  108.  
  109. local wld1=weld(prt1,prt1,Torso,euler(0,0,0.785)*cf(1,0,-0.5))
  110. local wld2=weld(prt2,prt2,prt1,euler(0,0,0)*cf(0,0,0))
  111. local wld4=weld(prt4,prt4,prt2,euler(0,0,0)*cf(0,-1,0))
  112. local wld5=weld(prt5,prt5,prt4,euler(0,0,0)*cf(0,-0.01,0))
  113. local wld6=weld(prt6,prt6,prt4,euler(0,0,0)*cf(0,-1.5,0))
  114. local wld7=weld(prt7,prt7,prt6,euler(0,-1.57,0)*cf(0,-1.75,0))
  115. local wld8=weld(prt8,prt8,prt6,euler(0,0,0)*cf(0,0.5,0))
  116. local wld9=weld(prt9,prt9,prt6,euler(0,0,0)*cf(0,0,0))
  117.  
  118. local aprt1=part(3,modelzorz,0,0,Torso.BrickColor,"aPart1",vt(0.3,0.5,0.3))
  119. local aprt2=part(3,modelzorz,0,0,BrickColor.new("Black"),"aPart2",vt(0.25,1.5,0.25))
  120. local aprt4=part(3,modelzorz,0,0,BrickColor.new("Black"),"aPart4",vt(0.3,0.6,0.21))
  121. local aprt5=part(3,modelzorz,0,0,BrickColor.new("Really black"),"aPart5",vt(0.25,0.6,0.16))
  122. local aprt6=part(3,modelzorz,0.3,0,BrickColor.new("White"),"aPart6",vt(0.25,3,0.16))
  123. local aprt7=part(3,modelzorz,0.3,0,BrickColor.new("White"),"aPart7",vt(0.1,0.5,0.25))
  124. local aprt8=part(3,modelzorz,0,0,BrickColor.new("Black"),"aPart8",vt(0.2,1.5,0.2))
  125. local aprt9=part(3,modelzorz,0,1,BrickColor.new("Black"),"aHitbox",vt(0.5,4,0.5))
  126.  
  127. local amsh1=mesh("BlockMesh",aprt1,"","",vt(0,0,0),vt(1,1,1))
  128. local amsh2=mesh("BlockMesh",aprt2,"","",vt(0,0,0),vt(1,1,1))
  129. local amsh4=mesh("BlockMesh",aprt4,"","",vt(0,0,0),vt(1,1,1))
  130. local amsh5=mesh("BlockMesh",aprt5,"","",vt(0,0,0),vt(1,1,1))
  131. local amsh6=mesh("BlockMesh",aprt6,"","",vt(0,0,0),vt(1,1,0.25))
  132. local amsh7=mesh("SpecialMesh",aprt7,"Wedge","",vt(0,0,0),vt(0.25,1,1))
  133. local amsh8=mesh("CylinderMesh",aprt8,"","",vt(0,0,0),vt(1,1,1))
  134.  
  135. local awld1=weld(aprt1,aprt1,Torso,euler(0,0,0.785)*cf(-1,0,-0.5))
  136. local awld2=weld(aprt2,aprt2,aprt1,euler(3.14,3.14,0)*cf(0,0,0))
  137. local awld4=weld(aprt4,aprt4,aprt2,euler(0,0,0)*cf(0,-1,0))
  138. local awld5=weld(aprt5,aprt5,aprt4,euler(0,0,0)*cf(0,-0.01,0))
  139. local awld6=weld(aprt6,aprt6,aprt4,euler(0,0,0)*cf(0,-1.5,0))
  140. local awld7=weld(aprt7,aprt7,aprt6,euler(0,-1.57,0)*cf(0,-1.75,0))
  141. local awld8=weld(aprt8,aprt8,aprt6,euler(0,0,0)*cf(0,0.5,0))
  142. local awld9=weld(aprt9,aprt9,aprt6,euler(0,0,0)*cf(0,0,0))
  143.  
  144. numb=0
  145. numb2=0
  146. for i=1,8 do
  147. local prt3=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part3",vt(0.2,0.4,0.2))
  148. local msh3=mesh("BlockMesh",prt3,"","",vt(0,0,0),vt(1+numb2,1+numb2,1+numb2))
  149. local wld3=weld(prt3,prt3,prt2,cf(0.8,0,0)*euler(0,0,1.57-numb))
  150. local dprt3=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part3",vt(0.2,0.2,0.2))
  151. local dmsh3=mesh("BlockMesh",dprt3,"","",vt(0,0,0),vt(0.8+numb2,1.01+numb2,1+numb2))
  152. local dwld3=weld(dprt3,dprt3,prt3,euler(0,0,1.57)*cf(0.2,0,0))
  153.  
  154. local aprt3=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part3",vt(0.2,0.4,0.2))
  155. local amsh3=mesh("BlockMesh",aprt3,"","",vt(0,0,0),vt(1+numb2,1+numb2,1+numb2))
  156. local awld3=weld(aprt3,aprt3,aprt2,cf(0.8,0,0)*euler(0,0,1.57-numb))
  157. local daprt3=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part3",vt(0.2,0.2,0.2))
  158. local damsh3=mesh("BlockMesh",daprt3,"","",vt(0,0,0),vt(0.8+numb2,1.01+numb2,1+numb2))
  159. local dawld3=weld(daprt3,daprt3,aprt3,euler(0,0,1.57)*cf(0.2,0,0))
  160. numb2=numb2+0.01
  161. numb=numb+0.3925
  162. end
  163. if (script.Parent.className ~= "HopperBin") then
  164. Tool = Instance.new("HopperBin")
  165. Tool.Parent = Backpack
  166. Tool.Name = "Dual Swords"
  167. script.Parent = Tool
  168. end
  169. Bin = script.Parent
  170.  
  171. local bg = it("BodyGyro")
  172. bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  173. bg.P = 20e+003
  174. bg.Parent = nil
  175.  
  176. so = function(id,par,vol,pit)
  177. coroutine.resume(coroutine.create(function()
  178. local sou = Instance.new("Sound",par or workspace)
  179. sou.Volume=vol
  180. sou.Pitch=pit or 1
  181. sou.SoundId=id
  182. wait()
  183. sou:play()
  184. wait(6)
  185. sou:Remove()
  186. end))
  187. end
  188.  
  189. function unequipweld()
  190. wld1.Part1=Torso
  191. wld1.C0=euler(0,0,0.785)*cf(1,0,-0.5)
  192. awld1.Part1=Torso
  193. awld1.C0=euler(0,0,0.785)*cf(-1,0,-0.5)
  194. end
  195.  
  196. function equipweld()
  197. wld1.Part1=RightArm
  198. wld1.C0=euler(1.57,0,-1.57)*cf(0,1,0)
  199. awld1.Part1=LeftArm
  200. awld1.C0=euler(-1.57,0,1.57)*cf(0,1,0)
  201. end
  202.  
  203. function hideanim()
  204. equipped=false
  205. wait(0.1)
  206. bg.Parent=nil
  207. unequipweld()
  208. end
  209.  
  210. function equipanim()
  211. equipped=true
  212. wait(0.1)
  213. equipweld()
  214. RW.C0=cf(1.5, 0.5, -0.25) * euler(1.5,0,0)
  215. RW.C1=cf(0, 0.5, 0) * euler(0,-0.6,0)
  216. LW.C0=cf(-1.5, 0.5, 0) * euler(1,0,0)
  217. LW.C1=cf(0, 0.5, 0) * euler(0,0.4,0)
  218. end
  219.  
  220. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  221. return game.Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  222. end
  223.  
  224. function MagicCircle(brickcolor,cframe,x1,y1,z1,x2,y2,z2,x3,y3,z3)
  225. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  226. prt.Anchored=true
  227. prt.CFrame=cframe*cf(x2,y2,z2)
  228. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  229. coroutine.resume(coroutine.create(function()
  230. for i=0,1,0.1 do
  231. wait()
  232. prt.CFrame=prt.CFrame
  233. prt.Transparency=i
  234. msh.Scale=msh.Scale+vt(x3,y3,z3)
  235. end
  236. prt.Parent=nil
  237. end))
  238. end
  239.  
  240. function SpecialEffect()
  241. local prt=part(3,workspace,1,0,BrickColor.new("White"),"Part",vt(1,1,1))
  242. prt.Anchored=true
  243. prt.CFrame=Torso.CFrame
  244. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5))
  245. coroutine.resume(coroutine.create(function(Part,Mesh)
  246. for i=0,1,0.2 do
  247. wait(0)
  248. Part.Transparency=i
  249. Mesh.Scale=Mesh.Scale+vt(10,10,10)
  250. end
  251. prt.Parent=nil
  252. end),prt,msh)
  253. end
  254.  
  255. function effect(Color,Ref,LP,P1,returnn)
  256. local effectsmsh = Instance.new("BlockMesh")
  257. effectsmsh.Scale = Vector3.new(0.2,1,0.2)
  258. effectsmsh.Name = "Mesh"
  259. local effectsg = Instance.new("Part")
  260. effectsg.formFactor = 3
  261. effectsg.CanCollide = false
  262. effectsg.Name = "Eff"
  263. effectsg.Locked = true
  264. effectsg.Anchored = true
  265. effectsg.Size = Vector3.new(0.5,1,0.5)
  266. effectsg.Parent = workspace
  267. effectsmsh.Parent = effectsg
  268. effectsg.BrickColor = BrickColor.new(Color)
  269. effectsg.Reflectance = Ref
  270. local point1 = P1
  271. local mg = (LP.p - point1.p).magnitude
  272. effectsg.Size = Vector3.new(0.5,mg,0.5)
  273. effectsg.CFrame = CFrame.new((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
  274. if returnn then return effectsg end
  275. coroutine.resume(coroutine.create(function(Part,Mesh)
  276. if not returnn then
  277. for i = 0 , 1 , 0.05 do
  278. wait()
  279. Part.Transparency = 1*i
  280. Mesh.Scale = Vector3.new(0.2-0.2*i,1,0.2-0.2*i)
  281. end
  282. wait()
  283. Part.Parent = nil
  284. end
  285. end),effectsg,effectsmsh)
  286. end
  287.  
  288. Damagefunc1=function(hit,Damage,Knockback)
  289. if hit.Parent==nil then
  290. return
  291. end
  292. CPlayer=Bin
  293. h=hit.Parent:FindFirstChild("Humanoid")
  294. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  295. if attackdebounce == false then
  296. attackdebounce = true
  297. coroutine.resume(coroutine.create(function()
  298. wait(0.2)
  299. attackdebounce = false
  300. end))
  301. Damage=Damage
  302. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  303. return
  304. end]]
  305. -- hs(hit,1.2)
  306. c=Instance.new("ObjectValue")
  307. c.Name="creator"
  308. c.Value=game.Players.LocalPlayer
  309. c.Parent=h
  310. game:GetService("Debris"):AddItem(c,.5)
  311. Damage=Damage+math.random(0,10)
  312. -- h:TakeDamage(Damage)
  313. blocked=false
  314. block=hit.Parent:findFirstChild("Block")
  315. if block~=nil then
  316. print("herp")
  317. if block.Value>0 then
  318. blocked=true
  319. block.Value=block.Value-1
  320. print(block.Value)
  321. end
  322. end
  323. if blocked==false then
  324. -- h:TakeDamage(Damage)
  325. h.Health=h.Health-Damage
  326. showDamage(hit.Parent,Damage,.5)
  327. else
  328. h:TakeDamage(1)
  329. showDamage(hit.Parent,1,.5)
  330. end
  331. vp=Instance.new("BodyVelocity")
  332. vp.P=500
  333. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  334. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  335. vp.velocity=Torso.CFrame.lookVector*Knockback+Torso.Velocity/1.05
  336. if Knockback>0 then
  337. vp.Parent=hit.Parent.Torso
  338. end
  339. game:GetService("Debris"):AddItem(vp,.25)
  340. game:GetService("Debris"):AddItem(r,.5)
  341. c=Instance.new("ObjectValue")
  342. c.Name="creator"
  343. c.Value=Player
  344. c.Parent=h
  345. game:GetService("Debris"):AddItem(c,.5)
  346. CRIT=false
  347. hitDeb=true
  348. AttackPos=6
  349. end
  350. end
  351. end
  352.  
  353. Damagefunc2=function(hit,Damage,Knockback)
  354. if attackdebounce == false then
  355. attackdebounce = true
  356. coroutine.resume(coroutine.create(function()
  357. wait(0.1)
  358. attackdebounce = false
  359. end))
  360. if hit.Parent==nil then
  361. return
  362. end
  363. CPlayer=Bin
  364. blocked=false
  365. h=hit.Parent:FindFirstChild("Humanoid")
  366. if h~=nil and hit.Parent:FindFirstChild("Torso")~=nil then
  367. Damage=Damage
  368. c=it("ObjectValue")
  369. c.Name="creator"
  370. c.Value=game.Players.LocalPlayer
  371. c.Parent=h
  372. game:GetService("Debris"):AddItem(c,.5)
  373. -- print(c.Value)
  374. --[[ if math.random(0,99)+math.random()<=7.8 then
  375. CRIT=true
  376. Damage=Damage*2
  377. s=it("Sound")
  378. s.SoundId="http://www.roblox.com/asset/?id=2801263"
  379. s.Volume=1
  380. s.Pitch=2
  381. s.Parent=hit
  382. s.PlayOnRemove=true
  383. s.Parent=nil
  384.  
  385. end]]
  386. Damage=Damage+math.random(0,10)
  387. -- Blood(hit.CFrame*cf(math.random(-10,10)/10,math.random(-10,10)/10,0),math.floor(Damage/2))
  388. blocked=false
  389. block=hit.Parent:findFirstChild("Block")
  390. if block~=nil then
  391. print("herp")
  392. if block.Value>0 then
  393. blocked=true
  394. block.Value=block.Value-3
  395. print(block.Value)
  396. end
  397. end
  398. if blocked==false then
  399. -- h:TakeDamage(Damage)
  400. h.Health=h.Health-Damage
  401. showDamage(hit.Parent,Damage,.5)
  402. else
  403. h:TakeDamage(1)
  404. showDamage(hit.Parent,1,.5)
  405. end
  406. --if blocked==false then
  407. local angle = (hit.Position-(Torso.Position+Vector3.new(0,0,0))).unit
  408. print(angle)
  409. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  410. rl=Instance.new("BodyAngularVelocity")
  411. rl.P=3000
  412. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  413. rl.angularvelocity=Vector3.new(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  414. rl.Parent=hit
  415. coroutine.resume(coroutine.create(function(vel)
  416. wait(1)
  417. vel:Remove()
  418. end),rl)
  419. --end
  420. local bodyVelocity=Instance.new("BodyVelocity")
  421. bodyVelocity.velocity=angle*40+Vector3.new(0,0,0)
  422. bodyVelocity.P=5000
  423. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  424. bodyVelocity.Parent=hit
  425. coroutine.resume(coroutine.create(function(Vel)
  426. wait(0.7)
  427. Vel:Remove()
  428. end),bodyVelocity)
  429. game:GetService("Debris"):AddItem(vp,1)
  430. c=it("ObjectValue")
  431. c.Name="creator"
  432. c.Value=Player
  433. c.Parent=h
  434. game:GetService("Debris"):AddItem(c,.5)
  435. CRIT=false
  436. hitDeb=true
  437. AttackPos=6
  438. end
  439. end
  440. end
  441.  
  442. showDamage=function(Char,Dealt,du)
  443. m=Instance.new("Model")
  444. m.Name=tostring(Dealt)
  445. h=Instance.new("Humanoid")
  446. h.Health=0
  447. h.MaxHealth=0
  448. h.Parent=m
  449. c=Instance.new("Part")
  450. c.Transparency=0
  451. c.BrickColor=BrickColor:Red()
  452. if CRIT==true then
  453. c.BrickColor=BrickColor.new("Really red")
  454. end
  455. c.Name="Head"
  456. c.TopSurface=0
  457. c.BottomSurface=0
  458. c.formFactor="Plate"
  459. c.Size=Vector3.new(1,.4,1)
  460. ms=Instance.new("CylinderMesh")
  461. ms.Scale=Vector3.new(.8,.8,.8)
  462. if CRIT==true then
  463. ms.Scale=Vector3.new(1,1.25,1)
  464. end
  465. ms.Parent=c
  466. c.Reflectance=0
  467. Instance.new("BodyGyro").Parent=c
  468. c.Parent=m
  469. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  470. f=Instance.new("BodyPosition")
  471. f.P=2000
  472. f.D=100
  473. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  474. f.position=c.Position+Vector3.new(0,3,0)
  475. f.Parent=c
  476. game:GetService("Debris"):AddItem(m,.5+du)
  477. c.CanCollide=false
  478. m.Parent=workspace
  479. c.CanCollide=false
  480. end
  481.  
  482. function oneslash()
  483. attack=true
  484. combo=1
  485. for i=0,1,0.1 do
  486. wait()
  487. RW.C0=cf(1.5, 0.5, -0.25+0.25*i) * euler(1.5+1*i,0,0)
  488. RW.C1=cf(0, 0.5, 0) * euler(0,-0.6+0.2*i,0)
  489. LW.C0=cf(-1.5, 0.5, 0) * euler(1+1.5*i,0,0)
  490. LW.C1=cf(0, 0.5, 0) * euler(0,0.4,0)
  491. end
  492. local LastPoint=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  493. local LastPoint2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  494. so("http://roblox.com/asset/?id=10209640",LeftArm,1,1)
  495. so("http://roblox.com/asset/?id=10209640",RightArm,1,1)
  496. con1=prt9.Touched:connect(function(hit) Damagefunc1(hit,20,10) end)
  497. con2=aprt9.Touched:connect(function(hit) Damagefunc1(hit,20,10) end)
  498. for i=0,1,0.2 do
  499. wait()
  500. RW.C0=cf(1.5, 0.5, 0) * euler(2.5-3*i,0,0.6*i)
  501. LW.C0=cf(-1.5, 0.5, 0) * euler(2.5-3*i,0,-0.6*i)
  502. local Point=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  503. effect("White",0.5,LastPoint,Point)
  504. LastPoint=Point
  505. local Point2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  506. effect("White",0.5,LastPoint2,Point2)
  507. LastPoint2=Point2
  508. end
  509. con1:disconnect()
  510. con2:disconnect()
  511. attack=false
  512. end
  513. function twoslash()
  514. attack=true
  515. combo=2
  516. for i=0,1,0.1 do
  517. wait()
  518. RW.C0=cf(1.5, 0.5, 0) * euler(-0.5+2.07*i,0,0.6-0.6*i)
  519. RW.C1=cf(0, 0.5, 0) * euler(0,-0.4-0.87*i,0)
  520. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.5+2.07*i,0,-0.6+0.6*i)
  521. LW.C1=cf(0, 0.5, 0) * euler(0,0.4+1.37*i,0)
  522. end
  523. local LastPoint=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  524. local LastPoint2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  525. so("http://roblox.com/asset/?id=10209640",LeftArm,1,1)
  526. so("http://roblox.com/asset/?id=10209640",RightArm,1,1)
  527. con1=prt9.Touched:connect(function(hit) Damagefunc1(hit,20,10) end)
  528. con2=aprt9.Touched:connect(function(hit) Damagefunc1(hit,20,10) end)
  529. for i=0,1,0.2 do
  530. wait()
  531. RW.C0=cf(1.5, 0.5, 0) * euler(1.57,0,2*i)
  532. RW.C1=cf(0, 0.5, 0) * euler(0,-1.27-0.3*i,0)
  533. LW.C0=cf(-1.5, 0.5, 0) * euler(1.57,0,-2*i)
  534. LW.C1=cf(0, 0.5, 0) * euler(0,1.77-0.2*i,0)
  535. local Point=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  536. effect("White",0.5,LastPoint,Point)
  537. LastPoint=Point
  538. local Point2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  539. effect("White",0.5,LastPoint2,Point2)
  540. LastPoint2=Point2
  541. end
  542. con1:disconnect()
  543. con2:disconnect()
  544. attack=false
  545. end
  546. function threeslash()
  547. attack=true
  548. combo=3
  549. for i=0,1,0.1 do
  550. wait()
  551. RW.C0=cf(1.5-1.5*i, 0.5, -1*i) * euler(1.57,0,2-3*i)
  552. LW.C0=cf(-1.5, 0.5, 0) * euler(1.57+0.93*i,0,-2+2*i)
  553. LW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.57*i,0)
  554. end
  555. local LastPoint=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  556. so("http://roblox.com/asset/?id=10209640",RightArm,1,1)
  557. con1=prt9.Touched:connect(function(hit) Damagefunc1(hit,10,5) end)
  558. for i=0,1,0.2 do
  559. wait()
  560. RW.C0=cf(1.5*i, 0.5, -1+1*i) * euler(1.57,0,-1+3*i)
  561. local Point=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  562. effect("White",0.5,LastPoint,Point)
  563. LastPoint=Point
  564. end
  565. con1:disconnect()
  566. local LastPoint2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  567. so("http://roblox.com/asset/?id=10209640",LeftArm,1,1)
  568. con2=aprt9.Touched:connect(function(hit) Damagefunc1(hit,10,5) end)
  569. for i=0,1,0.2 do
  570. wait()
  571. LW.C0=cf(-1.5, 0.5, 0) * euler(2.5-3*i,0,0)
  572. local Point2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  573. effect("White",0.5,LastPoint2,Point2)
  574. LastPoint2=Point2
  575. end
  576. con2:disconnect()
  577. attack=false
  578. end
  579.  
  580. function TornadoSlash()
  581. attack=true
  582. for i=0,1,0.1 do
  583. wait()
  584. RW.C0=cf(1.5, 0.5, -0.25+0.25*i) * euler(1.5+0.07*i,0,1.57*i)
  585. RW.C1=cf(0, 0.5, 0) * euler(0,-0.6+2.4*i,0)
  586. LW.C0=cf(-1.5, 0.5, 0) * euler(1+0.57*i,0,-1.57*i)
  587. LW.C1=cf(0, 0.5, 0) * euler(0,0.4+1.4*i,0)
  588. end
  589. bg.Parent=Torso
  590. bg.cframe=Torso.CFrame
  591. CF=Torso.CFrame
  592. local LastPoint=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  593. local LastPoint2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  594. con1=prt9.Touched:connect(function(hit) Damagefunc1(hit,10,10) end)
  595. con2=aprt9.Touched:connect(function(hit) Damagefunc1(hit,10,10) end)
  596. for i=1,3 do
  597. so("http://roblox.com/asset/?id=10209640",LeftArm,1,1)
  598. so("http://roblox.com/asset/?id=10209640",RightArm,1,1)
  599. for i=0,1,0.1 do
  600. wait()
  601. bg.cframe=CF*euler(0,6.283*i,0)
  602. local Point=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  603. effect("White",0.5,LastPoint,Point)
  604. LastPoint=Point
  605. local Point2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  606. effect("White",0.5,LastPoint2,Point2)
  607. LastPoint2=Point2
  608. end
  609. end
  610. con1:disconnect()
  611. con2:disconnect()
  612. bg.Parent=nil
  613. for i=0,1,0.1 do
  614. wait()
  615. RW.C0=cf(1.5, 0.5, 0) * euler(1.57,0,1.57-1.47*i)
  616. RW.C1=cf(0, 0.5, 0) * euler(0,1.8-2.5*i,0)
  617. LW.C0=cf(-1.5, 0.5, 0) * euler(1.57,0,-1.57+1.47*i)
  618. LW.C1=cf(0, 0.5, 0) * euler(0,1.8-1.1*i,0)
  619. end
  620. local LastPoint=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  621. local LastPoint2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  622. so("http://roblox.com/asset/?id=10209640",LeftArm,1,1)
  623. so("http://roblox.com/asset/?id=10209640",RightArm,1,1)
  624. con1=prt9.Touched:connect(function(hit) Damagefunc1(hit,10,10) end)
  625. con2=aprt9.Touched:connect(function(hit) Damagefunc1(hit,10,10) end)
  626. for i=0,1,0.2 do
  627. wait()
  628. RW.C0=cf(1.5, 0.5, 0) * euler(1.57-2*i,0,0.1+1*i)
  629. LW.C0=cf(-1.5, 0.5, 0) * euler(1.57-2*i,0,-0.1-1*i)
  630. local Point=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  631. effect("White",0.5,LastPoint,Point)
  632. LastPoint=Point
  633. local Point2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  634. effect("White",0.5,LastPoint2,Point2)
  635. LastPoint2=Point2
  636. end
  637. con1:disconnect()
  638. con2:disconnect()
  639. wait(0.1)
  640. for i=0,1,0.1 do
  641. wait()
  642. RW.C0=cf(1.5, 0.5, 0) * euler(-0.43+1.93*i,0,1.1-1.1*i)
  643. RW.C1=cf(0, 0.5, 0) * euler(0,-0.7+0.1*i,0)
  644. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.43+1.43*i,0,-1.1+1.1*i)
  645. LW.C1=cf(0, 0.5, 0) * euler(0,0.7-0.3*i,0)
  646. end
  647. attack=false
  648. end
  649.  
  650. function MultiSpin()
  651. attack=true
  652. for i=0,1,0.1 do
  653. wait()
  654. RW.C0=cf(1.5, 0.5, -0.25+0.25*i) * euler(1.5+2*i,0,0)
  655. RW.C1=cf(0, 0.5, 0) * euler(0,-0.6+0.6*i,0)
  656. LW.C0=cf(-1.5, 0.5, 0) * euler(1+2.5*i,0,0)
  657. LW.C1=cf(0, 0.5, 0) * euler(0,0.4-0.4*i,0)
  658. end
  659. local LastPoint=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  660. local LastPoint2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  661. so("http://roblox.com/asset/?id=10209640",LeftArm,1,1)
  662. so("http://roblox.com/asset/?id=10209640",RightArm,1,1)
  663. con1=prt9.Touched:connect(function(hit) Damagefunc1(hit,10,10) end)
  664. con2=aprt9.Touched:connect(function(hit) Damagefunc1(hit,10,10) end)
  665. --6.28
  666. for i=0,1.05,0.05 do
  667. wait()
  668. if i==0.35 or i==0.65 then
  669. so("http://roblox.com/asset/?id=10209640",LeftArm,1,1)
  670. so("http://roblox.com/asset/?id=10209640",RightArm,1,1)
  671. end
  672. wld1.C0=euler(1.57,(-6.28*3)*i,-1.57)*cf(0,1,0)
  673. awld1.C0=euler(-1.57,(6.28*3)*i,1.57)*cf(0,1,0)
  674. RW.C0=cf(1.5, 0.5, 0) * euler(3.5-4*i,0,0)
  675. LW.C0=cf(-1.5, 0.5, 0) * euler(3.5-4*i,0,0)
  676. local Point=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  677. effect("White",0.5,LastPoint,Point)
  678. LastPoint=Point
  679. local Point2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  680. effect("White",0.5,LastPoint2,Point2)
  681. LastPoint2=Point2
  682. end
  683. con1:disconnect()
  684. con2:disconnect()
  685. for i=0,1,0.1 do
  686. wait()
  687. RW.C0=cf(1.5, 0.5, 0) * euler(-0.5+2*i,0,0)
  688. RW.C1=cf(0, 0.5, 0) * euler(0,-0.6*i,0)
  689. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.5+1.5*i,0,0)
  690. LW.C1=cf(0, 0.5, 0) * euler(0,0.4*i,0)
  691. end
  692. attack=false
  693. end
  694.  
  695. function DashSlash()
  696. attack=true
  697. for i=0,1,0.1 do
  698. wait()
  699. RW.C0=cf(1.5, 0.5, -0.25+0.25*i) * euler(1.5-2*i,0,0.3*i)
  700. RW.C1=cf(0, 0.5, 0) * euler(0,-0.6+1.6*i,0)
  701. LW.C0=cf(-1.5, 0.5, 0) * euler(1-1.5*i,0,-0.3*i)
  702. LW.C1=cf(0, 0.5, 0) * euler(0,0.4-1.4*i,0)
  703. end
  704. local LastPoint=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  705. local LastPoint2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  706. while holddash==true do
  707. wait()
  708. Humanoid.WalkSpeed=25
  709. local Point=prt6.CFrame*CFrame.new(0,prt6.Size.Y/1.5,0)
  710. effect("White",0.5,LastPoint,Point)
  711. LastPoint=Point
  712. local Point2=aprt6.CFrame*CFrame.new(0,aprt6.Size.Y/1.5,0)
  713. effect("White",0.5,LastPoint2,Point2)
  714. LastPoint2=Point2
  715. end
  716. Humanoid.WalkSpeed=16
  717. for i=0,1,0.1 do
  718. wait()
  719. RW.C0=cf(1.5, 0.5, -0.25*i) * euler(-0.5+2*i,0,0.3-0.3*i)
  720. RW.C1=cf(0, 0.5, 0) * euler(0,1-1.6*i,0)
  721. LW.C0=cf(-1.5, 0.5, 0) * euler(-0.5+1.5*i,0,-0.3+0.3*i)
  722. LW.C1=cf(0, 0.5, 0) * euler(0,-1+1.4*i,0)
  723. end
  724. attack=false
  725. end
  726.  
  727. function ChangeWeapon()
  728. attack=true
  729. for i=0,1,0.1 do
  730. wait()
  731. wld1.C0=euler(1.57,0.4*i,-1.57)*cf(0,1,0)
  732. awld1.C0=euler(-1.57,0.4*i,1.57-3.14*i)*cf(0,1,0)
  733. RW.C0=cf(1.5-0.5*i, 0.5, -0.25-0.25*i) * euler(1.5+0.07*i,0,-0.4*i)
  734. RW.C1=cf(0, 0.5, 0) * euler(0,-0.6+2.17*i,0)
  735. LW.C0=cf(-1.5+0.5*i, 0.5, -0.5*i) * euler(1+0.57*i,0,0.4*i)
  736. LW.C1=cf(0, 0.5, 0) * euler(0,0.4-1.97*i,0)
  737. end
  738. for i=0,1,0.1 do
  739. wait()
  740. wld1.C0=euler(1.57,0.4+0.2*i,-1.57)*cf(0,1,0)
  741. awld1.C0=euler(-1.57,0.4+0.2*i,-1.57)*cf(0,1,0)
  742. RW.C0=cf(1.5-0.5, 0.5, -0.5) * euler(1.57,0,-0.4-0.2*i)
  743. LW.C0=cf(-1.5+0.5, 0.5, -0.5) * euler(1.57,0,0.4+0.2*i)
  744. end
  745. awld1.Part1=prt1
  746. awld1.C0=cf(0,0,0)
  747. for i=0,1,0.1 do
  748. wait()
  749. wld1.C0=euler(1.57,0.6-0.6*i,-1.57)*cf(0,1,0)
  750. RW.C0=cf(1.5-0.5+0.5*i, 0.5, -0.5+0.5*i) * euler(1.57-0.57*i,0,-0.6)
  751. RW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.57*i,0)
  752. LW.C0=cf(-1.5+0.5-0.5*i, 0.5, -0.5+0.5*i) * euler(1.57-1.57*i,0,0.6-0.4*i)
  753. LW.C1=cf(0, 0.5, 0) * euler(0,-1.57+1.57*i,0)
  754. end
  755. attack=false
  756. end
  757.  
  758. function ob1d(mouse)
  759. if attack == true then return end
  760. hold=true
  761. --attack=true
  762. if combo==0 then
  763. oneslash()
  764. elseif combo==1 then
  765. twoslash()
  766. elseif combo==2 then
  767. threeslash()
  768. end
  769. coroutine.resume(coroutine.create(function()
  770. wait(0.5)
  771. if attack==false then
  772. combo=0
  773. wld1.C0=euler(1.57,0,-1.57)*cf(0,1,0)
  774. awld1.C0=euler(-1.57,0,1.57)*cf(0,1,0)
  775. RW.C0=cf(1.5, 0.5, -0.25) * euler(1.5,0,0)
  776. RW.C1=cf(0, 0.5, 0) * euler(0,-0.6,0)
  777. LW.C0=cf(-1.5, 0.5, 0) * euler(1,0,0)
  778. LW.C1=cf(0, 0.5, 0) * euler(0,0.4,0)
  779. end
  780. end))
  781. end
  782.  
  783. function ob1u(mouse)
  784. hold = false
  785. end
  786.  
  787. buttonhold = false
  788.  
  789. eul=0
  790. holddash=false
  791. function key(key)
  792. if attack == true then return end
  793. if key=="z" then
  794. TornadoSlash()
  795. end
  796. if key=="x" then
  797. MultiSpin()
  798. end
  799. if key=="c" then
  800. holddash=true
  801. DashSlash()
  802. end
  803. if key=="v" then
  804. ChangeWeapon()
  805. end
  806. combo=0
  807. end
  808.  
  809. function key2(key)
  810. if key=="c" then
  811. holddash=false
  812. end
  813. end
  814.  
  815. function s(mouse)
  816. mouse.Button1Down:connect(function() ob1d(mouse) end)
  817. mouse.Button1Up:connect(function() ob1u(mouse) end)
  818. mouse.KeyDown:connect(key)
  819. mouse.KeyUp:connect(key2)
  820. unsheathed = true
  821. player = Player
  822. ch = Character
  823. MMouse = mouse
  824. RSH = ch.Torso["Right Shoulder"]
  825. LSH = ch.Torso["Left Shoulder"]
  826. --
  827. RSH.Parent = nil
  828. LSH.Parent = nil
  829. --
  830. RW.Part0 = ch.Torso
  831. RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  832. RW.C1 = CFrame.new(0, 0.5, 0)
  833. RW.Part1 = ch["Right Arm"]
  834. RW.Parent = ch.Torso
  835. --_G.R = RW
  836. --
  837. LW.Part0 = ch.Torso
  838. LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  839. LW.C1 = CFrame.new(0, 0.5, 0)
  840. LW.Part1 = ch["Left Arm"]
  841. LW.Parent = ch.Torso
  842. --_G.L = LW
  843. --
  844. equipanim()
  845. end
  846.  
  847. function ds(mouse)
  848. hideanim()
  849. wait(0)
  850. RW.Parent = nil
  851. LW.Parent = nil
  852. RSH.Parent = player.Character.Torso
  853. LSH.Parent = player.Character.Torso
  854. end
  855.  
  856. Bin.Selected:connect(s)
  857. Bin.Deselected:connect(ds)
  858. print("Dual Swords loaded.")
  859. -- mediafire
  860. --[[
  861. Copyrighted (C) Fenrier 2013
  862. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement