Advertisement
memberhero

Cyber Samurai FE

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