George148

Fenrier #1

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