UltimateGate

BLACK MAGIC - Cyber Samurai

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