-- ⏮️ FLASHBACK/REWIND SCRIPT -- Volte no tempo para corrigir erros! local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local LocalPlayer = Players.LocalPlayer -- Configurações local maxHistoryTime = 10 -- Máximo 10 segundos de história local recordInterval = 0.05 -- Grava posição a cada 0.05s (mais suave) local rewindSpeed = 2 -- Velocidade do rewind (2x mais rápido que normal) local positionHistory = {} local isRecording = true local isRewinding = false -- Mini Hub GUI local screenGui = Instance.new("ScreenGui") screenGui.Name = "FlashbackHub" screenGui.Parent = LocalPlayer:WaitForChild("PlayerGui") screenGui.ResetOnSpawn = false -- Frame principal (cinza, moderno, simples) local mainFrame = Instance.new("Frame") mainFrame.Size = UDim2.new(0, 180, 0, 60) mainFrame.Position = UDim2.new(0, 10, 0.5, -30) mainFrame.BackgroundColor3 = Color3.fromRGB(60, 60, 65) mainFrame.BorderSizePixel = 0 mainFrame.Active = true mainFrame.Draggable = true mainFrame.Parent = screenGui -- Cantos arredondados local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 10) corner.Parent = mainFrame -- Sombra sutil local shadow = Instance.new("UIStroke") shadow.Color = Color3.fromRGB(30, 30, 35) shadow.Thickness = 1 shadow.Transparency = 0.5 shadow.Parent = mainFrame -- Botão Flashback local flashbackButton = Instance.new("TextButton") flashbackButton.Size = UDim2.new(1, -20, 0, 40) flashbackButton.Position = UDim2.new(0, 10, 0, 10) flashbackButton.BackgroundColor3 = Color3.fromRGB(80, 80, 85) flashbackButton.BorderSizePixel = 0 flashbackButton.Text = "⏮️ FLASHBACK" flashbackButton.TextColor3 = Color3.fromRGB(255, 255, 255) flashbackButton.TextSize = 14 flashbackButton.Font = Enum.Font.GothamBold flashbackButton.Parent = mainFrame local buttonCorner = Instance.new("UICorner") buttonCorner.CornerRadius = UDim.new(0, 8) buttonCorner.Parent = flashbackButton -- Gradiente sutil no botão local buttonGradient = Instance.new("UIGradient") buttonGradient.Color = ColorSequence.new{ ColorSequenceKeypoint.new(0, Color3.fromRGB(90, 90, 95)), ColorSequenceKeypoint.new(1, Color3.fromRGB(70, 70, 75)) } buttonGradient.Rotation = 90 buttonGradient.Parent = flashbackButton -- Função para gravar posições local function recordPosition() if not isRecording or not LocalPlayer.Character then return end local humanoidRootPart = LocalPlayer.Character:FindFirstChild("HumanoidRootPart") if not humanoidRootPart then return end -- Adicionar posição atual ao histórico table.insert(positionHistory, { CFrame = humanoidRootPart.CFrame, Time = tick() }) -- Remover posições antigas (mais de maxHistoryTime segundos) local currentTime = tick() while #positionHistory > 0 and (currentTime - positionHistory[1].Time) > maxHistoryTime do table.remove(positionHistory, 1) end end -- Função de flashback/rewind COM ANIMAÇÃO MELHORADA local function startFlashback() if isRewinding or #positionHistory == 0 then return end if not LocalPlayer.Character or not LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then return end isRewinding = true isRecording = false -- Mudar visual do botão flashbackButton.Text = "⏮️ VOLTANDO..." flashbackButton.BackgroundColor3 = Color3.fromRGB(100, 150, 255) local humanoidRootPart = LocalPlayer.Character.HumanoidRootPart local humanoid = LocalPlayer.Character:FindFirstChild("Humanoid") -- TRAVAR COMPLETAMENTE o personagem durante rewind if humanoid then humanoid.WalkSpeed = 0 humanoid.JumpPower = 0 humanoid.AutoRotate = false humanoid.PlatformStand = true -- Impede qualquer movimento end -- Desativar física temporariamente if humanoidRootPart then humanoidRootPart.Anchored = true -- Ancora para não cair/mover end -- ANIMAÇÃO REVERSA - Reproduz todo o caminho de volta local totalFrames = #positionHistory local rewindDelay = recordInterval / rewindSpeed print("⏮️ Iniciando flashback de " .. totalFrames .. " frames...") -- Voltar frame por frame (animação reversa) for i = totalFrames, 1, -1 do if not isRewinding or not LocalPlayer.Character then break end local record = positionHistory[i] -- Aplicar posição diretamente (sem interferência) if humanoidRootPart and humanoidRootPart.Parent then humanoidRootPart.CFrame = record.CFrame end -- Delay para criar efeito de animação task.wait(rewindDelay) end print("✅ Flashback completo! Posição restaurada.") -- RESTAURAR TUDO ao estado normal if humanoidRootPart then humanoidRootPart.Anchored = false -- Desancorar end if humanoid then humanoid.PlatformStand = false humanoid.WalkSpeed = 16 -- Velocidade padrão humanoid.JumpPower = 50 -- Jump padrão humanoid.AutoRotate = true end -- Limpar histórico após usar positionHistory = {} -- Restaurar estado normal isRewinding = false task.wait(0.5) -- Delay antes de começar a gravar novamente isRecording = true flashbackButton.Text = "⏮️ FLASHBACK" flashbackButton.BackgroundColor3 = Color3.fromRGB(80, 80, 85) end -- Loop de gravação task.spawn(function() while true do recordPosition() task.wait(recordInterval) end end) -- Evento do botão flashbackButton.MouseButton1Click:Connect(function() if not isRewinding then startFlashback() end end) -- Atalho de teclado (R) UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if input.KeyCode == Enum.KeyCode.R then if not isRewinding then startFlashback() end end end) -- Hover effect flashbackButton.MouseEnter:Connect(function() if not isRewinding then flashbackButton.BackgroundColor3 = Color3.fromRGB(100, 100, 105) end end) flashbackButton.MouseLeave:Connect(function() if not isRewinding then flashbackButton.BackgroundColor3 = Color3.fromRGB(80, 80, 85) end end) print("⏮️ Flashback Script carregado!") print("🎮 Clique no botão ou pressione 'R' para voltar no tempo") print("⏱️ Grava até " .. maxHistoryTime .. " segundos de história") print("🎬 Animação reversa ativada - você verá todo o caminho de volta!") print("⚡ Velocidade de rewind: " .. rewindSpeed .. "x")