Advertisement
memberhero

Untitled

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