function shakeCam(c0,f0,intensity,durration,opposite) delay(0,function() camera = Workspace.CurrentCamera local c0 = c0 or game.Workspace.CurrentCamera.CoordinateFrame local f0 = f0 or game.Workspace.CurrentCamera.Focus local intensity = intensity or 1 local durration = durration or 0.5 local t = time() local i = (intensity/2) local i2 = i while ((time()-t) < durration) do if (skip) then break end if (opposite) then i = (i2*((time()-t)/durration)) else i = (i*(1-((time()-t)/durration))) end camera.CoordinateFrame = (c0*CFrame.new((-i+(math.random()*i)),(-i+(math.random()*i)),(-i+(math.random()*i)))) camera.Focus = (f0*CFrame.new((-i+(math.random()*i)),(-i+(math.random()*i)),(-i+(math.random()*i)))) wait() end camera.CoordinateFrame = c0 camera.Focus = f0 end) end shakeCam(nil,nil,3,1,nil)