Advertisement
ItzInfern

sun is a deadly laser

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