--2D Camera, about 40 lines long.

local cam = Instance.new("Part")
cam.Name = "" ..torso.Parent.Name.. "Camera"
cam.CFrame = CFrame.new(torso.Position + Vector3.new(0, 0, 1), torso.Position)
cam.Transparency = 1
cam.CanCollide = false
cam.Parent = game.Workspace
local bp = Instance.new("BodyPosition")
bp.position = cam.Position
bp.maxForce = Vector3.new(10000000000, 10000000000, 10000000000)
bp.Parent = cam
local bg = Instance.new("BodyGyro")
bg.maxTorque = Vector3.new(0, 0, 0)
bg.Parent = cam
local scr = script.LocalScript:clone()
scr.Disabled = false
scr.Parent = torso.Parent
bg.P = (100000)
cam.TopSurface = "Smooth"
cam.BottomSurface = "Smooth"
end 

function onPlayerAdded(newPlayer) 
newPlayer.Changed:connect(function(property) 
if property == "Character" then 
onPlayerRespawned(newPlayer) 
end 
end) 
end 

game.Players.PlayerAdded:connect(onPlayerAdded)
