Advertisement
wowzers

mercenary (dabadedabada)

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