i have messed around with the code and made this masterpiece
local Run = game:GetService("RunService")
local Cam = game.Workspace.CurrentCamera
Cam.CameraType = Enum.CameraType.Scriptable
--carefull, as of now you should put here only the difference between EndCFrame and StartCframe
local MAGIC_FORMULA = CFrame.new(0, 0, 0, 0, 0.125, 0, 0, 0, 0, 0, 0, 0)
local MAGIC_FORMULA2 = CFrame.new(0, 0, 0, 0, -0.125, 0, 0, 0, 0, 0, 0, 0)
--End of warning
local tweenservice = game:GetService("TweenService")
local function addCF(CF1, CF2)
local x1,y1,z1, r001,r011,r021, r101,r111,r121, r201,r211,r221= CF1:GetComponents()
local CF1 = {x1,y1,z1, r001,r011,r021, r101,r111,r121, r201,r211,r221}
local x2,y2,z2, r002,r012,r022, r102,r112,r122, r202,r212,r222 = CF2:GetComponents()
local CF2 = {x2,y2,z2, r002,r012,r022, r102,r112,r122, r202,r212,r222}
local addedCF = {}
for index, item in ipairs(CF1) do
table.insert(addedCF,(CF2[index]+item))
end
local compiledNCF = CFrame.new(
addedCF[1],
addedCF[2],
addedCF[3],
addedCF[4],
addedCF[5],
addedCF[6],
addedCF[7],
addedCF[8],
addedCF[9],
addedCF[10],
addedCF[11],
addedCF[12]
)
return compiledNCF
end
local function getFrame(StartCFrame:CFrame, EndCFrame:CFrame, Completion)
local x1,y1,z1, r001,r011,r021, r101,r111,r121, r201,r211,r221= StartCFrame:GetComponents()
local CF1 = {x1,y1,z1, r001,r011,r021, r101,r111,r121, r201,r211,r221}
local x2,y2,z2, r002,r012,r022, r102,r112,r122, r202,r212,r222 = EndCFrame:GetComponents()
local CF2 = {x2,y2,z2, r002,r012,r022, r102,r112,r122, r202,r212,r222}
local normalizedCFrame = {}
for index, item in ipairs(CF1) do
table.insert(normalizedCFrame,(CF2[index]-item)*Completion)
end
local compiledNCF = CFrame.new(
normalizedCFrame[1]+CF1[1],
normalizedCFrame[2]+CF1[2],
normalizedCFrame[3]+CF1[3],
normalizedCFrame[4]+CF1[4],
normalizedCFrame[5]+CF1[5],
normalizedCFrame[6]+CF1[6],
normalizedCFrame[7]+CF1[7],
normalizedCFrame[8]+CF1[8],
normalizedCFrame[9]+CF1[9],
normalizedCFrame[10]+CF1[10],
normalizedCFrame[11]+CF1[11],
normalizedCFrame[12]+CF1[12]
)
return compiledNCF
end
local tween = function(Target:Camera, CF1:CFrame, CF2:CFrame, Time, timeStep)
local TIMESTEP = timeStep or 0.05
local steps = Time/TIMESTEP
for step = 0, steps, 1 do
local CF = getFrame(CF1, CF2, 1/steps*step)
print(CF)
Target.CFrame = CF
task.wait(TIMESTEP)
end
end
Cam.CFrame = CFrame.new(0,0,0)
while true do
tween(Cam, Cam.CFrame, addCF(Cam.CFrame, MAGIC_FORMULA), 4)
tween(Cam, Cam.CFrame, addCF(Cam.CFrame, MAGIC_FORMULA2), 4)
print(Cam.CFrame)
end
hope this gives you a headstart
now it’s up to you to implement it into a proper visual effect