Advertisement
KHSora455

Cyber Samurai

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