Advertisement
memberhero

Deadly Laser Sun V3

Jan 25th, 2019
3,501
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --//====================================================\\--
  2. --|| CREATED BY SHACKLUSTER
  3. --\\====================================================//--
  4.  
  5. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  6. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  7. do
  8. print("FE Compatibility code by Mokiros")
  9. script.Parent = Player.Character
  10.  
  11. --RemoteEvent for communicating
  12. local Event = Instance.new("RemoteEvent")
  13. Event.Name = "UserInput_Event"
  14.  
  15. --Fake event to make stuff like Mouse.KeyDown work
  16. local function fakeEvent()
  17. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  18. t.connect = t.Connect
  19. return t
  20. end
  21.  
  22. --Creating fake input objects with fake variables
  23. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  24. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  25. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  26. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  27. end}
  28. --Merged 2 functions into one by checking amount of arguments
  29. CAS.UnbindAction = CAS.BindAction
  30.  
  31. --This function will trigger the events that have been :Connect()'ed
  32. local function te(self,ev,...)
  33. local t = m[ev]
  34. if t and t._fakeEvent and t.Function then
  35. t.Function(...)
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=Player then return end
  43. if io.isMouse then
  44. m.Target = io.Target
  45. m.Hit = io.Hit
  46. else
  47. local b = io.UserInputState == Enum.UserInputState.Begin
  48. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  49. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  50. end
  51. for _,t in pairs(CAS.Actions) do
  52. for _,k in pairs(t.Keys) do
  53. if k==io.KeyCode then
  54. t.Function(t.Name,io.UserInputState,io)
  55. end
  56. end
  57. end
  58. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  59. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  60. end
  61. end)
  62. Event.Parent = NLS([==[
  63. local Player = game:GetService("Players").LocalPlayer
  64. local Event = script:WaitForChild("UserInput_Event")
  65.  
  66. local UIS = game:GetService("UserInputService")
  67. local input = function(io,a)
  68. if a then return end
  69. --Since InputObject is a client-side instance, we create and pass table instead
  70. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  71. end
  72. UIS.InputBegan:Connect(input)
  73. UIS.InputEnded:Connect(input)
  74.  
  75. local Mouse = Player:GetMouse()
  76. local h,t
  77. --Give the server mouse data 30 times every second, but only if the values changed
  78. --If player is not moving their mouse, client won't fire events
  79. while wait(1/30) do
  80. if h~=Mouse.Hit or t~=Mouse.Target then
  81. h,t=Mouse.Hit,Mouse.Target
  82. Event:FireServer({isMouse=true,Target=t,Hit=h})
  83. end
  84. end]==],Player.Character)
  85. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  86. end
  87. wait(0.2)
  88. print("VengefulProgram is sexy from dreamer no homo")
  89. Player = owner
  90. PlayerGui = Player.PlayerGui
  91. Cam = workspace.CurrentCamera
  92. Backpack = Player.Backpack
  93. Character = Player.Character
  94. Humanoid = Character.Humanoid
  95.  
  96. RootPart = Character["HumanoidRootPart"]
  97. Torso = Character["Torso"]
  98. Head = Character["Head"]
  99. RightArm = Character["Right Arm"]
  100. LeftArm = Character["Left Arm"]
  101. RightLeg = Character["Right Leg"]
  102. LeftLeg = Character["Left Leg"]
  103. RootJoint = RootPart["RootJoint"]
  104. Neck = Torso["Neck"]
  105. RightShoulder = Torso["Right Shoulder"]
  106. LeftShoulder = Torso["Left Shoulder"]
  107. RightHip = Torso["Right Hip"]
  108. LeftHip = Torso["Left Hip"]
  109.  
  110. IT = Instance.new
  111. CF = CFrame.new
  112. VT = Vector3.new
  113. RAD = math.rad
  114. C3 = Color3.new
  115. UD2 = UDim2.new
  116. BRICKC = BrickColor.new
  117. ANGLES = CFrame.Angles
  118. EULER = CFrame.fromEulerAnglesXYZ
  119. COS = math.cos
  120. ACOS = math.acos
  121. SIN = math.sin
  122. ASIN = math.asin
  123. ABS = math.abs
  124. MRANDOM = math.random
  125. FLOOR = math.floor
  126.  
  127. --//=================================\\
  128. --|| USEFUL VALUES
  129. --\\=================================//
  130.  
  131. Animation_Speed = 3
  132. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  133. local Speed = 16
  134. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  135. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  136. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  137. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  138. local DAMAGEMULTIPLIER = 1
  139. local ANIM = "Idle"
  140. local ATTACK = false
  141. local EQUIPPED = false
  142. local HOLD = false
  143. local COMBO = 1
  144. local Rooted = false
  145. local SINE = 0
  146. local KEYHOLD = false
  147. local CHANGE = 2 / Animation_Speed
  148. local WALKINGANIM = false
  149. local VALUE1 = false
  150. local VALUE2 = false
  151. local ROBLOXIDLEANIMATION = IT("Animation")
  152. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  153. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  154. --ROBLOXIDLEANIMATION.Parent = Humanoid
  155. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  156. WEAPONGUI.Name = "Weapon GUI"
  157. local Effects = IT("Folder", Character)
  158. Effects.Name = "Effects"
  159. local ANIMATOR = Humanoid.Animator
  160. local ANIMATE = Character.Animate
  161. local UNANCHOR = true
  162. local CUSTOMANGLES = true
  163.  
  164. --//=================================\\
  165. --\\=================================//
  166.  
  167.  
  168. --//=================================\\
  169. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  170. --\\=================================//
  171.  
  172. ArtificialHB = Instance.new("BindableEvent", script)
  173. ArtificialHB.Name = "ArtificialHB"
  174.  
  175. script:WaitForChild("ArtificialHB")
  176.  
  177. frame = Frame_Speed
  178. tf = 0
  179. allowframeloss = false
  180. tossremainder = false
  181. lastframe = tick()
  182. script.ArtificialHB:Fire()
  183.  
  184. game:GetService("RunService").Heartbeat:connect(function(s, p)
  185. tf = tf + s
  186. if tf >= frame then
  187. if allowframeloss then
  188. ArtificialHB:Fire()
  189. lastframe = tick()
  190. else
  191. for i = 1, math.floor(tf / frame) do
  192. ArtificialHB:Fire()
  193. end
  194. lastframe = tick()
  195. end
  196. if tossremainder then
  197. tf = 0
  198. else
  199. tf = tf - frame * math.floor(tf / frame)
  200. end
  201. end
  202. end)
  203.  
  204. --//=================================\\
  205. --\\=================================//
  206.  
  207. --//=================================\\
  208. --|| SOME FUNCTIONS
  209. --\\=================================//
  210.  
  211. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  212. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  213. end
  214.  
  215. function PositiveAngle(NUMBER)
  216. if NUMBER >= 0 then
  217. NUMBER = 0
  218. end
  219. return NUMBER
  220. end
  221.  
  222. function NegativeAngle(NUMBER)
  223. if NUMBER <= 0 then
  224. NUMBER = 0
  225. end
  226. return NUMBER
  227. end
  228.  
  229. function Swait(NUMBER)
  230. if NUMBER == 0 or NUMBER == nil then
  231. ArtificialHB.Event:wait()
  232. else
  233. for i = 1, NUMBER do
  234. ArtificialHB.Event:wait()
  235. end
  236. end
  237. end
  238.  
  239. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  240. local NEWMESH = IT(MESH)
  241. if MESH == "SpecialMesh" then
  242. NEWMESH.MeshType = MESHTYPE
  243. if MESHID ~= "nil" and MESHID ~= "" then
  244. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  245. end
  246. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  247. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  248. end
  249. end
  250. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  251. NEWMESH.Scale = SCALE
  252. NEWMESH.Parent = PARENT
  253. return NEWMESH
  254. end
  255.  
  256. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  257. local NEWPART = IT("Part")
  258. NEWPART.formFactor = FORMFACTOR
  259. NEWPART.Reflectance = REFLECTANCE
  260. NEWPART.Transparency = TRANSPARENCY
  261. NEWPART.CanCollide = false
  262. NEWPART.Locked = true
  263. NEWPART.Anchored = true
  264. if ANCHOR == false then
  265. NEWPART.Anchored = false
  266. end
  267. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  268. NEWPART.Name = NAME
  269. NEWPART.Size = SIZE
  270. NEWPART.Position = Torso.Position
  271. NEWPART.Material = MATERIAL
  272. NEWPART:BreakJoints()
  273. NEWPART.Parent = PARENT
  274. return NEWPART
  275. end
  276.  
  277. local function weldBetween(a, b)
  278. local weldd = Instance.new("ManualWeld")
  279. weldd.Part0 = a
  280. weldd.Part1 = b
  281. weldd.C0 = CFrame.new()
  282. weldd.C1 = b.CFrame:inverse() * a.CFrame
  283. weldd.Parent = a
  284. return weldd
  285. end
  286.  
  287.  
  288. function QuaternionFromCFrame(cf)
  289. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  290. local trace = m00 + m11 + m22
  291. if trace > 0 then
  292. local s = math.sqrt(1 + trace)
  293. local recip = 0.5 / s
  294. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  295. else
  296. local i = 0
  297. if m11 > m00 then
  298. i = 1
  299. end
  300. if m22 > (i == 0 and m00 or m11) then
  301. i = 2
  302. end
  303. if i == 0 then
  304. local s = math.sqrt(m00 - m11 - m22 + 1)
  305. local recip = 0.5 / s
  306. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  307. elseif i == 1 then
  308. local s = math.sqrt(m11 - m22 - m00 + 1)
  309. local recip = 0.5 / s
  310. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  311. elseif i == 2 then
  312. local s = math.sqrt(m22 - m00 - m11 + 1)
  313. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  314. end
  315. end
  316. end
  317.  
  318. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  319. local xs, ys, zs = x + x, y + y, z + z
  320. local wx, wy, wz = w * xs, w * ys, w * zs
  321. local xx = x * xs
  322. local xy = x * ys
  323. local xz = x * zs
  324. local yy = y * ys
  325. local yz = y * zs
  326. local zz = z * zs
  327. return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
  328. end
  329.  
  330. function QuaternionSlerp(a, b, t)
  331. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  332. local startInterp, finishInterp;
  333. if cosTheta >= 0.0001 then
  334. if (1 - cosTheta) > 0.0001 then
  335. local theta = ACOS(cosTheta)
  336. local invSinTheta = 1 / SIN(theta)
  337. startInterp = SIN((1 - t) * theta) * invSinTheta
  338. finishInterp = SIN(t * theta) * invSinTheta
  339. else
  340. startInterp = 1 - t
  341. finishInterp = t
  342. end
  343. else
  344. if (1 + cosTheta) > 0.0001 then
  345. local theta = ACOS(-cosTheta)
  346. local invSinTheta = 1 / SIN(theta)
  347. startInterp = SIN((t - 1) * theta) * invSinTheta
  348. finishInterp = SIN(t * theta) * invSinTheta
  349. else
  350. startInterp = t - 1
  351. finishInterp = t
  352. end
  353. end
  354. return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
  355. end
  356.  
  357. function Clerp(a, b, t)
  358. local qa = {QuaternionFromCFrame(a)}
  359. local qb = {QuaternionFromCFrame(b)}
  360. local ax, ay, az = a.x, a.y, a.z
  361. local bx, by, bz = b.x, b.y, b.z
  362. local _t = 1 - t
  363. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  364. end
  365.  
  366. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  367. local frame = IT("Frame")
  368. frame.BackgroundTransparency = TRANSPARENCY
  369. frame.BorderSizePixel = BORDERSIZEPIXEL
  370. frame.Position = POSITION
  371. frame.Size = SIZE
  372. frame.BackgroundColor3 = COLOR
  373. frame.BorderColor3 = BORDERCOLOR
  374. frame.Name = NAME
  375. frame.Parent = PARENT
  376. return frame
  377. end
  378.  
  379. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  380. local label = IT("TextLabel")
  381. label.BackgroundTransparency = 1
  382. label.Size = UD2(1, 0, 1, 0)
  383. label.Position = UD2(0, 0, 0, 0)
  384. label.TextColor3 = TEXTCOLOR
  385. label.TextStrokeTransparency = STROKETRANSPARENCY
  386. label.TextTransparency = TRANSPARENCY
  387. label.FontSize = TEXTFONTSIZE
  388. label.Font = TEXTFONT
  389. label.BorderSizePixel = BORDERSIZEPIXEL
  390. label.TextScaled = false
  391. label.Text = TEXT
  392. label.Name = NAME
  393. label.Parent = PARENT
  394. return label
  395. end
  396.  
  397. function NoOutlines(PART)
  398. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  399. end
  400.  
  401. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  402. local NEWWELD = IT(TYPE)
  403. NEWWELD.Part0 = PART0
  404. NEWWELD.Part1 = PART1
  405. NEWWELD.C0 = C0
  406. NEWWELD.C1 = C1
  407. NEWWELD.Parent = PARENT
  408. return NEWWELD
  409. end
  410.  
  411. local S = IT("Sound")
  412. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  413. local NEWSOUND = nil
  414. coroutine.resume(coroutine.create(function()
  415. NEWSOUND = S:Clone()
  416. NEWSOUND.Parent = PARENT
  417. NEWSOUND.Volume = VOLUME
  418. NEWSOUND.Pitch = PITCH
  419. NEWSOUND.SoundId = "rbxassetid://"..ID
  420. NEWSOUND:play()
  421. if DOESLOOP == true then
  422. NEWSOUND.Looped = true
  423. else
  424. repeat wait(1) until NEWSOUND.Playing == false
  425. NEWSOUND:remove()
  426. end
  427. end))
  428. return NEWSOUND
  429. end
  430.  
  431. function CFrameFromTopBack(at, top, back)
  432. local right = top:Cross(back)
  433. return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  434. end
  435.  
  436. --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
  437. function WACKYEFFECT(Table)
  438. local TYPE = (Table.EffectType or "Sphere")
  439. local SIZE = (Table.Size or VT(1,1,1))
  440. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  441. local TRANSPARENCY = (Table.Transparency or 0)
  442. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  443. local CFRAME = (Table.CFrame or Torso.CFrame)
  444. local MOVEDIRECTION = (Table.MoveToPos or nil)
  445. local ROTATION1 = (Table.RotationX or 0)
  446. local ROTATION2 = (Table.RotationY or 0)
  447. local ROTATION3 = (Table.RotationZ or 0)
  448. local MATERIAL = (Table.Material or "Neon")
  449. local COLOR = (Table.Color or C3(1,1,1))
  450. local TIME = (Table.Time or 45)
  451. local SOUNDID = (Table.SoundID or nil)
  452. local SOUNDPITCH = (Table.SoundPitch or nil)
  453. local SOUNDVOLUME = (Table.SoundVolume or nil)
  454. local USEBOOMERANGMATH = (Table.UseBoomerangMath or false)
  455. local BOOMERANG = (Table.Boomerang or 0)
  456. local SIZEBOOMERANG = (Table.SizeBoomerang or 0)
  457. coroutine.resume(coroutine.create(function()
  458. local PLAYSSOUND = false
  459. local SOUND = nil
  460. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  461. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  462. PLAYSSOUND = true
  463. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  464. end
  465. EFFECT.Color = COLOR
  466. local MSH = nil
  467. if TYPE == "Sphere" then
  468. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  469. elseif TYPE == "Block" or TYPE == "Box" then
  470. MSH = IT("BlockMesh",EFFECT)
  471. MSH.Scale = SIZE
  472. elseif TYPE == "Wave" then
  473. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  474. elseif TYPE == "Ring" then
  475. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  476. elseif TYPE == "Slash" then
  477. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  478. elseif TYPE == "Round Slash" then
  479. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  480. elseif TYPE == "Swirl" then
  481. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "168892432", "", SIZE, VT(0,0,0))
  482. elseif TYPE == "Skull" then
  483. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  484. elseif TYPE == "Crystal" then
  485. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  486. end
  487. if MSH ~= nil then
  488. local BOOMR1 = 1+BOOMERANG/50
  489. local BOOMR2 = 1+SIZEBOOMERANG/50
  490. local MOVESPEED = nil
  491. if MOVEDIRECTION ~= nil then
  492. if USEBOOMERANGMATH == true then
  493. MOVESPEED = ((CFRAME.p - MOVEDIRECTION).Magnitude/TIME)*BOOMR1
  494. else
  495. MOVESPEED = ((CFRAME.p - MOVEDIRECTION).Magnitude/TIME)
  496. end
  497. end
  498. local GROWTH = nil
  499. if USEBOOMERANGMATH == true then
  500. GROWTH = (SIZE - ENDSIZE)*(BOOMR2+1)
  501. else
  502. GROWTH = (SIZE - ENDSIZE)
  503. end
  504. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  505. if TYPE == "Block" then
  506. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  507. else
  508. EFFECT.CFrame = CFRAME
  509. end
  510. if USEBOOMERANGMATH == true then
  511. for LOOP = 1, TIME+1 do
  512. Swait()
  513. MSH.Scale = MSH.Scale - (VT((GROWTH.X)*((1 - (LOOP/TIME)*BOOMR2)),(GROWTH.Y)*((1 - (LOOP/TIME)*BOOMR2)),(GROWTH.Z)*((1 - (LOOP/TIME)*BOOMR2)))*BOOMR2)/TIME
  514. if TYPE == "Wave" then
  515. MSH.Offset = VT(0,0,-MSH.Scale.Z/8)
  516. end
  517. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  518. if TYPE == "Block" then
  519. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  520. else
  521. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  522. end
  523. if MOVEDIRECTION ~= nil then
  524. local ORI = EFFECT.Orientation
  525. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-(MOVESPEED)*((1 - (LOOP/TIME)*BOOMR1)))
  526. EFFECT.CFrame = CF(EFFECT.Position)*ANGLES(RAD(ORI.X),RAD(ORI.Y),RAD(ORI.Z))
  527. end
  528. end
  529. else
  530. for LOOP = 1, TIME+1 do
  531. Swait()
  532. MSH.Scale = MSH.Scale - GROWTH/TIME
  533. if TYPE == "Wave" then
  534. MSH.Offset = VT(0,0,-MSH.Scale.Z/8)
  535. end
  536. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  537. if TYPE == "Block" then
  538. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  539. else
  540. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  541. end
  542. if MOVEDIRECTION ~= nil then
  543. local ORI = EFFECT.Orientation
  544. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  545. EFFECT.CFrame = CF(EFFECT.Position)*ANGLES(RAD(ORI.X),RAD(ORI.Y),RAD(ORI.Z))
  546. end
  547. end
  548. end
  549. EFFECT.Transparency = 1
  550. if PLAYSSOUND == false then
  551. EFFECT:remove()
  552. else
  553. repeat Swait() until EFFECT:FindFirstChildOfClass("Sound") == nil
  554. EFFECT:remove()
  555. end
  556. else
  557. if PLAYSSOUND == false then
  558. EFFECT:remove()
  559. else
  560. repeat Swait() until EFFECT:FindFirstChildOfClass("Sound") == nil
  561. EFFECT:remove()
  562. end
  563. end
  564. end))
  565. end
  566.  
  567. function MakeForm(PART,TYPE)
  568. if TYPE == "Cyl" then
  569. local MSH = IT("CylinderMesh",PART)
  570. elseif TYPE == "Ball" then
  571. local MSH = IT("SpecialMesh",PART)
  572. MSH.MeshType = "Sphere"
  573. elseif TYPE == "Wedge" then
  574. local MSH = IT("SpecialMesh",PART)
  575. MSH.MeshType = "Wedge"
  576. end
  577. end
  578.  
  579. Debris = game:GetService("Debris")
  580.  
  581. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  582. local DIRECTION = CF(StartPos,EndPos).lookVector
  583. local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
  584. return game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, DIRECTION * Distance), Ignore)
  585. end
  586.  
  587. local Particle = IT("ParticleEmitter",nil)
  588. Particle.Enabled = false
  589. Particle.LightEmission = 0.8
  590. Particle.Rate = 150
  591. Particle.ZOffset = 1
  592. Particle.Rotation = NumberRange.new(-180, 180)
  593.  
  594. --ParticleEmitter({Speed = 2, RotSpeed = NumberRange.new(-5, 5), Drag = 0, Size1 = 1, Size2 = 0, Lifetime1 = 1, Lifetime2 = 0, Parent = Torso, Emit = 10, Offset = 360, Enabled = false, Color1 = C3(1,1,1), Color2 = C3(1,1,1), Texture = ""})
  595. function ParticleEmitter(Table)
  596. local PRTCL = Particle:Clone()
  597. local Color1 = Table.Color1 or C3(1,1,1)
  598. local Color2 = Table.Color2 or C3(1,1,1)
  599. local Speed = Table.Speed or 5
  600. local Drag = Table.Drag or 0
  601. local Size1 = Table.Size1 or 1
  602. local Size2 = Table.Size2 or 5
  603. local Lifetime1 = Table.Lifetime1 or 1
  604. local Lifetime2 = Table.Lifetime2 or 1.5
  605. local Parent = Table.Parent or Torso
  606. local Emit = Table.Emit or 100
  607. local Offset = Table.Offset or 360
  608. local Acel = Table.Acel or VT(0,0,0)
  609. local Enabled = Table.Enabled or false
  610. local Texture = Table.Texture or "281983280"
  611. local RotS = Table.RotSpeed or NumberRange.new(-15, 15)
  612. local Trans1 = Table.Transparency1 or 0
  613. local Trans2 = Table.Transparency2 or 0
  614. PRTCL.Parent = Parent
  615. PRTCL.RotSpeed = RotS
  616. PRTCL.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,Trans1),NumberSequenceKeypoint.new(1,Trans2)})
  617. PRTCL.Texture = "http://www.roblox.com/asset/?id="..Texture
  618. PRTCL.Color = ColorSequence.new(Color1,Color2)
  619. PRTCL.Size = NumberSequence.new(Size1,Size2)
  620. PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
  621. PRTCL.Speed = NumberRange.new(Speed)
  622. PRTCL.VelocitySpread = Offset
  623. PRTCL.Drag = Drag
  624. PRTCL.Acceleration = Acel
  625. if Enabled == false then
  626. PRTCL:Emit(Emit)
  627. Debris:AddItem(PRTCL,Lifetime2)
  628. else
  629. PRTCL.Enabled = true
  630. end
  631. return PRTCL
  632. end
  633.  
  634. function AttackGyro()
  635. local GYRO = IT("BodyGyro",RootPart)
  636. GYRO.D = 15
  637. GYRO.P = 200000
  638. GYRO.MaxTorque = VT(0,4000000,0)
  639. GYRO.CFrame = CF(RootPart.Position,Mouse.Hit.p)
  640. coroutine.resume(coroutine.create(function()
  641. repeat
  642. Swait()
  643. GYRO.CFrame = CF(RootPart.Position,Mouse.Hit.p)
  644. until ATTACK == false
  645. GYRO:Remove()
  646. end))
  647. end
  648.  
  649. --//=================================\\
  650. --|| GUIS AND MISC
  651. --\\=================================//
  652.  
  653. local CAMTYPE = Cam.CameraType
  654. Cam.CameraType = Enum.CameraType.Scriptable
  655.  
  656. local ATTACKS = {2035463713,2035463980,2035464212,2035464495}
  657.  
  658. local BMUSIC = IT("Sound",RootPart)
  659. local VOLUME = 4.5
  660. local PITCH = 1.15
  661. local SONGID = 904882921
  662. local INTROD = false
  663. local SUN = CreatePart(3, nil, "Neon", 0, 0, BRICKC("New Yeller"), "Sun", VT(17,17,17), true)
  664. MakeForm(SUN,"Ball")
  665. local SUNFLOAT = true
  666. local CUSTOMCAM = true
  667.  
  668. --//=================================\\
  669. --|| DAMAGING
  670. --\\=================================//
  671.  
  672. function ApplyAoE(POSITION,RANGE,FLING,KILLME)
  673. for index, CHILD in pairs(workspace:GetDescendants()) do
  674. if CHILD.ClassName == "Model" and CHILD ~= Character then
  675. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  676. if HUM then
  677. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  678. if TORSO and HUM.Health > 0 then
  679. if (TORSO.Position - POSITION).Magnitude <= RANGE then
  680. CHILD:BreakJoints()
  681. local HED = CHILD:FindFirstChild("Head")
  682. if HED and MRANDOM(1,15) == 1 then
  683. CreateSound(527749592, HED, 4, MRANDOM(9,11)/10, false)
  684. end
  685. if FLING > 0 then
  686. for _, c in pairs(CHILD:GetChildren()) do
  687. if c:IsA("BasePart") then
  688. local bv = Instance.new("BodyVelocity")
  689. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  690. bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING
  691. bv.Parent = c
  692. Debris:AddItem(bv,0.05)
  693. end
  694. end
  695. end
  696. end
  697. end
  698. end
  699. end
  700. end
  701. if KILLME == true then
  702. Character:BreakJoints()
  703. for _, c in pairs(Character:GetChildren()) do
  704. if c:IsA("BasePart") then
  705. local bv = Instance.new("BodyVelocity")
  706. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  707. bv.velocity = CF(POSITION,c.Position).lookVector*FLING
  708. bv.Parent = c
  709. Debris:AddItem(bv,0.05)
  710. end
  711. end
  712. end
  713. end
  714.  
  715. --//=================================\\
  716. --|| ATTACK FUNCTIONS AND STUFF
  717. --\\=================================//
  718.  
  719. function Intro()
  720. ATTACK = true
  721. Rooted = true
  722. Humanoid.WalkSpeed = 0
  723. Disable_Jump = true
  724. local INTROSOUND = CreateSound(862484466, Effects, 6, 1, false)
  725. coroutine.resume(coroutine.create(function()
  726. repeat
  727. Swait()
  728. if CUSTOMANGLES == true then
  729. Cam.CFrame = Clerp(Cam.CFrame, Head.CFrame * CF(0,0,-4) * ANGLES(RAD(0), RAD(180), RAD(0)), 0.2)
  730. end
  731. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  732. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  733. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(0), RAD(0), RAD(5)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  734. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(0), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  735. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(60), RAD(0)) * ANGLES(RAD(-11), RAD(0), RAD(0)), 1 / Animation_Speed)
  736. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-60), RAD(0)) * ANGLES(RAD(-11), RAD(0), RAD(0)), 1 / Animation_Speed)
  737. until INTROSOUND.TimePosition >= 2.15
  738. SUN.Parent = Effects
  739. local CORE = IT("Attachment",SUN)
  740. SUN.Color = C3(1,85/255,0)
  741. SUN.CFrame = RootPart.CFrame*CF(0,-14,11)
  742. local P = ParticleEmitter({Transparency1 = 1, Transparency2 = 1, Speed = 1, Acel = VT(0,0,0), RotSpeed = NumberRange.new(-5, 5), Drag = 0.1, Size1 = 3, Size2 = 5, Lifetime1 = 0.1, Lifetime2 = 0.2, Parent = CORE, Emit = 10, Offset = 180, Enabled = true, Color1 = C3(1,85/255,0), Color2 = C3(1,85/255,0), Texture = 296874871})
  743. P.LockedToPart = true
  744. P.Rate = 12
  745. local P = ParticleEmitter({Transparency1 = 1, Transparency2 = 1, Speed = 1, Acel = VT(0,0,0), RotSpeed = NumberRange.new(-5, 5), Drag = 0.1, Size1 = 3, Size2 = 5, Lifetime1 = 0.1, Lifetime2 = 0.2, Parent = CORE, Emit = 10, Offset = 180, Enabled = true, Color1 = C3(1,85/255,0), Color2 = C3(1,85/255,0), Texture = 296874871})
  746. P.Rate = 12
  747. repeat
  748. Swait()
  749. SUN.CFrame = Clerp(SUN.CFrame,RootPart.CFrame*CF(0,14,11),0.04)
  750. local HITFLOOR,SUNPOS = Raycast(SUN.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 23, Character)
  751. if HITFLOOR then
  752. local DISTANCE = (SUNPOS - SUN.Position).Magnitude
  753. local SIZE = (23 - DISTANCE)*2
  754. end
  755. if CUSTOMANGLES == true then
  756. Cam.CFrame = Clerp(Cam.CFrame, Head.CFrame * CF(0,5,-15) * ANGLES(RAD(5), RAD(180), RAD(0)), 0.2)
  757. end
  758. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.03 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  759. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-35 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  760. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(150), RAD(0), RAD(15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  761. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(150), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  762. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  763. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  764. until ATTACK == false
  765. CUSTOMCAM = false
  766. for i = 1, #ATTACKS do
  767. local SKILLFRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.65, 0, 0.95-(0.17*i), 0), UD2(0.26, 0, 0.17, 0), C3(0,0,0), C3(0, 0, 0), "Skill Frame")
  768. local IMAGE = IT("ImageLabel",SKILLFRAME)
  769. IMAGE.Size = UD2(1,0,1,0)
  770. IMAGE.Image = "rbxassetid://"..ATTACKS[i]
  771. IMAGE.BackgroundTransparency = 1
  772. IMAGE.ImageTransparency = 1
  773. for i = 1, 10 do
  774. Swait()
  775. IMAGE.ImageTransparency = IMAGE.ImageTransparency - 1/10
  776. end
  777. end
  778. end))
  779. repeat
  780. Swait()
  781. INTROSOUND.Parent = Effects
  782. until INTROSOUND.Playing == false
  783. INTROSOUND:Destroy()
  784. ATTACK = false
  785. Rooted = false
  786. end
  787. function DeadlyLaser()
  788. CreateSound(811841430, SUN, 8, MRANDOM(7,13)/10, false)
  789. local HIT,POS = CastProperRay(SUN.Position,Mouse.Hit.p,1000,Character)
  790. local BEAM = CreatePart(3, Effects, "Neon", 0, 0, BRICKC("Gold"), "Beam", VT(0,0,0), true)
  791. BEAM.Color = SUN.Color
  792. MakeForm(BEAM,"Cyl")
  793. local DIST = (SUN.Position - POS).Magnitude
  794. BEAM.Size = VT(0,DIST,0)
  795. BEAM.CFrame = CF(SUN.Position,POS)*CF(0,0,-DIST/2) * ANGLES(RAD(90), RAD(0), RAD(0))
  796. if HIT ~= nil then
  797. if HIT.Parent.ClassName == "Model" then
  798. if HIT.Parent:FindFirstChildOfClass("Humanoid") then
  799. if HIT.Parent:FindFirstChildOfClass("Humanoid").Health > 0 then
  800. local HED = HIT.Parent:FindFirstChild("Head")
  801. if HED and MRANDOM(1,15) == 1 then
  802. CreateSound(527749592, HED, 4, MRANDOM(9,11)/10, false)
  803. end
  804. HIT.Parent:BreakJoints()
  805. end
  806. end
  807. end
  808. end
  809. for i = 1, 15 do
  810. Swait()
  811. BEAM.Size = BEAM.Size + VT(0.25,0,0.25)
  812. BEAM.Transparency = BEAM.Transparency + 1/15
  813. end
  814. BEAM:remove()
  815. end
  816. function SolarFlares()
  817. ATTACK = true
  818. Rooted = true
  819. SUNFLOAT = false
  820. CUSTOMCAM = true
  821. for i=0, 1, 0.1 / Animation_Speed do
  822. Swait()
  823. if CUSTOMANGLES == true then
  824. Cam.CFrame = Clerp(Cam.CFrame, RootPart.CFrame * ANGLES(RAD(-45), RAD(0), RAD(0))*CF(0,0,65), 0.1)
  825. end
  826. SUN.CFrame = Clerp(SUN.CFrame,RootPart.CFrame*CF(0,18 + 4 * SIN(SINE / 12),0),0.035)
  827. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.03 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  828. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-35 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  829. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(150), RAD(0), RAD(15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  830. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(150), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  831. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  832. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  833. end
  834. local CFRAME = RootPart.CFrame * ANGLES(RAD(-90), RAD(0), RAD(0))*CF(0,0,125)
  835. coroutine.resume(coroutine.create(function()
  836. repeat
  837. Swait()
  838. if CUSTOMANGLES == true then
  839. Cam.CFrame = Clerp(Cam.CFrame, CFRAME, 0.1)
  840. end
  841. SUN.CFrame = Clerp(SUN.CFrame,RootPart.CFrame*CF(0,18 + 4 * SIN(SINE / 12),0),0.035)
  842. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.03 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  843. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  844. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.45 + 0.05 * SIN(SINE / 12), -0.45) * ANGLES(RAD(90), RAD(0), RAD(-15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  845. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.45 + 0.05 * SIN(SINE / 12), -0.45) * ANGLES(RAD(90), RAD(0), RAD(15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  846. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  847. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  848. until ATTACK == false
  849. end))
  850. AttackGyro()
  851. wait(0.2)
  852. for i = 1, 15 do
  853. Swait()
  854. coroutine.resume(coroutine.create(function()
  855. local SPEED = MRANDOM(5,32)/10
  856. local FLARE = CreatePart(3, Effects, "Neon", 0, 0, SUN.BrickColor, "Sun", VT(5,5,5), true)
  857. FLARE.Color = C3(1,85/255,0)
  858. MakeForm(FLARE,"Ball")
  859. CreateSound(463598785, FLARE, 1.2, MRANDOM(7,13)/8, false)
  860. FLARE.CFrame = CF(SUN.Position,Mouse.Hit.p) * ANGLES(RAD(MRANDOM(-5,5)*2), RAD(MRANDOM(-5,5)*2), RAD(0))
  861. local P = ParticleEmitter({Transparency1 = 1, Transparency2 = 1, Speed = 1, Acel = VT(0,0,0), RotSpeed = NumberRange.new(-5, 5), Drag = 0.1, Size1 = 3, Size2 = 5, Lifetime1 = 0.1, Lifetime2 = 0.2, Parent = CORE, Emit = 10, Offset = 180, Enabled = true, Color1 = C3(1,85/255,0), Color2 = C3(1,85/255,0), Texture = 296874871})
  862. for i = 1, 500 do
  863. Swait()
  864. P.Enabled = true
  865. local HIT,HITPOS = Raycast(FLARE.Position, FLARE.CFrame.lookVector, FLARE.Size.Z/2, Character)
  866. if HIT then
  867. break
  868. else
  869. FLARE.CFrame = FLARE.CFrame*CF(0,0,-SPEED)
  870. if MRANDOM(1,3) == 1 then
  871. WACKYEFFECT({Time = 25, EffectType = "Round Slash", Size = VT(0,0,0), Size2 = VT(0.025,0,0.025), Transparency = 0.85, Transparency2 = 1, CFrame = FLARE.CFrame*CF(0,0,-FLARE.Size.X/1.5) * ANGLES(RAD(90), RAD(MRANDOM(0,360)), RAD(0)) * ANGLES(RAD(MRANDOM(-15,15)), RAD(MRANDOM(0,360)), RAD(0)), MoveToPos = nil, RotationX = 0.1, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = MRANDOM(9,11)/10, SoundVolume = MRANDOM(9,11)/2, UseBoomerangMath = true, Boomerang = 0, SizeBoomerang = 45})
  872. end
  873. end
  874. end
  875. CreateSound(165970126, FLARE, 0.8, MRANDOM(7,13)/8, false)
  876. CreateSound(174580476, FLARE, 1.6, MRANDOM(7,13)/10, false)
  877. P.Enabled = false
  878. ApplyAoE(FLARE.Position,14,125)
  879. Debris:AddItem(FLARE,5)
  880. FLARE.Transparency = 1
  881. WACKYEFFECT({EffectType = "Sphere", Size = FLARE.Size, Size2 = VT(25,25,25), Transparency = 0, Transparency2 = 1, CFrame = CF(FLARE.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = FLARE.Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
  882. ParticleEmitter({Transparency1 = 1, Transparency2 = 1, Speed = 1, Acel = VT(0,0,0), RotSpeed = NumberRange.new(-5, 5), Drag = 0.1, Size1 = 3, Size2 = 5, Lifetime1 = 0.1, Lifetime2 = 0.2, Parent = CORE, Emit = 10, Offset = 180, Enabled = true, Color1 = C3(1,85/255,0), Color2 = C3(1,85/255,0), Texture = 296874871})
  883. end))
  884. end
  885. wait(0.1)
  886. CUSTOMCAM = false
  887. SUNFLOAT = true
  888. ATTACK = false
  889. Rooted = false
  890. end
  891. function SolarSmash()
  892. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  893. if HITFLOOR then
  894. ATTACK = true
  895. Rooted = false
  896. CUSTOMCAM = true
  897. SUNFLOAT = false
  898. for i=0, 0.2, 0.1 / Animation_Speed do
  899. Swait()
  900. if CUSTOMANGLES == true then
  901. Cam.CFrame = Clerp(Cam.CFrame, RootPart.CFrame * ANGLES(RAD(-45), RAD(0), RAD(0))*CF(0,0,65), 0.1)
  902. end
  903. SUN.CFrame = Clerp(SUN.CFrame,RootPart.CFrame*CF(0,18 + 4 * SIN(SINE / 12),6),0.035)
  904. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.03 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  905. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-35 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  906. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(150), RAD(0), RAD(15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  907. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(150), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  908. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  909. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  910. end
  911. coroutine.resume(coroutine.create(function()
  912. repeat
  913. Swait()
  914. if CUSTOMANGLES == true then
  915. Cam.CFrame = Clerp(Cam.CFrame, RootPart.CFrame * ANGLES(RAD(-75), RAD(0), RAD(0))*CF(0,6,65), 0.1)
  916. end
  917. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.03 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  918. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  919. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.45 + 0.05 * SIN(SINE / 12), -0.45) * ANGLES(RAD(35), RAD(0), RAD(-15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  920. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.45 + 0.05 * SIN(SINE / 12), -0.45) * ANGLES(RAD(35), RAD(0), RAD(15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  921. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  922. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  923. until ATTACK == false
  924. end))
  925. local CFRAME = RootPart.CFrame*CF(0,-2,-17)
  926. for i = 1, 10 do
  927. Swait()
  928. SUN.CFrame = Clerp(SUN.CFrame,CFRAME, 0.25)
  929. end
  930. ApplyAoE(SUN.Position,65,225)
  931. ParticleEmitter({Transparency1 = 1, Transparency2 = 1, Speed = 1, Acel = VT(0,0,0), RotSpeed = NumberRange.new(-5, 5), Drag = 0.1, Size1 = 3, Size2 = 5, Lifetime1 = 0.1, Lifetime2 = 0.2, Parent = CORE, Emit = 10, Offset = 180, Enabled = true, Color1 = C3(1,85/255,0), Color2 = C3(1,85/255,0), Texture = 296874871})
  932. for i = 1, 8 do
  933. WACKYEFFECT({Time = 30+(i*25), EffectType = "Wave", Size = VT(15,0,15), Size2 = VT(120,0,120), Transparency = 0.6, Transparency2 = 1, CFrame = CF(SUN.Position-VT(0,5,0)) * ANGLES(RAD(0), RAD(MRANDOM(0,360)), RAD(0)) * ANGLES(RAD(MRANDOM(-15,15)), RAD(MRANDOM(0,360)), RAD(0)), MoveToPos = nil, RotationX = 0.1, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SUN.Color, SoundID = nil, SoundPitch = MRANDOM(9,11)/10, SoundVolume = MRANDOM(9,11)/2, UseBoomerangMath = true, Boomerang = 0, SizeBoomerang = 22})
  934. end
  935. for i = 1, 5 do
  936. WACKYEFFECT({Time = 50+(i*25), EffectType = "Round Slash", Size = VT(0,0,0), Size2 = VT(1.5,0,1.5), Transparency = 0, Transparency2 = 1, CFrame = CF(SUN.Position-VT(0,5,0)) * ANGLES(RAD(0), RAD(MRANDOM(0,360)), RAD(0)) * ANGLES(RAD(MRANDOM(-15,15)), RAD(MRANDOM(0,360)), RAD(0)), MoveToPos = nil, RotationX = 0.1, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = MRANDOM(9,11)/10, SoundVolume = MRANDOM(9,11)/2, UseBoomerangMath = true, Boomerang = 0, SizeBoomerang = 3})
  937. end
  938. WACKYEFFECT({Time = 75, EffectType = "Sphere", Size = SUN.Size, Size2 = SUN.Size*6, Transparency = 0, Transparency2 = 1, CFrame = CF(SUN.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SUN.Color, SoundID = 168513088, SoundPitch = 1, SoundVolume = 5, UseBoomerangMath = true, Boomerang = 0, SizeBoomerang = 3})
  939. WACKYEFFECT({Time = 65, EffectType = "Sphere", Size = SUN.Size, Size2 = SUN.Size*5.5, Transparency = 0, Transparency2 = 1, CFrame = CF(SUN.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SUN.Color, SoundID = 201858144, SoundPitch = 1, SoundVolume = 3, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
  940. local bv = Instance.new("BodyVelocity")
  941. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  942. bv.velocity = CF(CFRAME.p-VT(0,12,0),RootPart.Position).lookVector*125
  943. bv.Parent = RootPart
  944. Debris:AddItem(bv,0.02)
  945. CUSTOMCAM = false
  946. for i = 1, 5 do
  947. Swait()
  948. SUN.CFrame = Clerp(SUN.CFrame,CFRAME, 0.1)
  949. end
  950. SUNFLOAT = true
  951. ATTACK = false
  952. Rooted = false
  953. end
  954. end
  955. function SolarEruption()
  956. ATTACK = true
  957. Rooted = true
  958. CUSTOMCAM = true
  959. local ANIMA = "HoldUp"
  960. coroutine.resume(coroutine.create(function()
  961. repeat
  962. Swait()
  963. if ANIMA == "HoldUp" then
  964. if CUSTOMANGLES == true then
  965. Cam.CFrame = Clerp(Cam.CFrame, RootPart.CFrame * ANGLES(RAD(-45), RAD(0), RAD(0))*CF(0,0,65), 0.1)
  966. end
  967. SUN.CFrame = Clerp(SUN.CFrame,RootPart.CFrame*CF(0,28 + 4 * SIN(SINE / 12),6),0.035)
  968. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.03 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  969. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  970. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1, 0.85 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(160 + 3 * SIN(SINE / 12)), RAD(5), RAD(-15 + 3 * COS(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  971. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.75, 0.35 + 0.05 * SIN(SINE / 12), -0.6) * ANGLES(RAD(0), RAD(0), RAD(92)) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  972. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(-11), RAD(0), RAD(0)), 1 / Animation_Speed)
  973. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(-11), RAD(0), RAD(0)), 1 / Animation_Speed)
  974. elseif ANIMA == "Fire" then
  975. if CUSTOMANGLES == true then
  976. Cam.CFrame = Clerp(Cam.CFrame, RootPart.CFrame * CF(0,135,0) * ANGLES(RAD(-90), RAD(0), RAD(0)), 0.2)
  977. end
  978. SUN.CFrame = Clerp(SUN.CFrame,RootPart.CFrame*CF(0,35,0),0.2)
  979. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.03 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  980. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-25 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  981. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.65 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(170), RAD(5), RAD(15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  982. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.65 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(170), RAD(-5), RAD(-15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  983. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(-25), RAD(85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  984. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(-25), RAD(-85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  985. end
  986. until ATTACK == false
  987. end))
  988. CreateSound(201858045, SUN, 1.8, MRANDOM(7,13)/10, false)
  989. CreateSound(278641993, SUN, 3, MRANDOM(7,13)/10, false)
  990. CreateSound(278641993, SUN, 2.5, MRANDOM(7,13)/10, false)
  991. for i = 1, 150 do
  992. Swait()
  993. WACKYEFFECT({Time = 15, EffectType = "Wave", Size = VT(85,0,85), Size2 = VT(0,0,0), Transparency = 1, Transparency2 = 0.8, CFrame = CF(SUN.Position)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SUN.Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
  994. WACKYEFFECT({Time = 15, EffectType = "Sphere", Size = VT(45,45,45), Size2 = VT(0,0,0), Transparency = 0.95, Transparency2 = 1, CFrame = CF(SUN.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SUN.Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
  995. end
  996. wait(0.1)
  997. UNANCHOR = false
  998. ANIMA = "Fire"
  999. wait(0.4)
  1000. ApplyAoE(SUN.Position,25,75)
  1001. WACKYEFFECT({Time = 45, EffectType = "Sphere", Size = SUN.Size, Size2 = SUN.Size*4, Transparency = 0, Transparency2 = 1, CFrame = CF(SUN.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SUN.Color, SoundID = nil, SoundPitch = 1, SoundVolume = 5, UseBoomerangMath = true, Boomerang = 0, SizeBoomerang = 3})
  1002. WACKYEFFECT({Time = 35, EffectType = "Sphere", Size = SUN.Size, Size2 = SUN.Size*3.5, Transparency = 0, Transparency2 = 1, CFrame = CF(SUN.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SUN.Color, SoundID = 401056199, SoundPitch = 1, SoundVolume = 7, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
  1003. coroutine.resume(coroutine.create(function()
  1004. for i = 1, 32 do
  1005. Swait()
  1006. coroutine.resume(coroutine.create(function()
  1007. local FLARE = CreatePart(3, Effects, "Neon", 0, 0, SUN.BrickColor, "Sun", VT(5,5,5), false)
  1008. FLARE.CanCollide = true
  1009. FLARE.Color = C3(1,85/255,0)
  1010. MakeForm(FLARE,"Ball")
  1011. Debris:AddItem(FLARE,10)
  1012. CreateSound(463598785, FLARE, 1.2, MRANDOM(7,13)/8, false)
  1013. local P = ParticleEmitter({Transparency1 = 1, Transparency2 = 1, Speed = 1, Acel = VT(0,0,0), RotSpeed = NumberRange.new(-5, 5), Drag = 0.1, Size1 = 3, Size2 = 5, Lifetime1 = 0.1, Lifetime2 = 0.2, Parent = CORE, Emit = 10, Offset = 180, Enabled = true, Color1 = C3(1,85/255,0), Color2 = C3(1,85/255,0), Texture = 296874871})
  1014. FLARE.CFrame = CF(SUN.Position)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  1015. FLARE.Velocity = CF(SUN.Position,CF(SUN.Position)*ANGLES(RAD(0),RAD(MRANDOM(0,360)),RAD(0))*CF(MRANDOM(-60,60),25,MRANDOM(-60,60)).p).lookVector*MRANDOM(25,250)
  1016. TOUCH = FLARE.Touched:Connect(function(TOC)
  1017. if TOC.Parent ~= Character and TOC.Parent.Parent ~= Character then
  1018. FLARE.Anchored = true
  1019. FLARE:ClearAllChildren()
  1020. CreateSound(165970126, FLARE, 0.8, MRANDOM(7,13)/8, false)
  1021. CreateSound(174580476, FLARE, 1.6, MRANDOM(7,13)/10, false)
  1022. FLARE.CanCollide = false
  1023. ApplyAoE(FLARE.Position,14,125)
  1024. FLARE.Transparency = 1
  1025. WACKYEFFECT({EffectType = "Sphere", Size = FLARE.Size, Size2 = VT(25,25,25), Transparency = 0, Transparency2 = 1, CFrame = CF(FLARE.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = FLARE.Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
  1026. ParticleEmitter({Transparency1 = 1, Transparency2 = 1, Speed = 1, Acel = VT(0,0,0), RotSpeed = NumberRange.new(-5, 5), Drag = 0.1, Size1 = 3, Size2 = 5, Lifetime1 = 0.1, Lifetime2 = 0.2, Parent = CORE, Emit = 10, Offset = 180, Enabled = true, Color1 = C3(1,85/255,0), Color2 = C3(1,85/255,0), Texture = 296874871})
  1027. TOUCH:Disconnect()
  1028. end
  1029. end)
  1030. end))
  1031. end
  1032. end))
  1033. wait(1.5)
  1034. UNANCHOR = true
  1035. CUSTOMCAM = false
  1036. ATTACK = false
  1037. Rooted = false
  1038. end
  1039. function Nebula()
  1040. ATTACK = true
  1041. Rooted = false
  1042. CUSTOMCAM = true
  1043. local DEAD = false
  1044. coroutine.resume(coroutine.create(function()
  1045. while true do
  1046. Swait()
  1047. if DEAD == false then
  1048. if CUSTOMANGLES == true then
  1049. Cam.CFrame = Clerp(Cam.CFrame, RootPart.CFrame * CF(0,435,0) * ANGLES(RAD(-90), RAD(0), RAD(0)), 0.01)
  1050. end
  1051. SUN.CFrame = Clerp(SUN.CFrame,RootPart.CFrame*CF(0,35,0),0.2)
  1052. end
  1053. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 1 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1054. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1055. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1, 0.85 + 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(160), RAD(5), RAD(-15)) * ANGLES(RAD(5), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1056. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.75, 0.35 + 0.05 * SIN(SINE / 12), -0.6) * ANGLES(RAD(0), RAD(0), RAD(92)) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1057. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  1058. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  1059. end
  1060. end))
  1061. wait(1)
  1062. CreateSound(201858045, SUN, 1.8, MRANDOM(7,13)/10, false)
  1063. CreateSound(278641993, SUN, 3, MRANDOM(7,13)/10, false)
  1064. CreateSound(278641993, SUN, 2.5, MRANDOM(7,13)/10, false)
  1065. for i = 1, 250 do
  1066. Swait()
  1067. WACKYEFFECT({Time = 15, EffectType = "Wave", Size = VT(2,0,2), Size2 = VT(32,2.5,32), Transparency = 0.75, Transparency2 = 1, CFrame = CF(RootPart.CFrame*CF(0,-4,0).p) * ANGLES(RAD(0), RAD(MRANDOM(0,360)), RAD(0)), MoveToPos = nil, RotationX = 1, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = MRANDOM(9,11)/10, SoundVolume = MRANDOM(9,11)/2, UseBoomerangMath = true, Boomerang = 0, SizeBoomerang = 22})
  1068. WACKYEFFECT({Time = 15, EffectType = "Wave", Size = VT(85,0,85), Size2 = VT(0,0,0), Transparency = 1, Transparency2 = 0.8, CFrame = CF(SUN.Position)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SUN.Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
  1069. WACKYEFFECT({Time = 15, EffectType = "Sphere", Size = VT(45,45,45), Size2 = VT(0,0,0), Transparency = 0.95, Transparency2 = 1, CFrame = CF(SUN.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SUN.Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
  1070. end
  1071. wait(1)
  1072. for i = 1, 3 do
  1073. wait(0.65)
  1074. WACKYEFFECT({Time = 35, EffectType = "Sphere", Size = SUN.Size, Size2 = VT(250,250,250), Transparency = 0.5, Transparency2 = 1, CFrame = CF(SUN.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SUN.Color, SoundID = 852135845, SoundPitch = 1-(i/10), SoundVolume = 5, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
  1075. end
  1076. wait(0.65)
  1077. ApplyAoE(SUN.Position,9999999999999999,125,true)
  1078. SUN:ClearAllChildren()
  1079. SUN.Transparency = 1
  1080. CreateSound(385545047, Effects, 2.5, 1.4, false)
  1081. CreateSound(385545047, Effects, 2.5, 1, false)
  1082. CreateSound(435742675, Effects, 2.5, 1.5, false)
  1083. CreateSound(231917744, Effects, 2.5, 1.5, false)
  1084. CreateSound(401056199, Effects, 2.5, 1, false)
  1085. ParticleEmitter({Transparency1 = 1, Transparency2 = 1, Speed = 25, Acel = VT(0,0,0), RotSpeed = NumberRange.new(5, 5), Drag = -1, Size1 = 5, Size2 = 6, Lifetime1 = 0.1, Lifetime2 = 1, Parent = SUN, Emit = 20, Offset = 180, Enabled = false, Color1 = C3(1,85/255,0), Color2 = BRICKC"Royal purple".Color, Texture = 296874871})
  1086. for i = 1, 3 do
  1087. WACKYEFFECT({Time = 175, EffectType = "Sphere", Size = SUN.Size, Size2 = VT(250,250,250)+(VT(i,i,i)*180), Transparency = 0.5, Transparency2 = 1, CFrame = CF(SUN.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Royal purple".Color, SoundID = nil, SoundPitch = 1-(i/10), SoundVolume = 5, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
  1088. end
  1089. for i = 1, 15 do
  1090. WACKYEFFECT({Time = 100+(i*35), EffectType = "Wave", Size = VT(15,0,15), Size2 = VT(120,5,120)+(VT(i,0,i)*70), Transparency = 0.6, Transparency2 = 1, CFrame = CF(SUN.Position) * ANGLES(RAD(0), RAD(MRANDOM(0,360)), RAD(0)) * ANGLES(RAD(MRANDOM(-15,15)), RAD(MRANDOM(0,360)), RAD(0)), MoveToPos = nil, RotationX = 1, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Pink".Color, SoundID = nil, SoundPitch = MRANDOM(9,11)/10, SoundVolume = MRANDOM(9,11)/2, UseBoomerangMath = true, Boomerang = 0, SizeBoomerang = 22})
  1091. end
  1092. DEAD = true
  1093. Cam.CameraType = CAMTYPE
  1094. Cam.CameraSubject = Humanoid
  1095. INTROD = false
  1096. end
  1097. function Taunt()
  1098. ATTACK = true
  1099. Rooted = true
  1100. CUSTOMCAM = true
  1101. CreateSound(160212768, Head, 10, 1, false)
  1102. for i=0, 3, 0.1 / Animation_Speed do
  1103. Swait()
  1104. if CUSTOMANGLES == true then
  1105. Cam.CFrame = Clerp(Cam.CFrame, RootPart.CFrame * CF(7,1.5,6) * ANGLES(RAD(-4), RAD(15), RAD(0)), 0.2)
  1106. end
  1107. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.03 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-35)), 1 / Animation_Speed)
  1108. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(35)), 1 / Animation_Speed)
  1109. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.75, 0.5 + 0.05 * SIN(SINE / 12), -0.7) * ANGLES(RAD(0), RAD(0), RAD(-95)) * ANGLES(RAD(5), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1110. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.3, 0.5 + 0.05 * SIN(SINE / 12), -0.3) * ANGLES(RAD(90), RAD(0), RAD(-35)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1111. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(95), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 1 / Animation_Speed)
  1112. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-55), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  1113. end
  1114. CUSTOMCAM = false
  1115. ATTACK = false
  1116. Rooted = false
  1117. end
  1118.  
  1119. --//=================================\\
  1120. --|| ASSIGN THINGS TO KEYS
  1121. --\\=================================//
  1122.  
  1123. function MouseDown(Mouse)
  1124. if ATTACK == false then
  1125. DeadlyLaser()
  1126. end
  1127. end
  1128.  
  1129. function MouseUp(Mouse)
  1130. HOLD = false
  1131. end
  1132.  
  1133. function KeyDown(Key)
  1134. KEYHOLD = true
  1135. if Key == "z" and ATTACK == false then
  1136. SolarFlares()
  1137. end
  1138.  
  1139. if Key == "c" and ATTACK == false then
  1140. SolarSmash()
  1141. end
  1142.  
  1143. if Key == "v" and ATTACK == false then
  1144. SolarEruption()
  1145. end
  1146.  
  1147. if Key == "x" and ATTACK == false then
  1148. Nebula()
  1149. end
  1150.  
  1151. if Key == "t" and ATTACK == false then
  1152. Taunt()
  1153. end
  1154.  
  1155. if Key == "q" and ATTACK == false then
  1156. if CUSTOMANGLES == true then
  1157. CUSTOMANGLES = false
  1158. Cam.CameraSubject = Humanoid
  1159. else
  1160. CUSTOMANGLES = true
  1161. end
  1162. end
  1163. end
  1164.  
  1165. function KeyUp(Key)
  1166. KEYHOLD = false
  1167. end
  1168.  
  1169. Mouse.Button1Down:connect(function(NEWKEY)
  1170. MouseDown(NEWKEY)
  1171. end)
  1172. Mouse.Button1Up:connect(function(NEWKEY)
  1173. MouseUp(NEWKEY)
  1174. end)
  1175. Mouse.KeyDown:connect(function(NEWKEY)
  1176. KeyDown(NEWKEY)
  1177. end)
  1178. Mouse.KeyUp:connect(function(NEWKEY)
  1179. KeyUp(NEWKEY)
  1180. end)
  1181.  
  1182. --//=================================\\
  1183. --\\=================================//
  1184.  
  1185. function unanchor()
  1186. for _, c in pairs(Character:GetChildren()) do
  1187. if c:IsA("BasePart") and c ~= RootPart then
  1188. c.Anchored = false
  1189. end
  1190. end
  1191. if UNANCHOR == true then
  1192. RootPart.Anchored = false
  1193. else
  1194. RootPart.Anchored = true
  1195. end
  1196. end
  1197.  
  1198. --//=================================\\
  1199. --|| WRAP THE WHOLE SCRIPT UP
  1200. --\\=================================//
  1201.  
  1202. Humanoid.Changed:connect(function(Jump)
  1203. if Jump == "Jump" and (Disable_Jump == true) then
  1204. Humanoid.Jump = false
  1205. end
  1206. end)
  1207.  
  1208. while true do
  1209. Swait()
  1210. script.Parent = WEAPONGUI
  1211. ANIMATE.Parent = nil
  1212. for _,v in next, Humanoid:GetPlayingAnimationTracks() do
  1213. v:Stop();
  1214. end
  1215. SINE = SINE + CHANGE
  1216. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  1217. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  1218. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  1219. local WALKSPEEDVALUE = 8 / (Humanoid.WalkSpeed / 16)
  1220. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  1221. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0.1 * COS(SINE / (WALKSPEEDVALUE/2))) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1222. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1223. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.25 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10+50 * COS(SINE / WALKSPEEDVALUE))), 0.6 / Animation_Speed)
  1224. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.25 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-10+50 * COS(SINE / WALKSPEEDVALUE))), 0.6 / Animation_Speed)
  1225. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  1226. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1227. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1228. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.7 / Animation_Speed)
  1229. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.7 / Animation_Speed)
  1230. end
  1231. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  1232. ANIM = "Jump"
  1233. if ATTACK == false then
  1234. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed)
  1235. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(-25), RAD(0), RAD(0)), 1 / Animation_Speed)
  1236. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-35), RAD(0), RAD(25 + 10 * COS(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1237. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-35), RAD(0), RAD(-25 - 10 * COS(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1238. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.4, -0.6) * ANGLES(RAD(1), RAD(90), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1239. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1240. end
  1241. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  1242. ANIM = "Fall"
  1243. if ATTACK == false then
  1244. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed)
  1245. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed)
  1246. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(35 - 4 * COS(SINE / 6)), RAD(0), RAD(45 + 10 * COS(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1247. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(35 - 4 * COS(SINE / 6)), RAD(0), RAD(-45 - 10 * COS(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1248. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.3, -0.7) * ANGLES(RAD(-25 + 5 * SIN(SINE / 12)), RAD(90), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1249. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.8, -0.3) * ANGLES(RAD(-10), RAD(-80), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed)
  1250. end
  1251. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  1252. ANIM = "Idle"
  1253. if ATTACK == false then
  1254. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.03 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-35)), 1 / Animation_Speed)
  1255. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(35)), 1 / Animation_Speed)
  1256. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.75, 0.5 + 0.05 * SIN(SINE / 12), -0.7) * ANGLES(RAD(0), RAD(0), RAD(-95)) * ANGLES(RAD(5), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1257. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.75, 0.35 + 0.05 * SIN(SINE / 12), -0.6) * ANGLES(RAD(0), RAD(0), RAD(92)) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1258. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(95), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 1 / Animation_Speed)
  1259. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-55), RAD(0)) * ANGLES(RAD(-12), RAD(0), RAD(0)), 1 / Animation_Speed)
  1260. end
  1261. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  1262. ANIM = "Walk"
  1263. if ATTACK == false then
  1264. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.05) * ANGLES(RAD(5), RAD(0), RAD(-15-7 * COS(SINE / (WALKSPEEDVALUE)))), 1 / Animation_Speed)
  1265. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 1 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(15+7 * COS(SINE / (WALKSPEEDVALUE)))), 1 / Animation_Speed)
  1266. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.75, 0.5 + 0.05 * SIN(SINE / 12), -0.7) * ANGLES(RAD(0), RAD(0), RAD(-95)) * ANGLES(RAD(5), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1267. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.75, 0.35 + 0.05 * SIN(SINE / 12), -0.6) * ANGLES(RAD(0), RAD(0), RAD(92)) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1268. RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(105), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 / Animation_Speed)
  1269. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-75), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 / Animation_Speed)
  1270. end
  1271. end
  1272. unanchor()
  1273. if INTROD == true then
  1274. if SUNFLOAT == true then
  1275. SUN.CFrame = Clerp(SUN.CFrame,Torso.CFrame*CF(0,14 + 4 * SIN(SINE / 12),11),0.035)
  1276. end
  1277. local HITFLOOR,SUNPOS = Raycast(SUN.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 23, Character)
  1278. if HITFLOOR then
  1279. local DISTANCE = (SUNPOS - SUN.Position).Magnitude
  1280. local SIZE = (23 - DISTANCE)*2
  1281. end
  1282. end
  1283. Humanoid.MaxHealth = 500
  1284. Humanoid.Health = 500
  1285. if Rooted == false then
  1286. Disable_Jump = false
  1287. Humanoid.WalkSpeed = Speed
  1288. elseif Rooted == true then
  1289. Disable_Jump = true
  1290. Humanoid.WalkSpeed = 0
  1291. end
  1292. BMUSIC.SoundId = "rbxassetid://"..SONGID
  1293. BMUSIC.Looped = true
  1294. BMUSIC.Pitch = PITCH
  1295. BMUSIC.Volume = VOLUME
  1296. BMUSIC.Playing = INTROD
  1297. if BMUSIC.Parent ~= RootPart then
  1298. BMUSIC = IT("Sound",RootPart)
  1299. end
  1300. Humanoid.Name = "THE_SUN_IS_A_DEADLY_LASER"
  1301. if INTROD == false and ATTACK == false then
  1302. Intro()
  1303. INTROD = true
  1304. end
  1305. local VELOC = -RootPart.RotVelocity.Y
  1306. if VELOC < -35 then
  1307. VELOC = -35
  1308. elseif VELOC > 35 then
  1309. VELOC = 35
  1310. end
  1311. if CUSTOMANGLES == true then
  1312. Cam.CameraType = Enum.CameraType.Scriptable
  1313. if CUSTOMCAM == false then
  1314. Cam.CFrame = Clerp(Cam.CFrame, RootPart.CFrame * ANGLES(RAD(-5), RAD(0), RAD(VELOC)) * CF(12,7,25), 0.15)
  1315. end
  1316. else
  1317. Cam.CameraType = CAMTYPE
  1318. end
  1319. end
  1320.  
  1321. --//=================================\\
  1322. --\\=================================//
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328. --//====================================================\\--
  1329. --|| END OF SCRIPT
  1330. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement