Advertisement
freddy1927563

Untitled

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