Advertisement
ohhhhhhshdhashdahsd

Sword

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