-- ============================================================================= -- FUNKY FRIDAY - 4K Toggle Edition -- ============================================================================= local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") -- CONFIGURATION local CONFIG = { ToggleKey = Enum.KeyCode.Insert, NormalPerf = 3, -- Normal quality LagPerf = 5, -- Emergency mode when lagging LagThreshold = 0.025 -- React if frame > 25ms } -- State local Core = nil local Connection = nil local CurrentPerf = CONFIG.NormalPerf local IsPlaying = true local LastCheck = 0 -- Cleanup previous if getgenv().FFCleanup then pcall(getgenv().FFCleanup) end -- ============================================================================= -- LOAD & INIT -- ============================================================================= local success, lib = pcall(function() return loadstring(game:HttpGet("https://raw.githubusercontent.com/Null-Cherry/Null-Fire/refs/heads/main/Core/Loaders/Funky-Friday/Autoplay.lua", true))() end) if not success or type(lib) ~= "table" then warn("[FF] Failed to load library") return end Core = lib -- Initialize (4-key defaults) Core.AutoPlay = true Core.PerfectSick = 1 Core.Performance = CONFIG.NormalPerf Core.MoreStats = false -- ============================================================================= -- TOGGLE -- ============================================================================= local function Toggle() if not Core then return end IsPlaying = not IsPlaying Core.AutoPlay = IsPlaying if IsPlaying then Core.Performance = CurrentPerf print("[FF] ON") else Core.Performance = 0 print("[FF] OFF") end end UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if input.KeyCode == CONFIG.ToggleKey then Toggle() end end) -- ============================================================================= -- MAIN LOOP (Lag Detection) -- ============================================================================= Connection = RunService.Heartbeat:Connect(function() if not IsPlaying then return end local now = tick() if now - LastCheck < 0.1 then return end LastCheck = now -- Check frame time local delta = RunService.Heartbeat:Wait() -- Lag detected - drop quality immediately if delta > CONFIG.LagThreshold and CurrentPerf ~= CONFIG.LagPerf then CurrentPerf = CONFIG.LagPerf Core.Performance = CONFIG.LagPerf Core.MoreStats = false -- Recovered - restore quality elseif delta < 0.018 and CurrentPerf ~= CONFIG.NormalPerf then CurrentPerf = CONFIG.NormalPerf Core.Performance = CONFIG.NormalPerf end -- Safety check if not Core.AutoPlay then Core.AutoPlay = true end end) -- ============================================================================= -- CLEANUP -- ============================================================================= getgenv().FFCleanup = function() if Connection then Connection:Disconnect() end Connection = nil Core = nil IsPlaying = false end Players.LocalPlayer.CharacterRemoving:Connect(getgenv().FFCleanup) print("[FF] 4-Key Loaded | Press " .. CONFIG.ToggleKey.Name .. " to toggle")