Time Hub
Key RequiredUniversal

Time Hub

Universal ScriptNoahBernalPertosoNoahBernalPertoso 416 views 64 executesUpdated Apr 4, 2026
0.0/ 5(1 votes)
010% Positive
Lua Script•261 lines (6948 chars)
local player = game.Players.LocalPlayer
local RunService = game:GetService("RunService")

--------------------------------------------------
-- INTRO CINEMÁTICA
--------------------------------------------------

local introGui = Instance.new("ScreenGui")
introGui.IgnoreGuiInset = true
introGui.ResetOnSpawn = false
introGui.Parent = player:WaitForChild("PlayerGui")

local introFrame = Instance.new("Frame")
introFrame.Size = UDim2.fromScale(1,1)
introFrame.BackgroundColor3 = Color3.new(0,0,0)
introFrame.Parent = introGui

local introText = Instance.new("TextLabel")
introText.Size = UDim2.fromScale(1,1)
introText.BackgroundTransparency = 1
introText.Text = "made by Nohita_201604"
introText.TextColor3 = Color3.new(1,1,1)
introText.Font = Enum.Font.GothamBold
introText.TextScaled = true
introText.Parent = introFrame

task.wait(2)

for i=1,40 do
	introFrame.BackgroundTransparency = i/40
	introText.TextTransparency = i/40
	task.wait(0.03)
end

introGui:Destroy()

--------------------------------------------------
-- GUI
--------------------------------------------------

local gui = Instance.new("ScreenGui")
gui.Name="TimeHub"
gui.ResetOnSpawn=false
gui.Parent=player.PlayerGui

local frame=Instance.new("Frame")
frame.Size=UDim2.new(0,240,0,150)
frame.Position=UDim2.new(0.35,0,0.35,0)
frame.BackgroundColor3=Color3.fromRGB(35,35,35)
frame.Active=true
frame.Draggable=true
frame.Parent=gui
Instance.new("UICorner",frame).CornerRadius=UDim.new(0,14)

local topBar=Instance.new("Frame")
topBar.Size=UDim2.new(1,0,0,30)
topBar.BackgroundColor3=Color3.fromRGB(25,25,25)
topBar.Parent=frame
Instance.new("UICorner",topBar).CornerRadius=UDim.new(0,14)

local title=Instance.new("TextLabel")
title.Size=UDim2.new(1,-110,1,0)
title.Position=UDim2.new(0,10,0,0)
title.Text="Time Hub"
title.TextColor3=Color3.new(1,1,1)
title.BackgroundTransparency=1
title.Font=Enum.Font.GothamBold
title.TextSize=15
title.TextXAlignment=Enum.TextXAlignment.Left
title.Parent=topBar

--------------------------------------------------
-- BOTONES
--------------------------------------------------

local close=Instance.new("TextButton")
close.Size=UDim2.new(0,25,0,25)
close.Position=UDim2.new(1,-30,0.5,-12)
close.Text="X"
close.BackgroundColor3=Color3.fromRGB(200,60,60)
close.TextColor3=Color3.new(1,1,1)
close.Font=Enum.Font.GothamBold
close.Parent=topBar
Instance.new("UICorner",close).CornerRadius=UDim.new(1,0)

close.MouseButton1Click:Connect(function()
	gui.Enabled=false
end)

local expanded=true

local expandBtn=Instance.new("TextButton")
expandBtn.Size=UDim2.new(0,25,0,25)
expandBtn.Position=UDim2.new(1,-60,0.5,-12)
expandBtn.Text="-"
expandBtn.BackgroundColor3=Color3.fromRGB(80,80,80)
expandBtn.TextColor3=Color3.new(1,1,1)
expandBtn.Font=Enum.Font.GothamBold
expandBtn.Parent=topBar
Instance.new("UICorner",expandBtn).CornerRadius=UDim.new(1,0)

local resetBtn=Instance.new("TextButton")
resetBtn.Size=UDim2.new(1,-20,0,40)
resetBtn.Position=UDim2.new(0,10,0,45)
resetBtn.Text="Reset Time"
resetBtn.BackgroundColor3=Color3.fromRGB(70,120,255)
resetBtn.TextColor3=Color3.new(1,1,1)
resetBtn.Font=Enum.Font.GothamBold
resetBtn.Parent=frame
Instance.new("UICorner",resetBtn).CornerRadius=UDim.new(0,12)

