Run it
Copy the script and paste it into your executor.
Players = :()
UIS = :()
RunService = :()
HttpService = :()
ReplicatedStorage = :()
player = Players.LocalPlayer
camera = .CurrentCamera
REPLAY_CAMERA =
recording, playing = ,
frames, events = {}, {}
recStart =
recConn, playConn
lastTool =
saves = {}
nextId =
currentPlayId =
dirty =
loadDone =
() dirty =
gui = .()
gui.Name =
gui.ResetOnSpawn =
gui.Parent = player:()
frame = .()
frame.Size = .(, )
frame.Position = .(, , , -)
frame.BackgroundColor3 = .(, , )
frame.Active =
frame.Draggable =
frame.Parent = gui
.(, frame)
title = .()
title.Size = .(, , , )
title.BackgroundTransparency =
title.Text =
title.Font = .Font.GothamBold
title.TextSize =
title.TextColor3 = .(, , )
title.Parent = frame
status = .()
status.Size = .(, , , )
status.Position = .(, )
status.BackgroundTransparency =
status.Text =
status.Font = .Font.Gotham
status.TextSize =
status.TextColor3 = .(, , )
status.Parent = frame
nameBox = .()
nameBox.Size = .(, -, , )
nameBox.Position = .(, )
nameBox.BackgroundColor3 = .(, , )
nameBox.PlaceholderText =
nameBox.PlaceholderColor3 = .(, , )
nameBox.Text =
nameBox.ClearTextOnFocus =
nameBox.Font = .Font.Gotham
nameBox.TextSize =
nameBox.TextColor3 = .(, , )
nameBox.Parent = frame
.(, nameBox)
btnRow = .()
btnRow.Size = .(, -, , )
btnRow.Position = .(, )
btnRow.BackgroundTransparency =
btnRow.Parent = frame
rowLayout = .()
rowLayout.FillDirection = .FillDirection.Horizontal
rowLayout.Padding = .(, )
rowLayout.Parent = btnRow
(parent, text, color, size)
b = .()
b.Size = size
b.BackgroundColor3 = color
b.Text = text
b.Font = .Font.GothamBold
b.TextSize =
b.TextWrapped =
b.TextColor3 = .(, , )
b.AutoButtonColor =
b.Parent = parent
.(, b)
b
startBtn = (btnRow, , .(, , ), .(, -, , ))
stopBtn = (btnRow, , .(, , ), .(, -, , ))
playBtn = (btnRow, , .(, , ), .(, -, , ))
savesTitle = .()
savesTitle.Size = .(, -, , )
savesTitle.Position = .(, )
savesTitle.BackgroundTransparency =
savesTitle.Text =
savesTitle.Font = .Font.GothamBold
savesTitle.TextSize =
savesTitle.TextXAlignment = .TextXAlignment.Left
savesTitle.TextColor3 = .(, , )
savesTitle.Parent = frame
list = .()
list.Size = .(, -, , -)
list.Position = .(, )
list.BackgroundColor3 = .(, , )
list.BorderSizePixel =
list.ScrollBarThickness =
list.CanvasSize = .(, , , )
list.AutomaticCanvasSize = .AutomaticSize.Y
list.ScrollingDirection = .ScrollingDirection.Y
list.Parent = frame
.(, list)
listLayout = .()
listLayout.Padding = .(, )
listLayout.SortOrder = .SortOrder.LayoutOrder
listLayout.Parent = list
listPad = .()
listPad.PaddingTop = .(, )
listPad.PaddingBottom = .(, )
listPad.PaddingLeft = .(, )
listPad.PaddingRight = .(, )
listPad.Parent = list
emptyLabel = .()
emptyLabel.Size = .(, , , )
emptyLabel.BackgroundTransparency =
emptyLabel.Text =
emptyLabel.Font = .Font.Gotham
emptyLabel.TextSize =
emptyLabel.TextColor3 = .(, , )
emptyLabel.Parent = list
FULL_SIZE = frame.Size
MINI_SIZE = .(, )
minimized =
minBtn = (frame, , .(, , ), .(, ))
minBtn.Position = .(, -, , )
minBtn.TextSize =
minBtn.MouseButton1Click:(()
minimized = minimized
_, child (frame:())
child:() child ~= title child ~= minBtn
child.Visible = minimized
frame.Size = minimized MINI_SIZE FULL_SIZE
minBtn.Text = minimized
minimized
emptyLabel.Visible = (#saves == )
)
()
char = player.Character
char
hum = char:()
root = char:()
hum root char, hum, root
(kind, data)
.(events, { t = .() - recStart, kind = kind, data = data })
(seconds)
m = .(seconds / )
s = seconds - m *
():(m, s)
inputConns = {}
startPlaying, stopPlaying
addSaveRow
()
recording
recording =
recConn recConn:()
_, c (inputConns) c:()
.(inputConns)
#frames <
status.Text =
id = nextId
nextId +=
name = nameBox.Text
name:(, ) ==
name = .. id
save = {
id = id,
name = name,
duration = frames[#frames].t,
loopMode = ,
frames = frames,
events = events,
}
.(saves, save)
(save)
()
nameBox.Text =
status.Text = ():(save.name, (save.duration))
()
recording playing loadDone
_, hum, root = ()
root
frames, events = {}, {}
lastTool =
recStart = .()
recording =
status.Text =
recConn = RunService.Heartbeat:(()
char, h, r = ()
r
.(frames, {
t = .() - recStart,
cf = r.CFrame,
move = h.MoveDirection,
vel = r.AssemblyLinearVelocity,
state = h:(),
ws = h.WalkSpeed,
jp = h.JumpPower,
jh = h.JumpHeight,
useJP = h.UseJumpPower,
hip = h.HipHeight,
slope = h.MaxSlopeAngle,
grav = .Gravity,
cam = camera.CFrame,
fov = camera.FieldOfView,
})
tool = char:()
name = tool tool.Name
name ~= lastTool
lastTool = name
(, name)
)
.(inputConns, UIS.JumpRequest:(()
()
))
.(inputConns, UIS.InputBegan:((input, processed)
ut = input.UserInputType
ut == .UserInputType.MouseButton1 ut == .UserInputType.Touch
(, { pos = input.Position, processed = processed })
ut == .UserInputType.Keyboard
(, { code = input.KeyCode, down = })
))
.(inputConns, UIS.InputEnded:((input)
input.UserInputType == .UserInputType.Keyboard
(, { code = input.KeyCode, down = })
))
controls
ok, result = (()
(player:():()):()
)
ok controls = result
DRIFT_LIMIT =
originals =
(h)
originals = {
ws = h.WalkSpeed, jp = h.JumpPower, jh = h.JumpHeight, useJP = h.UseJumpPower,
hip = h.HipHeight, slope = h.MaxSlopeAngle, grav = .Gravity,
camType = camera.CameraType, fov = camera.FieldOfView,
}
(h)
originals
h
h.WalkSpeed = originals.ws
h.UseJumpPower = originals.useJP
h.JumpPower = originals.jp
h.JumpHeight = originals.jh
h.HipHeight = originals.hip
h.MaxSlopeAngle = originals.slope
.Gravity = originals.grav
camera.CameraType = originals.camType
camera.FieldOfView = originals.fov
originals =
()
playing
playing =
currentPlayId =
playConn playConn:()
_, hum = ()
hum hum:(.zero, )
(hum)
controls controls:()
status.Text =
(h, f)
h.WalkSpeed = f.ws
h.UseJumpPower = f.useJP
f.useJP h.JumpPower = f.jp h.JumpHeight = f.jh
h.HipHeight = f.hip
h.MaxSlopeAngle = f.slope
.Gravity = f.grav
RETURN_TIMEOUT =
ARRIVE_DIST =
(save)
recording playing
save #save.frames <
status.Text =
_, hum, root = ()
root
pFrames, pEvents = save.frames, save.events
first = pFrames[]
playing =
currentPlayId = save.id
controls controls:()
(hum)
phase =
t0, fi, ei
loops =
returnStart =
()
save.loopMode ~=
status.Text = ():(save.name, loops)
status.Text = ():(save.name)
(r)
r.CFrame = first.cf
r.AssemblyLinearVelocity = .zero
phase =
t0 = .()
fi, ei = ,
REPLAY_CAMERA camera.CameraType = .CameraType.Scriptable
()
(root)
playConn = RunService.Heartbeat:(()
char, h, r = ()
r ()
phase ==
(h, first)
toStart = .(first.cf.Position.X - r.Position.X, , first.cf.Position.Z - r.Position.Z)
toStart.Magnitude <= ARRIVE_DIST .() - returnStart > RETURN_TIMEOUT
h:(.zero, )
loops +=
(r)
h:(toStart.Unit, )
t = .() - t0
ei <= #pEvents pEvents[ei].t <= t
e = pEvents[ei]
e.kind ==
h.Jump =
e.kind ==
e.data ==
h:()
tool = player.Backpack:(e.data) char:(e.data)
tool h:(tool)
e.kind ==
tool = char:()
tool tool:()
ei +=
t >= pFrames[#pFrames].t
save.loopMode ==
loops +=
(r)
save.loopMode ==
phase =
returnStart = .()
camera.CameraType = originals originals.camType .CameraType.Custom
status.Text = ():(save.name)
()
fi < #pFrames - pFrames[fi + ].t <= t fi +=
a, b = pFrames[fi], pFrames[fi + ]
alpha = .((t - a.t) / .(b.t - a.t, ), , )
target = a.cf:(b.cf, alpha)
(h, a)
h:(a.move, )
(r.Position - target.Position).Magnitude > DRIFT_LIMIT
r.CFrame = target
r.AssemblyLinearVelocity = a.vel:(b.vel, alpha)
REPLAY_CAMERA
camera.CFrame = a.cam:(b.cam, alpha)
camera.FieldOfView = a.fov + (b.fov - a.fov) * alpha
)
()
emptyLabel.Visible = #saves ==
(save)
row = .()
row.Name = .. save.id
row.Size = .(, -, , )
row.BackgroundColor3 = .(, , )
row.LayoutOrder = save.id
row.Parent = list
.(, row)
nameLabel = .()
nameLabel.Size = .(, -, , )
nameLabel.Position = .(, )
nameLabel.BackgroundTransparency =
nameLabel.Text = save.name
nameLabel.Font = .Font.GothamMedium
nameLabel.TextSize =
nameLabel.TextXAlignment = .TextXAlignment.Left
nameLabel.TextTruncate = .TextTruncate.AtEnd
nameLabel.TextColor3 = .(, , )
nameLabel.Parent = row
durLabel = .()
durLabel.Size = .(, )
durLabel.Position = .(, -, , )
durLabel.BackgroundTransparency =
durLabel.Text = (save.duration)
durLabel.Font = .Font.Gotham
durLabel.TextSize =
durLabel.TextColor3 = .(, , )
durLabel.Parent = row
playRowBtn = (row, , .(, , ), .(, ))
playRowBtn.Position = .(, -, , -)
delBtn = (row, , .(, , ), .(, ))
delBtn.Position = .(, -, , -)
loopBtn = (row, , .(, , ), .(, ))
loopBtn.Position = .(, -, , -)
loopBtn.TextSize =
loopStyles = {
off = { text = , color = .(, , ) },
tp = { text = , color = .(, , ) },
walk = { text = , color = .(, , ) },
}
nextMode = { off = , tp = , walk = }
loopBtn.MouseButton1Click:(()
save.loopMode = nextMode[save.loopMode]
st = loopStyles[save.loopMode]
loopBtn.Text = st.text
loopBtn.BackgroundColor3 = st.color
)
playRowBtn.MouseButton1Click:(()
(save)
)
delBtn.MouseButton1Click:(()
currentPlayId == save.id ()
i, s (saves)
s.id == save.id
.(saves, i)
row:()
()
()
)
()
SAVE_RATE =
MAX_JSON =
SYNC_EVERY =
saveRemote, loadRemote
cloudOk =
(n, d)
m = ^ d
.(n * m + ) / m
(text)
recording playing status.Text = text
stateByValue = {}
_, st (.HumanoidStateType:())
stateByValue[st.Value] = st
(cf)
rx, ry, rz = cf:()
(cf.X, ), (cf.Y, ), (cf.Z, ), (rx, ), (ry, ), (rz, )
(e)
o = { t = (e.t, ), k = e.kind }
e.kind ==
o.d = { c = e.data.code.Name, dn = e.data.down }
e.kind ==
o.d = { x = (e.data.pos.X, ), y = (e.data.pos.Y, ), p = e.data.processed }
o.d = e.data
o
(o)
data = o.d
o.k ==
ok, code = (() .KeyCode[data.c] )
data = { code = ok code .KeyCode.Unknown, down = data.dn }
o.k ==
data = { pos = .(data.x, data.y, ), processed = data.p }
{ t = o.t, kind = o.k, data = data }
(sv)
out = { id = sv.id, name = sv.name, d = (sv.duration, ), f = {}, s = {}, e = {} }
lastKept = -
lastStats =
total = #sv.frames
i, fr (sv.frames)
i == total fr.t - lastKept >= / SAVE_RATE
lastKept = fr.t
idx = #out.f +
px, py, pz, prx, pry, prz = (fr.cf)
cx, cy, cz, crx, cry, crz = (fr.cam)
out.f[idx] = {
(fr.t, ), px, py, pz, prx, pry, prz,
(fr.move.X, ), (fr.move.Y, ), (fr.move.Z, ),
(fr.vel.X, ), (fr.vel.Y, ), (fr.vel.Z, ),
fr.state.Value,
cx, cy, cz, crx, cry, crz, (fr.fov, ),
}
stats = {
idx, (fr.ws, ), (fr.jp, ), (fr.jh, ),
fr.useJP , (fr.hip, ), (fr.slope, ), (fr.grav, ),
}
changed = lastStats ==
changed
k = ,
stats[k] ~= lastStats[k] changed =
changed
.(out.s, stats)
lastStats = stats
_, e (sv.events)
.(out.e, (e))
out
(o)
fr = {}
nextStat =
cur
i, f (o.f)
o.s[nextStat] o.s[nextStat][] <= i
cur = o.s[nextStat]
nextStat +=
fr[i] = {
t = f[],
cf = .(f[], f[], f[]) * .(f[], f[], f[]),
move = .(f[], f[], f[]),
vel = .(f[], f[], f[]),
state = stateByValue[f[]] .HumanoidStateType.Running,
cam = .(f[], f[], f[]) * .(f[], f[], f[]),
fov = f[],
ws = cur[], jp = cur[], jh = cur[], useJP = cur[] == ,
hip = cur[], slope = cur[], grav = cur[],
}
ev = {}
_, e (o.e)
.(ev, (e))
{ id = o.id, name = o.name, duration = o.d, frames = fr, events = ev, enc = o }
.(()
.(SYNC_EVERY)
dirty cloudOk
dirty =
list = {}
_, sv (saves)
sv.enc = sv.enc (sv)
.(list, sv.enc)
okEnc, json = (HttpService.JSONEncode, HttpService, { v = , saves = list })
okEnc
( .. (json))
#json > MAX_JSON
()
okSend, accepted = (() saveRemote:(json) )
okSend accepted
()
dirty =
)
loadDone =
.(()
status.Text =
saveRemote = ReplicatedStorage:(, )
loadRemote = ReplicatedStorage:(, )
(saveRemote loadRemote)
status.Text =
loadDone =
ok, result = (() loadRemote:() )
ok result ==
status.Text =
loadDone =
(result) == result ~=
okDec, data = (HttpService.JSONDecode, HttpService, result)
(okDec (data) == (data.saves) == )
status.Text =
loadDone =
_, o (data.saves)
okS, sv = (decodeSave, o)
okS
.(saves, sv)
nextId = .(nextId, sv.id + )
(sv)
()
cloudOk =
loadDone =
status.Text = ():(#saves)
)
startBtn.MouseButton1Click:(startRecording)
stopBtn.MouseButton1Click:(()
()
()
)
playBtn.MouseButton1Click:(()
(saves[#saves])
)FIRST SCRIPT! WOOHOO!! This roblox script contains: Playback saves, you can save/Loop your saved playbacks. Will reset if you leave and rejoin. i've tried to add a saving feature but it jst keeps bugging. Recorder / Begin replay. To begin the macro's repeat process. idk but thats abt it

Universal