How to make a custom version of keep upright?

I’m making a hoverboard-like entity for my GCC entry, and it’s going pretty well (hovering works, etc). But the board keeps rotating everywhere except where I want it to rotate. Using constraint.KeepUpright messes everything up… So I want to create a custom one for my entity. Here’s the PhysicsSimulate function…

[lua]function ENT:PhysicsSimulate( phys, deltatime )

phys:Wake()

local Owner = self.Entity:GetOwner()

if ( !ValidEntity( Owner ) ) then return end

local TraceDist = 100000
local MovePos = phys:GetPos()
local TraceD = {}
TraceD.start = MovePos
TraceD.endpos = TraceD.start - vector_up * TraceDist
TraceD.filter = { self.Entity, Owner }
local Trace = util.TraceLine( TraceD )

local MoveAdd, AngleAdd = vector_origin, Angle( 0, 0, 0 )
local MoveSpeed = 800000

if ( Owner:KeyDown( IN_ATTACK2 ) ) then 
	MoveAdd = MoveAdd + self.Entity:GetAngles():Forward() * MoveSpeed
end

local Dist = Trace.Fraction * TraceDist
MoveAdd = MoveAdd + ( Vector( 0, 0, 100 - Dist ) * 2000 )

MoveAdd, AngleAdd = phys:CalculateForceOffset( MoveAdd, vector_origin )

return AngleAdd * deltatime, MoveAdd * deltatime, SIM_GLOBAL_ACCELERATION

end[/lua]

(I also want to change the yaw of the board to the yaw of the owner of the board in addition to keeping it upright)

Any ideas?