Advertisement
StarzoZero

sun

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