xx_g

vanta

Mar 17th, 2017
541
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 56.25 KB | None | 0 0
  1. --New boss for Black Magic
  2. it=Instance.new
  3. vt=Vector3.new
  4. cf=CFrame.new
  5. euler=CFrame.fromEulerAnglesXYZ
  6. angles=CFrame.Angles
  7.  
  8. if workspace:findFirstChild("Vanta",true) ~= nil then
  9. workspace:findFirstChild("Vanta",true).Parent = nil
  10. end
  11.  
  12. function NoOutline(Part)
  13. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  14. end
  15.  
  16. function swait(num)
  17. if num==0 or num==nil then
  18. game:service'RunService'.RenderStepped:wait()
  19. else
  20. for i=0,num do
  21. game:service'RunService'.RenderStepped:wait()
  22. end
  23. end
  24. end
  25.  
  26. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  27. local fp=it("Part")
  28. fp.formFactor=formfactor
  29. fp.Parent=parent
  30. fp.Reflectance=reflectance
  31. fp.Transparency=transparency
  32. fp.CanCollide=false
  33. fp.Locked=true
  34. fp.BrickColor=brickcolor
  35. fp.Name=name
  36. fp.Size=size
  37. NoOutline(fp)
  38. fp.Material="Neon"
  39. fp:BreakJoints()
  40. return fp
  41. end
  42.  
  43. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  44. local mesh=it(Mesh)
  45. mesh.Parent=part
  46. if Mesh=="SpecialMesh" then
  47. mesh.MeshType=meshtype
  48. mesh.MeshId=meshid
  49. end
  50. mesh.Offset=offset
  51. mesh.Scale=scale
  52. return mesh
  53. end
  54.  
  55. function weld(parent,part0,part1,c0)
  56. local weld=it("Weld")
  57. weld.Parent=parent
  58. weld.Part0=part0
  59. weld.Part1=part1
  60. weld.C0=c0
  61. return weld
  62. end
  63.  
  64. local Character=Instance.new("Model")
  65. Character.Parent=workspace
  66. Character.Name="Vanta"
  67.  
  68. local Head=part(0,Character,0,1,BrickColor.new("Black"),"Head",vt(2,1,1))
  69. local Torso=part(0,Character,0,1,BrickColor.new("Black"),"Torso",vt(2,2,1))
  70. local LeftArm=part(0,Character,0,1,BrickColor.new("Black"),"Left Arm",vt(1,2,1))
  71. local RightArm=part(0,Character,0,1,BrickColor.new("Black"),"Right Arm",vt(1,2,1))
  72. local LeftLeg=part(0,Character,0,1,BrickColor.new("Black"),"Left Leg",vt(1,2,1))
  73. local RightLeg=part(0,Character,0,1,BrickColor.new("Black"),"Right Leg",vt(1,2,1))
  74. local RootPart=part(0,Character,0,1,BrickColor.new("White"),"HumanoidRootPart",vt(2,2,1))
  75. Head.CanCollide=true
  76. Torso.CanCollide=true
  77. LeftArm.CanCollide=true
  78. RightArm.CanCollide=true
  79. LeftLeg.CanCollide=true
  80. RightLeg.CanCollide=true
  81. RootPart.CanCollide=false
  82.  
  83. local HMesh=mesh("SpecialMesh",Head,"Head","",vt(0,0,0),vt(1.25,1.25,1.25))
  84.  
  85. --[[local Neck=weld(Torso,Torso,Head,cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0))
  86. Neck.C1=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)]]
  87. local Neck=weld(Torso,Torso,Head,cf(0,1,0))
  88. Neck.C1=cf(0,-0.5,0)
  89. local RW=weld(Torso,Torso,RightArm,cf(1.5,0.5,0))
  90. RW.C1=cf(0,0.5,0)
  91. local LW=weld(Torso,Torso,LeftArm,cf(-1.5,0.5,0))
  92. LW.C1=cf(0,0.5,0)
  93. local RH=weld(Torso,Torso,RightLeg,cf(0.5,-1,0))
  94. RH.C1=cf(0,1,0)
  95. local LH=weld(Torso,Torso,LeftLeg,cf(-0.5,-1,0))
  96. LH.C1=cf(0,1,0)
  97. local RootJoint=weld(Torso,Torso,RootPart,cf(0,0,0))
  98.  
  99. local Humanoid=Instance.new("Humanoid")
  100. Humanoid.Parent=Character
  101. Humanoid.MaxHealth=math.huge
  102. Humanoid.Health=math.huge
  103. coroutine.resume(coroutine.create(function()
  104. for i=1,20 do
  105. Humanoid.Health=Humanoid.MaxHealth
  106. end
  107. Humanoid:TakeDamage(1)
  108. end))
  109.  
  110. local MainPosition=workspace.Base.CFrame*cf(0,100,0)*euler(0,1.57,0)
  111. Torso.CFrame=MainPosition
  112. local Mode=Instance.new("IntValue")
  113. Mode.Parent=Character
  114. Mode.Value=2
  115. Mode.Name="ModeValue"
  116.  
  117. so = function(id,par,vol,pit)
  118. coroutine.resume(coroutine.create(function()
  119. local sou = Instance.new("Sound",par or workspace)
  120. sou.Volume=vol
  121. sou.Pitch=pit or 1
  122. sou.SoundId=id
  123. wait()
  124. sou:play()
  125. game:GetService("Debris"):AddItem(sou,6)
  126. end))
  127. end
  128.  
  129. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  130. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  131. prt.Anchored=true
  132. prt.CFrame=cframe
  133. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  134. game:GetService("Debris"):AddItem(prt,2)
  135. coroutine.resume(coroutine.create(function(Part,Mesh)
  136. for i=0,1,delay do
  137. wait()
  138. Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  139. Part.Transparency=i
  140. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  141. end
  142. Part.Parent=nil
  143. end),prt,msh)
  144. end
  145.  
  146. function MagicBlock2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  147. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  148. prt.Anchored=true
  149. prt.CFrame=cframe
  150. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  151. game:GetService("Debris"):AddItem(prt,2)
  152. coroutine.resume(coroutine.create(function(Part,Mesh)
  153. for i=0,1,delay do
  154. wait()
  155. Part.Transparency=i
  156. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  157. end
  158. Part.Parent=nil
  159. end),prt,msh)
  160. end
  161.  
  162. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  163. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  164. prt.Anchored=true
  165. prt.CFrame=cframe
  166. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  167. game:GetService("Debris"):AddItem(prt,2)
  168. coroutine.resume(coroutine.create(function(Part,Mesh)
  169. local wld=nil
  170. for i=0,1,delay do
  171. wait()
  172. Part.CFrame=Part.CFrame
  173. Part.Transparency=i
  174. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  175. end
  176. Part.Parent=nil
  177. end),prt,msh)
  178. end
  179.  
  180. function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  181. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  182. prt.Anchored=true
  183. prt.CFrame=cframe
  184. local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  185. game:GetService("Debris"):AddItem(prt,5)
  186. coroutine.resume(coroutine.create(function(Part,Mesh)
  187. for i=0,1,delay do
  188. wait()
  189. Part.CFrame=Part.CFrame
  190. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  191. local prt2=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  192. prt2.Anchored=true
  193. prt2.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  194. local msh2=mesh("SpecialMesh",prt2,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5))
  195. game:GetService("Debris"):AddItem(prt2,2)
  196. coroutine.resume(coroutine.create(function(Part,Mesh)
  197. for i=0,1,0.05 do
  198. wait()
  199. Part.CFrame=Part.CFrame*cf(0,0.5,0)
  200. end
  201. Part.Parent=nil
  202. end),prt2,msh2)
  203. end
  204. for i=0,1,delay do
  205. wait()
  206. Part.CFrame=Part.CFrame
  207. Part.Transparency=i
  208. Mesh.Scale=Mesh.Scale-vt(x3,y3,z3)
  209. end
  210. Part.Parent=nil
  211. end),prt,msh)
  212. end
  213.  
  214. function MagicCrystal(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  215. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  216. prt.Anchored=true
  217. prt.CFrame=cframe
  218. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=9756362",vt(0,0,0),vt(x1,y1,z1))
  219. game:GetService("Debris"):AddItem(prt,4)
  220. coroutine.resume(coroutine.create(function(Part,Mesh)
  221. local wld=nil
  222. for i=0,1,delay do
  223. wait()
  224. Part.CFrame=Part.CFrame
  225. Part.Transparency=i
  226. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  227. end
  228. Part.Parent=nil
  229. end),prt,msh)
  230. end
  231.  
  232. function MagicCylinder(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  233. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  234. prt.Anchored=true
  235. prt.CFrame=cframe
  236. msh=mesh("SpecialMesh",prt,"Head","",vt(0,0,0),vt(x1,y1,z1))
  237. game:GetService("Debris"):AddItem(prt,5)
  238. coroutine.resume(coroutine.create(function(Part,Mesh)
  239. for i=0,1,delay do
  240. wait()
  241. Part.CFrame=Part.CFrame
  242. Part.Transparency=i
  243. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  244. end
  245. Part.Parent=nil
  246. end),prt,msh)
  247. end
  248.  
  249. function MagicRing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  250. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  251. prt.Anchored=true
  252. prt.CFrame=cframe
  253. msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
  254. game:GetService("Debris"):AddItem(prt,5)
  255. coroutine.resume(coroutine.create(function(Part,Mesh)
  256. for i=0,1,delay do
  257. wait()
  258. Part.CFrame=Part.CFrame
  259. Part.Transparency=i
  260. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  261. end
  262. Part.Parent=nil
  263. end),prt,msh)
  264. end
  265.  
  266. function MagicWaveThing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  267. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  268. prt.Anchored=true
  269. prt.CFrame=cframe
  270. msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1051557",vt(0,0,0),vt(x1,y1,z1))
  271. game:GetService("Debris"):AddItem(prt,5)
  272. coroutine.resume(coroutine.create(function(Part,Mesh)
  273. for i=0,1,delay do
  274. wait()
  275. Part.CFrame=Part.CFrame*euler(0,0.7,0)
  276. Part.Transparency=i
  277. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  278. end
  279. Part.Parent=nil
  280. end),prt,msh)
  281. end
  282.  
  283. function WaveEffect2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  284. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  285. prt.Anchored=true
  286. prt.CFrame=cframe
  287. msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1323306",vt(0,0,0),vt(x1,y1,z1))
  288. game:GetService("Debris"):AddItem(prt,2)
  289. coroutine.resume(coroutine.create(function(Part,Mesh)
  290. for i=0,1,delay do
  291. wait()
  292. Part.CFrame=Part.CFrame
  293. Part.Transparency=i
  294. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  295. end
  296. Part.Parent=nil
  297. end),prt,msh)
  298. end
  299.  
  300. function SummonCrystals()
  301. local Cryst={}
  302. Part1=workspace.Base
  303. local numbah=0
  304. for i=1,4 do
  305. Crys=Instance.new("Model")
  306. Crys.Parent=workspace
  307. Crys.Name="Crystal"
  308.  
  309. CHead=part(0,Crys,0,0,BrickColor.new("Black"),"Head",vt(8,8,8))
  310. CTorso=part(0,Crys,0,1,BrickColor.new("Black"),"Torso",vt())
  311. CHMesh=mesh("SpecialMesh",CHead,"FileMesh","http://www.roblox.com/asset/?id=9756362",vt(0,0,0),vt(10,11,10))
  312. local Neck=weld(CTorso,CTorso,CHead,cf(0,0,0))
  313. Hum=Instance.new("Humanoid")
  314. Hum.Parent=Crys
  315. CTorso.CFrame=Part1.CFrame*cf(5,10,0)*euler(0,numbah,0)
  316. MagicCircle(BrickColor.new("Really black"),CHead.CFrame,50,50,50,1,12,1,0.05)
  317. wait(0)
  318. CTorso.Anchored=true
  319. coroutine.resume(coroutine.create(function(Model,CrysHum)
  320. while CrysHum.Health>0 do
  321. wait()
  322. end
  323. print("ded")
  324. Tors=Model.Torso
  325. Hed=Model.Head
  326. for i=0,1,0.1 do
  327. wait()
  328. Hed.Transparency=i
  329. end
  330. print("ez ded")
  331. Model.Parent=nil
  332. end),Crys,Hum)
  333. numbah=numbah+1.57
  334. wait(0.875)
  335. end
  336. coroutine.resume(coroutine.create(function(ModeVal)
  337. while ModeVal.Value==2 do
  338. wait()
  339. local dedcrystals=true
  340. model=workspace
  341. for _,c in pairs(model:children()) do
  342. if c.Name=="Crystal" then
  343. dedcrystals=false
  344. end
  345. end
  346. if dedcrystals==true then
  347. ModeVal.Value=3
  348. print("CRYSTALS ARE DED")
  349. end
  350. end
  351. print("goe keel vanta nao")
  352. end),Mode)
  353. end
  354.  
  355. local BodPos=Instance.new("BodyPosition")
  356. BodPos.P=500
  357. BodPos.D=100
  358. BodPos.Name="VantaPos"
  359. BodPos.maxForce=vt(math.huge,math.huge,math.huge)
  360. BodPos.position=workspace.Base.Position+vt(0,50,0)
  361. BodPos.Parent=RootPart
  362.  
  363. local BPRef=part(3,Character,0,0.5,BrickColor.new("Black"),"Reference",vt())
  364. BPRef.Anchored=true
  365. for i=0,1,0.1 do
  366. wait()
  367. end
  368.  
  369. BPRef.CFrame=Torso.CFrame
  370. BodPos.position=BPRef.Position
  371.  
  372. local BodGy=Instance.new("BodyGyro")
  373. BodGy.maxTorque=Vector3.new(4e+005,4e+005,4e+005)*math.huge
  374. BodGy.P=2000
  375. BodGy.D=100
  376. BodGy.Name="VantaGyro"
  377. CF=RootPart.CFrame
  378. BodGy.Parent=RootPart
  379. BodGy.cframe=CF
  380. --local music=workspace.PlayMusic
  381. local intro=true
  382. local DarkLegEffect=true
  383.  
  384. wait(1)
  385. if intro==true then
  386. wait(5)
  387. --music.Value=true
  388. coroutine.resume(coroutine.create(function(Leg1,Leg2)
  389. while DarkLegEffect==true do
  390. wait(0.1)
  391. MagicBlock(BrickColor.new("Really black"),Leg1.CFrame*cf(0,-1,0),5,5,5,0.5,0.5,0.5,0.1)
  392. MagicBlock(BrickColor.new("Really black"),Leg2.CFrame*cf(0,-1,0),5,5,5,0.5,0.5,0.5,0.1)
  393. end
  394. end),RightLeg,LeftLeg)
  395.  
  396. MagicCircle2(BrickColor.new("Black"),Torso.CFrame*euler(1.57,0,0),10,0.1,10,0.1,0,0.1,0.02)
  397. for _,c in pairs(Character:children()) do
  398. if c.className=="Part" and c.Name~="HumanoidRootPart" and c.Name~="Reference" then
  399. c.Transparency=1
  400. coroutine.resume(coroutine.create(function(Part)
  401. for i=1,0,-0.05 do
  402. wait()
  403. Part.Transparency=i
  404. end
  405. Part.Transparency=0
  406. end),c)
  407. end
  408. end
  409.  
  410. for i=0,1,0.01 do
  411. wait()
  412. RootJoint.C0=cf(0,0,0)*euler(1-0.8*i,0,0)
  413. RW.C0=cf(1.5,0.5,0)*euler(-0.5+0.2*i,0,1.57-1.37*i)
  414. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  415. LW.C0=cf(-1.5,0.5,0)*euler(-0.5+0.2*i,0,-1.57+1.37*i)
  416. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  417. RH.C0=cf(0.5,-1,0)*euler(-1+0.7*i,0,0.2)
  418. RH.C1=cf(0,1,0)
  419. LH.C0=cf(-0.5,-1,0)*euler(-1+0.7*i,0,-0.2)
  420. LH.C1=cf(0,1,0)
  421. BPRef.CFrame=BPRef.CFrame*cf(0,0,-0.1)
  422. BodPos.position=BPRef.Position
  423. end
  424. --wait(0.5)
  425. for i=0,1,0.02 do
  426. wait()
  427. Neck.C0=cf(0,1,0)*euler(0.2*i,0,0)
  428. RW.C0=cf(1.5,0.5,0)*euler(-0.3+1.5*i,0,0.2+0.2*i)
  429. LW.C0=cf(-1.5,0.5,0)*euler(-0.3+1.5*i,0,-0.2-0.2*i)
  430. end
  431. for i=0,1,0.1 do
  432. wait()
  433. RW.C0=cf(1.5-0.3*i,0.5,-0.5*i)*euler(1.2+0.37*i,0,0.4-1.57*i)
  434. LW.C0=cf(-1.5+0.3*i,0.5,-0.5*i)*euler(1.2+0.37*i,0,-0.4+1.57*i)
  435. end
  436. MagicCircle(BrickColor.new("Really black"),RootPart.CFrame,4,4,4,3,3,3,0.04)
  437.  
  438. Crystals={}
  439. numb=0
  440. for i=1,4 do
  441. local Cryst1=part(3,Character,0,0,BrickColor.new("Black"),"Crystal",vt())
  442. local CrystMsh=mesh("SpecialMesh",Cryst1,"FileMesh","http://www.roblox.com/asset/?id=9756362",vt(0,0,0),vt(1.5,2,1.5))
  443. Cryst1.Anchored=true
  444. Cryst1.CFrame=RootPart.CFrame*euler(0,numb,0)*cf(0,0,5)
  445. MagicCrystal(BrickColor.new("Really black"),Cryst1.CFrame,1,1,1,0.2,0.4,0.2,0.1)
  446. numb=numb+1.57
  447. table.insert(Crystals,Cryst1)
  448. end
  449. wait(0.5)
  450. for i=0,1,0.05 do
  451. wait()
  452. Neck.C0=cf(0,1,0)*euler(0.2-0.2*i,0,0)
  453. RW.C0=cf(1.2+0.3*i,0.5,-0.5+0.5*i)*euler(1.57-1.57*i,0,-1.17+1.27*i)
  454. LW.C0=cf(-1.2-0.3*i,0.5,-0.5+0.5*i)*euler(1.57-1.67*i,0,1.17-1.27*i)
  455. end
  456. for i=0,1,0.1 do
  457. wait()
  458. RW.C0=cf(1.5,0.5,0)*euler(3.2*i,0,0.1-0.1*i)
  459. LW.C0=cf(-1.5,0.5,0)*euler(-0.1+0.1*i,0,-0.1-0.3*i)
  460. end
  461. wait(0.5)
  462. for i=1,#Crystals do
  463. Crystals[i].Parent=nil
  464. MagicCircle(BrickColor.new("Really black"),Crystals[i].CFrame,10,10,10,0.5,8,0.5,0.1)
  465. wait(0.2)
  466. end
  467. for i=0,1,0.04 do
  468. wait()
  469. RW.C0=cf(1.5,0.5,0)*euler(3.2-3.2*i,0,0.1)
  470. LW.C0=cf(-1.5,0.5,0)*euler(0,0,-0.1-0.3+0.3*i)
  471. end
  472. wait(0.5)
  473. for i=0,1,0.05 do
  474. wait()
  475. RW.C0=cf(1.5,0.5,0)*euler(0,0,0.1+1.37*i)
  476. LW.C0=cf(-1.5,0.5,0)*euler(0,0,-0.1-1.37*i)
  477. end
  478. numb=2
  479. for i=0,1,0.1 do
  480. wait()
  481. RW.C0=cf(1.5,0.5,0)*euler(0,0,1.47+0.1*i*numb)
  482. LW.C0=cf(-1.5,0.5,0)*euler(0,0,-1.47-0.1*i*numb)
  483. numb=numb-0.1
  484. end
  485. RW.C0=cf(1.5,0.5,0)*euler(0,0,1.57)
  486. LW.C0=cf(-1.5,0.5,0)*euler(0,0,-1.57)
  487. SummonCrystals()
  488. --wait(3.5)
  489. for i=0,1,0.1 do
  490. wait()
  491. RW.C0=cf(1.5,0.5,0)*euler(0.1*i,0,1.57-1.47*i)
  492. LW.C0=cf(-1.5,0.5,0)*euler(0.1*i,0,-1.57+1.47*i)
  493. end
  494. for i=0,1,0.1 do
  495. wait()
  496. RootJoint.C0=cf(0,0,0)*euler(0.2-0.1*i,0,0)
  497. RW.C0=cf(1.5-0.5*i,0.5,-0.5*i)*euler(0.1+1.37*i,0,0.1-1.37*i)
  498. LW.C0=cf(-1.5+0.5*i,0.5,-0.5*i)*euler(0.1+1.07*i,0,-0.1+1.17*i)
  499. end
  500. n=2
  501. for i=0,1,0.1 do
  502. wait()
  503. Neck.C0=cf(0,1,0)*euler(-0.2*i*n,0,0)
  504. RootJoint.C0=cf(0,0,0)*euler(0.1-0.1*i*n,0,0)
  505. RW.C0=cf(1,0.5,-0.5)*euler(1.47+0.1*i*n,0,-1.27-0.1*i*n)
  506. LW.C0=cf(-1,0.5,-0.5)*euler(1.17+0.1*i*n,0,1.07+0.1*i*n)
  507. n=n-0.1
  508. end
  509. --[[local Shield1=part(3,Character,0,1,BrickColor.new("Dark stone grey"),"Shield1",vt())
  510. local Smsh1=mesh("SpecialMesh",Shield1,"FileMesh","http://www.roblox.com/asset/?id=90782182",vt(0,0,0),vt(0.4,0.5,0.4))
  511. Smsh1.TextureId="http://www.roblox.com/asset/?id=90782359"
  512. Smsh1.VertexColor=vt(0.5,0.5,0.5)
  513. local swld1=weld(Torso,Torso,Shield1,cf(0,1.45,0))
  514. local Shield2=part(3,Character,0,1,BrickColor.new("Dark stone grey"),"Shield2",vt())
  515. local Smsh2=mesh("SpecialMesh",Shield2,"FileMesh","http://www.roblox.com/asset/?id=90782182",vt(0,0,0),vt(0.4,0.5,0.4))
  516. Smsh2.TextureId="http://www.roblox.com/asset/?id=90782359"
  517. Smsh2.VertexColor=vt(0.5,0.5,0.5)
  518. local swld1=weld(Torso,Torso,Shield2,cf(0,-1.45,0)*euler(3.14,0,0))
  519. coroutine.resume(coroutine.create(function(Part1,Mesh1,Part2,Mesh2)
  520. for i=1,0.5,-0.02 do
  521. wait()
  522. Part1.Transparency=i
  523. Part2.Transparency=i
  524. end
  525. wait(1)
  526. for i=0.5,1,0.01 do
  527. wait()
  528. Part1.Transparency=i
  529. Part2.Transparency=i
  530. end
  531. end),Shield1,Smsh1,Shield2,Smsh2)]]
  532. wait(1)
  533. n=2
  534. num=1
  535. for i=0,1,0.02 do
  536. wait()
  537. RW.C0=cf(1+0.5*i*n,0.5,-0.5+0.5*i*n)*euler(1.57-1.57*i*n,0,-1.37+1.57*i*n)
  538. LW.C0=cf(-1-0.5*i*n,0.5,-0.5+0.5*i*n)*euler(1.27-1.27*i*n,0,1.17-1.37*i*n)
  539. n=n-0.02
  540. end
  541. wait(5)
  542. else
  543. print("NOE INTRO")
  544. --music.Value=true
  545. coroutine.resume(coroutine.create(function(Leg1,Leg2)
  546. while DarkLegEffect==true do
  547. wait(0.1)
  548. MagicBlock(BrickColor.new("Really black"),Leg1.CFrame*cf(0,-1,0),5,5,5,0.5,0.5,0.5,0.1)
  549. MagicBlock(BrickColor.new("Really black"),Leg2.CFrame*cf(0,-1,0),5,5,5,0.5,0.5,0.5,0.1)
  550. end
  551. end),RightLeg,LeftLeg)
  552.  
  553. for _,c in pairs(Character:children()) do
  554. if c.className=="Part" and c.Name~="HumanoidRootPart" and c.Name~="Reference" then
  555. c.Transparency=0
  556. end
  557. end
  558. Neck.C0=cf(0,1,0)*euler(-0.2,0,0)
  559. RootJoint.C0=cf(0,0,0)*euler(0,0,0)
  560. RW.C0=cf(1.5,0.5,0)*euler(0,0,0.2)
  561. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  562. LW.C0=cf(-1.5,0.5,0)*euler(0,0,-0.2)
  563. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  564. RH.C0=cf(0.5,-1,0)*euler(-0.3,0,0.2)
  565. RH.C1=cf(0,1,0)
  566. LH.C0=cf(-0.5,-1,0)*euler(-0.3,0,-0.2)
  567. LH.C1=cf(0,1,0)
  568. wait(1)
  569. end
  570. print("START BOSS BATTLE")
  571.  
  572. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  573. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  574. end
  575.  
  576. function findNearestTorso(pos)
  577. local list = game.Workspace:children()
  578. local torso = nil
  579. local dist = 1000
  580. local temp = nil
  581. local human = nil
  582. local temp2 = nil
  583. for x = 1, #list do
  584. temp2 = list[x]
  585. if (temp2.className == "Model") and (temp2.Name~="Vanta") and temp2.Name~="Crystal" then
  586. temp = temp2:findFirstChild("Torso")
  587. human = temp2:findFirstChild("Humanoid")
  588. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  589. if (temp.Position - pos).magnitude < dist then
  590. torso = temp
  591. dist = (temp.Position - pos).magnitude
  592. end
  593. end
  594. end
  595. end
  596. return torso,dist
  597. end
  598.  
  599. function findRandomTorso(pos)
  600. local list = game.Workspace:children()
  601. local torso = nil
  602. local dist = 1000
  603. local temp = nil
  604. local human = nil
  605. local temp2 = nil
  606. local list2 = {}
  607. for x = 1, #list do
  608. temp2 = list[x]
  609. if (temp2.className == "Model") and (temp2.Name~="Vanta") and temp2.Name~="Crystal" then
  610. temp = temp2:findFirstChild("Torso")
  611. human = temp2:findFirstChild("Humanoid")
  612. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  613. if pos.magnitude < dist then
  614. torso = temp
  615. table.insert(list2,temp)
  616. end
  617. end
  618. end
  619. end
  620. if #list2>0 then
  621. rand=math.random(1,#list2)
  622. return list2[rand],dist
  623. else
  624. return nil,dist
  625. end
  626. end
  627.  
  628. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay)
  629. if hit.Parent==nil then
  630. return
  631. end
  632. CPlayer=Bin
  633. h=hit.Parent:FindFirstChild("Humanoid")
  634. for _,v in pairs(hit.Parent:children()) do
  635. if v:IsA("Humanoid") then
  636. h=v
  637. end
  638. end
  639. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent.Name~="Crystal" and hit.Parent:FindFirstChild("Torso")~=nil then
  640. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  641. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  642. return
  643. end]]
  644. -- hs(hit,1.2)
  645. c=Instance.new("ObjectValue")
  646. c.Name="creator"
  647. c.Value=game:service("Players").LocalPlayer
  648. c.Parent=h
  649. game:GetService("Debris"):AddItem(c,.5)
  650. Damage=math.random(minim,maxim)
  651. -- h:TakeDamage(Damage)
  652. blocked=false
  653. block=hit.Parent:findFirstChild("Block")
  654. if block~=nil then
  655. if block.className=="IntValue" then
  656. if block.Value>0 then
  657. blocked=true
  658. block.Value=block.Value-1
  659. end
  660. end
  661. end
  662. if blocked==false then
  663. -- h:TakeDamage(Damage)
  664. h.Health=h.Health-Damage
  665. showDamage(hit.Parent,Damage,.5,BrickColor:Red())
  666. else
  667. h.Health=h.Health-(Damage/2)
  668. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
  669. end
  670. if Type=="Knockdown" then
  671. hum=hit.Parent.Humanoid
  672. hum.PlatformStand=true
  673. coroutine.resume(coroutine.create(function(HHumanoid)
  674. wait(1)
  675. HHumanoid.PlatformStand=false
  676. end),hum)
  677. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  678. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  679. local bodvol=Instance.new("BodyVelocity")
  680. bodvol.velocity=angle*knockback
  681. bodvol.P=5000
  682. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  683. bodvol.Parent=hit
  684. rl=Instance.new("BodyAngularVelocity")
  685. rl.P=3000
  686. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  687. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  688. rl.Parent=hit
  689. game:GetService("Debris"):AddItem(bodvol,.5)
  690. game:GetService("Debris"):AddItem(rl,.5)
  691. elseif Type=="Normal" then
  692. vp=Instance.new("BodyVelocity")
  693. vp.P=500
  694. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  695. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  696. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  697. if knockback>0 then
  698. vp.Parent=hit.Parent.Torso
  699. end
  700. game:GetService("Debris"):AddItem(vp,.5)
  701. elseif Type=="Up" then
  702. local bodyVelocity=Instance.new("BodyVelocity")
  703. bodyVelocity.velocity=vt(0,20,0)
  704. bodyVelocity.P=5000
  705. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  706. bodyVelocity.Parent=hit
  707. game:GetService("Debris"):AddItem(bodyVelocity,.5)
  708. elseif Type=="Snare" then
  709. bp=Instance.new("BodyPosition")
  710. bp.P=2000
  711. bp.D=100
  712. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  713. bp.position=hit.Parent.Torso.Position
  714. bp.Parent=hit.Parent.Torso
  715. game:GetService("Debris"):AddItem(bp,1)
  716. elseif Type=="Freeze" then
  717. BodPos2=Instance.new("BodyPosition")
  718. BodPos2.P=50000
  719. BodPos2.D=1000
  720. BodPos2.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  721. BodPos2.position=hit.Parent.Torso.Position
  722. BodPos2.Parent=hit.Parent.Torso
  723. BodGy2 = it("BodyGyro")
  724. BodGy2.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  725. BodGy2.P = 20e+003
  726. BodGy2.Parent=hit.Parent.Torso
  727. BodGy2.cframe = hit.Parent.Torso.CFrame
  728. hit.Parent.Torso.Anchored=true
  729. coroutine.resume(coroutine.create(function(Part)
  730. wait(1.5)
  731. Part.Anchored=false
  732. end),hit.Parent.Torso)
  733. game:GetService("Debris"):AddItem(BodPos2,3)
  734. game:GetService("Debris"):AddItem(BodGy2,3)
  735. end
  736. debounce=Instance.new("BoolValue")
  737. debounce.Name="DebounceHit"
  738. debounce.Parent=hit.Parent
  739. debounce.Value=true
  740. game:GetService("Debris"):AddItem(debounce,Delay)
  741. c=Instance.new("ObjectValue")
  742. c.Name="creator"
  743. c.Value=Player
  744. c.Parent=h
  745. game:GetService("Debris"):AddItem(c,.5)
  746. CRIT=false
  747. hitDeb=true
  748. AttackPos=6
  749. end
  750. end
  751.  
  752. showDamage=function(Char,Dealt,du,Color)
  753. m=Instance.new("Model")
  754. m.Name=tostring(Dealt)
  755. h=Instance.new("Humanoid")
  756. h.Health=0
  757. h.MaxHealth=0
  758. h.Parent=m
  759. c=Instance.new("Part")
  760. c.Transparency=0
  761. c.BrickColor=Color
  762. c.Name="Head"
  763. c.TopSurface=0
  764. c.BottomSurface=0
  765. c.formFactor="Plate"
  766. c.Size=Vector3.new(1,.4,1)
  767. ms=Instance.new("CylinderMesh")
  768. ms.Scale=Vector3.new(.8,.8,.8)
  769. if CRIT==true then
  770. ms.Scale=Vector3.new(1,1.25,1)
  771. end
  772. ms.Parent=c
  773. c.Reflectance=0
  774. Instance.new("BodyGyro").Parent=c
  775. c.Parent=m
  776. if Char:findFirstChild("Head")~=nil then
  777. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  778. else
  779. c.CFrame=CFrame.new(Char["Torso"].CFrame.p+Vector3.new(0,1.5,0))
  780. end
  781. f=Instance.new("BodyPosition")
  782. f.P=2000
  783. f.D=100
  784. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  785. f.position=c.Position+Vector3.new(0,3,0)
  786. f.Parent=c
  787. game:GetService("Debris"):AddItem(m,.5+du)
  788. c.CanCollide=false
  789. m.Parent=workspace
  790. c.CanCollide=false
  791. end
  792.  
  793. function MagniDamage(Part,magni,mindam,maxdam,knock,Type,base)
  794. for _,c in pairs(workspace:children()) do
  795. local hum=c:findFirstChild("Humanoid")
  796. if hum~=nil then
  797. local head=c:findFirstChild("Torso")
  798. if head~=nil then
  799. local targ=head.Position-Part.Position
  800. local mag=targ.magnitude
  801. if mag<=magni and c.Name~=Character.Name then
  802. Damagefunc(head,mindam,maxdam,knock,Type,base,0)
  803. end
  804. end
  805. end
  806. end
  807. end
  808.  
  809.  
  810. local HealtVal=Instance.new("IntValue")
  811. HealtVal.Name="Max Health Value"
  812. HealtVal.Parent=Character
  813. HealtVal.Value=5000
  814. local HealtVal2=Instance.new("IntValue")
  815. HealtVal2.Name="Current Health Value"
  816. HealtVal2.Parent=Character
  817. HealtVal2.Value=5000
  818. local HealthNum=Instance.new("IntValue")
  819. HealthNum.Name="Divis Numb"
  820. HealthNum.Parent=Character
  821. HealthNum.Value=HealtVal2.Value/3
  822. local HealthNumber=1666
  823. Anim=Instance.new("StringValue")
  824. Anim.Name="Animation"
  825. Anim.Parent=Character
  826. Anim.Value="Walking"
  827. mode=Mode
  828. local target,distance=nil,nil
  829. local attacking=false
  830. while Humanoid.Health>0 do
  831. wait()
  832. while mode.Value==2 do
  833. RH.C0=cf(0.5,-1,0)*euler(-0.3,0,0.2)
  834. RH.C1=cf(0,1,0)
  835. LH.C0=cf(-0.5,-1,0)*euler(-0.3,0,-0.2)
  836. LH.C1=cf(0,1,0)
  837. BodPos.maxForce=vt(math.huge,math.huge,math.huge)
  838. local move=1
  839. if math.random(1,2)==1 then
  840. move=1
  841. target,distance=findRandomTorso(Torso.Position)
  842. else
  843. move=2
  844. target,distance=findNearestTorso(Torso.Position)
  845. end
  846. if target~=nil then
  847. if math.random(1,5)==1 then
  848. MagicBlock(BrickColor.new("Really black"),Torso.CFrame,15,15,15,6,6,6,0.1)
  849. local pos=cf(math.random(-10,10),math.random(50,70),math.random(-10,10))
  850. BPRef.CFrame=cf(target.Position)*pos
  851. Torso.CFrame=BPRef.CFrame
  852. BodPos.position=BPRef.Position
  853. MagicBlock(BrickColor.new("Really black"),Torso.CFrame,15,15,15,6,6,6,0.1)
  854. end
  855. BodGy.cframe=CF*euler(0,math.random(-50,50),0)
  856. local pos=cf(math.random(-10,10),math.random(50,70),math.random(-10,10))
  857. --BPRef.CFrame=cf(target.Position)*pos
  858. --BodPos.position=BPRef.Position
  859. attack=math.random(1,3)
  860. attacking=true
  861. if attack==1 then --Dark Rain
  862. coroutine.resume(coroutine.create(function()
  863. while attacking==true do
  864. wait()
  865. BPRef.CFrame=cf(target.Position)*pos
  866. BodPos.position=BPRef.Position
  867. end
  868. end))
  869. n=2
  870. for i=0,1,0.1 do
  871. wait()
  872. Neck.C0=cf(0,1,0)*euler(-0.2+0.6*i*n,0,0)
  873. RW.C0=cf(1.5,0.5,0)*euler(3.14*i*n,0,0.2-0.2*i*n)
  874. LW.C0=cf(-1.5,0.5,0)*euler(0,0,-0.2-0.2*i*n)
  875. n=n-0.1
  876. end
  877. for i=1,math.random(10,20) do
  878. local orb=part(3,Character,0,1,BrickColor.new("Really black"),"Orb",vt())
  879. so("http://roblox.com/asset/?id=183763498",orb,1,1.2)
  880. local omsh=mesh("SpecialMesh",orb,"Sphere","",vt(0,0,0),vt(10,10,10))
  881. local owld=weld(orb,orb,Torso,cf(0,-5,0))
  882. MagicCircle(BrickColor.new("Really black"),orb.CFrame,10,10,10,1,1,1,0.1)
  883. coroutine.resume(coroutine.create(function(Part,Mesh,Weld)
  884. local ceef1=math.random(-50,50)
  885. local ceef2=math.random(-2,8)
  886. local ceef3=math.random(100,200)/100
  887. local n=2
  888. for i=0,1,0.1 do
  889. wait()
  890. Part.Transparency=Part.Transparency-0.07
  891. owld.C0=cf(ceef2*i*n,-5,0)*euler(ceef3*i*n,ceef1,0)
  892. n=n-0.1
  893. end
  894. wait(1)
  895. Part.Parent=nil
  896. local spread=vt((math.random(-1,0)+math.random())*16,(math.random(-1,0)+math.random())*16,(math.random(-1,0)+math.random())*16)*(Part.Position-(Part.Position+vt(0,-1,0))).magnitude/100
  897. local TheHit=Part.Position+vt(0,-1,0)
  898. local MouseLook=cf((Part.Position+TheHit)/2,TheHit+spread)
  899. local hit,pos = rayCast(Part.Position,MouseLook.lookVector,999,Character)
  900. local mag=(Part.Position-pos).magnitude
  901. MagicCylinder(BrickColor.new("Really black"),CFrame.new((Part.Position+pos)/2,pos)*angles(1.57,0,0) ,1,mag*5,1,0.5,0,0.5,0.05)
  902. MagicBlock(BrickColor.new("Really black"),Part.CFrame,8,8,8,0.5,0.5,0.5,0.1)
  903. MagicBlock(BrickColor.new("Really black"),cf(pos),15,15,15,6,6,6,0.1)
  904. MagicRing(BrickColor.new("Really black"),cf(pos)*euler(1.57,math.random(-100,100)/100,math.random(-100,100)/100),1,1,1,2,2,2,0.05)
  905. local ref=part(3,workspace,0,1,BrickColor.new("Really black"),"Effect",vt())
  906. ref.CFrame=cf(pos)
  907. so("http://roblox.com/asset/?id=183763487",ref,1,1)
  908. coroutine.resume(coroutine.create(function(Part)
  909. wait(1)
  910. Part.Parent=nil
  911. end),ref)
  912. MagniDamage(ref,15,5,10,0,"Normal",RootPart)
  913. if hit~=nil then
  914. Damagefunc(hit,20,40,1,"Knockdown",RootPart,0)
  915. end
  916. end),orb,omsh,owld)
  917. wait(0.2)
  918. end
  919. n=2
  920. for i=0,1,0.1 do
  921. wait()
  922. Neck.C0=cf(0,1,0)*euler(0.4-0.6*i*n,0,0)
  923. RW.C0=cf(1.5,0.5,0)*euler(3.14-3.14*i*n,0,0.2*i*n)
  924. LW.C0=cf(-1.5,0.5,0)*euler(0,0,-0.4+0.2*i*n)
  925. n=n-0.1
  926. end
  927. attacking=false
  928. wait(2)
  929. elseif attack==2 then --Nocturne
  930. coroutine.resume(coroutine.create(function()
  931. while attacking==true do
  932. wait()
  933. Pos=target.Position
  934. BodGy.cframe=cf(Torso.Position,Pos)
  935. end
  936. end))
  937. n=2
  938. for i=0,1,0.1 do
  939. wait()
  940. Neck.C0=cf(0,1,0)*euler(-0.2+0.2*i*n,0,0)
  941. RW.C0=cf(1.5,0.5,0)*euler(1.57*i*n,0,0.2-0.6*i*n)
  942. LW.C0=cf(-1.5,0.5,0)*euler(1.57*i*n,0,-0.2+0.6*i*n)
  943. n=n-0.1
  944. end
  945. local orb=part(3,Character,0,1,BrickColor.new("Really black"),"Orb",vt())
  946. local omsh=mesh("SpecialMesh",orb,"Sphere","",vt(0,0,0),vt(10,10,10))
  947. local owld=weld(orb,orb,Torso,cf(0,-0.5,3))
  948. so("http://roblox.com/asset/?id=137463716",orb,1,0.6)
  949. for i=1,0.3,-0.01 do
  950. wait()
  951. orb.Transparency=i
  952. omsh.Scale=omsh.Scale+vt(0.2,0.2,0.2)
  953. MagicBlock(BrickColor.new("Really black"),orb.CFrame,8,8,8,0.5,0.5,0.5,0.1)
  954. local ef=part(3,workspace,0,0,BrickColor.new("Really black"),"Effect",vt())
  955. ef.Anchored=true
  956. local emsh=mesh("SpecialMesh",ef,"Sphere","",vt(0,0,0),vt(2,math.random(1000,1500)/100,2))
  957. local ceef=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cf(0,math.random(5,10),0)
  958. ef.CFrame=orb.CFrame*ceef
  959. game:GetService("Debris"):AddItem(ef,2)
  960. coroutine.resume(coroutine.create(function(Part,Mesh)
  961. for i=0,1,0.1 do
  962. wait()
  963. Part.Transparency=i
  964. Part.CFrame=Part.CFrame*cf(0,-1,0)
  965. end
  966. Part.Parent=nil
  967. end),ef,emsh)
  968. end
  969. attacking=false
  970. wait(1)
  971. orb.Parent=nil
  972. local hit,pos = rayCast(orb.Position,Head.CFrame.lookVector,999,Character)
  973. print(hit)
  974. local mag=(orb.Position-pos).magnitude
  975. MagicCircle(BrickColor.new("Really black"),cf(pos),15,15,15,8,8,8,0.02)
  976. MagicBlock(BrickColor.new("Really black"),cf(pos),15,15,15,8,8,8,0.02)
  977. MagicCylinder(BrickColor.new("Really black"),CFrame.new((orb.Position+pos)/2,pos)*euler(1.57,0,0),10,mag*5,10,0.5,0,0.5,0.01)
  978. for i=1,2 do
  979. MagicRing(BrickColor.new("Really black"),cf(pos)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),3,3,3,1,1,1,0.04)
  980. end
  981. for i=1,5 do
  982. tehcf=CFrame.new((orb.Position+pos)/2,pos)*euler(1.57,0,0)*cf(0,(mag/5)*(i/2),0)
  983. MagicRing(BrickColor.new("Really black"),tehcf*euler(1.57,0,0),1,1,1,0.5,0.5,0.5,0.01)
  984. end
  985. for i=0,5 do
  986. tehcf=CFrame.new((orb.Position+pos)/2,pos)*euler(1.57,0,0)*cf(0,(-mag/5)*(i/2),0)
  987. MagicRing(BrickColor.new("Really black"),tehcf*euler(1.57,0,0),1,1,1,0.5,0.5,0.5,0.01)
  988. end
  989. local ref=part(3,workspace,0,1,BrickColor.new("Really black"),"Effect",vt())
  990. ref.CFrame=cf(pos)
  991. so("http://roblox.com/asset/?id=183763506",Torso,1,0.6)
  992. so("http://roblox.com/asset/?id=178452221",Torso,1,0.6)
  993. so("http://www.roblox.com/Asset?ID=87767777",Torso,1,1)
  994. so("http://roblox.com/asset/?id=183763506",ref,1,0.6)
  995. so("http://roblox.com/asset/?id=178452221",ref,1,0.6)
  996. so("http://www.roblox.com/Asset?ID=87767777",ref,1,1)
  997. coroutine.resume(coroutine.create(function(Part)
  998. wait(1)
  999. Part.Parent=nil
  1000. end),ref)
  1001. MagniDamage(ref,20,10,30,40,"Knockdown",ref)
  1002. if hit~=nil then
  1003. Damagefunc(hit,30,70,50,"Knockdown",RootPart,0)
  1004. end
  1005. wait(1)
  1006. n=2
  1007. for i=0,1,0.1 do
  1008. wait()
  1009. Neck.C0=cf(0,1,0)*euler(-0.2*i*n,0,0)
  1010. RW.C0=cf(1.5,0.5,0)*euler(1.57-1.57*i*n,0,0.2-0.6+0.6*i*n)
  1011. LW.C0=cf(-1.5,0.5,0)*euler(1.57-1.57*i*n,0,-0.2+0.6-0.6*i*n)
  1012. n=n-0.1
  1013. end
  1014. elseif attack==3 then --Terror blast
  1015. n=2
  1016. for i=0,1,0.1 do
  1017. wait()
  1018. Neck.C0=cf(0,1,0)*euler(-0.2-0.2*i*n,0,0)
  1019. RW.C0=cf(1.5-0.5*i*n,0.5,-0.5*i*n)*euler(1.4*i*n,0,0.2-1.4*i*n)
  1020. LW.C0=cf(-1.5+0.5*i*n,0.5,-0.5*i*n)*euler(1.6*i*n,0,-0.2+1.6*i*n)
  1021. n=n-0.1
  1022. end
  1023. so("http://roblox.com/asset/?id=160772554",Torso,1,0.6)
  1024. so("http://roblox.com/asset/?id=161006069",Torso,1,0.6)
  1025. local charging=true
  1026. for _,c in pairs(workspace:children()) do
  1027. if c.className=="Model" then
  1028. if c:findFirstChild("Torso")~=nil and c:findFirstChild("Humanoid")~=nil and c.Name~="Vanta" then
  1029. print(c)
  1030. local Tors=c:findFirstChild("Torso")
  1031. coroutine.resume(coroutine.create(function(Part)
  1032. local ef=part(3,Character,0,0.5,BrickColor.new("Really black"),"Laser",vt(0.2,0.2,0.2))
  1033. ef.Anchored=true
  1034. local emsh=mesh("SpecialMesh",ef,"Head","",vt(0,0,0),vt(1,1,1))
  1035. game:GetService("Debris"):AddItem(ef,5)
  1036. while charging==true do
  1037. wait()
  1038. local TheHit=Part.Position
  1039. local MouseLook=cf((Torso.Position+TheHit)/2,TheHit)
  1040. local hit,pos = rayCast(Torso.Position,MouseLook.lookVector,999,Character)
  1041. local mag=(Torso.Position-pos).magnitude
  1042. ef.CFrame=CFrame.new((Torso.Position+pos)/2,pos)*euler(1.57,0,0)
  1043. emsh.Scale=vt(1,mag*5,1)
  1044. end
  1045. ef.Parent=nil
  1046. local TheHit=Part.Position
  1047. local MouseLook=cf((Torso.Position+TheHit)/2,TheHit)
  1048. wait()
  1049. local hit,pos = rayCast(Torso.Position,MouseLook.lookVector,999,Character)
  1050. local mag=(Torso.Position-pos).magnitude
  1051. if hit~=nil then
  1052. Damagefunc(hit,20,40,50,"Knockdown",RootPart,0)
  1053. MagicCircle(BrickColor.new("Really black"),cf(pos),5,5,5,6,6,6,0.02)
  1054. MagicBlock(BrickColor.new("Really black"),cf(pos),5,5,5,7,7,7,0.02)
  1055. MagicCylinder(BrickColor.new("Really black"),CFrame.new((Torso.Position+pos)/2,pos)*euler(1.57,0,0),5,mag*5,5,0.5,0,0.5,0.01)
  1056. so("http://roblox.com/asset/?id=183763515",hit,1,1)
  1057. so("http://roblox.com/asset/?id=183763512",hit,1,1)
  1058. end
  1059. end),Tors)
  1060. end
  1061. end
  1062. end
  1063. wait(1)
  1064. n=2
  1065. for i=0,1,0.2 do
  1066. wait()
  1067. Neck.C0=cf(0,1,0)*euler(-0.4+0.2*i*n,0,0)
  1068. RW.C0=cf(1+0.5*i*n,0.5,-0.5+0.5*i*n)*euler(1.4+0.17*i*n,0,-1.2+2.77*i*n)
  1069. LW.C0=cf(-1-0.5*i*n,0.5,-0.5+0.5*i*n)*euler(1.6-0.03*i*n,0,1.4-2.97*i*n)
  1070. n=n-0.2
  1071. end
  1072. charging=false
  1073. wait(1)
  1074. n=2
  1075. for i=0,1,0.1 do
  1076. wait()
  1077. Neck.C0=cf(0,1,0)*euler(-0.2,0,0)
  1078. RW.C0=cf(1.5,0.5,0)*euler(1.57-1.57*i*n,0,1.57-1.37*i*n)
  1079. LW.C0=cf(-1.5,0.5,0)*euler(1.57-1.57*i*n,0,-1.57+1.37*i*n)
  1080. n=n-0.1
  1081. end
  1082. wait(2)
  1083. end
  1084. attacking=false
  1085. else
  1086. print("CAN'T FIND TARGET")
  1087. end
  1088. wait(1)
  1089. end
  1090. Humanoid.MaxHealth=HealtVal.Value
  1091. Humanoid.Health=HealtVal2.Value
  1092. coroutine.resume(coroutine.create(function()
  1093. for i=1,20 do
  1094. Humanoid.Health=HealtVal2.Value
  1095. end
  1096. Humanoid:TakeDamage(1)
  1097. end))
  1098.  
  1099. MagicBlock(BrickColor.new("Really black"),Torso.CFrame,15,15,15,6,6,6,0.1)
  1100. BPRef.CFrame=MainPosition
  1101. Torso.CFrame=BPRef.CFrame
  1102. BodPos.position=BPRef.Position
  1103. MagicBlock(BrickColor.new("Really black"),Torso.CFrame,15,15,15,6,6,6,0.1)
  1104. BodGy.cframe=CF
  1105. wait(0.5)
  1106. n=2
  1107. for i=0,1,0.05 do
  1108. wait()
  1109. BPRef.CFrame=MainPosition*cf(0,-60*i,0)
  1110. BodPos.position=BPRef.Position
  1111. Neck.C0=cf(0,1,0)*euler(-0.2-0.2*i*n,0,0)
  1112. RW.C0=cf(1.5-0.5*i*n,0.5,-0.5*i*n)*euler(1.4*i*n,0,0.2-1.4*i*n)
  1113. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  1114. LW.C0=cf(-1.5+0.5*i*n,0.5,-0.5*i*n)*euler(1.6*i*n,0,-0.2+1.6*i*n)
  1115. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  1116. RH.C0=cf(0.5,-1,0)*euler(-0.3+0.3*i*n,0,0.2)
  1117. RH.C1=cf(0,1,0)
  1118. LH.C0=cf(-0.5,-1,0)*euler(-0.3+0.3*i*n,0,-0.2)
  1119. LH.C1=cf(0,1,0)
  1120. n=n-0.05
  1121. end
  1122. wait(1)
  1123. DarkLegEffect=false
  1124. local Head2=part(0,Character,0,1,BrickColor.new("Really black"),"Shade Head",vt(10,5,5))
  1125. local Torso2=part(0,Character,0,1,BrickColor.new("Really black"),"Shade Torso",vt(10,10,5))
  1126. local LeftArm2=part(0,Character,0,1,BrickColor.new("Really black"),"Shade Left Arm",vt(5,10,5))
  1127. local RightArm2=part(0,Character,0,1,BrickColor.new("Really black"),"Shade Right Arm",vt(5,10,5))
  1128. local LeftLeg2=part(0,Character,0,1,BrickColor.new("Really black"),"Shade Left Leg",vt(5,10,5))
  1129. local RightLeg2=part(0,Character,0,1,BrickColor.new("Really black"),"Shade Right Leg",vt(5,10,5))
  1130. Head2.CFrame=Head.CFrame
  1131. Torso2.CFrame=Head.CFrame
  1132. LeftArm2.CFrame=Head.CFrame
  1133. RightArm2.CFrame=Head.CFrame
  1134. LeftLeg2.CFrame=Head.CFrame
  1135. RightLeg2.CFrame=Head.CFrame
  1136.  
  1137. local HMesh2=mesh("SpecialMesh",Head2,"Head","",vt(0,0,0),vt(1.25,1.25,1.25))
  1138.  
  1139. local Neck2=weld(Torso2,Torso2,Head2,cf(0,5,0))
  1140. Neck2.C1=cf(0,-2.5,0)
  1141. local RW2=weld(Torso2,Torso2,RightArm2,cf(7.5,2.5,0))
  1142. RW2.C1=cf(0,2.5,0)
  1143. local LW2=weld(Torso2,Torso2,LeftArm2,cf(-7.5,2.5,0))
  1144. LW2.C1=cf(0,2.5,0)
  1145. local RH2=weld(Torso2,Torso2,RightLeg2,cf(2.5,-5,0))
  1146. RH2.C1=cf(0,5,0)
  1147. local LH2=weld(Torso2,Torso2,LeftLeg2,cf(-2.5,-5,0))
  1148. LH2.C1=cf(0,5,0)
  1149. local RootJoint2=weld(Torso2,Torso2,Torso,cf(0,2.5,0))
  1150. local DarkBody=true
  1151. local cf1=0
  1152. local cf2=4
  1153. local cf3=0
  1154. local cf4=6
  1155. local cf5=2
  1156. local cf6=0
  1157. local cf7=-6
  1158. local cf8=2
  1159. local cf9=0
  1160. local cf10=2
  1161. local cf11=-4
  1162. local cf12=0
  1163. local cf13=-2
  1164. local cf14=-4
  1165. local cf15=0
  1166. coroutine.resume(coroutine.create(function()
  1167. --Destroy all CC, Dark body assume angles of normal body
  1168. while DarkBody==true do
  1169. wait()
  1170. for _,c in pairs(Character:children()) do
  1171. for _,v in pairs(c:children()) do
  1172. if v.className=="BodyGyro" or v.className=="BodyPosition" or v.className=="BodyVelocity" or v.className=="BodyAngularVelocity" then
  1173. if v.Name~="VantaGyro" and v.Name~="VantaPos" then
  1174. print("dai")
  1175. v.Parent=nil
  1176. end
  1177. end
  1178. end
  1179. end
  1180. Neck2.C0=cf(cf1,cf2,cf3)*Neck.C0
  1181. RW2.C0=cf(cf4,cf5,cf6)*RW.C0
  1182. LW2.C0=cf(cf7,cf8,cf9)*LW.C0
  1183. RH2.C0=cf(cf10,cf11,cf12)*RH.C0
  1184. LH2.C0=cf(cf13,cf14,cf15)*LH.C0
  1185. end
  1186. end))
  1187. n=2
  1188. n2=1
  1189. for i=0,1,0.1 do
  1190. wait()
  1191. Neck.C0=cf(0,1,0)*euler(-0.4+0.4*i*n,0,0)
  1192. RW.C0=cf(1+0.5*i*n,0.5,-0.5+0.5*i*n)*euler(1.4+0.17*i*n,0,-1.2+2.77*i*n)
  1193. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  1194. LW.C0=cf(-1-0.5*i*n,0.5,-0.5+0.5*i*n)*euler(1.6-0.03*i*n,0,1.4-2.97*i*n)
  1195. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  1196. RH.C0=cf(0.5,-1,0)*euler(0,0,0.2+0.2*i*n)
  1197. RH.C1=cf(0,1,0)
  1198. LH.C0=cf(-0.5,-1,0)*euler(0,0,-0.2-0.2*i*n)
  1199. LH.C1=cf(0,1,0)
  1200. Head2.Transparency=n2
  1201. Torso2.Transparency=n2
  1202. LeftArm2.Transparency=n2
  1203. RightArm2.Transparency=n2
  1204. LeftLeg2.Transparency=n2
  1205. RightLeg2.Transparency=n2
  1206. n=n-0.1
  1207. n2=n2-0.05
  1208. end
  1209. wait(0.5)
  1210. RootJoint.C0=cf(0,-14.5,0)*euler(0,0,0)
  1211. BodPos.Parent=nil
  1212. Humanoid.WalkSpeed=25
  1213. n=2
  1214. for i=0,1,0.1 do
  1215. wait()
  1216. Neck.C0=cf(0,1,0)*euler(-0.2*i*n,0,0)
  1217. RW.C0=cf(1.5,0.5,0)*euler(1.57-1.57*i*n,0,1.57-1.27*i*n)
  1218. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  1219. LW.C0=cf(-1.5,0.5,0)*euler(1.57-1.57*i*n,0,-1.57+1.27*i*n)
  1220. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  1221. RH.C0=cf(0.5,-1,0)*euler(0,0,0.4-0.4*i*n)
  1222. RH.C1=cf(0,1,0)
  1223. LH.C0=cf(-0.5,-1,0)*euler(0,0,-0.4+0.4*i*n)
  1224. LH.C1=cf(0,1,0)
  1225. n=n-0.1
  1226. end
  1227. BodGy.maxTorque=Vector3.new(40000000,400000000,40000000)
  1228. BodGy.P=2000
  1229. BodGy.D=100
  1230. --BodGy.cframe=CF*euler(0,0,0)
  1231. coroutine.resume(coroutine.create(function()
  1232. --Movement function
  1233. local flying=false
  1234. while DarkBody==true do
  1235. wait()
  1236. --[[print(RootPart.Velocity.z)
  1237. if RootPart.Velocity.x>=6 or RootPart.Velocity.x<=-6 or RootPart.Velocity.z>=6 or RootPart.Velocity.z<=6 then
  1238. Anim.Value="Walking"
  1239. else
  1240. Anim.Value="Standing"
  1241. end]]
  1242. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  1243. if flying==true then
  1244. Anim.Value="Flying"
  1245. elseif torvel<1 then
  1246. Anim.Value="Standing"
  1247. elseif torvel<30 then
  1248. Anim.Value="Walking"
  1249. end
  1250. target=findNearestTorso(RootPart.Position)
  1251. local hit,pos=rayCast(RootPart.Position,cf(RootPart.Position,RootPart.Position-vt(0,1,0)).lookVector,50,Character)
  1252. if hit==nil and flying==false then
  1253. flying=true
  1254. BodPos.maxForce=vt(0,math.huge,0)
  1255. if target~=nil then
  1256. BodPos.position=target.Position
  1257. else
  1258. BodPos.position=Torso2.Position
  1259. end
  1260. BodPos.Parent=RootPart
  1261. coroutine.resume(coroutine.create(function()
  1262. local ground=false
  1263. while ground==false do
  1264. wait()
  1265. if target~=nil then
  1266. BodPos.position=target.Position
  1267. end
  1268. local hit,pos=rayCast(RootPart.Position,cf(RootPart.Position,RootPart.Position-vt(0,1,0)).lookVector,50,Character)
  1269. if hit~=nil then
  1270. ground=true
  1271. flying=false
  1272. end
  1273. end
  1274. BodPos.Parent=nil
  1275. end))
  1276. end
  1277. if target~=nil then
  1278. local pos=Vector3.new(target.Parent.Torso.Position.x,RootPart.Position.Y,target.Parent.Torso.Position.z)
  1279. BodGy.cframe=cf(RootPart.Position,pos)
  1280. Humanoid:MoveTo(target.Position)
  1281. end
  1282. end
  1283. end))
  1284. coroutine.resume(coroutine.create(function()
  1285. --Movement animations
  1286. --[[function onRunning(speed)
  1287. if speed>1 then
  1288. Anim.Value="Walking"
  1289. else
  1290. Anim.Value="Standing"
  1291. end
  1292. end
  1293. Humanoid.Running:connect(onRunning)]]
  1294. local con1=nil
  1295. local con2=nil
  1296.  
  1297. while DarkBody==true do
  1298. wait()
  1299. local walkingoffset1=0
  1300. local walkingoffset2=0
  1301. if attacking==false then
  1302. if Anim.Value=="Standing" then
  1303. RH.C0=cf(0.5,-1,0)*euler(0,0,0)
  1304. RH.C1=cf(0,1,0)
  1305. LH.C0=cf(-0.5,-1,0)*euler(0,0,0)
  1306. LH.C1=cf(0,1,0)
  1307. elseif Anim.Value=="Walking" then
  1308. n=2
  1309. for i=0,1,0.1 do
  1310. if Anim.Value=="Walking" then
  1311. --con1=LeftLeg2.Touched:connect(function(hit) Damagefunc(hit,5,10,math.random(5,10),"Normal",RootPart,.5) end)
  1312. --con2=RightLeg2.Touched:connect(function(hit) Damagefunc(hit,5,10,math.random(5,10),"Normal",RootPart,.5) end)
  1313. wait()
  1314. walkingoffset1=1.2*i*n
  1315. walkingoffset2=-1.2*i*n
  1316. end
  1317. RH.C0=cf(0.5,-1,0)*euler(walkingoffset1,0,0)
  1318. RH.C1=cf(0,1,0)
  1319. LH.C0=cf(-0.5,-1,0)*euler(walkingoffset2,0,0)
  1320. LH.C1=cf(0,1,0)
  1321. n=n-0.1
  1322. end
  1323. while Anim.Value=="Walking" and DarkBody==true do
  1324. wait()
  1325. n=2
  1326. for i=0,1,0.05 do
  1327. if Anim.Value=="Walking" then
  1328. wait()
  1329. walkingoffset1=1.2-2.4*i*n
  1330. walkingoffset2=-1.2+2.4*i*n
  1331. end
  1332. RH.C0=cf(0.5,-1,0)*euler(walkingoffset1,0,0)
  1333. RH.C1=cf(0,1,0)
  1334. LH.C0=cf(-0.5,-1,0)*euler(walkingoffset2,0,0)
  1335. LH.C1=cf(0,1,0)
  1336. n=n-0.05
  1337. end
  1338. n=2
  1339. for i=0,1,0.05 do
  1340. if Anim.Value=="Walking" then
  1341. wait()
  1342. walkingoffset1=-1.2+2.4*i*n
  1343. walkingoffset2=1.2-2.4*i*n
  1344. end
  1345. RH.C0=cf(0.5,-1,0)*euler(walkingoffset1,0,0)
  1346. RH.C1=cf(0,1,0)
  1347. LH.C0=cf(-0.5,-1,0)*euler(walkingoffset2,0,0)
  1348. LH.C1=cf(0,1,0)
  1349. n=n-0.05
  1350. end
  1351. end
  1352. if Anim.Value=="Standing" then
  1353. n=2
  1354. for i=0,1,0.1 do
  1355. wait()
  1356. RH.C0=cf(0.5,-1,0)*euler(walkingoffset1-walkingoffset1*i*n,0,0)
  1357. RH.C1=cf(0,1,0)
  1358. LH.C0=cf(-0.5,-1,0)*euler(walkingoffset2-walkingoffset2*i*n,0,0)
  1359. LH.C1=cf(0,1,0)
  1360. n=n-0.1
  1361. end
  1362. end
  1363. elseif Anim.Value=="Flying" then
  1364. while Anim.Value=="Flying" and DarkBody==true do
  1365. wait(.1)
  1366. RH.C0=cf(0.5,-1,0)*euler(-0.2,0,0.2)
  1367. RH.C1=cf(0,1,0)
  1368. LH.C0=cf(-0.5,-1,0)*euler(-0.2,0,-0.2)
  1369. LH.C1=cf(0,1,0)
  1370. MagicBlock(BrickColor.new("Really black"),LeftLeg2.CFrame*cf(0,-5,0),30,30,30,2,2,2,0.1)
  1371. MagicBlock(BrickColor.new("Really black"),RightLeg2.CFrame*cf(0,-5,0),30,30,30,2,2,2,0.1)
  1372. end
  1373. end
  1374. end
  1375. end
  1376. end))
  1377. coroutine.resume(coroutine.create(function()
  1378. while Humanoid.Health>=HealtVal.Value-HealthNum.Value do
  1379. wait()
  1380. end
  1381. HealthNum.Value=HealthNum.Value+HealthNumber
  1382. mode.Value=2
  1383. end))
  1384. while mode.Value==3 do
  1385. Neck.C0=cf(0,1,0)*euler(-0.2,0,0)
  1386. RW.C0=cf(1.5,0.5,0)*euler(0,0,0.3)
  1387. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  1388. LW.C0=cf(-1.5,0.5,0)*euler(0,0,-0.3)
  1389. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  1390. wait(1)
  1391. local targetting=false
  1392. if target~=nil then
  1393. targetting=true
  1394. local dist=(RootPart.Position - target.Position).magnitude
  1395. if Anim.Value=="Floating" then
  1396. dist=500
  1397. end
  1398. coroutine.resume(coroutine.create(function()
  1399. while targetting==true do
  1400. target=findNearestTorso(RootPart.Position)
  1401. if target==nil then
  1402. target=Torso2
  1403. end
  1404. wait(0)
  1405. end
  1406. end))
  1407. if dist>=50 then
  1408. attack=math.random(1,2)
  1409. if attack==1 then --Dark Rain
  1410. local n=2
  1411. for i=0,1,0.1 do
  1412. wait()
  1413. Neck.C0=cf(0,1,0)*euler(-0.2+0.6*i*n,0,0)
  1414. RW.C0=cf(1.5,0.5,0)*euler(3.14*i*n,0,0.3-0.3*i*n)
  1415. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  1416. LW.C0=cf(-1.5,0.5,0)*euler(-0.2*i*n,0,-0.3)
  1417. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  1418. n=n-0.1
  1419. end
  1420. for i=1,math.random(10,20) do
  1421. wait(.1)
  1422. MagicBlock(BrickColor.new("Really black"),RightArm2.CFrame*cf(0,-5,0),30,30,30,2,2,2,0.1)
  1423. local orb=part(3,Character,0,0.5,BrickColor.new("Really black"),"Orb",vt())
  1424. orb.Anchored=true
  1425. so("http://roblox.com/asset/?id=183763498",orb,1,1.2)
  1426. local omsh=mesh("SpecialMesh",orb,"Sphere","",vt(0,0,0),vt(10,10,10))
  1427. orb.CFrame=cf(target.Position+vt(math.random(-10,10),math.random(50,100),math.random(-10,10)))
  1428. MagicCircle(BrickColor.new("Really black"),orb.CFrame,10,10,10,1,1,1,0.1)
  1429. coroutine.resume(coroutine.create(function(Part,Mesh,Weld)
  1430. wait(1)
  1431. Part.Parent=nil
  1432. local spread=vt((math.random(-1,0)+math.random())*16,(math.random(-1,0)+math.random())*16,(math.random(-1,0)+math.random())*16)*(Part.Position-(Part.Position+vt(0,-1,0))).magnitude/100
  1433. local TheHit=Part.Position+vt(0,-1,0)
  1434. local MouseLook=cf((Part.Position+TheHit)/2,TheHit+spread)
  1435. local hit,pos = rayCast(Part.Position,MouseLook.lookVector,999,Character)
  1436. local mag=(Part.Position-pos).magnitude
  1437. MagicCylinder(BrickColor.new("Really black"),CFrame.new((Part.Position+pos)/2,pos)*angles(1.57,0,0) ,1,mag*5,1,0.5,0,0.5,0.05)
  1438. MagicBlock(BrickColor.new("Really black"),Part.CFrame,8,8,8,0.5,0.5,0.5,0.1)
  1439. MagicBlock(BrickColor.new("Really black"),cf(pos),15,15,15,6,6,6,0.1)
  1440. MagicRing(BrickColor.new("Really black"),cf(pos)*euler(1.57,math.random(-100,100)/100,math.random(-100,100)/100),1,1,1,2,2,2,0.05)
  1441. local ref=part(3,workspace,0,1,BrickColor.new("Really black"),"Effect",vt())
  1442. ref.CFrame=cf(pos)
  1443. so("http://roblox.com/asset/?id=183763487",ref,1,1)
  1444. coroutine.resume(coroutine.create(function(Part)
  1445. wait(1)
  1446. Part.Parent=nil
  1447. end),ref)
  1448. MagniDamage(ref,15,5,10,0,"Normal",RootPart)
  1449. if hit~=nil then
  1450. Damagefunc(hit,20,40,1,"Knockdown",RootPart,0)
  1451. end
  1452. end),orb,omsh,owld)
  1453. end
  1454. wait(0.5)
  1455. local n=2
  1456. for i=0,1,0.1 do
  1457. wait()
  1458. Neck.C0=cf(0,1,0)*euler(0.4-0.6*i*n,0,0)
  1459. RW.C0=cf(1.5,0.5,0)*euler(3.14-3.14*i*n,0,0.3*i*n)
  1460. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  1461. LW.C0=cf(-1.5,0.5,0)*euler(-0.2+0.2*i*n,0,-0.3)
  1462. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  1463. n=n-0.1
  1464. end
  1465. wait(1)
  1466. elseif attack==2 then --Nocturne
  1467. local n=2
  1468. for i=0,1,0.1 do
  1469. wait()
  1470. Neck.C0=cf(0,1,0)*euler(-0.2+0.6*i*n,0,0)
  1471. RW.C0=cf(1.5,0.5,0)*euler(3.14*i*n,0,0.3-0.9*i*n)
  1472. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  1473. LW.C0=cf(-1.5,0.5,0)*euler(3.14*i*n,0,-0.3+0.9*i*n)
  1474. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  1475. n=n-0.1
  1476. end
  1477. local orb=part(3,Character,0,1,BrickColor.new("Really black"),"Orb",vt())
  1478. local omsh=mesh("SpecialMesh",orb,"Sphere","",vt(0,0,0),vt(15,15,15))
  1479. local owld=weld(orb,orb,Torso,cf(0,-10,0))
  1480. so("http://roblox.com/asset/?id=137463716",orb,1,0.6)
  1481. for i=1,0.3,-0.01 do
  1482. wait()
  1483. orb.Transparency=i
  1484. omsh.Scale=omsh.Scale+vt(0.5,0.5,0.5)
  1485. MagicBlock(BrickColor.new("Really black"),orb.CFrame,15,15,15,2,2,2,0.1)
  1486. local ef=part(3,workspace,0,0,BrickColor.new("Really black"),"Effect",vt())
  1487. ef.Anchored=true
  1488. local emsh=mesh("SpecialMesh",ef,"Sphere","",vt(0,0,0),vt(2,math.random(1000,1500)/100,2))
  1489. local ceef=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cf(0,math.random(10,20),0)
  1490. ef.CFrame=orb.CFrame*ceef
  1491. game:GetService("Debris"):AddItem(ef,2)
  1492. coroutine.resume(coroutine.create(function(Part,Mesh)
  1493. for i=0,1,0.1 do
  1494. wait()
  1495. Part.Transparency=i
  1496. Part.CFrame=Part.CFrame*cf(0,-1,0)
  1497. end
  1498. Part.Parent=nil
  1499. end),ef,emsh)
  1500. end
  1501. local Pos=cf(orb.Position,target.Position).lookVector
  1502. wait(.5)
  1503. orb.Parent=nil
  1504. local hit,pos = rayCast(orb.Position,Pos,999,Character)
  1505. local mag=(orb.Position-pos).magnitude
  1506. MagicCircle(BrickColor.new("Really black"),cf(pos),15,15,15,8,8,8,0.02)
  1507. MagicBlock(BrickColor.new("Really black"),cf(pos),15,15,15,8,8,8,0.02)
  1508. MagicCylinder(BrickColor.new("Really black"),CFrame.new((orb.Position+pos)/2,pos)*euler(1.57,0,0),10,mag*5,10,0.5,0,0.5,0.01)
  1509. for i=1,2 do
  1510. MagicRing(BrickColor.new("Really black"),cf(pos)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),3,3,3,1,1,1,0.04)
  1511. end
  1512. for i=1,5 do
  1513. tehcf=CFrame.new((orb.Position+pos)/2,pos)*euler(1.57,0,0)*cf(0,(mag/5)*(i/2),0)
  1514. MagicRing(BrickColor.new("Really black"),tehcf*euler(1.57,0,0),1,1,1,0.5,0.5,0.5,0.01)
  1515. end
  1516. for i=0,5 do
  1517. tehcf=CFrame.new((orb.Position+pos)/2,pos)*euler(1.57,0,0)*cf(0,(-mag/5)*(i/2),0)
  1518. MagicRing(BrickColor.new("Really black"),tehcf*euler(1.57,0,0),1,1,1,0.5,0.5,0.5,0.01)
  1519. end
  1520. local ref=part(3,workspace,0,1,BrickColor.new("Really black"),"Effect",vt())
  1521. ref.CFrame=cf(pos)
  1522. so("http://roblox.com/asset/?id=183763506",Torso,1,0.6)
  1523. so("http://roblox.com/asset/?id=178452221",Torso,1,0.6)
  1524. so("http://www.roblox.com/Asset?ID=87767777",Torso,1,1)
  1525. so("http://roblox.com/asset/?id=183763506",ref,1,0.6)
  1526. so("http://roblox.com/asset/?id=178452221",ref,1,0.6)
  1527. so("http://www.roblox.com/Asset?ID=87767777",ref,1,1)
  1528. coroutine.resume(coroutine.create(function(Part)
  1529. wait(1)
  1530. Part.Parent=nil
  1531. end),ref)
  1532. MagniDamage(ref,20,10,30,40,"Knockdown",ref)
  1533. if hit~=nil then
  1534. Damagefunc(hit,30,70,50,"Knockdown",RootPart,0)
  1535. end
  1536. wait(1)
  1537. local n=2
  1538. for i=0,1,0.1 do
  1539. wait()
  1540. Neck.C0=cf(0,1,0)*euler(0.4-0.6*i*n,0,0)
  1541. RW.C0=cf(1.5,0.5,0)*euler(3.14-3.14*i*n,0,-0.6+0.9*i*n)
  1542. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  1543. LW.C0=cf(-1.5,0.5,0)*euler(3.14-3.14*i*n,0,0.6-0.9*i*n)
  1544. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  1545. n=n-0.1
  1546. end
  1547. end
  1548. else
  1549. attack=math.random(1,2)
  1550. if attack==1 then --Titan Fall
  1551. attacking=true
  1552. Humanoid.WalkSpeed=0
  1553. local n=2
  1554. for i=0,1,0.05 do
  1555. wait()
  1556. cf4=6-2*i*n
  1557. cf5=2+2*i*n
  1558. cf6=-2*i*n
  1559. cf7=-6+2*i*n
  1560. cf8=2+2*i*n
  1561. cf9=-2*i*n
  1562. Neck.C0=cf(0,1,0)*euler(-0.2+0.8*i*n,0,0)
  1563. RW.C0=cf(1.5-0.5*i*n,0.5+0.5*i*n,-0.5*i*n)*euler(3.14*i*n,0,0.3-0.9*i*n)
  1564. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  1565. LW.C0=cf(-1.5+0.5*i*n,0.5+0.5*i*n,-0.5*i*n)*euler(3.14*i*n,0,-0.3+0.9*i*n)
  1566. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  1567. n=n-0.05
  1568. end
  1569. wait(0.3)
  1570. so("http://www.roblox.com/asset/?id=169445121",Torso2,1,0.6)
  1571. n=2
  1572. for i=0,1,0.2 do
  1573. wait()
  1574. MagicBlock(BrickColor.new("Really black"),RightArm2.CFrame*cf(0,-5,0),30,30,30,2,2,2,0.1)
  1575. MagicBlock(BrickColor.new("Really black"),LeftArm2.CFrame*cf(0,-5,0),30,30,30,2,2,2,0.1)
  1576. cf11=-4+2*i*n
  1577. cf12=-2*i*n
  1578. cf5=4-4*i*n
  1579. cf8=4-4*i*n
  1580. RootJoint.C0=cf(0,-14.5+3*i*n,0)*euler(0,0,0)
  1581. Neck.C0=cf(0,1,0)*euler(0.6-1*i*n,0,0)
  1582. RW.C0=cf(1,1-1*i*n,-0.5)*euler(3.14-2.64*i*n,0,-0.6)
  1583. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  1584. LW.C0=cf(-1,1-1*i*n,-0.5)*euler(3.14-2.64*i*n,0,0.6)
  1585. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  1586. RH.C0=cf(0.5,-1+0.5*i*n,-0.5*i*n)*euler(-0.1*i*n,0,0)
  1587. RH.C1=cf(0,1,0)
  1588. LH.C0=cf(-0.5,-1,0)*euler(-0.6*i*n,0,0)
  1589. LH.C1=cf(0,1,0)
  1590. n=n-0.2
  1591. end
  1592. local cf2=RootPart.CFrame*cf(0,500,-20)
  1593. local ref=part(3,workspace,0,1,BrickColor.new("Really black"),"Effect",vt())
  1594. ref.CFrame=cf2
  1595. ref.Anchored=true
  1596. local TheHit=ref.Position+vt(0,-1,0)
  1597. local MouseLook=cf((ref.Position+TheHit)/2,TheHit)
  1598. local hit,pos = rayCast(ref.Position,MouseLook.lookVector,999,Character)
  1599. local ref2=part(3,workspace,0,1,BrickColor.new("Really black"),"Effect",vt())
  1600. ref2.CFrame=cf(pos)
  1601. ref2.Anchored=true
  1602. local mag=(ref.Position-pos).magnitude
  1603. MagicCylinder(BrickColor.new("Really black"),CFrame.new((ref.Position+pos)/2,pos)*angles(1.57,0,0),5,mag*5,5,1,0,1,0.05)
  1604. MagicCircle(BrickColor.new("Really black"),ref2.CFrame,15,15,15,8,8,8,0.02)
  1605. MagicBlock(BrickColor.new("Really black"),ref2.CFrame,15,15,15,3,3,3,0.02)
  1606. WaveEffect2(BrickColor.new("Really black"),ref2.CFrame,5,5,5,2,3,2,0.05)
  1607. MagicRing(BrickColor.new("Really black"),cf(ref2.Position)*euler(1.57,0,0),5,5,5,4,4,4,0.05)
  1608. MagniDamage(ref2,25,20,50,math.random(10,30),"Knockdown",ref2)
  1609. --so("http://roblox.com/asset/?id=144844438",ref2,1,0.8)
  1610. so("http://roblox.com/asset/?id=87784452",ref2,1,0.8)
  1611. so("http://roblox.com/asset/?id=183763515",ref2,1,0.8)
  1612. game:GetService("Debris"):AddItem(ref,2)
  1613. game:GetService("Debris"):AddItem(ref2,2)
  1614. wait(1)
  1615. n=2
  1616. for i=0,1,0.1 do
  1617. wait()
  1618. cf4=4+2*i*n
  1619. cf5=2*i*n
  1620. cf6=-2+2*i*n
  1621. cf7=-4-2*i*n
  1622. cf8=2*i*n
  1623. cf9=-2+2*i*n
  1624. cf11=-4+2-2*i*n
  1625. cf12=-2+2*i*n
  1626. RootJoint.C0=cf(0,-14.5+3-3*i*n,0)*euler(0,0,0)
  1627. Neck.C0=cf(0,1,0)*euler(-0.4+0.2*i*n,0,0)
  1628. RW.C0=cf(1+0.5*i*n,0.5*i*n,-0.5+0.5*i*n)*euler(0.5-0.5*i*n,0,-0.6+0.9*i*n)
  1629. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  1630. LW.C0=cf(-1-0.5*i*n,0.5*i*n,-0.5+0.5*i*n)*euler(0.5-0.5*i*n,0,0.6-0.9*i*n)
  1631. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  1632. RH.C0=cf(0.5,-0.5-0.5*i*n,-0.5+0.5*i*n)*euler(-0.1+0.1*i*n,0,0)
  1633. RH.C1=cf(0,1,0)
  1634. LH.C0=cf(-0.5,-1,0)*euler(-0.6+0.6*i*n,0,0)
  1635. LH.C1=cf(0,1,0)
  1636. n=n-0.1
  1637. end
  1638. wait(1)
  1639. Humanoid.WalkSpeed=25
  1640. attacking=false
  1641. elseif attack==2 then --Dark Stomp
  1642. attacking=true
  1643. Humanoid.WalkSpeed=0
  1644. local n=2
  1645. for i=0,1,0.1 do
  1646. wait()
  1647. cf11=-4+2*i*n
  1648. cf12=-2*i*n
  1649. --cf13=-2
  1650. --cf14=-4
  1651. --cf15=0
  1652. RootJoint.C0=cf(0,-14.5,0)*euler(0.2*i*n,0,0)
  1653. Neck.C0=cf(0,1,0)*euler(-0.2-0.4*i*n,0,0)
  1654. RW.C0=cf(1.5,0.5,0)*euler(-0.2*i*n,0,0.3)
  1655. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  1656. LW.C0=cf(-1.5,0.5,0)*euler(-0.2*i*n,0,-0.3)
  1657. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  1658. RH.C0=cf(0.5,-1+0.5*i*n,-0.5*i*n)*euler(0.2*i*n,0,0)
  1659. RH.C1=cf(0,1,0)
  1660. LH.C0=cf(-0.5,-1,0)*euler(-0.2*i*n,0,0)
  1661. LH.C1=cf(0,1,0)
  1662. n=n-0.1
  1663. end
  1664. so("http://www.roblox.com/asset/?id=169445046",RightLeg2,1,0.6)
  1665. local n=2
  1666. for i=0,1,0.2 do
  1667. wait()
  1668. cf11=-2-2*i*n
  1669. RH.C0=cf(0.5,-0.5-0.5*i*n,-0.5)*euler(0.2+0.1*i*n,0,0)
  1670. RH.C1=cf(0,1,0)
  1671. n=n-0.2
  1672. end
  1673. MagicCylinder(BrickColor.new("Really black"),cf(RightLeg2.Position+vt(0,-4,0)),10,4,10,5,3,5,0.05)
  1674. local numb=-8
  1675. local basecf=RootPart.CFrame
  1676. for i=1,4 do
  1677. local cf2=basecf*cf(0,0,numb)
  1678. local ref=part(3,workspace,0,1,BrickColor.new("Really black"),"Effect",vt())
  1679. ref.CFrame=cf2
  1680. ref.Anchored=true
  1681. local TheHit=ref.Position+vt(0,-1,0)
  1682. local MouseLook=cf((ref.Position+TheHit)/2,TheHit)
  1683. local hit,pos = rayCast(ref.Position,MouseLook.lookVector,999,Character)
  1684. local ref2=part(3,workspace,0,1,BrickColor.new("Really black"),"Effect",vt())
  1685. ref2.CFrame=cf(pos)
  1686. ref2.Anchored=true
  1687. MagicCircle(BrickColor.new("Really black"),ref2.CFrame,15,15,15,8,8,8,0.02)
  1688. MagicWaveThing(BrickColor.new("Really black"),ref2.CFrame,5,5,5,2,2,2,0.05)
  1689. MagniDamage(ref2,20,20,30,math.random(5,20),"Normal",RootPart)
  1690. so("http://www.roblox.com/asset/?id=161006093",ref2,1,0.6)
  1691. game:GetService("Debris"):AddItem(ref,2)
  1692. game:GetService("Debris"):AddItem(ref2,2)
  1693. numb=numb-15
  1694. wait(0.4)
  1695. end
  1696. --wait(1)
  1697. local n=2
  1698. for i=0,1,0.1 do
  1699. wait()
  1700. cf12=-2+2*i*n
  1701. RootJoint.C0=cf(0,-14.5,0)*euler(0.2-0.2*i*n,0,0)
  1702. Neck.C0=cf(0,1,0)*euler(-0.6+0.4*i*n,0,0)
  1703. RW.C0=cf(1.5,0.5,0)*euler(-0.2+0.2*i*n,0,0.3)
  1704. RW.C1=cf(0,0.5,0)*euler(0,0,0)
  1705. LW.C0=cf(-1.5,0.5,0)*euler(-0.2+0.2*i*n,0,-0.3)
  1706. LW.C1=cf(0,0.5,0)*euler(0,0,0)
  1707. RH.C0=cf(0.5,-1,-0.5+0.5*i*n)*euler(0.3-0.3*i*n,0,0)
  1708. RH.C1=cf(0,1,0)
  1709. LH.C0=cf(-0.5,-1,0)*euler(-0.2+0.2*i*n,0,0)
  1710. LH.C1=cf(0,1,0)
  1711. n=n-0.1
  1712. end
  1713. Humanoid.WalkSpeed=25
  1714. attacking=false
  1715. wait(1)
  1716. elseif attack==3 then
  1717. end
  1718. end
  1719. targetting=false
  1720. end
  1721. end
  1722. --Destroy body
  1723. DarkBody=false
  1724. HealtVal2.Value=Humanoid.Health
  1725. Head2.Anchored=true
  1726. Torso2.Anchored=true
  1727. LeftArm2.Anchored=true
  1728. RightArm2.Anchored=true
  1729. LeftLeg2.Anchored=true
  1730. RightLeg2.Anchored=true
  1731.  
  1732. Neck2.Parent=nil
  1733. RW2.Parent=nil
  1734. LW2.Parent=nil
  1735. RH2.Parent=nil
  1736. LH2.Parent=nil
  1737. RootJoint2.Parent=nil
  1738. coroutine.resume(coroutine.create(function()
  1739. for i=0.5,1,0.05 do
  1740. wait()
  1741. Head2.Transparency=i
  1742. Torso2.Transparency=i
  1743. LeftArm2.Transparency=i
  1744. RightArm2.Transparency=i
  1745. LeftLeg2.Transparency=i
  1746. RightLeg2.Transparency=i
  1747. end
  1748. Head2.Parent=nil
  1749. Torso2.Parent=nil
  1750. LeftArm2.Parent=nil
  1751. RightArm2.Parent=nil
  1752. LeftLeg2.Parent=nil
  1753. RightLeg2.Parent=nil
  1754. end))
  1755. DarkLegEffect=true
  1756. coroutine.resume(coroutine.create(function(Leg1,Leg2)
  1757. while DarkLegEffect==true do
  1758. wait(0.1)
  1759. MagicBlock(BrickColor.new("Really black"),Leg1.CFrame*cf(0,-1,0),5,5,5,0.5,0.5,0.5,0.1)
  1760. MagicBlock(BrickColor.new("Really black"),Leg2.CFrame*cf(0,-1,0),5,5,5,0.5,0.5,0.5,0.1)
  1761. end
  1762. end),RightLeg,LeftLeg)
  1763.  
  1764. Humanoid.MaxHealth=math.huge
  1765. Humanoid.Health=math.huge
  1766. coroutine.resume(coroutine.create(function()
  1767. for i=1,20 do
  1768. Humanoid.Health=Humanoid.MaxHealth
  1769. end
  1770. Humanoid:TakeDamage(1)
  1771. end))
  1772. RootJoint.C0=cf(0,0,0)
  1773. MagicBlock(BrickColor.new("Really black"),Torso.CFrame,15,15,15,6,6,6,0.1)
  1774. BPRef.CFrame=MainPosition
  1775. Torso.CFrame=BPRef.CFrame
  1776. BodPos.position=BPRef.Position
  1777. BodGy.Parent=Torso
  1778. MagicBlock(BrickColor.new("Really black"),Torso.CFrame,15,15,15,6,6,6,0.1)
  1779. BodGy.cframe=CF*euler(0,1.57,0)
  1780. BodPos.Parent=RootPart
  1781. BodPos.maxForce=vt(math.huge,math.huge,math.huge)
  1782. coroutine.resume(coroutine.create(function()
  1783. for i=0,40 do
  1784. wait()
  1785. BodPos.Parent=RootPart
  1786. end
  1787. end))
  1788. for i=0,1,0.1 do
  1789. wait()
  1790. RH.C0=cf(0.5,-1,0)*euler(-0.3*i,0,0.2*i)
  1791. RH.C1=cf(0,1,0)
  1792. LH.C0=cf(-0.5,-1,0)*euler(-0.3*i,0,-0.2*i)
  1793. LH.C1=cf(0,1,0)
  1794. end
  1795. if Humanoid.Health>0 then
  1796. SummonCrystals()
  1797. end
  1798. wait(1)
  1799. end
  1800. DarkLegEffect=false
Add Comment
Please, Sign In to add comment