StrawberryMemester

Roblox Binary Blade Script

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