local revertBtn=Instance.new("TextButton")
revertBtn.Size=UDim2.new(1,-20,0,45)
revertBtn.Position=UDim2.new(0,10,0,95)
revertBtn.Text="Revert Time OFF"
revertBtn.BackgroundColor3=Color3.fromRGB(200,60,60)
revertBtn.TextColor3=Color3.new(1,1,1)
revertBtn.Font=Enum.Font.GothamBold
revertBtn.Parent=frame
Instance.new("UICorner",revertBtn).CornerRadius=UDim.new(0,12)

expandBtn.MouseButton1Click:Connect(function()
	expanded=not expanded
	if expanded then
		frame.Size=UDim2.new(0,240,0,150)
		resetBtn.Visible=true
		revertBtn.Visible=true
		expandBtn.Text="-"
	else
		frame.Size=UDim2.new(0,240,0,35)
		resetBtn.Visible=false
		revertBtn.Visible=false
		expandBtn.Text="+"
	end
end)

--------------------------------------------------
-- ANIMATION RECOVERY SYSTEM ⭐
--------------------------------------------------

local function RefreshAnimations(char)
	local hum=char:FindFirstChildOfClass("Humanoid")
	if not hum then return end

	for _,track in ipairs(hum:GetPlayingAnimationTracks()) do
		track:Stop(0)
	end

	local animator=hum:FindFirstChildOfClass("Animator")
	if animator then
		animator:Destroy()
	end

	animator=Instance.new("Animator")
	animator.Parent=hum

	local animate=char:FindFirstChild("Animate")
	if animate then
		animate.Disabled=true
		task.wait()
		animate.Disabled=false
	end
end

--------------------------------------------------
-- TIME SYSTEM CON ANIMACIONES ACTIVAS
--------------------------------------------------

local frames={}
local reverting=false

local function getCharacter()
	return player.Character or player.CharacterAdded:Wait()
end

RunService.RenderStepped:Connect(function()
	local char=getCharacter()
	local hrp=char:FindFirstChild("HumanoidRootPart")
	local hum=char:FindFirstChildOfClass("Humanoid")
	if not hrp or not hum then return end

	if not reverting then
		local animData={}
		for _,track in ipairs(hum:GetPlayingAnimationTracks()) do
			table.insert(animData,{
				Animation=track.Animation,
				Time=track.TimePosition,
				Speed=track.Speed,
				Weight=track.WeightCurrent
			})
		end

		table.insert(frames,{
			CFrame=hrp.CFrame,
			Animations=animData
		})
	end
end)

--------------------------------------------------
-- RESET TIME
--------------------------------------------------

resetBtn.MouseButton1Click:Connect(function()
	reverting=false
	revertBtn.Text="Revert Time OFF"
	revertBtn.BackgroundColor3=Color3.fromRGB(200,60,60)

	table.clear(frames)

	local char=getCharacter()
	RefreshAnimations(char)
end)

--------------------------------------------------
-- REVERT BUTTON
--------------------------------------------------

revertBtn.MouseButton1Click:Connect(function()
	reverting=not reverting
	if reverting then
		revertBtn.Text="Revert Time ON"
		revertBtn.BackgroundColor3=Color3.fromRGB(60,200,60)
	else
		revertBtn.Text="Revert Time OFF"
		revertBtn.BackgroundColor3=Color3.fromRGB(200,60,60)

		local char=getCharacter()
		RefreshAnimations(char)
	end
end)

--------------------------------------------------
-- REWIND SUAVE CON ANIMACIONES ACTIVAS
--------------------------------------------------

RunService.Heartbeat:Connect(function()
	if not reverting then return end

	local char=getCharacter()
	local hrp=char:FindFirstChild("HumanoidRootPart")
	local hum=char:FindFirstChildOfClass("Humanoid")
	if not hrp or not hum then return end

	local data=frames[#frames]
	if not data then return end

	hrp.CFrame=data.CFrame

	-- Actualizar animaciones existentes en vez de recrearlas
	for _,track in ipairs(hum:GetPlayingAnimationTracks()) do
		for _,info in ipairs(data.Animations) do
			if track.Animation==info.Animation then
				track.TimePosition=info.Time
				track:AdjustSpeed(info.Speed)
			end
		end
	end

	table.remove(frames,#frames)
end)

Features & Information

Revert time and reset time

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts