-- ENEMY ENCOUNTER v3 -- LocalScript -> StarterPlayer > StarterPlayerScripts -- -- T = taunt | M = settings | [ and ] = switch aura | SPACE = skip cutscene -- abilities (aura must be on): Q slam | E laser | R rift | Z nova | X blink | C time stop local Players = game:GetService("Players") local TweenService = game:GetService("TweenService") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local SoundService = game:GetService("SoundService") local Lighting = game:GetService("Lighting") local Debris = game:GetService("Debris") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") local camera = workspace.CurrentCamera workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function() camera = workspace.CurrentCamera end) ---------------------------------------------------------------- -- settings you can tweak ---------------------------------------------------------------- local IMAGE_ID = "rbxassetid://88827390279405" local EYE_IMAGE_ID = "rbxassetid://80026411615242" local TYPE_SOUND_ID = "rbxassetid://80545691879014" local MUSIC_ID = "rbxassetid://1843497734" local EYE_SIZE = 0.9 local BEAT_THRESHOLD = 0.15 -- lower = more beats detected local RAGE_PER_BEAT = 0.018 -- how fast the overdrive meter fills local OVERDRIVE_TIME = 8 local RED = Color3.fromRGB(255, 35, 35) local WHITE = Color3.fromRGB(255, 255, 255) local BLACK = Color3.fromRGB(0, 0, 0) local TEX = { spark = "rbxasset://textures/particles/sparkles_main.dds", smoke = "rbxasset://textures/particles/smoke_main.dds", fire = "rbxasset://textures/particles/fire_main.dds", } -- live settings (the in-game menu changes these) local settings = { shake = true, bop = true, screenFx = true, darkness = true, eyes = true, shockwave = true, cinematic = true, typeSounds = true, reducedMotion = false, abilityBar = true, speedBoost = false, autoCycle = false, volume = 0.8, intensity = 1, } local themeOrder = {"CRIMSON", "VOID", "ICE", "TOXIC", "GOLD", "GLITCH", "STORM", "INFERNO", "SAKURA", "GALAXY", "PRISM"} local themes = { CRIMSON = {main = Color3.fromRGB(255, 35, 35), dark = Color3.fromRGB(110, 0, 0), light = Color3.fromRGB(255, 150, 150), ambient = Color3.fromRGB(65, 0, 0), sat = 0.1}, VOID = {main = Color3.fromRGB(155, 70, 255), dark = Color3.fromRGB(45, 0, 90), light = Color3.fromRGB(210, 165, 255), ambient = Color3.fromRGB(28, 0, 55), sat = 0}, ICE = {main = Color3.fromRGB(65, 210, 255), dark = Color3.fromRGB(0, 65, 115), light = Color3.fromRGB(190, 245, 255), ambient = Color3.fromRGB(0, 35, 65), sat = -0.2}, TOXIC = {main = Color3.fromRGB(115, 255, 45), dark = Color3.fromRGB(20, 85, 0), light = Color3.fromRGB(210, 255, 150), ambient = Color3.fromRGB(20, 55, 0), sat = 0.15}, GOLD = {main = Color3.fromRGB(255, 190, 45), dark = Color3.fromRGB(105, 55, 0), light = Color3.fromRGB(255, 235, 145), ambient = Color3.fromRGB(60, 35, 0), sat = 0.15}, GLITCH = {main = Color3.fromRGB(255, 55, 190), dark = Color3.fromRGB(70, 0, 85), light = Color3.fromRGB(130, 255, 255), ambient = Color3.fromRGB(45, 0, 45), sat = 0.4}, STORM = {main = Color3.fromRGB(110, 150, 255), dark = Color3.fromRGB(15, 20, 60), light = Color3.fromRGB(220, 235, 255), ambient = Color3.fromRGB(10, 14, 32), sat = -0.1}, INFERNO = {main = Color3.fromRGB(255, 110, 20), dark = Color3.fromRGB(90, 15, 0), light = Color3.fromRGB(255, 220, 120), ambient = Color3.fromRGB(50, 15, 0), sat = 0.2}, SAKURA = {main = Color3.fromRGB(255, 130, 185), dark = Color3.fromRGB(110, 30, 70), light = Color3.fromRGB(255, 215, 235), ambient = Color3.fromRGB(50, 20, 35), sat = 0.1}, GALAXY = {main = Color3.fromRGB(130, 90, 255), dark = Color3.fromRGB(20, 10, 60), light = Color3.fromRGB(120, 230, 255), ambient = Color3.fromRGB(14, 8, 40), sat = 0.2}, PRISM = {main = Color3.fromRGB(255, 120, 200), dark = Color3.fromRGB(40, 40, 60), light = Color3.fromRGB(255, 255, 255), ambient = Color3.fromRGB(25, 25, 35), sat = 0.3}, } local selectedTheme = "CRIMSON" local theme = themes[selectedTheme] ---------------------------------------------------------------- -- state ---------------------------------------------------------------- local active = false local busy = false local taunting = false local skipRequested = false local session = 0 local baseFov = 70 local activeSince = 0 local music = nil local eyes = nil local lightingBackup = nil local cc, bloom, blur = nil, nil, nil local curChar, curRoot, curHead, curHum = nil, nil, nil, nil local groundOffset = 3 local savedSpeed = 16 local deathConn = nil local beatEnergy = 0 local loudAvg = 0 local lastBeat = 0 local shakeAmount = 0 local tauntPunch = 0 local fovPunch = 0 local fovGoal = 0 local freezeUntil = 0 local rage = 0 local overdrive = false local overdriveEnd = 0 local lastCycle = 0 local auraUpdaters = {} local auraHighlight = nil local emitters = setmetatable({}, {__mode = "k"}) local cooldownUntil = {} local textShake = false -- forward declarations (filled in further down) local startAura, stopAura, runEncounter, taunt local setTheme, cycleTheme, applyPower, applyLighting local onSettingChanged, useAbility, buildEyes, buildAura ---------------------------------------------------------------- -- small helpers ---------------------------------------------------------------- local function new(class, props) local obj = Instance.new(class) for k, v in pairs(props) do if k ~= "Parent" then obj[k] = v end end obj.Parent = props.Parent return obj end local function tween(obj, time, props, style, dir) local t = TweenService:Create(obj, TweenInfo.new(time, style or Enum.EasingStyle.Quad, dir or Enum.EasingDirection.Out), props) t:Play() return t end local function corner(parent, radius) return new("UICorner", {CornerRadius = UDim.new(0, radius), Parent = parent}) end local function playSound(id, volume, speed, cutAfter) local s = new("Sound", { SoundId = id, Volume = volume or 0.6, PlaybackSpeed = speed or 1, Parent = SoundService, }) s:Play() if cutAfter then task.delay(cutAfter, function() if s.Parent then s:Stop() end end) end Debris:AddItem(s, 3) return s end local kp = NumberSequenceKeypoint.new local function grow(a, b, c) return NumberSequence.new({kp(0, a), kp(0.5, b), kp(1, c)}) end local function fade(mid) return NumberSequence.new({kp(0, 1), kp(0.25, mid), kp(1, 1)}) end local function power() local p = settings.intensity if overdrive then p = p * 1.6 end return p end local function getChar() local c = player.Character if not c then return end local r = c:FindFirstChild("HumanoidRootPart") local h = c:FindFirstChild("Head") local hu = c:FindFirstChildOfClass("Humanoid") if r and h and hu and hu.Health > 0 then return c, r, h, hu end end -- clean up anything left over from an old copy of the script for _, n in ipairs({"EnemyEncounterGui", "EE_Eyes"}) do local o = playerGui:FindFirstChild(n) if o then o:Destroy() end end for _, n in ipairs({"EnemyEncounterAura", "EnemyEncounterFX"}) do local o = workspace:FindFirstChild(n) if o then o:Destroy() end end local auraFolder = new("Folder", {Name = "EnemyEncounterAura", Parent = workspace}) local fxFolder = new("Folder", {Name = "EnemyEncounterFX", Parent = workspace}) ---------------------------------------------------------------- -- GUI ---------------------------------------------------------------- local gui = new("ScreenGui", { Name = "EnemyEncounterGui", ResetOnSpawn = false, IgnoreGuiInset = true, DisplayOrder = 50, ZIndexBehavior = Enum.ZIndexBehavior.Sibling, Parent = playerGui, }) local accents = {} local repaints = {} local function accent(obj, prop) table.insert(accents, {obj, prop}) obj[prop] = theme.main return obj end local function label(parent, str, size, color, font, props) local l = new("TextLabel", { BackgroundTransparency = 1, Text = str, TextSize = size, TextColor3 = color or WHITE, Font = font or Enum.Font.GothamBold, TextXAlignment = Enum.TextXAlignment.Left, Parent = parent, }) if props then for k, v in pairs(props) do l[k] = v end end return l end -- vignette (4 gradient edges inside a canvas group) local vignette = new("CanvasGroup", {Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, GroupTransparency = 1, ZIndex = 1, Parent = gui}) local vigFrames = {} local function vigEdge(pos, size, rot) local f = new("Frame", {Position = pos, Size = size, BorderSizePixel = 0, BackgroundColor3 = theme.dark, Parent = vignette}) new("UIGradient", {Rotation = rot, Transparency = NumberSequence.new({kp(0, 0.1), kp(1, 1)}), Parent = f}) table.insert(vigFrames, f) end vigEdge(UDim2.fromScale(0, 0), UDim2.fromScale(1, 0.3), 90) vigEdge(UDim2.fromScale(0, 0.7), UDim2.fromScale(1, 0.3), 270) vigEdge(UDim2.fromScale(0, 0), UDim2.fromScale(0.25, 1), 0) vigEdge(UDim2.fromScale(0.75, 0), UDim2.fromScale(0.25, 1), 180) local glitchLayer = new("Frame", {Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, ZIndex = 2, Parent = gui}) local letterTop = new("Frame", {Size = UDim2.fromScale(1, 0), BackgroundColor3 = BLACK, BorderSizePixel = 0, ZIndex = 5, Parent = gui}) local letterBot = new("Frame", {AnchorPoint = Vector2.new(0, 1), Position = UDim2.fromScale(0, 1), Size = UDim2.fromScale(1, 0), BackgroundColor3 = BLACK, BorderSizePixel = 0, ZIndex = 5, Parent = gui}) local bar = new("Frame", {Position = UDim2.fromScale(0, 1.1), Size = UDim2.fromScale(1, 0.16), BackgroundColor3 = BLACK, BackgroundTransparency = 0.08, BorderSizePixel = 0, ZIndex = 6, Parent = gui}) local textLabel = new("TextLabel", { AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.5, 0.5), Size = UDim2.fromScale(0.9, 0.7), BackgroundTransparency = 1, Text = "", Font = Enum.Font.Code, TextScaled = true, TextColor3 = RED, ZIndex = 7, Parent = bar, }) new("UITextSizeConstraint", {MaxTextSize = 36, Parent = textLabel}) local flash = new("Frame", {Size = UDim2.fromScale(1, 1), BackgroundColor3 = WHITE, BackgroundTransparency = 1, BorderSizePixel = 0, ZIndex = 30, Parent = gui}) -- main button: white outline outside, black outline inside local mainWrap = new("Frame", {Position = UDim2.new(0, 20, 1, -102), Size = UDim2.fromOffset(82, 82), BackgroundColor3 = WHITE, ZIndex = 10, Parent = gui}) corner(mainWrap, 18) local mainScale = new("UIScale", {Parent = mainWrap}) local mainBtn = new("ImageButton", { Position = UDim2.new(0, 4, 0, 4), Size = UDim2.new(1, -8, 1, -8), Image = IMAGE_ID, ScaleType = Enum.ScaleType.Crop, BackgroundColor3 = Color3.fromRGB(15, 15, 15), AutoButtonColor = false, ZIndex = 11, Parent = mainWrap, }) corner(mainBtn, 14) new("UIStroke", {Color = BLACK, Thickness = 3, ApplyStrokeMode = Enum.ApplyStrokeMode.Border, Parent = mainBtn}) local gearBtn = new("TextButton", { Position = UDim2.new(0, 110, 1, -80), Size = UDim2.fromOffset(38, 38), BackgroundColor3 = Color3.fromRGB(14, 14, 18), Text = "⚙", TextSize = 22, TextColor3 = WHITE, Font = Enum.Font.GothamBold, AutoButtonColor = true, ZIndex = 10, Parent = gui, }) corner(gearBtn, 10) accent(new("UIStroke", {Thickness = 2, Parent = gearBtn}), "Color") -- HUD local hud = new("Frame", { AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, -70), Size = UDim2.fromOffset(300, 50), BackgroundColor3 = Color3.fromRGB(10, 10, 14), BackgroundTransparency = 0.15, ZIndex = 10, Parent = gui, }) corner(hud, 10) accent(new("UIStroke", {Thickness = 2, Parent = hud}), "Color") local hudTitle = label(hud, "AURA: CRIMSON", 16, WHITE, Enum.Font.GothamBlack, {Size = UDim2.new(1, 0, 0, 28), TextXAlignment = Enum.TextXAlignment.Center, ZIndex = 11}) accent(hudTitle, "TextColor3") local rageBack = new("Frame", {Position = UDim2.new(0.05, 0, 0, 34), Size = UDim2.new(0.9, 0, 0, 8), BackgroundColor3 = Color3.fromRGB(35, 35, 42), BorderSizePixel = 0, ZIndex = 11, Parent = hud}) corner(rageBack, 4) local rageFill = accent(new("Frame", {Size = UDim2.fromScale(0, 1), BorderSizePixel = 0, ZIndex = 12, Parent = rageBack}), "BackgroundColor3") corner(rageFill, 4) -- ability bar local abilities = { {id = "slam", name = "SLAM", key = Enum.KeyCode.Q, cd = 4}, {id = "laser", name = "LASER", key = Enum.KeyCode.E, cd = 6}, {id = "rift", name = "RIFT", key = Enum.KeyCode.R, cd = 9}, {id = "nova", name = "NOVA", key = Enum.KeyCode.Z, cd = 12}, {id = "blink", name = "BLINK", key = Enum.KeyCode.X, cd = 3}, {id = "freeze", name = "STOP", key = Enum.KeyCode.C, cd = 14}, } local abilityFns = {} local abilityBar = new("Frame", { AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, 120), Size = UDim2.fromOffset(#abilities * 70, 64), BackgroundTransparency = 1, ZIndex = 10, Parent = gui, }) new("UIListLayout", {FillDirection = Enum.FillDirection.Horizontal, Padding = UDim.new(0, 6), HorizontalAlignment = Enum.HorizontalAlignment.Center, Parent = abilityBar}) for _, a in ipairs(abilities) do local b = new("TextButton", { Size = UDim2.fromOffset(64, 64), BackgroundColor3 = Color3.fromRGB(12, 12, 16), BackgroundTransparency = 0.1, Text = "", AutoButtonColor = false, ClipsDescendants = true, ZIndex = 10, Parent = abilityBar, }) corner(b, 10) accent(new("UIStroke", {Thickness = 2, Parent = b}), "Color") label(b, a.key.Name, 22, WHITE, Enum.Font.GothamBlack, {Size = UDim2.new(1, 0, 0.6, 0), TextXAlignment = Enum.TextXAlignment.Center, ZIndex = 12}) label(b, a.name, 11, Color3.fromRGB(190, 190, 200), Enum.Font.GothamBold, {Position = UDim2.fromScale(0, 0.62), Size = UDim2.new(1, 0, 0.3, 0), TextXAlignment = Enum.TextXAlignment.Center, ZIndex = 12}) a.cover = new("Frame", {AnchorPoint = Vector2.new(0, 1), Position = UDim2.fromScale(0, 1), Size = UDim2.fromScale(1, 0), BackgroundColor3 = BLACK, BackgroundTransparency = 0.35, BorderSizePixel = 0, ZIndex = 13, Parent = b}) a.timer = label(b, "", 16, WHITE, Enum.Font.GothamBlack, {Size = UDim2.fromScale(1, 1), TextXAlignment = Enum.TextXAlignment.Center, ZIndex = 14}) b.Activated:Connect(function() useAbility(a) end) end -- settings panel local panel = new("Frame", { AnchorPoint = Vector2.new(0, 0.5), Position = UDim2.new(0, 20, 0.5, 0), Size = UDim2.fromOffset(340, 480), BackgroundColor3 = Color3.fromRGB(12, 12, 16), BackgroundTransparency = 0.04, Visible = false, ZIndex = 20, Parent = gui, }) corner(panel, 14) accent(new("UIStroke", {Thickness = 2, Parent = panel}), "Color") local panelScale = new("UIScale", {Scale = 0.9, Parent = panel}) local titleBar = new("Frame", {Size = UDim2.new(1, 0, 0, 44), BackgroundTransparency = 1, ZIndex = 21, Parent = panel}) accent(label(titleBar, "ENEMY SETTINGS", 18, WHITE, Enum.Font.GothamBlack, {Position = UDim2.fromOffset(14, 0), Size = UDim2.new(1, -60, 1, 0), ZIndex = 22}), "TextColor3") local closeBtn = new("TextButton", {AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -10, 0.5, 0), Size = UDim2.fromOffset(28, 28), BackgroundColor3 = Color3.fromRGB(30, 30, 38), Text = "X", TextColor3 = WHITE, TextSize = 14, Font = Enum.Font.GothamBold, ZIndex = 22, Parent = titleBar}) corner(closeBtn, 8) local scroll = new("ScrollingFrame", { Position = UDim2.fromOffset(10, 48), Size = UDim2.new(1, -20, 1, -58), BackgroundTransparency = 1, BorderSizePixel = 0, ScrollBarThickness = 4, CanvasSize = UDim2.new(), AutomaticCanvasSize = Enum.AutomaticSize.Y, ZIndex = 21, Parent = panel, }) new("UIListLayout", {Padding = UDim.new(0, 6), SortOrder = Enum.SortOrder.LayoutOrder, Parent = scroll}) local function header(order, str) label(scroll, str, 13, Color3.fromRGB(150, 150, 165), Enum.Font.GothamBold, {LayoutOrder = order, Size = UDim2.new(1, 0, 0, 22), ZIndex = 22}) end local function addToggle(order, str, key) local row = new("Frame", {LayoutOrder = order, Size = UDim2.new(1, -6, 0, 30), BackgroundTransparency = 1, ZIndex = 22, Parent = scroll}) label(row, str, 14, WHITE, Enum.Font.Gotham, {Size = UDim2.new(1, -60, 1, 0), ZIndex = 23}) local sw = new("TextButton", {AnchorPoint = Vector2.new(1, 0.5), Position = UDim2.new(1, -4, 0.5, 0), Size = UDim2.fromOffset(46, 22), Text = "", AutoButtonColor = false, ZIndex = 23, Parent = row}) corner(sw, 11) local knob = new("Frame", {AnchorPoint = Vector2.new(0, 0.5), Size = UDim2.fromOffset(16, 16), BackgroundColor3 = WHITE, ZIndex = 24, Parent = sw}) corner(knob, 8) local function paint() local on = settings[key] sw.BackgroundColor3 = on and theme.main or Color3.fromRGB(50, 50, 58) knob.Position = on and UDim2.new(1, -19, 0.5, 0) or UDim2.new(0, 3, 0.5, 0) end paint() table.insert(repaints, paint) sw.Activated:Connect(function() settings[key] = not settings[key] paint() onSettingChanged(key) end) end local function addSlider(order, str, key, minV, maxV, fmt) local row = new("Frame", {LayoutOrder = order, Size = UDim2.new(1, -6, 0, 44), BackgroundTransparency = 1, ZIndex = 22, Parent = scroll}) label(row, str, 14, WHITE, Enum.Font.Gotham, {Size = UDim2.new(0.6, 0, 0, 22), ZIndex = 23}) local val = label(row, "", 14, WHITE, Enum.Font.GothamBold, {AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, 0, 0, 0), Size = UDim2.new(0.4, 0, 0, 22), TextXAlignment = Enum.TextXAlignment.Right, ZIndex = 23}) local track = new("TextButton", {Position = UDim2.new(0, 0, 0, 28), Size = UDim2.new(1, 0, 0, 8), BackgroundColor3 = Color3.fromRGB(40, 40, 48), Text = "", AutoButtonColor = false, ZIndex = 23, Parent = row}) corner(track, 4) local fill = accent(new("Frame", {Size = UDim2.fromScale(0, 1), BorderSizePixel = 0, ZIndex = 24, Parent = track}), "BackgroundColor3") corner(fill, 4) local function show() local a = (settings[key] - minV) / (maxV - minV) fill.Size = UDim2.fromScale(math.clamp(a, 0, 1), 1) val.Text = string.format(fmt, settings[key]) end show() local dragging = false local function fromInput(input) local a = math.clamp((input.Position.X - track.AbsolutePosition.X) / track.AbsoluteSize.X, 0, 1) settings[key] = minV + (maxV - minV) * a show() onSettingChanged(key) end track.InputBegan:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then dragging = true fromInput(i) end end) UserInputService.InputChanged:Connect(function(i) if dragging and (i.UserInputType == Enum.UserInputType.MouseMovement or i.UserInputType == Enum.UserInputType.Touch) then fromInput(i) end end) UserInputService.InputEnded:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then dragging = false end end) end header(1, "AURA") local grid = new("Frame", {LayoutOrder = 2, Size = UDim2.new(1, -6, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, BackgroundTransparency = 1, ZIndex = 22, Parent = scroll}) new("UIGridLayout", {CellSize = UDim2.new(0.333, -5, 0, 30), CellPadding = UDim2.fromOffset(6, 6), SortOrder = Enum.SortOrder.LayoutOrder, Parent = grid}) local themeButtons = {} for i, name in ipairs(themeOrder) do local tb = new("TextButton", {LayoutOrder = i, BackgroundColor3 = Color3.fromRGB(22, 22, 28), Text = name, TextSize = 12, TextColor3 = themes[name].main, Font = Enum.Font.GothamBold, AutoButtonColor = true, ZIndex = 23, Parent = grid}) corner(tb, 8) local st = new("UIStroke", {Color = themes[name].main, Thickness = 1, Transparency = 0.7, Parent = tb}) themeButtons[name] = st tb.Activated:Connect(function() setTheme(name) end) end header(3, "VISUALS") addToggle(4, "Camera shake", "shake") addToggle(5, "Camera beat bop", "bop") addToggle(6, "Screen effects", "screenFx") addToggle(7, "Dark atmosphere", "darkness") addToggle(8, "Glowing eyes", "eyes") addToggle(9, "Beat shockwaves", "shockwave") addToggle(10, "Cinematic bars", "cinematic") addToggle(11, "Reduced motion", "reducedMotion") header(12, "SOUND AND POWER") addSlider(13, "Music volume", "volume", 0, 1, "%.2f") addSlider(14, "Aura intensity", "intensity", 0.3, 2, "%.2fx") addToggle(15, "Typing sounds", "typeSounds") header(16, "EXTRAS") addToggle(17, "Ability bar", "abilityBar") addToggle(18, "Speed boost (+6)", "speedBoost") addToggle(19, "Auto cycle auras", "autoCycle") local function tintAccents() for _, a in ipairs(accents) do if a[1].Parent then a[1][a[2]] = theme.main end end for _, p in ipairs(repaints) do p() end for _, f in ipairs(vigFrames) do f.BackgroundColor3 = theme.dark end for name, st in pairs(themeButtons) do st.Transparency = (name == selectedTheme) and 0 or 0.7 st.Thickness = (name == selectedTheme) and 2 or 1 end hudTitle.Text = "AURA: " .. selectedTheme end tintAccents() local panelOpen = false local function setPanel(open) panelOpen = open if open then panel.Visible = true tween(panelScale, 0.2, {Scale = 1}, Enum.EasingStyle.Back) else tween(panelScale, 0.15, {Scale = 0.9}) task.delay(0.15, function() if not panelOpen then panel.Visible = false end end) end end gearBtn.Activated:Connect(function() setPanel(not panelOpen) end) closeBtn.Activated:Connect(function() setPanel(false) end) -- drag the panel by its title bar do local dragging, startPos, startInput = false, nil, nil titleBar.InputBegan:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then dragging = true startInput = i.Position startPos = panel.Position end end) UserInputService.InputChanged:Connect(function(i) if dragging and (i.UserInputType == Enum.UserInputType.MouseMovement or i.UserInputType == Enum.UserInputType.Touch) then local d = i.Position - startInput panel.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + d.X, startPos.Y.Scale, startPos.Y.Offset + d.Y) end end) UserInputService.InputEnded:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then dragging = false end end) end ---------------------------------------------------------------- -- screen helpers ---------------------------------------------------------------- local function screenFlash(color, alpha, time) if settings.reducedMotion then alpha = 1 - (1 - alpha) * 0.35 end flash.BackgroundColor3 = color flash.BackgroundTransparency = alpha tween(flash, time or 0.3, {BackgroundTransparency = 1}) end local function banner(str, color) local l = new("TextLabel", { AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.5, 0.28), Size = UDim2.fromOffset(600, 70), BackgroundTransparency = 1, Text = str, Font = Enum.Font.GothamBlack, TextSize = 46, TextColor3 = color, TextStrokeColor3 = BLACK, TextStrokeTransparency = 0.3, ZIndex = 15, Parent = gui, }) local sc = new("UIScale", {Scale = 0.6, Parent = l}) tween(sc, 0.25, {Scale = 1}, Enum.EasingStyle.Back) task.delay(0.9, function() tween(l, 0.5, {TextTransparency = 1, TextStrokeTransparency = 1}) end) Debris:AddItem(l, 1.5) end local function ripple(color) local r = new("Frame", {AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.5, 0.5), Size = UDim2.fromOffset(40, 40), BackgroundTransparency = 1, ZIndex = 4, Parent = gui}) new("UICorner", {CornerRadius = UDim.new(1, 0), Parent = r}) local st = new("UIStroke", {Color = color, Thickness = 6, Parent = r}) tween(r, 0.8, {Size = UDim2.fromOffset(2600, 2600)}, Enum.EasingStyle.Quart) tween(st, 0.8, {Transparency = 1}) Debris:AddItem(r, 0.9) end local function barIn(color, shaky) textLabel.TextColor3 = color textLabel.Text = "" textShake = shaky tween(bar, 0.35, {Position = UDim2.fromScale(0, 0.72)}, Enum.EasingStyle.Quart) end local function barOut() textShake = false tween(bar, 0.35, {Position = UDim2.fromScale(0, 1.1)}, Enum.EasingStyle.Quart) end local function letterbox(on) if not settings.cinematic then return end local h = on and 0.11 or 0 tween(letterTop, 0.8, {Size = UDim2.fromScale(1, h)}, Enum.EasingStyle.Sine) tween(letterBot, 0.8, {Size = UDim2.fromScale(1, h)}, Enum.EasingStyle.Sine) end ---------------------------------------------------------------- -- lighting ---------------------------------------------------------------- local function lightingOn() if lightingBackup then return end lightingBackup = { Ambient = Lighting.Ambient, OutdoorAmbient = Lighting.OutdoorAmbient, Brightness = Lighting.Brightness, FogColor = Lighting.FogColor, FogStart = Lighting.FogStart, FogEnd = Lighting.FogEnd, } cc = new("ColorCorrectionEffect", {Name = "EE_ColorCorrection", Parent = Lighting}) bloom = new("BloomEffect", {Name = "EE_Bloom", Intensity = 0.4, Size = 24, Threshold = 1.1, Parent = Lighting}) blur = new("BlurEffect", {Name = "EE_Blur", Size = 0, Parent = Lighting}) applyLighting() end applyLighting = function() if not lightingBackup then return end local b = lightingBackup if settings.darkness then tween(Lighting, 1.2, { Ambient = theme.ambient, OutdoorAmbient = theme.ambient, Brightness = math.max(b.Brightness * 0.45, 0.3), FogColor = theme.ambient, FogStart = 15, FogEnd = 260, }) else tween(Lighting, 1.2, { Ambient = b.Ambient, OutdoorAmbient = b.OutdoorAmbient, Brightness = b.Brightness, FogColor = b.FogColor, FogStart = b.FogStart, FogEnd = b.FogEnd, }) end if cc then tween(cc, 1, {TintColor = Color3.new(1, 1, 1):Lerp(theme.light, 0.18)}) end end local function lightingOff() if not lightingBackup then return end local b = lightingBackup lightingBackup = nil tween(Lighting, 1, { Ambient = b.Ambient, OutdoorAmbient = b.OutdoorAmbient, Brightness = b.Brightness, FogColor = b.FogColor, FogStart = b.FogStart, FogEnd = b.FogEnd, }) local c, bl, bu = cc, bloom, blur cc, bloom, blur = nil, nil, nil task.delay(1.1, function() if c then c:Destroy() end if bl then bl:Destroy() end if bu then bu:Destroy() end end) end local function punchBlur(size) if blur and not settings.reducedMotion then blur.Size = size tween(blur, 0.5, {Size = 0}) end end ---------------------------------------------------------------- -- world helpers (particles, ribbons, rings, lightning) ---------------------------------------------------------------- local function ghost(size, parent) return new("Part", { Size = size or Vector3.new(0.2, 0.2, 0.2), Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, Massless = true, Transparency = 1, Parent = parent or auraFolder, }) end local function addUpdater(fn) table.insert(auraUpdaters, fn) end local function groundPos() return Vector3.new(curRoot.Position.X, curRoot.Position.Y - groundOffset + 0.1, curRoot.Position.Z) end local function follower(offset, size) local p = ghost(size) p.CFrame = CFrame.new(curRoot.Position + offset) addUpdater(function(dt, t, root) p.CFrame = CFrame.new(root.Position + offset) end) return p end local rangeKeys = {Lifetime = true, Speed = true, Rotation = true, RotSpeed = true} local function emit(parent, cfg) local e = Instance.new("ParticleEmitter") e.Texture = TEX.spark e.LightEmission = 1 e.Lifetime = NumberRange.new(1, 2) e.Speed = NumberRange.new(2, 4) e.Size = NumberSequence.new(0.5) e.Transparency = fade(0.2) e.LockedToPart = false for k, v in pairs(cfg) do if typeof(v) == "number" then if rangeKeys[k] then v = NumberRange.new(v) elseif k == "Size" or k == "Transparency" then v = NumberSequence.new(v) end elseif typeof(v) == "Color3" then v = ColorSequence.new(v) end pcall(function() e[k] = v end) end local base = cfg.Rate or 20 e.Rate = base * power() e.Parent = parent emitters[e] = base return e end applyPower = function() for e, base in pairs(emitters) do if e.Parent then e.Rate = base * power() end end end local function burst(pos, cfg, count) local p = ghost(Vector3.new(1, 1, 1), fxFolder) p.CFrame = CFrame.new(pos) cfg.Rate = 0 local e = emit(p, cfg) e:Emit(count) Debris:AddItem(p, 4) end -- glowing trail ribbons that orbit the player (no solid parts visible) local function ribbon(cfg) local trails = {} local count = cfg.count or 2 local width = cfg.width or 0.5 for i = 1, count do local p = ghost(Vector3.new(0.3, 0.3, 0.3)) local a0 = new("Attachment", {Position = Vector3.new(0, width / 2, 0), Parent = p}) local a1 = new("Attachment", {Position = Vector3.new(0, -width / 2, 0), Parent = p}) local tr = new("Trail", { Attachment0 = a0, Attachment1 = a1, Lifetime = cfg.life or 0.7, LightEmission = 1, Color = cfg.color or ColorSequence.new(theme.main, theme.dark), Transparency = NumberSequence.new({kp(0, 0.1), kp(1, 1)}), WidthScale = NumberSequence.new({kp(0, 1), kp(1, 0)}), MinLength = 0.02, FaceCamera = true, Parent = p, }) table.insert(trails, tr) local phase = (i - 1) / count * math.pi * 2 local speed = cfg.speed or 3 local radius = cfg.radius or 3 local height = cfg.height or 0 addUpdater(function(dt, t, root, beat) local ang = t * speed + phase local r = radius * (1 + beat * 0.15) + (cfg.jitter and (math.random() - 0.5) * cfg.jitter or 0) local h = height + math.sin(t * (cfg.bob or 2) + phase) * (cfg.bobAmp or 0) local v = Vector3.new(math.cos(ang) * r, h, math.sin(ang) * r) if cfg.tilt then v = CFrame.Angles(cfg.tilt, 0, 0) * v end p.CFrame = CFrame.new(root.Position + v) end) end return trails end -- glowing summoning circle on the ground with rotating arcs local function groundRing(diameter) local function disc(color, material, transp) return new("Part", { Shape = Enum.PartType.Cylinder, Size = Vector3.new(0.1, diameter, diameter), Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, Material = material, Color = color, Transparency = transp, Parent = auraFolder, }) end local outer = disc(theme.main, Enum.Material.Neon, 0.55) local inner = disc(theme.dark, Enum.Material.SmoothPlastic, 0.4) addUpdater(function(dt, t, r, beat) local d = diameter * (1 + beat * 0.12) local cf = CFrame.new(r.Position.X, r.Position.Y - groundOffset + 0.08, r.Position.Z) * CFrame.Angles(0, 0, math.rad(90)) outer.Size = Vector3.new(0.1, d, d) outer.CFrame = cf inner.Size = Vector3.new(0.1, d * 0.86, d * 0.86) inner.CFrame = cf + Vector3.new(0, 0.03, 0) end) ribbon({count = 3, radius = diameter * 0.43, height = -groundOffset + 0.25, speed = 2.5, width = 0.25, life = 1.2}) end local function shockwave(pos, color, diameter, life, startTransp) local d = new("Part", { Shape = Enum.PartType.Cylinder, Size = Vector3.new(0.2, 2, 2), Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, Material = Enum.Material.Neon, Color = color, Transparency = startTransp or 0.5, CFrame = CFrame.new(pos) * CFrame.Angles(0, 0, math.rad(90)), Parent = fxFolder, }) tween(d, life or 0.6, {Size = Vector3.new(0.2, diameter, diameter), Transparency = 1}) Debris:AddItem(d, (life or 0.6) + 0.1) end -- jagged lightning bolt between two points (beams on terrain attachments) local function bolt(a, b, color, width, segs) local pts = {a} for i = 1, segs - 1 do local base = a:Lerp(b, i / segs) local j = 2.2 pts[#pts + 1] = base + Vector3.new((math.random() - 0.5) * j * 2, (math.random() - 0.5) * j, (math.random() - 0.5) * j * 2) end pts[#pts + 1] = b local atts = {} for i, p in ipairs(pts) do local at = new("Attachment", {Parent = workspace.Terrain}) at.WorldPosition = p atts[i] = at Debris:AddItem(at, 0.45) end for i = 1, #atts - 1 do for layer = 1, 2 do local w = layer == 1 and width or width * 0.35 local bm = new("Beam", { Attachment0 = atts[i], Attachment1 = atts[i + 1], Color = ColorSequence.new(layer == 1 and color or WHITE), LightEmission = 1, Width0 = w, Width1 = w, FaceCamera = true, Segments = 1, Parent = workspace.Terrain, }) tween(bm, 0.3, {Width0 = 0, Width1 = 0}) Debris:AddItem(bm, 0.45) end end end local function rayParams() local rp = RaycastParams.new() rp.FilterType = Enum.RaycastFilterType.Exclude rp.FilterDescendantsInstances = {curChar, auraFolder, fxFolder} return rp end local function flatLook() local l = camera.CFrame.LookVector * Vector3.new(1, 0, 1) if l.Magnitude < 0.05 then l = curRoot.CFrame.LookVector * Vector3.new(1, 0, 1) end return l.Unit end ---------------------------------------------------------------- -- aura builders (every one is particles, ribbons, light, lightning...) ---------------------------------------------------------------- local builders = {} builders.CRIMSON = function() local body = follower(Vector3.zero, Vector3.new(2.6, 4.5, 2.6)) local feet = follower(Vector3.new(0, -groundOffset + 0.4, 0), Vector3.new(5, 0.2, 5)) local head = follower(Vector3.new(0, 1.9, 0), Vector3.new(1, 1, 1)) groundRing(14) emit(body, {Rate = 45, Lifetime = NumberRange.new(1.6, 3), Speed = NumberRange.new(3, 7), Acceleration = Vector3.new(0, 5, 0), Size = grow(0.35, 0.25, 0), Color = ColorSequence.new(theme.light, theme.dark), EmissionDirection = Enum.NormalId.Top, SpreadAngle = Vector2.new(30, 30)}) emit(feet, {Texture = TEX.smoke, Rate = 16, Lifetime = NumberRange.new(2, 3.5), Speed = NumberRange.new(1, 3), Size = grow(4, 8, 10), Transparency = fade(0.78), Color = ColorSequence.new(theme.main, theme.dark), LightEmission = 0.25, EmissionDirection = Enum.NormalId.Top, Rotation = NumberRange.new(0, 360), RotSpeed = NumberRange.new(-25, 25)}) emit(head, {Rate = 10, Lifetime = NumberRange.new(0.8, 1.2), Speed = NumberRange.new(0, 1), Acceleration = Vector3.new(0, -35, 0), Size = 0.14, Color = theme.main, LightEmission = 0.3}) ribbon({count = 3, radius = 3.4, speed = 3.2, width = 0.6, life = 0.8, bobAmp = 2.2, bob = 2}) end builders.VOID = function() local body = follower(Vector3.zero, Vector3.new(3, 5, 3)) local well = follower(Vector3.zero, Vector3.new(16, 16, 16)) groundRing(15) emit(well, {Rate = 70, Shape = Enum.ParticleEmitterShape.Sphere, ShapeInOut = Enum.ParticleEmitterShapeInOut.Inward, ShapeStyle = Enum.ParticleEmitterShapeStyle.Surface, Lifetime = NumberRange.new(0.8, 1.3), Speed = NumberRange.new(9, 12), Size = grow(0.5, 0.35, 0.05), Color = ColorSequence.new(theme.light, theme.main)}) emit(body, {Texture = TEX.smoke, Rate = 22, Lifetime = NumberRange.new(2, 3), Speed = NumberRange.new(1, 3), Size = grow(3, 6, 8), Transparency = fade(0.35), Color = Color3.fromRGB(8, 0, 16), LightEmission = 0, Rotation = NumberRange.new(0, 360), RotSpeed = NumberRange.new(-30, 30)}) ribbon({count = 2, radius = 5.5, height = 0.5, speed = 5, width = 0.5, life = 1.1}) ribbon({count = 3, radius = 2.8, speed = -4, width = 0.4, life = 0.9, bobAmp = 3, bob = 3, color = ColorSequence.new(theme.light, theme.dark)}) end builders.ICE = function() local body = follower(Vector3.zero, Vector3.new(3, 5, 3)) local sky = follower(Vector3.new(0, 18, 0), Vector3.new(34, 1, 34)) local feet = follower(Vector3.new(0, -groundOffset + 0.5, 0), Vector3.new(6, 0.2, 6)) groundRing(14) emit(sky, {Rate = 70, Lifetime = NumberRange.new(4, 5.5), Speed = NumberRange.new(1, 3), EmissionDirection = Enum.NormalId.Bottom, Acceleration = Vector3.new(1, -3, 0), Size = 0.28, Color = WHITE, LightEmission = 0.7, Rotation = NumberRange.new(0, 360), RotSpeed = NumberRange.new(-60, 60)}) emit(feet, {Texture = TEX.smoke, Rate = 14, Lifetime = NumberRange.new(2.5, 4), Speed = NumberRange.new(1, 3), Size = grow(4, 8, 10), Transparency = fade(0.8), Color = ColorSequence.new(theme.light, theme.main), LightEmission = 0.2, EmissionDirection = Enum.NormalId.Top}) emit(body, {Rate = 20, Lifetime = NumberRange.new(2, 3), Speed = NumberRange.new(0.5, 2), Size = grow(0, 0.6, 0), Color = theme.light, RotSpeed = NumberRange.new(-90, 90), Rotation = NumberRange.new(0, 360)}) ribbon({count = 2, radius = 3, height = 1, speed = 1.4, width = 0.35, life = 1.4, bobAmp = 1.5, bob = 1.2, color = ColorSequence.new(theme.light, theme.main)}) end builders.TOXIC = function() local body = follower(Vector3.zero, Vector3.new(3, 5, 3)) local gas = follower(Vector3.new(0, -groundOffset + 1, 0), Vector3.new(6, 0.5, 6)) local head = follower(Vector3.new(0, 1.9, 0), Vector3.new(1, 1, 1)) groundRing(15) emit(gas, {Texture = TEX.smoke, Rate = 30, Lifetime = NumberRange.new(3, 4.5), Speed = NumberRange.new(1, 3), Size = grow(4, 8, 11), Transparency = fade(0.55), Color = ColorSequence.new(theme.main, theme.dark), LightEmission = 0.35, EmissionDirection = Enum.NormalId.Top, Rotation = NumberRange.new(0, 360), RotSpeed = NumberRange.new(-20, 20)}) emit(body, {Texture = TEX.smoke, Rate = 14, Lifetime = NumberRange.new(1.5, 2.5), Speed = NumberRange.new(1, 3), Acceleration = Vector3.new(0, 4, 0), Size = grow(0.5, 0.9, 0.2), Transparency = fade(0.2), Color = theme.light, LightEmission = 0.6}) emit(head, {Rate = 9, Lifetime = NumberRange.new(0.8, 1.2), Speed = NumberRange.new(0, 1), Acceleration = Vector3.new(0, -30, 0), Size = 0.16, Color = theme.main}) emit(body, {Rate = 18, Lifetime = NumberRange.new(2, 3), Speed = NumberRange.new(0.5, 2), Size = grow(0, 0.4, 0), Color = theme.light}) ribbon({count = 2, radius = 3, speed = 1.8, width = 0.5, life = 1.0, jitter = 0.6, bobAmp = 2, bob = 2}) local pl = body:FindFirstChildOfClass("PointLight") addUpdater(function(dt, t, r, beat) if auraHighlight then auraHighlight.OutlineTransparency = 0.3 + math.random() * 0.3 end end) end builders.GOLD = function() local body = follower(Vector3.zero, Vector3.new(3, 5, 3)) local feet = follower(Vector3.new(0, -groundOffset, 0), Vector3.new(7, 0.2, 7)) local top = follower(Vector3.new(0, 70, 0)) local bottom = follower(Vector3.new(0, -groundOffset, 0)) groundRing(15) local a0 = new("Attachment", {Parent = bottom}) local a1 = new("Attachment", {Parent = top}) local pillar = new("Beam", {Attachment0 = a0, Attachment1 = a1, Color = ColorSequence.new(theme.light, theme.main), LightEmission = 1, Transparency = NumberSequence.new({kp(0, 0.5), kp(1, 1)}), Width0 = 5, Width1 = 2.5, FaceCamera = true, Segments = 1, Parent = bottom}) local core = new("Beam", {Attachment0 = a0, Attachment1 = a1, Color = ColorSequence.new(WHITE), LightEmission = 1, Transparency = NumberSequence.new({kp(0, 0.4), kp(1, 1)}), Width0 = 1.6, Width1 = 0.8, FaceCamera = true, Segments = 1, Parent = bottom}) addUpdater(function(dt, t, r, beat) pillar.Width0 = 4 + beat * 3 core.Width0 = 1.4 + beat * 1.2 end) emit(body, {Rate = 60, Lifetime = NumberRange.new(1.5, 2.5), Speed = NumberRange.new(3, 6), Acceleration = Vector3.new(0, 3, 0), Size = grow(0, 0.55, 0), Color = ColorSequence.new(theme.light, theme.main), EmissionDirection = Enum.NormalId.Top, SpreadAngle = Vector2.new(40, 40)}) emit(feet, {Rate = 12, Lifetime = NumberRange.new(3, 4), Speed = NumberRange.new(0.5, 1.5), Size = 0.2, Color = theme.light, EmissionDirection = Enum.NormalId.Top}) ribbon({count = 2, radius = 1.7, height = 3.1, speed = 3, width = 0.3, life = 1.0, color = ColorSequence.new(theme.light, theme.main)}) ribbon({count = 2, radius = 3.4, speed = 1.6, width = 0.45, life = 1.2, bobAmp = 2, bob = 1.5}) end builders.GLITCH = function() local body = follower(Vector3.zero, Vector3.new(3, 5, 3)) groundRing(13) local cyan = Color3.fromRGB(70, 255, 255) local mag = Color3.fromRGB(255, 55, 190) for _, c in ipairs({cyan, mag}) do emit(body, {Rate = 70, Lifetime = NumberRange.new(0.15, 0.4), Speed = NumberRange.new(10, 22), SpreadAngle = Vector2.new(180, 180), Size = NumberSequence.new({kp(0, 0.6), kp(1, 0)}), Color = c, Rotation = NumberRange.new(0, 360), RotSpeed = NumberRange.new(-400, 400), Transparency = 0}) end ribbon({count = 3, radius = 3, speed = 6, width = 0.4, life = 0.35, jitter = 1.6, bobAmp = 2.5, bob = 11, color = ColorSequence.new(cyan, mag)}) local nextSlice, nextFlip = 0, 0 addUpdater(function(dt, t, r, beat) if settings.reducedMotion then return end if auraHighlight and t > nextFlip then nextFlip = t + 0.06 auraHighlight.FillColor = math.random() < 0.5 and cyan or mag auraHighlight.FillTransparency = 0.5 + math.random() * 0.4 end if settings.screenFx and t > nextSlice then nextSlice = t + math.random(8, 30) / 100 / power() for _ = 1, math.random(1, 3) do local f = new("Frame", { Position = UDim2.new(0, math.random(-40, 40), math.random() * 0.95, 0), Size = UDim2.new(1, 80, math.random(2, 8) / 100, 0), BackgroundColor3 = ({cyan, mag, WHITE})[math.random(1, 3)], BackgroundTransparency = 0.55 + math.random() * 0.3, BorderSizePixel = 0, Parent = glitchLayer, }) Debris:AddItem(f, 0.1) end end if cc and math.random() < 0.08 then cc.Contrast = 0.1 + math.random() * 0.5 end end) end builders.STORM = function() local sky = follower(Vector3.new(0, 16, 0), Vector3.new(36, 1, 36)) local rain = follower(Vector3.new(0, 20, 0), Vector3.new(40, 1, 40)) groundRing(14) emit(sky, {Texture = TEX.smoke, Rate = 10, Lifetime = NumberRange.new(4, 6), Speed = NumberRange.new(0.5, 1.5), Size = grow(10, 14, 16), Transparency = fade(0.55), Color = Color3.fromRGB(30, 30, 42), LightEmission = 0, Rotation = NumberRange.new(0, 360), RotSpeed = NumberRange.new(-8, 8)}) emit(rain, {Rate = 120, Lifetime = NumberRange.new(0.5, 0.6), Speed = NumberRange.new(40, 55), EmissionDirection = Enum.NormalId.Bottom, Size = 0.2, Color = theme.light, LightEmission = 0.3, Transparency = NumberSequence.new(0.35), Orientation = Enum.ParticleOrientation.VelocityParallel}) ribbon({count = 3, radius = 3, speed = 7, width = 0.3, life = 0.25, jitter = 1.4, bobAmp = 2.3, bob = 9, color = ColorSequence.new(WHITE, theme.main)}) local nextBig, nextSmall = 0.5, 0 addUpdater(function(dt, t, root, beat) local p = power() if t > nextBig then nextBig = t + math.random(15, 50) / 100 / p local top = root.Position + Vector3.new(math.random(-10, 10), 45, math.random(-10, 10)) local hit = root.Position + Vector3.new(math.random(-7, 7), -groundOffset + 0.2, math.random(-7, 7)) bolt(top, hit, theme.main, 0.8, 9) burst(hit, {Rate = 0, Lifetime = NumberRange.new(0.3, 0.6), Speed = NumberRange.new(8, 16), SpreadAngle = Vector2.new(60, 60), EmissionDirection = Enum.NormalId.Top, Size = grow(0.4, 0.3, 0), Color = theme.light}, 14) if settings.screenFx then screenFlash(theme.light, 0.88, 0.2) end shakeAmount = math.max(shakeAmount, 0.35) end if t > nextSmall then nextSmall = t + 0.08 local o = root.Position + Vector3.new((math.random() - 0.5) * 3, (math.random() - 0.5) * 4, (math.random() - 0.5) * 3) local d = Vector3.new(math.random() - 0.5, math.random() - 0.5, math.random() - 0.5).Unit * math.random(3, 6) bolt(o, o + d, theme.main, 0.25, 4) end end) end builders.INFERNO = function() local body = follower(Vector3.zero, Vector3.new(2.6, 4.5, 2.6)) groundRing(14) new("Fire", {Size = 10, Heat = 0, Color = Color3.fromRGB(255, 120, 0), SecondaryColor = Color3.fromRGB(255, 40, 0), Parent = body}) emit(body, {Texture = TEX.fire, Rate = 55, Lifetime = NumberRange.new(0.8, 1.4), Speed = NumberRange.new(4, 8), Acceleration = Vector3.new(0, 8, 0), Size = grow(1.6, 2.4, 0.1), Transparency = NumberSequence.new({kp(0, 0.3), kp(1, 1)}), Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 230, 120)), ColorSequenceKeypoint.new(0.4, theme.main), ColorSequenceKeypoint.new(1, theme.dark)}), EmissionDirection = Enum.NormalId.Top, Rotation = NumberRange.new(0, 360), RotSpeed = NumberRange.new(-60, 60)}) emit(body, {Texture = TEX.smoke, Rate = 14, Lifetime = NumberRange.new(2.5, 4), Speed = NumberRange.new(2, 4), Acceleration = Vector3.new(0, 6, 0), Size = grow(2, 5, 8), Transparency = fade(0.5), Color = Color3.fromRGB(25, 20, 20), LightEmission = 0, EmissionDirection = Enum.NormalId.Top}) emit(body, {Rate = 40, Lifetime = NumberRange.new(1, 2.2), Speed = NumberRange.new(5, 11), Acceleration = Vector3.new(0, 6, 0), Size = grow(0.25, 0.2, 0), Color = ColorSequence.new(theme.light, theme.main), EmissionDirection = Enum.NormalId.Top, SpreadAngle = Vector2.new(35, 35)}) ribbon({count = 3, radius = 2.6, height = -1, speed = 2.6, width = 0.5, life = 0.9, bobAmp = 3, bob = 1.5, color = ColorSequence.new(theme.light, theme.main)}) addUpdater(function(dt, t, r, beat) if auraHighlight then auraHighlight.OutlineTransparency = 0.2 + math.random() * 0.4 end end) end builders.SAKURA = function() local body = follower(Vector3.zero, Vector3.new(3, 5, 3)) local sky = follower(Vector3.new(0, 16, 0), Vector3.new(24, 1, 24)) groundRing(14) emit(sky, {Rate = 35, Lifetime = NumberRange.new(5, 7), Speed = NumberRange.new(0.5, 1.5), EmissionDirection = Enum.NormalId.Bottom, Acceleration = Vector3.new(2, -1, 1), Size = 0.45, Color = ColorSequence.new(theme.light, theme.main), LightEmission = 0.25, Rotation = NumberRange.new(0, 360), RotSpeed = NumberRange.new(-80, 80), Transparency = fade(0.05)}) emit(body, {Rate = 18, Lifetime = NumberRange.new(2.5, 4), Speed = NumberRange.new(2, 5), Size = 0.35, Color = ColorSequence.new(theme.light, theme.main), SpreadAngle = Vector2.new(180, 180), Drag = 1.5, Rotation = NumberRange.new(0, 360), RotSpeed = NumberRange.new(-120, 120)}) emit(body, {Texture = TEX.smoke, Rate = 10, Lifetime = NumberRange.new(2.5, 3.5), Speed = NumberRange.new(0.5, 1.5), Size = grow(5, 8, 10), Transparency = fade(0.82), Color = theme.main, LightEmission = 0.7}) ribbon({count = 2, radius = 2.8, speed = 1.6, width = 0.35, life = 1.6, bobAmp = 2.5, bob = 1.4, color = ColorSequence.new(theme.light, theme.main)}) end builders.GALAXY = function() local body = follower(Vector3.zero, Vector3.new(3, 5, 3)) local stars = follower(Vector3.zero, Vector3.new(24, 24, 24)) groundRing(15) emit(stars, {Rate = 55, Lifetime = NumberRange.new(2, 4), Speed = NumberRange.new(0.2, 0.8), SpreadAngle = Vector2.new(180, 180), Size = NumberSequence.new({kp(0, 0), kp(0.5, 0.7), kp(1, 0)}), Color = ColorSequence.new(WHITE, theme.light), Transparency = NumberSequence.new(0)}) emit(body, {Texture = TEX.smoke, Rate = 8, Lifetime = NumberRange.new(3, 4.5), Speed = NumberRange.new(0.5, 1.5), Size = grow(6, 10, 12), Transparency = fade(0.82), Color = ColorSequence.new(theme.main, theme.dark), LightEmission = 0.6, Rotation = NumberRange.new(0, 360), RotSpeed = NumberRange.new(-10, 10)}) local rainbow = ColorSequence.new({ColorSequenceKeypoint.new(0, theme.main), ColorSequenceKeypoint.new(0.5, theme.light), ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 120, 220))}) ribbon({count = 2, radius = 4.2, speed = 2.4, width = 0.4, life = 1.0, tilt = 0, color = rainbow}) ribbon({count = 2, radius = 4.6, speed = -2, width = 0.4, life = 1.0, tilt = 0.9, color = rainbow}) ribbon({count = 2, radius = 5, speed = 1.7, width = 0.4, life = 1.0, tilt = -0.9, color = rainbow}) end builders.PRISM = function() local body = follower(Vector3.zero, Vector3.new(3, 5, 3)) groundRing(15) local colorables = {} table.insert(colorables, emit(body, {Rate = 70, Lifetime = NumberRange.new(1.5, 2.5), Speed = NumberRange.new(3, 7), Size = grow(0, 0.6, 0), Color = WHITE, SpreadAngle = Vector2.new(180, 180), Drag = 1})) table.insert(colorables, emit(body, {Texture = TEX.smoke, Rate = 10, Lifetime = NumberRange.new(2.5, 3.5), Speed = NumberRange.new(1, 2), Size = grow(5, 8, 10), Transparency = fade(0.8), Color = WHITE, LightEmission = 0.7})) for _, tilt in ipairs({0, 0.8, -0.8, 1.6}) do for _, tr in ipairs(ribbon({count = 2, radius = 4, speed = 2.2, width = 0.4, life = 1.1, tilt = tilt})) do table.insert(colorables, tr) end end addUpdater(function(dt, t) for i, o in ipairs(colorables) do if o.Parent then o.Color = ColorSequence.new(Color3.fromHSV((t * 0.2 + i * 0.09) % 1, 0.85, 1), Color3.fromHSV((t * 0.2 + i * 0.09 + 0.2) % 1, 0.85, 1)) end end if auraHighlight then auraHighlight.FillColor = Color3.fromHSV((t * 0.2) % 1, 0.85, 1) auraHighlight.OutlineColor = Color3.fromHSV((t * 0.2 + 0.3) % 1, 0.7, 1) end end) end buildAura = function() auraFolder:ClearAllChildren() auraUpdaters = {} table.clear(emitters) auraHighlight = nil if not curRoot then return end -- shared base: pulsing light + soft outline glow local lightPart = follower(Vector3.zero) local pl = new("PointLight", {Color = theme.main, Range = 18, Brightness = 2, Shadows = false, Parent = lightPart}) local hl = new("Highlight", { Adornee = curChar, FillColor = theme.main, FillTransparency = 0.88, OutlineColor = theme.light, OutlineTransparency = 0.35, DepthMode = Enum.HighlightDepthMode.Occluded, Parent = auraFolder, }) auraHighlight = hl addUpdater(function(dt, t, r, beat) pl.Brightness = (1.5 + beat * 3) * power() pl.Range = 14 + beat * 10 if selectedTheme ~= "GLITCH" and selectedTheme ~= "PRISM" then hl.FillTransparency = 0.9 - beat * 0.2 end end) if selectedTheme ~= "GLITCH" and selectedTheme ~= "PRISM" then pl.Color = theme.main end builders[selectedTheme]() end ---------------------------------------------------------------- -- eyes ---------------------------------------------------------------- buildEyes = function() if eyes then eyes.gui:Destroy() eyes = nil end if not settings.eyes or not curHead then return end local bb = new("BillboardGui", { Name = "EE_Eyes", Adornee = curHead, AlwaysOnTop = true, LightInfluence = 0, Size = UDim2.fromScale(EYE_SIZE * 3, EYE_SIZE * 1.5), ResetOnSpawn = false, Parent = playerGui, }) local function eye(x) local l = new("ImageLabel", { AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(x, 0.5), Size = UDim2.fromScale(0.4, 0.8), BackgroundTransparency = 1, Image = EYE_IMAGE_ID, ImageTransparency = 1, Parent = bb, }) tween(l, 1.2, {ImageTransparency = 0}) return l end eyes = {gui = bb, l = eye(0.27), r = eye(0.73)} end ---------------------------------------------------------------- -- abilities ---------------------------------------------------------------- local function alive(my) return active and session == my and curRoot ~= nil and curRoot.Parent ~= nil end abilityFns.slam = function() local my = session local root, hum = curRoot, curHum root.AssemblyLinearVelocity = Vector3.new(root.AssemblyLinearVelocity.X, 55, root.AssemblyLinearVelocity.Z) fovPunch = -6 task.wait(0.38) if not alive(my) then return end root.AssemblyLinearVelocity = Vector3.new(0, -140, 0) local t0 = os.clock() repeat task.wait() until not alive(my) or hum.FloorMaterial ~= Enum.Material.Air or os.clock() - t0 > 0.8 if not alive(my) then return end local pos = groundPos() shakeAmount = math.max(shakeAmount, 1.3) fovPunch = 10 screenFlash(theme.light, 0.8, 0.35) punchBlur(14) shockwave(pos, theme.main, 70, 0.7, 0.35) shockwave(pos, theme.light, 42, 0.5, 0.5) burst(pos, {Texture = TEX.smoke, Lifetime = NumberRange.new(0.8, 1.4), Speed = NumberRange.new(18, 32), SpreadAngle = Vector2.new(80, 80), EmissionDirection = Enum.NormalId.Top, Size = grow(2, 6, 8), Transparency = fade(0.55), Color = ColorSequence.new(theme.light, theme.dark), LightEmission = 0.4, Drag = 3}, 40) burst(pos, {Lifetime = NumberRange.new(0.5, 1.1), Speed = NumberRange.new(20, 45), SpreadAngle = Vector2.new(70, 70), EmissionDirection = Enum.NormalId.Top, Acceleration = Vector3.new(0, -40, 0), Size = grow(0.5, 0.3, 0), Color = ColorSequence.new(WHITE, theme.main)}, 60) end abilityFns.laser = function() local my = session local head = curHead local mouse = player:GetMouse() local startP = ghost(nil, fxFolder) local endP = ghost(nil, fxFolder) local a0 = new("Attachment", {Parent = startP}) local a1 = new("Attachment", {Parent = endP}) local function beam(color, transp) return new("Beam", {Attachment0 = a0, Attachment1 = a1, Color = ColorSequence.new(color), LightEmission = 1, Transparency = NumberSequence.new(transp), Width0 = 0, Width1 = 0, FaceCamera = true, Segments = 1, Parent = startP}) end local outer = beam(theme.main, 0.25) local core = beam(WHITE, 0) local impact = emit(endP, {Rate = 90, Lifetime = NumberRange.new(0.3, 0.7), Speed = NumberRange.new(8, 18), SpreadAngle = Vector2.new(180, 180), Size = grow(0.5, 0.35, 0), Color = ColorSequence.new(WHITE, theme.main)}) new("PointLight", {Color = theme.main, Range = 22, Brightness = 4, Parent = endP}) local params = rayParams() local t0 = os.clock() local dur = 1.8 local conn conn = RunService.RenderStepped:Connect(function() local el = os.clock() - t0 if el > dur or not alive(my) then conn:Disconnect() startP:Destroy() endP:Destroy() return end local origin = head.Position local dir = (mouse.Hit.Position - origin) if dir.Magnitude < 0.1 then dir = curRoot.CFrame.LookVector end dir = dir.Unit * 250 local res = workspace:Raycast(origin, dir, params) startP.CFrame = CFrame.new(origin) endP.CFrame = CFrame.new(res and res.Position or origin + dir) local g = math.min(1, el / 0.2) * (el > dur - 0.3 and (dur - el) / 0.3 or 1) local w = (1.4 + math.sin(el * 50) * 0.2) * g outer.Width0, outer.Width1 = w, w core.Width0, core.Width1 = w * 0.4, w * 0.4 shakeAmount = math.max(shakeAmount, 0.12) end) end abilityFns.rift = function() local my = session local center = curRoot.Position + flatLook() * 22 + Vector3.new(0, 2, 0) local topP = ghost(nil, fxFolder) local botP = ghost(nil, fxFolder) topP.CFrame = CFrame.new(center + Vector3.new(0, 14, 0)) botP.CFrame = CFrame.new(center - Vector3.new(0, 14, 0)) local a0 = new("Attachment", {Parent = botP}) local a1 = new("Attachment", {Parent = topP}) local function beam(color, transp) return new("Beam", {Attachment0 = a0, Attachment1 = a1, Color = ColorSequence.new(color), LightEmission = color == BLACK and 0 or 1, Transparency = NumberSequence.new(transp), Width0 = 0, Width1 = 0, FaceCamera = true, Segments = 1, Parent = botP}) end local glow = beam(theme.main, 0.35) local core = beam(BLACK, 0) local well = ghost(Vector3.new(14, 14, 14), fxFolder) well.CFrame = CFrame.new(center) new("PointLight", {Color = theme.main, Range = 30, Brightness = 3, Parent = well}) local suck = emit(well, {Rate = 90, Shape = Enum.ParticleEmitterShape.Sphere, ShapeInOut = Enum.ParticleEmitterShapeInOut.Inward, ShapeStyle = Enum.ParticleEmitterShapeStyle.Surface, Lifetime = NumberRange.new(0.8, 1.2), Speed = NumberRange.new(8, 11), Size = grow(0.5, 0.3, 0.05), Color = ColorSequence.new(theme.light, theme.main)}) tween(glow, 0.5, {Width0 = 7.5, Width1 = 7.5}, Enum.EasingStyle.Back) tween(core, 0.5, {Width0 = 5.5, Width1 = 5.5}, Enum.EasingStyle.Back) screenFlash(theme.main, 0.85, 0.4) local t0 = os.clock() while os.clock() - t0 < 2.8 and alive(my) do shakeAmount = math.max(shakeAmount, 0.14) task.wait() end tween(glow, 0.4, {Width0 = 0, Width1 = 0}) tween(core, 0.4, {Width0 = 0, Width1 = 0}) suck.Rate = 0 task.wait(0.4) if alive(my) then shockwave(Vector3.new(center.X, center.Y - 2, center.Z), theme.main, 34, 0.5, 0.4) burst(center, {Lifetime = NumberRange.new(0.4, 0.9), Speed = NumberRange.new(14, 30), SpreadAngle = Vector2.new(180, 180), Size = grow(0.5, 0.3, 0), Color = ColorSequence.new(WHITE, theme.main)}, 50) end topP:Destroy() botP:Destroy() well:Destroy() end abilityFns.nova = function() local my = session local charge = ghost(Vector3.new(12, 12, 12), fxFolder) local follow = RunService.RenderStepped:Connect(function() if charge.Parent and curRoot then charge.CFrame = CFrame.new(curRoot.Position) end end) local e = emit(charge, {Rate = 110, Shape = Enum.ParticleEmitterShape.Sphere, ShapeInOut = Enum.ParticleEmitterShapeInOut.Inward, ShapeStyle = Enum.ParticleEmitterShapeStyle.Surface, Lifetime = NumberRange.new(0.5, 0.8), Speed = NumberRange.new(10, 14), Size = grow(0.5, 0.35, 0.05), Color = ColorSequence.new(WHITE, theme.main)}) fovGoal = -14 for _ = 1, 20 do if not alive(my) then break end shakeAmount = math.max(shakeAmount, 0.2) task.wait(0.05) end follow:Disconnect() e.Rate = 0 charge:Destroy() fovGoal = 0 if not alive(my) then return end local pos = curRoot.Position fovPunch = 18 shakeAmount = math.max(shakeAmount, 2.4) screenFlash(WHITE, 0.2, 0.7) punchBlur(20) if bloom then bloom.Intensity = 2.5 tween(bloom, 0.8, {Intensity = 0.4}) end local ball = new("Part", {Shape = Enum.PartType.Ball, Size = Vector3.one * 2, Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, Material = Enum.Material.Neon, Color = theme.light, Transparency = 0.2, CFrame = CFrame.new(pos), Parent = fxFolder}) tween(ball, 0.5, {Size = Vector3.one * 75, Transparency = 1}, Enum.EasingStyle.Quart) Debris:AddItem(ball, 0.6) shockwave(groundPos(), theme.main, 90, 0.8, 0.3) burst(pos, {Lifetime = NumberRange.new(0.6, 1.4), Speed = NumberRange.new(30, 70), SpreadAngle = Vector2.new(180, 180), Size = grow(0.8, 0.5, 0), Color = ColorSequence.new(WHITE, theme.main, theme.dark), Drag = 1.5}, 140) end abilityFns.blink = function() local my = session local root = curRoot local dir = flatLook() local origin = root.Position local res = workspace:Raycast(origin, dir * 30, rayParams()) local dest = res and (res.Position - dir * 2.5) or (origin + dir * 30) local function puff(p) burst(p, {Lifetime = NumberRange.new(0.3, 0.7), Speed = NumberRange.new(10, 22), SpreadAngle = Vector2.new(180, 180), Size = grow(0.6, 0.4, 0), Color = ColorSequence.new(WHITE, theme.main)}, 30) burst(p, {Texture = TEX.smoke, Lifetime = NumberRange.new(0.5, 0.9), Speed = NumberRange.new(4, 9), SpreadAngle = Vector2.new(180, 180), Size = grow(2, 4, 5), Transparency = fade(0.6), Color = ColorSequence.new(theme.light, theme.dark)}, 10) end puff(origin) -- streak between start and end local p0, p1 = ghost(nil, fxFolder), ghost(nil, fxFolder) p0.CFrame = CFrame.new(origin) p1.CFrame = CFrame.new(dest) local a0 = new("Attachment", {Parent = p0}) local a1 = new("Attachment", {Parent = p1}) local bm = new("Beam", {Attachment0 = a0, Attachment1 = a1, Color = ColorSequence.new(theme.main), LightEmission = 1, Width0 = 3, Width1 = 3, Transparency = NumberSequence.new(0.2), FaceCamera = true, Segments = 1, Parent = p0}) tween(bm, 0.4, {Width0 = 0, Width1 = 0}) Debris:AddItem(p0, 0.5) Debris:AddItem(p1, 0.5) if not alive(my) then return end root.CFrame = CFrame.lookAt(dest, dest + dir) puff(dest) fovPunch = 14 punchBlur(10) end abilityFns.freeze = function() local my = session freezeUntil = os.clock() + 3.2 ripple(theme.light) banner("TIME STOP", theme.light) screenFlash(WHITE, 0.6, 0.4) task.wait(3.2) if alive(my) then ripple(theme.main) screenFlash(theme.main, 0.8, 0.4) end end useAbility = function(a) if not active or busy then return end if os.clock() < (cooldownUntil[a.id] or 0) then return end cooldownUntil[a.id] = os.clock() + a.cd if not overdrive then rage = math.min(1, rage + 0.1) end task.spawn(abilityFns[a.id]) end ---------------------------------------------------------------- -- themes / settings ---------------------------------------------------------------- setTheme = function(name) if not themes[name] then return end selectedTheme = name theme = themes[name] tintAccents() tween(mainWrap, 0.3, {BackgroundColor3 = active and theme.main or WHITE}) if active then buildAura() applyLighting() ripple(theme.main) screenFlash(theme.main, 0.85, 0.35) lastCycle = os.clock() end end cycleTheme = function(dir) local idx = table.find(themeOrder, selectedTheme) or 1 idx = ((idx - 1 + dir) % #themeOrder) + 1 setTheme(themeOrder[idx]) end local function refreshSpeed() if not active or not curHum then return end curHum.WalkSpeed = savedSpeed + (settings.speedBoost and 6 or 0) end local function refreshBar() local show = active and settings.abilityBar tween(abilityBar, 0.4, {Position = show and UDim2.new(0.5, 0, 1, -18) or UDim2.new(0.5, 0, 1, 120)}, Enum.EasingStyle.Back) end onSettingChanged = function(key) if key == "eyes" then if active then buildEyes() end elseif key == "darkness" then applyLighting() elseif key == "abilityBar" then refreshBar() elseif key == "speedBoost" then refreshSpeed() elseif key == "volume" then if music then music.Volume = settings.volume * 0.7 end elseif key == "intensity" then applyPower() end end ---------------------------------------------------------------- -- main render loop (runs only while the aura is on) ---------------------------------------------------------------- local function onRender(dt) if not active or not curRoot or not curRoot.Parent then return end local now = os.clock() local t = now - activeSince local p = power() local frozen = now < freezeUntil -- beat detection local loud = (music and music.IsPlaying) and music.PlaybackLoudness or 0 loudAvg = loudAvg + (loud - loudAvg) * math.min(1, dt * 1.5) local hit, strength = false, 0.6 if loud > 20 and loud > loudAvg * (1 + BEAT_THRESHOLD) and now - lastBeat > 0.2 then hit = true strength = math.clamp((loud / math.max(loudAvg, 1) - 1) / 0.5, 0.35, 1) elseif loud < 3 and t > 2.5 and now - lastBeat > 0.5 then hit = true -- music didn't load, fake a pulse so effects still move end if hit then lastBeat = now beatEnergy = math.max(beatEnergy, strength) if not overdrive then rage = math.min(1, rage + RAGE_PER_BEAT) end if settings.shockwave then shockwave(groundPos(), theme.main, 14 + strength * 14, 0.7, 0.6) end if settings.screenFx and not settings.reducedMotion then flash.BackgroundColor3 = theme.main flash.BackgroundTransparency = 0.94 tween(flash, 0.25, {BackgroundTransparency = 1}) end end beatEnergy = beatEnergy * (1 - math.min(1, dt * 5)) -- overdrive meter if overdrive then if now >= overdriveEnd then overdrive = false rage = 0 applyPower() end elseif rage >= 1 then overdrive = true overdriveEnd = now + OVERDRIVE_TIME applyPower() banner("OVERDRIVE", theme.main) ripple(theme.main) screenFlash(theme.main, 0.7, 0.5) shakeAmount = math.max(shakeAmount, 1.5) end local fillTarget = overdrive and math.max(0, (overdriveEnd - now) / OVERDRIVE_TIME) or rage rageFill.Size = UDim2.fromScale(fillTarget, 1) -- auto cycle if settings.autoCycle and now - lastCycle > 18 then lastCycle = now cycleTheme(1) end -- camera (fov bop + shake) local bopAmt = settings.bop and (settings.reducedMotion and 1.5 or 5) or 0 local goal = fovGoal + (frozen and -9 or 0) fovPunch = fovPunch + (goal - fovPunch) * math.min(1, dt * 8) camera.FieldOfView = baseFov + beatEnergy * bopAmt * p + fovPunch + tauntPunch * 4 if settings.shake and not settings.reducedMotion then local amt = (beatEnergy * 0.09 + shakeAmount + tauntPunch * 0.1) * p if amt > 0.002 then camera.CFrame = camera.CFrame * CFrame.new((math.random() - 0.5) * amt, (math.random() - 0.5) * amt, 0) * CFrame.Angles(0, 0, (math.random() - 0.5) * amt * 0.02) end end shakeAmount = shakeAmount * (1 - math.min(1, dt * 6)) -- screen effects if settings.screenFx then local v = math.clamp((0.35 + beatEnergy * 0.45) * p * 0.8, 0, 1) vignette.GroupTransparency = 1 - v else vignette.GroupTransparency = 1 end if cc then cc.Saturation = cc.Saturation + ((frozen and -1 or theme.sat) - cc.Saturation) * math.min(1, dt * 4) cc.Contrast = frozen and 0.4 or 0.08 cc.Brightness = beatEnergy * 0.04 end if bloom and now > 0 then bloom.Intensity = bloom.Intensity + ((0.35 + beatEnergy * 0.9) - bloom.Intensity) * math.min(1, dt * 10) end if music then local target = frozen and 0.5 or 1 music.PlaybackSpeed = music.PlaybackSpeed + (target - music.PlaybackSpeed) * math.min(1, dt * 4) end -- eyes if eyes and eyes.gui.Parent then local s = 1 + beatEnergy * 0.55 * p + tauntPunch * 0.5 eyes.l.Rotation = (t * 110) % 360 eyes.r.Rotation = (-t * 110) % 360 eyes.l.Size = UDim2.fromScale(0.4 * s, 0.8 * s) eyes.r.Size = UDim2.fromScale(0.4 * s, 0.8 * s) end -- theme specific stuff for i = 1, #auraUpdaters do pcall(auraUpdaters[i], dt, t, curRoot, beatEnergy) end end ---------------------------------------------------------------- -- start / stop ---------------------------------------------------------------- startAura = function() local char, root, head, hum = getChar() if not char then camera.CameraType = Enum.CameraType.Custom lightingOff() return end curChar, curRoot, curHead, curHum = char, root, head, hum groundOffset = (hum.RigType == Enum.HumanoidRigType.R6) and 3 or (hum.HipHeight + root.Size.Y / 2) savedSpeed = hum.WalkSpeed active = true activeSince = os.clock() lastCycle = activeSince beatEnergy, loudAvg, lastBeat, shakeAmount, fovPunch, fovGoal = 0, 0, 0, 0, 0, 0 rage, overdrive, freezeUntil = 0, false, 0 cooldownUntil = {} lightingOn() buildAura() buildEyes() refreshSpeed() refreshBar() tween(hud, 0.5, {Position = UDim2.new(0.5, 0, 0, 14)}, Enum.EasingStyle.Back) tween(mainWrap, 0.3, {BackgroundColor3 = theme.main}) tween(blur, 0.5, {Size = 0}) music = new("Sound", {Name = "EE_Music", SoundId = MUSIC_ID, Looped = true, Volume = 0, Parent = SoundService}) music:Play() tween(music, 2, {Volume = settings.volume * 0.7}) deathConn = hum.Died:Connect(function() stopAura() end) RunService:BindToRenderStep("EnemyEncounterRender", Enum.RenderPriority.Camera.Value + 1, onRender) end stopAura = function() if not active then return end active = false session += 1 RunService:UnbindFromRenderStep("EnemyEncounterRender") if deathConn then deathConn:Disconnect() deathConn = nil end if curHum and curHum.Parent then curHum.WalkSpeed = savedSpeed end auraFolder:ClearAllChildren() fxFolder:ClearAllChildren() auraUpdaters = {} table.clear(emitters) auraHighlight = nil if eyes then eyes.gui:Destroy() eyes = nil end if music then local m = music music = nil tween(m, 1, {Volume = 0}) Debris:AddItem(m, 1.2) end lightingOff() camera.CameraType = Enum.CameraType.Custom tween(camera, 0.6, {FieldOfView = baseFov}) tween(vignette, 0.6, {GroupTransparency = 1}) tween(hud, 0.4, {Position = UDim2.new(0.5, 0, 0, -70)}) tween(mainWrap, 0.3, {BackgroundColor3 = WHITE}) rageFill.Size = UDim2.fromScale(0, 1) refreshBar() curChar, curRoot, curHead, curHum = nil, nil, nil, nil end ---------------------------------------------------------------- -- typing / cutscene / taunt ---------------------------------------------------------------- local function typeLine(str, my) textLabel.Text = "" for i = 1, #str do if session ~= my then return false end textLabel.Text = string.sub(str, 1, i) local ch = string.sub(str, i, i) if ch ~= " " and settings.typeSounds then playSound(TYPE_SOUND_ID, settings.volume * 0.5, 0.9 + math.random() * 0.25, 0.15) end tauntPunch = math.max(tauntPunch, taunting and 0.6 or 0) task.wait(skipRequested and 0.005 or 0.045) end return true end local function pause(sec, my) local t0 = os.clock() while os.clock() - t0 < sec do if session ~= my or skipRequested then return end task.wait(0.05) end end runEncounter = function() if busy or active or taunting then return end local char, root, head, hum = getChar() if not char then return end busy = true skipRequested = false session += 1 local my = session local prevSpeed = hum.WalkSpeed baseFov = camera.FieldOfView hum.WalkSpeed = 0 lightingOn() tween(vignette, 1, {GroupTransparency = 0.35}) tween(blur, 1.5, {Size = 8}) letterbox(true) camera.CameraType = Enum.CameraType.Scriptable local facePos = head.Position + head.CFrame.LookVector * 4.5 + Vector3.new(0, 0.4, 0) local camTween = tween(camera, 2, {CFrame = CFrame.lookAt(facePos, head.Position + Vector3.new(0, 0.1, 0)), FieldOfView = 38}, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut) pause(1.7, my) local ok = session == my if ok then barIn(RED, true) local lines = {"Hello, I'm one of the enemies you fought.", "...", "I think you should run instead of facing me."} for i, line in ipairs(lines) do if not typeLine(line, my) then ok = false break end pause(i == 2 and 1.1 or 1.4, my) if session ~= my then ok = false break end end end barOut() letterbox(false) camTween:Cancel() if hum and hum.Parent then hum.WalkSpeed = prevSpeed end if not ok then busy = false camera.CameraType = Enum.CameraType.Custom camera.FieldOfView = baseFov if not active then lightingOff() tween(vignette, 0.5, {GroupTransparency = 1}) end return end -- whiteout, reset camera under the flash, then start the aura flash.BackgroundColor3 = WHITE flash.BackgroundTransparency = 0 task.wait(0.1) camera.CameraType = Enum.CameraType.Custom camera.FieldOfView = baseFov busy = false startAura() tween(flash, 1, {BackgroundTransparency = 1}) banner("THEY FOUND YOU", theme.main) end taunt = function() if taunting or busy then return end taunting = true local my = session barIn(WHITE, false) local ok = typeLine("I think i remember you.", my) if ok then pause(1.3, my) end if ok and session == my then ok = typeLine("No, I'm just imagining things.", my) if ok then pause(1.5, my) end end barOut() taunting = false end ---------------------------------------------------------------- -- input + connections ---------------------------------------------------------------- mainBtn.MouseEnter:Connect(function() tween(mainScale, 0.15, {Scale = 1.08}) end) mainBtn.MouseLeave:Connect(function() tween(mainScale, 0.15, {Scale = 1}) end) mainBtn.Activated:Connect(function() tween(mainScale, 0.08, {Scale = 0.94}) task.delay(0.08, function() tween(mainScale, 0.12, {Scale = 1.08}) end) if active then stopAura() elseif busy then skipRequested = true else runEncounter() end end) UserInputService.InputBegan:Connect(function(input, processed) if processed then return end local k = input.KeyCode if k == Enum.KeyCode.T then taunt() elseif k == Enum.KeyCode.M then setPanel(not panelOpen) elseif k == Enum.KeyCode.LeftBracket then cycleTheme(-1) elseif k == Enum.KeyCode.RightBracket then cycleTheme(1) elseif k == Enum.KeyCode.Space then if busy then skipRequested = true end else for _, a in ipairs(abilities) do if k == a.key then useAbility(a) break end end end end) player.CharacterAdded:Connect(function() if active then stopAura() end end) -- always-on bits: typed text shake, taunt decay, cooldown display RunService.RenderStepped:Connect(function(dt) if textShake and not settings.reducedMotion then textLabel.Position = UDim2.new(0.5, math.random(-3, 3), 0.5, math.random(-3, 3)) else textLabel.Position = UDim2.fromScale(0.5, 0.5) end tauntPunch = math.max(0, tauntPunch - dt * 3) local now = os.clock() for _, a in ipairs(abilities) do local left = (cooldownUntil[a.id] or 0) - now if left > 0 then a.cover.Size = UDim2.fromScale(1, math.clamp(left / a.cd, 0, 1)) a.timer.Text = string.format("%.1f", left) else a.cover.Size = UDim2.fromScale(1, 0) a.timer.Text = "" end end end)