Add "on player enters bed" and "on player leaves bed" world script events.