Need help with custom camera script

Hi, I am making a custom free camera script.I need to make it look exactly like the roblox studio camera, but it always rotates on the local axis.
How could I rotate the Y axis of the camera CFrame on global axis?

This is my script:

    local rotation = CFrame.Angles(math.rad(mouseYDifference*sens), math.rad(mouseXDifference)*sens, 0)
	
	camera.CFrame = camera.CFrame * rotation

Thanks in advance.

This might help, but I am not sure if it will help.

local rotation = CFrame.Angles(math.rad(mouseYDifference*sens), math.rad(mouseXDifference)*sens, 0)

camera.CFrame = rotation * camera.CFrame

If that does not work then try this.