Advertisement
battleman22222

VANTA

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