Gmodmoney2

Random Script i found here

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