Advertisement
Guest User

Untitled

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