Advertisement
astronaut32

binary sword

Feb 24th, 2016
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2. Fixer the Demon Mercenary character created by (NAME REDACTED), also known as ArkDeimos.
  3. Scripted by Fenrier.
  4. "You intrigue me, you seek power and strength, the most valuable resource of all... As do I..
  5. heed my indstructions swordsman, and I promise you we will find him again,
  6. and you can repay all debts in blood"
  7. "BLOOD FOR THE BLOOD GOD! SKULLS FOR THE SKULL THRONE! LET THE GALAXY BURN!"
  8. ]]
  9. Player=game:GetService("Players").LocalPlayer
  10. Character=Player.Character
  11. PlayerGui=Player.PlayerGui
  12. Backpack=Player.Backpack
  13. Torso=Character.Torso
  14. Head=Character.Head
  15. Humanoid=Character.Humanoid
  16. LeftArm=Character["Left Arm"]
  17. LeftLeg=Character["Left Leg"]
  18. RightArm=Character["Right Arm"]
  19. RightLeg=Character["Right Leg"]
  20. LS=Torso["Left Shoulder"]
  21. LH=Torso["Left Hip"]
  22. RS=Torso["Right Shoulder"]
  23. RH=Torso["Right Hip"]
  24. Neck=Torso.Neck
  25. it=Instance.new
  26. vt=Vector3.new
  27. cf=CFrame.new
  28. euler=CFrame.fromEulerAnglesXYZ
  29. angles=CFrame.Angles
  30. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  31. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  32. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  33. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  34. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  35. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  36. RootPart=Character.HumanoidRootPart
  37. RootJoint=RootPart.RootJoint
  38. RootCF=euler(-1.57,0,3.14)
  39. attack=false
  40. attackdebounce=false
  41. MMouse=nil
  42. combo=0
  43. local Anim="Idle"
  44. local Effects={}
  45. equipped=false
  46. local idle=0
  47. local hold=false
  48. local con1=nil
  49. local con2=nil
  50. local Mode="Binary"
  51. local idleanim=0
  52. local idleanim2=false
  53. local impulse=1
  54. local hitfloor,posfloor=nil,nil
  55. local damcount=0
  56. local guard=false
  57. --player
  58. player=nil
  59. --save shoulders
  60. RSH, LSH=nil, nil
  61. --welds
  62. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  63. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  64. LH=Torso["Left Hip"]
  65. RH=Torso["Right Hip"]
  66. Asset="http://www.roblox.com/asset/?id="
  67. Health=200
  68. Humanoid.MaxHealth=math.huge
  69. Humanoid.Health=math.huge
  70. coroutine.resume(coroutine.create(function()
  71. for i=1,20 do
  72. Humanoid.MaxHealth=math.huge
  73. Humanoid.Health=math.huge
  74. end
  75. Humanoid.MaxHealth=200
  76. Humanoid.Health=200
  77. Humanoid:TakeDamage(1)
  78. Humanoid.Health=Health
  79. end))
  80. Humanoid.Health=Health
  81.  
  82. function swait(num)
  83. if num==0 or num==nil then
  84. game:service'RunService'.RenderStepped:wait()
  85. else
  86. for i=0,num do
  87. game:service'RunService'.RenderStepped:wait()
  88. end
  89. end
  90. end
  91.  
  92. if Character:findFirstChild("Binary Sword",true) ~= nil then
  93. Character:findFirstChild("Binary Sword",true).Parent = nil
  94. end
  95. if Character:findFirstChild("Demon Blade",true) ~= nil then
  96. Character:findFirstChild("Demon Blade",true).Parent = nil
  97. end
  98. if Player.PlayerGui:findFirstChild("WeaponGUI",true) ~= nil then
  99. Player.PlayerGui:findFirstChild("WeaponGUI",true).Parent = nil
  100. end
  101.  
  102.  
  103. function NoOutline(Part)
  104. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  105. end
  106.  
  107. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  108. local fp=it("Part")
  109. fp.formFactor=formfactor
  110. fp.Parent=parent
  111. fp.Reflectance=reflectance
  112. fp.Transparency=transparency
  113. fp.CanCollide=false
  114. fp.Locked=true
  115. fp.BrickColor=brickcolor
  116. fp.Name=name
  117. fp.Size=size
  118. fp.Position=Torso.Position
  119. NoOutline(fp)
  120. fp.Material="SmoothPlastic"
  121. fp:BreakJoints()
  122. return fp
  123. end
  124.  
  125. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  126. local mesh=it(Mesh)
  127. mesh.Parent=part
  128. if Mesh=="SpecialMesh" then
  129. mesh.MeshType=meshtype
  130. mesh.MeshId=meshid
  131. end
  132. mesh.Offset=offset
  133. mesh.Scale=scale
  134. return mesh
  135. end
  136.  
  137. function weld(parent,part0,part1,c0)
  138. local weld=it("Weld")
  139. weld.Parent=parent
  140. weld.Part0=part0
  141. weld.Part1=part1
  142. weld.C0=c0
  143. return weld
  144. end
  145.  
  146. local fengui=it("GuiMain")
  147. fengui.Parent=Player.PlayerGui
  148. fengui.Name="WeaponGUI"
  149.  
  150. local Color1=BrickColor.new("Really black")
  151. local Color2=BrickColor.new("Institutional white")
  152. local Colorr3=BrickColor.new("Plum")
  153. local Color4=BrickColor.new("Institutional white")
  154.  
  155. local model1=Instance.new("Model")
  156. model1.Parent=Character
  157. model1.Name="Binary Sword"
  158. BSword={}
  159. BSwordWelds={}
  160. local model2=Instance.new("Model")
  161. model2.Parent=nil
  162. model2.Name="Demon Blade"
  163. DBlade={}
  164. DBladeWelds={}
  165.  
  166. prt1=part(3,model1,0,1,Color1,"Part1",vt())
  167. prt2=part(3,model1,0,0,Color2,"Part2",vt())
  168. prt3=part(3,model1,0,0,Color2,"Part3",vt())
  169. prt4=part(3,model1,0,0,Colorr3,"Part4",vt())
  170. prt5=part(3,model1,0,0,Colorr3,"Part5",vt())
  171. prt6=part(3,model1,0.7,0,Color4,"Part6",vt())
  172. prt7=part(3,model1,0.7,0,Color4,"Part7",vt())
  173. prt8=part(3,model1,0.7,0,Color4,"Part8",vt())
  174. prt9=part(3,model1,0.7,0,Color4,"Part9",vt())
  175. prt10=part(3,model1,0,0,Colorr3,"Part10",vt())
  176. prt11=part(3,model1,0,0,Colorr3,"Part11",vt())
  177. prt12=part(3,model1,0,0,Colorr3,"Part12",vt())
  178.  
  179. prtd1=part(3,model2,0,0.4,BrickColor.new("Plum"),"DPart1",vt())
  180. prtd2=part(3,model2,0,0,BrickColor.new("Really black"),"DPart2",vt())
  181. prtd3=part(3,model2,0,0,BrickColor.new("Really black"),"DPart3",vt())
  182. prtd4=part(3,model2,0,0,BrickColor.new("Really black"),"DPart4",vt())
  183. prtd5=part(3,model2,0,0,BrickColor.new("Really black"),"DPart5",vt())
  184. prtd6=part(3,model2,0,0,BrickColor.new("Really black"),"DPart6",vt())
  185. prtd7=part(3,model2,0.8,0,BrickColor.new("Plum"),"DPart7",vt())
  186. prtd8=part(3,model2,0.8,0,BrickColor.new("Plum"),"DPart8",vt())
  187. prtd9=part(3,model2,0.5,0.2,BrickColor.new("Institutional white"),"DPart9",vt())
  188. prtd10=part(3,model2,0.5,0.2,BrickColor.new("Institutional white"),"DPart10",vt())
  189. prtd11=part(3,model2,0.5,0,BrickColor.new("Plum"),"DPart11",vt())
  190. prtd12=part(3,model2,0,0,BrickColor.new("Really black"),"DPart12",vt())
  191. for _,c in pairs(model2:children()) do
  192. if c.className=="Part" then
  193. table.insert(DBlade,c)
  194. end
  195. end
  196. light=it("PointLight")
  197. light.Brightness=.8
  198. light.Color=Color3.new(255/255,50/255,0)
  199. --light.Color=BrickColor.new("Plum")
  200. light.Range=10
  201. light.Parent=prtd9
  202.  
  203. msh1=mesh("BlockMesh",prt1,"","",vt(0,0,0),vt(1,1,1))
  204. msh2=mesh("CylinderMesh",prt2,"","",vt(0,0,0),vt(2,10,2))
  205. msh3=mesh("SpecialMesh",prt3,"Head","",vt(0,0,0),vt(2.5,2,2.5))
  206. msh4=mesh("SpecialMesh",prt4,"Sphere","",vt(0,0,0),vt(3,3,3))
  207. msh5=mesh("SpecialMesh",prt5,"FileMesh","http://www.roblox.com/asset/?id=9756362",vt(0,0,0),vt(0.5,0.5,1))
  208. msh6=mesh("BlockMesh",prt6,"","",vt(0,0,0),vt(.5,20,1))
  209. msh7=mesh("BlockMesh",prt7,"","",vt(0,0,0),vt(.5,20,1))
  210. msh8=mesh("SpecialMesh",prt8,"Wedge","",vt(0,0,0),vt(.5,5,1))
  211. msh9=mesh("SpecialMesh",prt9,"Wedge","",vt(0,0,0),vt(.5,5,1))
  212. msh10=mesh("BlockMesh",prt10,"","",vt(0,0,0),vt(.6,20,0.2))
  213. msh11=mesh("SpecialMesh",prt11,"Wedge","",vt(0,0,0),vt(.6,5,0.1))
  214. msh12=mesh("SpecialMesh",prt12,"Wedge","",vt(0,0,0),vt(.6,5,0.1))
  215.  
  216. mshd1=mesh("BlockMesh",prtd1,"","",vt(0,0,0),vt(5.01,3,5.01))
  217. mshd2=mesh("BlockMesh",prtd2,"","",vt(0,0,0),vt(5.1,3,5.1))
  218. mshd3=mesh("SpecialMesh",prtd3,"Wedge","",vt(0,0,0),vt(5.05,4,3))
  219. mshd4=mesh("SpecialMesh",prtd4,"Wedge","",vt(0,0,0),vt(5.05,4,3))
  220. mshd5=mesh("SpecialMesh",prtd5,"Wedge","",vt(0,0,0),vt(5.5,6,6))
  221. mshd6=mesh("SpecialMesh",prtd6,"Wedge","",vt(0,0,0),vt(5.5,6,6))
  222. mshd7=mesh("BlockMesh",prtd7,"","",vt(0,0,0),vt(3,20,1))
  223. mshd8=mesh("SpecialMesh",prtd8,"Wedge","",vt(0,0,0),vt(1,3,5))
  224. mshd9=mesh("BlockMesh",prtd9,"","",vt(0,0,0),vt(4.5,20,.1))
  225. mshd10=mesh("SpecialMesh",prtd10,"Wedge","",vt(0,0,0),vt(.1,4.5,8))
  226. mshd11=mesh("CylinderMesh",prtd11,"","",vt(0,0,0),vt(4,5.8,4))
  227. mshd12=mesh("CylinderMesh",prtd12,"","",vt(0,0,0),vt(3,5.9,3))
  228.  
  229. wld1=weld(prt1,prt1,Torso,euler(3.7,1.57,0)*cf(-1.5,-2.3,-.5))
  230. wld2=weld(prt2,prt2,prt1,euler(0,0,0)*cf(0,0,0))
  231. wld3=weld(prt3,prt3,prt2,euler(0,0,0)*cf(0,1,0))
  232. wld4=weld(prt4,prt4,prt2,euler(0,0,0)*cf(0,-1,0))
  233. wld5=weld(prt5,prt5,prt4,euler(0,0,0)*cf(0,-0.2,0))
  234. wld6=weld(prt6,prt6,prt5,euler(0,0,0)*cf(0,-2,0.1))
  235. wld7=weld(prt7,prt7,prt5,euler(0,0,0)*cf(0,-2,-0.1))
  236. wld8=weld(prt8,prt8,prt6,euler(0,0,0)*cf(0,-2.5,0))
  237. wld9=weld(prt9,prt9,prt7,euler(0,3.14,0)*cf(0,-2.5,0))
  238. wld10=weld(prt10,prt10,prt5,euler(0,0,0)*cf(0,-2,0))
  239. wld11=weld(prt11,prt11,prt10,euler(0,0,0)*cf(0,-2.5,0.01))
  240. wld12=weld(prt12,prt12,prt10,euler(0,3.14,0)*cf(0,-2.5,-0.01))
  241.  
  242. wldd1=weld(prtd1,prtd1,RightArm,euler(0,0,0)*cf(0,.21,0))
  243. wldd2=weld(prtd1,prtd2,prtd1,euler(0,0,0)*cf(0,.5,0))
  244. wldd3=weld(prtd1,prtd3,prtd2,euler(0,1.57,0)*cf(.21,-.6,0))
  245. wldd4=weld(prtd1,prtd4,prtd2,euler(0,-1.57,0)*cf(-.21,-.6,0))
  246. wldd5=weld(prtd1,prtd5,prtd2,euler(0,-1.57,0)*cf(.1,-.1,0))
  247. wldd6=weld(prtd1,prtd6,prtd5,euler(0,0,3.14)*cf(0,1.2,0))
  248. wldd7=weld(prtd1,prtd7,prtd2,euler(0,0,0)*cf(0,2.5,0))
  249. wldd8=weld(prtd1,prtd8,prtd7,euler(1.57,1.57,0)*cf(0,2.5,0))
  250. wldd9=weld(prtd1,prtd9,prtd7,euler(0,0,0)*cf(0,0,0))
  251. wldd10=weld(prtd1,prtd10,prtd8,euler(0,0,0)*cf(0,0,0.3))
  252. wldd11=weld(prtd1,prtd11,prtd1,euler(1.57,0,0)*cf(0,1,0))
  253. wldd12=weld(prtd1,prtd12,prtd11,euler(0,0,0)*cf(0,0,0))
  254. for _,c in pairs(prtd1:children()) do
  255. if c.className=="Weld" then
  256. table.insert(DBladeWelds,c)
  257. print(c)
  258. end
  259. end
  260.  
  261. for i=-.9,.9,0.2 do
  262. prt13=part(3,model1,0,0,Color1,"Part13",vt())
  263. msh13=mesh("CylinderMesh",prt13,"","",vt(0,0,0),vt(2.2,1,2.2))
  264. wld13=weld(prt13,prt13,prt1,euler(math.random(-10,10)/100,math.random(-10,10)/100,math.random(-10,10)/100)*cf(0,i,0))
  265. end
  266.  
  267. function Make1(Ceef)
  268. prtnr=part(3,model1,0,1,Color1,"1a",vt())
  269. mshnr=mesh("BlockMesh",prtnr,"","",vt(0,0,0),vt(.7,.7,.7))
  270. wldnr=weld(prtnr,prtnr,prt10,euler(0,0,0)*cf(0,Ceef,0))
  271. prtn1=part(3,model1,0,0,Colorr3,"1a",vt())
  272. mshn1=mesh("BlockMesh",prtn1,"","",vt(0,0,0),vt(.7,.2,1.5))
  273. wldn1=weld(prtn1,prtn1,prtnr,euler(0,0,0)*cf(0,0,0))
  274. prtn2=part(3,model1,0,0,Colorr3,"1b",vt())
  275. mshn2=mesh("BlockMesh",prtn2,"","",vt(0,0,0),vt(.7,.2,.5))
  276. wldn2=weld(prtn2,prtn2,prtn1,euler(0.5,0,0)*cf(0,0.03,-0.1))
  277. prtn3=part(3,model1,0,0,Colorr3,"1c",vt())
  278. mshn3=mesh("BlockMesh",prtn3,"","",vt(0,0,0),vt(.7,.2,.5))
  279. wldn3=weld(prtn3,prtn3,prtn1,euler(1.57,0,0)*cf(0,0,0.15))
  280. end
  281. function Make0(Ceef)
  282. prtnr=part(3,model1,0,1,Color1,"1a",vt())
  283. mshnr=mesh("BlockMesh",prtnr,"","",vt(0,0,0),vt(.7,.7,.7))
  284. wldnr=weld(prtnr,prtnr,prt10,euler(0,0,0)*cf(0,Ceef,0))
  285. prtn1=part(3,model1,0,0,Colorr3,"0a",vt())
  286. mshn1=mesh("BlockMesh",prtn1,"","",vt(0,0,0),vt(.7,.2,1.5))
  287. wldn1=weld(prtn1,prtn1,prtnr,euler(0,0,0)*cf(0,-0.05,0))
  288. prtn2=part(3,model1,0,0,Colorr3,"0b",vt())
  289. mshn2=mesh("BlockMesh",prtn2,"","",vt(0,0,0),vt(.7,.2,.5))
  290. wldn2=weld(prtn2,prtn2,prtn1,euler(1.57,0,0)*cf(0,0.05,0.15))
  291. prtn3=part(3,model1,0,0,Colorr3,"0c",vt())
  292. mshn3=mesh("BlockMesh",prtn3,"","",vt(0,0,0),vt(.7,.2,.5))
  293. wldn3=weld(prtn3,prtn3,prtn1,euler(1.57,0,0)*cf(0,0.05,-0.15))
  294. prtn4=part(3,model1,0,0,Colorr3,"0d",vt())
  295. mshn4=mesh("BlockMesh",prtn4,"","",vt(0,0,0),vt(.7,.2,1.5))
  296. wldn4=weld(prtn4,prtn4,prtn1,euler(0,0,0)*cf(0,0.1,0))
  297. end
  298. Make1(1.6)
  299. Make0(1.4)
  300. Make0(1.2)
  301. Make1(1)
  302. Make1(.8)
  303. Make1(.6)
  304. Make1(.4)
  305. Make0(.2)
  306. Make0(0)
  307.  
  308. local hitbox1=part(3,nil,0,1,BrickColor.new("Black"),"Hitbox",vt(1,1,1))
  309. local hitbox2=part(3,nil,0,1,BrickColor.new("Black"),"Hitbox",vt(1,1,1))
  310.  
  311. if (script.Parent.className~="HopperBin") then
  312. Tool=Instance.new("HopperBin")
  313. Tool.Parent=Backpack
  314. Tool.Name="Fixer"
  315. script.Parent=Tool
  316. end
  317. Bin=script.Parent
  318. --Bin=Tool
  319.  
  320. local bodvel=Instance.new("BodyVelocity")
  321. bodvel.Name="FixerVel"
  322. local bg=Instance.new("BodyGyro")
  323. bg.Name="FixerGyro"
  324.  
  325. so = function(id,par,vol,pit)
  326. coroutine.resume(coroutine.create(function()
  327. local sou = Instance.new("Sound",par or workspace)
  328. sou.Parent=par
  329. sou.Volume=vol
  330. sou.Pitch=pit or 1
  331. sou.SoundId=id
  332. swait()
  333. sou:Play()
  334. game:GetService("Debris"):AddItem(sou,6)
  335. end))
  336. end
  337.  
  338. function clerp(a,b,t)
  339. local qa = {QuaternionFromCFrame(a)}
  340. local qb = {QuaternionFromCFrame(b)}
  341. local ax, ay, az = a.x, a.y, a.z
  342. local bx, by, bz = b.x, b.y, b.z
  343. local _t = 1-t
  344. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  345. end
  346.  
  347. function QuaternionFromCFrame(cf)
  348. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  349. local trace = m00 + m11 + m22
  350. if trace > 0 then
  351. local s = math.sqrt(1 + trace)
  352. local recip = 0.5/s
  353. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  354. else
  355. local i = 0
  356. if m11 > m00 then
  357. i = 1
  358. end
  359. if m22 > (i == 0 and m00 or m11) then
  360. i = 2
  361. end
  362. if i == 0 then
  363. local s = math.sqrt(m00-m11-m22+1)
  364. local recip = 0.5/s
  365. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  366. elseif i == 1 then
  367. local s = math.sqrt(m11-m22-m00+1)
  368. local recip = 0.5/s
  369. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  370. elseif i == 2 then
  371. local s = math.sqrt(m22-m00-m11+1)
  372. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  373. end
  374. end
  375. end
  376.  
  377. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  378. local xs, ys, zs = x + x, y + y, z + z
  379. local wx, wy, wz = w*xs, w*ys, w*zs
  380. local xx = x*xs
  381. local xy = x*ys
  382. local xz = x*zs
  383. local yy = y*ys
  384. local yz = y*zs
  385. local zz = z*zs
  386. 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))
  387. end
  388.  
  389. function QuaternionSlerp(a, b, t)
  390. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  391. local startInterp, finishInterp;
  392. if cosTheta >= 0.0001 then
  393. if (1 - cosTheta) > 0.0001 then
  394. local theta = math.acos(cosTheta)
  395. local invSinTheta = 1/math.sin(theta)
  396. startInterp = math.sin((1-t)*theta)*invSinTheta
  397. finishInterp = math.sin(t*theta)*invSinTheta  
  398. else
  399. startInterp = 1-t
  400. finishInterp = t
  401. end
  402. else
  403. if (1+cosTheta) > 0.0001 then
  404. local theta = math.acos(-cosTheta)
  405. local invSinTheta = 1/math.sin(theta)
  406. startInterp = math.sin((t-1)*theta)*invSinTheta
  407. finishInterp = math.sin(t*theta)*invSinTheta
  408. else
  409. startInterp = t-1
  410. finishInterp = t
  411. end
  412. end
  413. 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
  414. end
  415.  
  416. function hideanim()
  417. equipped=false
  418. attack=true
  419. if Mode=="Binary" then
  420. so("rbxasset://sounds\\unsheath.wav",prt1,1,.8)
  421. for i=0,1,0.1 do
  422. swait()
  423. wld1.C0=clerp(wld1.C0,euler(.2,0,-.5)*cf(0,1,0),.3)
  424. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.4,0,-0.5),.3)
  425. RW.C0=clerp(RW.C0,cf(1.3,0.5,0.2)*euler(3.4,0,0),.3)
  426. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,0),.3)
  427. end
  428. wld1.Part1=Torso
  429. wld1.C0=euler(3.7,1.57,0)*cf(-1.5,-2.3,-.5)
  430. for i=0,1,0.2 do
  431. swait()
  432. RW.C0=clerp(RW.C0,cf(1.3,0.5,0.2)*euler(0.5,0,0),.3)
  433. end
  434. for i=0,1,0.1 do
  435. swait()
  436. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.4)
  437. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.4)
  438. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0),.4)
  439. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,0),.4)
  440. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0),.3)
  441. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0),.3)
  442. end
  443. --wld1=weld(prt1,prt1,RightArm,euler(1.57,0,0)*cf(0,1,-0.3))
  444. else
  445. for i=0,1,0.1 do
  446. swait()
  447. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.5)*euler(0.4,0,-0.4),.3)
  448. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,-0.8),.3)
  449. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.4,-0.5,1)*euler(.5,0,0),.3)
  450. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.2,0,-0.2),.3)
  451. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(-0.2,1.57,0),.3)
  452. LH.C0=clerp(LH.C0,cf(-1,-.5,0)*euler(0.5,-1.2,0)*euler(-.2,0,0),.3)
  453. end
  454. so("http://roblox.com/asset/?id=161006163",RightArm,1,.4)
  455. so("http://roblox.com/asset/?id=160867463",RightArm,1,1.2)
  456. for i=0,1,0.015 do
  457. swait()
  458. for i=1,3 do
  459. if math.random(1,5)==1 then
  460. MagicBlock(BrickColor.new("Really black"),RightArm.CFrame*cf(math.random(-100,100)/100,0-math.random(0,700)/100,math.random(-100,100)/100),math.random(30,80)/100,math.random(30,80)/100,math.random(30,80)/100,.5,.5,.5,0.05)
  461. else
  462. MagicBlock(BrickColor.new("Bright red"),RightArm.CFrame*cf(math.random(-100,100)/100,-math.random(0,700)/100,math.random(-100,100)/100),math.random(30,80)/100,math.random(30,80)/100,math.random(30,80)/100,.5,.5,.5,0.05)
  463. end
  464. end
  465. end
  466. model2.Parent=nil
  467. for i=0,1,0.1 do
  468. swait()
  469. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.4)
  470. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.4)
  471. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0),.4)
  472. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,0),.4)
  473. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0),.3)
  474. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0),.3)
  475. end
  476. end
  477. Torso.Neck.C0=necko
  478. Torso.Neck.C1=necko2
  479. RootJoint.C0=RootCF
  480. RW.C0=cf(1.5,0.5,0)*euler(0,0,0)
  481. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  482. LW.C0=cf(-1.5,0.5,0)*euler(0,0,0)
  483. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  484. RH.C0=RHC0
  485. RH.C1=RHC1
  486. LH.C0=LHC0
  487. LH.C1=LHC1
  488. Mode="Binary"
  489. attack=false
  490. end
  491.  
  492. function equipanim()
  493. equipped=true
  494. attack=true
  495. for i=0,1,0.2 do
  496. swait()
  497. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.4,0,-0.5),.3)
  498. RW.C0=clerp(RW.C0,cf(1.3,0.5,0.2)*euler(3,0,0),.4)
  499. end
  500. for i=0,1,0.1 do
  501. swait()
  502. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.5,0,-0.6),.3)
  503. RW.C0=clerp(RW.C0,cf(1.3,0.5,0.2)*euler(3.4,0,0),.3)
  504. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-0.5),.3)
  505. end
  506. so("rbxasset://sounds\\unsheath.wav",prt1,1,.6)
  507. wld1.Part1=RightArm
  508. wld1.C0=euler(.2,0,-.5)*cf(0,1,0)
  509. for i=0,1,0.1 do
  510. swait()
  511. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  512. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.2,0,-0.5),.3)
  513. RW.C0=clerp(RW.C0,cf(1.3,0.5,0.2)*euler(.5,-0.5,0),.3)
  514. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-0.5),.3)
  515. end
  516. for i=0,1,0.1 do
  517. swait()
  518. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,-0.3),.3)
  519. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0.5),.3)
  520. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-0.5),.3)
  521. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1,-0.5,-0.7),.3)
  522. LW.C0=clerp(LW.C0,cf(-1,0.5,-0.5)*euler(1,-0.5,0.5),.3)
  523. end
  524. --wld1=weld(prt1,prt1,RightArm,euler(1.57,0,0)*cf(0,1,-0.3))
  525. wld1.C0=euler(1.57,0,0)*cf(0,1,-0.3)
  526. Torso.Neck.C0=necko*euler(0,0,0.5)
  527. RootJoint.C0=RootCF*euler(0,0,-0.5)
  528. RW.C0=cf(1,0.5,-0.5)*euler(1,-0.5,-0.7)
  529. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  530. LW.C0=cf(-1,0.5,-0.5)*euler(1,-0.5,0.5)
  531. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  532. attack=false
  533. end
  534.  
  535. function Stomp()
  536. Humanoid.WalkSpeed=0
  537. Torso.Velocity=RootPart.CFrame.lookVector*0
  538. so("http://roblox.com/asset/?id=157878578",Torso,1,0.8)
  539. so("http://roblox.com/asset/?id=2760979",Torso,1,0.4)
  540. --so("http://roblox.com/asset/?id=2101148",Torso,1,0.6)
  541. MagicWave(BrickColor.new("Institutional white"),cf(Torso.Position)*cf(0,-1,0),1,1,1,1.5,1,1.5,0.05)
  542. Dam=math.random(5,10)
  543. Humanoid.Health=Humanoid.Health-Dam
  544. showDamage(Torso,Dam,.5,BrickColor:Red())
  545. MagniDamage(Torso,15,10,20,math.random(10,20),"Knockdown")
  546. --[[for i=0,1,0.2 do
  547. swait()
  548. if Mode=="Binary" then
  549. wld1.C0=clerp(wld1.C0,euler(0.4,0,-0.5)*cf(0,1,0),.3)
  550. end
  551. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3,0,0.5),.3)
  552. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.2),.3)
  553. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.4,0,0),.3)
  554. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1)*euler(0,0,0),.3)
  555. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(-1.2,1.57,0),.3)
  556. LH.C0=clerp(LH.C0,cf(-1.1,-.5,-0.5)*euler(-0.2,-1.3,0),.3)
  557. end
  558. for i=0,1,0.1 do
  559. swait()
  560. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.6,0,0),.3)
  561. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.2)*euler(0,0,0),.3)
  562. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(-1.4,1.57,0),.3)
  563. LH.C0=clerp(LH.C0,cf(-1.2,-.2,-0.5)*euler(-0.3,-1.3,0),.3)
  564. end]]
  565. swait(10)
  566. Humanoid.WalkSpeed=16
  567. end
  568.  
  569. function attackone()
  570. attack=true
  571. for i=0,1,0.1 do
  572. swait()
  573. wld1.C0=clerp(wld1.C0,euler(1.2,0,0)*cf(0,1,-0.3),.3)
  574. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.1,0,1),.3)
  575. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-1),.3)
  576. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(2,-0.5,-0.2),.3)
  577. LW.C0=clerp(LW.C0,cf(-.5,0.5,-0.5)*euler(2.5,-0.5,0.8),.3)
  578. RH.C0=clerp(RH.C0,RHC0*euler(-.2,0,0),.3)
  579. LH.C0=clerp(LH.C0,LHC0*euler(-.2,0,0),.3)
  580. end
  581. hitbox1.Parent=model1
  582. hitbox1.Size=vt(1,5,1)
  583. hitbox1.Transparency=1
  584. hitbox1.CFrame=prt10.CFrame
  585. --con1=hitbox1.Touched:connect(function(hit) Damagefunc(hit,10,20,math.random(1,5),"Normal",RootPart,.5,1) end)
  586. con1=hitbox1.Touched:connect(function(hit) Damagefunc(hit,10,20,math.random(1,5),"Normal",RootPart,.5,1) end)
  587. so("http://roblox.com/asset/?id=161006212",prt10,1,.7)
  588. blcf=nil
  589. scfr=nil
  590. for i=0,1,0.25 do
  591. swait()
  592. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  593. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  594. local h = 5
  595. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  596. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  597. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  598. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  599. scfr = blcf
  600. elseif not scfr then
  601. scfr = blcf
  602. end
  603. hitbox1.CFrame=prt10.CFrame
  604. wld1.C0=clerp(wld1.C0,euler(1.8,0,0)*cf(0,1,-0.3),.3)
  605. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.1,0,-.3),.3)
  606. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.3),.3)
  607. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(.5,-.3,-.3),.3)
  608. LW.C0=clerp(LW.C0,cf(-0.8,0.2,-0.5)*euler(.5,-0.5,1),.3)
  609. end
  610. for i=0,1,0.1 do
  611. swait()
  612. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  613. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  614. local h = 5
  615. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  616. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  617. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  618. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  619. scfr = blcf
  620. elseif not scfr then
  621. scfr = blcf
  622. end
  623. hitbox1.CFrame=prt10.CFrame
  624. wld1.C0=clerp(wld1.C0,euler(2,0,0)*cf(0,1,-0.3),.3)
  625. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.1,0,-.9),.3)
  626. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.9),.3)
  627. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(.5,-.8,-.3),.3)
  628. LW.C0=clerp(LW.C0,cf(-1,0.5,-0.5)*euler(1.1,-0.5,.7),.3)
  629. end
  630. con1:disconnect()
  631. hitbox1.Parent=nil
  632. attack=false
  633. end
  634.  
  635. function attacktwo()
  636. attack=true
  637. for i=0,1,0.1 do
  638. swait()
  639. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,-0.3),.3)
  640. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.1,0,-1.2),.3)
  641. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,1.2),.3)
  642. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(.5,1.8,1.5),.3)
  643. LW.C0=clerp(LW.C0,cf(-1,0.5,-0.5)*euler(1.5,-0.5,.8),.3)
  644. RH.C0=clerp(RH.C0,RHC0*euler(-.2,0,0),.3)
  645. LH.C0=clerp(LH.C0,LHC0*euler(-.2,0,0),.3)
  646. end
  647. hitbox1.Parent=model1
  648. hitbox1.Size=vt(1,5,1)
  649. hitbox1.Transparency=1
  650. hitbox1.CFrame=prt10.CFrame
  651. con1=hitbox1.Touched:connect(function(hit) Damagefunc(hit,10,20,math.random(1,5),"Normal",RootPart,.5,1) end)
  652. so("http://roblox.com/asset/?id=161006212",prt10,1,.8)
  653. blcf=nil
  654. scfr=nil
  655. for i=0,1,0.1 do
  656. swait()
  657. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  658. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  659. local h = 5
  660. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  661. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  662. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  663. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  664. scfr = blcf
  665. elseif not scfr then
  666. scfr = blcf
  667. end
  668. hitbox1.CFrame=prt10.CFrame
  669. wld1.C0=clerp(wld1.C0,euler(2.2,0,0)*cf(0,.8,-0.3),.3)
  670. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.1,0,1),.3)
  671. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-1),.3)
  672. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.2,1.2,0)*euler(-1.5,0,0),.3)
  673. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.2,-.2,-1.4),.3)
  674. end
  675. con1:disconnect()
  676. hitbox1.Parent=nil
  677. attack=false
  678. end
  679.  
  680. function attackthree()
  681. attack=true
  682. for i=0,1,0.1 do
  683. swait()
  684. wld1.C0=clerp(wld1.C0,euler(1.57,0,-.785)*cf(0,.8,0),.3)
  685. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.2,0,0),.3)
  686. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  687. RW.C0=clerp(RW.C0,cf(1,1,0)*euler(2.8,0,-.785),.3)
  688. LW.C0=clerp(LW.C0,cf(-1,1,0)*euler(2.8,0,.785),.3)
  689. RH.C0=clerp(RH.C0,RHC0*euler(-.2,0,0),.3)
  690. LH.C0=clerp(LH.C0,LHC0*euler(-.2,0,0),.3)
  691. end
  692. hitbox1.Parent=model1
  693. hitbox1.Size=vt(1,5,1)
  694. hitbox1.Transparency=1
  695. hitbox1.CFrame=prt10.CFrame
  696. con1=hitbox1.Touched:connect(function(hit) Damagefunc(hit,10,20,math.random(1,5),"Normal",RootPart,.5,1) end)
  697. so("http://roblox.com/asset/?id=161006212",prt10,1,.9)
  698. blcf=nil
  699. scfr=nil
  700. for i=0,1,0.25 do
  701. swait()
  702. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  703. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  704. local h = 5
  705. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  706. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  707. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  708. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  709. scfr = blcf
  710. elseif not scfr then
  711. scfr = blcf
  712. end
  713. hitbox1.CFrame=prt10.CFrame
  714. wld1.C0=clerp(wld1.C0,euler(1.7,0,0)*cf(0,1,0),.4)
  715. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.2,0,-.6),.4)
  716. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.6),.4)
  717. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.5,0,.2),.4)
  718. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-.2),.4)
  719. end
  720. for i=0,1,0.2 do
  721. swait()
  722. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  723. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  724. local h = 5
  725. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  726. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  727. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  728. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  729. scfr = blcf
  730. elseif not scfr then
  731. scfr = blcf
  732. end
  733. hitbox1.CFrame=prt10.CFrame
  734. wld1.C0=clerp(wld1.C0,euler(2,0,0)*cf(0,.7,-.3),.4)
  735. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.4,0,-.8),.4)
  736. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.8),.4)
  737. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.2,-.4,.4),.4)
  738. end
  739. con1:disconnect()
  740. hitbox1.Parent=nil
  741. attack=false
  742. end
  743.  
  744. function SpinSlash()
  745. attack=true
  746. for i=0,1,0.1 do
  747. swait()
  748. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,-0.3),.4)
  749. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.3,0,0.8),.4)
  750. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.5)*euler(0.2,0,-0.8),.4)
  751. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(2.2,-1.2,0)*euler(0,0,1),.4)
  752. LW.C0=clerp(LW.C0,cf(.1,0.5,-0.8)*euler(1.8,-0.5,1),.4)
  753. --RH.C0=clerp(RH.C0,RHC0*cf(0,0,0)*euler(0.2,0.2,.5),.3)
  754. --LH.C0=clerp(LH.C0,LHC0*cf(.5,0.2,0)*euler(0,.5,0.2),.3)
  755. end
  756. hitbox1.Parent=model1
  757. hitbox1.Size=vt(1,5,1)
  758. hitbox1.Transparency=1
  759. hitbox1.CFrame=prt10.CFrame
  760. con1=hitbox1.Touched:connect(function(hit) Damagefunc(hit,10,15,math.random(1,5),"Normal",RootPart,.2,1) end)
  761. blcf=nil
  762. scfr=nil
  763. so("http://roblox.com/asset/?id=161006212",prt10,1,.6)
  764. repeat
  765. hitbox1.Parent=model1
  766. hitbox1.Size=vt(1,5,1)
  767. hitbox1.Transparency=1
  768. hitbox1.CFrame=prt10.CFrame
  769. for i=0,1,0.15 do
  770. swait()
  771. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  772. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  773. local h = 5
  774. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  775. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  776. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  777. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  778. scfr = blcf
  779. elseif not scfr then
  780. scfr = blcf
  781. end
  782. hitbox1.CFrame=prt10.CFrame
  783. wld1.C0=clerp(wld1.C0,euler(1.2,0,0)*cf(0,1,-0.3),.3)
  784. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.3,0,0),.3)
  785. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.5)*euler(0,0,2.3),.25)
  786. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1.57,-1.57,0)*euler(-0.5,0,0),.3)
  787. LW.C0=clerp(LW.C0,cf(-1,0.5,-0.5)*euler(1.57,-1.57,0)*euler(0.5,0,0),.3)
  788. RH.C0=clerp(RH.C0,RHC0,.3)
  789. LH.C0=clerp(LH.C0,LHC0,.3)
  790. end
  791. for i=0,1,0.05 do
  792. swait()
  793. if i>=0.45 and i<=0.5 then
  794. so("http://roblox.com/asset/?id=161006212",prt10,1,.7)
  795. end
  796. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  797. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  798. local h = 5
  799. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  800. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  801. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  802. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  803. scfr = blcf
  804. elseif not scfr then
  805. scfr = blcf
  806. end
  807. hitbox1.CFrame=prt10.CFrame
  808. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.5)*euler(0,0,2.3+6*i),1)
  809. end
  810. until hold==false
  811. con1:disconnect()
  812. hitbox1.Parent=nil
  813. attack=false
  814. end
  815.  
  816. function BinarySwing()
  817. attack=true
  818. for i=0,1,0.1 do
  819. swait()
  820. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,-0.3),.3)
  821. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0.8),.3)
  822. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1)*euler(0,0,-0.8),.3)
  823. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(.5,-2,0)*euler(.5,0,0),.3)
  824. LW.C0=clerp(LW.C0,cf(-.2,-.1,-0.5)*euler(1,-1.8,0)*euler(.9,0,0),.3)
  825. RH.C0=clerp(RH.C0,RHC0*cf(.2,1,.1)*euler(0,-.5,-.2),.3)
  826. LH.C0=clerp(LH.C0,LHC0*cf(-.2,1,.1)*euler(0,.5,.2),.3)
  827. end
  828. Humanoid.Jump=true
  829. bodvol=Instance.new("BodyVelocity")
  830. bodvol.Parent=RootPart
  831. bodvol.velocity=vt(0,1,0)*100
  832. bodvol.P=5000
  833. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  834. --Torso.Velocity=vt(0,1,0)*100
  835. hitbox1.Parent=model1
  836. hitbox1.Size=vt(1,5,1)
  837. hitbox1.Transparency=1
  838. hitbox1.CFrame=prt10.CFrame
  839. con1=hitbox1.Touched:connect(function(hit) Damagefunc(hit,20,30,math.random(10,20),"Normal",RootPart,.2,1) end)
  840. so("http://roblox.com/asset/?id=161006212",prt10,1,.8)
  841. blcf=nil
  842. scfr=nil
  843. for i=0,1,0.1 do
  844. swait()
  845. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  846. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  847. local h = 5
  848. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  849. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  850. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  851. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  852. scfr = blcf
  853. elseif not scfr then
  854. scfr = blcf
  855. end
  856. hitbox1.CFrame=prt10.CFrame
  857. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(3,-2.4,0)*euler(.1,0,0),.3)
  858. LW.C0=clerp(LW.C0,cf(-.2,.8,-0.5)*euler(3.1,-1.8,0)*euler(.9,0,0),.3)
  859. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,-0.8),.3)
  860. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*euler(0,0,1.3),.3)
  861. RH.C0=clerp(RH.C0,RHC0,.3)
  862. LH.C0=clerp(LH.C0,LHC0,.3)
  863. end
  864. con1:disconnect()
  865. hitbox1.Parent=nil
  866. bodvol.Parent=nil
  867. attack=false
  868. end
  869.  
  870. function BinaryImpulse()
  871. attack=true
  872. if impulse==1 then
  873. impulse=2
  874. Humanoid.Jump=true
  875. for i=0,1,0.2 do
  876. swait()
  877. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,-0.3),.45)
  878. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.45)
  879. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0.5,0),.45)
  880. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1.5,-1.5,0)*euler(.5,0,0),.45)
  881. LW.C0=clerp(LW.C0,cf(0,0.5,-0.7)*euler(1.5,-1.5,0)*euler(.7,0,0),.45)
  882. RH.C0=clerp(RH.C0,RHC0*euler(-.2,0,0),.45)
  883. LH.C0=clerp(LH.C0,LHC0*euler(-.2,0,0),.45)
  884. end
  885. blcf=nil
  886. scfr=nil
  887. hitbox1.Parent=model1
  888. hitbox1.Size=vt(1,5,1)
  889. hitbox1.Transparency=1
  890. hitbox1.CFrame=prt10.CFrame
  891. con1=hitbox1.Touched:connect(function(hit) Damagefunc(hit,20,30,math.random(10,20),"Normal",RootPart,.5,1) end)
  892. for i=1,3 do
  893. so("http://roblox.com/asset/?id=161006212",prt10,1,1)
  894. for i=0,1,0.1 do
  895. swait()
  896. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  897. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  898. local h = 5
  899. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  900. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  901. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  902. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  903. scfr = blcf
  904. elseif not scfr then
  905. scfr = blcf
  906. end
  907. hitbox1.CFrame=prt10.CFrame
  908. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1.5,-1.5,0)*euler(-.5,0,0),.3)
  909. LW.C0=clerp(LW.C0,cf(-1,0.5,-0.5)*euler(1.5,-1.5,0)*euler(.5,0,0),.3)
  910. RootJoint.C0=RootCF*euler(0,0.5,6.6*i)
  911. end
  912. end
  913. con1:disconnect()
  914. hitbox1.Parent=nil
  915. elseif impulse==2 then
  916. impulse=3
  917. Humanoid.Jump=true
  918. for i=0,1,0.2 do
  919. swait()
  920. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,-0.3),.45)
  921. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.45)
  922. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,-0.5,0),.45)
  923. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1.5,-1.5,0)*euler(.5,0,0),.45)
  924. LW.C0=clerp(LW.C0,cf(0,0.5,-0.7)*euler(1.5,-1.5,0)*euler(.7,0,0),.45)
  925. RH.C0=clerp(RH.C0,RHC0*euler(-.2,0,0),.45)
  926. LH.C0=clerp(LH.C0,LHC0*euler(-.2,0,0),.45)
  927. end
  928. blcf=nil
  929. scfr=nil
  930. hitbox1.Parent=model1
  931. hitbox1.Size=vt(1,5,1)
  932. hitbox1.Transparency=1
  933. hitbox1.CFrame=prt10.CFrame
  934. con1=hitbox1.Touched:connect(function(hit) Damagefunc(hit,20,30,math.random(10,20),"Normal",RootPart,.5,1) end)
  935. for i=1,3 do
  936. so("http://roblox.com/asset/?id=161006212",prt10,1,1.05)
  937. for i=0,1,0.1 do
  938. swait()
  939. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  940. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  941. local h = 5
  942. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  943. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  944. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  945. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  946. scfr = blcf
  947. elseif not scfr then
  948. scfr = blcf
  949. end
  950. hitbox1.CFrame=prt10.CFrame
  951. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1.5,-1.5,0)*euler(-.5,0,0),.3)
  952. LW.C0=clerp(LW.C0,cf(-1,0.5,-0.5)*euler(1.5,-1.5,0)*euler(.5,0,0),.3)
  953. RootJoint.C0=RootCF*euler(0,-0.5,6.6*i)
  954. end
  955. end
  956. con1:disconnect()
  957. hitbox1.Parent=nil
  958. elseif impulse==3 then
  959. impulse=1
  960. for i=0,1,0.2 do
  961. swait()
  962. wld1.C0=clerp(wld1.C0,euler(1.57,0,-0.785)*cf(0,1,-0.3),.45)
  963. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.4,0,0),.45)
  964. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.45)
  965. RW.C0=clerp(RW.C0,cf(1,0.8,-0.5)*euler(3,0,-0.785),.45)
  966. LW.C0=clerp(LW.C0,cf(-1,0.8,-0.5)*euler(3,0,0.785),.45)
  967. RH.C0=clerp(RH.C0,RHC0*euler(-.2,0,0),.45)
  968. LH.C0=clerp(LH.C0,LHC0*euler(-.2,0,0),.45)
  969. end
  970. Humanoid.Jump=true
  971. blcf=nil
  972. scfr=nil
  973. hitbox1.Parent=model1
  974. hitbox1.Size=vt(1,5,1)
  975. hitbox1.Transparency=1
  976. hitbox1.CFrame=prt10.CFrame
  977. con1=hitbox1.Touched:connect(function(hit) Damagefunc(hit,25,35,math.random(20,30),"Normal",RootPart,.5,1) end)
  978. for i=1,3 do
  979. so("http://roblox.com/asset/?id=161006195",prt10,1,1)
  980. for i=0,1,0.1 do
  981. swait()
  982. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  983. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  984. local h = 5
  985. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  986. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  987. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  988. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  989. scfr = blcf
  990. elseif not scfr then
  991. scfr = blcf
  992. end
  993. hitbox1.CFrame=prt10.CFrame
  994. wld1.C0=clerp(wld1.C0,euler(2,0,-0.785)*cf(0,1,-0.3),.45)
  995. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.2,0,0),.45)
  996. RW.C0=clerp(RW.C0,cf(1,0.3,-0.5)*euler(.5,0,-0.785),.3)
  997. LW.C0=clerp(LW.C0,cf(-1,0.3,-0.5)*euler(.5,0,0.785),.3)
  998. RootJoint.C0=RootCF*euler(6.28*i,0,0)
  999. end
  1000. end
  1001. con1:disconnect()
  1002. hitbox1.Parent=nil
  1003. end
  1004. attack=false
  1005. end
  1006.  
  1007. function Bash()
  1008. attack=true
  1009. for i=0,1,0.1 do
  1010. swait()
  1011. wld1.C0=clerp(wld1.C0,euler(1.1,0,0)*cf(0,1,-0.4),.3)
  1012. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,1)*euler(0.5,0,0),.3)
  1013. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-1.4),.3)
  1014. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1.4,-1.4,0)*euler(-.6,0,0),.3)
  1015. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1,-1,0)*euler(.5,0,0),.3)
  1016. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,2.5,0),.3)
  1017. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1,0),.3)
  1018. end
  1019. Torso.Velocity=RootPart.CFrame.lookVector*200
  1020. so("http://roblox.com/asset/?id=2767090",Torso,1,.7)
  1021. MagicWave(Color4,RootPart.CFrame*euler(1.57,0,0),1,1,1,1,1,1,0.05)
  1022. hit=nil
  1023. for i=1,20 do
  1024. if hit==nil then
  1025. swait()
  1026. end
  1027. hit,pos=rayCast(RootPart.Position,RootPart.CFrame.lookVector,6,Character)
  1028. end
  1029. Torso.Velocity=RootPart.CFrame.lookVector*0
  1030. Humanoid.WalkSpeed=0
  1031. for i=0,1,0.1 do
  1032. swait()
  1033. wld1.C0=clerp(wld1.C0,euler(1.1,0,0)*cf(0,1,-0.4),.3)
  1034. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,1.4)*euler(-0.2,0,0),.3)
  1035. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-1.4),.3)
  1036. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(3,-1.4,0)*euler(-.6,0,0),.3)
  1037. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(2.3,-1.4,0)*euler(.5,0,0),.3)
  1038. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0),.3)
  1039. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0),.3)
  1040. end
  1041. so("http://roblox.com/asset/?id=161006195",prt10,1,.5)
  1042. blcf=nil
  1043. scfr=nil
  1044. for i=0,1,0.2 do
  1045. swait()
  1046. local blcf = prt10.CFrame*CFrame.new(0,.5,0)
  1047. if scfr and (prt10.Position-scfr.p).magnitude > .1 then
  1048. local h = 5
  1049. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  1050. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1051. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  1052. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1053. scfr = blcf
  1054. elseif not scfr then
  1055. scfr = blcf
  1056. end
  1057. wld1.C0=clerp(wld1.C0,euler(2.2,0,0)*cf(0,.8,-0.3),.45)
  1058. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,1.4)*euler(0.4,0,0),.45)
  1059. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.3)*euler(0,0,-1.4),.45)
  1060. RW.C0=clerp(RW.C0,cf(.5,0.2,-0.5)*euler(3,-1.4,0)*euler(-2.7,0,0),.45)
  1061. LW.C0=clerp(LW.C0,cf(-1.2,0.1,-0.3)*euler(0,-1.4,0)*euler(.5,0,0),.45)
  1062. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(-1.2,1.57,0),.45)
  1063. LH.C0=clerp(LH.C0,cf(-1.1,0.4,-0.8)*euler(-0.05,-1.57,0),.45)
  1064. end
  1065. hit,pos=rayCast(prt10.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,100,Character)
  1066. if hit~=nil then
  1067. local ref=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  1068. ref.Anchored=true
  1069. ref.CFrame=cf(pos)
  1070. game:GetService("Debris"):AddItem(ref,3)
  1071. for i=1,10 do
  1072. Col=hit.BrickColor
  1073. local groundpart=part(3,workspace,0,0,Col,"Ground",vt(math.random(50,200)/100,math.random(50,200)/100,math.random(50,200)/100))
  1074. groundpart.Anchored=true
  1075. groundpart.Material=hit.Material
  1076. groundpart.CanCollide=true
  1077. groundpart.CFrame=cf(pos)*cf(math.random(-500,500)/100,0,math.random(-500,500)/100)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1078. game:GetService("Debris"):AddItem(groundpart,5)
  1079. end
  1080. so("http://roblox.com/asset/?id=157878578",ref,.6,1.2)
  1081. MagicWave(hit.BrickColor,cf(pos),1,1,1,.7,.7,.7,0.05)
  1082. MagniDamage(ref,10,10,20,math.random(10,20),"Knockdown")
  1083. end
  1084. swait(50)
  1085. Humanoid.WalkSpeed=16
  1086. attack=false
  1087. end
  1088.  
  1089. function UnleashTheDemon()
  1090. attack=true
  1091. so("rbxasset://sounds\\unsheath.wav",prt1,1,.8)
  1092. for i=0,1,0.1 do
  1093. swait()
  1094. wld1.C0=clerp(wld1.C0,euler(.2,0,-.5)*cf(0,1,0),.3)
  1095. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.4,0,-0.5),.3)
  1096. RW.C0=clerp(RW.C0,cf(1.3,0.5,0.2)*euler(3.4,0,0),.3)
  1097. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,0),.3)
  1098. RH.C0=clerp(RH.C0,RHC0,.4)
  1099. LH.C0=clerp(LH.C0,LHC0,.4)
  1100. end
  1101. wld1.Part1=Torso
  1102. wld1.C0=euler(3.7,1.57,0)*cf(-1.5,-2.3,-.5)
  1103. for i=0,1,0.1 do
  1104. swait()
  1105. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1106. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.4,0,-0.4),.3)
  1107. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.3,0,0),.3)
  1108. LW.C0=clerp(LW.C0,cf(-1,0.5,-0.5)*euler(1.4,-1.57,0)*euler(1.2,0,0),.3)
  1109. end
  1110. so("http://roblox.com/asset/?id=178452217",RightArm,.5,.4)
  1111. so("http://roblox.com/asset/?id=168586586",RightArm,.5,.6)
  1112. so("http://roblox.com/asset/?id=160740121",RightArm,1,.8)
  1113. num=0
  1114. for i=0,1,0.01 do
  1115. swait()
  1116. if num>=10 then
  1117. num=0
  1118. MagicWave(BrickColor.new("Plum"),cf(Torso.Position)*cf(0,-1,0)*euler(0,math.random(-50,50),0),1,1,1,1,.5,1,0.05)
  1119. end
  1120. for i=1,2 do
  1121. if math.random(1,5)==1 then
  1122. MagicBlock(BrickColor.new("Really black"),RightArm.CFrame*cf(math.random(-100,100)/100,-math.random(0,700)/100,math.random(-100,100)/100),math.random(30,80)/100,math.random(30,80)/100,math.random(30,80)/100,.5,.5,.5,0.05)
  1123. else
  1124. MagicBlock(BrickColor.new("Bright red"),RightArm.CFrame*cf(math.random(-100,100)/100,-math.random(0,700)/100,math.random(-100,100)/100),math.random(30,80)/100,math.random(30,80)/100,math.random(30,80)/100,.5,.5,.5,0.05)
  1125. end
  1126. end
  1127. num=num+1
  1128. end
  1129. so("http://roblox.com/asset/?id=168586621",RightArm,1,.5)
  1130. so("http://roblox.com/asset/?id=160867463",RightArm,1,.8)
  1131. for i=1,4 do
  1132. MagicBlock(BrickColor.new("Magenta"),RightArm.CFrame*cf(0,-.5-math.random(0,500)/100,0),2,2,2,.5,.5,.5,0.05)
  1133. end
  1134. MagicWave(BrickColor.new("Plum"),cf(Torso.Position)*cf(0,-1,0)*euler(0,math.random(-50,50),0),1,1,1,.5,.3,.5,0.01)
  1135. Mode="Demon"
  1136. model2.Parent=Character
  1137. for i=1,#DBlade do
  1138. DBlade[i].Parent=model2
  1139. DBladeWelds[i].Parent=DBlade[1]
  1140. end
  1141. for i=0,1,0.1 do
  1142. swait()
  1143. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-0.4),.3)
  1144. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0.4),.3)
  1145. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.2,-0.5,1),.3)
  1146. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.4,0.5,-1.3),.3)
  1147. end
  1148. swait(50)
  1149. attack=false
  1150. end
  1151.  
  1152. function Demonattackone()
  1153. attack=true
  1154. --[[
  1155. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.5)*euler(0.4,0,-0.4),.3)
  1156. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0.4),.3)
  1157. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.4,-0.5,1)*euler(.1,0,0),.3)
  1158. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.2,0,-0.2),.3)
  1159. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(-0.2,1.57,0),.3)
  1160. LH.C0=clerp(LH.C0,cf(-1,-.5,0)*euler(0.5,-1.2,0)*euler(-.2,0,0),.3)
  1161. ]]
  1162. for i=0,1,0.1 do
  1163. swait()
  1164. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.5)*euler(0.4,0,-1),.3)
  1165. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0.7),.3)
  1166. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.4,-0.5,1)*euler(.3,0,.5),.3)
  1167. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.7,0,-0.7),.3)
  1168. RH.C0=clerp(RH.C0,cf(1,-1,-.6)*euler(-.3,1.57,0)*euler(0,.5,0),.3)
  1169. LH.C0=clerp(LH.C0,cf(-1,-.3,0)*euler(0.5,-.8,0)*euler(-.5,0,0),.3)
  1170. end
  1171. hitbox2.Parent=model2
  1172. hitbox2.Size=vt(1,6,1)
  1173. hitbox2.Transparency=1
  1174. hitbox2.CFrame=prtd7.CFrame
  1175. con1=hitbox2.Touched:connect(function(hit) Damagefunc(hit,10,15,math.random(1,5),"Lifesteal",RootPart,.5,1) end)
  1176. so("http://roblox.com/asset/?id=28144425",prtd7,1,.7)
  1177. blcf=nil
  1178. scfr=nil
  1179. for i=0,1,0.08 do
  1180. swait()
  1181. local blcf = prtd7.CFrame*CFrame.new(0,-.5,0)
  1182. if scfr and (prtd7.Position-scfr.p).magnitude > .1 then
  1183. local h = 5
  1184. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  1185. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1186. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  1187. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1188. scfr = blcf
  1189. elseif not scfr then
  1190. scfr = blcf
  1191. end
  1192. hitbox2.CFrame=prtd7.CFrame
  1193. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.5)*euler(0.2,0,1),.3)
  1194. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,-0.7),.3)
  1195. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1.4,-0.5,1)*euler(1.3,0,-1.7),.3)
  1196. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.7,0,-0.7),.3)
  1197. RH.C0=clerp(RH.C0,cf(1,-.6,0)*euler(-.3,1.57,0)*euler(0,-1,0),.3)
  1198. LH.C0=clerp(LH.C0,cf(-1,-1,-0.3)*euler(-0.3,-2.3,0)*euler(0,0,0),.3)
  1199. end
  1200. con1:disconnect()
  1201. hitbox2.Parent=nil
  1202. attack=false
  1203. end
  1204.  
  1205. function Demonattacktwo()
  1206. attack=true
  1207. for i=0,1,0.1 do
  1208. swait()
  1209. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.4)*euler(0.1,0,1.2),.3)
  1210. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,-0.7),.3)
  1211. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1.4,-1.2,.6)*euler(1.1,0,-1.7),.3)
  1212. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.7,0,-0.7),.3)
  1213. RH.C0=clerp(RH.C0,cf(1,-.6,0)*euler(-.1,1.57,0)*euler(0,-1,0),.3)
  1214. LH.C0=clerp(LH.C0,cf(-1,-1,-0.3)*euler(-0.1,-2.3,0)*euler(0,0,0),.3)
  1215. end
  1216. hitbox2.Parent=model2
  1217. hitbox2.Size=vt(1,6,1)
  1218. hitbox2.Transparency=1
  1219. hitbox2.CFrame=prtd7.CFrame
  1220. con1=hitbox2.Touched:connect(function(hit) Damagefunc(hit,10,15,math.random(1,5),"Lifesteal",RootPart,.5,1) end)
  1221. so("http://roblox.com/asset/?id=28144425",prtd7,1,.5)
  1222. blcf=nil
  1223. scfr=nil
  1224. for i=0,1,0.1 do
  1225. swait()
  1226. local blcf = prtd7.CFrame*CFrame.new(0,-.5,0)
  1227. if scfr and (prtd7.Position-scfr.p).magnitude > .1 then
  1228. local h = 5
  1229. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  1230. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1231. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  1232. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1233. scfr = blcf
  1234. elseif not scfr then
  1235. scfr = blcf
  1236. end
  1237. hitbox2.CFrame=prtd7.CFrame
  1238. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.4)*euler(0.1,0,-0.8),.3)
  1239. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0.7),.3)
  1240. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.4,-.8,.6)*euler(0.5,0,.5),.3)
  1241. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.7,0,-0.7),.3)
  1242. RH.C0=clerp(RH.C0,cf(1,-.8,-0.3)*euler(-0.2,1.57,0),.3)
  1243. LH.C0=clerp(LH.C0,cf(-1,-.6,-0.2)*euler(0.2,-1.2,0)*euler(-.2,0,0),.3)
  1244. end
  1245. con1:disconnect()
  1246. hitbox2.Parent=nil
  1247. attack=false
  1248. end
  1249.  
  1250. function Demonattackthree()
  1251. attack=true
  1252. for i=0,1,0.1 do
  1253. swait()
  1254. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.5)*euler(0.1,0,-0.2),.3)
  1255. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0.4),.3)
  1256. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(2.9,-1.8,0)*euler(.5,0,0),.3)
  1257. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.4,0,-0.2),.3)
  1258. RH.C0=clerp(RH.C0,cf(1,-.7,-.3)*euler(-0.2,1.57,0),.3)
  1259. LH.C0=clerp(LH.C0,cf(-1,-.7,0)*euler(0.2,-1.2,0)*euler(-.2,0,0),.3)
  1260. end
  1261. Humanoid.WalkSpeed=0
  1262. hitbox2.Parent=model2
  1263. hitbox2.Size=vt(1,6,1)
  1264. hitbox2.Transparency=1
  1265. hitbox2.CFrame=prtd7.CFrame
  1266. con1=hitbox2.Touched:connect(function(hit) Damagefunc(hit,10,15,math.random(1,5),"Lifesteal",RootPart,.5,1) end)
  1267. so("http://roblox.com/asset/?id=28144425",prtd7,1,.6)
  1268. blcf=nil
  1269. scfr=nil
  1270. for i=0,1,0.15 do
  1271. swait()
  1272. local blcf = prtd7.CFrame*CFrame.new(0,-.5,0)
  1273. if scfr and (prtd7.Position-scfr.p).magnitude > .1 then
  1274. local h = 5
  1275. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  1276. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1277. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  1278. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1279. scfr = blcf
  1280. elseif not scfr then
  1281. scfr = blcf
  1282. end
  1283. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.8)*euler(0.5,0,0.6),.4)
  1284. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.1,0,-0.6),.4)
  1285. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.55,-1.5,0)*euler(.3,0,0),.4)
  1286. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.4,0,-0.2),.4)
  1287. RH.C0=clerp(RH.C0,cf(1,-.1,-.4)*euler(0.4,1.57,0)*euler(-.2,0,0),.4)
  1288. LH.C0=clerp(LH.C0,cf(-1,-.9,0)*euler(-0.2,-1.2,0)*euler(-.2,0,0),.4)
  1289. if i==0.6 then
  1290. hit,pos=rayCast(prtd8.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  1291. if hit~=nil then
  1292. local ref=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  1293. ref.Anchored=true
  1294. ref.CFrame=cf(pos)
  1295. game:GetService("Debris"):AddItem(ref,3)
  1296. for i=1,5 do
  1297. Col=hit.BrickColor
  1298. local groundpart=part(3,workspace,0,0,Col,"Ground",vt(math.random(50,200)/100,math.random(50,200)/100,math.random(50,200)/100))
  1299. groundpart.Anchored=true
  1300. groundpart.Material=hit.Material
  1301. groundpart.CanCollide=true
  1302. groundpart.CFrame=cf(pos)*cf(math.random(-200,200)/100,0,math.random(-200,200)/100)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1303. game:GetService("Debris"):AddItem(groundpart,3)
  1304. end
  1305. so("http://roblox.com/asset/?id=157878578",ref,.6,1.5)
  1306. MagicWave(hit.BrickColor,cf(pos),1,1,1,.7,.7,.7,0.05)
  1307. MagniDamage(ref,8,10,15,math.random(10,20),"Normal")
  1308. end
  1309. end
  1310. end
  1311. con1:disconnect()
  1312. hitbox2.Parent=nil
  1313. swait(10)
  1314. Humanoid.WalkSpeed=16
  1315. attack=false
  1316. end
  1317.  
  1318. function LetItBuild()
  1319. attack=true
  1320. for i=0,1,0.1 do
  1321. swait()
  1322. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.8)*euler(0.2,0,-1),.3)
  1323. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,1),.3)
  1324. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.5,-0.5,1.5)*euler(.6,0,.4),.3)
  1325. LW.C0=clerp(LW.C0,cf(0,0.5,-0.5)*euler(1.57,-1.57,0)*euler(1.5,0,0),.3)
  1326. RH.C0=clerp(RH.C0,cf(1,-.6,-.5)*euler(-0.2,2,0)*euler(0,0,0),.3)
  1327. LH.C0=clerp(LH.C0,cf(-1,-.2,0)*euler(0.5,-.6,0)*euler(-.4,0,0),.3)
  1328. end
  1329. local num=0
  1330. local magik=0
  1331. local num2=0
  1332. while holdx==true do
  1333. swait()
  1334. if magik<25 then
  1335. if num>=10 then
  1336. Humanoid:TakeDamage(1)
  1337. pos1=Torso.Position+vt(math.random(-200,200)/100,math.random(-200,200)/100,math.random(-200,200)/100)
  1338. pos2=prtd8.Position--+vt(math.random(-50,50)/100,math.random(-50,50)/100,math.random(-50,50)/100)
  1339. Lightning(pos1,pos2,5,3,"Plum",.1,.5,.5)
  1340. MagicCircle(BrickColor.new("Plum"),cf(pos1),5,5,5,1,1,1,.1)
  1341. MagicBlood(BrickColor.new("Plum"),Torso.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),.1,.1,.1,.1,2,.1,0.0)
  1342. so("http://www.roblox.com/asset/?id=178452221",Torso,.1,1.5)
  1343. magik=magik+1
  1344. num=0
  1345. end
  1346. end
  1347. num=num+1
  1348. num2=num2+magik
  1349. if num2>=50 then
  1350. MagicBlood(BrickColor.new("Plum"),cf(prtd8.Position)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),.1,.1,.1,.1,1,.1,0.1)
  1351. num2=0
  1352. end
  1353. --MagicBlock(BrickColor.new("Plum"),cf(prtd8.Position)*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)),magik/5,magik/5,magik/5,magik/8,magik/8,magik/8,.1)
  1354. end
  1355. Torso.Velocity=RootPart.CFrame.lookVector*(10*magik)
  1356. blcf=nil
  1357. scfr=nil
  1358. hitbox2.Parent=model2
  1359. hitbox2.Size=vt(1,6,1)
  1360. hitbox2.Transparency=1
  1361. hitbox2.CFrame=prtd7.CFrame
  1362. con1=hitbox2.Touched:connect(function(hit) Damagefunc(hit,math.ceil((magik/2)),magik,1,"Lifesteal",RootPart,.5,1) end)
  1363. for i=1,3 do
  1364. so("http://roblox.com/asset/?id=28144425",prtd7,1,1)
  1365. for i=0,1,0.1 do
  1366. swait()
  1367. hitbox2.CFrame=prtd7.CFrame
  1368. local blcf = prtd7.CFrame*CFrame.new(0,-.5,0)
  1369. if scfr and (prtd7.Position-scfr.p).magnitude > .1 then
  1370. local h = 5
  1371. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  1372. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1373. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  1374. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1375. scfr = blcf
  1376. elseif not scfr then
  1377. scfr = blcf
  1378. end
  1379. RootJoint.C0=RootCF*cf(0,0,-0.8)*euler(0,0,6.28*i)*euler(0.2,0,-1)
  1380. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.5,-0.5,1.5)*euler(.4,0,0),.3)
  1381. LW.C0=clerp(LW.C0,cf(0,0.5,-0.5)*euler(1.57,-1.57,0)*euler(1.5,0,0),.3)
  1382. RH.C0=clerp(RH.C0,cf(1,-.6,-.5)*euler(-0.2,2,0)*euler(0,0,0),.3)
  1383. LH.C0=clerp(LH.C0,cf(-1,-.2,0)*euler(0.5,-.6,0)*euler(-.4,0,0),.3)
  1384. end
  1385. end
  1386. con1:disconnect()
  1387. hitbox2.Parent=nil
  1388. attack=false
  1389. end
  1390.  
  1391. function YourMoveCreep()
  1392. attack=true
  1393. local pers=nil
  1394. for i=0,1,0.1 do
  1395. swait()
  1396. cost=Humanoid.Health*.01
  1397. Humanoid:TakeDamage(cost)
  1398. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.7)*euler(0.2,0,-1.3),.3)
  1399. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0.2,1.3),.3)
  1400. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.8,-0.5,1)*euler(.5,0,0),.3)
  1401. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,-0.4,0)*euler(0,0,-1.7),.3)
  1402. RH.C0=clerp(RH.C0,cf(.1,-1,-.9)*euler(-0.2,1.57,0)*euler(-.7,1.57,0),.3)
  1403. LH.C0=clerp(LH.C0,cf(-.8,-.4,0)*euler(0.2,-1.2,0)*euler(-.2,1.4,0),.3)
  1404. end
  1405. local blockprt=part(3,Character,0,1,BrickColor.new("Plum"),"Block",vt(8,.1,8))
  1406. blockprt.Anchored=true
  1407. blockprt.CFrame=LeftArm.CFrame*cf(0,-1,0)
  1408. conbl=blockprt.Touched:connect(function(hit)
  1409. if hit.Parent.Parent:findFirstChild("Torso")~=nil then
  1410. hit=hit.Parent.Parent.Torso
  1411. end
  1412. if hit.Parent:findFirstChild("Torso")~=nil and hit.Parent~=Character and guard==true then
  1413. pers=hit
  1414. print("HIT")
  1415. guard=false
  1416. end
  1417. end)
  1418. num=0
  1419. while guard==true do
  1420. swait()
  1421. if num>10 then
  1422. num=0
  1423. MagicBlock(BrickColor.new("Plum"),LeftArm.CFrame*cf(0,-1,0),1,1,1,.7,.7,.7,0.05)
  1424. MagicCircle(BrickColor.new("Plum"),LeftArm.CFrame*cf(0,-1,0),1,.1,1,6,0,6,0.1)
  1425. end
  1426. blockprt.CFrame=LeftArm.CFrame*cf(0,-1,0)
  1427. num=num+1
  1428. end
  1429. conbl:disconnect()
  1430. blockprt.Parent=nil
  1431. print(pers)
  1432. if pers~=nil then
  1433. for i=0,1,0.1 do
  1434. swait()
  1435. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.7)*euler(-0.2,0,1.6),.3)
  1436. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,-0.2,-1),.3)
  1437. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.8,-1,1)*euler(1,0,0),.3)
  1438. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-0.5),.3)
  1439. RH.C0=clerp(RH.C0,cf(.1,-1,-.9)*euler(-0.2,1.57,0)*euler(-.7,-1.57,0),.3)
  1440. LH.C0=clerp(LH.C0,cf(-.8,-.4,0)*euler(0.2,-1.2,0)*euler(-.2,1.4,0),.3)
  1441. end
  1442. swait(200)
  1443. end
  1444. attack=false
  1445. end
  1446.  
  1447. function MagniDamage(Part,magni,mindam,maxdam,knock,Type)
  1448. for _,c in pairs(workspace:children()) do
  1449. local hum=c:findFirstChild("Humanoid")
  1450. if hum~=nil then
  1451. local head=c:findFirstChild("Torso")
  1452. if head~=nil then
  1453. local targ=head.Position-Part.Position
  1454. local mag=targ.magnitude
  1455. if mag<=magni and c.Name~=Player.Name then
  1456. Damagefunc(head,mindam,maxdam,knock,Type,Part,.2,1,nil,1)
  1457. end
  1458. end
  1459. end
  1460. end
  1461. end
  1462.  
  1463. function rayCast(Pos, Dir, Max, Ignore)  -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  1464. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  1465. end
  1466.  
  1467. local Point=Torso.CFrame*cf(0,Torso.Size.Y,0)
  1468. LastPoint=Point
  1469. function effect(Color,Ref,LP,P1,returnn)
  1470. local effectsmsh=Instance.new("CylinderMesh")
  1471. effectsmsh.Scale=Vector3.new(0.2,1,0.2)
  1472. effectsmsh.Name="Mesh"
  1473. local effectsg=Instance.new("Part")
  1474. effectsg.formFactor=3
  1475. effectsg.CanCollide=false
  1476. effectsg.Name="Eff"
  1477. effectsg.Locked=true
  1478. effectsg.Anchored=true
  1479. effectsg.Size=Vector3.new(0.5,1,0.5)
  1480. effectsg.Parent=workspace
  1481. effectsmsh.Parent=effectsg
  1482. effectsg.BrickColor=BrickColor.new(Color)
  1483. effectsg.Reflectance=Ref
  1484. local point1=P1
  1485. local mg=(LP.p - point1.p).magnitude
  1486. effectsg.Size=Vector3.new(0.5,mg,0.5)
  1487. effectsg.CFrame=cf((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
  1488. effectsmsh.Scale=Vector3.new(0.2,1,0.2)
  1489. game:GetService("Debris"):AddItem(effectsg,2)
  1490. if returnn then return effectsg end
  1491. coroutine.resume(coroutine.create(function(Part,Mesh)
  1492. if not returnn then
  1493. for i=0,1,0.05 do
  1494. wait()
  1495. Part.Transparency=1*i
  1496. Mesh.Scale=Vector3.new(0.5-0.5*i,1,0.5-0.5*i)
  1497. end
  1498. Part.Parent=nil
  1499. end
  1500. end),effectsg,effectsmsh)
  1501. end
  1502.  
  1503. local function CFrameFromTopBack(at, top, back)
  1504. local right = top:Cross(back)
  1505. return CFrame.new(at.x, at.y, at.z,
  1506. right.x, top.x, back.x,
  1507. right.y, top.y, back.y,
  1508. right.z, top.z, back.z)
  1509. end
  1510.  
  1511. function Triangle(a, b, c)
  1512. local edg1 = (c-a):Dot((b-a).unit)
  1513. local edg2 = (a-b):Dot((c-b).unit)
  1514. local edg3 = (b-c):Dot((a-c).unit)
  1515. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  1516. a, b, c = a, b, c
  1517. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  1518. a, b, c = b, c, a
  1519. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  1520. a, b, c = c, a, b
  1521. else
  1522. assert(false, "unreachable")
  1523. end
  1524.  
  1525. local len1 = (c-a):Dot((b-a).unit)
  1526. local len2 = (b-a).magnitude - len1
  1527. local width = (a + (b-a).unit*len1 - c).magnitude
  1528.  
  1529. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  1530.  
  1531. local list = {}
  1532.  
  1533. if len1 > 0.01 then
  1534. local w1 = Instance.new('WedgePart', m)
  1535. game:GetService("Debris"):AddItem(w1,5)
  1536. w1.Material = "SmoothPlastic"
  1537. w1.FormFactor = 'Custom'
  1538. if Mode=="Binary" then
  1539. w1.BrickColor = BrickColor.new("White")
  1540. else
  1541. w1.BrickColor = BrickColor.new("Plum")
  1542. end
  1543. w1.Transparency = 0
  1544. w1.Reflectance = 0
  1545. w1.Material = "SmoothPlastic"
  1546. w1.CanCollide = false
  1547. NoOutline(w1)
  1548. local sz = Vector3.new(0.2, width, len1)
  1549. w1.Size = sz
  1550. local sp = Instance.new("SpecialMesh",w1)
  1551. sp.MeshType = "Wedge"
  1552. sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
  1553. w1:BreakJoints()
  1554. w1.Anchored = true
  1555. w1.Parent = workspace
  1556. w1.Transparency = 0.7
  1557. table.insert(Effects,{w1,"Disappear",.01})
  1558. w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  1559. table.insert(list,w1)
  1560. end
  1561.  
  1562. if len2 > 0.01 then
  1563. local w2 = Instance.new('WedgePart', m)
  1564. game:GetService("Debris"):AddItem(w2,5)
  1565. w2.Material = "SmoothPlastic"
  1566. w2.FormFactor = 'Custom'
  1567. if Mode=="Binary" then
  1568. w2.BrickColor = BrickColor.new("White")
  1569. else
  1570. w2.BrickColor = BrickColor.new("Plum")
  1571. end
  1572. w2.Transparency = 0
  1573. w2.Reflectance = 0
  1574. w2.Material = "SmoothPlastic"
  1575. w2.CanCollide = false
  1576. NoOutline(w2)
  1577. local sz = Vector3.new(0.2, width, len2)
  1578. w2.Size = sz
  1579. local sp = Instance.new("SpecialMesh",w2)
  1580. sp.MeshType = "Wedge"
  1581. sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
  1582. w2:BreakJoints()
  1583. w2.Anchored = true
  1584. w2.Parent = workspace
  1585. w2.Transparency = 0.7
  1586. table.insert(Effects,{w2,"Disappear",.01})
  1587. w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  1588. table.insert(list,w2)
  1589. end
  1590. return unpack(list)
  1591. end
  1592.  
  1593. --[[
  1594. Things for effects
  1595. put the variables in one table
  1596. like effect={brick,interval,i}
  1597. ]]
  1598. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1599. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1600. prt.Anchored=true
  1601. prt.CFrame=cframe
  1602. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1603. game:GetService("Debris"):AddItem(prt,5)
  1604. table.insert(Effects,{prt,"Block1",delay,x3,y3,z3}) --part, type, delay
  1605. --[[coroutine.resume(coroutine.create(function(Part,Mesh,dur)
  1606. for i=0,1,delay do
  1607. wait()
  1608. Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1609. Part.Transparency=i
  1610. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1611. end
  1612. Part.Parent=nil
  1613. end),prt,msh)]]
  1614. end
  1615.  
  1616. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1617. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1618. prt.Anchored=true
  1619. prt.CFrame=cframe
  1620. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  1621. game:GetService("Debris"):AddItem(prt,5)
  1622. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3})
  1623. --[[coroutine.resume(coroutine.create(function(Part,Mesh)
  1624. local wld=nil
  1625. for i=0,1,delay do
  1626. wait()
  1627. Part.CFrame=Part.CFrame
  1628. Part.Transparency=i
  1629. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1630. end
  1631. Part.Parent=nil
  1632. end),prt,msh)]]
  1633. end
  1634.  
  1635. function MagicWave(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1636. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1637. prt.Anchored=true
  1638. prt.CFrame=cframe
  1639. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
  1640. game:GetService("Debris"):AddItem(prt,5)
  1641. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3})
  1642. end
  1643.  
  1644. function MagicCylinder(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1645. local prt=part(3,Character,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  1646. prt.Anchored=true
  1647. prt.CFrame=cframe
  1648. msh=mesh("SpecialMesh",prt,"Head","",vt(0,0,0),vt(x1,y1,z1))
  1649. game:GetService("Debris"):AddItem(prt,5)
  1650. --table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3})
  1651. Effects[#Effects+1]={prt,"Cylinder",delay,x3,y3,z3} --part, type, delay
  1652. --[[coroutine.resume(coroutine.create(function(Part,Mesh)
  1653. for i=0,1,delay do
  1654. wait()
  1655. Part.CFrame=Part.CFrame
  1656. Part.Transparency=i
  1657. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1658. end
  1659. Part.Parent=nil
  1660. end),prt,msh)]]
  1661. end
  1662.  
  1663. function MagicCylinder2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1664. local prt=part(3,Character,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  1665. prt.Anchored=true
  1666. prt.CFrame=cframe
  1667. msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1668. game:GetService("Debris"):AddItem(prt,5)
  1669. --table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3})
  1670. Effects[#Effects+1]={prt,"Cylinder",delay,x3,y3,z3} --part, type, delay
  1671. --[[coroutine.resume(coroutine.create(function(Part,Mesh)
  1672. for i=0,1,delay do
  1673. wait()
  1674. Part.CFrame=Part.CFrame
  1675. Part.Transparency=i
  1676. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1677. end
  1678. Part.Parent=nil
  1679. end),prt,msh)]]
  1680. end
  1681.  
  1682. function MagicBlood(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1683. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1684. prt.Anchored=true
  1685. prt.CFrame=cframe
  1686. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  1687. game:GetService("Debris"):AddItem(prt,5)
  1688. table.insert(Effects,{prt,"Blood",delay,x3,y3,z3})
  1689. end
  1690.  
  1691. function ElecEffect(cff,x,y,z)
  1692. local prt=part(3,workspace,0,0,BrickColor.new("Bright red"),"Part",vt(1,1,1))
  1693. prt.Anchored=true
  1694. prt.CFrame=cff*cf(math.random(-x,x),math.random(-y,y),math.random(-z,z))
  1695. prt.CFrame=cf(prt.Position)
  1696. --prt.CFrame=cf(cff)*cf(math.random(-x,x),math.random(-y,y),math.random(-z,z))
  1697. game:GetService("Debris"):AddItem(prt,2)
  1698. xval=math.random()/2
  1699. yval=math.random()/2
  1700. zval=math.random()/2
  1701. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(xval,yval,zval))
  1702. Effects[#Effects+1]={prt,"Elec",0.1,x,y,z,xval,yval,zval} --part, type, delay
  1703. end
  1704.  
  1705. function Lightning(p0,p1,tym,ofs,col,th,tra,last)
  1706. --[[p0=pos1
  1707. p1=pos2
  1708. tym=times
  1709. ofs=offset
  1710. col=color
  1711. th=size
  1712. tra=transparency
  1713. last=lastingtime]]
  1714. local magz = (p0 - p1).magnitude local curpos = p0 local trz = {-ofs,ofs}
  1715. for i=1,tym do
  1716. local li = Instance.new("Part",workspace) li.TopSurface =0 li.BottomSurface = 0 li.Anchored = true  li.Transparency = tra or 0.4 li.BrickColor = BrickColor.new(col)
  1717. li.formFactor = "Custom" li.CanCollide = false li.Size = Vector3.new(th,th,magz/tym) local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  1718. local trolpos = CFrame.new(curpos,p1)*CFrame.new(0,0,magz/tym).p+ofz
  1719. if tym == i then
  1720. local magz2 = (curpos - p1).magnitude li.Size = Vector3.new(th,th,magz2)
  1721. li.CFrame = CFrame.new(curpos,p1)*CFrame.new(0,0,-magz2/2)
  1722. else
  1723. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/tym/2)
  1724. end
  1725. curpos = li.CFrame*CFrame.new(0,0,magz/tym/2).p game.Debris:AddItem(li,last)
  1726. end
  1727. end
  1728.  
  1729. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  1730.         if hit.Parent==nil then
  1731.                 return
  1732.         end
  1733.         h=hit.Parent:FindFirstChild("Humanoid")
  1734.         for _,v in pairs(hit.Parent:children()) do
  1735.         if v:IsA("Humanoid") then
  1736.         h=v
  1737.         end
  1738.         end
  1739.         if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  1740.         h=hit.Parent.Parent:FindFirstChild("Humanoid")
  1741.         end
  1742.         if hit.Parent.className=="Hat" then
  1743.         hit=hit.Parent.Parent:findFirstChild("Head")
  1744.         end
  1745.         -- and hit.Parent~=CannonTarget.Parent or hit.Parent~=RailgunTarget.Parent
  1746.         if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  1747.         if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  1748.         --[[                if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  1749.                         return
  1750.                 end]]
  1751. --                        hs(hit,1.2)
  1752.                         so("http://www.roblox.com/asset/?id=10209590",hit,1,math.random(50,100)/100)
  1753.                         --so("rbxasset://sounds\\unsheath.wav",hit,1,math.random(200,250)/100)
  1754.                         c=Instance.new("ObjectValue")
  1755.                         c.Name="creator"
  1756.                         c.Value=game:service("Players").LocalPlayer
  1757.                         c.Parent=h
  1758.                         game:GetService("Debris"):AddItem(c,.5)
  1759.                 Damage=math.random(minim,maxim)
  1760.                 if Mode=="Demon" then
  1761.                 Damage=Damage+damcount
  1762.                 end
  1763. --                h:TakeDamage(Damage)
  1764.                 blocked=false
  1765.                 block=hit.Parent:findFirstChild("Block")
  1766.                 if block~=nil then
  1767.                 print(block.className)
  1768.                 if block.className=="NumberValue" then
  1769.                 if block.Value>0 then
  1770.                 blocked=true
  1771.                 if decreaseblock==nil then
  1772.                 block.Value=block.Value-1
  1773.                 end
  1774.                 end
  1775.                 end
  1776.                 if block.className=="IntValue" then
  1777.                 if block.Value>0 then
  1778.                 blocked=true
  1779.                 if decreaseblock~=nil then
  1780.                 block.Value=block.Value-1
  1781.                 end
  1782.                 end
  1783.                 end
  1784.                 end
  1785.                 if blocked==false then
  1786. --                h:TakeDamage(Damage)
  1787.                 h.Health=h.Health-Damage
  1788.                 showDamage(hit.Parent,Damage,.5,BrickColor:Red())
  1789.                 else
  1790.                 h.Health=h.Health-(Damage/2)
  1791.                 showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
  1792.                 end
  1793.                 if Type=="Knockdown" then
  1794.                 hum=hit.Parent.Humanoid
  1795. hum.PlatformStand=true
  1796. coroutine.resume(coroutine.create(function(HHumanoid)
  1797. swait(1)
  1798. HHumanoid.PlatformStand=false
  1799. end),hum)
  1800.                 local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  1801. --hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  1802. local bodvol=Instance.new("BodyVelocity")
  1803. bodvol.velocity=angle*knockback
  1804. bodvol.P=5000
  1805. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1806. bodvol.Parent=hit
  1807. rl=Instance.new("BodyAngularVelocity")
  1808. rl.P=3000
  1809. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1810. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  1811. rl.Parent=hit
  1812. game:GetService("Debris"):AddItem(bodvol,.5)
  1813. game:GetService("Debris"):AddItem(rl,.5)
  1814.                 elseif Type=="Normal" then
  1815.                 vp=Instance.new("BodyVelocity")
  1816.                 vp.P=500
  1817.                 vp.maxForce=Vector3.new(math.huge,0,math.huge)
  1818. --                vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  1819.                 if KnockbackType==1 then
  1820.                 vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/100
  1821.                 elseif KnockbackType==2 then
  1822.                 vp.velocity=Property.CFrame.lookVector*knockback
  1823.                 end
  1824.                 if knockback>-100 then
  1825.                         vp.Parent=hit.Parent.Torso
  1826.                 end
  1827.                 game:GetService("Debris"):AddItem(vp,.5)
  1828.                 elseif Type=="Lifesteal" then
  1829.                 for i=1,5 do
  1830.                 MagicBlood(BrickColor.new("Plum"),hit.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),.1,.1,.1,.1,2,.1,0.05)
  1831.                 end
  1832.                 vp=Instance.new("BodyVelocity")
  1833.                 vp.P=500
  1834.                 vp.maxForce=Vector3.new(math.huge,0,math.huge)
  1835.                 if KnockbackType==1 then
  1836.                 vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/250
  1837.                 elseif KnockbackType==2 then
  1838.                 vp.velocity=Property.CFrame.lookVector*knockback
  1839.                 end
  1840.                 if knockback>-250 then
  1841.                         vp.Parent=hit.Parent.Torso
  1842.                 end
  1843.                 game:GetService("Debris"):AddItem(vp,.5)
  1844.                 Heal=math.ceil(Damage/5)
  1845.                 Humanoid.Health=Humanoid.Health+Heal
  1846.                 showDamage(RootPart,Heal,.5,BrickColor.new("Bright green"))
  1847.                 elseif Type=="Up" then
  1848.                 local bodyVelocity=Instance.new("BodyVelocity")
  1849.                 bodyVelocity.velocity=vt(0,30,0)
  1850.                 bodyVelocity.P=5000
  1851.                 bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1852.                 bodyVelocity.Parent=hit
  1853.                 game:GetService("Debris"):AddItem(bodyVelocity,1)
  1854.                 rl=Instance.new("BodyAngularVelocity")
  1855.                 rl.P=3000
  1856.                 rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1857.                 rl.angularvelocity=Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5))
  1858.                 rl.Parent=hit
  1859.                 game:GetService("Debris"):AddItem(rl,.5)
  1860.                 elseif Type=="Snare" then
  1861.                 bp=Instance.new("BodyPosition")
  1862.                 bp.P=2000
  1863.                 bp.D=100
  1864.                 bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1865.                 bp.position=hit.Parent.Torso.Position
  1866.                 bp.Parent=hit.Parent.Torso
  1867.                 game:GetService("Debris"):AddItem(bp,1)
  1868.                 elseif Type=="Charge" then
  1869.                 Charge=Charge+1
  1870.                 coroutine.resume(coroutine.create(function(Part)
  1871.                 swait(30)
  1872.                 for i=1,5 do
  1873.                 swait(5)
  1874.                 so("rbxasset://sounds\\unsheath.wav",hit,1,2)
  1875.                 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)
  1876.                 newdam=math.random(1,5)
  1877.                 if blocked==false then
  1878.                 h:TakeDamage(newdam)
  1879.                 showDamage(hit.Parent,newdam,.5,BrickColor:Red())
  1880.                 else
  1881.                 h:TakeDamage(newdam/2)
  1882.                 showDamage(hit.Parent,newdam,.5,BrickColor.new("Bright blue"))
  1883.                 end
  1884.                 end
  1885.                 end),hit)
  1886.                 end
  1887.                         debounce=Instance.new("BoolValue")
  1888.                         debounce.Name="DebounceHit"
  1889.                         debounce.Parent=hit.Parent
  1890.                         debounce.Value=true
  1891.                         game:GetService("Debris"):AddItem(debounce,Delay)
  1892.                         c=Instance.new("ObjectValue")
  1893.                         c.Name="creator"
  1894.                         c.Value=Player
  1895.                         c.Parent=h
  1896.                         game:GetService("Debris"):AddItem(c,.5)
  1897.                 CRIT=false
  1898.                 hitDeb=true
  1899.                 AttackPos=6
  1900.         end
  1901. end
  1902.  
  1903. showDamage=function(Char,Dealt,du,Color)
  1904.         m=Instance.new("Model")
  1905.         m.Name=tostring(Dealt)
  1906.         h=Instance.new("Humanoid")
  1907.         h.Health=0
  1908.         h.MaxHealth=0
  1909.         h.Parent=m
  1910.         c=Instance.new("Part")
  1911.         c.Transparency=0
  1912.         c.BrickColor=Color
  1913.         c.Name="Head"
  1914.         c.TopSurface=0
  1915.         c.BottomSurface=0
  1916.         c.formFactor="Plate"
  1917.         c.Size=Vector3.new(1,.4,1)
  1918.         ms=Instance.new("CylinderMesh")
  1919.         ms.Scale=Vector3.new(.8,.8,.8)
  1920.         if CRIT==true then
  1921.                 ms.Scale=Vector3.new(1,1.25,1)
  1922.         end
  1923.         ms.Parent=c
  1924.         c.Reflectance=0
  1925.         Instance.new("BodyGyro").Parent=c
  1926.         c.Parent=m
  1927.         if Char:findFirstChild("Head")~=nil then
  1928.         c.CFrame=cf(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1929.         elseif Char.Parent:findFirstChild("Head")~=nil then
  1930.         c.CFrame=cf(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1931.         end
  1932.         f=Instance.new("BodyPosition")
  1933.         f.P=2000
  1934.         f.D=100
  1935.         f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1936.         f.position=c.Position+Vector3.new(0,3,0)
  1937.         f.Parent=c
  1938.         game:GetService("Debris"):AddItem(m,.5+du)
  1939.         c.CanCollide=false
  1940.         m.Parent=workspace
  1941.         c.CanCollide=false
  1942. end
  1943.  
  1944. combo=0
  1945. function ob1d(mouse)
  1946. hold=true
  1947. if attack==true or equipped==false then return end
  1948. if Mode=="Binary" then
  1949. idle=0
  1950. if Anim=="Run" then
  1951. SpinSlash()
  1952. else
  1953. if combo==0 then
  1954. combo=1
  1955. attackone()
  1956. elseif combo==1 then
  1957. combo=2
  1958. attacktwo()
  1959. elseif combo==2 then
  1960. combo=0
  1961. attackthree()
  1962. end
  1963. end
  1964. else
  1965. if combo==0 then
  1966. combo=1
  1967. Demonattackone()
  1968. elseif combo==1 then
  1969. combo=2
  1970. Demonattacktwo()
  1971. elseif combo==2 then
  1972. combo=0
  1973. Demonattackthree()
  1974. end
  1975. end
  1976. coroutine.resume(coroutine.create(function()
  1977. for i=1,20 do
  1978. if attack==false then
  1979. swait()
  1980. end
  1981. end
  1982. if attack==false then
  1983. combo=0
  1984. --equipanim()
  1985. end
  1986. end))
  1987. end
  1988.  
  1989. function ob1u(mouse)
  1990. hold = false
  1991. end
  1992.  
  1993. buttonhold = false
  1994.  
  1995. eul=0
  1996. holdx=false
  1997. equipped=false
  1998. function key(key)
  1999. if key=="c" then
  2000. if guard==true then
  2001. guard=false
  2002. else
  2003. guard=true
  2004. end
  2005. end
  2006. if key=="x" then
  2007. holdx=true
  2008. end
  2009. if attack==true then return end
  2010. if key=="f" then
  2011. if equipped==false then
  2012. equipped=true
  2013. RSH=ch.Torso["Right Shoulder"]
  2014. LSH=ch.Torso["Left Shoulder"]
  2015. --
  2016. RSH.Parent=nil
  2017. LSH.Parent=nil
  2018. --
  2019. RW.Name="Right Shoulder"
  2020. RW.Part0=ch.Torso
  2021. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  2022. RW.C1=cf(0, 0.5, 0)
  2023. RW.Part1=ch["Right Arm"]
  2024. RW.Parent=ch.Torso
  2025. --
  2026. LW.Name="Left Shoulder"
  2027. LW.Part0=ch.Torso
  2028. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  2029. LW.C1=cf(0, 0.5, 0)
  2030. LW.Part1=ch["Left Arm"]
  2031. LW.Parent=ch.Torso
  2032. --
  2033. equipanim()
  2034. else
  2035. equipped=false
  2036. hideanim()
  2037. swait(0)
  2038. RW.Parent=nil
  2039. LW.Parent=nil
  2040. RSH.Parent=player.Character.Torso
  2041. LSH.Parent=player.Character.Torso
  2042. end
  2043. end
  2044. if equipped==false then return end
  2045. if Mode=="Binary" then
  2046. if key=="q" then
  2047. idle=500
  2048. end
  2049. if key=="z" and hitfloor~=nil then
  2050. BinarySwing()
  2051. end
  2052. if key=="x" then
  2053. BinaryImpulse()
  2054. end
  2055. if key=="c" then
  2056. Bash()
  2057. end
  2058. if key=="v" then
  2059. UnleashTheDemon()
  2060. end
  2061. end
  2062. if Mode=="Demon" then
  2063. if key=="x" then
  2064. LetItBuild()
  2065. end
  2066. if key=="c" then
  2067. YourMoveCreep()
  2068. end
  2069. end
  2070. if key=="0" then
  2071. Humanoid.WalkSpeed=(16*2)
  2072. end
  2073. end
  2074.  
  2075. function key2(key)
  2076. if key=="0" then
  2077. Humanoid.WalkSpeed=16
  2078. end
  2079. if key=="x" then
  2080. holdx=false
  2081. end
  2082. end
  2083.  
  2084. function s(mouse)
  2085. mouse.Button1Down:connect(function() ob1d(mouse) end)
  2086. mouse.Button1Up:connect(function() ob1u(mouse) end)
  2087. mouse.KeyDown:connect(key)
  2088. mouse.KeyUp:connect(key2)
  2089.  
  2090. player=Player
  2091. ch=Character
  2092. MMouse=mouse
  2093. end
  2094.  
  2095. function ds(mouse)
  2096. end
  2097.  
  2098. Bin.Selected:connect(s)
  2099. Bin.Deselected:connect(ds)
  2100. print("Fixer the Demon Mercenary loaded.")
  2101.  
  2102. local thenum=0
  2103. while true do
  2104. swait()
  2105. if Mode=="Demon" then
  2106. if thenum>=5 then
  2107. ElecEffect(prtd7.CFrame,2,4,2)
  2108. thenum=0
  2109. end
  2110. thenum=thenum+1
  2111. Humanoid:TakeDamage(Humanoid.Health/1000)
  2112. damcount=(Humanoid.MaxHealth-Humanoid.Health)/10
  2113. damcount=math.floor(damcount)
  2114. for _,c in pairs(Character:children()) do
  2115. for _,v in pairs(c:children()) do
  2116. if v.className=="BodyGyro" or v.className=="BodyPosition" or v.className=="BodyVelocity" or v.className=="BodyAngularVelocity" then
  2117. if v.Name~="FixerVel" and v.Name~="FixerGyro" then
  2118. v.Parent=nil
  2119. end
  2120. end
  2121. end
  2122. end
  2123. end
  2124. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  2125. local velderp=RootPart.Velocity.y
  2126. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  2127. if equipped==true then
  2128. if Anim=="Idle" and attack==false and Mode=="Binary" then
  2129. idle=idle+1
  2130. else
  2131. idle=0
  2132. end
  2133. if idleanim>=0.3 then
  2134. idleanim2=true
  2135. elseif idleanim<=0 then
  2136. idleanim2=false
  2137. end
  2138. if idleanim2==false then
  2139. if Anim=="Walk" then
  2140. idleanim=idleanim+0.005
  2141. elseif Anim=="Idle" then
  2142. idleanim=idleanim+0.003
  2143. end
  2144. else
  2145. if Anim=="Walk" then
  2146. idleanim=idleanim-0.005
  2147. elseif Anim=="Idle" then
  2148. idleanim=idleanim-0.003
  2149. end
  2150. end
  2151. if RootPart.Velocity.y > 1 and hitfloor==nil then
  2152. Anim="Jump"
  2153. if attack==false and Mode=="Binary" then
  2154. wld1.C0=clerp(wld1.C0,euler(0.4,0,-0.5)*cf(0,1,0),.3)
  2155. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3,0,-0.2),.3)
  2156. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-0.5),.3)
  2157. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.2,0,0),.3)
  2158. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  2159. RH.C0=clerp(RH.C0,cf(1,-0.5,-1)*euler(-0.5,1.57,0),.2)
  2160. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.7,-1.57,0),.2)
  2161. end
  2162. if attack==false and Mode=="Demon" then
  2163. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.5)*euler(0.4,0,0),.3)
  2164. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.2,0,0),.3)
  2165. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.8,-0.5,.8)*euler(.1,0,0),.3)
  2166. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.4,0,-0.2),.3)
  2167. RH.C0=clerp(RH.C0,cf(1,-.7,-.1)*euler(0.1,1.57,0),.3)
  2168. LH.C0=clerp(LH.C0,cf(-1,-.3,-.2)*euler(0.4,-1.57,0)*euler(0,0,0),.3)
  2169. end
  2170. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  2171. Anim="Fall"
  2172. if attack==false and Mode=="Binary" then
  2173. wld1.C0=clerp(wld1.C0,euler(0.4,0,-0.5)*cf(0,1,0),.3)
  2174. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(2.6,0,-0.2),.3)
  2175. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-0.5),.3)
  2176. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.4,0,0),.3)
  2177. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  2178. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.2)
  2179. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.2)
  2180. end
  2181. if attack==false and Mode=="Demon" then
  2182. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.5)*euler(0.2,0,0),.3)
  2183. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.2,0,0),.3)
  2184. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.4,-0.5,1)*euler(.6,0,.5),.3)
  2185. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.4,0,-1),.3)
  2186. RH.C0=clerp(RH.C0,cf(1,-.7,-.1)*euler(-0.1,1.57,0),.3)
  2187. LH.C0=clerp(LH.C0,cf(-1,-.6,-.2)*euler(0.8,-1.57,0)*euler(0,0,0),.3)
  2188. end
  2189. elseif torvel<1 and hitfloor~=nil then
  2190. if Anim=="Fall" then
  2191. if velderp<=-70 then
  2192. coroutine.resume(coroutine.create(function()
  2193. Stomp()
  2194. end))
  2195. end
  2196. end
  2197. Anim="Idle"
  2198. if idle<=500 then
  2199. if attack==false and Mode=="Binary" then
  2200. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,-0.3),.3)
  2201. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0.5),.3)
  2202. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-0.5),.3)
  2203. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1-(idleanim/4),-0.5+idleanim,-0.7+(idleanim/2)),.3)
  2204. LW.C0=clerp(LW.C0,cf(-1+idleanim,0.5-idleanim,-0.5)*euler(1-idleanim,-0.5+idleanim,0.5),.3)
  2205. RH.C0=clerp(RH.C0,RHC0,.2)
  2206. LH.C0=clerp(LH.C0,LHC0,.2)
  2207. end
  2208. if attack==false and Mode=="Demon" then
  2209. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.5-idleanim)*euler(0.4+(idleanim/2),0,-0.4),.3)
  2210. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-idleanim/2,0,0.4),.3)
  2211. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.4,-0.5,1)*euler(.1+idleanim,0,0),.3)
  2212. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.2,0,-0.2-idleanim),.3)
  2213. RH.C0=clerp(RH.C0,cf(1,-1,-idleanim)*euler(-0.2-(idleanim/2),1.57,0),.3)
  2214. LH.C0=clerp(LH.C0,cf(-1,-.5+idleanim,0)*euler(0.5+(idleanim/2),-1.2,0)*euler(-.2,0,0),.3)
  2215. end
  2216. else
  2217. if attack==false and Mode=="Binary" then
  2218. --wld1.C0=clerp(wld1.C0,euler(.2,0,0.1)*cf(0,.8,.3),.1)
  2219. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,-.3),.1)
  2220. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.1+(idleanim/2),0,0),.1)
  2221. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.5)*euler(0.1,0,0),.1)
  2222. --RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.7,0,1.5),.1)
  2223. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,.2),.1)
  2224. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-0.3)*euler(1.4,0,.8),.1)
  2225. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(-1.2,1.57,0),.15)
  2226. LH.C0=clerp(LH.C0,cf(-1.1,0.4,-0.8)*euler(-0.05,-1.57,0),.15)
  2227. end
  2228. end
  2229. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  2230. if Anim=="Fall" then
  2231. if velderp<=-70 then
  2232. coroutine.resume(coroutine.create(function()
  2233. Stomp()
  2234. end))
  2235. end
  2236. end
  2237. Anim="Walk"
  2238. if attack==false and Mode=="Binary" then
  2239. wld1.C0=clerp(wld1.C0,euler(0.4,0,-0.5)*cf(0,1,0),.2)
  2240. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.2)
  2241. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0.1,0,0),.2)
  2242. --RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-0.1,0,0.2),.2)
  2243. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3-idleanim,0,-0.2+(idleanim/2)),.2)
  2244. LW.C0=clerp(LW.C0,cf(-1,0.5,-0.5)*euler(1.57,-(idleanim/2),1.3-(idleanim/2)),.2)
  2245. RH.C0=clerp(RH.C0,RHC0,.3)
  2246. LH.C0=clerp(LH.C0,LHC0,.3)
  2247. end
  2248. if attack==false and Mode=="Demon" then
  2249. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.5)*euler(0.4,0,0),.3)
  2250. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.2,0,0),.3)
  2251. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.5,-0.5,1.5)*euler(.2,0,.2+idleanim),.3)
  2252. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(idleanim,0,-0.2),.3)
  2253. RH.C0=clerp(RH.C0,cf(1,-.5,0)*euler(0.2,1.57,0),.3)
  2254. LH.C0=clerp(LH.C0,cf(-1,-.5,0)*euler(0.5,-1.57,0)*euler(0,0,0),.3)
  2255. end
  2256. elseif torvel>=22 and hitfloor~=nil then
  2257. if Anim=="Fall" then
  2258. if velderp<=-70 then
  2259. coroutine.resume(coroutine.create(function()
  2260. Stomp()
  2261. end))
  2262. end
  2263. end
  2264. Anim="Run"
  2265. if attack==false and Mode=="Binary" then
  2266. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.3,0,0.5),.4)
  2267. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.5)*euler(0.5,0,-0.5),.4)
  2268. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,-0.3),.4)
  2269. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1.2,-0.8,-0.2),.4)
  2270. LW.C0=clerp(LW.C0,cf(-.7,0.5,-0.7)*euler(1.2,-0.5,0.8),.4)
  2271. RH.C0=clerp(RH.C0,RHC0*cf(0,0,0)*euler(0.2,0.2,.5),.3)
  2272. --LH.C0=clerp(LH.C0,LHC0*cf(.5,0.5,-.2)*euler(-0.5,0.5,-0.7),.3)
  2273. LH.C0=clerp(LH.C0,LHC0*cf(.5,0.2,0)*euler(0,.5,0.2),.3)
  2274. end
  2275. if attack==false and Mode=="Demon" then
  2276. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.8)*euler(0.5,0,-0.4),.3)
  2277. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(-0.2,0,.4),.3)
  2278. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.5,-0.5,1.5)*euler(.2,0,.4),.3)
  2279. LW.C0=clerp(LW.C0,cf(0,0.5,-0.5)*euler(1.57,-1.57,0)*euler(1.5,0,0),.3)
  2280. RH.C0=clerp(RH.C0,cf(1,-.3,-.5)*euler(-0.2,2,0)*euler(0,0,0),.3)
  2281. LH.C0=clerp(LH.C0,cf(-1,-.2,0)*euler(0.5,-1.2,0)*euler(-.2,0,0),.3)
  2282. end
  2283. end
  2284. end
  2285. if #Effects>0 then
  2286. --table.insert(Effects,{prt,"Block1",delay})
  2287. for e=1,#Effects do
  2288. if Effects[e]~=nil then
  2289. --for j=1,#Effects[e] do
  2290. local Thing=Effects[e]
  2291. if Thing~=nil then
  2292. local Part=Thing[1]
  2293. local Mode=Thing[2]
  2294. local Delay=Thing[3]
  2295. local IncX=Thing[4]
  2296. local IncY=Thing[5]
  2297. local IncZ=Thing[6]
  2298. if Thing[1].Transparency<=1 then
  2299. if Thing[2]=="Block1" then
  2300. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  2301. Mesh=Thing[1].Mesh
  2302. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  2303. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2304. elseif Thing[2]=="Cylinder" then
  2305. Mesh=Thing[1].Mesh
  2306. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  2307. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2308. elseif Thing[2]=="Blood" then
  2309. Mesh=Thing[1].Mesh
  2310. Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
  2311. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  2312. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2313. elseif Thing[2]=="Elec" then
  2314. Mesh=Thing[1].Mesh
  2315. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  2316. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2317. elseif Thing[2]=="Disappear" then
  2318. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  2319. end
  2320. else
  2321. Part.Parent=nil
  2322. table.remove(Effects,e)
  2323. end
  2324. end
  2325. --end
  2326. end
  2327. end
  2328. end
  2329. end
  2330. --[[
  2331. Copyrighted (C) Fenrier 2014
  2332. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement