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