Advertisement
memberhero

1000 views old cyber samurai

Dec 20th, 2016
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 46.08 KB | None | 0 0
  1.  
  2. --[[
  3. Cyber Samurai Class Made by Fenrier.
  4. ]]
  5. Player=game:GetService("Players").LocalPlayer
  6. Character=Player.Character
  7. PlayerGui=Player.PlayerGui
  8. Backpack=Player.Backpack
  9. Torso=Character.Torso
  10. Head=Character.Head
  11. Humanoid=Character.Humanoid
  12. LeftArm=Character["Left Arm"]
  13. LeftLeg=Character["Left Leg"]
  14. RightArm=Character["Right Arm"]
  15. RightLeg=Character["Right Leg"]
  16. LS=Torso["Left Shoulder"]
  17. LH=Torso["Left Hip"]
  18. RS=Torso["Right Shoulder"]
  19. RH=Torso["Right Hip"]
  20. Neck=Torso.Neck
  21. it=Instance.new
  22. vt=Vector3.new
  23. cf=CFrame.new
  24. euler=CFrame.fromEulerAnglesXYZ
  25. angles=CFrame.Angles
  26. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  27. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  28. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  29. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  30. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  31. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  32. RootPart=Character.HumanoidRootPart
  33. RootJoint=RootPart.RootJoint
  34. RootCF=euler(-1.57,0,3.14)
  35. attack = false
  36. attackdebounce = false
  37. MMouse=nil
  38. combo=0
  39. mana=0
  40. heat=0
  41. heatcooldown=false
  42. --player
  43. player=nil
  44. --save shoulders
  45. RSH, LSH=nil, nil
  46. --welds
  47. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  48. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  49. LH=Torso["Left Hip"]
  50. RH=Torso["Right Hip"]
  51. Sheathed=true
  52. SwordStance=false
  53. Charge=0
  54.  
  55. function swait(num)
  56. if num==0 or num==nil then
  57. game:service'RunService'.RenderStepped:wait()
  58. else
  59. for i=0,num do
  60. game:service'RunService'.RenderStepped:wait()
  61. end
  62. end
  63. end
  64.  
  65. if Character:findFirstChild("Cyber Edge",true) ~= nil then
  66. Character:findFirstChild("Cyber Edge",true).Parent = nil
  67. end
  68. if Player.PlayerGui:findFirstChild("WeaponGUI",true) ~= nil then
  69. Player.PlayerGui:findFirstChild("WeaponGUI",true).Parent = nil
  70. end
  71.  
  72.  
  73. function NoOutline(Part)
  74. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  75. end
  76.  
  77. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  78. local fp=it("Part")
  79. fp.formFactor=formfactor
  80. fp.Parent=parent
  81. fp.Reflectance=reflectance
  82. fp.Transparency=transparency
  83. fp.CanCollide=false
  84. fp.Locked=true
  85. fp.BrickColor=brickcolor
  86. fp.Name=name
  87. fp.Size=size
  88. fp.Position=Torso.Position
  89. NoOutline(fp)
  90. fp.Material="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 fengui=it("GuiMain")
  117. fengui.Parent=Player.PlayerGui
  118. fengui.Name="WeaponGUI"
  119.  
  120. local modelzorz=Instance.new("Model")
  121. modelzorz.Parent=Character
  122. modelzorz.Name="Cyber Edge"
  123.  
  124. local handle=part(3,modelzorz,0,0.5,BrickColor.new("Dark stone grey"),"Handle",vt())
  125. local prt1=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part1",vt())
  126. local prt2=part(3,modelzorz,0,0,BrickColor.new("Really red"),"Part2",vt())
  127. local prt3=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part3",vt())
  128. local prt4=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part4",vt())
  129. local prt11=part(3,modelzorz,0,0,Torso.BrickColor,"Part11",vt())
  130. local prt12=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part12",vt())
  131. local prt13=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part13",vt())
  132. local prt14=part(3,modelzorz,0.6,0.4,BrickColor.new("Really red"),"Part14",vt())
  133. prt14.Material="Neon"
  134. local prt15=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part15",vt())
  135. local prt16=part(3,modelzorz,0.6,0.4,BrickColor.new("Really red"),"Part16",vt())
  136. prt16.Material="Neon"
  137. local prt17=part(3,modelzorz,0.6,0.4,BrickColor.new("Really red"),"Part17",vt())
  138. prt17.Material="Neon"
  139.  
  140. local msh1=mesh("BlockMesh",prt1,"","",vt(0,0,0),vt(1.5,20,2))
  141. local msh2=mesh("BlockMesh",prt2,"","",vt(0,0,0),vt(1.25,20.1,1.75))
  142. local msh3=mesh("BlockMesh",prt3,"","",vt(0,0,0),vt(1.6,5,2.1))
  143. local msh4=mesh("SpecialMesh",prt4,"Wedge","",vt(0,0,0),vt(1.6,2,2.1))
  144. local msh11=mesh("BlockMesh",prt11,"","",vt(0,0,0),vt(1,4,1))
  145. local msh12=mesh("BlockMesh",prt12,"","",vt(0,0,0),vt(0.9,5,0.9))
  146. local msh13=mesh("CylinderMesh",prt13,"","",vt(0,0,0),vt(2.5,0.5,2.5))
  147. local msh14=mesh("CylinderMesh",prt14,"","",vt(0,0,0),vt(2,0.5,2))
  148. local msh15=mesh("BlockMesh",prt15,"","",vt(0,0,0),vt(0.5,15,0.5))
  149. local msh16=mesh("BlockMesh",prt16,"","",vt(0,0,0),vt(0.2,15,1))
  150. local msh17=mesh("SpecialMesh",prt17,"Wedge","",vt(0,0,0),vt(0.2,2,1.2))
  151.  
  152. --local handlewld=weld(handle,handle,Torso,euler(0,0,0)*cf(0,0,-1))
  153. local handlewld=weld(handle,handle,LeftArm,euler(1.57,0,0)*cf(0,1,0))
  154. local wld1=weld(prt1,prt1,handle,euler(0,0,0)*cf(0,1,0))
  155. local wld2=weld(prt2,prt2,prt1,euler(0,0,0)*cf(0,0,0))
  156. local wld3=weld(prt3,prt3,prt1,euler(0,0,0)*cf(0,1.7,0))
  157. local wld4=weld(prt4,prt4,prt3,euler(3.14,3.14,0)*cf(0,0.7,0))
  158. local wld11=weld(prt11,prt11,prt1,euler(0,0,0)*cf(0,-2.55,-0.05))
  159. --local wld11=weld(prt11,prt11,RightArm,euler(1.57,3.14,0)*cf(0,1,0))
  160. local wld12=weld(prt12,prt12,prt11,euler(0,0,0)*cf(0,0,0))
  161. local wld13=weld(prt13,prt13,prt12,euler(0,0,0)*cf(0,0.5,0.1))
  162. local wld14=weld(prt14,prt14,prt13,euler(0,0,0)*cf(0,0.01,0))
  163. local wld15=weld(prt15,prt15,prt12,euler(0,0,0)*cf(0,2,0))
  164. local wld16=weld(prt16,prt16,prt12,euler(0,0,0)*cf(0,2,0.1))
  165. local wld17=weld(prt17,prt17,prt16,euler(3.14,3.14,0)*cf(0,1.7,-0.02))
  166.  
  167. n=0.2
  168. n2=5
  169. for i=1,3 do
  170. Name="Part"..n2
  171. local prt5=part(3,modelzorz,0,0,BrickColor.new("Black"),Name,vt())
  172. local msh5=mesh("BlockMesh",prt5,"","",vt(0,0,0),vt(1.6,1,2.1))
  173. local wld5=weld(prt5,prt5,prt1,euler(0,0,0)*cf(0,n,0))
  174. n2=n2+1
  175. Name="Part"..n2
  176. local prt6=part(3,modelzorz,0,0,BrickColor.new("Really red"),Name,vt())
  177. local msh6=mesh("BlockMesh",prt6,"","",vt(0,0,0),vt(1.61,0.5,2.11))
  178. local wld6=weld(prt6,prt6,prt5,euler(0,0,0)*cf(0,0,0))
  179. n2=n2+1
  180. n=n+0.4
  181. end
  182.  
  183. local hitbox=part(3,nil,0,1,BrickColor.new("Black"),"Hitbox",vt(1,1,1))
  184. hitbox.Anchored=false
  185.  
  186. if (script.Parent.className~="HopperBin") then
  187. Tool=Instance.new("HopperBin")
  188. Tool.Parent=Backpack
  189. Tool.Name="Cyber Edge"
  190. script.Parent=Tool
  191. end
  192. Bin=script.Parent
  193.  
  194. local bodvel=Instance.new("BodyVelocity")
  195. local bg=Instance.new("BodyGyro")
  196.  
  197. so = function(id,par,vol,pit)
  198. coroutine.resume(coroutine.create(function()
  199. local sou = Instance.new("Sound",par or workspace)
  200. sou.Volume=vol
  201. sou.Pitch=pit or 1
  202. sou.SoundId=id
  203. swait()
  204. sou:play()
  205. game:GetService("Debris"):AddItem(sou,6)
  206. end))
  207. end
  208.  
  209. function hideanim()
  210. equipped=false
  211. for i=0,1,0.1 do
  212. swait()
  213. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  214. handlewld.C1=euler(0.2-0.2*i,0,0)
  215. Torso.Neck.C0=necko*euler(0,0,-1+1*i)
  216. Torso.Neck.C1=necko2*euler(-0.2+0.2*i,0,0)
  217. RootJoint.C0=RootCF*euler(0,0,1-1*i)
  218. RW.C0=cf(.5+1*i,0.2+0.3*i,-0.5+0.5*i)*euler(0.7-0.7*i,0,-0.6+0.6*i)
  219. RW.C1=cf(0,0.5,0)*euler(0,-1.57+1.57*i,0)
  220. LW.C0=cf(-1.3-0.2*i,0.5,-0.3+0.3*i)*euler(0,-0.8+0.8*i,0)
  221. LW.C1=cf(0,0.5,0)*euler(0.1-0.1*i,0,0)
  222. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1+1*i,0)
  223. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  224. LH.C0=cf(-0.5,-1,0)*euler(-0.2+0.2*i,-1.57-1+1*i,0)
  225. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  226. end
  227. wld11.Part1=prt1
  228. wld11.C0=euler(0,0,0)*cf(0,-2.55,-0.05)
  229. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  230. handlewld.C1=euler(0,0,0)
  231. Torso.Neck.C0=necko
  232. Torso.Neck.C1=necko2
  233. RootJoint.C0=RootCF
  234. RW.C0=cf(1.5,0.5,0)*euler(0,0,0)
  235. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  236. LW.C0=cf(-1.5,0.5,0)*euler(0,0,0)
  237. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  238. RH.C0=RHC0
  239. RH.C1=RHC1
  240. LH.C0=LHC0
  241. LH.C1=LHC1
  242. end
  243.  
  244. function equipanim()
  245. equipped=true
  246. for i=0,1,0.1 do
  247. swait()
  248. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  249. handlewld.C1=euler(0.2*i,0,0)
  250. Torso.Neck.C0=necko*euler(0,0,-1*i)
  251. Torso.Neck.C1=necko2*euler(-0.2*i,0,0)
  252. RootJoint.C0=RootCF*euler(0,0,1*i)
  253. RW.C0=cf(1.5-1*i,0.5-0.3*i,-0.5*i)*euler(0.7*i,0,-0.6*i)
  254. RW.C1=cf(0,0.5,0)*euler(0,-1.57*i,0)
  255. LW.C0=cf(-1.5+0.2*i,0.5,-0.3*i)*euler(0,-0.8*i,0)
  256. LW.C1=cf(0,0.5,0)*euler(0.1*i,0,0)
  257. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1*i,0)
  258. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  259. LH.C0=cf(-0.5,-1,0)*euler(-0.2*i,-1.57-1*i,0)
  260. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  261. end
  262. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  263. handlewld.C1=euler(0.2,0,0)
  264. Torso.Neck.C0=necko*euler(0,0,-1)
  265. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  266. RootJoint.C0=RootCF*euler(0,0,1)
  267. RW.C0=cf(.5,0.2,-0.5)*euler(0.7,0,-0.6)
  268. RW.C1=cf(0,0.5,0)*euler(0,-1.57,0)
  269. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  270. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  271. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1,0)
  272. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  273. LH.C0=cf(-0.5,-1,0)*euler(-0.2,-1.57-1,0)
  274. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  275. end
  276.  
  277. function IaidoStrike()
  278. attack=true
  279. wld11.Part1=RightArm
  280. wld11.C0=euler(1.57-0.2,2.5,0)*cf(-0.2,1,-0.2)
  281. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  282. LastPoint=Point
  283. so("rbxasset://sounds\\unsheath.wav",prt11,1,1.4)
  284. so("http://www.roblox.com/asset/?id=161006195",prt11,1,1)
  285. local ef=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  286. ef.Anchored=true
  287. ef.CFrame=RootPart.CFrame*cf(0,0,-6)
  288. MagniDamage(ef,7,10,20,math.random(10,20),"Normal")
  289. game:GetService("Debris"):AddItem(ef,2)
  290. for i=0,1,0.1 do
  291. 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)
  292. Torso.Neck.C0=necko*euler(0,0,-1+0.5*i)
  293. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  294. RootJoint.C0=RootCF*euler(0,0,1-0.5*i)
  295. 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)
  296. RW.C1=cf(0,0.5+4*i,0)*euler(0,-1.57-0.43*i,0)
  297. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  298. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  299. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  300. effect("Bright red",0.4,LastPoint,Point)
  301. LastPoint=Point
  302. end
  303. n=2
  304. for i=0,1,0.05 do
  305. swait()
  306. Torso.Neck.C0=necko*euler(0,0,-0.5)
  307. Torso.Neck.C1=necko2*euler(-0.2+0.2*i,0,0)
  308. RootJoint.C0=RootCF*euler(0,0,0.5)
  309. RW.C0=cf(1.5,0.5,0)*euler(2.1+0.2*i*n,0,0.8+0.2*i*n)
  310. RW.C1=cf(0,0.5,0)*euler(0,-2.07-0.2*i*n,0)
  311. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,-0.4*i*n)
  312. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  313. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1+1*i,0)
  314. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  315. LH.C0=cf(-0.5,-1,0)*euler(-0.2+0.2*i,-1.57-1+1*i,0)
  316. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  317. n=n-0.05
  318. end
  319. for i=0,1,0.1 do
  320. swait()
  321. handlewld.C1=euler(0.2-0.2*i,0,0)
  322. wld11.C0=euler(1.57*i,2.7+0.44*i,0)*cf(0,1,0)
  323. RW.C0=cf(1.5-0.5*i,0.5,-0.5*i)*euler(2.3-1*i,1.57*i,1-1*i)
  324. RW.C1=cf(0,0.5,0)*euler(-0.3*i,-2.27+2.27*i,0)
  325. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8+0.2*i,-0.4+0.2*i)
  326. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  327. end
  328. handlewld.C1=euler(0,0,0)
  329. wld11.C0=euler(1.57,3.14,0)*cf(0,1,0)
  330. RW.C0=cf(1,0.5,-0.5)*euler(1.3,1.57,0)
  331. RW.C1=cf(0,0.5,0)*euler(-0.3,0,0)
  332. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.6,-0.2)
  333. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  334. attack=false
  335. end
  336.  
  337. function Sheath()
  338. attack=true
  339. for i=0,1,0.1 do
  340. swait()
  341. wld11.C0=euler(1.57+0.6*i,3.14,0)*cf(0,1,0)
  342. handlewld.C1=euler(0.6*i,0,0)
  343. Torso.Neck.C0=necko*euler(0.2*i,0,-0.5+0.5*i)
  344. RootJoint.C0=RootCF*euler(0,0,0.5-0.5*i)
  345. RW.C0=cf(1+0.5*i,0.5,-0.5+0.5*i)*euler(1.3+0.27*i,1.57,0)
  346. RW.C1=cf(0,0.5,0)*euler(-0.3+0.9*i,0,0)
  347. 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)
  348. LW.C1=cf(0,0.5,0)*euler(0.1+0.5*i,0,0)
  349. end
  350. so("rbxasset://sounds\\unsheath.wav",prt11,1,1)
  351. wld11.Part1=prt1
  352. wld11.C0=euler(0,0,0)*cf(0,-2.55-2.5,-0.05)
  353. for i=0,1,0.05 do
  354. swait()
  355. Torso.Neck.C0=necko*euler(0.2+0.1*i,0,0)
  356. handlewld.C1=euler(0.6-1*i,0,0)
  357. wld11.C0=euler(0,0,0)*cf(0,-2.55-2.5+2.5*i,-0.05)
  358. RW.C0=cf(1.5-0.5*i,0.5,-0.5*i)*euler(1.57,1.57,0)
  359. RW.C1=cf(0,0.5,0)*euler(0.6-1*i,0,0)
  360. LW.C0=cf(-1.5+0.5*i,0.5,-0.5*i)*euler(1.57,-1.57,0)
  361. LW.C1=cf(0,0.5,0)*euler(0.6-1*i,0,0)
  362. end
  363. for i=0,1,0.05 do
  364. swait()
  365. Torso.Neck.C0=necko*euler(0.3-0.3*i,0,-1*i)
  366. Torso.Neck.C1=necko2*euler(-0.2*i,0,0)
  367. RootJoint.C0=RootCF*euler(0,0,1*i)
  368. handlewld.C1=euler(-0.4+0.6*i,0,0)
  369. 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)
  370. RW.C1=cf(0,0.5,0)*euler(-0.4+0.4*i,-1.57*i,0)
  371. 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)
  372. LW.C1=cf(0,0.5,0)*euler(-0.4+0.5*i,0,0)
  373. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1*i,0)
  374. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  375. LH.C0=cf(-0.5,-1,0)*euler(-0.2*i,-1.57-1*i,0)
  376. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  377. end
  378. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  379. handlewld.C1=euler(0.2,0,0)
  380. wld11.C0=euler(0,0,0)*cf(0,-2.55,-0.05)
  381. Torso.Neck.C0=necko*euler(0,0,-1)
  382. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  383. RootJoint.C0=RootCF*euler(0,0,1)
  384. RW.C0=cf(.5,0.2,-0.5)*euler(0.7,0,-0.6)
  385. RW.C1=cf(0,0.5,0)*euler(0,-1.57,0)
  386. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  387. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  388. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1,0)
  389. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  390. LH.C0=cf(-0.5,-1,0)*euler(-0.2,-1.57-1,0)
  391. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  392. attack=false
  393. end
  394.  
  395. function attackone()
  396. attack=true
  397. for i=0,1,0.1 do
  398. swait()
  399. Torso.Neck.C0=necko*euler(0,0,-0.5-0.3*i)
  400. RootJoint.C0=RootCF*euler(0,0,0.5+0.3*i)
  401. wld11.C0=euler(1.57,3.14,0)*cf(0,1,0)
  402. RW.C0=cf(1-0.5*i,0.5,-0.5)*euler(1.3+0.2*i,1.57,0)
  403. RW.C1=cf(0,0.5,0)*euler(-0.3-0.3*i,0,0)
  404. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.6,-0.2)
  405. LW.C1=cf(0,0.5,0)*euler(0.1+0.2*i,0,0)
  406. end
  407. con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,5,10,math.random(5,10),"Normal",RootPart,.2,1,nil,1) end)
  408. hitbox.Parent=modelzorz
  409. hitbox.Size=vt(1,4,1)
  410. hitbox.Transparency=1
  411. hitbox.CFrame=prt16.CFrame
  412. so("http://www.roblox.com/asset/?id=161006195",prt11,1,1.1)
  413. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  414. LastPoint=Point*cf(0,0,.1)
  415. for i=0,1,0.2 do
  416. swait()
  417. Torso.Neck.C0=necko*euler(0,0,-0.8+1.2*i)
  418. RootJoint.C0=RootCF*euler(0,0,0.8-1.2*i)
  419. wld11.C0=euler(1.57-1.57*i,3.14,0)*cf(0,1,0)
  420. RW.C0=cf(0.5+1*i,0.5,-0.5+0.5*i)*euler(1.5,1.57,0)
  421. RW.C1=cf(0,0.5,0)*euler(-0.6+1.6*i,0,0)
  422. LW.C0=cf(-1.3-0.2*i,0.5,-0.3+0.3*i)*euler(0,-0.6,-0.2-0.2*i)
  423. LW.C1=cf(0,0.5,0)*euler(0.3,0,0)
  424. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  425. effect("Bright red",0.4,LastPoint,Point)
  426. LastPoint=Point
  427. hitbox.CFrame=prt16.CFrame
  428. end
  429. con1:disconnect()
  430. hitbox.Parent=nil
  431. n=2
  432. for i=0,1,0.2 do
  433. swait()
  434. Torso.Neck.C0=necko*euler(0,0,0.4+0.2*i*n)
  435. RootJoint.C0=RootCF*euler(0,0,-0.4-0.2*i*n)
  436. wld11.C0=euler(0,3.14,0)*cf(0,1,0)
  437. RW.C0=cf(1.5,0.5,0)*euler(1.5,1.57,0)
  438. RW.C1=cf(0,0.5,0)*euler(1+0.2*i*n,0,0)
  439. LW.C0=cf(-1.5,0.5,0)*euler(0,-0.6,-0.4)
  440. LW.C1=cf(0,0.5,0)*euler(0.3,0,0)
  441. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  442. effect("Bright red",0.4,LastPoint,Point)
  443. LastPoint=Point
  444. n=n-0.2
  445. end
  446. attack=false
  447. end
  448.  
  449. function attacktwo()
  450. attack=true
  451. so("http://www.roblox.com/asset/?id=161006212",prt11,1,1.3)
  452. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  453. LastPoint=Point
  454. local ef=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  455. ef.Anchored=true
  456. ef.CFrame=RootPart.CFrame*cf(0,0,-3)
  457. MagniDamage(ef,5,10,15,math.random(10,20),"Normal")
  458. game:GetService("Debris"):AddItem(ef,2)
  459. for i=0,1,0.1 do
  460. wld11.C0=euler(3.14-1.57*i,3.14,3.14)*cf(0,1,0)
  461. Torso.Neck.C0=necko*euler(0,0,0.6-1.2*i)
  462. RootJoint.C0=RootCF*euler(0,0,-0.6+1.2*i)
  463. RW.C0=cf(1.5-1*i,0.5,-0.5*i)*euler(1.5+0.2*i,1.57,0)
  464. RW.C1=cf(0,0.5,0)*euler(1.2-2.1*i,0.5*i,0)
  465. LW.C0=cf(-1.5,0.5,0)*euler(0,-0.6,-0.4)
  466. LW.C1=cf(0,0.5,0)*euler(0.3,0,0)
  467. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  468. effect("Bright red",0.4,LastPoint,Point)
  469. LastPoint=Point
  470. end
  471. n=2
  472. for i=0,1,0.05 do
  473. swait()
  474. wld11.C0=euler(1.57,3.14,3.14)*cf(0,1,0)
  475. Torso.Neck.C0=necko*euler(0,0,-0.6-0.1*i*n)
  476. RootJoint.C0=RootCF*euler(0,0,0.6+0.1*i*n)
  477. RW.C0=cf(.5,0.5,-0.5)*euler(1.7,1.57,0)
  478. RW.C1=cf(0,0.5,0)*euler(-0.9-0.2*i*n,0.5,0)
  479. LW.C0=cf(-1.5,0.5,0)*euler(0,-0.6+0.2*i*n,-0.4+0.2*i*n)
  480. LW.C1=cf(0,0.5,0)*euler(0.3+0.2*i*n,0,0)
  481. n=n-0.05
  482. end
  483. attack=false
  484. end
  485.  
  486. function attackthree()
  487. attack=true
  488. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  489. LastPoint=Point
  490. con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,5,10,math.random(5,10),"Normal",RootPart,.2,1,nil,1) end)
  491. hitbox.Parent=modelzorz
  492. hitbox.Size=vt(1,4,1)
  493. hitbox.Transparency=1
  494. hitbox.CFrame=prt16.CFrame
  495. so("http://www.roblox.com/asset/?id=161006195",prt11,1,0.9)
  496. for i=0,1,0.2 do
  497. swait()
  498. wld11.C0=euler(1.57-1.57*i,3.14,0)*cf(0,1,0)
  499. Torso.Neck.C0=necko*euler(0,0,-0.7+0.2*i)
  500. RootJoint.C0=RootCF*euler(0,0,0.7-0.2*i)
  501. RW.C0=cf(.5+1*i,0.5,-0.5+0.5*i)*euler(1.7,1.57,0)
  502. RW.C1=cf(0,0.5,0)*euler(-1.1+2.6*i,0.5,0)
  503. LW.C0=cf(-1.5,0.5,0)*euler(0,-0.4,-0.2)
  504. LW.C1=cf(0,0.5,0)*euler(0.5,0,0)
  505. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  506. effect("Bright red",0.4,LastPoint,Point)
  507. LastPoint=Point
  508. hitbox.CFrame=prt16.CFrame
  509. end
  510. con1:disconnect()
  511. hitbox.Parent=nil
  512. n=2
  513. for i=0,1,0.2 do
  514. swait()
  515. Torso.Neck.C0=necko*euler(0,0,-0.5+0.2*i*n)
  516. RootJoint.C0=RootCF*euler(0,0,0.5-0.2*i*n)
  517. RW.C0=cf(1.5,0.5,0)*euler(1.7,1.57,0)
  518. RW.C1=cf(0,0.5,0)*euler(1.5+0.2*i*n,0.5,0)
  519. LW.C0=cf(-1.5,0.5,0)*euler(0,-0.4,-0.2)
  520. LW.C1=cf(0,0.5,0)*euler(0.5,0,0)
  521. n=n-0.2
  522. end
  523. attack=false
  524. end
  525.  
  526. function Stance()
  527. attack=true
  528. SwordStance=true
  529. Humanoid.WalkSpeed=0.1
  530. for i=0,1,0.05 do
  531. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  532. handlewld.C1=euler(0.2+0.1*i,0,0)
  533. wld11.C0=euler(0,0,0)*cf(0,-2.55,-0.05)
  534. Torso.Neck.C0=necko*euler(0,0,-1-0.1*i)
  535. Torso.Neck.C1=necko2*euler(-0.2-0.1*i,0,0)
  536. RootJoint.C0=RootCF*euler(0,0,1+0.1*i)
  537. RW.C0=cf(.5,0.2,-0.5)*euler(0.7,0,-0.6+0.1*i)
  538. RW.C1=cf(0,0.5,0)*euler(0,-1.57,0)
  539. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  540. LW.C1=cf(0,0.5,0)*euler(0.1+0.1*i,0,0)
  541. end
  542. coroutine.resume(coroutine.create(function()
  543. for i=1,100 do
  544. if SwordStance==true then
  545. swait()
  546. end
  547. end
  548. SwordStance=false
  549. Humanoid.WalkSpeed=16
  550. for i=0,1,0.1 do
  551. if attack==false then
  552. swait()
  553. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  554. handlewld.C1=euler(0.2,0,0)
  555. wld11.C0=euler(0,0,0)*cf(0,-2.55,-0.05)
  556. Torso.Neck.C0=necko*euler(0,0,-1)
  557. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  558. RootJoint.C0=RootCF*euler(0,0,1)
  559. RW.C0=cf(.5,0.2,-0.5)*euler(0.7,0,-0.6)
  560. RW.C1=cf(0,0.5,0)*euler(0,-1.57,0)
  561. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  562. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  563. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1,0)
  564. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  565. LH.C0=cf(-0.5,-1,0)*euler(-0.2,-1.57-1,0)
  566. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  567. end
  568. end
  569. end))
  570. attack=false
  571. end
  572.  
  573. function IaidoDash()
  574. attack=true
  575. explode=false
  576. Humanoid.WalkSpeed=0
  577. wld11.Part1=RightArm
  578. wld11.C0=euler(1.57-0.2,2.5,0)*cf(-0.2,1,-0.2)
  579. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  580. LastPoint=Point
  581. so("rbxasset://sounds\\unsheath.wav",prt11,1,1.6)
  582. so("http://www.roblox.com/asset/?id=161006195",prt11,1,0.9)
  583. range=20
  584. if Charge>=3 then
  585. print("KABOOM")
  586. Charge=0
  587. explode=true
  588. end
  589. for i=0,1,0.1 do
  590. local ef=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  591. ef.Anchored=true
  592. ef.CFrame=Torso.CFrame*cf(0,0,-2)*euler(0,0,1-0.5*i)
  593. if i==0.6 and explode==true then
  594. print("die")
  595. MagniDamage(Torso,10,20,30,math.random(20,40),"Knockdown")
  596. so("http://www.roblox.com/Asset?ID=87784452",Torso,1,1.2)
  597. for i=1,3 do
  598. MagicBlock(BrickColor.new("Bright red"),Torso.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,3,3,3,0.06,2,Torso)
  599. MagicCircle(BrickColor.new("Bright red"),Torso.CFrame,1,1,1,3,3,3,0.03)
  600. end
  601. end
  602. if explode==false then
  603. MagniDamage(ef,5,10,20,math.random(10,20),"Charge")
  604. end
  605. game:GetService("Debris"):AddItem(ef,2)
  606. 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)
  607. Torso.Neck.C0=necko*euler(0,0,-1+0.5*i)
  608. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  609. RootJoint.C0=RootCF*cf(0,-range*i,0)*euler(0,0,1-0.5*i)
  610. 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)
  611. RW.C1=cf(0,0.5,0)*euler(0,-1.57-0.43*i,0)
  612. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  613. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  614. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  615. effect("Bright red",0.4,LastPoint,Point)
  616. LastPoint=Point
  617. end
  618. RootJoint.C0=RootCF*cf(0,0,0)*euler(0,0,0.5)
  619. RootPart.CFrame=RootPart.CFrame*cf(0,0,-range)
  620. n=2
  621. for i=0,1,0.05 do
  622. swait()
  623. Humanoid.WalkSpeed=0
  624. Torso.Neck.C0=necko*euler(0,0,-0.5)
  625. Torso.Neck.C1=necko2*euler(-0.2+0.2*i,0,0)
  626. RootJoint.C0=RootCF*euler(0,0,0.5)
  627. RW.C0=cf(1.5,0.5,0)*euler(2.1+0.2*i*n,0,0.8+0.2*i*n)
  628. RW.C1=cf(0,0.5,0)*euler(0,-2.07-0.2*i*n,0)
  629. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,-0.4*i*n)
  630. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  631. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1+1*i,0)
  632. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  633. LH.C0=cf(-0.5,-1,0)*euler(-0.2+0.2*i,-1.57-1+1*i,0)
  634. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  635. n=n-0.05
  636. end
  637. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  638. LastPoint=Point
  639. for i=0,1,0.05 do
  640. swait()
  641. if i==0.1 then
  642. so("http://www.roblox.com/asset/?id=161006212",prt11,1,1)
  643. elseif i==0.6 then
  644. so("http://www.roblox.com/asset/?id=161006195",prt11,1,1)
  645. end
  646. wld11.C0=euler(15.5*i,2.7,0)*cf(0,1,0)
  647. Torso.Neck.C0=necko*euler(0,0,-0.5-0.5*i)
  648. Torso.Neck.C1=necko2*euler(0,0,0)
  649. RootJoint.C0=RootCF*euler(0,0,0.5+0.5*i)
  650. RW.C0=cf(1.5,0.5,0)*euler(2.3-0.2*i,0,1-0.2*i)
  651. RW.C1=cf(0,0.5,0)*euler(0,-2.27,0)
  652. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,-0.4)
  653. LW.C1=cf(0,0.5,0)*euler(0.1+0.2*i,0,0)
  654. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  655. effect("Bright red",0.4,LastPoint,Point)
  656. LastPoint=Point
  657. end
  658. swait(5)
  659. so("rbxasset://sounds\\unsheath.wav",prt11,1,1)
  660. Humanoid.WalkSpeed=16
  661. wld11.Part1=prt1
  662. wld11.C0=euler(0,0,0)*cf(0,-2.55,-0.05)
  663. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  664. handlewld.C1=euler(0.2,0,0)
  665. Torso.Neck.C0=necko*euler(0,0,-1)
  666. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  667. RootJoint.C0=RootCF*euler(0,0,1)
  668. RW.C0=cf(.5,0.2,-0.5)*euler(0.7,0,-0.6)
  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,0)
  672. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1,0)
  673. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  674. LH.C0=cf(-0.5,-1,0)*euler(-0.2,-1.57-1,0)
  675. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  676. eul=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  677. MagicCircle(BrickColor.new("White"),cf(prt13.Position)*eul,0.5,1,0.5,0.1,2.5,0.1,0.1)
  678. 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)
  679. 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)
  680. swait(10)
  681. attack=false
  682. end
  683.  
  684. function Wilt()
  685. attack=true
  686. Humanoid.WalkSpeed=0
  687. up=-1
  688. range=2
  689. for i=1,3 do
  690. wld11.Part1=RightArm
  691. wld11.C0=euler(1.57-0.2,2.5,0)*cf(-0.2,1,-0.2)
  692. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  693. LastPoint=Point
  694. so("rbxasset://sounds\\unsheath.wav",prt11,1,1.6)
  695. so("http://www.roblox.com/asset/?id=161006195",prt11,1,0.9)
  696. for i=0,1,0.1 do
  697. local ef=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  698. ef.Anchored=true
  699. ef.CFrame=Torso.CFrame*cf(4*i,1,-4*i)*euler(0,0,1-0.5*i)
  700. MagniDamage(ef,6,5,10,math.random(10,20),"Normal")
  701. game:GetService("Debris"):AddItem(ef,2)
  702. 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)
  703. Torso.Neck.C0=necko*euler(0,0,-1+0.5*i)
  704. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  705. RootJoint.C0=RootCF*cf(0,-range*i,up*i)*euler(0,0,1-0.5*i)
  706. 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)
  707. RW.C1=cf(0,0.5,0)*euler(-(up*i)/10,-1.57-0.43*i,0)
  708. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  709. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  710. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  711. effect("Bright red",0.4,LastPoint,Point)
  712. LastPoint=Point
  713. end
  714. RootJoint.C0=RootCF*cf(0,0,0)*euler(0,0,0.5)
  715. n=2
  716. for i=0,1,0.1 do
  717. swait()
  718. Humanoid.WalkSpeed=0
  719. Torso.Neck.C0=necko*euler(0,0,-0.5)
  720. Torso.Neck.C1=necko2*euler(-0.2+0.2*i,0,0)
  721. RootJoint.C0=RootCF*euler(0,0,0.5)
  722. RW.C0=cf(1.5,0.5,0)*euler(2.1+0.2*i*n,0,0.8+0.2*i*n)
  723. RW.C1=cf(0,0.5,0)*euler(-up/10,-2-0.2*i*n,0)
  724. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,-0.4*i*n)
  725. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  726. n=n-0.1
  727. end
  728. wld11.Part1=prt1
  729. wld11.C0=euler(0,0,0)*cf(0,-2.55,-0.05)
  730. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  731. handlewld.C1=euler(0.2,0,0)
  732. Torso.Neck.C0=necko*euler(0,0,-1)
  733. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  734. RootJoint.C0=RootCF*euler(0,0,1)
  735. RW.C0=cf(.5,0.2,-0.5)*euler(0.7,0,-0.6)
  736. RW.C1=cf(0,0.5,0)*euler(0,-1.57,0)
  737. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  738. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  739. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1,0)
  740. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  741. LH.C0=cf(-0.5,-1,0)*euler(-0.2,-1.57-1,0)
  742. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  743. swait(10)
  744. up=up+2
  745. range=range+2
  746. end
  747. swait(10)
  748. Humanoid.WalkSpeed=16
  749. attack=false
  750. end
  751.  
  752. function Rose()
  753. attack=true
  754. CF=RootPart.CFrame
  755. local ef=part(3,workspace,0,0.2,BrickColor.new("Really red"),"Effect",vt(1,1,1))
  756. ef.Anchored=true
  757. ef.CFrame=CF
  758. efmsh=mesh("SpecialMesh",ef,"FileMesh","http://www.roblox.com/asset/?id=1051557",vt(0,0,0),vt(3,3,3))
  759. coroutine.resume(coroutine.create(function(Part,Mesh,CeEf)
  760. for i=0,1,0.05 do
  761. swait()
  762. MagniDamage(Part,5,5,10,20,"Up")
  763. Mesh.Scale=vt(3,3+3*i,3)
  764. Part.CFrame=CeEf*cf(0,0,-35*i)*euler(0,15*i,0)
  765. MagicBlock(BrickColor.new("Bright red"),ef.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,1.2,1.2,1.2,0.1,2,ef)
  766. Part.Transparency=i
  767. end
  768. ef.Parent=nil
  769. end),ef,efmsh,CF)
  770. wld11.Part1=RightArm
  771. wld11.C0=euler(1.57-0.2,2.5,0)*cf(-0.2,1,-0.2)
  772. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  773. LastPoint=Point
  774. so("rbxasset://sounds\\unsheath.wav",prt11,1,1.2)
  775. so("http://www.roblox.com/asset/?id=161006195",prt11,1,0.9)
  776. for i=0,1,0.2 do
  777. swait()
  778. 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)
  779. Torso.Neck.C0=necko*euler(0,0,-1+0.5*i)
  780. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  781. RootJoint.C0=RootCF*euler(0,0,1-0.5*i)
  782. 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)
  783. RW.C1=cf(0,0.5,0)*euler(0,-1.57-0.43*i,0)
  784. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  785. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  786. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  787. effect("Bright red",0.4,LastPoint,Point)
  788. LastPoint=Point
  789. end
  790. n=2
  791. for i=0,1,0.1 do
  792. swait()
  793. Humanoid.WalkSpeed=0
  794. Torso.Neck.C0=necko*euler(0,0,-0.5)
  795. Torso.Neck.C1=necko2*euler(-0.2+0.2*i,0,0)
  796. RootJoint.C0=RootCF*euler(0,0,0.5)
  797. RW.C0=cf(1.5,0.5,0)*euler(2.1+0.2*i*n,0,0.8+0.4*i*n)
  798. RW.C1=cf(0,0.5,0)*euler(0,-2-0.2*i*n,0)
  799. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,-0.4*i*n)
  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+1*i,0)
  802. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  803. LH.C0=cf(-0.5,-1,0)*euler(-0.2+0.2*i,-1.57-1+1*i,0)
  804. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  805. n=n-0.1
  806. end
  807. for i=0,1,0.05 do
  808. swait()
  809. wld11.C0=euler(2.5*i,2.7,0)*cf(0,1,0)
  810. Torso.Neck.C0=necko*euler(0,0,-0.5-0.5*i)
  811. Torso.Neck.C1=necko2*euler(0,0,0)
  812. RootJoint.C0=RootCF*euler(0,0,0.5+0.5*i)
  813. RW.C0=cf(1.5,0.5,0)*euler(2.3-0.2*i,0,1-0.2*i)
  814. RW.C1=cf(0,0.5,0)*euler(0,-2,0)
  815. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,-0.4)
  816. LW.C1=cf(0,0.5,0)*euler(0.1+0.2*i,0,0)
  817. end
  818. swait(5)
  819. so("rbxasset://sounds\\unsheath.wav",prt11,1,1)
  820. Humanoid.WalkSpeed=16
  821. wld11.Part1=prt1
  822. wld11.C0=euler(0,0,0)*cf(0,-2.55,-0.05)
  823. handlewld.C0=euler(1.57,0,0)*cf(0,1,0)
  824. handlewld.C1=euler(0.2,0,0)
  825. Torso.Neck.C0=necko*euler(0,0,-1)
  826. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  827. RootJoint.C0=RootCF*euler(0,0,1)
  828. RW.C0=cf(.5,0.2,-0.5)*euler(0.7,0,-0.6)
  829. RW.C1=cf(0,0.5,0)*euler(0,-1.57,0)
  830. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.8,0)
  831. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  832. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1,0)
  833. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  834. LH.C0=cf(-0.5,-1,0)*euler(-0.2,-1.57-1,0)
  835. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  836. eul=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  837. MagicCircle(BrickColor.new("White"),cf(prt13.Position)*eul,0.5,1,0.5,0.1,2.5,0.1,0.1)
  838. 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)
  839. 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)
  840. attack=false
  841. end
  842.  
  843. function ElecStorm()
  844. attack=true
  845. Humanoid.WalkSpeed=0
  846. wld11.Part1=RightArm
  847. wld11.C0=euler(1.57-0.2,2.5,0)*cf(-0.2,1,-0.2)
  848. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  849. LastPoint=Point
  850. so("rbxasset://sounds\\unsheath.wav",prt11,1,1.2)
  851. so("http://www.roblox.com/asset/?id=161006195",prt11,1,0.9)
  852. for i=0,1,0.1 do
  853. swait()
  854. Humanoid.WalkSpeed=0
  855. wld11.C0=euler(1.57-0.2+0.2*i,2.5-2.5*i,0)*cf(-0.2+0.2*i,1,-0.2+0.2*i)
  856. handlewld.C1=euler(0.2-0.2*i,0,0)
  857. Torso.Neck.C0=necko*euler(0,0,-1+1*i)
  858. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  859. RootJoint.C0=RootCF*euler(0,0,1-1*i)
  860. RW.C0=cf(.5+1*i,0.2+0.3*i,-0.5+0.5*i)*euler(0.7+2*i,0,-0.6+0.4*i)
  861. RW.C1=cf(0,0.5,0)*euler(0,-1.57+1.57*i,0)
  862. LW.C0=cf(-1.3,0.5,-0.3)*euler(-0.5*i,-0.8+0.4*i,0)
  863. LW.C1=cf(0,0.5,0)*euler(0.1-0.1*i,0,0.4*i)
  864. RH.C0=cf(0.5,-1,0)*euler(0,1.57-1+1*i,0)
  865. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  866. LH.C0=cf(-0.5,-1,0)*euler(-0.2+0.2*i,-1.57-1+1*i,0)
  867. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  868. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  869. effect("Bright red",0.4,LastPoint,Point)
  870. LastPoint=Point
  871. end
  872. for i=0,1,0.2 do
  873. swait()
  874. Torso.Neck.C0=necko*euler(0.2*i,0,0)
  875. Torso.Neck.C1=necko2*euler(-0.2,0,0)
  876. RootJoint.C0=RootCF*cf(0,0,-0.8*i)
  877. 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)
  878. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  879. 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)
  880. LW.C1=cf(0,0.5,0)*euler(0,0,0.4+0.2*i)
  881. RH.C0=cf(0.5,-1,0)*euler(0,1.57,-1*i)
  882. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  883. LH.C0=cf(-0.5,-1+0.2*i,-0.5*i)*euler(0,-1.57,0.2*i)
  884. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  885. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  886. effect("Bright red",0.4,LastPoint,Point)
  887. LastPoint=Point
  888. end
  889. coroutine.resume(coroutine.create(function(Part)
  890. MagicCircle(BrickColor.new("Really red"),Part.CFrame,150,150,150,-2,-2,-2,0.03)
  891. for i=1,20 do
  892. wait()
  893. for i=1,2 do
  894. MagicBlock(BrickColor.new("Bright red"),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.1,2,Part)
  895. end
  896. end
  897. end),RootPart)
  898. so("http://www.roblox.com/asset/?id=2974000",prt11,1,0.8)
  899. MagniDamage(RootPart,20,5,20,math.random(-40,-20),"Knockdown")
  900. swait(10)
  901. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  902. LastPoint=Point
  903. for i=0,1,0.05 do
  904. swait()
  905. if i==0.1 then
  906. so("http://www.roblox.com/asset/?id=161006212",prt11,1,1)
  907. elseif i==0.6 then
  908. so("http://www.roblox.com/asset/?id=161006195",prt11,1,1)
  909. end
  910. wld11.C0=euler(1.57-9.42*i,0,0)*cf(0,1,0)
  911. Torso.Neck.C0=necko*euler(0.2-0.2*i,0,0)
  912. Torso.Neck.C1=necko2*euler(-0.2+0.2*i,0,0)
  913. RootJoint.C0=RootCF*cf(0,0,-0.8+0.8*i)
  914. RW.C0=cf(1,0.5,-0.5)*euler(1.5+1*i,0,-0.7)
  915. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  916. LW.C0=cf(-1.5,0.5,0)*euler(-0.7,-0.2,0)
  917. LW.C1=cf(0,0.5,0)*euler(0,0,0.6)
  918. RH.C0=cf(0.5,-1,0)*euler(0,1.57,-1+1*i)
  919. RH.C1=cf(0,1,0)*euler(0,1.57,0)
  920. LH.C0=cf(-0.5,-0.8-0.2*i,-0.5+0.5*i)*euler(0,-1.57,0.2-0.2*i)
  921. LH.C1=cf(0,1,0)*euler(0,-1.57,0)
  922. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  923. effect("Bright red",0.4,LastPoint,Point)
  924. LastPoint=Point
  925. end
  926. for i=0,1,0.1 do
  927. swait()
  928. Torso.Neck.C0=necko*euler(0,0,-0.5*i)
  929. RootJoint.C0=RootCF*euler(0,0,0.5*i)
  930. RW.C0=cf(1,0.5,-0.5)*euler(2.5-1.2*i,1.57*i,-0.7+0.7*i)
  931. RW.C1=cf(0,0.5,0)*euler(-0.3*i,0,0)
  932. LW.C0=cf(-1.5+0.2*i,0.5,-0.3*i)*euler(-0.7+0.7*i,-0.2-0.4*i,-0.2*i)
  933. LW.C1=cf(0,0.5,0)*euler(0.1*i,0,0.6-0.6*i)
  934. local Point=prt17.CFrame*cf(0,prt17.Size.Y,0)
  935. effect("Bright red",0.4,LastPoint,Point)
  936. LastPoint=Point
  937. end
  938. wld11.C0=euler(1.57,3.14,0)*cf(0,1,0)
  939. Humanoid.WalkSpeed=16
  940. attack=false
  941. end
  942.  
  943. function MagniDamage(Part,magni,mindam,maxdam,knock,Type)
  944. for _,c in pairs(workspace:children()) do
  945. local hum=c:findFirstChild("Humanoid")
  946. if hum~=nil then
  947. local head=c:findFirstChild("Torso")
  948. if head~=nil then
  949. local targ=head.Position-Part.Position
  950. local mag=targ.magnitude
  951. if mag<=magni and c.Name~=Player.Name then
  952. Damagefunc(head,mindam,maxdam,knock,Type,RootPart,.2,1,nil,1)
  953. end
  954. end
  955. end
  956. end
  957. end
  958.  
  959. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  960. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  961. end
  962.  
  963. local Point=Torso.CFrame*cf(0,Torso.Size.Y,0)
  964. LastPoint=Point
  965. function effect(Color,Ref,LP,P1,returnn)
  966. local effectsmsh=Instance.new("CylinderMesh")
  967. effectsmsh.Scale=Vector3.new(0.2,1,0.2)
  968. effectsmsh.Name="Mesh"
  969. local effectsg=Instance.new("Part")
  970. effectsg.formFactor=3
  971. effectsg.CanCollide=false
  972. effectsg.Name="Eff"
  973. effectsg.Locked=true
  974. effectsg.Anchored=true
  975. effectsg.Size=Vector3.new(0.5,1,0.5)
  976. effectsg.Parent=workspace
  977. effectsmsh.Parent=effectsg
  978. effectsg.BrickColor=BrickColor.new(Color)
  979. effectsg.Reflectance=Ref
  980. local point1=P1
  981. local mg=(LP.p - point1.p).magnitude
  982. effectsg.Size=Vector3.new(0.5,mg,0.5)
  983. effectsg.CFrame=cf((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
  984. effectsmsh.Scale=Vector3.new(0.2,1,0.2)
  985. game:GetService("Debris"):AddItem(effectsg,2)
  986. if returnn then return effectsg end
  987. coroutine.resume(coroutine.create(function(Part,Mesh)
  988. if not returnn then
  989. for i=0,1,0.05 do
  990. wait()
  991. Part.Transparency=1*i
  992. Mesh.Scale=Vector3.new(0.5-0.5*i,1,0.5-0.5*i)
  993. end
  994. Part.Parent=nil
  995. end
  996. end),effectsg,effectsmsh)
  997. end
  998.  
  999. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type,parent)
  1000. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1001. if Type~=3 and Type~=4 then
  1002. prt.Anchored=true
  1003. end
  1004. prt.CFrame=cframe
  1005. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1006. game:GetService("Debris"):AddItem(prt,5)
  1007. coroutine.resume(coroutine.create(function(Part,Mesh,dur,ceef)
  1008. local wld=nil
  1009. if dur==3 or dur==4 then
  1010. wld=weld(Part,Part,parent,euler(0,0,0)*cf(0,0,0))
  1011. end
  1012. for i=0,1,delay do
  1013. wait()
  1014. if dur==1 then
  1015. Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1016. elseif dur==2 then
  1017. Part.CFrame=Part.CFrame
  1018. elseif dur==3 then
  1019. wld.C0=wld.C0*euler(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)
  1020. elseif dur==4 then
  1021. wld.C0=ceef
  1022. end
  1023. Part.Transparency=i
  1024. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1025. end
  1026. Part.Parent=nil
  1027. end),prt,msh,Type,cframe)
  1028. end
  1029.  
  1030. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1031. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1032. prt.Anchored=true
  1033. prt.CFrame=cframe
  1034. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  1035. game:GetService("Debris"):AddItem(prt,2)
  1036. coroutine.resume(coroutine.create(function(Part,Mesh)
  1037. local wld=nil
  1038. for i=0,1,delay do
  1039. wait()
  1040. Part.CFrame=Part.CFrame
  1041. Part.Transparency=i
  1042. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1043. end
  1044. Part.Parent=nil
  1045. end),prt,msh)
  1046. end
  1047.  
  1048. function MagicRing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type,parent)
  1049. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1050. if Type~=2 then
  1051. prt.Anchored=true
  1052. end
  1053. prt.CFrame=cframe
  1054. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
  1055. game:GetService("Debris"):AddItem(prt,5)
  1056. coroutine.resume(coroutine.create(function(Part,Mesh,dur)
  1057. local wld=nil
  1058. if dur==2 then
  1059. wld=weld(Part,Part,parent,euler(0,0,0)*cf(0,0,0))
  1060. end
  1061. for i=0,1,delay do
  1062. wait()
  1063. if dur==1 then
  1064. Part.CFrame=Part.CFrame
  1065. elseif dur==2 then
  1066. wld.C0=cframe
  1067. end
  1068. Part.Transparency=i
  1069. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1070. end
  1071. Part.Parent=nil
  1072. end),prt,msh,Type)
  1073. end
  1074.  
  1075. function MagicWaveThing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1076. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1077. prt.Anchored=true
  1078. prt.CFrame=cframe
  1079. msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1051557",vt(0,0,0),vt(x1,y1,z1))
  1080. game:GetService("Debris"):AddItem(prt,5)
  1081. coroutine.resume(coroutine.create(function(Part,Mesh)
  1082. for i=0,1,delay do
  1083. wait()
  1084. Part.CFrame=Part.CFrame*euler(0,0.7,0)
  1085. Part.Transparency=i
  1086. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1087. end
  1088. Part.Parent=nil
  1089. end),prt,msh)
  1090. end
  1091.  
  1092. function WaveEffect(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,mshtype)
  1093. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1094. prt.Anchored=true
  1095. prt.CFrame=cframe
  1096. local thetype=""
  1097. if mshtype==1 then
  1098. thetype="http://www.roblox.com/asset/?id=20329976"
  1099. elseif mshtype==2 then
  1100. thetype="http://www.roblox.com/asset/?id=1323306"
  1101. end
  1102. msh=mesh("SpecialMesh",prt,"FileMesh",thetype,vt(0,0,0),vt(x1,y1,z1))
  1103. game:GetService("Debris"):AddItem(prt,2)
  1104. coroutine.resume(coroutine.create(function(Part,Mesh)
  1105. for i=0,1,delay do
  1106. wait()
  1107. Part.CFrame=Part.CFrame*cf(0,y3/2,0)
  1108. Part.Transparency=i
  1109. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1110. end
  1111. Part.Parent=nil
  1112. end),prt,msh)
  1113. end
  1114.  
  1115. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock,Slash)
  1116. if hit.Parent==nil then
  1117. return
  1118. end
  1119. h=hit.Parent:FindFirstChild("Humanoid")
  1120. for _,v in pairs(hit.Parent:children()) do
  1121. if v:IsA("Humanoid") then
  1122. h=v
  1123. end
  1124. end
  1125. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  1126. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  1127. end
  1128. if hit.Parent.className=="Hat" then
  1129. hit=hit.Parent.Parent:findFirstChild("Head")
  1130. end
  1131. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  1132. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  1133. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  1134. return
  1135. end]]
  1136. -- hs(hit,1.2)
  1137. if Slash==1 then
  1138. so("http://www.roblox.com/asset/?id=10209590",hit,1,1)
  1139. MagicCircle(BrickColor.new("Bright red"),hit.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),.2,2,.2,.2,6,.2,0.1)
  1140. end
  1141. c=Instance.new("ObjectValue")
  1142. c.Name="creator"
  1143. c.Value=game:service("Players").LocalPlayer
  1144. c.Parent=h
  1145. game:GetService("Debris"):AddItem(c,.5)
  1146. Damage=math.random(minim,maxim)
  1147. -- h:TakeDamage(Damage)
  1148. blocked=false
  1149. block=hit.Parent:findFirstChild("Block")
  1150. if block~=nil then
  1151. print(block.className)
  1152. if block.className=="NumberValue" then
  1153. if block.Value>0 then
  1154. blocked=true
  1155. if decreaseblock==nil then
  1156. block.Value=block.Value-1
  1157. end
  1158. end
  1159. end
  1160. if block.className=="IntValue" then
  1161. if block.Value>0 then
  1162. blocked=true
  1163. if decreaseblock~=nil then
  1164. block.Value=block.Value-1
  1165. end
  1166. end
  1167. end
  1168. end
  1169. if blocked==false then
  1170. -- h:TakeDamage(Damage)
  1171. h.Health=h.Health-Damage
  1172. showDamage(hit.Parent,Damage,.5,BrickColor:Red())
  1173. else
  1174. h.Health=h.Health-(Damage/2)
  1175. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
  1176. end
  1177. if Type=="Knockdown" then
  1178. hum=hit.Parent.Humanoid
  1179. hum.PlatformStand=true
  1180. coroutine.resume(coroutine.create(function(HHumanoid)
  1181. swait(1)
  1182. HHumanoid.PlatformStand=false
  1183. end),hum)
  1184. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  1185. --hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  1186. local bodvol=Instance.new("BodyVelocity")
  1187. bodvol.velocity=angle*knockback
  1188. bodvol.P=5000
  1189. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1190. bodvol.Parent=hit
  1191. rl=Instance.new("BodyAngularVelocity")
  1192. rl.P=3000
  1193. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1194. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  1195. rl.Parent=hit
  1196. game:GetService("Debris"):AddItem(bodvol,.5)
  1197. game:GetService("Debris"):AddItem(rl,.5)
  1198. elseif Type=="Normal" then
  1199. vp=Instance.new("BodyVelocity")
  1200. vp.P=500
  1201. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  1202. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  1203. if KnockbackType==1 then
  1204. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  1205. elseif KnockbackType==2 then
  1206. vp.velocity=Property.CFrame.lookVector*knockback
  1207. end
  1208. if knockback>0 then
  1209. vp.Parent=hit.Parent.Torso
  1210. end
  1211. game:GetService("Debris"):AddItem(vp,.5)
  1212. elseif Type=="Up" then
  1213. local bodyVelocity=Instance.new("BodyVelocity")
  1214. bodyVelocity.velocity=vt(0,30,0)
  1215. bodyVelocity.P=5000
  1216. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1217. bodyVelocity.Parent=hit
  1218. game:GetService("Debris"):AddItem(bodyVelocity,1)
  1219. rl=Instance.new("BodyAngularVelocity")
  1220. rl.P=3000
  1221. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1222. rl.angularvelocity=Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5))
  1223. rl.Parent=hit
  1224. game:GetService("Debris"):AddItem(rl,.5)
  1225. elseif Type=="Snare" then
  1226. bp=Instance.new("BodyPosition")
  1227. bp.P=2000
  1228. bp.D=100
  1229. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1230. bp.position=hit.Parent.Torso.Position
  1231. bp.Parent=hit.Parent.Torso
  1232. game:GetService("Debris"):AddItem(bp,1)
  1233. elseif Type=="Charge" then
  1234. Charge=Charge+1
  1235. coroutine.resume(coroutine.create(function(Part)
  1236. swait(30)
  1237. for i=1,5 do
  1238. swait(5)
  1239. so("rbxasset://sounds\\unsheath.wav",hit,1,2)
  1240. MagicCircle(BrickColor.new("Bright red"),hit.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),.2,2,.1,.2,8,.1,0.05)
  1241. newdam=math.random(1,5)
  1242. if blocked==false then
  1243. h:TakeDamage(newdam)
  1244. showDamage(hit.Parent,newdam,.5,BrickColor:Red())
  1245. else
  1246. h:TakeDamage(newdam/2)
  1247. showDamage(hit.Parent,newdam,.5,BrickColor.new("Bright blue"))
  1248. end
  1249. end
  1250. end),hit)
  1251. end
  1252. debounce=Instance.new("BoolValue")
  1253. debounce.Name="DebounceHit"
  1254. debounce.Parent=hit.Parent
  1255. debounce.Value=true
  1256. game:GetService("Debris"):AddItem(debounce,Delay)
  1257. c=Instance.new("ObjectValue")
  1258. c.Name="creator"
  1259. c.Value=Player
  1260. c.Parent=h
  1261. game:GetService("Debris"):AddItem(c,.5)
  1262. CRIT=false
  1263. hitDeb=true
  1264. AttackPos=6
  1265. end
  1266. end
  1267.  
  1268. showDamage=function(Char,Dealt,du,Color)
  1269. m=Instance.new("Model")
  1270. m.Name=tostring(Dealt)
  1271. h=Instance.new("Humanoid")
  1272. h.Health=0
  1273. h.MaxHealth=0
  1274. h.Parent=m
  1275. c=Instance.new("Part")
  1276. c.Transparency=0
  1277. c.BrickColor=Color
  1278. c.Name="Head"
  1279. c.TopSurface=0
  1280. c.BottomSurface=0
  1281. c.formFactor="Plate"
  1282. c.Size=Vector3.new(1,.4,1)
  1283. ms=Instance.new("CylinderMesh")
  1284. ms.Scale=Vector3.new(.8,.8,.8)
  1285. if CRIT==true then
  1286. ms.Scale=Vector3.new(1,1.25,1)
  1287. end
  1288. ms.Parent=c
  1289. c.Reflectance=0
  1290. Instance.new("BodyGyro").Parent=c
  1291. c.Parent=m
  1292. if Char:findFirstChild("Head")~=nil then
  1293. c.CFrame=cf(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1294. elseif Char.Parent:findFirstChild("Head")~=nil then
  1295. c.CFrame=cf(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1296. end
  1297. f=Instance.new("BodyPosition")
  1298. f.P=2000
  1299. f.D=100
  1300. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1301. f.position=c.Position+Vector3.new(0,3,0)
  1302. f.Parent=c
  1303. game:GetService("Debris"):AddItem(m,.5+du)
  1304. c.CanCollide=false
  1305. m.Parent=workspace
  1306. c.CanCollide=false
  1307. end
  1308.  
  1309. combo=0
  1310. function ob1d(mouse)
  1311. if attack==true then return end
  1312. --[[if SwordStance==true then
  1313. SwordStance=false
  1314. Sheathed=false
  1315. IaidoStrike()
  1316. return end]]
  1317. if SwordStance==true then return end
  1318. if Sheathed==true then return end
  1319. hold=true
  1320. if combo==0 then
  1321. combo=1
  1322. attackone()
  1323. elseif combo==1 then
  1324. combo=2
  1325. attacktwo()
  1326. elseif combo==2 then
  1327. combo=3
  1328. attackthree()
  1329. elseif combo==3 then
  1330. combo=0
  1331. end
  1332. coroutine.resume(coroutine.create(function()
  1333. for i=1,50 do
  1334. if attack==false then
  1335. swait()
  1336. end
  1337. end
  1338. if attack==false then
  1339. combo=0
  1340. Torso.Neck.C0=necko*euler(0,0,-0.5)
  1341. RootJoint.C0=RootCF*euler(0,0,0.5)
  1342. handlewld.C1=euler(0,0,0)
  1343. wld11.C0=euler(1.57,3.14,0)*cf(0,1,0)
  1344. RW.C0=cf(1,0.5,-0.5)*euler(1.3,1.57,0)
  1345. RW.C1=cf(0,0.5,0)*euler(-0.3,0,0)
  1346. LW.C0=cf(-1.3,0.5,-0.3)*euler(0,-0.6,-0.2)
  1347. LW.C1=cf(0,0.5,0)*euler(0.1,0,0)
  1348. end
  1349. end))
  1350. end
  1351.  
  1352. function ob1u(mouse)
  1353. hold = false
  1354. end
  1355.  
  1356. buttonhold = false
  1357.  
  1358. eul=0
  1359. equipped=false
  1360. function key(key)
  1361. if attack==true then return end
  1362. if Sheathed==true then
  1363. if key=="z" then
  1364. IaidoDash()
  1365. end
  1366. if key=="x" then
  1367. Wilt()
  1368. end
  1369. if key=="c" then
  1370. Rose()
  1371. end
  1372. if key=="v" then
  1373. Sheathed=false
  1374. ElecStorm()
  1375. end
  1376. end
  1377. if key=="f" then
  1378. attack=true
  1379. if equipped==false then
  1380. equipped=true
  1381. RSH=ch.Torso["Right Shoulder"]
  1382. LSH=ch.Torso["Left Shoulder"]
  1383. --
  1384. RSH.Parent=nil
  1385. LSH.Parent=nil
  1386. --
  1387. RW.Name="Right Shoulder"
  1388. RW.Part0=ch.Torso
  1389. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  1390. RW.C1=cf(0, 0.5, 0)
  1391. RW.Part1=ch["Right Arm"]
  1392. RW.Parent=ch.Torso
  1393. --
  1394. LW.Name="Left Shoulder"
  1395. LW.Part0=ch.Torso
  1396. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  1397. LW.C1=cf(0, 0.5, 0)
  1398. LW.Part1=ch["Left Arm"]
  1399. LW.Parent=ch.Torso
  1400. --
  1401. equipanim()
  1402. else
  1403. if Sheathed==false then
  1404. Sheathed=true
  1405. Sheath()
  1406. end
  1407. equipped=false
  1408. hideanim()
  1409. swait(0)
  1410. RW.Parent=nil
  1411. LW.Parent=nil
  1412. RSH.Parent=player.Character.Torso
  1413. LSH.Parent=player.Character.Torso
  1414. end
  1415. attack=false
  1416. end
  1417. if equipped==false then return end
  1418. --[[if key=="g" then
  1419. if Sheathed==true then
  1420. Sheathed=false
  1421. IaidoStrike()
  1422. else
  1423. Sheathed=true
  1424. Sheath()
  1425. end
  1426. end]]
  1427. if key=="g" then
  1428. if Sheathed==false then
  1429. Sheathed=true
  1430. Sheath()
  1431. else
  1432. Sheathed=false
  1433. IaidoStrike()
  1434. end
  1435. end
  1436. end
  1437.  
  1438. function key2(key)
  1439.  
  1440. end
  1441.  
  1442. function s(mouse)
  1443. mouse.Button1Down:connect(function() ob1d(mouse) end)
  1444. mouse.Button1Up:connect(function() ob1u(mouse) end)
  1445. mouse.KeyDown:connect(key)
  1446. mouse.KeyUp:connect(key2)
  1447.  
  1448. player=Player
  1449. ch=Character
  1450. MMouse=mouse
  1451. end
  1452.  
  1453. function ds(mouse)
  1454. end
  1455.  
  1456. Bin.Selected:connect(s)
  1457. Bin.Deselected:connect(ds)
  1458. print("Cyber Samurai loaded.")
  1459.  
  1460. --[[
  1461. Copyrighted (C) Fenrier 2014
  1462. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement