Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Serviços
- local Players = game:GetService("Players")
- local UIS = game:GetService("UserInputService")
- local RS = game:GetService("RunService")
- local player = Players.LocalPlayer
- local playerGui = player:WaitForChild("PlayerGui")
- -- Criar GUI Principal
- local screenGui = Instance.new("ScreenGui", playerGui)
- screenGui.Name = "FlashbackMenu"
- screenGui.ResetOnSpawn = false
- -- Frame principal (movível)
- local frame = Instance.new("Frame", screenGui)
- frame.Size = UDim2.new(0, 220, 0, 150)
- frame.Position = UDim2.new(0, 20, 0.5, -75)
- frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- frame.BorderColor3 = Color3.new(0, 0, 0)
- frame.BorderSizePixel = 5
- frame.Active = true
- frame.Draggable = true
- -- Reverse Button
- local reverseBtn = Instance.new("TextButton", frame)
- reverseBtn.Size = UDim2.new(0.9, 0, 0.3, 0)
- reverseBtn.Position = UDim2.new(0.05, 0, 0.1, 0)
- reverseBtn.Text = "Reverse"
- reverseBtn.BackgroundColor3 = Color3.fromRGB(80, 80, 200)
- reverseBtn.TextColor3 = Color3.new(1, 1, 1)
- reverseBtn.Font = Enum.Font.SourceSansBold
- reverseBtn.TextSize = 20
- -- Key E Button
- local keyEBtn = Instance.new("TextButton", frame)
- keyEBtn.Size = UDim2.new(0.9, 0, 0.3, 0)
- keyEBtn.Position = UDim2.new(0.05, 0, 0.5, 0)
- keyEBtn.Text = "Key E"
- keyEBtn.BackgroundColor3 = Color3.fromRGB(200, 80, 80)
- keyEBtn.TextColor3 = Color3.new(1, 1, 1)
- keyEBtn.Font = Enum.Font.SourceSansBold
- keyEBtn.TextSize = 20
- -- Botão para abrir menu
- local openBtn = Instance.new("TextButton", screenGui)
- openBtn.Size = UDim2.new(0, 100, 0, 40)
- openBtn.Position = UDim2.new(0, 20, 1, -60)
- openBtn.Text = "Abrir"
- openBtn.BackgroundColor3 = Color3.fromRGB(80, 200, 80)
- openBtn.TextColor3 = Color3.new(1, 1, 1)
- openBtn.Font = Enum.Font.SourceSansBold
- openBtn.TextSize = 20
- openBtn.Visible = false
- -- Botão para fechar menu
- local closeBtn = Instance.new("TextButton", frame)
- closeBtn.Size = UDim2.new(0.3, 0, 0.2, 0)
- closeBtn.Position = UDim2.new(0.7, 0, 0.8, 0)
- closeBtn.Text = "Fechar"
- closeBtn.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
- closeBtn.TextColor3 = Color3.new(1, 1, 1)
- closeBtn.Font = Enum.Font.SourceSansBold
- closeBtn.TextSize = 16
- -- Abrir e Fechar Menu
- closeBtn.MouseButton1Click:Connect(function()
- frame.Visible = false
- openBtn.Visible = true
- end)
- openBtn.MouseButton1Click:Connect(function()
- frame.Visible = true
- openBtn.Visible = false
- end)
- -- "Key E" - Auto Clique Simulado
- keyEBtn.MouseButton1Down:Connect(function()
- if _G.FlashbackKeyLoop then return end
- _G.FlashbackKeyLoop = true
- task.spawn(function()
- while _G.FlashbackKeyLoop do
- _G.FlashbackEPressed = true
- task.wait(0.001) -- ultra rápido
- _G.FlashbackEPressed = false
- task.wait(0.001)
- end
- end)
- end)
- keyEBtn.MouseButton1Up:Connect(function()
- _G.FlashbackKeyLoop = false
- _G.FlashbackEPressed = false
- end)
- -- Script do Flashback com velocidade aumentada
- local function startFlashback()
- local key = "E"
- local flashbacklength = 30 -- menor tempo armazenado (mais leve)
- local flashbackspeed = 5 -- mais quadros pulados (mais rápido)
- local name = game:GetService("RbxAnalyticsService"):GetSessionId()
- local frames = {}
- pcall(RS.UnbindFromRenderStep, RS, name)
- local function getchar()
- return player.Character or player.CharacterAdded:Wait()
- end
- local function gethrp(c)
- return c:FindFirstChild("HumanoidRootPart") or c:FindFirstChildWhichIsA("BasePart")
- end
- local flashback = { lastinput = false, canrevert = true }
- function flashback:Advance(char, hrp, hum, allowinput)
- if #frames > flashbacklength * 60 then
- table.remove(frames, 1)
- end
- if allowinput and not self.canrevert then self.canrevert = true end
- if self.lastinput then hum.PlatformStand = false self.lastinput = false end
- table.insert(frames, {
- hrp.CFrame,
- hrp.Velocity,
- hum:GetState(),
- hum.PlatformStand,
- char:FindFirstChildOfClass("Tool")
- })
- end
- function flashback:Revert(char, hrp, hum)
- local num = #frames
- if num == 0 or not self.canrevert then
- self.canrevert = false
- self:Advance(char, hrp, hum)
- return
- end
- for i = 1, flashbackspeed do
- table.remove(frames, num)
- num = num - 1
- end
- self.lastinput = true
- local lastframe = frames[num]
- table.remove(frames, num)
- hrp.CFrame = lastframe[1]
- hrp.Velocity = -lastframe[2]
- hum:ChangeState(lastframe[3])
- hum.PlatformStand = lastframe[4]
- local currenttool = char:FindFirstChildOfClass("Tool")
- if lastframe[5] then
- if not currenttool then hum:EquipTool(lastframe[5]) end
- else
- hum:UnequipTools()
- end
- end
- RS:BindToRenderStep(name, 1, function()
- local char = getchar()
- local hrp = gethrp(char)
- local hum = char:FindFirstChildWhichIsA("Humanoid")
- if UIS:IsKeyDown(Enum.KeyCode[key]) or _G.FlashbackEPressed then
- flashback:Revert(char, hrp, hum)
- else
- flashback:Advance(char, hrp, hum, true)
- end
- end)
- end
- -- Ativar flashback
- reverseBtn.MouseButton1Click:Connect(startFlashback)
Advertisement
Add Comment
Please, Sign In to add comment