Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wait()
- script.Parent=nil
- local next=next
- local pcall=pcall
- local rad=math.rad
- local insert=table.insert
- local play=true
- local remove=table.remove
- local wiped=true
- local plrs=game.Players:GetPlayers()
- local plr=game.Players.LocalPlayer.Character
- local parts={}
- local scripts={}
- local WS=workspace:GetChildren()
- local function getAllParts(tab)
- for _,v in next,tab:GetChildren() do
- if v:IsA("Part") and v.Name~="Baseplate" and v.Name~="Base" and v.Name~="Part" and v and v.Parent==game.Workspace.jordan83221 then
- local model=Instance.new("Model",game.Lighting)
- if v.Anchored==true then
- model.Name=v.Name..": true"
- elseif v.Anchored==false then
- model.Name=v.Name..": false"
- end
- table.insert(parts,v)
- else
- getAllParts(v)
- end
- end
- end
- getAllParts(workspace)
- local function getAllScripts(tab)
- for _,v in next,tab:GetChildren() do
- if v:IsA("Script") or v:IsA("LocalScript") then
- table.insert(scripts,v)
- else
- getAllScripts(v)
- end
- end
- end
- getAllScripts(workspace)
- local function notify(m)
- game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{
- Text = m;
- Color = Color3.new(0,1,1);
- Font = Enum.Font.SourceSans;
- FontSize = Enum.FontSize.Size14;
- })
- end
- local function logp(part)
- local clone=part:Clone()
- clone.Name=part.Name
- clone.Anchored=true
- local x,y,z,R00,R01,R02,R10,R11,R12,R20,R21,R22=part.CFrame:components()
- clone.CFrame=CFrame.new(x,y,z,R00,R01,R02,R10,R11,R12,R20,R21,R22)
- for _,v in next,game.Lighting:GetChildren() do
- local a,b=string.match(v.Name,"(.*):%s(.*)")
- if a==clone.Name then
- clone.Parent=v
- end
- end
- local attached=Instance.new("ObjectValue",clone)
- attached.Name="ObjectValue"
- attached.Value=part
- end
- local function repl(part)
- if part and part.ObjectValue then
- part.ObjectValue.Value.CFrame=part.CFrame
- end
- end
- local function getAnchored(part)
- for _,v in next,game.Lighting:GetChildren() do
- local a,b=string.match(v.Name,"(.*):%s(.*)")
- if a==part.Name then
- if b=="true" then
- return true
- elseif b=="false" then
- return false
- end
- end
- end
- end
- local logs={}
- local cmds={
- ["record"]=function(a)
- if wiped==true then
- if play==true then
- for i=1,a do wait()
- coroutine.resume(coroutine.create(function()
- for _,v in next,parts do
- if v:IsA("Part") and v.Name~="Baseplate" and v.Name~="Base" and v.Name~="Part" and v then
- logp(v)
- end
- end
- end))
- notify("Logging: "..i)
- end
- else
- notify("You must be able to move to record!")
- end
- else
- notify("You must wipe the old recordings to record new ones!")
- end
- end,
- ["rewind"]=function(a)
- if play==false then
- for _,v in next,game.Lighting:GetChildren() do
- coroutine.resume(coroutine.create(function()
- for i=a,1,-1 do wait()
- repl(v:GetChildren()[i])
- end
- end))
- end
- notify("Finished rewinding!")
- else
- notify("Must be paused to rewind!")
- end
- wiped=false
- end,
- ["play"]=function()
- if play==false then
- play=true
- for _,v in next,parts do
- if getAnchored(v)==false then
- v.Anchored=false
- end
- end
- end
- end,
- ["pause"]=function()
- if play==true then
- play=false
- for _,v in next,parts do
- if v.className=="Part" and v.Anchored==false then
- v.Anchored=true
- end
- end
- end
- end,
- ["wipe"]=function()
- for _,v in next,game.Lighting:GetChildren() do
- if v:IsA("Model") then
- for i,g in next,v:GetChildren() do
- if g:IsA("Part") then
- g:Destroy()
- end
- end
- end
- end
- wiped=true
- notify("Wiped!")
- end,
- ["g"]=function(a)
- if a=="help" then
- notify("CMDS:")
- notify("record/X, Example: record/100, records 100 frames.")
- notify("rewind/X, Example: rewind/100, rewinds 100 frames.")
- notify("play/, Example: play/, resumes movement after paused or rewinded.")
- notify("pause/, Example: pause/, pauses movement.")
- notify("wipe/, Example: wipe, wipes all recordings.")
- notify("g/, Example: g/help, gets help.")
- end
- end
- }
- local function onChatted(m)
- local cmd,parm=string.match(m,"(.*)/(.*)")
- if cmd and parm then
- cmd=cmd:lower()
- parm=parm:lower()
- cmds[cmd](parm)
- end
- end
- game.Players.LocalPlayer.Chatted:connect(function(msg) onChatted(msg) end)
- notify("Welcome to time manipulation.")
- notify("This is a lot like a FastFoward and a Rewind system.")
- notify("Need help? Type g/help for help")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement