FuntimeArtic

op cyber samurai

Sep 2nd, 2017
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 63.74 KB | None | 0 0
  1. --[[
  2. Cyber Samurai Class Made by Fenrier.
  3. ]]
  4. Player=game:GetService("Players").LocalPlayer
  5. Character=Player.Character
  6. PlayerGui=Player.PlayerGui
  7. Backpack=Player.Backpack
  8. Torso=Character.Torso
  9. Head=Character.Head
  10. Humanoid=Character.Humanoid
  11. LeftArm=Character["Left Arm"]
  12. LeftLeg=Character["Left Leg"]
  13. RightArm=Character["Right Arm"]
  14. RightLeg=Character["Right Leg"]
  15. LS=Torso["Left Shoulder"]
  16. LH=Torso["Left Hip"]
  17. RS=Torso["Right Shoulder"]
  18. RH=Torso["Right Hip"]
  19. Neck=Torso.Neck
  20. it=Instance.new
  21. vt=Vector3.new
  22. cf=CFrame.new
  23. euler=CFrame.fromEulerAnglesXYZ
  24. angles=CFrame.Angles
  25. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  26. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  27. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  28. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  29. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  30. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  31. RootPart=Character.HumanoidRootPart
  32. RootJoint=RootPart.RootJoint
  33. RootCF=euler(-1.57,0,3.14)
  34. attack = false
  35. attackdebounce = false
  36. MMouse=nil
  37. combo=0
  38. mana=0
  39. ripostestance=false
  40. local idle=0
  41. local Anim="Idle"
  42. --player
  43. player=nil
  44. --save shoulders
  45. RSH, LSH=nil, nil
  46. --welds
  47. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  48. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  49. LH=Torso["Left Hip"]
  50. RH=Torso["Right Hip"]
  51. Sheathed=true
  52. SwordStance=false
  53. Charge=0
  54.  
  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=vt(.2,.2,.2)
  88. fp.Position=Torso.Position
  89. NoOutline(fp)
  90. fp.Material="Neon"
  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=Torso.BrickColor
  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("Hot pink"),"Handle",vt())
  167. local prt1=part(3,modelzorz,0,0,BrickColor.new("Hot pink"),"Part1",vt())
  168. local prt2=part(3,modelzorz,0,0,Color1,"Part2",vt())
  169. local prt3=part(3,modelzorz,0,0,BrickColor.new("Hot pink"),"Part3",vt())
  170. local prt4=part(3,modelzorz,0,0,BrickColor.new("Hot pink"),"Part4",vt())
  171. local prt11=part(3,modelzorz,0,0,Color1,"Part11",vt())
  172. local prt12=part(3,modelzorz,0,0,BrickColor.new("Hot pink"),"Part12",vt())
  173. local prt13=part(3,modelzorz,0,0,BrickColor.new("Hot pink"),"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("Hot pink"),"Part15",vt())
  177. local prt16=part(3,modelzorz,.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,-.7,0),vt(1.5,27,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,8,1))
  187. local msh12=mesh("BlockMesh",prt12,"","",vt(0,0,0),vt(0.9,8,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,30,0.5))
  191. local msh16=mesh("BlockMesh",prt16,"","",vt(0,0,0),vt(0.2,30,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.2,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,3.6,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,3.5,0))
  206. local wld16=weld(prt16,prt16,prt12,euler(0,0,0)*cf(0,3.5,0.1))
  207. local wld17=weld(prt17,prt17,prt16,euler(3.14,3.14,0)*cf(0,3.2,-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("Hot pink"),"Cyber Sig Part1",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,"Cyber Sig Part2",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,50,30,50,math.random(30,50),"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,10,15,math.random(5,20),"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. LastPoint=Point*cf(0,0,0)
  584. so("http://www.roblox.com/asset/?id=161006212",prt11,1,1.3)
  585. local ef=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  586. ef.Anchored=true
  587. ef.CFrame=RootPart.CFrame*cf(0,0,-3)
  588. MagniDamage(ef,5,20,25,math.random(15,20),"Normal")
  589. game:GetService("Debris"):AddItem(ef,2)
  590. for i=0,1,0.1 do
  591. wld11.C0=euler(3.14-1.57*i,3.14,3.14)*cf(0,1,0)
  592. Torso.Neck.C0=necko*euler(0,0,0.6-1.2*i)
  593. RootJoint.C0=RootCF*euler(0,0,-0.6+1.2*i)
  594. RW.C0=cf(1.5-1*i,0.5,-0.5*i)*euler(1.5+0.2*i,1.57,0)
  595. RW.C1=cf(0,0.5,0)*euler(1.2-2.1*i,0.5*i,0)
  596. LW.C0=cf(-1.5,0.5,0)*euler(0,-0.6,-0.4)
  597. LW.C1=cf(0,0.5,0)*euler(0.3,0,0)
  598. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  599. effect("Bright red",0.4,LastPoint,Point)
  600. LastPoint=Point
  601. end
  602. n=2
  603. for i=0,1,0.05 do
  604. swait()
  605. wld11.C0=euler(1.57,3.14,3.14)*cf(0,1,0)
  606. Torso.Neck.C0=necko*euler(0,0,-0.6-0.1*i*n)
  607. RootJoint.C0=RootCF*euler(0,0,0.6+0.1*i*n)
  608. RW.C0=cf(.5,0.5,-0.5)*euler(1.7,1.57,0)
  609. RW.C1=cf(0,0.5,0)*euler(-0.9-0.2*i*n,0.5,0)
  610. LW.C0=cf(-1.5,0.5,0)*euler(0,-0.6+0.2*i*n,-0.4+0.2*i*n)
  611. LW.C1=cf(0,0.5,0)*euler(0.3+0.2*i*n,0,0)
  612. n=n-0.05
  613. end
  614. attack=false
  615. end
  616.  
  617. function attackthree()
  618. attack=true
  619. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  620. LastPoint=Point*cf(0,0,0)
  621. con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,20,35,math.random(25,30),"Normal",RootPart,.2,1,nil,1) end)
  622. hitbox.Parent=modelzorz
  623. hitbox.Size=vt(1,4,1)
  624. hitbox.Transparency=1
  625. hitbox.CFrame=prt16.CFrame
  626. so("http://www.roblox.com/asset/?id=161006195",prt11,1,0.9)
  627. for i=0,1,0.2 do
  628. swait()
  629. wld11.C0=clerp(wld11.C0,euler(0,3.14,0)*cf(0,1,0),.3)
  630. Torso.Neck.C0=clerp(Neck.C0,necko*euler(0,0,-0.5),.3)
  631. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0.5),.3)
  632. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.7,1.57,0),.3)
  633. RW.C1=clerp(RW.C1,cf(0,0.5,0)*euler(1.5,0.5,0),.3)
  634. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,-0.4,-0.2),.3)
  635. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0.5,0,0),.3)
  636. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  637. effect("Bright red",0.4,LastPoint,Point)
  638. LastPoint=Point
  639. hitbox.CFrame=prt16.CFrame
  640. end
  641. con1:disconnect()
  642. hitbox.Parent=nil
  643. n=2
  644. for i=0,1,0.2 do
  645. swait()
  646. Torso.Neck.C0=necko*euler(0,0,-0.5+0.2*i*n)
  647. RootJoint.C0=RootCF*euler(0,0,0.5-0.2*i*n)
  648. RW.C0=cf(1.5,0.5,0)*euler(1.7,1.57,0)
  649. RW.C1=cf(0,0.5,0)*euler(1.5+0.2*i*n,0.5,0)
  650. LW.C0=cf(-1.5,0.5,0)*euler(0,-0.4,-0.2)
  651. LW.C1=cf(0,0.5,0)*euler(0.5,0,0)
  652. n=n-0.2
  653. end
  654. attack=false
  655. end
  656.  
  657. function Stance()
  658. attack=true
  659. SwordStance=true
  660. Humanoid.WalkSpeed=0.1
  661. for i=0,1,0.05 do
  662. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  663. handlewld.C1=euler(0.2+0.1*i,0,0)
  664. wld11.C0=euler(0,0,0)*cf(0,-2.55,-0.05)
  665. Torso.Neck.C0=necko*euler(0,0,-1-0.1*i)
  666. Torso.Neck.C1=necko2*euler(-0.2-0.1*i,0,0)
  667. RootJoint.C0=RootCF*euler(0,0,1+0.1*i)
  668. RW.C0=cf(.5,0.2,-0.5)*euler(0.7,0,-0.6+0.1*i)
  669. RW.C1=cf(0,0.5,0)*euler(0,-1.57,0)
  670. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  671. LW.C1=cf(0,0.5,0)*euler(0.1+0.1*i,0,0)
  672. end
  673. coroutine.resume(coroutine.create(function()
  674. for i=1,100 do
  675. if SwordStance==true then
  676. swait()
  677. end
  678. end
  679. SwordStance=false
  680. Humanoid.WalkSpeed=16
  681. for i=0,1,0.1 do
  682. if attack==false then
  683. swait()
  684. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  685. handlewld.C1=euler(0.2,0,0)
  686. wld11.C0=euler(0,0,0)*cf(0,-2.55,-0.05)
  687. Torso.Neck.C0=necko*euler(0,0,-1)
  688. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  689. RootJoint.C0=RootCF*euler(0,0,1)
  690. RW.C0=cf(.5,0.2,-0.5)*euler(0.7,0,-0.6)
  691. RW.C1=cf(0,0.5,0)*euler(0,-1.57,0)
  692. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  693. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  694. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1,0)
  695. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  696. LH.C0=cf(-0.5,-1,0)*euler(-0.2,-1.57-1,0)
  697. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  698. end
  699. end
  700. end))
  701. attack=false
  702. end
  703.  
  704. function IaidoDash()
  705. attack=true
  706. explode=false
  707. Humanoid.WalkSpeed=0
  708. wld11.Part1=RightArm
  709. wld11.C0=euler(1.57-0.2,2.5,0)*cf(-0.2,100,-0.2)
  710. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  711. LastPoint=Point
  712. so("rbxasset://sounds\\unsheath.wav",prt11,1,1.6)
  713. so("http://www.roblox.com/asset/?id=161006195",prt11,1,0.9)
  714. range=50
  715. if Charge>=3 then
  716. Charge=0
  717. explode=true
  718. end
  719. for i=0,1,0.1 do
  720. local ef=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  721. ef.Anchored=true
  722. ef.CFrame=Torso.CFrame*cf(0,0,-2)*euler(0,0,1-0.5*i)
  723. if i==0.6 and explode==true then
  724. MagniDamage(Torso,33,30,50,math.random(30,70),"Knockdown")
  725. so("http://www.roblox.com/Asset?ID=87784452",Torso,1,1.2)
  726. for i=1,3 do
  727. 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)
  728. MagicCircle(Color1,Torso.CFrame,1,1,1,3,3,3,0.01)
  729. end
  730. end
  731. if explode==false then
  732. MagniDamage(ef,5,10,15,math.random(10,20),"Charge")
  733. end
  734. game:GetService("Debris"):AddItem(ef,2)
  735. 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)
  736. Torso.Neck.C0=necko*euler(0,0,-1+0.5*i)
  737. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  738. RootJoint.C0=RootCF*cf(0,-range*i,0)*euler(0,0,1-0.5*i)
  739. RW.C0=cf(.5+1*i,0.2+0.3*i,-0.5+0.5*i)*euler(0.7+1.4*i,0,-3+1.4*i)
  740. RW.C1=cf(0,1,0)*euler(0,-1.7-0.43*i,0)
  741. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  742. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  743. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  744. effect("Bright red",0.4,LastPoint,Point)
  745. LastPoint=Point
  746. end
  747. RootJoint.C0=RootCF*cf(0,0,0)*euler(0,0,0.5)
  748. RootPart.CFrame=RootPart.CFrame*cf(0,0,-range)
  749. n=2
  750. for i=0,1,0.05 do
  751. swait()
  752. Humanoid.WalkSpeed=0
  753. Torso.Neck.C0=necko*euler(0,0,-0.5)
  754. Torso.Neck.C1=necko2*euler(-0.2+0.2*i,0,0)
  755. RootJoint.C0=RootCF*euler(0,0,0.5)
  756. RW.C0=cf(1.5,0.5,0)*euler(2.1+0.2*i*n,0,0.8+0.2*i*n)
  757. RW.C1=cf(0,0.5,0)*euler(0,-2.07-0.2*i*n,0)
  758. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,-0.4*i*n)
  759. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  760. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1+1*i,0)
  761. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  762. LH.C0=cf(-0.5,-1,0)*euler(-0.2+0.2*i,-1.57-1+1*i,0)
  763. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  764. n=n-0.05
  765. end
  766. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  767. LastPoint=Point
  768. for i=0,1,0.05 do
  769. swait()
  770. if i==0.1 then
  771. so("http://www.roblox.com/asset/?id=161006212",prt11,1,1)
  772. elseif i==0.6 then
  773. so("http://www.roblox.com/asset/?id=161006195",prt11,1,1)
  774. end
  775. wld11.C0=euler(15.5*i,2.7,0)*cf(0,1,0)
  776. Torso.Neck.C0=necko*euler(0,0,-0.5-0.5*i)
  777. Torso.Neck.C1=necko2*euler(0,0,0)
  778. RootJoint.C0=RootCF*euler(0,0,0.5+0.5*i)
  779. RW.C0=cf(1.5,0.5,0)*euler(2.3-0.2*i,0,1-0.2*i)
  780. RW.C1=cf(0,0.5,0)*euler(0,-2.27,0)
  781. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,-0.4)
  782. LW.C1=cf(0,0.5,0)*euler(0.1+0.2*i,0,0)
  783. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  784. effect("Bright red",0.4,LastPoint,Point)
  785. LastPoint=Point
  786. end
  787. swait(5)
  788. so("rbxasset://sounds\\unsheath.wav",prt11,1,1)
  789. Humanoid.WalkSpeed=16
  790. wld11.Part1=prt1
  791. wld11.C0=euler(0,0,0)*cf(0,-2.55,-0.05)
  792. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  793. handlewld.C1=euler(0.2,0,0)
  794. Torso.Neck.C0=necko*euler(0,0,-1)
  795. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  796. RootJoint.C0=RootCF*euler(0,0,1)
  797. RW.C0=cf(.5,0.2,-0.5)*euler(0.7,0,-0.6)
  798. RW.C1=cf(0,0.5,0)*euler(0,-1.57,0)
  799. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  800. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  801. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1,0)
  802. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  803. LH.C0=cf(-0.5,-1,0)*euler(-0.2,-1.57-1,0)
  804. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  805. eul=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  806. MagicCircle(BrickColor.new("White"),cf(prt13.Position)*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,0)*eul,0.5,1,0.5,0.1,2.5,0.1,0.1)
  808. 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)
  809. swait(10)
  810. attack=false
  811. end
  812.  
  813. function Wilt()
  814. attack=true
  815. Humanoid.WalkSpeed=10
  816. up=-1
  817. range=20
  818. for i=1,3 do
  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,30,45,math.random(35,50),"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. Humanoid.WalkSpeed=10
  883. CF=RootPart.CFrame
  884. local ef=part(3,workspace,0,0.2,Color1,"Effect",vt(1,1,1))
  885. ef.Anchored=true
  886. ef.CFrame=CF
  887. efmsh=mesh("SpecialMesh",ef,"FileMesh","http://www.roblox.com/asset/?id=1051557",vt(0,0,0),vt(3,3,3))
  888. coroutine.resume(coroutine.create(function(Part,Mesh,CeEf)
  889. for i = 1,3 do
  890. wait()
  891. for i=0,1,0.05 do
  892. swait()
  893. MagniDamage(Part,30,15,20,15,"Knockdown")
  894. Mesh.Scale=vt(5,5+5*i,5)
  895. Part.CFrame=CeEf*cf(math.random(-100,100),0,-100*i)*euler(0,15*i,0)
  896. 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)
  897. Part.Transparency=i
  898. end
  899. ef.Parent=nil
  900. end
  901. end),ef,efmsh,CF)
  902. wld11.Part1=RightArm
  903. wld11.C0=euler(1.57-0.2,2.5,0)*cf(-0.2,1,-0.2)
  904. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  905. LastPoint=Point
  906. so("rbxasset://sounds\\unsheath.wav",prt11,1,1.2)
  907. so("http://www.roblox.com/asset/?id=161006195",prt11,1,0.9)
  908. for i=0,1,0.2 do
  909. swait()
  910. 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)
  911. Torso.Neck.C0=necko*euler(0,0,-1+0.5*i)
  912. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  913. RootJoint.C0=RootCF*euler(0,0,1-0.5*i)
  914. 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)
  915. RW.C1=cf(0,0.5,0)*euler(0,-1.57-0.43*i,0)
  916. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  917. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  918. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  919. effect("Bright red",0.4,LastPoint,Point)
  920. LastPoint=Point
  921. end
  922. n=2
  923. for i=0,1,0.1 do
  924. swait()
  925. Torso.Neck.C0=necko*euler(0,0,-0.5)
  926. Torso.Neck.C1=necko2*euler(-0.2+0.2*i,0,0)
  927. RootJoint.C0=RootCF*euler(0,0,0.5)
  928. RW.C0=cf(1.5,0.5,0)*euler(2.1+0.2*i*n,0,0.8+0.4*i*n)
  929. RW.C1=cf(0,0.5,0)*euler(0,-2-0.2*i*n,0)
  930. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,-0.4*i*n)
  931. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  932. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1+1*i,0)
  933. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  934. LH.C0=cf(-0.5,-1,0)*euler(-0.2+0.2*i,-1.57-1+1*i,0)
  935. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  936. n=n-0.1
  937. end
  938. for i=0,1,0.05 do
  939. swait()
  940. wld11.C0=euler(2.5*i,2.7,0)*cf(0,1,0)
  941. Torso.Neck.C0=necko*euler(0,0,-0.5-0.5*i)
  942. Torso.Neck.C1=necko2*euler(0,0,0)
  943. RootJoint.C0=RootCF*euler(0,0,0.5+0.5*i)
  944. RW.C0=cf(1.5,0.5,0)*euler(2.3-0.2*i,0,1.2-0.4*i)
  945. RW.C1=cf(0,0.5,0)*euler(0,-2.2+0.2*i,0)
  946. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,-0.4)
  947. LW.C1=cf(0,0.5,0)*euler(0.1+0.2*i,0,0)
  948. end
  949. swait(5)
  950. so("rbxasset://sounds\\unsheath.wav",prt11,1,1)
  951. Humanoid.WalkSpeed=16
  952. wld11.Part1=prt1
  953. wld11.C0=euler(0,0,0)*cf(0,-2.55,-0.05)
  954. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  955. handlewld.C1=euler(0.2,0,0)
  956. Torso.Neck.C0=necko*euler(0,0,-1)
  957. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  958. RootJoint.C0=RootCF*euler(0,0,1)
  959. RW.C0=cf(.5,0.2,-0.5)*euler(0.7,0,-0.6)
  960. RW.C1=cf(0,0.5,0)*euler(0,-1.57,0)
  961. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  962. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  963. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1,0)
  964. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  965. LH.C0=cf(-0.5,-1,0)*euler(-0.2,-1.57-1,0)
  966. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  967. eul=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  968. MagicCircle(BrickColor.new("White"),cf(prt13.Position)*eul,0.5,1,0.5,0.1,2.5,0.1,0.1)
  969. 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)
  970. 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)
  971. attack=false
  972. end
  973.  
  974. function Riposte()
  975. attack=true
  976. Humanoid.WalkSpeed=5
  977. for i=0,1,0.1 do
  978. swait()
  979. Torso.Neck.C0=necko*euler(0,0,-1+0.8*i)
  980. Torso.Neck.C1=necko2*euler(-0.2+0.1*i,0,0)
  981. RootJoint.C0=RootCF*euler(0,0,1-0.8*i)
  982. 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)
  983. RW.C1=cf(0,0.5,0)*euler(0,-1.57,0)
  984. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8-0.2*i,-0.2*i)
  985. LW.C1=cf(0,0.5,0)*euler(0.1-1*i,0,0)
  986. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1+1*i,0)
  987. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  988. LH.C0=cf(-0.5,-1,0)*euler(-0.2+0.2*i,-1.57-1+1*i,0)
  989. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  990. end
  991. ripostestance=true
  992. con1=Torso.Touched:connect(function(hit)
  993. if hit.Parent.Parent:findFirstChild("Torso")~=nil then
  994. hit=hit.Parent.Parent.Torso
  995. end
  996. if hit.Parent:findFirstChild("Torso")~=nil and hit~=Character and ripostestance==true then
  997. RiposteAttack(hit)
  998. end
  999. end)
  1000. coroutine.resume(coroutine.create(function()
  1001. while ripostestance==true do
  1002. swait()
  1003. if Humanoid:findFirstChild("creator")~=nil then
  1004. Targ=Humanoid.creator.Value
  1005. --print(game.Players[Targ])
  1006. if Targ.Character~=nil then
  1007. RiposteAttack(Targ.Character.Torso)
  1008. ripostestance=false
  1009. attack=false
  1010. elseif Targ:findFirstChild("Torso")~=nil then
  1011. RiposteAttack(Targ.Torso)
  1012. ripostestance=false
  1013. attack=false
  1014. end
  1015. end
  1016. end
  1017. end))
  1018. --[[c=Instance.new("ObjectValue")
  1019. c.Name="creator"
  1020. c.Value=Player
  1021. c.Parent=h
  1022. game:GetService("Debris"):AddItem(c,.5)]]
  1023. end
  1024.  
  1025. function RiposteAttack(hit)
  1026. for i = 1,3,1 do
  1027. wait()
  1028. ripostestance=false
  1029. Sheathed=false
  1030. attack=true
  1031. Humanoid.WalkSpeed=0
  1032. Tors=hit.Parent.Torso
  1033. print("boop")
  1034. 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)
  1035. local LastPoint=Torso.CFrame
  1036. local Point=Torso.CFrame
  1037. Torso.CFrame=Tors.CFrame*cf(0,0,5)
  1038. 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)
  1039. wld11.Part1=RightArm
  1040. so("http://roblox.com/asset/?id=2767090",Torso,1,1.5)
  1041. swait(10)
  1042. wld11.C0=euler(1.57,3.14,0)*cf(0,1,0)
  1043. Torso.Neck.C0=necko*euler(0,0,-0.7)
  1044. RootJoint.C0=RootCF*euler(0,0,0.7)
  1045. RW.C0=cf(.5,0.5,-0.5)*euler(1.7,1.57,0)
  1046. RW.C1=cf(0,0.5,0)*euler(-1.1,0.5,0)
  1047. LW.C0=cf(-1.5,0.5,0)*euler(0,-0.4,-0.2)
  1048. LW.C1=cf(0,0.5,0)*euler(0.5,0,0)
  1049. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  1050. LastPoint=Point
  1051. so("http://www.roblox.com/asset/?id=161006195",prt11,1,1)
  1052. so("rbxasset://sounds\\unsheath.wav",prt11,1,1.5)
  1053. so("http://www.roblox.com/asset/?id=28144425",Tors,1,0.6)
  1054. if Character.Humanoid == nil then
  1055. Damagefunc(Tors,0,0,math.random(0,0),"Normal",RootPart,1,1,9999,0)
  1056. else
  1057. Damagefunc(Tors,50,70,math.random(70,80),"Normal",RootPart,1,1,9999,0)
  1058. end
  1059. --for i=1,2 do
  1060. 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)
  1061. --end
  1062. for i=0,1,0.2 do
  1063. swait()
  1064. wld11.C0=euler(1.57-1.57*i,3.14,0)*cf(0,1,0)
  1065. Torso.Neck.C0=necko*euler(0,0,-0.7+0.7*i)
  1066. RootJoint.C0=RootCF*euler(0,0,0.7-0.7*i)
  1067. RW.C0=cf(.5+1*i,0.5,-0.5+0.5*i)*euler(1.7,1.57,0)
  1068. RW.C1=cf(0,0.5,0)*euler(-1.1+2.6*i,0.5,0)
  1069. LW.C0=cf(-1.5,0.5,0)*euler(0,-0.4,-0.2)
  1070. LW.C1=cf(0,0.5,0)*euler(0.5,0,0)
  1071. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  1072. effect("Bright red",0.4,LastPoint,Point)
  1073. LastPoint=Point
  1074. end
  1075. end
  1076. swait(10)
  1077. attack=false
  1078. Humanoid.WalkSpeed=16
  1079. end
  1080.  
  1081. function ElecStorm()
  1082. attack=true
  1083. Humanoid.WalkSpeed=0
  1084. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  1085. LastPoint=Point
  1086. --so("rbxasset://sounds\\unsheath.wav",prt11,1,1.2)
  1087. so("http://www.roblox.com/asset/?id=161006195",prt11,1,0.9)
  1088. for i=0,1,0.1 do
  1089. swait()
  1090. Humanoid.WalkSpeed=0
  1091. wld11.C0=clerp(wld11.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  1092. handlewld.C1=clerp(handlewld.C1,euler(0,0,0),.3)
  1093. Torso.Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
  1094. Torso.Neck.C1=clerp(Neck.C1,necko2*euler(-0.2,0,0),.3)
  1095. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1096. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(2.7,0,-0.2),.3)
  1097. RW.C1=clerp(RW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1098. LW.C0=clerp(LW.C0,cf(-1.3,0.5,-0.3)*euler(-0.5,-0.4,0),.3)
  1099. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0.4),.3)
  1100. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  1101. effect("Bright red",0.4,LastPoint,Point)
  1102. LastPoint=Point
  1103. end
  1104. for i=0,1,0.2 do
  1105. swait()
  1106. Torso.Neck.C0=necko*euler(0.2*i,0,0)
  1107. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  1108. RootJoint.C0=RootCF*cf(0,0,-0.8*i)
  1109. 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)
  1110. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  1111. 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)
  1112. LW.C1=cf(0,0.5,0)*euler(0,0,0.4+0.2*i)
  1113. RH.C0=cf(0.5,-1,0)*euler(0,1.57,-1*i)
  1114. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  1115. LH.C0=cf(-0.5,-1+0.2*i,-0.5*i)*euler(0,-1.57,0.2*i)
  1116. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  1117. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  1118. effect("Bright red",0.4,LastPoint,Point)
  1119. LastPoint=Point
  1120. end
  1121. coroutine.resume(coroutine.create(function(Part)
  1122. MagicCircle(Color1,Part.CFrame,500,500,500,-2,-2,-2,0.03)
  1123. for i=1,20 do
  1124. wait()
  1125. for i=1,2 do
  1126. 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)
  1127. end
  1128. end
  1129. end),RootPart)
  1130. so("http://www.roblox.com/asset/?id=2974000",prt11,1,0.8)
  1131. MagniDamage(RootPart,30,20,70,math.random(-40,-20),"Freeze")
  1132. swait(10)
  1133. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  1134. LastPoint=Point
  1135. for i=0,1,0.05 do
  1136. swait()
  1137. if i==0.1 then
  1138. so("http://www.roblox.com/asset/?id=161006212",prt11,1,1)
  1139. elseif i==0.6 then
  1140. so("http://www.roblox.com/asset/?id=161006195",prt11,1,1)
  1141. end
  1142. wld11.C0=euler(1.57-9.42*i,0,0)*cf(0,1,0)
  1143. Torso.Neck.C0=necko*euler(0.2-0.2*i,0,0)
  1144. Torso.Neck.C1=necko2*euler(-0.2+0.2*i,0,0)
  1145. RootJoint.C0=RootCF*cf(0,0,-0.8+0.8*i)
  1146. RW.C0=cf(1,0.5,-0.5)*euler(1.5+1*i,0,-0.7)
  1147. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  1148. LW.C0=cf(-1.5,0.5,0)*euler(-0.7,-0.2,0)
  1149. LW.C1=cf(0,0.5,0)*euler(0,0,0.6)
  1150. RH.C0=cf(0.5,-1,0)*euler(0,1.57,-1+1*i)
  1151. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  1152. LH.C0=cf(-0.5,-0.8-0.2*i,-0.5+0.5*i)*euler(0,-1.57,0.2-0.2*i)
  1153. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  1154. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  1155. effect("Bright red",0.4,LastPoint,Point)
  1156. LastPoint=Point
  1157. end
  1158. Humanoid.WalkSpeed=16
  1159. attack=false
  1160. end
  1161.  
  1162. function IaidoDash2()
  1163. attack=true
  1164. explode=false
  1165. Humanoid.WalkSpeed=0
  1166. for i=0,1,0.1 do
  1167. swait()
  1168. Torso.Neck.C0=clerp(Neck.C0,necko*euler(0,0,.1),.3)
  1169. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.1),.3)
  1170. handlewld.C1=clerp(handlewld.C1,euler(0,0,0),.3)
  1171. wld11.C0=clerp(wld11.C0,euler(1.57,3.14,0)*cf(0,1,0),.3)
  1172. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.3,-1.5,0),.3)
  1173. RW.C1=clerp(RW.C1,cf(0,0.5,0)*euler(-1.3,0,0),.3)
  1174. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,-0.4,-0.4),.3)
  1175. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0.2,0,0),.3)
  1176. end
  1177. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  1178. LastPoint=Point
  1179. so("rbxasset://sounds\\unsheath.wav",prt11,1,1.7)
  1180. so("http://www.roblox.com/asset/?id=161006195",prt11,1,1.1)
  1181. if Charge>=3 then
  1182. Charge=0
  1183. explode=true
  1184. end
  1185. for i=0,1,0.1 do
  1186. local ef=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  1187. ef.Anchored=true
  1188. ef.CFrame=RightArm.CFrame*cf(0,-1.5,0)
  1189. if i==0.6 and explode==true then
  1190. MagniDamage(Torso,30,50,80,math.random(30,40),"Knockdown")
  1191. so("http://www.roblox.com/Asset?ID=87784452",Torso,1,1.2)
  1192. for i=1,3 do
  1193. 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)
  1194. MagicCircle(Color1,Torso.CFrame,1,1,1,3,3,3,0.03)
  1195. end
  1196. end
  1197. if explode==false then
  1198. MagniDamage(ef,5,10,15,math.random(5,10),"Charge")
  1199. end
  1200. game:GetService("Debris"):AddItem(ef,2)
  1201. wld11.C0=euler(1.57-1.57*i,3.14,0)*cf(0,1,0)
  1202. Torso.Neck.C0=necko*euler(0,0,0.3-1.1*i)
  1203. RootJoint.C0=RootCF*cf(0,-10*i,0)*euler(0,0,-0.3+1.1*i)
  1204. RW.C0=cf(1.5-0.5*i,0.5,-0.5*i)*euler(1.3,-1.57,0)
  1205. RW.C1=cf(0,0.5,0)*euler(-1.5+2.4*i,0,0)
  1206. LW.C0=cf(-1.5,0.5,0)*euler(0,-0.4,-0.4)
  1207. LW.C1=cf(0,0.5,0)*euler(0.3,0,0)
  1208. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  1209. effect("Bright red",0.4,LastPoint,Point)
  1210. LastPoint=Point
  1211. end
  1212. RootJoint.C0=RootCF*euler(0,0,0.8)
  1213. RootPart.CFrame=RootPart.CFrame*cf(0,0,-10)
  1214. swait(2)
  1215. Humanoid.WalkSpeed=16
  1216. attack=false
  1217. end
  1218.  
  1219. function Wilt2()
  1220. if mana < 10 then return end
  1221. attack=true
  1222. Humanoid.WalkSpeed=20
  1223. for i=0,1,0.1 do
  1224. swait()
  1225. Torso.Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
  1226. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1227. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.57,1.57,0),.3)
  1228. RW.C1=clerp(RW.C1,cf(0,0.5,0)*euler(-0.3,0,0),.3)
  1229. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-0.2),.3)
  1230. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0.3,0,0),.3)
  1231. end
  1232. mana=mana-10
  1233. so("rbxasset://sounds\\unsheath.wav",prt11,1,math.random(120,160)/100)
  1234. so("http://www.roblox.com/asset/?id=161006195",prt11,1,math.random(90,110)/100)
  1235. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  1236. LastPoint=Point
  1237. for i=0,1,0.1 do
  1238. local ef=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  1239. ef.Anchored=true
  1240. ef.CFrame=RightArm.CFrame*cf(0,-2,0)
  1241. MagniDamage(ef,7,5,10,1,"Normal")
  1242. game:GetService("Debris"):AddItem(ef,1)
  1243. wld11.C0=euler(1.57-1.57*i,3.14,0)*cf(0,1,0)
  1244. RW.C0=cf(1.5,0.5,0)*euler(1.57,1.57,0)
  1245. RW.C1=cf(0,0.5,0)*euler(-0.3+1.87*i,0,0)
  1246. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  1247. effect("Bright red",0.4,LastPoint,Point)
  1248. LastPoint=Point
  1249. end
  1250. n=2
  1251. for i=0,1,0.1 do
  1252. swait()
  1253. wld11.C0=euler(1.57,3.14,0)*cf(0,1,0)
  1254. RW.C1=cf(0,0.5,0)*euler(1.57+0.2*i*n,0,0)
  1255. n=n-0.1
  1256. end
  1257. local spinnum=0
  1258. coroutine.resume(coroutine.create(function()
  1259. local num=0
  1260. while holdx==true and spinnum<=5 do
  1261. swait()
  1262. RootJoint.C0=RootCF*euler(0,0,num)
  1263. num=num-(math.random(10,30)/100)
  1264. end
  1265. RootJoint.C0=RootCF
  1266. end))
  1267. while holdx==true and spinnum<=5 do
  1268. spinnum=spinnum+1
  1269. num=math.random(-100,100)/100
  1270. mana=mana-10
  1271. so("rbxasset://sounds\\unsheath.wav",prt11,1,math.random(120,160)/100)
  1272. so("http://www.roblox.com/asset/?id=161006195",prt11,1,math.random(90,110)/100)
  1273. wld11.C0=euler(1.57,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,0,0)
  1276. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  1277. LastPoint=Point
  1278. for i=0,1,0.1 do
  1279. local ef=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  1280. ef.Anchored=true
  1281. ef.CFrame=RightArm.CFrame*cf(0,-2,0)
  1282. MagniDamage(ef,7,10,15,1,"Normal")
  1283. game:GetService("Debris"):AddItem(ef,1)
  1284. wld11.C0=euler(1.57-1.57*i,3.14,0)*cf(0,1,0)
  1285. RW.C0=cf(1.5,0.5,0)*euler(1.57,1.57+num,0)
  1286. RW.C1=cf(0,0.5,0)*euler(-0.3+1.87*i,0,0)
  1287. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  1288. effect("Bright red",0.4,LastPoint,Point)
  1289. LastPoint=Point
  1290. end
  1291. n=2
  1292. for i=0,1,0.1 do
  1293. swait()
  1294. wld11.C0=euler(1.57,3.14,0)*cf(0,1,0)
  1295. RW.C1=cf(0,0.5,0)*euler(1.57+0.2*i*n,0,0)
  1296. n=n-0.1
  1297. end
  1298. swait(5)
  1299. end
  1300. Humanoid.WalkSpeed=0
  1301. for i=0,1,0.1 do
  1302. swait()
  1303. wld11.C0=euler(1.57+0.93*i,3.14-0.44*i,0)*cf(0,1,0)
  1304. Torso.Neck.C0=necko*euler(0,0,-1*i)
  1305. RootJoint.C0=RootCF*euler(0,0,1*i)
  1306. RW.C0=cf(1.5,0.5,0)*euler(1.57+0.53*i,1.57-1.57*i,0.8*i)
  1307. RW.C1=cf(0,0.5,0)*euler(1.77-1.77*i,-2*i,0)
  1308. LW.C0=cf(-1.5,0.5,0)*euler(0,-0.8*i,-0.2-0.2*i)
  1309. LW.C1=cf(0,0.5,0)*euler(0.3,0,0)
  1310. end
  1311. swait(5)
  1312. so("rbxasset://sounds\\unsheath.wav",prt11,1,1)
  1313. Humanoid.WalkSpeed=16
  1314. wld11.Part1=prt1
  1315. wld11.C0=euler(0,0,0)*cf(0,-2.55,-0.05)
  1316. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  1317. handlewld.C1=euler(0.2,0,0)
  1318. Torso.Neck.C0=necko*euler(0,0,-1)
  1319. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  1320. RootJoint.C0=RootCF*euler(0,0,1)
  1321. RW.C0=cf(.5,0.2,-0.5)*euler(0.7,0,-0.6)
  1322. RW.C1=cf(0,0.5,0)*euler(0,-1.57,0)
  1323. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  1324. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  1325. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1,0)
  1326. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  1327. LH.C0=cf(-0.5,-1,0)*euler(-0.2,-1.57-1,0)
  1328. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  1329. eul=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1330. MagicCircle(BrickColor.new("White"),cf(prt13.Position)*eul,0.5,1,0.5,0.1,2.5,0.1,0.1)
  1331. 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)
  1332. 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)
  1333. Humanoid.WalkSpeed=16
  1334. attack=false
  1335. end
  1336.  
  1337. function Rose2()
  1338. attack=true
  1339. for i=0,1,0.1 do
  1340. swait()
  1341. wld11.C0=clerp(wld11.C0,euler(1.57,3.14,0)*cf(0,1,0),.3)
  1342. Torso.Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
  1343. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1344. RW.C0=clerp(RW.C0,cf(.5,0.5,-0.5)*euler(1.3,1.07,0),.3)
  1345. RW.C1=clerp(RW.C1,cf(0,0.5,0)*euler(-1.3,0,0),.3)
  1346. LW.C0=clerp(LW.C0,cf(-1.3,0.5,-0.3)*euler(0,-0.6,-0.2),.3)
  1347. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0.3,0,0),.3)
  1348. end
  1349. so("rbxasset://sounds\\unsheath.wav",prt11,1,math.random(120,160)/100)
  1350. so("http://www.roblox.com/asset/?id=161006195",prt11,1,math.random(90,110)/100)
  1351. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  1352. LastPoint=Point
  1353. for i=0,1,0.1 do
  1354. local ef=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  1355. ef.Anchored=true
  1356. ef.CFrame=RightArm.CFrame*cf(0,-2,0)
  1357. MagniDamage(ef,7,15,20,1,"Normal")
  1358. game:GetService("Debris"):AddItem(ef,1)
  1359. RW.C0=cf(1+0.5*i,0.5,-0.5+0.5*i)*euler(1.3,1.07,0)
  1360. RW.C1=cf(0,0.5,0)*euler(-1.3+3*i,0,0)
  1361. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  1362. effect("Bright red",0.4,LastPoint,Point)
  1363. LastPoint=Point
  1364. end
  1365. for i=1,60,3 do
  1366. swait()
  1367. num=math.random(-50,50)
  1368. num2=math.random(-500,500)/100
  1369. num3=math.random(-500,500)/100
  1370. RW.C0=cf(1.5+num2,0.5+num3,-i)*euler(1.3,1.07+num,0)
  1371. RW.C1=cf(0,0.5,0)*euler(-1.3,0,0)
  1372. so("rbxasset://sounds\\unsheath.wav",prt11,.6,math.random(120,160)/100)
  1373. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  1374. LastPoint=Point
  1375. MagicCircle(Color1,RightArm.CFrame*euler(math.random(-1000,1000),math.random(-1000,1000),math.random(-1000,1000)),.2,2,.2,.2,38,.2,0.05)
  1376. --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)
  1377. for j=0,1,1 do
  1378. local ef=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  1379. ef.Anchored=true
  1380. ef.CFrame=RightArm.CFrame*cf(0,-2,0)
  1381. MagniDamage(ef,7,10,15,1,"Normal")
  1382. game:GetService("Debris"):AddItem(ef,1)
  1383. RW.C0=cf(1.5+num2,0.5+num3,-i)*euler(1.3,1.07+num,0)
  1384. RW.C1=cf(0,0.5,0)*euler(-1.3+3*j,0,0)
  1385. end
  1386. RW.C0=cf(1.5,0.5,0)*euler(1.3,1.07,0)
  1387. RW.C1=cf(0,0.5,0)*euler(-1.3+3,0,0)
  1388. end
  1389. attack=false
  1390. end
  1391.  
  1392. function MagniDamage(Part,magni,mindam,maxdam,knock,Type)
  1393. for _,c in pairs(workspace:children()) do
  1394. local hum=c:findFirstChild("Humanoid")
  1395. if hum~=nil then
  1396. local head=c:findFirstChild("Torso")
  1397. if head~=nil then
  1398. local targ=head.Position-Part.Position
  1399. local mag=targ.magnitude
  1400. if mag<=magni and c.Name~=Player.Name then
  1401. Damagefunc(head,mindam,maxdam,knock,Type,RootPart,.2,1,nil,1)
  1402. end
  1403. end
  1404. end
  1405. end
  1406. end
  1407.  
  1408. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  1409. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  1410. end
  1411.  
  1412. local Effects={}
  1413. local Point=Torso.CFrame*cf(0,Torso.Size.Y,0)
  1414. LastPoint=Point
  1415. function effect(Color,Ref,LP,P1,returnn)
  1416. local effectsmsh=Instance.new("CylinderMesh")
  1417. effectsmsh.Scale=Vector3.new(0.2,1,0.2)
  1418. effectsmsh.Name="Mesh"
  1419. local effectsg=Instance.new("Part")
  1420. effectsg.formFactor=3
  1421. effectsg.CanCollide=false
  1422. effectsg.Name="Eff"
  1423. effectsg.Locked=true
  1424. effectsg.Anchored=true
  1425. effectsg.Size=Vector3.new(0.5,1,0.5)
  1426. effectsg.Parent=workspace
  1427. effectsmsh.Parent=effectsg
  1428. effectsg.BrickColor=Color1
  1429. effectsg.Reflectance=Ref
  1430. local point1=P1
  1431. local mg=(LP.p - point1.p).magnitude
  1432. effectsg.Size=Vector3.new(0.5,mg,0.5)
  1433. effectsg.CFrame=cf((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
  1434. effectsmsh.Scale=Vector3.new(0.4,1,0.4)
  1435. game:GetService("Debris"):AddItem(effectsg,2)
  1436. if returnn then return effectsg end
  1437. if not returnn then
  1438. table.insert(Effects,{effectsg,"Cylinder",0.05,0.01,0,0.01,effectsmsh})
  1439. end
  1440. end
  1441.  
  1442. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type,parent)
  1443. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1444. prt.Anchored=true
  1445. prt.CFrame=cframe
  1446. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1447. game:GetService("Debris"):AddItem(prt,5)
  1448. table.insert(Effects,{prt,"Block1",delay,x3,y3,z3,msh})
  1449. end
  1450.  
  1451. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1452. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1453. prt.Anchored=true
  1454. prt.CFrame=cframe
  1455. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  1456. game:GetService("Debris"):AddItem(prt,2)
  1457. table.insert(Effects,{prt,"Cylinder2",delay,x3,y3,z3,msh})
  1458. end
  1459.  
  1460. function MagicRing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type,parent)
  1461. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1462. if Type~=2 then
  1463. prt.Anchored=true
  1464. end
  1465. prt.CFrame=cframe
  1466. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
  1467. game:GetService("Debris"):AddItem(prt,5)
  1468. coroutine.resume(coroutine.create(function(Part,Mesh,dur)
  1469. local wld=nil
  1470. if dur==2 then
  1471. wld=weld(Part,Part,parent,euler(0,0,0)*cf(0,0,0))
  1472. end
  1473. for i=0,1,delay do
  1474. wait()
  1475. if dur==1 then
  1476. Part.CFrame=Part.CFrame
  1477. elseif dur==2 then
  1478. wld.C0=cframe
  1479. end
  1480. Part.Transparency=i
  1481. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1482. end
  1483. Part.Parent=nil
  1484. end),prt,msh,Type)
  1485. end
  1486.  
  1487. function MagicWaveThing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1488. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1489. prt.Anchored=true
  1490. prt.CFrame=cframe
  1491. msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1051557",vt(0,0,0),vt(x1,y1,z1))
  1492. game:GetService("Debris"):AddItem(prt,5)
  1493. coroutine.resume(coroutine.create(function(Part,Mesh)
  1494. for i=0,1,delay do
  1495. wait()
  1496. Part.CFrame=Part.CFrame*euler(0,0.7,0)
  1497. Part.Transparency=i
  1498. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1499. end
  1500. Part.Parent=nil
  1501. end),prt,msh)
  1502. end
  1503.  
  1504. function WaveEffect(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,mshtype)
  1505. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1506. prt.Anchored=true
  1507. prt.CFrame=cframe
  1508. local thetype=""
  1509. if mshtype==1 then
  1510. thetype="http://www.roblox.com/asset/?id=20329976"
  1511. elseif mshtype==2 then
  1512. thetype="http://www.roblox.com/asset/?id=1323306"
  1513. end
  1514. msh=mesh("SpecialMesh",prt,"FileMesh",thetype,vt(0,0,0),vt(x1,y1,z1))
  1515. game:GetService("Debris"):AddItem(prt,2)
  1516. coroutine.resume(coroutine.create(function(Part,Mesh)
  1517. for i=0,1,delay do
  1518. wait()
  1519. Part.CFrame=Part.CFrame*cf(0,y3/2,0)
  1520. Part.Transparency=i
  1521. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1522. end
  1523. Part.Parent=nil
  1524. end),prt,msh)
  1525. end
  1526.  
  1527. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock,Slash)
  1528. if hit.Parent==nil then
  1529. return
  1530. end
  1531. h=hit.Parent:FindFirstChild("Humanoid")
  1532. for _,v in pairs(hit.Parent:children()) do
  1533. if v:IsA("Humanoid") then
  1534. h=v
  1535. end
  1536. end
  1537. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  1538. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  1539. end
  1540. if hit.Parent.className=="Hat" then
  1541. hit=hit.Parent.Parent:findFirstChild("Head")
  1542. end
  1543. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  1544. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  1545. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  1546. return
  1547. end]]
  1548. -- hs(hit,1.2)
  1549. if Slash==1 then
  1550. so("http://www.roblox.com/asset/?id=10209590",hit,1,1)
  1551. 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)
  1552. end
  1553. c=Instance.new("ObjectValue")
  1554. c.Name="creator"
  1555. c.Value=game:service("Players").LocalPlayer
  1556. c.Parent=h
  1557. game:GetService("Debris"):AddItem(c,.5)
  1558. Damage=minim - 3
  1559. -- h:TakeDamage(Damage)
  1560. blocked=false
  1561. block=hit.Parent:findFirstChild("Block")
  1562. if block~=nil then
  1563. print(block.className)
  1564. if block.className=="NumberValue" then
  1565. if block.Value>0 then
  1566. blocked=true
  1567. if decreaseblock~=nil then
  1568. block.Value=block.Value-decreaseblock
  1569. end
  1570. end
  1571. end
  1572. if block.className=="IntValue" then
  1573. if block.Value>0 then
  1574. blocked=true
  1575. if decreaseblock~=nil then
  1576. block.Value=block.Value-decreaseblock
  1577. end
  1578. end
  1579. end
  1580. end
  1581. if blocked==false then
  1582. -- h:TakeDamage(Damage)
  1583. h.Health=h.Health-Damage
  1584. showDamage(hit.Parent,Damage,.5,BrickColor:Red())
  1585. else
  1586. h.Health=h.Health-(Damage/2)
  1587. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
  1588. end
  1589. if Type=="Knockdown" then
  1590. hum=hit.Parent.Humanoid
  1591. hum.PlatformStand=true
  1592. coroutine.resume(coroutine.create(function(HHumanoid)
  1593. swait(1)
  1594. HHumanoid.PlatformStand=false
  1595. end),hum)
  1596. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  1597. --hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  1598. local bodvol=Instance.new("BodyVelocity")
  1599. bodvol.velocity=angle*knockback
  1600. bodvol.P=5000
  1601. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1602. bodvol.Parent=hit
  1603. rl=Instance.new("BodyAngularVelocity")
  1604. rl.P=3000
  1605. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1606. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  1607. rl.Parent=hit
  1608. game:GetService("Debris"):AddItem(bodvol,.5)
  1609. game:GetService("Debris"):AddItem(rl,.5)
  1610. elseif Type=="Freeze" then
  1611. BodPos=Instance.new("BodyPosition")
  1612. BodPos.P=50000
  1613. BodPos.D=1000
  1614. BodPos.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1615. BodPos.position=hit.Parent.Torso.Position
  1616. BodPos.Parent=hit.Parent.Torso
  1617. BodGy = it("BodyGyro")
  1618. BodGy.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  1619. BodGy.P = 20e+003
  1620. BodGy.Parent=hit.Parent.Torso
  1621. BodGy.cframe = hit.Parent.Torso.CFrame
  1622. hit.Parent.Torso.Anchored=true
  1623. coroutine.resume(coroutine.create(function(Part)
  1624. swait(1.5)
  1625. Part.Anchored=false
  1626. end),hit.Parent.Torso)
  1627. game:GetService("Debris"):AddItem(BodPos,3)
  1628. game:GetService("Debris"):AddItem(BodGy,3)
  1629. elseif Type=="Normal" then
  1630. vp=Instance.new("BodyVelocity")
  1631. vp.P=500
  1632. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  1633. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  1634. if KnockbackType==1 then
  1635. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  1636. elseif KnockbackType==2 then
  1637. vp.velocity=Property.CFrame.lookVector*knockback
  1638. end
  1639. if knockback>0 then
  1640. vp.Parent=hit.Parent.Torso
  1641. end
  1642. game:GetService("Debris"):AddItem(vp,.5)
  1643. elseif Type=="Up" then
  1644. local bodyVelocity=Instance.new("BodyVelocity")
  1645. bodyVelocity.velocity=vt(0,30,0)
  1646. bodyVelocity.P=5000
  1647. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1648. bodyVelocity.Parent=hit
  1649. game:GetService("Debris"):AddItem(bodyVelocity,1)
  1650. rl=Instance.new("BodyAngularVelocity")
  1651. rl.P=3000
  1652. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1653. rl.angularvelocity=Vector3.new(math.random(-2,2),math.random(-2,2),math.random(-2,2))
  1654. rl.Parent=hit
  1655. game:GetService("Debris"):AddItem(rl,.5)
  1656. elseif Type=="Snare" then
  1657. bp=Instance.new("BodyPosition")
  1658. bp.P=2000
  1659. bp.D=100
  1660. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1661. bp.position=hit.Parent.Torso.Position
  1662. bp.Parent=hit.Parent.Torso
  1663. game:GetService("Debris"):AddItem(bp,1)
  1664. elseif Type=="Charge" then
  1665. Charge=Charge+1
  1666. coroutine.resume(coroutine.create(function(Part,Hum)
  1667. swait(30)
  1668. for i=1,5 do
  1669. swait(5)
  1670. so("rbxasset://sounds\\unsheath.wav",hit,1,2)
  1671. 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)
  1672. newdam=math.random(1,5)
  1673. if blocked==false then
  1674. Hum:TakeDamage(newdam)
  1675. showDamage(hit.Parent,newdam,.5,BrickColor:Red())
  1676. else
  1677. Hum:TakeDamage(newdam/2)
  1678. showDamage(hit.Parent,newdam,.5,BrickColor.new("Bright blue"))
  1679. end
  1680. end
  1681. end),hit,h)
  1682. end
  1683. debounce=Instance.new("BoolValue")
  1684. debounce.Name="DebounceHit"
  1685. debounce.Parent=hit.Parent
  1686. debounce.Value=true
  1687. game:GetService("Debris"):AddItem(debounce,Delay)
  1688. c=Instance.new("ObjectValue")
  1689. c.Name="creator"
  1690. c.Value=Player
  1691. c.Parent=h
  1692. game:GetService("Debris"):AddItem(c,.5)
  1693. CRIT=false
  1694. end
  1695. end
  1696.  
  1697. showDamage=function(Char,Dealt,du,Color)
  1698. m=Instance.new("Model")
  1699. m.Name=tostring(math.floor(Dealt))
  1700. h=Instance.new("Humanoid")
  1701. h.Health=0
  1702. h.MaxHealth=0
  1703. h.Parent=m
  1704. c=Instance.new("Part")
  1705. c.Transparency=0
  1706. c.BrickColor=Color
  1707. c.Name="Head"
  1708. c.TopSurface=0
  1709. c.BottomSurface=0
  1710. c.formFactor="Plate"
  1711. c.Size=Vector3.new(1,.4,1)
  1712. ms=Instance.new("CylinderMesh")
  1713. ms.Scale=Vector3.new(.8,.8,.8)
  1714. if CRIT==true then
  1715. ms.Scale=Vector3.new(1,1.25,1)
  1716. end
  1717. ms.Parent=c
  1718. c.Reflectance=0
  1719. Instance.new("BodyGyro").Parent=c
  1720. c.Parent=m
  1721. if Char:findFirstChild("Head")~=nil then
  1722. c.CFrame=cf(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1723. elseif Char.Parent:findFirstChild("Head")~=nil then
  1724. c.CFrame=cf(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1725. end
  1726. f=Instance.new("BodyPosition")
  1727. f.P=2000
  1728. f.D=100
  1729. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1730. f.position=c.Position+Vector3.new(0,3,0)
  1731. f.Parent=c
  1732. game:GetService("Debris"):AddItem(m,.5+du)
  1733. c.CanCollide=false
  1734. m.Parent=workspace
  1735. c.CanCollide=false
  1736. end
  1737.  
  1738. combo=0
  1739. function ob1d(mouse)
  1740. if attack==true then return end
  1741. if SwordStance==true then
  1742. SwordStance=false
  1743. Sheathed=false
  1744. IaidoStrike()
  1745. return end
  1746. if SwordStance==true then return end
  1747. if Sheathed==true then return end
  1748. hold=true
  1749. if combo==0 then
  1750. combo=1
  1751. attackone()
  1752. elseif combo==1 then
  1753. combo=2
  1754. attacktwo()
  1755. elseif combo==2 then
  1756. combo=0
  1757. attackthree()
  1758. end
  1759. coroutine.resume(coroutine.create(function()
  1760. for i=1,50 do
  1761. if attack==false then
  1762. swait()
  1763. end
  1764. end
  1765. if attack==false then
  1766. combo=0
  1767. end
  1768. end))
  1769. end
  1770.  
  1771. function ob1u(mouse)
  1772. hold = false
  1773. end
  1774.  
  1775. buttonhold = false
  1776.  
  1777. eul=0
  1778. holdx=false
  1779. equipped=false
  1780. function key(key)
  1781. if key=="v" and ripostestance==true then
  1782. ripostestance=false
  1783. con1:disconnect()
  1784. for i=0,1,0.1 do
  1785. swait()
  1786. Torso.Neck.C0=necko*euler(0,0,-0.2-0.8*i)
  1787. Torso.Neck.C1=necko2*euler(-0.1-0.1*i,0,0)
  1788. RootJoint.C0=RootCF*euler(0,0,0.2+0.8*i)
  1789. 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)
  1790. RW.C1=cf(0,0.5,0)*euler(0,-1.57,0)
  1791. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-1+0.2*i,-0.2+0.2*i)
  1792. LW.C1=cf(0,0.5,0)*euler(-0.9+1*i,0,0)
  1793. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1*i,0)
  1794. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  1795. LH.C0=cf(-0.5,-1,0)*euler(-0.2*i,-1.57-1*i,0)
  1796. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  1797. end
  1798. Humanoid.WalkSpeed=16
  1799. attack=false
  1800. return end
  1801. if key=="x" then
  1802. holdx=true
  1803. end
  1804. if attack==true then return end
  1805. if key=="f" then
  1806. attack=true
  1807. if equipped==false then
  1808. equipped=true
  1809. RSH=ch.Torso["Right Shoulder"]
  1810. LSH=ch.Torso["Left Shoulder"]
  1811. --
  1812. RSH.Parent=nil
  1813. LSH.Parent=nil
  1814. --
  1815. RW.Name="Right Shoulder"
  1816. RW.Part0=ch.Torso
  1817. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  1818. RW.C1=cf(0, 0.5, 0)
  1819. RW.Part1=ch["Right Arm"]
  1820. RW.Parent=ch.Torso
  1821. --
  1822. LW.Name="Left Shoulder"
  1823. LW.Part0=ch.Torso
  1824. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  1825. LW.C1=cf(0, 0.5, 0)
  1826. LW.Part1=ch["Left Arm"]
  1827. LW.Parent=ch.Torso
  1828. --
  1829. equipanim()
  1830. else
  1831. if Sheathed==false then
  1832. Sheathed=true
  1833. Sheath()
  1834. end
  1835. equipped=false
  1836. hideanim()
  1837. swait(0)
  1838. RW.Parent=nil
  1839. LW.Parent=nil
  1840. RSH.Parent=player.Character.Torso
  1841. LSH.Parent=player.Character.Torso
  1842. end
  1843. attack=false
  1844. end
  1845. if equipped==false then return end
  1846. if Sheathed==true then
  1847. if key=="g" then
  1848. Sheathed=false
  1849. IaidoStrike()
  1850. end
  1851. if key=="z" then
  1852. IaidoDash()
  1853. end
  1854. if key=="x" then
  1855. Wilt()
  1856. end
  1857. if key=="c" then
  1858. Rose()
  1859. end
  1860. if key=="v" then
  1861. Riposte()
  1862. end
  1863. elseif Sheathed==false then
  1864. if key=="g" then
  1865. Sheathed=true
  1866. Sheath()
  1867. end
  1868. if key=="z" then
  1869. IaidoDash2()
  1870. end
  1871. if key=="x" then
  1872. Sheathed=true
  1873. Wilt2()
  1874. end
  1875. if key=="c" then
  1876. Rose2()
  1877. end
  1878. if key=="v" then
  1879. ElecStorm()
  1880. --Endium()
  1881. end
  1882. end
  1883. end
  1884.  
  1885. function key2(key)
  1886. if key=="x" then
  1887. holdx=false
  1888. end
  1889. end
  1890.  
  1891. function s(mouse)
  1892. mouse.Button1Down:connect(function() ob1d(mouse) end)
  1893. mouse.Button1Up:connect(function() ob1u(mouse) end)
  1894. mouse.KeyDown:connect(key)
  1895. mouse.KeyUp:connect(key2)
  1896.  
  1897. player=Player
  1898. ch=Character
  1899. MMouse=mouse
  1900. end
  1901.  
  1902. function ds(mouse)
  1903. end
  1904.  
  1905. Bin.Selected:connect(s)
  1906. Bin.Deselected:connect(ds)
  1907. print("Cyber Samurai loaded.")
  1908.  
  1909. local mananum=0
  1910. while true do
  1911. swait()
  1912. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  1913. local velderp=RootPart.Velocity.y
  1914. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  1915. if equipped==true then
  1916. if Sheathed==false and attack==false then
  1917. idle=idle+1
  1918. else
  1919. idle=0
  1920. end
  1921. if idle>=500 then
  1922. if attack==false then
  1923. Sheathed=true
  1924. Sheath()
  1925. end
  1926. end
  1927. if RootPart.Velocity.y > 1 and hitfloor==nil then
  1928. Anim="Jump"
  1929. if attack==false and Sheathed==false then
  1930. RW.C0=clerp(RW.C0,cf(.7,0.5,-0.5)*euler(1,1.57,0)*euler(.8,0,0),.3)
  1931. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(-0.3,0,0),.3)
  1932. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-0.5),.3)
  1933. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.2,0,0),.3)
  1934. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1935. RH.C0=clerp(RH.C0,cf(1,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2)
  1936. LH.C0=clerp(LH.C0,cf(-1,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2)
  1937. end
  1938. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  1939. Anim="Fall"
  1940. if attack==false and Sheathed==false then
  1941. RW.C0=clerp(RW.C0,cf(.5,0.5,-0.5)*euler(1.6,1.57,0)*euler(1,0,0),.3)
  1942. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(-0.3,0,0),.3)
  1943. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-0.5),.3)
  1944. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.4,0,0),.3)
  1945. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1946. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.2)
  1947. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.2)
  1948. end
  1949. elseif torvel<1 and hitfloor~=nil then
  1950. Anim="Idle"
  1951. if attack==false and Sheathed==false then
  1952. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.5),.3)
  1953. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
  1954. handlewld.C1=clerp(handlewld.C1,euler(0,0,0),.3)
  1955. wld11.C0=clerp(wld11.C0,euler(1.57,3.14,0)*cf(0,1,0),.3)
  1956. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.5),.3)
  1957. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1.3,1.57,0),.3)
  1958. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(-0.3,0,0),.3)
  1959. LW.C0=clerp(LW.C0,cf(-1.3,0.5,-0.3)*euler(0,-0.6,-0.2),.3)
  1960. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0.1,0,0),.3)
  1961. RH.C0=clerp(RH.C0,RHC0,.3)
  1962. RH.C1=clerp(RH.C1,RHC1,.3)
  1963. LH.C0=clerp(LH.C0,LHC0,.3)
  1964. LH.C1=clerp(LH.C1,LHC1,.3)
  1965. end
  1966. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  1967. Anim="Walk"
  1968. if attack==false and Sheathed==false then
  1969. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.5),.3)
  1970. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
  1971. handlewld.C1=clerp(handlewld.C1,euler(0,0,0),.3)
  1972. wld11.C0=clerp(wld11.C0,euler(1.57,3.14,0)*cf(0,1,0),.3)
  1973. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(.2,0,.5),.3)
  1974. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1.3,1.57,0)*euler(.6,0,0),.3)
  1975. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(-0.3,0,0),.3)
  1976. LW.C0=clerp(LW.C0,cf(-1.3,0.5,-0.3)*euler(0,-0.6,-0.2),.3)
  1977. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0.4,0,0),.3)
  1978. end
  1979. elseif torvel>=22 and hitfloor~=nil then
  1980. Anim="Run"
  1981. if attack==false and Sheathed==false then
  1982. end
  1983. end
  1984. end
  1985. if #Effects>0 then
  1986. for e=1,#Effects do
  1987. if Effects[e]~=nil then
  1988. local Thing=Effects[e]
  1989. if Thing~=nil then
  1990. local Part=Thing[1]
  1991. local Mode=Thing[2]
  1992. local Delay=Thing[3]
  1993. local IncX=Thing[4]
  1994. local IncY=Thing[5]
  1995. local IncZ=Thing[6]
  1996. if Thing[1].Transparency<=1 then
  1997. if Thing[2]=="Block1" then
  1998. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1999. Mesh=Thing[7]
  2000. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  2001. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2002. elseif Thing[2]=="Cylinder" then
  2003. Mesh=Thing[7]
  2004. Mesh.Scale=Mesh.Scale-vt(Thing[4],0,Thing[6])
  2005. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2006. elseif Thing[2]=="Cylinder2" then
  2007. if Thing[1]:findFirstChild("Mesh")~=nil then
  2008. Mesh=Thing[7]
  2009. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  2010. end
  2011. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2012. elseif Thing[2]=="Elec" then
  2013. Mesh=Thing[7]
  2014. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  2015. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2016. end
  2017. else
  2018. Part.Parent=nil
  2019. table.remove(Effects,e)
  2020. end
  2021. end
  2022. --end
  2023. end
  2024. end
  2025. end
  2026. fenbarmana2:TweenSize(UDim2.new(4*mana/100,0,0.2,0),nil,1,0.4,true)
  2027. fenbarmana4.Text="Energy("..mana..")"
  2028. if mana>=100 then
  2029. mana=100
  2030. else
  2031. if mananum<=6 then
  2032. mananum=mananum+1
  2033. else
  2034. mananum=0
  2035. mana=mana+1
  2036. end
  2037. end
  2038. end
  2039. --[[
  2040. Copyrighted (C) Fenrier 2014
  2041. ]]
Add Comment
Please, Sign In to add comment