cr8brooo

Untitled

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