Advertisement
Its_YeBoi

Lightning Anim

Nov 5th, 2017
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.35 KB | None | 0 0
  1. --Scripted By coolallball
  2. wait()
  3. if game.Players.LocalPlayer.Character.Animate.Disabled==false then
  4. game.Players.LocalPlayer.Character.Animate.Disabled=true
  5. end
  6. if game.Players.LocalPlayer.Character.Humanoid.Animator then
  7. game.Players.LocalPlayer.Character.Humanoid.Animator:Destroy()
  8. end
  9. wait()
  10. local Player=game.Players.LocalPlayer
  11. repeat wait()
  12. until Player
  13. local Char=Player.Character
  14. repeat wait()
  15. until Char
  16. local CurrentEffects={}
  17. local CurrentDamages={}
  18. local Human=Char.Humanoid
  19. local LArm=Char["Left Arm"]
  20. local RArm=Char["Right Arm"]
  21. local LLeg=Char["Left Leg"]
  22. local RLeg=Char["Right Leg"]
  23. local Torso=Char.Torso
  24. local RS=Torso["Right Shoulder"]
  25. local LS=Torso["Left Shoulder"]
  26. local RH=Torso["Right Hip"]
  27. local LH=Torso["Left Hip"]
  28. local Head=Char.Head
  29. local Neck=Torso.Neck
  30. local RootPart=Char.HumanoidRootPart
  31. local RootJoint=RootPart.RootJoint
  32. local equipped=false
  33. local Debounce=false
  34. local Anim="Idle"
  35. local chat = game:GetService("Chat")
  36. local Mouse=Player:GetMouse()
  37. local Lighting=game.Lighting
  38. local cam=workspace.CurrentCamera
  39. local cf=CFrame.new
  40. local v3=Vector3.new
  41. local c3=Color3.new
  42. local it=Instance.new
  43. local angles=CFrame.Angles
  44. local rad=math.rad
  45. local ran=math.random
  46. local huge=math.huge
  47. local attacking=false
  48. local attacktype=1
  49. local Sheathed=true
  50. Tool=script.Parent
  51. Equipped=false
  52. op=false
  53. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  54. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  55. LSC0=cf(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  56. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  57. RSC0=cf(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  58. ROOTC0 = cf(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  59. RHC01=cf(1, -1, 0, 0, -0.087155737, 0.99619472, 0, 0.99619472, 0.087155737, -1, 0, 0)
  60. LHC01=cf(-1, -1, 0, 0, 0.087155737, -0.99619472, 0, 0.99619472, 0.087155737, 1, 0, 0)
  61. RSC01=cf(1, 0.5, 0, 0, -0.173648179, 0.98480773, 0, 0.98480773, 0.173648179, -1, 0, 0)
  62. LSC01=cf(-1, 0.5, 0, 0, 0.173648179, -0.98480773, 0, 0.98480773, 0.173648179, 1, 0, 0)
  63. ROOTC01=cf(0, 0, 0, -0.939692616, 0.342020124, 0, 0, 0, 1, 0.342020124, 0.939692616, 0)
  64. NECKC01=cf(0, 1, 0, -0.939692616, -0.342020124, 0, -0.0593911707, 0.163175911, 0.98480773, -0.336824059, 0.925416529, -0.173648179)
  65. Joints={RH.C0,LH.C0,RS.C0,LS.C0,RootJoint.C0,Neck.C0}
  66. --why do people label stuff with comments, y.
  67. r=game:service'RunService'.RenderStepped
  68. clerp=function(a,b,t)
  69. return a:lerp(b,t)
  70. end
  71. Combo=0
  72. TotalDamage=0
  73. Damage=0
  74. ComboMoves={}
  75. Inputs={}
  76. CurrentTarget=""
  77. Inp=Player:GetChildren()
  78. LastAnim=""
  79.  
  80.  
  81. Human.WalkSpeed=30
  82. Human.JumpPower=50
  83.  
  84. for i=1,#Inp do
  85. if Inp[i]:IsA('Sound') then Inp[i]:Remove() end
  86. end
  87.  
  88. --Functions
  89.  
  90. function FindDist(a,b)
  91. return math.sqrt((b.p.x-a.p.x)^2+(b.p.y-a.p.y)^2+(b.p.z-a.p.z)^2)
  92. end
  93.  
  94. Round=function(Num)
  95. local mid=math.ceil(Num)
  96. mid=mid-.5
  97. if Num>=mid then
  98. return math.ceil(Num)
  99. else return math.floor(Num)
  100. end
  101. end
  102.  
  103. SFX=function(id,name,vol)
  104. local s=it("Sound",Sounds)
  105. s.SoundId=id
  106. s.Name=name
  107. s.Volume=vol
  108. end
  109.  
  110. gui = function(GuiType, parent, text, backtrans, backcol, pos, size)
  111. local gui = Instance.new(GuiType)
  112. gui.Parent = parent
  113. gui.Text = text
  114. gui.BackgroundTransparency = backtrans
  115. gui.BackgroundColor3 = backcol
  116. gui.SizeConstraint = "RelativeXY"
  117. gui.TextXAlignment = "Center"
  118. gui.TextYAlignment = "Center"
  119. gui.Position = pos
  120. gui.Size = size
  121. gui.Font = "Cartoon"
  122. gui.FontSize = "Size60"
  123. gui.TextWrapped = false
  124. gui.TextStrokeTransparency = 0
  125. gui.TextColor = BrickColor.new("Pastal white")
  126. return gui
  127. end
  128.  
  129. Torso.Anchored=false
  130.  
  131.  
  132.  
  133. function rayCast(Position, Direction, Range, Ignore)
  134. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  135. end
  136. --Damage function
  137. function Damage(part,min,max,range,font)
  138. for i,v in pairs(workspace:GetChildren()) do
  139. if v:FindFirstChild('Humanoid') and v:FindFirstChild('Torso') and v.ClassName=="Model" and FindDist(part,v.Torso.CFrame)<=range and v.Name~= Player.Name then
  140. local dmg=Round(math.random(min,max))
  141. local bil=Instance.new("BillboardGui",v:FindFirstChild("Torso"))
  142. bil.Adornee=v:FindFirstChild("Torso")
  143. bil.Size=UDim2.new(0, 500, 0, 500)
  144. bil.ExtentsOffset=Vector3.new(ran(-3,3),ran(-3,3),ran(-3,3))
  145. local tx=Instance.new("TextLabel",bil)
  146. tx.Text=""..dmg..""
  147. tx.Font="Cartoon"
  148. tx.FontSize="Size60"
  149. tx.TextWrapped = false
  150. tx.TextStrokeTransparency = 0
  151. tx.TextColor = BrickColor.new("Pastel white")
  152. tx.TextXAlignment = "Center"
  153. tx.TextYAlignment = "Center"
  154. tx.TextWrapped = false
  155. tx.SizeConstraint = "RelativeXY"
  156. v:FindFirstChild('Humanoid'):TakeDamage(math.random(min,max))
  157. spawn(function()
  158. for ii=1,10 do r:wait()
  159. tx.TextTransparency=ii/10 end
  160. bil:Destroy() end)
  161. end end end
  162.  
  163. sine=1
  164. change=1
  165.  
  166. --Detect State
  167.  
  168. detect_state = function()
  169. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  170. local velocity = RootPart.Velocity.y
  171. sine = sine + change
  172. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Char)
  173. if attacking==false then
  174. if RootPart.Velocity.y > 1 and hit == nil and attacking==false then
  175. Anim = "Jump"--print(Anim)
  176. Neck.C0=clerp(Neck.C0,necko*angles(rad(-15),rad(0),rad(0)),.3)
  177. RH.C0=clerp(RH.C0,RHC0*angles(rad(-10),rad(0),rad(0)),.3)
  178. LH.C0=clerp(LH.C0,LHC0*angles(rad(-10),rad(0),rad(0)),.3)
  179. RS.C0=clerp(RS.C0,RSC0*angles(rad(-20),rad(0),rad(-20)),.3)
  180. LS.C0=clerp(LS.C0,LSC0*angles(rad(-20),rad(0),rad(20)),.3)
  181. elseif RootPart.Velocity.y < -1 and hit == nil and attacking==false then
  182. Anim = "Fall"--print(Anim)
  183. Neck.C0=clerp(Neck.C0,necko*angles(rad(35),rad(0),rad(0)),.3)
  184. RH.C0=clerp(RH.C0,RHC01*angles(rad(0),rad(0),rad(-5)),.3)
  185. LH.C0=clerp(LH.C0,LHC01*angles(rad(0),rad(0),rad(20)),.3)
  186. RS.C0=clerp(RS.C0,RSC0*angles(rad(-100),rad(0),rad(0)),.3)
  187. LS.C0=clerp(LS.C0,LSC0*angles(rad(-100),rad(0),rad(0)),.3)
  188. LastAnim="Fall"
  189. elseif Torsovelocity < 1 and hit ~= nil and Equipped==false and attacking==false then
  190. Anim = "Idle"--print(Anim)
  191. change=1
  192. if LastAnim~="Idle" then LastAnim="Idle"
  193. for i=1,16 do r:wait()
  194. RS.C0=RS.C0:lerp(RSC01,.3)
  195. LS.C0=LS.C0:lerp(LSC01,.3)
  196. RH.C0=RH.C0:lerp(RHC01,.3)
  197. LH.C0=LH.C0:lerp(LHC01,.3)
  198. RootJoint.C0=RootJoint.C0:lerp(ROOTC01,.3)
  199. Neck.C0=Neck.C0:lerp(NECKC01,.3)
  200. end
  201. end
  202. r:wait() RS.C0=RS.C0*cf(0,(math.cos(sine/15))/200,0)*angles(0,(math.cos(sine/-15))/-300,0)
  203. LS.C0=LS.C0*cf(0,(math.cos(sine/15))/200,0)*angles(0,(math.cos(sine/15))/300,0)
  204. Neck.C0=Neck.C0*angles((math.cos(sine/15))/300,0,0)
  205. RH.C0=RH.C0*cf((math.cos(sine/-15))/500,0,0)
  206. LH.C0=LH.C0*cf((math.cos(sine/-15))/500,0,0)
  207. RootJoint.C0=RootJoint.C0*cf(0,0,(math.cos(sine/15))/500)
  208. elseif Torsovelocity > 2 and hit ~= nil and attacking==false then
  209. Anim = "Walk" --print(Anim)
  210. r:wait()
  211. change=3
  212. Neck.C0=clerp(Neck.C0,necko*angles(rad(0),0,0),.3)
  213. RootJoint.C0 = clerp(RootJoint.C0, ROOTC0 * cf(0, 0, 0) * angles(math.rad(10 + 1 * math.cos(sine / 15)), math.rad(0), 0), .3)
  214. RH.C0 = clerp(RH.C0, cf(0, 0, 0 - 0.5 * math.cos(sine / 10) / 2) * RHC0 * angles(math.rad(-3), math.rad(10), math.rad(30 * math.cos(sine / 10))), .3)
  215. LH.C0 = clerp(LH.C0, cf(0, 0, 0 + 0.5 * math.cos(sine / 10) / 2) * LHC0 * angles(math.rad(-3), math.rad(10), math.rad(30 * math.cos(sine / 10))), .3)
  216. RS.C0 = clerp(RS.C0, RSC0 * angles(math.rad(-10), math.rad(10), math.rad(-20)),.3)
  217. LS.C0 = clerp(LS.C0, LSC0 * angles(math.rad(-10), math.rad(10), math.rad(20)),.3)
  218. LastAnim="Walk"
  219. end
  220. end
  221. end
  222.  
  223. --Folders+More functions
  224.  
  225. Effects=Instance.new("Folder",Char)
  226. Effects.Name="Effects"
  227. Welds=Instance.new("Folder",Char)
  228. Welds.Name="Welds"
  229. Sounds=Instance.new("Folder",Char)
  230. Sounds.Name="Sounds"
  231. part=function(parent,anchored,cancollide,size,cframe,col3,material,trans)
  232. local p=it("Part",parent)
  233. p.Anchored=anchored
  234. p.CanCollide=cancollide
  235. p.Size=size
  236. p.CFrame=cframe
  237. p.Color=col3
  238. p.Material=material
  239. p.Transparency=trans
  240. return p
  241. end
  242.  
  243. mesh=function(parent,ttype,scale)
  244. local m=it("SpecialMesh",parent)
  245. m.MeshType=ttype
  246. m.Scale=scale
  247. return m
  248. end
  249.  
  250. spmesh=function(parent,id,scale)
  251. local m=it("SpecialMesh",parent)
  252. m.MeshId=id
  253. m.Scale=scale
  254. return m
  255. end
  256.  
  257. local Smooth=function(Table)
  258. for _, v in pairs(Table) do
  259. if v.ClassName=="Part" then
  260. v.TopSurface,v.BottomSurface,v.BackSurface,v.FrontSurface,v.LeftSurface,v.RightSurface=10,10,10,10,10,10 end end
  261. end
  262.  
  263. local function PowerGlow(Parent,Cframe,Col1,Col2,Material,Size)spawn(function()
  264. local Colours = {BrickColor.new(Col1),BrickColor.new(Col2)}
  265. local Power1 = Instance.new("Part", Parent)
  266. Power1.CFrame = Cframe
  267. Power1.Size = Vector3.new(0,0,0)
  268. Power1.TopSurface = 0
  269. Power1.BottomSurface = 0
  270. Power1.CanCollide = false
  271. Power1.Anchored = true
  272. Power1.Material = Material
  273. Power1.BrickColor = Colours[math.random(1,#Colours)]
  274. local m = Instance.new("SpecialMesh", Power1)
  275. m.MeshType = "Sphere"
  276. m.Scale = Vector3.new(Size*.3,Size*.3,Size*.3)
  277. local a = Size/30
  278. local b = Size/30
  279. local c = (Size/3)*13.25999999
  280. Power1.CFrame = Power1.CFrame*CFrame.Angles(rad(90),0,0)
  281. for i = 1,10 do
  282. m.Scale = m.Scale+Vector3.new(a,b,c/2)
  283. Power1.Transparency = i/10
  284. game:service'RunService'.RenderStepped:wait()
  285. end
  286. m:Destroy()
  287. Power1:Destroy()end)
  288. end
  289.  
  290. Lightning = function(Start,End,Times,Offset,Color,Thickness)
  291.  
  292. local magz = (Start - End).magnitude local curpos = Start local trz = {-Offset,Offset}
  293.  
  294. for i=1,Times do
  295.  
  296. local li = Instance.new("Part",Char) li.TopSurface =0 li.BottomSurface = 0 li.Anchored = true
  297.  
  298. li.Material = "Neon"
  299.  
  300. li:BreakJoints()
  301.  
  302. li.Transparency = 0 li.BrickColor = Color
  303.  
  304. li.formFactor = "Custom" li.CanCollide = false
  305.  
  306. li.Size = Vector3.new(Thickness,Thickness,magz/Times)
  307.  
  308. local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  309.  
  310. local trolpos = CFrame.new(curpos,End)*CFrame.new(0,0,magz/Times).p+ofz
  311.  
  312. if Times == i then
  313.  
  314. local magz2 = (curpos - End).magnitude li.Size = Vector3.new(Thickness,Thickness,magz2)
  315.  
  316. li.CFrame = CFrame.new(curpos,End)*CFrame.new(0,0,-magz2/2)
  317.  
  318. else
  319.  
  320. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
  321.  
  322. end
  323.  
  324. curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p spawn(function() wait() li:Destroy() end)
  325.  
  326.  
  327.  
  328. end
  329.  
  330. end
  331.  
  332. --Feet Welds
  333.  
  334. RightFoot=part(Char,false,false,v3(0,0,0),cf(0,0,0),c3(-1,0,0),"Neon",1)
  335. LeftFoot=part(Char,false,false,v3(0,0,0),cf(0,0,0),c3(-1,0,0),"Neon",1)
  336. RF=it("Weld",Welds)
  337. RF.Name="RF"
  338. RF.Part0=RightFoot
  339. RF.Part1=RLeg
  340. RF.C0=RF.C0*cf(0,1,0)
  341. LF=it("Weld",Welds)
  342. LF.Name="LF"
  343. LF.Part0=LeftFoot
  344. LF.Part1=LLeg
  345. LF.C0=LF.C0*cf(0,1,0)
  346.  
  347. --Click Combo
  348.  
  349. Mouse.Button1Down:connect(function()
  350. if attacking== false and attacktype == 1 and Equipped==false then print"RAWR"
  351. attackone()
  352. attacktype = 2
  353. elseif attacking== false and attacktype == 1 and Equipped==true then print"Swish"
  354. attackfour()
  355. attacktype=2
  356. else
  357. if attacking == false and attacktype == 2 and Equipped==false then print"XD"
  358. attacktwo()
  359. attacktype = 3
  360. elseif attacking == false and attacktype == 2 and Equipped==true then print"Swash"
  361. attackfive()
  362. attacktype=3
  363. else
  364. if attacking == false and attacktype == 3 and Equipped==false then print"DAI"
  365. attackthree()
  366. attacktype = 1
  367. elseif attacking == false and attacktype == 3 and Equipped==true then print"STEB"
  368. attacksix()
  369. attacktype=1
  370. end
  371. end
  372. end
  373. end)
  374.  
  375. --Sounds
  376.  
  377. local Draw=Instance.new("Sound",Sounds)
  378. Draw.Name="Draw"
  379. Draw.SoundId="rbxassetid://608618332"
  380. Draw.Volume=1.1
  381. local poo=it('Sound',Sounds)
  382. poo.Name="JumpEffect"
  383. poo.SoundId="rbxassetid://231917987"
  384. poo.Volume=.3
  385. SFX("rbxassetid://320557487","BasicAttackOne",1)
  386.  
  387. --Key Input Detection
  388.  
  389. Input=""
  390.  
  391. Mouse.KeyDown:connect(function(key) Input=Input..key wait() Input ="" end)
  392. spawn(function()while r:wait() do
  393. if Input=="z" and attacking==false then print(Input)
  394. Input ="" Z()Input=""
  395. elseif Input=="x" and attacking==false then print(Input)
  396. Input="" X()Input=""
  397. elseif Input=="c" and attacking==false then print(Input)
  398. Input=""C()Input=""
  399. elseif Input=="v" and attacking==false then print(Input)
  400. Input=""V()Input=""
  401. end
  402. end end)
  403.  
  404. --Moves
  405.  
  406. Z=function()
  407. RH.C0=clerp(RH.C0,RHC0*angles(rad(-5),rad(0),rad(0)),1)
  408. LH.C0=clerp(LH.C0,LHC0*angles(rad(-5),rad(0),rad(0)),1)
  409. RS.C0=clerp(RS.C0,RSC0*angles(rad(-10),rad(0),rad(0)),1)
  410. LS.C0=clerp(LS.C0,LSC0*angles(rad(-10),rad(0),rad(0)),1)
  411. Neck.C0=clerp(Neck.C0,necko*angles(rad(10),rad(0),rad(-20)),1)
  412. RootJoint.C0=RootJoint.C0:lerp(ROOTC0*angles(rad(0),rad(0),rad(20)),1)
  413. end
  414.  
  415. X=function()
  416. attacking=true
  417. math.randomseed(tick())
  418. math.random()
  419. local ids={"rbxassetid://327264499","rbxassetid://327264897","rbxassetid://331196652","rbxassetid://298947115"}
  420. local Li = Instance.new("BillboardGui",Char)
  421. Li.Size = UDim2.new(0,100,0,40)
  422. Li.StudsOffset = Vector3.new(0,3,0)
  423. Li.Adornee = Torso
  424. Li.Size=UDim2.new(5,0,5,0)
  425. local img=it("ImageLabel",Li)
  426. img.Image=ids[math.random(1,#ids)]
  427. img.BackgroundTransparency=1
  428. img.Size=UDim2.new(1,0,1,0)
  429. for i=1,200000000000000 do r:wait()
  430. img.Image=ids[math.random(1,#ids)]
  431. img.Rotation=math.random(1,360)
  432. end
  433. attacking=false
  434. end
  435. li=function()
  436. local ids={"rbxassetid://327264499","rbxassetid://327264897","rbxassetid://331196652","rbxassetid://298947115"}
  437. local Li = Instance.new("BillboardGui",Torso)
  438. Li.Size = UDim2.new(0,300,0,120)
  439. Li.StudsOffset = Vector3.new(0,0,0)
  440. Li.Adornee = Torso
  441. Li.Size=UDim2.new(5,0,5,0)
  442. local img=it("ImageLabel",Li)
  443. img.Image=ids[math.random(1,#ids)]
  444. img.BackgroundTransparency=1
  445. img.Size=UDim2.new(1,0,1,0) spawn(function()
  446. while op==true do r:wait()
  447. img.Image=ids[math.random(1,#ids)]
  448. img.Rotation=math.random(1,360)
  449. end
  450. Li:Destroy()
  451. end)
  452. end
  453. C=function()
  454. attacking=true
  455. local bv=it("BodyVelocity")
  456. bv.maxForce=v3(huge,huge,huge)
  457.  
  458. for i=1,40 do r:wait()
  459. RootJoint.C0=clerp(RootJoint.C0,ROOTC0*angles(0,0,rad(-90)),.3)
  460. Neck.C0=clerp(Neck.C0,necko*angles(0,0,rad(90)),.3)
  461. RS.C0=clerp(RS.C0,RSC0*angles(rad(-90),0,0),.3)
  462. end
  463. bv.Velocity=((Head.CFrame*angles(0,0,rad(90)).p-Head.CFrame*angles(0,0,rad(90))*cf(0,0,-1).p)*-1).unit*80
  464. local ball=part(Effects,true,false,v3(.2,.2,.2),RArm.CFrame*cf(0,-1.5,0),BrickColor.new('Cyan').Color,"Neon",0)
  465. local bm=mesh(ball,"Sphere",v3(1,1,1))
  466. ball.Shape="Ball"
  467. for i=1,50 do r:wait()
  468. bm.Scale=bm.Scale+v3(.1,.1,.1)
  469. PowerGlow(Effects,RArm.CFrame*cf(0,-1.5,0)*angles(ran(-math.pi,math.pi),ran(-math.pi,math.pi),ran(-math.pi,math.pi)),BrickColor.new('Cyan').Color,'Pastel white',"Neon",i/20)
  470. end
  471. bv.Parent=Torso
  472. spawn(function()
  473. repeat r:wait()
  474. ball.CFrame=RArm.CFrame*cf(0,-1.5,0)
  475. until attacking==false
  476. ball:Destroy()
  477. end)
  478. for i=1,30 do r:wait()
  479. RootJoint.C0=clerp(RootJoint.C0,ROOTC0*angles(rad(45),0,0)*cf(0,0,-.6),.3)
  480. Neck.C0=clerp(Neck.C0,necko*angles(rad(5),0,0),.3)
  481. RS.C0=clerp(RS.C0,RSC0*angles(0,0,rad(90))*cf(.3,0,0),.3)
  482. RH.C0=clerp(RH.C0,RHC0*angles(0,0,rad(-45)),.3)
  483. LH.C0=clerp(LH.C0,LHC0*angles(0,0,rad(-45)),.3)
  484. end
  485. bv:Destroy()
  486. wait(.455)
  487. local fg=Ray.new(RArm.Position+v3(0,-1.5,0),v3(0,-5,0))
  488. local par,pos=workspace:FindPartOnRayWithIgnoreList(fg,Char:children(),false,true)
  489. if par and pos then
  490. local bem=part(Effects,true,false,v3(1,1,1),cf(pos)*angles(0,0,rad(-90)),BrickColor.new("Cyan").Color,"Neon",0)
  491. local beem=mesh(bem,"Cylinder",v3(400,2,400))
  492. local cirs={}
  493. for i=1,3 do r:wait()
  494. local c=part(Effects,true,false,v3(0,0,0),cf(pos)*angles(rad(-90),0,0),BrickColor.new("Cyan").Color,"Neon",0)
  495. local cm=spmesh(c,"rbxassetid://3270017",v3((i*8)+5,(i*8)+5,(i*2)+18))
  496. table.insert(cirs,c)
  497.  
  498. end
  499. for i=1,60 do r:wait()
  500. beem.Scale=beem.Scale+v3(.5,.5,.5)
  501. bem.Transparency=i/180
  502. for _,v in pairs(cirs) do
  503. spawn(function()
  504. v.Transparency=i/60
  505. v.Mesh.Scale=v.Mesh.Scale+v3(.5,.5,.1)
  506. end)
  507. end
  508. end
  509. bem:Destroy()
  510. for _,v in pairs(cirs) do
  511. v:Destroy()
  512. end
  513. end
  514. attacking=false
  515. end
  516. function mhands(cframe)
  517. spawn(function()
  518. l=BrickColor.new('Cyan')
  519. local h=part(Effects,true,false,v3(0,0,0),cframe*angles(ran(-10,10),ran(-10,10),ran(-10,10)),l.Color,"Neon",0)
  520. local hm=mesh(h,"Brick",v3(7*3,7*3,7*3))
  521. for i=1,40 do r:wait()
  522. h.Transparency=i/40
  523. end
  524. h:Destroy()
  525. end)
  526. end
  527. function circles(cfr)
  528. spawn(function()
  529. local cir=part(Effects,true,false,v3(0,0,0),cfr,BrickColor.new('Cyan').Color,"Neon",0)
  530. local cm=spmesh(cir,"rbxassetid://3270017",v3(4,4,2))
  531. for i=1,180 do r:wait()
  532. cm.Scale=cm.Scale+v3(2,2,2)
  533. cir.Transparency=i/10
  534. end
  535. cir:Destroy()
  536. end)
  537. end
  538. V=function()
  539. attacking=true
  540. Human.WalkSpeed=0
  541. Human.JumpPower=0
  542. li()
  543. function sw(t) spawn(function()
  544. local c=part(Effects,true,false,v3(0,0,0),Torso.CFrame*cf(0,-1.3,0),l.Color,"Neon",.9)
  545. local cm=spmesh(c,"rbxassetid://20329976",v3(6,2,6))
  546. for i=1,100 do r:wait()
  547. cm.Scale=cm.Scale:Lerp(cm.Scale+Vector3.new(4,-.021,4),1)
  548. if t==true then
  549. c.CFrame=c.CFrame*angles(0,rad(i),0)
  550. elseif t==false then
  551. c.CFrame=c.CFrame*angles(0,rad(i*-1),0)
  552. end
  553. c.Transparency=.9+i/100
  554. end
  555. c:Destroy() end)
  556. end
  557. for i=1,100 do r:wait()
  558. if i%3==0 then
  559. mhands(RArm.CFrame*cf(0,-1.5,0))
  560. mhands(LArm.CFrame*cf(0,-1.5,0))
  561. sw(true)
  562. end
  563. if i%4==0 then
  564. Lightning(RArm.CFrame*cf(0,-1.5,0).p,RArm.CFrame*cf(0,-30,0).p,7,3,BrickColor.new('Cyan'),.2)
  565. Lightning(LArm.CFrame*cf(0,-1.5,0).p,LArm.CFrame*cf(0,-30,0).p,7,3,BrickColor.new('Cyan'),.2)
  566. circles(Torso.CFrame*cf(-30,0,0)*angles(0,math.pi/2,0))
  567. circles(Torso.CFrame*cf(30,0,0)*angles(0,math.pi/2,0))
  568. sw(false)
  569. end
  570. Damage(Torso.CFrame,.5,1,30)
  571. PowerGlow(Effects,Torso.CFrame*cf(ran(-10,10),-1.3,ran(-10,10)),BrickColor.new('Cyan').Color,'Pastel white',"Neon",3)
  572. RH.C0=clerp(RH.C0,RHC0*angles(rad(0),rad(0),rad(0))*cf(0,0,0),.3)
  573. LH.C0=clerp(LH.C0,LHC0*angles(rad(0),rad(0),rad(0))*cf(0,0,0),.3)
  574. RS.C0=clerp(RS.C0,RSC0*angles(rad(-90),rad(0),rad(0))*cf(0,0,0),.3)
  575. LS.C0=clerp(LS.C0,LSC0*angles(rad(-90),rad(0),rad(10)),.3)
  576. Neck.C0=clerp(Neck.C0,necko*angles(rad(-15),rad(0),rad(0)),.3)
  577. RootJoint.C0=RootJoint.C0:lerp(ROOTC0*angles(rad(0),rad(0),rad(0)),.3)
  578. end
  579. Lightning(Torso.Position,Torso.Position+v3(0,200,0),18,3,BrickColor.new('Cyan'),4)
  580. local cc=it("ColorCorrectionEffect",game.Lighting)
  581. cc.Brightness=1
  582. local p=part(Effects,true,false,v3(0,0,0),Torso.CFrame,BrickColor.new('Cyan').Color,"Neon",0)
  583. local pm=mesh(p,"Sphere",v3(1,1,1))
  584. spawn(function()
  585. for i=50,1,-1 do r:wait()
  586. cc.Brightness=i/50
  587. end
  588. cc:Destroy()
  589. end)
  590. spawn(function()for c=1,25 do r:wait()
  591. pm.Scale=pm.Scale+v3(3,3,3)
  592. p.Transparency=c/25
  593.  
  594. end
  595. local EyePart=part(Char,false,false,v3(.3,.3,.3),Torso.CFrame,BrickColor.new('Cyan').Color,"Neon",0)
  596. EyePart.Name="EyePart"
  597. EyePart.Shape="Ball"
  598. local EyePart2=EyePart:Clone()
  599. EyePart2.Parent=Char
  600. local EyeWeld=it("Weld",Char)
  601. EyeWeld.Part0=EyePart
  602. EyeWeld.Part1=Head
  603. EyeWeld.C0=EyeWeld.C0*cf(.2,-.25,.578)
  604. local EyeWeld2=it("Weld",Char)
  605. EyeWeld2.Part0=EyePart2
  606. EyeWeld2.Part1=Head
  607. EyeWeld2.C0=EyeWeld2.C0*cf(-.2,-.25,.578)
  608. local EyeSizes={
  609. NumberSequenceKeypoint.new(0,.4,0),
  610. NumberSequenceKeypoint.new(1,0,0)
  611. }
  612. local EyeTrans={
  613. NumberSequenceKeypoint.new(0,0,0),
  614. NumberSequenceKeypoint.new(1,1,0)
  615. }
  616. local PE=it("ParticleEmitter",EyePart)
  617. PE.LightEmission=1
  618. PE.LockedToPart=false
  619. PE.Size=NumberSequence.new(EyeSizes)
  620. PE.Transparency=NumberSequence.new(EyeTrans)
  621. --PE.Acceleration=v3(2,0,0)
  622. PE.Lifetime=NumberRange.new(2,2,2)
  623. PE.Rate=34958349053045
  624. PE.Speed=NumberRange.new(2,2,2)
  625. PE.Texture="rbxassetid://253188606"
  626. local PE2=PE:Clone()
  627. PE2.Parent=EyePart2
  628. while r:wait() do
  629. PE.Acceleration=v3(math.sin(tick()),0,math.sin(tick()))
  630. PE2.Acceleration=v3(math.cos(tick()),0,math.cos(tick()))
  631. end
  632. local p = game.Players.LocalPlayer
  633. local char = p.Character
  634. local mouse = p:GetMouse()
  635. local larm = char["Left Arm"]
  636. local rarm = char["Right Arm"]
  637. local lleg = char["Left Leg"]
  638. local rleg = char["Right Leg"]
  639. local hed = char.Head
  640. local torso = char.Torso
  641. local hum = char.Humanoid
  642. local cam = game.Workspace.CurrentCamera
  643. local root = char.HumanoidRootPart
  644. local deb = false
  645. local shot = 0
  646. local debris=game:service"Debris"
  647. local l = game:GetService("Lighting")
  648. local rs = game:GetService("RunService").RenderStepped
  649. ptz = {0.8, 0.85, 0.9, 0.95, 1, 1.05, 1.1}
  650. math.randomseed(os.time())
  651. ----------------------------------------------------
  652. function Lightning(Part0,Part1,Times,Offset,Color,Thickness,Trans) -- Lightning module
  653. --[[Part0 = Vector3 (Start pos)
  654. Part1 = Vector3 (End pos)
  655. Times = number (Amount of lightning parts)
  656. Offset = number (Offset)
  657. Color = color (brickcolor value)
  658. Thickness = number (thickness)
  659. Trans = number (transparency)
  660. ]]--
  661. local magz = (Part0 - Part1).magnitude
  662. local curpos = Part0
  663. local trz = {-Offset,Offset}
  664. for i=1,Times do
  665. local li = Instance.new("Part", torso)
  666. li.Name = "Lightning"
  667. li.TopSurface =0
  668. li.Material = "Neon"
  669. li.BottomSurface = 0
  670. li.Anchored = true
  671. li.Locked = true
  672. li.Transparency = Trans or 1
  673. li.BrickColor = BrickColor.new(Color)
  674. li.formFactor = "Custom"
  675. li.CanCollide = false
  676. li.Size = Vector3.new(Thickness,Thickness,magz/Times)
  677. local Offzet = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  678. local trolpos = CFrame.new(curpos,Part1)*CFrame.new(0,0,magz/Times).p+Offzet
  679. if Times == i then
  680. local magz2 = (curpos - Part1).magnitude
  681. li.Size = Vector3.new(Thickness,Thickness,magz2)
  682. li.CFrame = CFrame.new(curpos,Part1)*CFrame.new(0,0,-magz2/2)
  683. else
  684. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
  685. end
  686. curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p
  687. game.Debris:AddItem(li,.1)
  688. end
  689. end
  690.  
  691. BodyParts = {} -- Parts to emit lightning effects from
  692. for _, v in pairs(char:GetChildren()) do
  693. if v:IsA("Part") and v.Name ~= "HumanoidRootPart" then
  694. table.insert(BodyParts, v)
  695. end
  696. end
  697.  
  698. Bounding = {} -- Calculate the bounding boxes
  699. for _, v in pairs(BodyParts) do
  700. local temp = {X=nil, Y=nil, Z=nil}
  701. temp.X = v.Size.X/2 * 10
  702. temp.Y = v.Size.Y/2 * 10
  703. temp.Z = v.Size.Z/2 * 10
  704. Bounding[v.Name] = temp
  705. --table.insert(Bounding, v.Name, temp)
  706. end
  707.  
  708. while wait() do -- Emit the Lightning effects randomly
  709. local Body1 = BodyParts[math.random(#BodyParts)]
  710. local Body2 = BodyParts[math.random(#BodyParts)]
  711. local Pos1 = Vector3.new(
  712. math.random(-Bounding[Body1.Name].X, Bounding[Body1.Name].X)/10,
  713. math.random(-Bounding[Body1.Name].Y, Bounding[Body1.Name].Y)/10,
  714. math.random(-Bounding[Body1.Name].Z, Bounding[Body1.Name].Z)/10
  715. )
  716. local Pos2 = Vector3.new(
  717. math.random(-Bounding[Body2.Name].X, Bounding[Body2.Name].X)/10,
  718. math.random(-Bounding[Body2.Name].Y, Bounding[Body2.Name].Y)/10,
  719. math.random(-Bounding[Body2.Name].Z, Bounding[Body2.Name].Z)/10
  720. )
  721. local SPos1 = Body1.Position + Pos1
  722. local SPos2 = Body2.Position + Pos2
  723. Lightning(SPos1, SPos2, 40, 3, "Cyan", .000001, 0)
  724. end
  725. end)
  726. for i=1,10 do r:wait() spawn(function()
  727. local c=part(Effects,true,false,v3(1,1,1),Head.CFrame,BrickColor.new("Cyan").Color,"Neon",.4)
  728. local c2=part(Effects,true,false,v3(1,1,1),Head.CFrame,BrickColor.new("Cyan").Color,"Neon",.4)
  729. local cm=spmesh(c,"rbxassetid://3270017",v3(1,1,.4))
  730. local cm2=spmesh(c2,"rbxassetid://3270017",v3(1,1,.4))
  731. for ii=1,60 do r:wait()
  732. c.CFrame=c.CFrame*angles(ran(-math.pi,math.pi),ran(-math.pi,math.pi),ran(-math.pi,math.pi))
  733. c2.CFrame=c2.CFrame*angles(ran(-math.pi,math.pi),ran(-math.pi,math.pi),ran(-math.pi,math.pi))
  734. cm.Scale=cm.Scale+v3(4,4,0)
  735. cm2.Scale=cm2.Scale+v3(4,4,0)
  736. c.Transparency=.4+ii/50
  737. c2.Transparency=.4+ii/50
  738. Damage(Torso.CFrame,8,20,35)
  739. end
  740. end) wait()
  741. end
  742. wait(.75)
  743. li()
  744. p:Destroy()
  745. Human.WalkSpeed=20
  746. Human.JumpPower=50
  747. attacking=false
  748. op=true
  749. for _,v in pairs(Effects:GetChildren()) do
  750. v:Destroy()
  751. end
  752. for i=1,40 do r:wait()
  753. if attacking==true then break end
  754. RH.C0=clerp(RH.C0,RHC01,.3)
  755. LH.C0=clerp(LH.C0,LHC01,.3)
  756. RS.C0=clerp(RS.C0,RSC01,.3)
  757. LS.C0=clerp(LS.C0,LSC01,.3)
  758. Neck.C0=clerp(Neck.C0,NECKC01,.3)
  759. RootJoint.C0=clerp(RootJoint.C0,ROOTC01,.3)
  760. end
  761. end
  762.  
  763. spawn(function()
  764. for i=1,huge do r:wait()
  765. if op==true then
  766. if i%5 ==0 then
  767. sw(true)
  768. sw(false)
  769. mhands(RArm.CFrame*cf(0,-1.5,0))
  770. mhands(LArm.CFrame*cf(0,-1.5,0))
  771. end
  772. if i%40==0 then
  773. Lightning(Torso.CFrame*cf(ran(-10,10),ran(-3,10),ran(-10,10)).p,Torso.CFrame*cf(ran(-10,10),ran(-3,10),ran(-10,10)).p,4,3,BrickColor.new('Cyan'),.2)
  774. end
  775. end
  776. end
  777. end)
  778. while r:wait() do detect_state() end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement